ARM: Remove 'node' argument form arch_adjust_zones()
authorRussell King <rmk+kernel@arm.linux.org.uk>
Sat, 22 May 2010 19:58:51 +0000 (20:58 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Fri, 16 Jul 2010 09:57:36 +0000 (10:57 +0100)
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>
12 files changed:
arch/arm/common/sa1111.c
arch/arm/include/asm/memory.h
arch/arm/mach-davinci/include/mach/memory.h
arch/arm/mach-ixp4xx/common-pci.c
arch/arm/mach-ixp4xx/include/mach/memory.h
arch/arm/mach-pxa/cm-x2xx-pci.c
arch/arm/mach-pxa/include/mach/memory.h
arch/arm/mach-realview/core.c
arch/arm/mach-realview/include/mach/memory.h
arch/arm/mach-sa1100/include/mach/memory.h
arch/arm/mach-shark/include/mach/memory.h
arch/arm/mm/init.c

index 6f80665..ac2fd44 100644 (file)
@@ -185,13 +185,10 @@ static struct sa1111_dev_info sa1111_devices[] = {
        },
 };
 
-void __init sa1111_adjust_zones(int node, unsigned long *size, unsigned long *holes)
+void __init sa1111_adjust_zones(unsigned long *size, unsigned long *holes)
 {
        unsigned int sz = SZ_1M >> PAGE_SHIFT;
 
-       if (node != 0)
-               sz = 0;
-
        size[1] = size[0] - sz;
        size[0] = sz;
 }
index e263ec7..82df0ae 100644 (file)
 #endif
 
 #ifndef arch_adjust_zones
-#define arch_adjust_zones(node,size,holes) do { } while (0)
+#define arch_adjust_zones(size,holes) do { } while (0)
 #elif !defined(CONFIG_ZONE_DMA)
 #error "custom arch_adjust_zones() requires CONFIG_ZONE_DMA"
 #endif
index a91edfb..22eb97c 100644 (file)
  * below 128M
  */
 static inline void
-__arch_adjust_zones(int node, unsigned long *size, unsigned long *holes)
+__arch_adjust_zones(unsigned long *size, unsigned long *holes)
 {
        unsigned int sz = (128<<20) >> PAGE_SHIFT;
 
-       if (node != 0)
-               sz = 0;
-
        size[1] = size[0] - sz;
        size[0] = sz;
 }
 
-#define arch_adjust_zones(node, zone_size, holes) \
-        if ((meminfo.bank[0].size >> 20) > 128) __arch_adjust_zones(node, zone_size, holes)
+#define arch_adjust_zones(zone_size, holes) \
+        if ((meminfo.bank[0].size >> 20) > 128) __arch_adjust_zones(zone_size, holes)
 
 #define ISA_DMA_THRESHOLD      (PHYS_OFFSET + (128<<20) - 1)
 #define MAX_DMA_ADDRESS                (PAGE_OFFSET + (128<<20))
index e318153..333d04c 100644 (file)
@@ -348,7 +348,7 @@ int dma_needs_bounce(struct device *dev, dma_addr_t dma_addr, size_t size)
  * This is really ugly and we need a better way of specifying
  * DMA-capable regions of memory.
  */
-void __init ixp4xx_adjust_zones(int node, unsigned long *zone_size,
+void __init ixp4xx_adjust_zones(unsigned long *zone_size,
        unsigned long *zhole_size)
 {
        unsigned int sz = SZ_64M >> PAGE_SHIFT;
@@ -356,7 +356,7 @@ void __init ixp4xx_adjust_zones(int node, unsigned long *zone_size,
        /*
         * Only adjust if > 64M on current system
         */
-       if (node || (zone_size[0] <= sz))
+       if (zone_size[0] <= sz)
                return;
 
        zone_size[1] = zone_size[0] - sz;
index 98f5e5e..0136eaa 100644 (file)
 
 #if !defined(__ASSEMBLY__) && defined(CONFIG_PCI)
 
-void ixp4xx_adjust_zones(int node, unsigned long *size, unsigned long *holes);
+void ixp4xx_adjust_zones(unsigned long *size, unsigned long *holes);
 
-#define arch_adjust_zones(node, size, holes) \
-       ixp4xx_adjust_zones(node, size, holes)
+#define arch_adjust_zones(size, holes) \
+       ixp4xx_adjust_zones(size, holes)
 
 #define ISA_DMA_THRESHOLD (SZ_64M - 1)
 #define MAX_DMA_ADDRESS                (PAGE_OFFSET + SZ_64M)
index 161fc2d..0f31305 100644 (file)
@@ -35,7 +35,7 @@ static int cmx2xx_it8152_irq_gpio;
  * This is really ugly and we need a better way of specifying
  * DMA-capable regions of memory.
  */
-void __init cmx2xx_pci_adjust_zones(int node, unsigned long *zone_size,
+void __init cmx2xx_pci_adjust_zones(unsigned long *zone_size,
        unsigned long *zhole_size)
 {
        unsigned int sz = SZ_64M >> PAGE_SHIFT;
@@ -46,7 +46,7 @@ void __init cmx2xx_pci_adjust_zones(int node, unsigned long *zone_size,
                /*
                 * Only adjust if > 64M on current system
                 */
-               if (node || (zone_size[0] <= sz))
+               if (zone_size[0] <= sz)
                        return;
 
                zone_size[1] = zone_size[0] - sz;
index 81fd4a0..92361a6 100644 (file)
 #define PHYS_OFFSET    UL(0xa0000000)
 
 #if !defined(__ASSEMBLY__) && defined(CONFIG_MACH_ARMCORE) && defined(CONFIG_PCI)
-void cmx2xx_pci_adjust_zones(int node, unsigned long *size,
-                            unsigned long *holes);
+void cmx2xx_pci_adjust_zones(unsigned long *size, unsigned long *holes);
 
-#define arch_adjust_zones(node, size, holes) \
-       cmx2xx_pci_adjust_zones(node, size, holes)
+#define arch_adjust_zones(size, holes) \
+       cmx2xx_pci_adjust_zones(size, holes)
 
 #define ISA_DMA_THRESHOLD      (PHYS_OFFSET + SZ_64M - 1)
 #define MAX_DMA_ADDRESS                (PAGE_OFFSET + SZ_64M)
index 595be19..1195e07 100644 (file)
@@ -61,12 +61,11 @@ void __iomem *gic_cpu_base_addr;
 /*
  * Adjust the zones if there are restrictions for DMA access.
  */
-void __init realview_adjust_zones(int node, unsigned long *size,
-                                 unsigned long *hole)
+void __init realview_adjust_zones(unsigned long *size, unsigned long *hole)
 {
        unsigned long dma_size = SZ_256M >> PAGE_SHIFT;
 
-       if (!machine_is_realview_pbx() || node || (size[0] <= dma_size))
+       if (!machine_is_realview_pbx() || size[0] <= dma_size)
                return;
 
        size[ZONE_NORMAL] = size[0] - dma_size;
index 2417bbc..5dafc15 100644 (file)
 #endif
 
 #if !defined(__ASSEMBLY__) && defined(CONFIG_ZONE_DMA)
-extern void realview_adjust_zones(int node, unsigned long *size,
-                                 unsigned long *hole);
-#define arch_adjust_zones(node, size, hole) \
-       realview_adjust_zones(node, size, hole)
+extern void realview_adjust_zones(unsigned long *size, unsigned long *hole);
+#define arch_adjust_zones(size, hole) \
+       realview_adjust_zones(size, hole)
 
 #define ISA_DMA_THRESHOLD      (PHYS_OFFSET + SZ_256M - 1)
 #define MAX_DMA_ADDRESS                (PAGE_OFFSET + SZ_256M)
index d5277f9..128a1df 100644 (file)
 #ifndef __ASSEMBLY__
 
 #ifdef CONFIG_SA1111
-void sa1111_adjust_zones(int node, unsigned long *size, unsigned long *holes);
+void sa1111_adjust_zones(unsigned long *size, unsigned long *holes);
 
-#define arch_adjust_zones(node, size, holes) \
-       sa1111_adjust_zones(node, size, holes)
+#define arch_adjust_zones(size, holes) \
+       sa1111_adjust_zones(size, holes)
 
 #define ISA_DMA_THRESHOLD      (PHYS_OFFSET + SZ_1M - 1)
 #define MAX_DMA_ADDRESS                (PAGE_OFFSET + SZ_1M)
index 3053e5b..d9c4812 100644 (file)
@@ -19,9 +19,8 @@
 
 #ifndef __ASSEMBLY__
 
-static inline void __arch_adjust_zones(int node, unsigned long *zone_size, unsigned long *zhole_size) 
+static inline void __arch_adjust_zones(unsigned long *zone_size, unsigned long *zhole_size)
 {
-  if (node != 0) return;
   /* Only the first 4 MB (=1024 Pages) are usable for DMA */
   /* See dev / -> .properties in OpenFirmware. */
   zone_size[1] = zone_size[0] - 1024;
@@ -30,8 +29,8 @@ static inline void __arch_adjust_zones(int node, unsigned long *zone_size, unsig
   zhole_size[0] = 0;
 }
 
-#define arch_adjust_zones(node, size, holes) \
-       __arch_adjust_zones(node, size, holes)
+#define arch_adjust_zones(size, holes) \
+       __arch_adjust_zones(size, holes)
 
 #define ISA_DMA_THRESHOLD      (PHYS_OFFSET + SZ_4M - 1)
 #define MAX_DMA_ADDRESS                (PAGE_OFFSET + SZ_4M)
index 4011e52..4d27208 100644 (file)
@@ -318,7 +318,7 @@ static void __init arm_bootmem_free(struct meminfo *mi)
         * Adjust the sizes according to any special requirements for
         * this machine type.
         */
-       arch_adjust_zones(0, zone_size, zhole_size);
+       arch_adjust_zones(zone_size, zhole_size);
 
        free_area_init_node(0, zone_size, min, zhole_size);
 }