page table cache init cleanup
Alan,
The following patch cleans up the page table cache init functions. This is now a generic function across all architectures. Dummy definitions are placed in the relevant asm-*/pgtable.h.
Background: on X86 with PAE enabled, and ARM, we require a method to initialise slab caches for page tables. We'd rather not have a plethora of ifdef'd function calls in init/main.c.
This patch was generated against 2.4.8-ac12.
init/main.c +2 -3
@@ -665,9 +666,8 @@#endif mem_init ();kmem_cache_sizes_init (); -#if CONFIG_X86_PAE -init_pae_pgd_cache (); -#endif +pgtable_cache_init (); + mempages = num_physpages;fork_init (mempages);
include/asm-alpha/pgtable.h +5 -0
@@ -358,5 +358,10 @@extern void paging_init (void );#include <asm-generic/pgtable.h> + +/* +* No page table caches to initialise +*/ +#define pgtable_cache_init () do { } while (0)#endif /* _ALPHA_PGTABLE_H */
include/asm-cris/pgtable.h +5 -0
@@ -501,4 +501,9 @@#include <asm-generic/pgtable.h> +/* +* No page table caches to initialise +*/ +#define pgtable_cache_init () do { } while (0) +#endif /* _CRIS_PGTABLE_H */
include/asm-i386/pgtable.h +12 -0
@@ -105,8 +105,20 @@#ifndef __ASSEMBLY__#if CONFIG_X86_PAE # include <asm/pgtable-3level.h> + +/* +* Need to initialise the X86 PAE caches +*/ +extern void pgtable_cache_init (void ); +#else # include <asm/pgtable-2level.h> + +/* +* No page table caches to initialise +*/ +#define pgtable_cache_init () do { } while (0) +#endif #endif
include/asm-ia64/pgtable.h +5 -0
@@ -472,5 +472,10 @@#define KERNEL_PG_SHIFT _PAGE_SIZE_64M#define KERNEL_PG_SIZE (1 << KERNEL_PG_SHIFT)#define KERNEL_PG_NUM ((KERNEL_START - PAGE_OFFSET) / KERNEL_PG_SIZE) + +/* +* No page table caches to initialise +*/ +#define pgtable_cache_init () do { } while (0)#endif /* _ASM_IA64_PGTABLE_H */
include/asm-m68k/pgtable.h +5 -0
@@ -181,5 +181,10 @@#ifndef __ASSEMBLY__#include <asm-generic/pgtable.h> #endif /* !__ASSEMBLY__ */ + +/* +* No page table caches to initialise +*/ +#define pgtable_cache_init () do { } while (0)#endif /* _M68K_PGTABLE_H */
include/asm-mips/pgtable.h +5 -0
@@ -743,5 +743,10 @@#endif /* !defined (_LANGUAGE_ASSEMBLY) */ #define io_remap_page_range remap_page_range + +/* +* No page table caches to initialise +*/ +#define pgtable_cache_init () do { } while (0)#endif /* _ASM_PGTABLE_H */
include/asm-mips64/pgtable.h +5 -0
@@ -798,5 +798,10 @@#include <asm-generic/pgtable.h> #endif /* !defined (_LANGUAGE_ASSEMBLY) */ + +/* +* No page table caches to initialise +*/ +#define pgtable_cache_init () do { } while (0)#endif /* _ASM_PGTABLE_H */
include/asm-parisc/pgtable.h +5 -0
@@ -334,4 +334,9 @@#define io_remap_page_range remap_page_range +/* +* No page table caches to initialise +*/ +#define pgtable_cache_init () do { } while (0) +#endif /* _PARISC_PAGE_H */
include/asm-ppc/pgtable.h +5 -0
@@ -531,6 +531,11 @@#define io_remap_page_range remap_page_range +/* +* No page table caches to initialise +*/ +#define pgtable_cache_init () do { } while (0) +#endif /* __ASSEMBLY__ */ #endif /* _PPC_PGTABLE_H */ #endif /* __KERNEL__ */
include/asm-ppc64/pgtable.h +5 -0
@@ -438,5 +438,10 @@/* #include <asm-generic/pgtable.h> */ +/* +* No page table caches to initialise +*/ +#define pgtable_cache_init () do { } while (0) +#endif /* __ASSEMBLY__ */ #endif /* _PPC64_PGTABLE_H */
include/asm-s390/pgtable.h +5 -0
@@ -472,6 +472,11 @@/* Needs to be defined here and not in linux/mm.h, as it is arch dependent */ #define PageSkip (page) (0)#define kern_addr_valid (addr) (1) + +/* +* No page table caches to initialise +*/ +#define pgtable_cache_init () do { } while (0)#endif /* _S390_PAGE_H */
include/asm-s390x/pgtable.h +5 -0
@@ -492,5 +492,10 @@#define PageSkip (page) (0)#define kern_addr_valid (addr) (1) +/* +* No page table caches to initialise +*/ +#define pgtable_cache_init () do { } while (0) +#endif /* _S390_PAGE_H */
include/asm-sh/pgtable.h +5 -0
@@ -275,6 +275,11 @@#define PageSkip (page) (0)#define kern_addr_valid (addr) (1)#define io_remap_page_range remap_page_range + +/* +* No page table caches to initialise +*/ +#define pgtable_cache_init () do { } while (0)#endif /* __ASM_SH_PAGE_H */
include/asm-sparc/pgtable.h +5 -0
@@ -454,4 +454,9 @@/* We provide our own get_unmapped_area to cope with VA holes for userland */ #define HAVE_ARCH_UNMAPPED_AREA +/* +* No page table caches to initialise +*/ +#define pgtable_cache_init () do { } while (0) +#endif /* !(_SPARC_PGTABLE_H) */
include/asm-sparc64/pgtable.h +5 -0
@@ -326,4 +326,9 @@#endif /* !(__ASSEMBLY__) */ +/* +* No page table caches to initialise +*/ +#define pgtable_cache_init () do { } while (0) +#endif /* !(_SPARC64_PGTABLE_H) */
include/asm-um/pgtable.h +5 -0
@@ -365,6 +365,11 @@#endif +/* +* No page table caches to initialise +*/ +#define pgtable_cache_init () do { } while (0) +#endif /* * Overrides for Emacs so that we follow Linus's tabbing style.
include/asm-x86_64/pgtable.h +5 -0
@@ -398,4 +398,9 @@#define HAVE_ARCH_UNMAPPED_AREA +/* +* No page table caches to initialise +*/ +#define pgtable_cache_init () do { } while (0) +#endif /* _X86_64_PGTABLE_H */
--
Russell King ([email protected]) The developer of ARM Linux
http://www.arm.linux.org.uk/personal/aboutme.html