x86, mm: Use MAX_DMA_PFN for ZONE_DMA on 32-bit
PATCH v2 1/7 x86, mm: Use MAX_DMA_PFN for ZONE_DMA on 32-bit
Use MAX_DMA_PFN which represents the 16 MB ISA DMA limit on 32-bit x86 just like we do on 64-bit.
--- arch/x86/mm/init_32.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)
arch/x86/mm/init_32.c +1 -2
@@ -679,8 +679,7 @@ static void __init zone_sizes_init(void)unsigned long max_zone_pfns[MAX_NR_ZONES ];memset (max_zone_pfns,0 ,sizeof (max_zone_pfns));#ifdef CONFIG_ZONE_DMA - max_zone_pfns[ZONE_DMA ] = -virt_to_phys ((char *)MAX_DMA_ADDRESS ) >>PAGE_SHIFT ; + max_zone_pfns[ZONE_DMA ] =MAX_DMA_PFN ;#endif max_zone_pfns[ZONE_NORMAL ] = max_low_pfn;#ifdef CONFIG_HIGHMEM
Signature · 1 line
1.7.6.4
PATCH v2 2/7 x86, mm: Move zone init from paging_init() on 64-bit
This patch introduces a zone_sizes_init() helper function on 64-bit to make it more similar to 32-bit init.
--- arch/x86/mm/init_64.c | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-)
arch/x86/mm/init_64.c +7 -2
@@ -612,7 +612,7 @@ void __init initmem_init(void) }#endif -void __init paging_init (void ) +static void __init zone_sizes_init (void ) {unsigned long max_zone_pfns[MAX_NR_ZONES ];
@@ -623,6 +623,11 @@ void __init paging_init(void) max_zone_pfns[ZONE_DMA32 ] =MAX_DMA32_PFN ; max_zone_pfns[ZONE_NORMAL ] = max_pfn; +free_area_init_nodes (max_zone_pfns); +} + +void __init paging_init (void ) +{sparse_memory_present_with_active_regions (MAX_NUMNODES );sparse_init ();
@@ -634,7 +639,7 @@ void __init paging_init(void)*/ node_clear_state (0 ,N_NORMAL_MEMORY ); -free_area_init_nodes (max_zone_pfns); +zone_sizes_init (); }/*
Signature · 1 line
1.7.6.4
[tip:x86/mm] x86, mm: Move zone init from paging_init() on 64-bit
Commit-ID: 4c0b2e5f8940fec7cbeafcf641fecd5e746329c5 Gitweb: http://git.kernel.org/tip/4c0b2e5f8940fec7cbeafcf641fecd5e746329c5 Author: Pekka Enberg <[email protected]> AuthorDate: Tue, 1 Nov 2011 15:58:17 +0200 Committer: Ingo Molnar <[email protected]> CommitDate: Fri, 11 Nov 2011 10:22:43 +0100
x86, mm: Move zone init from paging_init() on 64-bit
This patch introduces a zone_sizes_init() helper function on 64-bit to make it more similar to 32-bit init.
--- arch/x86/mm/init_64.c | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-)
arch/x86/mm/init_64.c +7 -2
@@ -612,7 +612,7 @@ void __init initmem_init(void) }#endif -void __init paging_init (void ) +static void __init zone_sizes_init (void ) {unsigned long max_zone_pfns[MAX_NR_ZONES ];
@@ -623,6 +623,11 @@ void __init paging_init(void) max_zone_pfns[ZONE_DMA32 ] =MAX_DMA32_PFN ; max_zone_pfns[ZONE_NORMAL ] = max_pfn; +free_area_init_nodes (max_zone_pfns); +} + +void __init paging_init (void ) +{sparse_memory_present_with_active_regions (MAX_NUMNODES );sparse_init ();
@@ -634,7 +639,7 @@ void __init paging_init(void)*/ node_clear_state (0 ,N_NORMAL_MEMORY ); -free_area_init_nodes (max_zone_pfns); +zone_sizes_init (); }/*
PATCH v2 3/7 x86, mm: Use max_pfn instead of highend_pfn
In reply to Pekka EnbergThe 'highend_pfn' variable is always set to 'max_pfn' so just use the latter directly.
--- arch/x86/mm/init_32.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/x86/mm/init_32.c +1 -1
@@ -683,7 +683,7 @@ static void __init zone_sizes_init(void)#endif max_zone_pfns[ZONE_NORMAL ] = max_low_pfn;#ifdef CONFIG_HIGHMEM - max_zone_pfns[ZONE_HIGHMEM ] = highend_pfn; + max_zone_pfns[ZONE_HIGHMEM ] = max_pfn;#endif free_area_init_nodes (max_zone_pfns);
Signature · 1 line
1.7.6.4
[tip:x86/mm] x86, mm: Use max_pfn instead of highend_pfn
Commit-ID: e4794640ca408acda18eb31b126f58a58803b9c9 Gitweb: http://git.kernel.org/tip/e4794640ca408acda18eb31b126f58a58803b9c9 Author: Pekka Enberg <[email protected]> AuthorDate: Tue, 1 Nov 2011 15:58:18 +0200 Committer: Ingo Molnar <[email protected]> CommitDate: Fri, 11 Nov 2011 10:22:45 +0100
x86, mm: Use max_pfn instead of highend_pfn
The 'highend_pfn' variable is always set to 'max_pfn' so just use the latter directly.
--- arch/x86/mm/init_32.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/x86/mm/init_32.c +1 -1
@@ -683,7 +683,7 @@ static void __init zone_sizes_init(void)#endif max_zone_pfns[ZONE_NORMAL ] = max_low_pfn;#ifdef CONFIG_HIGHMEM - max_zone_pfns[ZONE_HIGHMEM ] = highend_pfn; + max_zone_pfns[ZONE_HIGHMEM ] = max_pfn;#endif free_area_init_nodes (max_zone_pfns);
PATCH v2 4/7 x86, mm: Wrap ZONE_DMA32 with CONFIG_ZONE_DMA32
In reply to Pekka EnbergIn preparation for unifying 32-bit and 64-bit zone_sizes_init() make sure ZONE_DMA32 is wrapped in CONFIG_ZONE_DMA32.
--- arch/x86/mm/init_64.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
arch/x86/mm/init_64.c +2 -0
@@ -620,7 +620,9 @@ static void __init zone_sizes_init(void)#ifdef CONFIG_ZONE_DMA max_zone_pfns[ZONE_DMA ] =MAX_DMA_PFN ;#endif +#ifdef CONFIG_ZONE_DMA32 max_zone_pfns[ZONE_DMA32 ] =MAX_DMA32_PFN ; +#endif max_zone_pfns[ZONE_NORMAL ] = max_pfn;free_area_init_nodes (max_zone_pfns);
Signature · 1 line
1.7.6.4
[tip:x86/mm] x86, mm: Wrap ZONE_DMA32 with CONFIG_ZONE_DMA32
Commit-ID: 80b3cac97bc14fdf839d967602e599cbf82ea336 Gitweb: http://git.kernel.org/tip/80b3cac97bc14fdf839d967602e599cbf82ea336 Author: Pekka Enberg <[email protected]> AuthorDate: Tue, 1 Nov 2011 15:58:19 +0200 Committer: Ingo Molnar <[email protected]> CommitDate: Fri, 11 Nov 2011 10:22:48 +0100
x86, mm: Wrap ZONE_DMA32 with CONFIG_ZONE_DMA32
In preparation for unifying 32-bit and 64-bit zone_sizes_init() make sure ZONE_DMA32 is wrapped in CONFIG_ZONE_DMA32.
--- arch/x86/mm/init_64.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
arch/x86/mm/init_64.c +2 -0
@@ -620,7 +620,9 @@ static void __init zone_sizes_init(void)#ifdef CONFIG_ZONE_DMA max_zone_pfns[ZONE_DMA ] =MAX_DMA_PFN ;#endif +#ifdef CONFIG_ZONE_DMA32 max_zone_pfns[ZONE_DMA32 ] =MAX_DMA32_PFN ; +#endif max_zone_pfns[ZONE_NORMAL ] = max_pfn;free_area_init_nodes (max_zone_pfns);
PATCH v2 5/7 x86, mm: Use max_low_pfn for ZONE_NORMAL on 64-bit
In reply to Pekka Enberg64-bit has no highmem so max_low_pfn is always the same as 'max_pfn'.
--- arch/x86/mm/init_64.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/x86/mm/init_64.c +1 -1
@@ -623,7 +623,7 @@ static void __init zone_sizes_init(void)#ifdef CONFIG_ZONE_DMA32 max_zone_pfns[ZONE_DMA32 ] =MAX_DMA32_PFN ;#endif - max_zone_pfns[ZONE_NORMAL ] = max_pfn; + max_zone_pfns[ZONE_NORMAL ] = max_low_pfn;free_area_init_nodes (max_zone_pfns); }
Signature · 1 line
1.7.6.4
[tip:x86/mm] x86, mm: Use max_low_pfn for ZONE_NORMAL on 64-bit
Commit-ID: ece838b6257412647197c072fe59dfc6615df144 Gitweb: http://git.kernel.org/tip/ece838b6257412647197c072fe59dfc6615df144 Author: Pekka Enberg <[email protected]> AuthorDate: Tue, 1 Nov 2011 15:58:20 +0200 Committer: Ingo Molnar <[email protected]> CommitDate: Fri, 11 Nov 2011 10:22:50 +0100
x86, mm: Use max_low_pfn for ZONE_NORMAL on 64-bit
64-bit has no highmem so max_low_pfn is always the same as 'max_pfn'.
--- arch/x86/mm/init_64.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/x86/mm/init_64.c +1 -1
@@ -623,7 +623,7 @@ static void __init zone_sizes_init(void)#ifdef CONFIG_ZONE_DMA32 max_zone_pfns[ZONE_DMA32 ] =MAX_DMA32_PFN ;#endif - max_zone_pfns[ZONE_NORMAL ] = max_pfn; + max_zone_pfns[ZONE_NORMAL ] = max_low_pfn;free_area_init_nodes (max_zone_pfns); }
PATCH v2 6/7 x86, mm: Prepare zone_sizes_init() for unification
In reply to Pekka EnbergMake 32-bit and 64-bit zone_sizes_init() identical in preparation for unification.
--- arch/x86/mm/init_32.c | 4 ++++ arch/x86/mm/init_64.c | 3 +++ 2 files changed, 7 insertions(+), 0 deletions(-)
arch/x86/mm/init_32.c +4 -0
@@ -677,10 +677,14 @@ void __init initmem_init(void)static void __init zone_sizes_init (void ) {unsigned long max_zone_pfns[MAX_NR_ZONES ]; +memset (max_zone_pfns,0 ,sizeof (max_zone_pfns));#ifdef CONFIG_ZONE_DMA max_zone_pfns[ZONE_DMA ] =MAX_DMA_PFN ;#endif +#ifdef CONFIG_ZONE_DMA32 + max_zone_pfns[ZONE_DMA32 ] =MAX_DMA32_PFN ; +#endif max_zone_pfns[ZONE_NORMAL ] = max_low_pfn;#ifdef CONFIG_HIGHMEM max_zone_pfns[ZONE_HIGHMEM ] = max_pfn;
arch/x86/mm/init_64.c +3 -0
@@ -624,6 +624,9 @@ static void __init zone_sizes_init(void) max_zone_pfns[ZONE_DMA32 ] =MAX_DMA32_PFN ;#endif max_zone_pfns[ZONE_NORMAL ] = max_low_pfn; +#ifdef CONFIG_HIGHMEM + max_zone_pfns[ZONE_HIGHMEM ] = max_pfn; +#endif free_area_init_nodes (max_zone_pfns); }
Signature · 1 line
1.7.6.4
[tip:x86/mm] x86, mm: Prepare zone_sizes_init() for unification
Commit-ID: 248b52b97da7a712d2263a51d8d84c959f38ef75 Gitweb: http://git.kernel.org/tip/248b52b97da7a712d2263a51d8d84c959f38ef75 Author: Pekka Enberg <[email protected]> AuthorDate: Tue, 1 Nov 2011 15:58:21 +0200 Committer: Ingo Molnar <[email protected]> CommitDate: Fri, 11 Nov 2011 10:22:53 +0100
x86, mm: Prepare zone_sizes_init() for unification
Make 32-bit and 64-bit zone_sizes_init() identical in preparation for unification.
--- arch/x86/mm/init_32.c | 4 ++++ arch/x86/mm/init_64.c | 3 +++ 2 files changed, 7 insertions(+), 0 deletions(-)
arch/x86/mm/init_32.c +4 -0
@@ -677,10 +677,14 @@ void __init initmem_init(void)static void __init zone_sizes_init (void ) {unsigned long max_zone_pfns[MAX_NR_ZONES ]; +memset (max_zone_pfns,0 ,sizeof (max_zone_pfns));#ifdef CONFIG_ZONE_DMA max_zone_pfns[ZONE_DMA ] =MAX_DMA_PFN ;#endif +#ifdef CONFIG_ZONE_DMA32 + max_zone_pfns[ZONE_DMA32 ] =MAX_DMA32_PFN ; +#endif max_zone_pfns[ZONE_NORMAL ] = max_low_pfn;#ifdef CONFIG_HIGHMEM max_zone_pfns[ZONE_HIGHMEM ] = max_pfn;
arch/x86/mm/init_64.c +3 -0
@@ -624,6 +624,9 @@ static void __init zone_sizes_init(void) max_zone_pfns[ZONE_DMA32 ] =MAX_DMA32_PFN ;#endif max_zone_pfns[ZONE_NORMAL ] = max_low_pfn; +#ifdef CONFIG_HIGHMEM + max_zone_pfns[ZONE_HIGHMEM ] = max_pfn; +#endif free_area_init_nodes (max_zone_pfns); }
PATCH v2 7/7 x86, mm: Unify zone_sizes_init()
In reply to Pekka EnbergNow that zone_sizes_init() is identical on 32-bit and 64-bit, move the code to arch/x86/mm/init.c and use it for both architectures.
--- arch/x86/include/asm/init.h | 2 ++ arch/x86/mm/init.c | 23 +++++++++++++++++++++++ arch/x86/mm/init_32.c | 19 ------------------- arch/x86/mm/init_64.c | 19 ------------------- 4 files changed, 25 insertions(+), 38 deletions(-)
arch/x86/include/asm/init.h +2 -0
@@ -5,6 +5,8 @@extern void __init early_ioremap_page_table_range_init (void );#endif +extern void __init zone_sizes_init (void ); + extern unsigned long __init kernel_physical_mapping_init(unsigned long start, unsigned long end,
arch/x86/mm/init.c +23 -0
@@ -3,6 +3,7 @@#include <linux/ioport.h> #include <linux/swap.h> #include <linux/memblock.h> +#include <linux/bootmem.h> /* for max_low_pfn */ #include <asm/cacheflush.h> #include <asm/e820.h>
@@ -15,6 +16,7 @@#include <asm/tlbflush.h> #include <asm/tlb.h> #include <asm/proto.h> +#include <asm/dma.h> /* for MAX_DMA_PFN */ unsigned long __initdata pgt_buf_start;unsigned long __meminitdata pgt_buf_end;
@@ -392,3 +394,24 @@ void free_initrd_mem(unsigned long start, unsigned long end) free_init_pages("initrd memory", start, PAGE_ALIGN(end)); }#endif + +void __init zone_sizes_init (void ) +{ +unsigned long max_zone_pfns[MAX_NR_ZONES ]; + +memset (max_zone_pfns,0 ,sizeof (max_zone_pfns)); + +#ifdef CONFIG_ZONE_DMA + max_zone_pfns[ZONE_DMA ] =MAX_DMA_PFN ; +#endif +#ifdef CONFIG_ZONE_DMA32 + max_zone_pfns[ZONE_DMA32 ] =MAX_DMA32_PFN ; +#endif + max_zone_pfns[ZONE_NORMAL ] = max_low_pfn; +#ifdef CONFIG_HIGHMEM + max_zone_pfns[ZONE_HIGHMEM ] = max_pfn; +#endif + +free_area_init_nodes (max_zone_pfns); +} +
arch/x86/mm/init_32.c +0 -19
@@ -674,25 +674,6 @@ void __init initmem_init(void) }#endif /* !CONFIG_NEED_MULTIPLE_NODES */ -static void __init zone_sizes_init (void ) -{ -unsigned long max_zone_pfns[MAX_NR_ZONES ]; - -memset (max_zone_pfns,0 ,sizeof (max_zone_pfns)); -#ifdef CONFIG_ZONE_DMA - max_zone_pfns[ZONE_DMA ] =MAX_DMA_PFN ; -#endif -#ifdef CONFIG_ZONE_DMA32 - max_zone_pfns[ZONE_DMA32 ] =MAX_DMA32_PFN ; -#endif - max_zone_pfns[ZONE_NORMAL ] = max_low_pfn; -#ifdef CONFIG_HIGHMEM - max_zone_pfns[ZONE_HIGHMEM ] = max_pfn; -#endif - -free_area_init_nodes (max_zone_pfns); -} -void __init setup_bootmem_allocator (void ) { printk(KERN_INFO " mapped low ram: 0 - %08lx\n",
arch/x86/mm/init_64.c +0 -19
@@ -612,25 +612,6 @@ void __init initmem_init(void) }#endif -static void __init zone_sizes_init (void ) -{ -unsigned long max_zone_pfns[MAX_NR_ZONES ]; - -memset (max_zone_pfns,0 ,sizeof (max_zone_pfns)); -#ifdef CONFIG_ZONE_DMA - max_zone_pfns[ZONE_DMA ] =MAX_DMA_PFN ; -#endif -#ifdef CONFIG_ZONE_DMA32 - max_zone_pfns[ZONE_DMA32 ] =MAX_DMA32_PFN ; -#endif - max_zone_pfns[ZONE_NORMAL ] = max_low_pfn; -#ifdef CONFIG_HIGHMEM - max_zone_pfns[ZONE_HIGHMEM ] = max_pfn; -#endif - -free_area_init_nodes (max_zone_pfns); -} -void __init paging_init (void ) {sparse_memory_present_with_active_regions (MAX_NUMNODES );
Signature · 1 line
1.7.6.4
[tip:x86/mm] x86, mm: Unify zone_sizes_init()
Commit-ID: 176239153049a023d060ce95b05f7ef31667e362 Gitweb: http://git.kernel.org/tip/176239153049a023d060ce95b05f7ef31667e362 Author: Pekka Enberg <[email protected]> AuthorDate: Tue, 1 Nov 2011 15:58:22 +0200 Committer: Ingo Molnar <[email protected]> CommitDate: Fri, 11 Nov 2011 10:22:55 +0100
x86, mm: Unify zone_sizes_init()
Now that zone_sizes_init() is identical on 32-bit and 64-bit, move the code to arch/x86/mm/init.c and use it for both architectures.
--- arch/x86/include/asm/init.h | 2 ++ arch/x86/mm/init.c | 23 +++++++++++++++++++++++ arch/x86/mm/init_32.c | 19 ------------------- arch/x86/mm/init_64.c | 19 ------------------- 4 files changed, 25 insertions(+), 38 deletions(-)
arch/x86/include/asm/init.h +2 -0
@@ -5,6 +5,8 @@extern void __init early_ioremap_page_table_range_init (void );#endif +extern void __init zone_sizes_init (void ); + extern unsigned long __init kernel_physical_mapping_init(unsigned long start, unsigned long end,
arch/x86/mm/init.c +23 -0
@@ -3,6 +3,7 @@#include <linux/ioport.h> #include <linux/swap.h> #include <linux/memblock.h> +#include <linux/bootmem.h> /* for max_low_pfn */ #include <asm/cacheflush.h> #include <asm/e820.h>
@@ -15,6 +16,7 @@#include <asm/tlbflush.h> #include <asm/tlb.h> #include <asm/proto.h> +#include <asm/dma.h> /* for MAX_DMA_PFN */ unsigned long __initdata pgt_buf_start;unsigned long __meminitdata pgt_buf_end;
@@ -392,3 +394,24 @@ void free_initrd_mem(unsigned long start, unsigned long end) free_init_pages("initrd memory", start, PAGE_ALIGN(end)); }#endif + +void __init zone_sizes_init (void ) +{ +unsigned long max_zone_pfns[MAX_NR_ZONES ]; + +memset (max_zone_pfns,0 ,sizeof (max_zone_pfns)); + +#ifdef CONFIG_ZONE_DMA + max_zone_pfns[ZONE_DMA ] =MAX_DMA_PFN ; +#endif +#ifdef CONFIG_ZONE_DMA32 + max_zone_pfns[ZONE_DMA32 ] =MAX_DMA32_PFN ; +#endif + max_zone_pfns[ZONE_NORMAL ] = max_low_pfn; +#ifdef CONFIG_HIGHMEM + max_zone_pfns[ZONE_HIGHMEM ] = max_pfn; +#endif + +free_area_init_nodes (max_zone_pfns); +} +
arch/x86/mm/init_32.c +0 -19
@@ -674,25 +674,6 @@ void __init initmem_init(void) }#endif /* !CONFIG_NEED_MULTIPLE_NODES */ -static void __init zone_sizes_init (void ) -{ -unsigned long max_zone_pfns[MAX_NR_ZONES ]; - -memset (max_zone_pfns,0 ,sizeof (max_zone_pfns)); -#ifdef CONFIG_ZONE_DMA - max_zone_pfns[ZONE_DMA ] =MAX_DMA_PFN ; -#endif -#ifdef CONFIG_ZONE_DMA32 - max_zone_pfns[ZONE_DMA32 ] =MAX_DMA32_PFN ; -#endif - max_zone_pfns[ZONE_NORMAL ] = max_low_pfn; -#ifdef CONFIG_HIGHMEM - max_zone_pfns[ZONE_HIGHMEM ] = max_pfn; -#endif - -free_area_init_nodes (max_zone_pfns); -} -void __init setup_bootmem_allocator (void ) { printk(KERN_INFO " mapped low ram: 0 - %08lx\n",
arch/x86/mm/init_64.c +0 -19
@@ -612,25 +612,6 @@ void __init initmem_init(void) }#endif -static void __init zone_sizes_init (void ) -{ -unsigned long max_zone_pfns[MAX_NR_ZONES ]; - -memset (max_zone_pfns,0 ,sizeof (max_zone_pfns)); -#ifdef CONFIG_ZONE_DMA - max_zone_pfns[ZONE_DMA ] =MAX_DMA_PFN ; -#endif -#ifdef CONFIG_ZONE_DMA32 - max_zone_pfns[ZONE_DMA32 ] =MAX_DMA32_PFN ; -#endif - max_zone_pfns[ZONE_NORMAL ] = max_low_pfn; -#ifdef CONFIG_HIGHMEM - max_zone_pfns[ZONE_HIGHMEM ] = max_pfn; -#endif - -free_area_init_nodes (max_zone_pfns); -} -void __init paging_init (void ) {sparse_memory_present_with_active_regions (MAX_NUMNODES );
Quoted 8 lines · Pekka Enberg
Use
MAX_DMA_PFNwhich represents the 16 MB ISA DMA limit on 32-bit x86 just like we do on 64-bit.Acked-by Tejun Heo <[email protected]>Acked-by Yinghai Lu <[email protected]>Cc H. Peter Anvin <[email protected]>Acked-by David Rientjes <[email protected]>Signed-off-by Pekka Enberg <[email protected]>
3.2-rc1 is out! Who do I have to bribe/sleep with to get this patch series merged to -tip?
Quoted 4 lines · Pekka Enberg
Quoted 3 lines · Pekka Enberg
Use
MAX_DMA_PFNwhich represents the 16 MB ISA DMA limit on 32-bit x86 just like we do on 64-bit.
Quoted 8 lines
Quoted 5 lines
Acked-by Tejun Heo <[email protected]>Acked-by Yinghai Lu <[email protected]>Cc H. Peter Anvin <[email protected]>Acked-by David Rientjes <[email protected]>Signed-off-by Pekka Enberg <[email protected]>3.2-rc1 is out! Who do I have to bribe/sleep with to get this patch series merged to -tip?
For uncontroversial patches you can generally tempt me with the "Ingo, please this pull from ..." kind of bribe that saves me from having to process the patches ;-)
Anyway, applied them to tip:x86/mm from email.
Thanks,
Ingo
Commit-ID: ff14c1d01576fb839a925a42596582f6c68a1a1a Gitweb: http://git.kernel.org/tip/ff14c1d01576fb839a925a42596582f6c68a1a1a Author: Pekka Enberg <[email protected]> AuthorDate: Tue, 1 Nov 2011 15:58:16 +0200 Committer: Ingo Molnar <[email protected]> CommitDate: Fri, 11 Nov 2011 10:22:41 +0100
x86, mm: Use MAX_DMA_PFN for ZONE_DMA on 32-bit
Use MAX_DMA_PFN which represents the 16 MB ISA DMA limit on 32-bit x86 just like we do on 64-bit.
--- arch/x86/mm/init_32.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)
arch/x86/mm/init_32.c +1 -2
@@ -679,8 +679,7 @@ static void __init zone_sizes_init(void)unsigned long max_zone_pfns[MAX_NR_ZONES ];memset (max_zone_pfns,0 ,sizeof (max_zone_pfns));#ifdef CONFIG_ZONE_DMA - max_zone_pfns[ZONE_DMA ] = -virt_to_phys ((char *)MAX_DMA_ADDRESS ) >>PAGE_SHIFT ; + max_zone_pfns[ZONE_DMA ] =MAX_DMA_PFN ;#endif max_zone_pfns[ZONE_NORMAL ] = max_low_pfn;#ifdef CONFIG_HIGHMEM