Skip to contentSkip to conversation

x86, numa: move bootnode definition into srat_64.c

PATCH In review Yinghai Lu 3 participants 4 messages Mar 3, 2011

Subsystems (2)
lore
Share & tools
lore

Yinghai Lu

author
#0 lore raw

PATCH 1/1 x86, numa: move bootnode definition into srat_64.c

only one user there for hot memory add.

arch/x86/include/asm/acpi.h +0 -2
index 12e0e7d..416d865 100644
@@ -183,8 +183,6 @@ static inline void disable_acpi(void) { }
 
 #define ARCH_HAS_POWER_INIT	1
 
-struct bootnode;
-
 #ifdef CONFIG_ACPI_NUMA
 extern int acpi_numa;
 extern int x86_acpi_numa_init(void);
arch/x86/include/asm/amd_nb.h +0 -1
index e264ae5..1263bf4 100644
@@ -11,7 +11,6 @@ struct amd_nb_bus_dev_range {
 
 extern const struct pci_device_id amd_nb_misc_ids[];
 extern const struct amd_nb_bus_dev_range amd_nb_bus_dev_ranges[];
-struct bootnode;
 
 extern int early_is_amd_nb(u32 value);
 extern int amd_cache_northbridges(void);
arch/x86/include/asm/numa_64.h +0 -5
index 344eb17..52f9b12 100644
@@ -3,11 +3,6 @@
 
 #include <linux/nodemask.h>
 
-struct bootnode {
-	u64 start;
-	u64 end;
-};
-
 #define ZONE_ALIGN (1UL << (MAX_ORDER+PAGE_SHIFT))
 
 extern int numa_off;
arch/x86/mm/srat_64.c +5 -0
index 8e9d339..7e5d0e9 100644
@@ -26,6 +26,11 @@
 
 int acpi_numa __initdata;
 
+struct bootnode {
+	u64 start;
+	u64 end;
+};
+
 static struct bootnode nodes_add[MAX_NUMNODES];
 
 static __init int setup_node(int pxm)
#1 lore raw
Quoted 1 line · Yinghai Lu

only one user there for hot memory add.

Again, please use proper sentences.

Only srat_64 hot memory add code uses struct bootnode. Move its definition into srat_64.c

Thanks.

Signature · 1 line
tejun
#2 lore raw
In reply to Yinghai Lu
Quoted 6 lines · Yinghai Lu
arch/x86/mm/srat_64.c +0 -0
index 8e9d339..7e5d0e9 100644
@@ -26,6 +26,11 @@
 

arch/x86/mm/srat_64.c line 36

Quoted 10 lines
arch/x86/mm/srat_64.c +5 -0
 int acpi_numa __initdata;
 
+struct bootnode {
+	u64 start;
+	u64 end;
+};
+
 static struct bootnode nodes_add[MAX_NUMNODES];
 
 static __init int setup_node(int pxm)

Can we get rid of struct bootnode instead and simply reuse struct numa_memblk? The latter isn't actually tied to memblock and is a generic representation of a node id and address range.

author
#3 lore raw
Quoted 17 lines · David Rientjes
Quoted 15 lines · Yinghai Lu
arch/x86/mm/srat_64.c +5 -0
index 8e9d339..7e5d0e9 100644
@@ -26,6 +26,11 @@
 
 int acpi_numa __initdata;
 
+struct bootnode {
+	u64 start;
+	u64 end;
+};
+
 static struct bootnode nodes_add[MAX_NUMNODES];
 
Quoted 5 lines

arch/x86/mm/srat_64.c line 36

Quoted 1 line
arch/x86/mm/srat_64.c +0 -0
 static __init int setup_node(int pxm)

Can we get rid of struct bootnode instead and simply reuse struct numa_memblk? The latter isn't actually tied to memblock and is a generic representation of a node id and address range.

Yes, could be don later esp if the hotplug mem code would support more than one block add per node.

Yinghai