aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/include/asm/dma.h
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2011-05-02 11:24:48 -0400
committerTejun Heo <tj@kernel.org>2011-05-02 11:24:48 -0400
commit1b7e03ef7570568d2fb9e6640d7006a0edd728f6 (patch)
treeb973610ee8a1c6af939be90656b7c4c73ace4c03 /arch/x86/include/asm/dma.h
parent2706a0bf7b02693ed88752df877f10c2206292ff (diff)
x86, NUMA: Enable emulation on 32bit too
Now that NUMA init path is unified, NUMA emulation can be enabled on 32bit. Make numa_emluation.c safe on 32bit by doing the followings. * Define MAX_DMA32_PFN on 32bit too. * Include bootmem.h for max_pfn declaration. * Use u64 explicitly and always use PFN_PHYS() when converting page number to address. * Avoid __udivdi3() generation on 32bit by doing number of pages calculation instead in split_nodes_interleave(). And drop X86_64 dependency from Kconfig. Signed-off-by: Tejun Heo <tj@kernel.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: Yinghai Lu <yinghai@kernel.org> Cc: David Rientjes <rientjes@google.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: "H. Peter Anvin" <hpa@zytor.com>
Diffstat (limited to 'arch/x86/include/asm/dma.h')
-rw-r--r--arch/x86/include/asm/dma.h10
1 files changed, 3 insertions, 7 deletions
diff --git a/arch/x86/include/asm/dma.h b/arch/x86/include/asm/dma.h
index d1a314b610f6..0bdb0c54d9a1 100644
--- a/arch/x86/include/asm/dma.h
+++ b/arch/x86/include/asm/dma.h
@@ -72,19 +72,15 @@
72/* 16MB ISA DMA zone */ 72/* 16MB ISA DMA zone */
73#define MAX_DMA_PFN ((16 * 1024 * 1024) >> PAGE_SHIFT) 73#define MAX_DMA_PFN ((16 * 1024 * 1024) >> PAGE_SHIFT)
74 74
75#ifdef CONFIG_X86_32 75/* 4GB broken PCI/AGP hardware bus master zone */
76#define MAX_DMA32_PFN ((4UL * 1024 * 1024 * 1024) >> PAGE_SHIFT)
76 77
78#ifdef CONFIG_X86_32
77/* The maximum address that we can perform a DMA transfer to on this platform */ 79/* The maximum address that we can perform a DMA transfer to on this platform */
78#define MAX_DMA_ADDRESS (PAGE_OFFSET + 0x1000000) 80#define MAX_DMA_ADDRESS (PAGE_OFFSET + 0x1000000)
79
80#else 81#else
81
82/* 4GB broken PCI/AGP hardware bus master zone */
83#define MAX_DMA32_PFN ((4UL * 1024 * 1024 * 1024) >> PAGE_SHIFT)
84
85/* Compat define for old dma zone */ 82/* Compat define for old dma zone */
86#define MAX_DMA_ADDRESS ((unsigned long)__va(MAX_DMA_PFN << PAGE_SHIFT)) 83#define MAX_DMA_ADDRESS ((unsigned long)__va(MAX_DMA_PFN << PAGE_SHIFT))
87
88#endif 84#endif
89 85
90/* 8237 DMA controllers */ 86/* 8237 DMA controllers */