memblock for 2.6.37
Subsystems (17)
Hi Linus,
This is the culmination of Benjamin Herrenschmidt and Yinghai Lu's memblock (formerly lmb) work: this generalizes the code and uses it for x86.
We have tested it to the best of our abilities, mainly on x86 of course, but I obviously can't promise it will be regression-free: it's a large chunk of work and touches many tricky things, we did get some bug reports later than I really would have liked, and even if it is correct it might smoke out bugs elsewhere in the system.
One of the risks for the latter is that it does is it changes the default memory allocation policy on x86 from bottom-up to top-down; top-down really is the preferred option both from a bug-discovery perspective and preserving a potentially precious resource in the presence of broken DMA devices or the like, but it might also catch things that just "happen to work".
Additionally, there was an issue with an ARM build failure that was not caught until fairly late. rmk asked for the series to be rebased as late as last week to avoid a bisection hole on ARM, but my understanding is that your policy is that you do not want the history to be destroyed in that manner. Please let me know if you would prefer it to be done differently.
There will be two conflicts if you pull this based on the below commit:
5fe8321b8886d814e65952d74b207fe59e1096ea: Merge branch 'x86-x2apic-for-linus' ... (2010-10-21 13:54:05 -0700)
(which is your current head at the time I write this), both of them are trivial to resolve -- in one case two functions have been added in the same place; you need both functions; the other is a simple Makefile merge. I have also pushed a premerged branch for your convenience.
The unmerged branch is at:
git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip.git core-memblock-for-linus
The premerged branch is at:
git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip.git core-memblock-for-linus-merged
-hpa
Benjamin Herrenschmidt (37):
memblock: Fix memblock_is_region_reserved() to return a boolean
memblock: Rename memblock_region to memblock_type and memblock_property to memblock_region
memblock: No reason to include asm/memblock.h late
memblock: Implement memblock_is_memory and memblock_is_region_memory memblock/arm: pfn_valid uses memblock_is_memory()
memblock/arm: Use memblock_region_is_memory() for omap fb
memblock: Introduce for_each_memblock() and new accessors memblock/microblaze: Use new accessors
memblock/sh: Use new accessors
memblock/sparc: Use new accessors
memblock/powerpc: Use new accessors
memblock/arm: Use new accessors
memblock: Remove obsolete accessors
memblock: Remove memblock_find()
memblock: Remove nid_range argument, arch provides memblock_nid_range() instead
memblock: Factor the lowest level alloc function
memblock: Expose MEMBLOCK_ALLOC_ANYWHERE
memblock: Introduce default allocation limit and use it to replace explicit ones
memblock: Remove rmo_size, burry it in arch/powerpc where it belongs
memblock: Change u64 to phys_addr_t
memblock: Remove unused memblock.debug struct member
memblock: Remove memblock_type.size and add memblock.memory_size instead
memblock: Move memblock arrays to static storage in memblock.c and make their size a variable
memblock: Add debug markers at the end of the array
memblock: Make memblock_find_region() out of memblock_alloc_region()
memblock: Define MEMBLOCK_ERROR internally instead of using ~(phys_addr_t)0
memblock: Move memblock_init() to the bottom of the file
memblock: split memblock_find_base() out of __memblock_alloc_base()
memblock: Move functions around into a more sensible order
memblock: Add array resizing support
memblock: Add arch function to control coalescing of memblock memory regions
memblock: Add "start" argument to memblock_find_base()
memblock: NUMA allocate can now use early_pfn_map
memblock: Separate memblock_alloc_nid() and memblock_alloc_try_nid()
memblock: Make memblock_alloc_try_nid() fallback to MEMBLOCK_ALLOC_ANYWHERE
memblock: Add debugfs files to dump the arrays content
memblock: Make MEMBLOCK_ERROR be 0
H. Peter Anvin (1):
Merge branch 'x86/urgent' into core/memblock
Ingo Molnar (2):
Merge commit 'v2.6.36-rc3' into x86/memblock Merge commit 'v2.6.36-rc7' into core/memblock
Jeremy Fitzhardinge (3):
memblock: Allow memblock_init to be called early
xen: Cope with unmapped pages when initializing kernel pagetable
x86-64: Only set max_pfn_mapped to 512 MiB if we enter via head_64.S
Michal Simek (1):
memblock, microblaze: Fix memblock API change fallout
Yinghai Lu (33):
memblock: Expose some memblock bits for use by x86
memblock: Improve debug output when resizing the reserve array
memblock: Export MEMBLOCK_ERROR
memblock: Protect memblock.h with CONFIG_HAVE_MEMBLOCK
memblock: Option for the architecture to put memblock into the .init section
memblock: Add memblock_find_in_range()
memblock: Add memblock_free/reserve_reserved_regions()
x86, memblock: Add memblock_x86_find_in_range_size()
bootmem, x86: Add weak version of reserve_bootmem_generic
x86, memblock: Add memblock_x86_to_bootmem()
x86, memblock: Add memblock_x86_reserve_range/memblock_x86_free_range
x86, memblock: Add get_free_all_memory_range()
x86, memblock: Add memblock_x86_register_active_regions() and memblock_x86_hole_size()
memblock: Add find_memory_core_early()
x86, memblock: Add memblock_x86_find_in_range_node()
x86, memblock: Add memblock_x86_free_memory_in_range()
x86, memblock: Add memblock_x86_memory_in_range()
x86, memblock: Use memblock_debug to control debug message print out
x86: Use memblock to replace early_res
x86, memblock: Replace e820_/_early string with memblock_
x86: Remove not used early_res code
x86, memblock: Use memblock_memory_size()/memblock_free_memory_size() to get correct dma_reserve
x86: Remove old bootmem code
powerpc, memblock: Fix memblock API change fallout
memblock: Fix section mismatch warnings
arm, memblock: Fix the sparsemem build
x86, memblock: Fix crashkernel allocation
x86-32, memblock: Make add_highpages honor early reserved ranges
memblock: Fix wraparound in find_region()
x86, memblock: Remove __memblock_x86_find_in_range_size()
memblock/arm: Fix memblock_region_is_memory() typo
memblock: Annotate memblock functions with __init_memblock
memblock, bootmem: Round pfn properly for memory and reserved regions
arch/arm/mm/init.c | 37 +- arch/arm/plat-omap/fb.c | 6 +- arch/microblaze/include/asm/memblock.h | 3 - arch/microblaze/mm/init.c | 30 +- arch/powerpc/include/asm/memblock.h | 7 - arch/powerpc/include/asm/mmu.h | 12 + arch/powerpc/kernel/head_40x.S | 6 +- arch/powerpc/kernel/paca.c | 2 +- arch/powerpc/kernel/prom.c | 15 +- arch/powerpc/kernel/rtas.c | 2 +- arch/powerpc/kernel/setup_32.c | 2 +- arch/powerpc/kernel/setup_64.c | 2 +- arch/powerpc/mm/40x_mmu.c | 17 +- arch/powerpc/mm/44x_mmu.c | 14 + arch/powerpc/mm/fsl_booke_mmu.c | 12 +- arch/powerpc/mm/hash_utils_64.c | 35 +- arch/powerpc/mm/init_32.c | 43 +- arch/powerpc/mm/init_64.c | 1 + arch/powerpc/mm/mem.c | 94 ++--- arch/powerpc/mm/numa.c | 17 +- arch/powerpc/mm/ppc_mmu_32.c | 18 +- arch/powerpc/mm/tlb_nohash.c | 16 + arch/powerpc/platforms/embedded6xx/wii.c | 2 +- arch/sh/include/asm/memblock.h | 2 - arch/sh/mm/init.c | 17 +- arch/sparc/include/asm/memblock.h | 2 - arch/sparc/mm/init_64.c | 46 +- arch/x86/Kconfig | 15 +- arch/x86/include/asm/e820.h | 20 +- arch/x86/include/asm/efi.h | 2 +- arch/x86/include/asm/io.h | 1 + arch/x86/include/asm/memblock.h | 23 + arch/x86/kernel/acpi/sleep.c | 9 +- arch/x86/kernel/apic/numaq_32.c | 3 +- arch/x86/kernel/check.c | 16 +- arch/x86/kernel/e820.c | 191 ++----- arch/x86/kernel/efi.c | 5 +- arch/x86/kernel/head.c | 3 +- arch/x86/kernel/head32.c | 10 +- arch/x86/kernel/head64.c | 9 +- arch/x86/kernel/mpparse.c | 5 +- arch/x86/kernel/setup.c | 88 ++-- arch/x86/kernel/setup_percpu.c | 6 - arch/x86/kernel/trampoline.c | 10 +- arch/x86/mm/Makefile | 2 + arch/x86/mm/init.c | 10 +- arch/x86/mm/init_32.c | 119 +---- arch/x86/mm/init_64.c | 67 +--- arch/x86/mm/ioremap.c | 5 + arch/x86/mm/k8topology_64.c | 4 +- arch/x86/mm/memblock.c | 348 +++++++++++++ arch/x86/mm/memtest.c | 7 +- arch/x86/mm/numa_32.c | 30 +- arch/x86/mm/numa_64.c | 84 +--- arch/x86/mm/srat_32.c | 3 +- arch/x86/mm/srat_64.c | 11 +- arch/x86/xen/enlighten.c | 3 + arch/x86/xen/mmu.c | 31 +- arch/x86/xen/setup.c | 3 +- drivers/video/omap2/vram.c | 8 +- include/linux/early_res.h | 23 - include/linux/memblock.h | 168 +++++-- include/linux/mm.h | 2 + kernel/Makefile | 1 - kernel/early_res.c | 590 --------------------- mm/bootmem.c | 13 +- mm/memblock.c | 837 ++++++++++++++++++++---------- mm/page_alloc.c | 86 ++-- mm/sparse-vmemmap.c | 11 - 69 files changed, 1639 insertions(+), 1703 deletions(-) create mode 100644 arch/x86/include/asm/memblock.h create mode 100644 arch/x86/mm/memblock.c delete mode 100644 include/linux/early_res.h delete mode 100644 kernel/early_res.c
arch/arm/mm/init.c +13 -24
@@ -150,6 +150,7 @@ static void __init find_limits(struct meminfo *mi,static void __init arm_bootmem_init (struct meminfo *mi,unsigned long start_pfn,unsigned long end_pfn) { +struct memblock_region *reg;unsigned int boot_pages;phys_addr_t bitmap;pg_data_t *pgdat;
@@ -180,13 +181,13 @@ static void __init arm_bootmem_init(struct meminfo *mi,/* * Reserve the memblock reserved regions in bootmem. */ -for (i =0 ; i < memblock.reserved.cnt; i++) { -phys_addr_t start =memblock_start_pfn (&memblock.reserved, i); -if (start >= start_pfn && -memblock_end_pfn (&memblock.reserved, i) <= end_pfn) +for_each_memblock (reserved, reg) { +phys_addr_t start =memblock_region_reserved_base_pfn (reg); +phys_addr_t end =memblock_region_reserved_end_pfn (reg); +if (start >= start_pfn && end <= end_pfn)reserve_bootmem_node (pgdat,__pfn_to_phys (start), -memblock_size_bytes (&memblock.reserved, i), -BOOTMEM_DEFAULT ); + (end - start) <<PAGE_SHIFT , +BOOTMEM_DEFAULT ); } }
@@ -237,20 +238,7 @@ static void __init arm_bootmem_free(struct meminfo *mi, unsigned long min,#ifndef CONFIG_SPARSEMEM int pfn_valid (unsigned long pfn) { -struct memblock_region *mem = &memblock.memory; -unsigned int left =0 , right = mem->cnt; - -do { -unsigned int mid = (right + left) /2 ; - -if (pfn <memblock_start_pfn (mem, mid)) - right = mid; -else if (pfn >=memblock_end_pfn (mem, mid)) - left = mid +1 ; -else -return 1 ; - }while (left < right); -return 0 ; +return memblock_is_memory (pfn <<PAGE_SHIFT ); }EXPORT_SYMBOL (pfn_valid);
@@ -260,10 +248,11 @@ static void arm_memory_present(void)#else static void arm_memory_present (void ) { -int i; -for (i =0 ; i < memblock.memory.cnt; i++) -memory_present (0 ,memblock_start_pfn (&memblock.memory, i), -memblock_end_pfn (&memblock.memory, i)); +struct memblock_region *reg; + +for_each_memblock (memory, reg) +memory_present (0 ,memblock_region_memory_base_pfn (reg), +memblock_region_memory_end_pfn (reg)); }#endif
arch/arm/plat-omap/fb.c +1 -5
@@ -173,11 +173,7 @@ static int check_fbmem_region(int region_idx, struct omapfb_mem_region *rg,static int valid_sdram (unsigned long addr,unsigned long size) { -struct memblock_property res; - - res.base = addr; - res.size = size; -return !memblock_find (&res) && res.base == addr && res.size == size; +return memblock_is_region_memory (addr, size); }static int reserve_sdram (unsigned long addr,unsigned long size)
arch/microblaze/include/asm/memblock.h +0 -3
@@ -9,9 +9,6 @@#ifndef _ASM_MICROBLAZE_MEMBLOCK_H#define _ASM_MICROBLAZE_MEMBLOCK_H -/* MEMBLOCK limit is OFF */ -#define MEMBLOCK_REAL_LIMIT 0xFFFFFFFF -#endif /* _ASM_MICROBLAZE_MEMBLOCK_H */
arch/microblaze/mm/init.c +14 -16
@@ -70,16 +70,16 @@ static void __init paging_init(void)void __init setup_memory (void ) { -int i;unsigned long map_size; +struct memblock_region *reg; +#ifndef CONFIG_MMU u32 kernel_align_start, kernel_align_size;/* Find main memory where is the kernel */ -for (i =0 ; i < memblock.memory.cnt; i++) { - memory_start = (u32 ) memblock.memory.region[i].base; - memory_end = (u32 ) memblock.memory.region[i].base - + (u32 ) memblock.memory.region[i].size; +for_each_memblock (memory, reg) { + memory_start = (u32 )reg->base; + memory_end = (u32 ) reg->base + reg->size;if ((memory_start <= (u32 )_text) && ((u32 )_text <= memory_end)) { memory_size = memory_end - memory_start;
@@ -142,12 +142,10 @@ void __init setup_memory(void)free_bootmem (memory_start, memory_size);/* reserve allocate blocks */ -for (i =0 ; i < memblock.reserved.cnt; i++) { -pr_debug ("reserved %d - 0x%08x-0x%08x\n" , i, - (u32 ) memblock.reserved.region[i].base, - (u32 )memblock_size_bytes (&memblock.reserved, i)); -reserve_bootmem (memblock.reserved.region[i].base, -memblock_size_bytes (&memblock.reserved, i) -1 ,BOOTMEM_DEFAULT ); +for_each_memblock (reserved, reg) { +pr_debug ("reserved - 0x%08x-0x%08x\n" , + (u32 ) reg->base, (u32 ) reg->size); +reserve_bootmem (reg->base, reg->size,BOOTMEM_DEFAULT ); }#ifdef CONFIG_MMU init_bootmem_done =1 ;
@@ -230,7 +228,7 @@ static void mm_cmdline_setup(void)if (maxmem && memory_size > maxmem) { memory_size = maxmem; memory_end = memory_start + memory_size; - memblock.memory.region[0 ].size = memory_size; + memblock.memory.regions[0 ].size = memory_size; } } }
@@ -273,14 +271,14 @@ asmlinkage void __init mmu_init(void)machine_restart (NULL ); } -if ((u32 ) memblock.memory.region[0 ].size <0x1000000 ) { +if ((u32 ) memblock.memory.regions[0 ].size <0x1000000 ) {printk (KERN_EMERG "Memory must be greater than 16MB\n" );machine_restart (NULL ); }/* Find main memory where the kernel is */ - memory_start = (u32 ) memblock.memory.region[0 ].base; - memory_end = (u32 ) memblock.memory.region[0 ].base + - (u32 ) memblock.memory.region[0 ].size; + memory_start = (u32 ) memblock.memory.regions[0 ].base; + memory_end = (u32 ) memblock.memory.regions[0 ].base + + (u32 ) memblock.memory.regions[0 ].size; memory_size = memory_end - memory_start;mm_cmdline_setup ();/* FIXME parse args from command line - not used */
arch/powerpc/include/asm/memblock.h +0 -7
@@ -5,11 +5,4 @@ #define MEMBLOCK_DBG(fmt...) udbg_printf(fmt) -#ifdef CONFIG_PPC32 -extern phys_addr_t lowmem_end_addr; -#define MEMBLOCK_REAL_LIMIT lowmem_end_addr -#else -#define MEMBLOCK_REAL_LIMIT 0 -#endif -#endif /* _ASM_POWERPC_MEMBLOCK_H */
arch/powerpc/include/asm/mmu.h +12 -0
@@ -2,6 +2,8 @@#define _ASM_POWERPC_MMU_H_#ifdef __KERNEL__ +#include <linux/types.h> +#include <asm/asm-compat.h> #include <asm/feature-fixups.h>
@@ -82,6 +84,16 @@ extern unsigned int __start___mmu_ftr_fixup, __stop___mmu_ftr_fixup;extern void early_init_mmu (void );extern void early_init_mmu_secondary (void ); +extern void setup_initial_memory_limit (phys_addr_t first_memblock_base, +phys_addr_t first_memblock_size); + +#ifdef CONFIG_PPC64 +/* This is our real memory area size on ppc64 server, on embedded, we +* make it match the size our of bolted TLB area +*/ +extern u64 ppc64_rma_size; +#endif /* CONFIG_PPC64 */ +#endif /* !__ASSEMBLY__ */ /* The kernel use the constants below to index in the page sizes array.
arch/powerpc/kernel/head_40x.S +1 -5
@@ -923,11 +923,7 @@ initial_mmu: mtspr SPRN_PID,r0 sync - /* Configure and load two entries into TLB slots 62 and 63. - * In case we are pinning TLBs, these are reserved in by the - * other TLB functions. If not reserving, then it doesn't - * matter where they are loaded. - */ + /* Configure and load one entry into TLB slots 63 */ clrrwi r4,r4,10 /* Mask off the real page number */ ori r4,r4,(TLB_WR | TLB_EX) /* Set the write and execute bits */
arch/powerpc/kernel/paca.c +1 -1
@@ -127,7 +127,7 @@ void __init allocate_pacas(void)* the first segment. On iSeries they must be within the area mapped * by the HV, which is HvPagesToMap * HVPAGESIZE bytes. */ - limit =min (0x10000000ULL , memblock.rmo_size); + limit =min (0x10000000ULL , ppc64_rma_size);if (firmware_has_feature (FW_FEATURE_ISERIES )) limit =min (limit, HvPagesToMap *HVPAGESIZE );
arch/powerpc/kernel/prom.c +10 -5
@@ -66,6 +66,7 @@int __initdata iommu_is_off;int __initdata iommu_force_on;unsigned long tce_alloc_start, tce_alloc_end; +u64 ppc64_rma_size;#endif static int __init early_parse_mem (char *p)
@@ -98,7 +99,7 @@ static void __init move_device_tree(void)if ((memory_limit && (start + size) > memory_limit) ||overlaps_crashkernel (start, size)) { - p =__va (memblock_alloc_base (size,PAGE_SIZE , memblock.rmo_size)); + p =__va (memblock_alloc (size,PAGE_SIZE ));memcpy (p, initial_boot_params, size); initial_boot_params = (struct boot_param_header *)p;DBG ("Moved device tree to 0x%p\n" , p);
@@ -492,7 +493,7 @@ static int __init early_init_dt_scan_memory_ppc(unsigned long node,void __init early_init_dt_add_memory_arch (u64 base,u64 size) { -#if defined(CONFIG_PPC64 ) +#ifdef CONFIG_PPC64 if (iommu_is_off) {if (base >=0x80000000ul )return ;
@@ -501,9 +502,13 @@ void __init early_init_dt_add_memory_arch(u64 base, u64 size) }#endif -memblock_add (base, size); - +/* First MEMBLOCK added, do some special initializations */ +if (memstart_addr == ~(phys_addr_t )0 ) +setup_initial_memory_limit (base, size); memstart_addr =min ((u64 )memstart_addr, base); + +/* Add the chunk to the MEMBLOCK list */ +memblock_add (base, size); }u64 __init early_init_dt_alloc_memory_arch (u64 size,u64 align)
@@ -655,7 +660,6 @@ static void __init phyp_dump_reserve_mem(void)static inline void __init phyp_dump_reserve_mem (void ) {}#endif /* CONFIG_PHYP_DUMP && CONFIG_PPC_RTAS */ -void __init early_init_devtree (void *params) {phys_addr_t limit;
@@ -683,6 +687,7 @@ void __init early_init_devtree(void *params)/* Scan memory nodes and rebuild MEMBLOCKs */ memblock_init (); +of_scan_flat_dt (early_init_dt_scan_root,NULL );of_scan_flat_dt (early_init_dt_scan_memory_ppc,NULL );
arch/powerpc/kernel/rtas.c +1 -1
@@ -969,7 +969,7 @@ void __init rtas_initialize(void)*/ #ifdef CONFIG_PPC64 if (machine_is (pseries) &&firmware_has_feature (FW_FEATURE_LPAR )) { - rtas_region =min (memblock.rmo_size,RTAS_INSTANTIATE_MAX ); + rtas_region =min (ppc64_rma_size,RTAS_INSTANTIATE_MAX ); ibm_suspend_me_token =rtas_token ("ibm,suspend-me" ); }#endif
arch/powerpc/kernel/setup_32.c +1 -1
@@ -246,7 +246,7 @@ static void __init irqstack_early_init(void)unsigned int i;/* interrupt stacks must be in lowmem, we get that for free on ppc32 -* as the memblock is limited to lowmem by MEMBLOCK_REAL_LIMIT */ +* as the memblock is limited to lowmem by default */ for_each_possible_cpu (i) { softirq_ctx[i] = (struct thread_info *)__va (memblock_alloc (THREAD_SIZE ,THREAD_SIZE ));
arch/powerpc/kernel/setup_64.c +1 -1
@@ -486,7 +486,7 @@ static void __init emergency_stack_init(void)* bringup, we need to get at them in real mode. This means they * must also be within the RMO region. */ - limit =min (slb0_limit (), memblock.rmo_size); + limit =min (slb0_limit (), ppc64_rma_size);for_each_possible_cpu (i) {unsigned long sp;
arch/powerpc/mm/40x_mmu.c +15 -2
@@ -35,6 +35,7 @@#include <linux/init.h> #include <linux/delay.h> #include <linux/highmem.h> +#include <linux/memblock.h> #include <asm/pgalloc.h> #include <asm/prom.h>
@@ -47,6 +48,7 @@#include <asm/bootx.h> #include <asm/machdep.h> #include <asm/setup.h> +#include "mmu_decl.h" extern int __map_without_ltlbs;
@@ -139,8 +141,19 @@ unsigned long __init mmu_mapin_ram(unsigned long top)* coverage with normal-sized pages (or other reasons) do not * attempt to allocate outside the allowed range. */ - - __initial_memory_limit_addr = memstart_addr + mapped; +memblock_set_current_limit (mapped);return mapped; } + +void setup_initial_memory_limit (phys_addr_t first_memblock_base, +phys_addr_t first_memblock_size) +{ +/* We don't currently support the first MEMBLOCK not mapping 0 +* physical on those processors +*/ +BUG_ON (first_memblock_base !=0 ); + +/* 40x can only access 16MB at the moment (see head_40x.S) */ +memblock_set_current_limit (min_t (u64, first_memblock_size,0x00800000 )); +}
arch/powerpc/mm/44x_mmu.c +14 -0
@@ -24,6 +24,8 @@*/ #include <linux/init.h> +#include <linux/memblock.h> +#include <asm/mmu.h> #include <asm/system.h> #include <asm/page.h>
@@ -213,6 +215,18 @@ unsigned long __init mmu_mapin_ram(unsigned long top)return total_lowmem; } +void setup_initial_memory_limit (phys_addr_t first_memblock_base, +phys_addr_t first_memblock_size) +{ +/* We don't currently support the first MEMBLOCK not mapping 0 +* physical on those processors +*/ +BUG_ON (first_memblock_base !=0 ); + +/* 44x has a 256M TLB entry pinned at boot */ +memblock_set_current_limit (min_t (u64, first_memblock_size,PPC_PIN_SIZE )); +} +#ifdef CONFIG_SMP void __cpuinit mmu_init_secondary (int cpu) {
arch/powerpc/mm/fsl_booke_mmu.c +11 -1
@@ -40,6 +40,7 @@#include <linux/init.h> #include <linux/delay.h> #include <linux/highmem.h> +#include <linux/memblock.h> #include <asm/pgalloc.h> #include <asm/prom.h>
@@ -213,5 +214,14 @@ void __init adjust_total_lowmem(void)pr_cont ("%lu Mb, residual: %dMb\n" ,tlbcam_sz (tlbcam_index -1 ) >>20 , (unsigned int )((total_lowmem - __max_low_memory) >>20 )); - __initial_memory_limit_addr = memstart_addr + __max_low_memory; +memblock_set_current_limit (memstart_addr + __max_low_memory); +} + +void setup_initial_memory_limit (phys_addr_t first_memblock_base, +phys_addr_t first_memblock_size) +{ +phys_addr_t limit = first_memblock_base + first_memblock_size; + +/* 64M mapped initially according to head_fsl_booke.S */ +memblock_set_current_limit (min_t (u64, limit,0x04000000 )); }
arch/powerpc/mm/hash_utils_64.c +28 -7
@@ -588,7 +588,7 @@ static void __init htab_initialize(void)unsigned long pteg_count;unsigned long prot;unsigned long base =0 , size =0 , limit; -int i; +struct memblock_region *reg;DBG (" -> htab_initialize()\n" );
@@ -625,7 +625,7 @@ static void __init htab_initialize(void)if (machine_is (cell)) limit =0x80000000 ;else - limit =0 ; + limit =MEMBLOCK_ALLOC_ANYWHERE ; table =memblock_alloc_base (htab_size_bytes, htab_size_bytes, limit);
@@ -649,7 +649,7 @@ static void __init htab_initialize(void)#ifdef CONFIG_DEBUG_PAGEALLOC linear_map_hash_count =memblock_end_of_DRAM () >>PAGE_SHIFT ; linear_map_hash_slots =__va (memblock_alloc_base (linear_map_hash_count, -1 , memblock.rmo_size)); +1 , ppc64_rma_size));memset (linear_map_hash_slots,0 , linear_map_hash_count);#endif /* CONFIG_DEBUG_PAGEALLOC */
@@ -659,9 +659,9 @@ static void __init htab_initialize(void)*/ /* create bolted the linear mapping in the hash table */ -for (i=0 ; i < memblock.memory.cnt; i++) { - base = (unsigned long )__va (memblock.memory.region[i].base); - size = memblock.memory.region[i].size; +for_each_memblock (memory, reg) { + base = (unsigned long )__va (reg->base); + size = reg->size;DBG ("creating mapping for region: %lx..%lx (prot: %lx)\n" , base, size, prot);
@@ -696,7 +696,8 @@ static void __init htab_initialize(void)#endif /* CONFIG_U3_DART */ BUG_ON (htab_bolt_mapping (base, base + size,__pa (base), prot, mmu_linear_psize, mmu_kernel_ssize)); - } + } +memblock_set_current_limit (MEMBLOCK_ALLOC_ANYWHERE );/* * If we have a memory_limit and we've allocated TCEs then we need to
@@ -1247,3 +1248,23 @@ void kernel_map_pages(struct page *page, int numpages, int enable) local_irq_restore(flags); }#endif /* CONFIG_DEBUG_PAGEALLOC */ + +void setup_initial_memory_limit (phys_addr_t first_memblock_base, +phys_addr_t first_memblock_size) +{ +/* We don't currently support the first MEMBLOCK not mapping 0 +* physical on those processors +*/ +BUG_ON (first_memblock_base !=0 ); + +/* On LPAR systems, the first entry is our RMA region, +* non-LPAR 64-bit hash MMU systems don't have a limitation +* on real mode access, but using the first entry works well +* enough. We also clamp it to 1G to avoid some funky things +* such as RTAS bugs etc... +*/ + ppc64_rma_size =min_t (u64, first_memblock_size,0x40000000 ); + +/* Finally limit subsequent allocations */ +memblock_set_current_limit (ppc64_rma_size); +}
arch/powerpc/mm/init_32.c +21 -22
69 lines not on this page · raw message
arch/powerpc/mm/init_64.c +1 -0
@@ -330,3 +330,4 @@ int __meminit vmemmap_populate(struct page *start_page, return 0; }#endif /* CONFIG_SPARSEMEM_VMEMMAP */ +
arch/powerpc/mm/mem.c +34 -60
152 lines not on this page · raw message
arch/powerpc/mm/numa.c +9 -8
@@ -802,16 +802,17 @@ static void __init setup_nonnuma(void)unsigned long top_of_ram =memblock_end_of_DRAM ();unsigned long total_ram =memblock_phys_mem_size ();unsigned long start_pfn, end_pfn; -unsigned int i, nid =0 ; +unsigned int nid =0 ; +struct memblock_region *reg;printk (KERN_DEBUG "Top of RAM: 0x%lx, Total RAM: 0x%lx\n" , top_of_ram, total_ram);printk (KERN_DEBUG "Memory hole size: %ldMB\n" , (top_of_ram - total_ram) >>20 ); -for (i =0 ; i < memblock.memory.cnt; ++i) { - start_pfn = memblock.memory.region[i].base >>PAGE_SHIFT ; - end_pfn = start_pfn +memblock_size_pages (&memblock.memory, i); +for_each_memblock (memory, reg) { + start_pfn =memblock_region_memory_base_pfn (reg); + end_pfn =memblock_region_memory_end_pfn (reg);fake_numa_create_new_node (end_pfn, &nid);add_active_range (nid, start_pfn, end_pfn);
@@ -947,11 +948,11 @@ static struct notifier_block __cpuinitdata ppc64_numa_nb = {static void mark_reserved_regions_for_nid (int nid) {struct pglist_data *node =NODE_DATA (nid); -int i; +struct memblock_region *reg; -for (i =0 ; i < memblock.reserved.cnt; i++) { -unsigned long physbase = memblock.reserved.region[i].base; -unsigned long size = memblock.reserved.region[i].size; +for_each_memblock (reserved, reg) { +unsigned long physbase = reg->base; +unsigned long size = reg->size;unsigned long start_pfn = physbase >>PAGE_SHIFT ;unsigned long end_pfn =PFN_UP (physbase + size);struct node_active_region node_ar;
arch/powerpc/mm/ppc_mmu_32.c +16 -2
@@ -223,8 +223,7 @@ void __init MMU_init_hw(void)* Find some memory for the hash table. */ if ( ppc_md.progress ) ppc_md.progress ("hash:find piece" ,0x322 ); - Hash =__va (memblock_alloc_base (Hash_size, Hash_size, - __initial_memory_limit_addr)); + Hash =__va (memblock_alloc (Hash_size, Hash_size));cacheable_memzero (Hash, Hash_size); _SDR1 =__pa (Hash) |SDR1_LOW_BITS ;
@@ -272,3 +271,18 @@ void __init MMU_init_hw(void)if ( ppc_md.progress ) ppc_md.progress ("hash:done" ,0x205 ); } + +void setup_initial_memory_limit (phys_addr_t first_memblock_base, +phys_addr_t first_memblock_size) +{ +/* We don't currently support the first MEMBLOCK not mapping 0 +* physical on those processors +*/ +BUG_ON (first_memblock_base !=0 ); + +/* 601 can only access 16MB at the moment */ +if (PVR_VER (mfspr (SPRN_PVR )) ==1 ) +memblock_set_current_limit (min_t (u64, first_memblock_size,0x01000000 )); +else /* Anything else has 256M mapped */ +memblock_set_current_limit (min_t (u64, first_memblock_size,0x10000000 )); +}
arch/powerpc/mm/tlb_nohash.c +16 -0
@@ -509,6 +509,8 @@ static void __early_init_mmu(int boot_cpu)* the MMU configuration */ mb (); + +memblock_set_current_limit (linear_map_top); }void __init early_init_mmu (void )
@@ -521,4 +523,18 @@ void __cpuinit early_init_mmu_secondary(void) __early_init_mmu(0); } +void setup_initial_memory_limit (phys_addr_t first_memblock_base, +phys_addr_t first_memblock_size) +{ +/* On Embedded 64-bit, we adjust the RMA size to match +* the bolted TLB entry. We know for now that only 1G +* entries are supported though that may eventually +* change. We crop it to the size of the first MEMBLOCK to +* avoid going over total available memory just in case... +*/ + ppc64_rma_size =min_t (u64, first_memblock_size,0x40000000 ); + +/* Finally limit subsequent allocations */ +memblock_set_current_limit (ppc64_memblock_base + ppc64_rma_size); +}#endif /* CONFIG_PPC64 */
arch/powerpc/platforms/embedded6xx/wii.c +1 -1
@@ -65,7 +65,7 @@ static int __init page_aligned(unsigned long x)void __init wii_memory_fixups (void ) { -struct memblock_property *p = memblock.memory.region; +struct memblock_region *p = memblock.memory.regions;/* * This is part of a workaround to allow the use of two
arch/sh/include/asm/memblock.h +0 -2
@@ -1,6 +1,4 @@#ifndef __ASM_SH_MEMBLOCK_H#define __ASM_SH_MEMBLOCK_H -#define MEMBLOCK_REAL_LIMIT 0 -#endif /* __ASM_SH_MEMBLOCK_H */
arch/sh/mm/init.c +9 -8
@@ -200,7 +200,6 @@ static void __init bootmem_init_one_node(unsigned int nid)unsigned long total_pages, paddr;unsigned long end_pfn;struct pglist_data *p; -int i; p =NODE_DATA (nid);
@@ -226,11 +225,12 @@ static void __init bootmem_init_one_node(unsigned int nid)* reservations in other nodes. */ if (nid ==0 ) { +struct memblock_region *reg; +/* Reserve the sections we're already using. */ -for (i =0 ; i < memblock.reserved.cnt; i++) -reserve_bootmem (memblock.reserved.region[i].base, -memblock_size_bytes (&memblock.reserved, i), -BOOTMEM_DEFAULT ); +for_each_memblock (reserved, reg) { +reserve_bootmem (reg->base, reg->size,BOOTMEM_DEFAULT ); + } }sparse_memory_present_with_active_regions (nid);
@@ -238,13 +238,14 @@ static void __init bootmem_init_one_node(unsigned int nid)static void __init do_init_bootmem (void ) { +struct memblock_region *reg;int i;/* Add active regions with valid PFNs. */ -for (i =0 ; i < memblock.memory.cnt; i++) { +for_each_memblock (memory, reg) {unsigned long start_pfn, end_pfn; - start_pfn = memblock.memory.region[i].base >>PAGE_SHIFT ; - end_pfn = start_pfn +memblock_size_pages (&memblock.memory, i); + start_pfn =memblock_region_memory_base_pfn (reg); + end_pfn =memblock_region_memory_end_pfn (reg);__add_active_range (0 , start_pfn, end_pfn); }
arch/sparc/include/asm/memblock.h +0 -2
@@ -5,6 +5,4 @@ #define MEMBLOCK_DBG(fmt...) prom_printf(fmt) -#define MEMBLOCK_REAL_LIMIT 0 -#endif /* !(_SPARC64_MEMBLOCK_H) */
arch/sparc/mm/init_64.c +18 -28
115 lines not on this page · raw message
arch/x86/Kconfig +2 -13
@@ -28,6 +28,7 @@ config X86 select HAVE_IRQ_WORK select HAVE_IOREMAP_PROT select HAVE_KPROBES + select HAVE_MEMBLOCK select ARCH_WANT_OPTIONAL_GPIOLIB select ARCH_WANT_FRAME_POINTERS select HAVE_DMA_ATTRS
@@ -197,9 +198,6 @@ config ARCH_SUPPORTS_OPTIMIZED_INLINING config ARCH_SUPPORTS_DEBUG_PAGEALLOC def_bool y -config HAVE_EARLY_RES - def_bool y - config HAVE_INTEL_TXT def_bool y depends on EXPERIMENTAL && DMAR && ACPI
@@ -575,16 +573,7 @@ config PARAVIRT_DEBUG a paravirt_op is missing when it is called. config NO_BOOTMEM - default y - bool "Disable Bootmem code" - ---help--- - Use early_res directly instead of bootmem before slab is ready. - - allocator (buddy) [generic] - - early allocator (bootmem) [generic] - - very early allocator (reserve_early*()) [x86] - - very very early allocator (early brk model) [x86] - So reduce one layer between early allocator to final allocator - + def_bool y config MEMTEST bool "Memtest"
arch/x86/include/asm/e820.h +5 -15
@@ -112,23 +112,13 @@ static inline void early_memtest(unsigned long start, unsigned long end) }#endif -extern unsigned long end_user_pfn; - -extern u64 find_e820_area (u64 start,u64 end,u64 size,u64 align); -extern u64 find_e820_area_size (u64 start,u64 *sizep,u64 align); -extern u64 early_reserve_e820 (u64 startt,u64 sizet,u64 align); -#include <linux/early_res.h> -extern unsigned long e820_end_of_ram_pfn (void );extern unsigned long e820_end_of_low_ram_pfn (void ); -extern int e820_find_active_region (const struct e820entry *ei, -unsigned long start_pfn, -unsigned long last_pfn, -unsigned long *ei_startpfn, -unsigned long *ei_endpfn); -extern void e820_register_active_regions (int nid,unsigned long start_pfn, -unsigned long end_pfn); -extern u64 e820_hole_size (u64 start,u64 end); +extern u64 early_reserve_e820 (u64 startt,u64 sizet,u64 align); + +void memblock_x86_fill (void ); +void memblock_find_dma_reserve (void ); +extern void finish_e820_parsing (void );extern void e820_reserve_resources (void );extern void e820_reserve_resources_late (void );
arch/x86/include/asm/efi.h +1 -1
@@ -90,7 +90,7 @@ extern void __iomem *efi_ioremap(unsigned long addr, unsigned long size,#endif /* CONFIG_X86_32 */ extern int add_efi_memmap; -extern void efi_reserve_early (void ); +extern void efi_memblock_x86_reserve_range (void );extern void efi_call_phys_prelog (void );extern void efi_call_phys_epilog (void );
arch/x86/include/asm/io.h +1 -0
@@ -349,6 +349,7 @@ extern void __iomem *early_memremap(resource_size_t phys_addr, unsigned long size);extern void early_iounmap (void __iomem *addr,unsigned long size);extern void fixup_early_ioremap (void ); +extern bool is_early_ioremap_ptep (pte_t *ptep);#define IO_SPACE_LIMIT 0xffff
arch/x86/include/asm/memblock.h new file +23 -0
@@ -0,0 +1,23 @@ +#ifndef _X86_MEMBLOCK_H +#define _X86_MEMBLOCK_H + +#define ARCH_DISCARD_MEMBLOCK + +u64 memblock_x86_find_in_range_size (u64 start,u64 *sizep,u64 align); +void memblock_x86_to_bootmem (u64 start,u64 end); + +void memblock_x86_reserve_range (u64 start,u64 end,char *name); +void memblock_x86_free_range (u64 start,u64 end); +struct range ; +int __get_free_all_memory_range (struct range **range,int nodeid, +unsigned long start_pfn,unsigned long end_pfn); +int get_free_all_memory_range (struct range **rangep,int nodeid); + +void memblock_x86_register_active_regions (int nid,unsigned long start_pfn, +unsigned long last_pfn); +u64 memblock_x86_hole_size (u64 start,u64 end); +u64 memblock_x86_find_in_range_node (int nid,u64 start,u64 end,u64 size,u64 align); +u64 memblock_x86_free_memory_in_range (u64 addr,u64 limit); +u64 memblock_x86_memory_in_range (u64 addr,u64 limit); + +#endif
arch/x86/kernel/acpi/sleep.c +5 -4
@@ -7,6 +7,7 @@#include <linux/acpi.h> #include <linux/bootmem.h> +#include <linux/memblock.h> #include <linux/dmi.h> #include <linux/cpumask.h> #include <asm/segment.h>
@@ -125,7 +126,7 @@ void acpi_restore_state_mem(void)*/ void __init acpi_reserve_wakeup_memory (void ) { -unsigned long mem; +phys_addr_t mem;if ((&wakeup_code_end - &wakeup_code_start) >WAKEUP_SIZE ) { printk(KERN_ERR
@@ -133,15 +134,15 @@ void __init acpi_reserve_wakeup_memory(void)return ; } - mem =find_e820_area (0 ,1 <<20 ,WAKEUP_SIZE ,PAGE_SIZE ); + mem =memblock_find_in_range (0 ,1 <<20 ,WAKEUP_SIZE ,PAGE_SIZE ); -if (mem ==-1L ) { +if (mem ==MEMBLOCK_ERROR ) {printk (KERN_ERR "ACPI: Cannot allocate lowmem, S3 disabled.\n" );return ; } acpi_realmode = (unsigned long )phys_to_virt (mem); acpi_wakeup_address = mem; -reserve_early (mem, mem +WAKEUP_SIZE ,"ACPI WAKEUP" ); +memblock_x86_reserve_range (mem, mem +WAKEUP_SIZE ,"ACPI WAKEUP" ); }
arch/x86/kernel/apic/numaq_32.c +2 -1
@@ -26,6 +26,7 @@#include <linux/nodemask.h> #include <linux/topology.h> #include <linux/bootmem.h> +#include <linux/memblock.h> #include <linux/threads.h> #include <linux/cpumask.h> #include <linux/kernel.h>
@@ -88,7 +89,7 @@ static inline void numaq_register_node(int node, struct sys_cfg_data *scd) node_end_pfn[node] =MB_TO_PAGES (eq->hi_shrd_mem_start + eq->hi_shrd_mem_size); -e820_register_active_regions (node, node_start_pfn[node], +memblock_x86_register_active_regions (node, node_start_pfn[node], node_end_pfn[node]);memory_present (node, node_start_pfn[node], node_end_pfn[node]);
arch/x86/kernel/check.c +9 -7
@@ -2,7 +2,8 @@#include <linux/sched.h> #include <linux/kthread.h> #include <linux/workqueue.h> -#include <asm/e820.h> +#include <linux/memblock.h> +#include <asm/proto.h> /*
@@ -18,10 +19,12 @@ static int __read_mostly memory_corruption_check = -1;static unsigned __read_mostly corruption_check_size =64 *1024 ;static unsigned __read_mostly corruption_check_period =60 ;/* seconds */ -static struct e820entry scan_areas[MAX_SCAN_AREAS ]; +static struct scan_area { +u64 addr; +u64 size; +} scan_areas[MAX_SCAN_AREAS ];static int num_scan_areas; -static __init int set_corruption_check (char *arg) {char *end;
@@ -81,9 +84,9 @@ void __init setup_bios_corruption_check(void)while (addr < corruption_check_size && num_scan_areas <MAX_SCAN_AREAS ) {u64 size; - addr =find_e820_area_size (addr, &size,PAGE_SIZE ); + addr =memblock_x86_find_in_range_size (addr, &size,PAGE_SIZE ); -if (!(addr +1 )) +if (addr ==MEMBLOCK_ERROR )break ;if (addr >= corruption_check_size)
@@ -92,7 +95,7 @@ void __init setup_bios_corruption_check(void)if ((addr + size) > corruption_check_size) size = corruption_check_size - addr; -e820_update_range (addr, size,E820_RAM ,E820_RESERVED ); +memblock_x86_reserve_range (addr, addr + size,"SCAN RAM" ); scan_areas[num_scan_areas].addr = addr; scan_areas[num_scan_areas].size = size; num_scan_areas++;
@@ -105,7 +108,6 @@ void __init setup_bios_corruption_check(void)printk (KERN_INFO "Scanning %d areas for low memory corruption\n" , num_scan_areas); -update_e820 (); }
arch/x86/kernel/e820.c +51 -140
225 lines not on this page · raw message
arch/x86/kernel/efi.c +3 -2
@@ -30,6 +30,7 @@#include <linux/init.h> #include <linux/efi.h> #include <linux/bootmem.h> +#include <linux/memblock.h> #include <linux/spinlock.h> #include <linux/uaccess.h> #include <linux/time.h>
@@ -275,7 +276,7 @@ static void __init do_add_efi_memmap(void)sanitize_e820_map (e820.map,ARRAY_SIZE (e820.map), &e820.nr_map); } -void __init efi_reserve_early (void ) +void __init efi_memblock_x86_reserve_range (void ) {unsigned long pmap;
@@ -290,7 +291,7 @@ void __init efi_reserve_early(void) boot_params.efi_info.efi_memdesc_size; memmap.desc_version = boot_params.efi_info.efi_memdesc_version; memmap.desc_size = boot_params.efi_info.efi_memdesc_size; -reserve_early (pmap, pmap + memmap.nr_map * memmap.desc_size, +memblock_x86_reserve_range (pmap, pmap + memmap.nr_map * memmap.desc_size,"EFI memmap" ); }
arch/x86/kernel/head.c +2 -1
@@ -1,5 +1,6 @@#include <linux/kernel.h> #include <linux/init.h> +#include <linux/memblock.h> #include <asm/setup.h> #include <asm/bios_ebda.h>
@@ -51,5 +52,5 @@ void __init reserve_ebda_region(void) lowmem =0x9f000 ;/* reserve all memory between lowmem and the 1MB mark */ -reserve_early_overlap_ok (lowmem,0x100000 ,"BIOS reserved" ); +memblock_x86_reserve_range (lowmem,0x100000 ,"* BIOS reserved" ); }
arch/x86/kernel/head32.c +6 -4
@@ -8,6 +8,7 @@#include <linux/init.h> #include <linux/start_kernel.h> #include <linux/mm.h> +#include <linux/memblock.h> #include <asm/setup.h> #include <asm/sections.h>
@@ -30,17 +31,18 @@ static void __init i386_default_early_setup(void)void __init i386_start_kernel (void ) { +memblock_init (); +#ifdef CONFIG_X86_TRAMPOLINE /* * But first pinch a few for the stack/trampoline stuff * FIXME: Don't need the extra page at 4K, but need to fix * trampoline before removing it. (see the GDT stuff) */ -reserve_early_overlap_ok (PAGE_SIZE ,PAGE_SIZE +PAGE_SIZE , -"EX TRAMPOLINE" ); +memblock_x86_reserve_range (PAGE_SIZE ,PAGE_SIZE +PAGE_SIZE ,"EX TRAMPOLINE" );#endif -reserve_early (__pa_symbol (&_text),__pa_symbol (&__bss_stop),"TEXT DATA BSS" ); +memblock_x86_reserve_range (__pa_symbol (&_text),__pa_symbol (&__bss_stop),"TEXT DATA BSS" );#ifdef CONFIG_BLK_DEV_INITRD /* Reserve INITRD */
@@ -49,7 +51,7 @@ void __init i386_start_kernel(void)u64 ramdisk_image = boot_params.hdr.ramdisk_image;u64 ramdisk_size = boot_params.hdr.ramdisk_size;u64 ramdisk_end =PAGE_ALIGN (ramdisk_image + ramdisk_size); - reserve_early(ramdisk_image, ramdisk_end, "RAMDISK"); + memblock_x86_reserve_range(ramdisk_image, ramdisk_end, "RAMDISK"); }#endif
arch/x86/kernel/head64.c +7 -2
@@ -12,6 +12,7 @@#include <linux/percpu.h> #include <linux/start_kernel.h> #include <linux/io.h> +#include <linux/memblock.h> #include <asm/processor.h> #include <asm/proto.h>
@@ -79,6 +80,8 @@ void __init x86_64_start_kernel(char * real_mode_data)/* Cleanup the over mapped high alias */ cleanup_highmap (); + max_pfn_mapped =KERNEL_IMAGE_SIZE >>PAGE_SHIFT ; +for (i =0 ; i <NUM_EXCEPTION_VECTORS ; i++) {#ifdef CONFIG_EARLY_PRINTK set_intr_gate (i, &early_idt_handlers[i]);
@@ -98,7 +101,9 @@ void __init x86_64_start_reservations(char *real_mode_data) {copy_bootdata (__va (real_mode_data)); -reserve_early (__pa_symbol (&_text),__pa_symbol (&__bss_stop),"TEXT DATA BSS" ); +memblock_init (); + +memblock_x86_reserve_range (__pa_symbol (&_text),__pa_symbol (&__bss_stop),"TEXT DATA BSS" );#ifdef CONFIG_BLK_DEV_INITRD /* Reserve INITRD */
@@ -107,7 +112,7 @@ void __init x86_64_start_reservations(char *real_mode_data)unsigned long ramdisk_image = boot_params.hdr.ramdisk_image;unsigned long ramdisk_size = boot_params.hdr.ramdisk_size;unsigned long ramdisk_end =PAGE_ALIGN (ramdisk_image + ramdisk_size); - reserve_early(ramdisk_image, ramdisk_end, "RAMDISK"); + memblock_x86_reserve_range(ramdisk_image, ramdisk_end, "RAMDISK"); }#endif
arch/x86/kernel/mpparse.c +3 -2
@@ -11,6 +11,7 @@#include <linux/init.h> #include <linux/delay.h> #include <linux/bootmem.h> +#include <linux/memblock.h> #include <linux/kernel_stat.h> #include <linux/mc146818rtc.h> #include <linux/bitops.h>
@@ -657,7 +658,7 @@ static void __init smp_reserve_memory(struct mpf_intel *mpf) {unsigned long size =get_mpc_size (mpf->physptr); -reserve_early_overlap_ok (mpf->physptr, mpf->physptr+size,"MP-table mpc" ); +memblock_x86_reserve_range (mpf->physptr, mpf->physptr+size,"* MP-table mpc" ); }static int __init smp_scan_config (unsigned long base,unsigned long length)
@@ -686,7 +687,7 @@ static int __init smp_scan_config(unsigned long base, unsigned long length) mpf, (u64)virt_to_phys(mpf)); mem =virt_to_phys (mpf); -reserve_early_overlap_ok (mem, mem +sizeof (*mpf),"MP-table mpf" ); +memblock_x86_reserve_range (mem, mem +sizeof (*mpf),"* MP-table mpf" );if (mpf->physptr)smp_reserve_memory (mpf);
arch/x86/kernel/setup.c +54 -34
216 lines not on this page · raw message
arch/x86/kernel/setup_percpu.c +0 -6
@@ -131,13 +131,7 @@ static void * __init pcpu_fc_alloc(unsigned int cpu, size_t size, size_t align)static void __init pcpu_fc_free (void *ptr,size_t size) { -#ifdef CONFIG_NO_BOOTMEM -u64 start =__pa (ptr); -u64 end = start + size; -free_early_partial (start, end); -#else free_bootmem (__pa (ptr), size); -#endif }static int __init pcpu_cpu_distance (unsigned int from,unsigned int to)
arch/x86/kernel/trampoline.c +5 -5
@@ -1,8 +1,8 @@#include <linux/io.h> +#include <linux/memblock.h> #include <asm/trampoline.h> #include <asm/pgtable.h> -#include <asm/e820.h> #if defined(CONFIG_X86_64 ) && defined(CONFIG_ACPI_SLEEP )#define __trampinit
@@ -17,15 +17,15 @@ unsigned char *__trampinitdata trampoline_base;void __init reserve_trampoline_memory (void ) { -unsigned long mem; +phys_addr_t mem;/* Has to be in very low memory so we can execute real-mode AP code. */ - mem =find_e820_area (0 ,1 <<20 ,TRAMPOLINE_SIZE ,PAGE_SIZE ); -if (mem ==-1L ) + mem =memblock_find_in_range (0 ,1 <<20 ,TRAMPOLINE_SIZE ,PAGE_SIZE ); +if (mem ==MEMBLOCK_ERROR )panic ("Cannot allocate trampoline\n" ); trampoline_base =__va (mem); -reserve_early (mem, mem +TRAMPOLINE_SIZE ,"TRAMPOLINE" ); +memblock_x86_reserve_range (mem, mem +TRAMPOLINE_SIZE ,"TRAMPOLINE" ); }/*
arch/x86/mm/Makefile +2 -0
@@ -26,4 +26,6 @@ obj-$(CONFIG_NUMA) += numa.o numa_$(BITS).o obj-$(CONFIG_K8_NUMA) += k8topology_64.o obj-$(CONFIG_ACPI_NUMA) += srat_$(BITS).o +obj-$(CONFIG_HAVE_MEMBLOCK) += memblock.o + obj-$(CONFIG_MEMTEST) += memtest.o
arch/x86/mm/init.c +6 -4
@@ -2,6 +2,7 @@#include <linux/initrd.h> #include <linux/ioport.h> #include <linux/swap.h> +#include <linux/memblock.h> #include <asm/cacheflush.h> #include <asm/e820.h>
@@ -33,6 +34,7 @@ static void __init find_early_table_space(unsigned long end, int use_pse, int use_gbpages) {unsigned long puds, pmds, ptes, tables, start; +phys_addr_t base; puds = (end +PUD_SIZE -1 ) >>PUD_SHIFT ; tables =roundup (puds *sizeof (pud_t),PAGE_SIZE );
@@ -75,12 +77,12 @@ static void __init find_early_table_space(unsigned long end, int use_pse,#else start =0x8000 ;#endif - e820_table_start =find_e820_area (start, max_pfn_mapped<<PAGE_SHIFT , + base =memblock_find_in_range (start, max_pfn_mapped<<PAGE_SHIFT , tables,PAGE_SIZE ); -if (e820_table_start ==-1UL ) +if (base ==MEMBLOCK_ERROR )panic ("Cannot find space for the kernel page tables" ); - e820_table_start >>=PAGE_SHIFT ; + e820_table_start = base >>PAGE_SHIFT ; e820_table_end = e820_table_start; e820_table_top = e820_table_start + (tables >>PAGE_SHIFT );
@@ -299,7 +301,7 @@ unsigned long __init_refok init_memory_mapping(unsigned long start,__flush_tlb_all ();if (!after_bootmem && e820_table_end > e820_table_start) -reserve_early (e820_table_start <<PAGE_SHIFT , +memblock_x86_reserve_range (e820_table_start <<PAGE_SHIFT , e820_table_end <<PAGE_SHIFT ,"PGTABLE" );if (!after_bootmem)
arch/x86/mm/init_32.c +19 -100
164 lines not on this page · raw message
arch/x86/mm/init_64.c +2 -65
91 lines not on this page · raw message
arch/x86/mm/ioremap.c +5 -0
@@ -362,6 +362,11 @@ static inline pte_t * __init early_ioremap_pte(unsigned long addr)return &bm_pte[pte_index (addr)]; } +bool __init is_early_ioremap_ptep (pte_t *ptep) +{ +return ptep >= &bm_pte[0 ] && ptep < &bm_pte[PAGE_SIZE /sizeof (pte_t)]; +} +static unsigned long slot_virt[FIX_BTMAPS_SLOTS ]__initdata ;void __init early_ioremap_init (void )
arch/x86/mm/k8topology_64.c +3 -1
@@ -11,6 +11,8 @@#include <linux/string.h> #include <linux/module.h> #include <linux/nodemask.h> +#include <linux/memblock.h> +#include <asm/io.h> #include <linux/pci_ids.h> #include <linux/acpi.h>
@@ -222,7 +224,7 @@ int __init k8_scan_nodes(void)for_each_node_mask (i, node_possible_map) {int j; -e820_register_active_regions (i, +memblock_x86_register_active_regions (i, nodes[i].start >>PAGE_SHIFT , nodes[i].end >>PAGE_SHIFT );for (j = apicid_base; j < cores + apicid_base; j++)
arch/x86/mm/memblock.c new file +348 -0
348 lines not on this page · raw message
arch/x86/mm/memtest.c +3 -4
@@ -6,8 +6,7 @@#include <linux/smp.h> #include <linux/init.h> #include <linux/pfn.h> - -#include <asm/e820.h> +#include <linux/memblock.h> static u64 patterns[]__initdata = {0 ,
@@ -35,7 +34,7 @@ static void __init reserve_bad_mem(u64 pattern, u64 start_bad, u64 end_bad) (unsigned long long ) pattern, (unsigned long long ) start_bad, (unsigned long long) end_bad); -reserve_early (start_bad, end_bad,"BAD RAM" ); +memblock_x86_reserve_range (start_bad, end_bad,"BAD RAM" ); }static void __init memtest (u64 pattern,u64 start_phys,u64 size)
@@ -74,7 +73,7 @@ static void __init do_one_pass(u64 pattern, u64 start, u64 end)u64 size =0 ;while (start < end) { - start =find_e820_area_size (start, &size,1 ); + start =memblock_x86_find_in_range_size (start, &size,1 );/* done ? */ if (start >= end)
arch/x86/mm/numa_32.c +13 -17
@@ -24,6 +24,7 @@#include <linux/mm.h> #include <linux/bootmem.h> +#include <linux/memblock.h> #include <linux/mmzone.h> #include <linux/highmem.h> #include <linux/initrd.h>
@@ -120,7 +121,7 @@ int __init get_memcfg_numa_flat(void) node_start_pfn[0 ] =0 ; node_end_pfn[0 ] = max_pfn; -e820_register_active_regions (0 ,0 , max_pfn); +memblock_x86_register_active_regions (0 ,0 , max_pfn);memory_present (0 ,0 , max_pfn); node_remap_size[0 ] =node_memmap_size_bytes (0 ,0 , max_pfn);
@@ -161,14 +162,14 @@ static void __init allocate_pgdat(int nid)NODE_DATA (nid) = (pg_data_t *)node_remap_start_vaddr[nid]; else {unsigned long pgdat_phys; - pgdat_phys =find_e820_area (min_low_pfn<<PAGE_SHIFT , + pgdat_phys =memblock_find_in_range (min_low_pfn<<PAGE_SHIFT , max_pfn_mapped<<PAGE_SHIFT ,sizeof (pg_data_t),PAGE_SIZE );NODE_DATA (nid) = (pg_data_t *)(pfn_to_kaddr (pgdat_phys>>PAGE_SHIFT ));memset (buf,0 ,sizeof (buf));sprintf (buf,"NODE_DATA %d" , nid); -reserve_early (pgdat_phys, pgdat_phys +sizeof (pg_data_t), buf); +memblock_x86_reserve_range (pgdat_phys, pgdat_phys +sizeof (pg_data_t), buf); }printk (KERN_DEBUG "allocate_pgdat: node %d NODE_DATA %08lx\n" , nid, (unsigned long )NODE_DATA (nid));
@@ -291,15 +292,15 @@ static __init unsigned long calculate_numa_remap_pages(void) PTRS_PER_PTE); node_kva_target <<=PAGE_SHIFT ;do { - node_kva_final =find_e820_area (node_kva_target, + node_kva_final =memblock_find_in_range (node_kva_target, ((u64 )node_end_pfn[nid])<<PAGE_SHIFT , ((u64 )size)<<PAGE_SHIFT ,LARGE_PAGE_BYTES ); node_kva_target -=LARGE_PAGE_BYTES ; - }while (node_kva_final ==-1ULL && + }while (node_kva_final ==MEMBLOCK_ERROR && (node_kva_target>>PAGE_SHIFT ) > (node_start_pfn[nid])); -if (node_kva_final ==-1ULL ) +if (node_kva_final ==MEMBLOCK_ERROR )panic ("Can not get kva ram\n" ); node_remap_size[nid] = size;
@@ -318,15 +319,13 @@ static __init unsigned long calculate_numa_remap_pages(void)* but we could have some hole in high memory, and it will only * check page_is_ram(pfn) && !page_is_reserved_early(pfn) to decide * to use it as free. -* So reserve_early here, hope we don't run out of that array +* So memblock_x86_reserve_range here, hope we don't run out of that array */ -reserve_early (node_kva_final, +memblock_x86_reserve_range (node_kva_final, node_kva_final+(((u64 )size)<<PAGE_SHIFT ),"KVA RAM" ); node_remap_start_pfn[nid] = node_kva_final>>PAGE_SHIFT ; -remove_active_range (nid, node_remap_start_pfn[nid], - node_remap_start_pfn[nid] + size); }printk (KERN_INFO "Reserving total of %lx pages for numa KVA remap\n" , reserve_pages);
@@ -367,14 +366,14 @@ void __init initmem_init(unsigned long start_pfn, unsigned long end_pfn, kva_target_pfn =round_down (max_low_pfn - kva_pages,PTRS_PER_PTE );do { - kva_start_pfn =find_e820_area (kva_target_pfn<<PAGE_SHIFT , + kva_start_pfn =memblock_find_in_range (kva_target_pfn<<PAGE_SHIFT , max_low_pfn<<PAGE_SHIFT , kva_pages<<PAGE_SHIFT ,PTRS_PER_PTE <<PAGE_SHIFT ) >>PAGE_SHIFT ; kva_target_pfn -=PTRS_PER_PTE ; - }while (kva_start_pfn ==-1UL && kva_target_pfn > min_low_pfn); + }while (kva_start_pfn ==MEMBLOCK_ERROR && kva_target_pfn > min_low_pfn); -if (kva_start_pfn ==-1UL ) +if (kva_start_pfn ==MEMBLOCK_ERROR )panic ("Can not get kva space\n" ); printk(KERN_INFO "kva_start_pfn ~ %lx max_low_pfn ~ %lx\n",
@@ -382,7 +381,7 @@ void __init initmem_init(unsigned long start_pfn, unsigned long end_pfn,printk (KERN_INFO "max_pfn = %lx\n" , max_pfn);/* avoid clash with initrd */ -reserve_early (kva_start_pfn<<PAGE_SHIFT , +memblock_x86_reserve_range (kva_start_pfn<<PAGE_SHIFT , (kva_start_pfn + kva_pages)<<PAGE_SHIFT ,"KVA PG" );#ifdef CONFIG_HIGHMEM
@@ -419,9 +418,6 @@ void __init initmem_init(unsigned long start_pfn, unsigned long end_pfn,for_each_online_node (nid) {memset (NODE_DATA (nid),0 ,sizeof (struct pglist_data ));NODE_DATA (nid)->node_id = nid; -#ifndef CONFIG_NO_BOOTMEM -NODE_DATA (nid)->bdata = &bootmem_node_data[nid]; -#endif }setup_bootmem_allocator ();
arch/x86/mm/numa_64.c +19 -65
200 lines not on this page · raw message
arch/x86/mm/srat_32.c +2 -1
@@ -25,6 +25,7 @@*/ #include <linux/mm.h> #include <linux/bootmem.h> +#include <linux/memblock.h> #include <linux/mmzone.h> #include <linux/acpi.h> #include <linux/nodemask.h>
@@ -264,7 +265,7 @@ int __init get_memcfg_from_srat(void)if (node_read_chunk (chunk->nid, chunk))continue ; -e820_register_active_regions (chunk->nid, chunk->start_pfn, +memblock_x86_register_active_regions (chunk->nid, chunk->start_pfn,min (chunk->end_pfn, max_pfn)); }/* for out of order entries in SRAT */
arch/x86/mm/srat_64.c +6 -5
@@ -16,6 +16,7 @@#include <linux/module.h> #include <linux/topology.h> #include <linux/bootmem.h> +#include <linux/memblock.h> #include <linux/mm.h> #include <asm/proto.h> #include <asm/numa.h>
@@ -98,15 +99,15 @@ void __init acpi_numa_slit_init(struct acpi_table_slit *slit)unsigned long phys; length = slit->header.length; - phys =find_e820_area (0 , max_pfn_mapped<<PAGE_SHIFT , length, + phys =memblock_find_in_range (0 , max_pfn_mapped<<PAGE_SHIFT , length,PAGE_SIZE ); -if (phys ==-1L ) +if (phys ==MEMBLOCK_ERROR )panic (" Can not save slit!\n" ); acpi_slit =__va (phys);memcpy (acpi_slit, slit, length); -reserve_early (phys, phys + length,"ACPI SLIT" ); +memblock_x86_reserve_range (phys, phys + length,"ACPI SLIT" ); }/* Callback for Proximity Domain -> x2APIC mapping */
@@ -324,7 +325,7 @@ static int __init nodes_cover_memory(const struct bootnode *nodes) pxmram =0 ; } - e820ram = max_pfn - (e820_hole_size (0 , max_pfn<<PAGE_SHIFT )>>PAGE_SHIFT ); + e820ram = max_pfn - (memblock_x86_hole_size (0 , max_pfn<<PAGE_SHIFT )>>PAGE_SHIFT );/* We seem to lose 3 pages somewhere. Allow 1M of slack. */ if ((long )(e820ram - pxmram) >= (1 <<(20 -PAGE_SHIFT ))) { printk(KERN_ERR
@@ -421,7 +422,7 @@ int __init acpi_scan_nodes(unsigned long start, unsigned long end) }for (i =0 ; i < num_node_memblks; i++) -e820_register_active_regions (memblk_nodeid[i], +memblock_x86_register_active_regions (memblk_nodeid[i], node_memblk_range[i].start >>PAGE_SHIFT , node_memblk_range[i].end >>PAGE_SHIFT );
arch/x86/xen/enlighten.c +3 -0
@@ -30,6 +30,7 @@#include <linux/console.h> #include <linux/pci.h> #include <linux/gfp.h> +#include <linux/memblock.h> #include <xen/xen.h> #include <xen/interface/xen.h>
@@ -1183,6 +1184,8 @@ asmlinkage void __init xen_start_kernel(void)local_irq_disable ();early_boot_irqs_off (); +memblock_init (); +xen_raw_console_write ("mapping kernel into physical memory\n" ); pgd =xen_setup_kernel_pagetable (pgd, xen_start_info->nr_pages);
arch/x86/xen/mmu.c +21 -10
@@ -45,6 +45,7 @@#include <linux/vmalloc.h> #include <linux/module.h> #include <linux/gfp.h> +#include <linux/memblock.h> #include <asm/pgtable.h> #include <asm/tlbflush.h>
@@ -55,6 +56,7 @@#include <asm/e820.h> #include <asm/linkage.h> #include <asm/page.h> +#include <asm/init.h> #include <asm/xen/hypercall.h> #include <asm/xen/hypervisor.h>
@@ -359,7 +361,8 @@ void make_lowmem_page_readonly(void *vaddr)unsigned int level; pte =lookup_address (address, &level); -BUG_ON (pte ==NULL ); +if (pte ==NULL ) +return ;/* vaddr missing */ ptev =pte_wrprotect (*pte);
@@ -374,7 +377,8 @@ void make_lowmem_page_readwrite(void *vaddr)unsigned int level; pte =lookup_address (address, &level); -BUG_ON (pte ==NULL ); +if (pte ==NULL ) +return ;/* vaddr missing */ ptev =pte_mkwrite (*pte);
@@ -1508,13 +1512,25 @@ static void xen_pgd_free(struct mm_struct *mm, pgd_t *pgd)#endif } -#ifdef CONFIG_X86_32 static __init pte_t mask_rw_pte (pte_t *ptep,pte_t pte) { +unsigned long pfn =pte_pfn (pte); + +#ifdef CONFIG_X86_32 /* If there's an existing pte, then don't allow _PAGE_RW to be set */ if (pte_val_ma (*ptep) & _PAGE_PRESENT) pte =__pte_ma (((pte_val_ma (*ptep) & _PAGE_RW) | ~_PAGE_RW) &pte_val_ma (pte)); +#endif + +/* +* If the new pfn is within the range of the newly allocated +* kernel pagetable, and it isn't being mapped into an +* early_ioremap fixmap slot, make sure it is RO. +*/ +if (!is_early_ioremap_ptep (ptep) && + pfn >= e820_table_start && pfn < e820_table_end) + pte =pte_wrprotect (pte);return pte; }
@@ -1527,7 +1543,6 @@ static __init void xen_set_pte_init(pte_t *ptep, pte_t pte)xen_set_pte (ptep, pte); } -#endif static void pin_pagetable_pfn (unsigned cmd,unsigned long pfn) {
@@ -1814,7 +1829,7 @@ __init pgd_t *xen_setup_kernel_pagetable(pgd_t *pgd,__xen_write_cr3 (true,__pa (pgd));xen_mc_issue (PARAVIRT_LAZY_CPU ); -reserve_early (__pa (xen_start_info->pt_base), +memblock_x86_reserve_range (__pa (xen_start_info->pt_base),__pa (xen_start_info->pt_base + xen_start_info->nr_pt_frames *PAGE_SIZE ),"XEN PAGETABLES" );
@@ -1852,7 +1867,7 @@ __init pgd_t *xen_setup_kernel_pagetable(pgd_t *pgd,pin_pagetable_pfn (MMUEXT_PIN_L3_TABLE ,PFN_DOWN (__pa (swapper_pg_dir))); -reserve_early (__pa (xen_start_info->pt_base), +memblock_x86_reserve_range (__pa (xen_start_info->pt_base),__pa (xen_start_info->pt_base + xen_start_info->nr_pt_frames *PAGE_SIZE ),"XEN PAGETABLES" );
@@ -1971,11 +1986,7 @@ static const struct pv_mmu_ops xen_mmu_ops __initdata = { .alloc_pmd = xen_alloc_pmd_init, .release_pmd = xen_release_pmd_init, -#ifdef CONFIG_X86_64 - .set_pte = xen_set_pte, -#else .set_pte = xen_set_pte_init, -#endif .set_pte_at = xen_set_pte_at, .set_pmd = xen_set_pmd_hyper,
arch/x86/xen/setup.c +2 -1
@@ -8,6 +8,7 @@#include <linux/sched.h> #include <linux/mm.h> #include <linux/pm.h> +#include <linux/memblock.h> #include <asm/elf.h> #include <asm/vdso.h>
@@ -129,7 +130,7 @@ char * __init xen_memory_setup(void)* - xen_start_info * See comment above "struct start_info" in <xen/interface/xen.h> */ -reserve_early (__pa (xen_start_info->mfn_list), +memblock_x86_reserve_range (__pa (xen_start_info->mfn_list),__pa (xen_start_info->pt_base),"XEN START INFO" );
drivers/video/omap2/vram.c +2 -6
@@ -554,12 +554,8 @@ void __init omap_vram_reserve_sdram_memblock(void) size =PAGE_ALIGN (size);if (paddr) { -struct memblock_property res; - - res.base = paddr; - res.size = size; -if ((paddr & ~PAGE_MASK ) ||memblock_find (&res) || - res.base != paddr || res.size != size) { +if ((paddr & ~PAGE_MASK ) || + !memblock_is_region_memory (paddr, size)) {pr_err ("Illegal SDRAM region for VRAM\n" );return ; }
include/linux/early_res.h deleted +0 -23
@@ -1,23 +0,0 @@ -#ifndef _LINUX_EARLY_RES_H -#define _LINUX_EARLY_RES_H -#ifdef __KERNEL__ - -extern void reserve_early (u64 start,u64 end,char *name); -extern void reserve_early_overlap_ok (u64 start,u64 end,char *name); -extern void free_early (u64 start,u64 end); -void free_early_partial (u64 start,u64 end); -extern void early_res_to_bootmem (u64 start,u64 end); - -void reserve_early_without_check (u64 start,u64 end,char *name); -u64 find_early_area (u64 ei_start,u64 ei_last,u64 start,u64 end, -u64 size,u64 align); -u64 find_early_area_size (u64 ei_start,u64 ei_last,u64 start, -u64 *sizep,u64 align); -u64 find_fw_memmap_area (u64 start,u64 end,u64 size,u64 align); -u64 get_max_mapped (void ); -#include <linux/range.h> -int get_free_all_memory_range (struct range **rangep,int nodeid); - -#endif /* __KERNEL__ */ - -#endif /* _LINUX_EARLY_RES_H */
include/linux/memblock.h +123 -45
65 lines not on this page · raw message
kernel/early_res.c deleted +0 -590
590 lines not on this page · raw message
mm/memblock.c +569 -268
837 lines not on this page · raw message
mm/page_alloc.c +51 -35
86 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Part of the diff is not shown here. View the raw message.
Quoted 8 lines · H. Peter Anvin
The unmerged branch is at:
git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip.git core-memblock-for-linus
The premerged branch is at:
git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip.git core-memblock-for-linus-merged
I always tend to take the unmerged version, because I want to see what the conflicts are (it gives me some view of what clashes), but when people do pre-merges I then try to compare my merge against theirs.
However, in this case, your pre-merged version differs. But I think it's your merge that was incorrect. You left this line:
obj-$(CONFIG_HAVE_EARLY_RES) += early_res.o
in kernel/Makefile, even though kernel/early_res.c is gone.
I'll push out my merge, but please do verify that it all looks ok.
Linus
H. Peter Anvin
reviewerQuoted 6 lines · Linus Torvalds
Quoted 5 lines · H. Peter Anvin
The unmerged branch is at:
git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip.gitcore-memblock-for-linus
Quoted 8 lines
Quoted 3 lines
The premerged branch is at:
git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip.gitcore-memblock-for-linus-mergedI always tend to take the unmerged version, because I want to see what the conflicts are (it gives me some view of what clashes), but when people do pre-merges I then try to compare my merge against theirs.
Sounds like a very good idea. I'll take it as a request to continue to do both if there are anything but trivial conflicts.
Quoted 11 lines
However, in this case, your pre-merged version differs. But I think it's your merge that was incorrect. You left this line:
obj-$(CONFIG_HAVE_EARLY_RES) += early_res.oin kernel/Makefile, even though
kernel/early_res.cis gone.I'll push out my merge, but please do verify that it all looks ok.
Linus
You're right, my mistake. Thanks for checking and fixing it up.
I will pull your tree later and test if and add the fixes for the other trees.
-hpa
Signature · 8 lines
H. Peter Anvin, Intel Open Source Technology Center I work for Intel. I don't speak on their behalf. -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>