* [patch] x86: fix compile errors for no CONFIG_ZONE_DMA or no CONFIG_ZONE_DMA32
@ 2010-02-11 9:29 David Rientjes
0 siblings, 0 replies; 2+ messages in thread
From: David Rientjes @ 2010-02-11 9:29 UTC (permalink / raw)
To: Ingo Molnar, H. Peter Anvin, Thomas Gleixner; +Cc: x86, linux-kernel
Disabling CONFIG_ZONE_DMA or CONFIG_ZONE_DMA32 results in compile errors
since ZONE_DMA and ZONE_DMA32, respectively, are not defined.
Signed-off-by: David Rientjes <rientjes@google.com>
---
arch/x86/mm/init_32.c | 2 ++
arch/x86/mm/init_64.c | 4 ++++
2 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/arch/x86/mm/init_32.c b/arch/x86/mm/init_32.c
--- a/arch/x86/mm/init_32.c
+++ b/arch/x86/mm/init_32.c
@@ -738,8 +738,10 @@ 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;
+#endif
max_zone_pfns[ZONE_NORMAL] = max_low_pfn;
#ifdef CONFIG_HIGHMEM
max_zone_pfns[ZONE_HIGHMEM] = highend_pfn;
diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c
--- a/arch/x86/mm/init_64.c
+++ b/arch/x86/mm/init_64.c
@@ -594,8 +594,12 @@ void __init paging_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_pfn;
sparse_memory_present_with_active_regions(MAX_NUMNODES);
^ permalink raw reply [flat|nested] 2+ messages in thread
* [patch] x86: fix compile errors for no CONFIG_ZONE_DMA or no CONFIG_ZONE_DMA32
@ 2010-02-22 22:07 David Rientjes
0 siblings, 0 replies; 2+ messages in thread
From: David Rientjes @ 2010-02-22 22:07 UTC (permalink / raw)
To: Ingo Molnar, H. Peter Anvin, Thomas Gleixner; +Cc: x86, linux-kernel
Disabling CONFIG_ZONE_DMA or CONFIG_ZONE_DMA32 results in compile errors
since ZONE_DMA and ZONE_DMA32, respectively, are not defined.
Signed-off-by: David Rientjes <rientjes@google.com>
---
arch/x86/mm/init_32.c | 2 ++
arch/x86/mm/init_64.c | 4 ++++
2 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/arch/x86/mm/init_32.c b/arch/x86/mm/init_32.c
--- a/arch/x86/mm/init_32.c
+++ b/arch/x86/mm/init_32.c
@@ -738,8 +738,10 @@ 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;
+#endif
max_zone_pfns[ZONE_NORMAL] = max_low_pfn;
#ifdef CONFIG_HIGHMEM
max_zone_pfns[ZONE_HIGHMEM] = highend_pfn;
diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c
--- a/arch/x86/mm/init_64.c
+++ b/arch/x86/mm/init_64.c
@@ -594,8 +594,12 @@ void __init paging_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_pfn;
sparse_memory_present_with_active_regions(MAX_NUMNODES);
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-02-22 22:08 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-11 9:29 [patch] x86: fix compile errors for no CONFIG_ZONE_DMA or no CONFIG_ZONE_DMA32 David Rientjes
2010-02-22 22:07 David Rientjes
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.