aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2010-05-22 15:58:51 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2010-07-16 05:57:36 -0400
commitb65b4781fbd5846a82cdac0c32818af1a7452d1f (patch)
tree532f95a901c0d7dcd1d628e68d7984f09750bb4d /arch/arm
parentbe370302742ff9948f2a42b15cb2ba174d97b930 (diff)
ARM: Remove 'node' argument form arch_adjust_zones()
Since we no longer support discontigmem, node is always zero, so remove this argument. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/common/sa1111.c5
-rw-r--r--arch/arm/include/asm/memory.h2
-rw-r--r--arch/arm/mach-davinci/include/mach/memory.h9
-rw-r--r--arch/arm/mach-ixp4xx/common-pci.c4
-rw-r--r--arch/arm/mach-ixp4xx/include/mach/memory.h6
-rw-r--r--arch/arm/mach-pxa/cm-x2xx-pci.c4
-rw-r--r--arch/arm/mach-pxa/include/mach/memory.h7
-rw-r--r--arch/arm/mach-realview/core.c5
-rw-r--r--arch/arm/mach-realview/include/mach/memory.h7
-rw-r--r--arch/arm/mach-sa1100/include/mach/memory.h6
-rw-r--r--arch/arm/mach-shark/include/mach/memory.h7
-rw-r--r--arch/arm/mm/init.c2
12 files changed, 27 insertions, 37 deletions
diff --git a/arch/arm/common/sa1111.c b/arch/arm/common/sa1111.c
index 6f80665f477e..ac2fd440652e 100644
--- a/arch/arm/common/sa1111.c
+++ b/arch/arm/common/sa1111.c
@@ -185,13 +185,10 @@ static struct sa1111_dev_info sa1111_devices[] = {
185 }, 185 },
186}; 186};
187 187
188void __init sa1111_adjust_zones(int node, unsigned long *size, unsigned long *holes) 188void __init sa1111_adjust_zones(unsigned long *size, unsigned long *holes)
189{ 189{
190 unsigned int sz = SZ_1M >> PAGE_SHIFT; 190 unsigned int sz = SZ_1M >> PAGE_SHIFT;
191 191
192 if (node != 0)
193 sz = 0;
194
195 size[1] = size[0] - sz; 192 size[1] = size[0] - sz;
196 size[0] = sz; 193 size[0] = sz;
197} 194}
diff --git a/arch/arm/include/asm/memory.h b/arch/arm/include/asm/memory.h
index e263ec7c5dcb..82df0ae71bb4 100644
--- a/arch/arm/include/asm/memory.h
+++ b/arch/arm/include/asm/memory.h
@@ -158,7 +158,7 @@
158#endif 158#endif
159 159
160#ifndef arch_adjust_zones 160#ifndef arch_adjust_zones
161#define arch_adjust_zones(node,size,holes) do { } while (0) 161#define arch_adjust_zones(size,holes) do { } while (0)
162#elif !defined(CONFIG_ZONE_DMA) 162#elif !defined(CONFIG_ZONE_DMA)
163#error "custom arch_adjust_zones() requires CONFIG_ZONE_DMA" 163#error "custom arch_adjust_zones() requires CONFIG_ZONE_DMA"
164#endif 164#endif
diff --git a/arch/arm/mach-davinci/include/mach/memory.h b/arch/arm/mach-davinci/include/mach/memory.h
index a91edfb8beea..22eb97c1c30b 100644
--- a/arch/arm/mach-davinci/include/mach/memory.h
+++ b/arch/arm/mach-davinci/include/mach/memory.h
@@ -48,19 +48,16 @@
48 * below 128M 48 * below 128M
49 */ 49 */
50static inline void 50static inline void
51__arch_adjust_zones(int node, unsigned long *size, unsigned long *holes) 51__arch_adjust_zones(unsigned long *size, unsigned long *holes)
52{ 52{
53 unsigned int sz = (128<<20) >> PAGE_SHIFT; 53 unsigned int sz = (128<<20) >> PAGE_SHIFT;
54 54
55 if (node != 0)
56 sz = 0;
57
58 size[1] = size[0] - sz; 55 size[1] = size[0] - sz;
59 size[0] = sz; 56 size[0] = sz;
60} 57}
61 58
62#define arch_adjust_zones(node, zone_size, holes) \ 59#define arch_adjust_zones(zone_size, holes) \
63 if ((meminfo.bank[0].size >> 20) > 128) __arch_adjust_zones(node, zone_size, holes) 60 if ((meminfo.bank[0].size >> 20) > 128) __arch_adjust_zones(zone_size, holes)
64 61
65#define ISA_DMA_THRESHOLD (PHYS_OFFSET + (128<<20) - 1) 62#define ISA_DMA_THRESHOLD (PHYS_OFFSET + (128<<20) - 1)
66#define MAX_DMA_ADDRESS (PAGE_OFFSET + (128<<20)) 63#define MAX_DMA_ADDRESS (PAGE_OFFSET + (128<<20))
diff --git a/arch/arm/mach-ixp4xx/common-pci.c b/arch/arm/mach-ixp4xx/common-pci.c
index e3181534c7f9..333d04c53650 100644
--- a/arch/arm/mach-ixp4xx/common-pci.c
+++ b/arch/arm/mach-ixp4xx/common-pci.c
@@ -348,7 +348,7 @@ int dma_needs_bounce(struct device *dev, dma_addr_t dma_addr, size_t size)
348 * This is really ugly and we need a better way of specifying 348 * This is really ugly and we need a better way of specifying
349 * DMA-capable regions of memory. 349 * DMA-capable regions of memory.
350 */ 350 */
351void __init ixp4xx_adjust_zones(int node, unsigned long *zone_size, 351void __init ixp4xx_adjust_zones(unsigned long *zone_size,
352 unsigned long *zhole_size) 352 unsigned long *zhole_size)
353{ 353{
354 unsigned int sz = SZ_64M >> PAGE_SHIFT; 354 unsigned int sz = SZ_64M >> PAGE_SHIFT;
@@ -356,7 +356,7 @@ void __init ixp4xx_adjust_zones(int node, unsigned long *zone_size,
356 /* 356 /*
357 * Only adjust if > 64M on current system 357 * Only adjust if > 64M on current system
358 */ 358 */
359 if (node || (zone_size[0] <= sz)) 359 if (zone_size[0] <= sz)
360 return; 360 return;
361 361
362 zone_size[1] = zone_size[0] - sz; 362 zone_size[1] = zone_size[0] - sz;
diff --git a/arch/arm/mach-ixp4xx/include/mach/memory.h b/arch/arm/mach-ixp4xx/include/mach/memory.h
index 98f5e5e20980..0136eaa29224 100644
--- a/arch/arm/mach-ixp4xx/include/mach/memory.h
+++ b/arch/arm/mach-ixp4xx/include/mach/memory.h
@@ -16,10 +16,10 @@
16 16
17#if !defined(__ASSEMBLY__) && defined(CONFIG_PCI) 17#if !defined(__ASSEMBLY__) && defined(CONFIG_PCI)
18 18
19void ixp4xx_adjust_zones(int node, unsigned long *size, unsigned long *holes); 19void ixp4xx_adjust_zones(unsigned long *size, unsigned long *holes);
20 20
21#define arch_adjust_zones(node, size, holes) \ 21#define arch_adjust_zones(size, holes) \
22 ixp4xx_adjust_zones(node, size, holes) 22 ixp4xx_adjust_zones(size, holes)
23 23
24#define ISA_DMA_THRESHOLD (SZ_64M - 1) 24#define ISA_DMA_THRESHOLD (SZ_64M - 1)
25#define MAX_DMA_ADDRESS (PAGE_OFFSET + SZ_64M) 25#define MAX_DMA_ADDRESS (PAGE_OFFSET + SZ_64M)
diff --git a/arch/arm/mach-pxa/cm-x2xx-pci.c b/arch/arm/mach-pxa/cm-x2xx-pci.c
index 161fc2d61207..0f3130599770 100644
--- a/arch/arm/mach-pxa/cm-x2xx-pci.c
+++ b/arch/arm/mach-pxa/cm-x2xx-pci.c
@@ -35,7 +35,7 @@ static int cmx2xx_it8152_irq_gpio;
35 * This is really ugly and we need a better way of specifying 35 * This is really ugly and we need a better way of specifying
36 * DMA-capable regions of memory. 36 * DMA-capable regions of memory.
37 */ 37 */
38void __init cmx2xx_pci_adjust_zones(int node, unsigned long *zone_size, 38void __init cmx2xx_pci_adjust_zones(unsigned long *zone_size,
39 unsigned long *zhole_size) 39 unsigned long *zhole_size)
40{ 40{
41 unsigned int sz = SZ_64M >> PAGE_SHIFT; 41 unsigned int sz = SZ_64M >> PAGE_SHIFT;
@@ -46,7 +46,7 @@ void __init cmx2xx_pci_adjust_zones(int node, unsigned long *zone_size,
46 /* 46 /*
47 * Only adjust if > 64M on current system 47 * Only adjust if > 64M on current system
48 */ 48 */
49 if (node || (zone_size[0] <= sz)) 49 if (zone_size[0] <= sz)
50 return; 50 return;
51 51
52 zone_size[1] = zone_size[0] - sz; 52 zone_size[1] = zone_size[0] - sz;
diff --git a/arch/arm/mach-pxa/include/mach/memory.h b/arch/arm/mach-pxa/include/mach/memory.h
index 81fd4a081c82..92361a66b223 100644
--- a/arch/arm/mach-pxa/include/mach/memory.h
+++ b/arch/arm/mach-pxa/include/mach/memory.h
@@ -18,11 +18,10 @@
18#define PHYS_OFFSET UL(0xa0000000) 18#define PHYS_OFFSET UL(0xa0000000)
19 19
20#if !defined(__ASSEMBLY__) && defined(CONFIG_MACH_ARMCORE) && defined(CONFIG_PCI) 20#if !defined(__ASSEMBLY__) && defined(CONFIG_MACH_ARMCORE) && defined(CONFIG_PCI)
21void cmx2xx_pci_adjust_zones(int node, unsigned long *size, 21void cmx2xx_pci_adjust_zones(unsigned long *size, unsigned long *holes);
22 unsigned long *holes);
23 22
24#define arch_adjust_zones(node, size, holes) \ 23#define arch_adjust_zones(size, holes) \
25 cmx2xx_pci_adjust_zones(node, size, holes) 24 cmx2xx_pci_adjust_zones(size, holes)
26 25
27#define ISA_DMA_THRESHOLD (PHYS_OFFSET + SZ_64M - 1) 26#define ISA_DMA_THRESHOLD (PHYS_OFFSET + SZ_64M - 1)
28#define MAX_DMA_ADDRESS (PAGE_OFFSET + SZ_64M) 27#define MAX_DMA_ADDRESS (PAGE_OFFSET + SZ_64M)
diff --git a/arch/arm/mach-realview/core.c b/arch/arm/mach-realview/core.c
index 595be19f8ad5..1195e07c5483 100644
--- a/arch/arm/mach-realview/core.c
+++ b/arch/arm/mach-realview/core.c
@@ -61,12 +61,11 @@ void __iomem *gic_cpu_base_addr;
61/* 61/*
62 * Adjust the zones if there are restrictions for DMA access. 62 * Adjust the zones if there are restrictions for DMA access.
63 */ 63 */
64void __init realview_adjust_zones(int node, unsigned long *size, 64void __init realview_adjust_zones(unsigned long *size, unsigned long *hole)
65 unsigned long *hole)
66{ 65{
67 unsigned long dma_size = SZ_256M >> PAGE_SHIFT; 66 unsigned long dma_size = SZ_256M >> PAGE_SHIFT;
68 67
69 if (!machine_is_realview_pbx() || node || (size[0] <= dma_size)) 68 if (!machine_is_realview_pbx() || size[0] <= dma_size)
70 return; 69 return;
71 70
72 size[ZONE_NORMAL] = size[0] - dma_size; 71 size[ZONE_NORMAL] = size[0] - dma_size;
diff --git a/arch/arm/mach-realview/include/mach/memory.h b/arch/arm/mach-realview/include/mach/memory.h
index 2417bbcf97fd..5dafc157b276 100644
--- a/arch/arm/mach-realview/include/mach/memory.h
+++ b/arch/arm/mach-realview/include/mach/memory.h
@@ -30,10 +30,9 @@
30#endif 30#endif
31 31
32#if !defined(__ASSEMBLY__) && defined(CONFIG_ZONE_DMA) 32#if !defined(__ASSEMBLY__) && defined(CONFIG_ZONE_DMA)
33extern void realview_adjust_zones(int node, unsigned long *size, 33extern void realview_adjust_zones(unsigned long *size, unsigned long *hole);
34 unsigned long *hole); 34#define arch_adjust_zones(size, hole) \
35#define arch_adjust_zones(node, size, hole) \ 35 realview_adjust_zones(size, hole)
36 realview_adjust_zones(node, size, hole)
37 36
38#define ISA_DMA_THRESHOLD (PHYS_OFFSET + SZ_256M - 1) 37#define ISA_DMA_THRESHOLD (PHYS_OFFSET + SZ_256M - 1)
39#define MAX_DMA_ADDRESS (PAGE_OFFSET + SZ_256M) 38#define MAX_DMA_ADDRESS (PAGE_OFFSET + SZ_256M)
diff --git a/arch/arm/mach-sa1100/include/mach/memory.h b/arch/arm/mach-sa1100/include/mach/memory.h
index d5277f9bee77..128a1dfa96b9 100644
--- a/arch/arm/mach-sa1100/include/mach/memory.h
+++ b/arch/arm/mach-sa1100/include/mach/memory.h
@@ -17,10 +17,10 @@
17#ifndef __ASSEMBLY__ 17#ifndef __ASSEMBLY__
18 18
19#ifdef CONFIG_SA1111 19#ifdef CONFIG_SA1111
20void sa1111_adjust_zones(int node, unsigned long *size, unsigned long *holes); 20void sa1111_adjust_zones(unsigned long *size, unsigned long *holes);
21 21
22#define arch_adjust_zones(node, size, holes) \ 22#define arch_adjust_zones(size, holes) \
23 sa1111_adjust_zones(node, size, holes) 23 sa1111_adjust_zones(size, holes)
24 24
25#define ISA_DMA_THRESHOLD (PHYS_OFFSET + SZ_1M - 1) 25#define ISA_DMA_THRESHOLD (PHYS_OFFSET + SZ_1M - 1)
26#define MAX_DMA_ADDRESS (PAGE_OFFSET + SZ_1M) 26#define MAX_DMA_ADDRESS (PAGE_OFFSET + SZ_1M)
diff --git a/arch/arm/mach-shark/include/mach/memory.h b/arch/arm/mach-shark/include/mach/memory.h
index 3053e5b7f168..d9c4812f1c31 100644
--- a/arch/arm/mach-shark/include/mach/memory.h
+++ b/arch/arm/mach-shark/include/mach/memory.h
@@ -19,9 +19,8 @@
19 19
20#ifndef __ASSEMBLY__ 20#ifndef __ASSEMBLY__
21 21
22static inline void __arch_adjust_zones(int node, unsigned long *zone_size, unsigned long *zhole_size) 22static inline void __arch_adjust_zones(unsigned long *zone_size, unsigned long *zhole_size)
23{ 23{
24 if (node != 0) return;
25 /* Only the first 4 MB (=1024 Pages) are usable for DMA */ 24 /* Only the first 4 MB (=1024 Pages) are usable for DMA */
26 /* See dev / -> .properties in OpenFirmware. */ 25 /* See dev / -> .properties in OpenFirmware. */
27 zone_size[1] = zone_size[0] - 1024; 26 zone_size[1] = zone_size[0] - 1024;
@@ -30,8 +29,8 @@ static inline void __arch_adjust_zones(int node, unsigned long *zone_size, unsig
30 zhole_size[0] = 0; 29 zhole_size[0] = 0;
31} 30}
32 31
33#define arch_adjust_zones(node, size, holes) \ 32#define arch_adjust_zones(size, holes) \
34 __arch_adjust_zones(node, size, holes) 33 __arch_adjust_zones(size, holes)
35 34
36#define ISA_DMA_THRESHOLD (PHYS_OFFSET + SZ_4M - 1) 35#define ISA_DMA_THRESHOLD (PHYS_OFFSET + SZ_4M - 1)
37#define MAX_DMA_ADDRESS (PAGE_OFFSET + SZ_4M) 36#define MAX_DMA_ADDRESS (PAGE_OFFSET + SZ_4M)
diff --git a/arch/arm/mm/init.c b/arch/arm/mm/init.c
index 4011e524cb1d..4d2720888c50 100644
--- a/arch/arm/mm/init.c
+++ b/arch/arm/mm/init.c
@@ -318,7 +318,7 @@ static void __init arm_bootmem_free(struct meminfo *mi)
318 * Adjust the sizes according to any special requirements for 318 * Adjust the sizes according to any special requirements for
319 * this machine type. 319 * this machine type.
320 */ 320 */
321 arch_adjust_zones(0, zone_size, zhole_size); 321 arch_adjust_zones(zone_size, zhole_size);
322 322
323 free_area_init_node(0, zone_size, min, zhole_size); 323 free_area_init_node(0, zone_size, min, zhole_size);
324} 324}