diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-21 09:40:26 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-21 09:40:26 -0700 |
commit | f8b71a3a92d69cb1c9c2162f9235d3dd550e4aa0 (patch) | |
tree | d0853186f33314a6e45903876d0e94d1619fcca9 /include/asm-sparc64/pgalloc.h | |
parent | 42a77a1b8fe4fd78cf8d8fccbaac918bbe888192 (diff) | |
parent | e4f25060b87a627f5cda84b8134911d43c919458 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-2.6: (44 commits)
sparc: Remove Sparc's asm-offsets for sclow.S
sparc64: Update defconfig.
sparc64: Add Niagara2 RNG driver.
sparc64: Add missing hypervisor service group numbers.
sparc64: Remove 4MB and 512K base page size options.
sparc64: Convert to generic helpers for IPI function calls.
sparc: Use new '%pS' infrastructure to print symbols.
sparc32: fix init.c allnoconfig build error
sparc64: Config category "Processor type and features" absent
sparc: arch/sparc/kernel/apc.c to unlocked_ioctl
sparc: join the remaining header files
sparc: merge header files with trivial differences
sparc: when header files are equal use asm-sparc version
sparc: copy sparc64 specific files to asm-sparc
sparc: Merge asm-sparc{,64}/asi.h
sparc: export openprom.h to userspace
sparc: Merge asm-sparc{,64}/types.h
sparc: Merge asm-sparc{,64}/termios.h
sparc: Merge asm-sparc{,64}/termbits.h
sparc: Merge asm-sparc{,64}/setup.h
...
Diffstat (limited to 'include/asm-sparc64/pgalloc.h')
-rw-r--r-- | include/asm-sparc64/pgalloc.h | 82 |
1 files changed, 1 insertions, 81 deletions
diff --git a/include/asm-sparc64/pgalloc.h b/include/asm-sparc64/pgalloc.h index 326de104d01..bec31641011 100644 --- a/include/asm-sparc64/pgalloc.h +++ b/include/asm-sparc64/pgalloc.h @@ -1,81 +1 @@ -#ifndef _SPARC64_PGALLOC_H -#define _SPARC64_PGALLOC_H - -#include <linux/kernel.h> -#include <linux/sched.h> -#include <linux/mm.h> -#include <linux/slab.h> -#include <linux/quicklist.h> - -#include <asm/spitfire.h> -#include <asm/cpudata.h> -#include <asm/cacheflush.h> -#include <asm/page.h> - -/* Page table allocation/freeing. */ - -static inline pgd_t *pgd_alloc(struct mm_struct *mm) -{ - return quicklist_alloc(0, GFP_KERNEL, NULL); -} - -static inline void pgd_free(struct mm_struct *mm, pgd_t *pgd) -{ - quicklist_free(0, NULL, pgd); -} - -#define pud_populate(MM, PUD, PMD) pud_set(PUD, PMD) - -static inline pmd_t *pmd_alloc_one(struct mm_struct *mm, unsigned long addr) -{ - return quicklist_alloc(0, GFP_KERNEL, NULL); -} - -static inline void pmd_free(struct mm_struct *mm, pmd_t *pmd) -{ - quicklist_free(0, NULL, pmd); -} - -static inline pte_t *pte_alloc_one_kernel(struct mm_struct *mm, - unsigned long address) -{ - return quicklist_alloc(0, GFP_KERNEL, NULL); -} - -static inline pgtable_t pte_alloc_one(struct mm_struct *mm, - unsigned long address) -{ - struct page *page; - void *pg; - - pg = quicklist_alloc(0, GFP_KERNEL, NULL); - if (!pg) - return NULL; - page = virt_to_page(pg); - pgtable_page_ctor(page); - return page; -} - -static inline void pte_free_kernel(struct mm_struct *mm, pte_t *pte) -{ - quicklist_free(0, NULL, pte); -} - -static inline void pte_free(struct mm_struct *mm, pgtable_t ptepage) -{ - pgtable_page_dtor(ptepage); - quicklist_free_page(0, NULL, ptepage); -} - - -#define pmd_populate_kernel(MM, PMD, PTE) pmd_set(PMD, PTE) -#define pmd_populate(MM,PMD,PTE_PAGE) \ - pmd_populate_kernel(MM,PMD,page_address(PTE_PAGE)) -#define pmd_pgtable(pmd) pmd_page(pmd) - -static inline void check_pgt_cache(void) -{ - quicklist_trim(0, NULL, 25, 16); -} - -#endif /* _SPARC64_PGALLOC_H */ +#include <asm-sparc/pgalloc.h> |