git://ftp.safe.ca
/
safe
/
jmp
/
linux-2.6
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ide: fix refcounting in device drivers
[safe/jmp/linux-2.6]
/
include
/
asm-frv
/
pgalloc.h
diff --git
a/include/asm-frv/pgalloc.h
b/include/asm-frv/pgalloc.h
index
1bd28f4
..
971e6ad
100644
(file)
--- a/
include/asm-frv/pgalloc.h
+++ b/
include/asm-frv/pgalloc.h
@@
-15,7
+15,6
@@
#ifndef _ASM_PGALLOC_H
#define _ASM_PGALLOC_H
#ifndef _ASM_PGALLOC_H
#define _ASM_PGALLOC_H
-#include <linux/config.h>
#include <asm/setup.h>
#include <asm/virtconvert.h>
#include <asm/setup.h>
#include <asm/virtconvert.h>
@@
-26,29
+25,35
@@
do { \
__set_pmd((PMD), page_to_pfn(PAGE) << PAGE_SHIFT | _PAGE_TABLE); \
} while(0)
do { \
__set_pmd((PMD), page_to_pfn(PAGE) << PAGE_SHIFT | _PAGE_TABLE); \
} while(0)
+#define pmd_pgtable(pmd) pmd_page(pmd)
/*
* Allocate and free page tables.
*/
extern pgd_t *pgd_alloc(struct mm_struct *);
/*
* Allocate and free page tables.
*/
extern pgd_t *pgd_alloc(struct mm_struct *);
-extern void pgd_free(pgd_t *);
+extern void pgd_free(
struct mm_struct *mm,
pgd_t *);
extern pte_t *pte_alloc_one_kernel(struct mm_struct *, unsigned long);
extern pte_t *pte_alloc_one_kernel(struct mm_struct *, unsigned long);
-extern
struct page *
pte_alloc_one(struct mm_struct *, unsigned long);
+extern
pgtable_t
pte_alloc_one(struct mm_struct *, unsigned long);
-static inline void pte_free_kernel(pte_t *pte)
+static inline void pte_free_kernel(
struct mm_struct *mm,
pte_t *pte)
{
free_page((unsigned long)pte);
}
{
free_page((unsigned long)pte);
}
-static inline void pte_free(struct
page *
pte)
+static inline void pte_free(struct
mm_struct *mm, pgtable_t
pte)
{
{
+ pgtable_page_dtor(pte);
__free_page(pte);
}
__free_page(pte);
}
-#define __pte_free_tlb(tlb,pte) tlb_remove_page((tlb),(pte))
+#define __pte_free_tlb(tlb,pte) \
+do { \
+ pgtable_page_dtor(pte); \
+ tlb_remove_page((tlb),(pte)); \
+} while (0)
/*
* allocating and freeing a pmd is trivial: the 1-entry pmd is
/*
* allocating and freeing a pmd is trivial: the 1-entry pmd is
@@
-56,7
+61,7
@@
static inline void pte_free(struct page *pte)
* (In the PAE case we free the pmds as part of the pgd.)
*/
#define pmd_alloc_one(mm, addr) ({ BUG(); ((pmd_t *) 2); })
* (In the PAE case we free the pmds as part of the pgd.)
*/
#define pmd_alloc_one(mm, addr) ({ BUG(); ((pmd_t *) 2); })
-#define pmd_free(
x)
do { } while (0)
+#define pmd_free(
mm, x)
do { } while (0)
#define __pmd_free_tlb(tlb,x) do { } while (0)
#endif /* CONFIG_MMU */
#define __pmd_free_tlb(tlb,x) do { } while (0)
#endif /* CONFIG_MMU */