aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorYasunori Goto <y-goto@jp.fujitsu.com>2006-06-23 05:03:19 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-23 10:42:48 -0400
commit762834e8bf46bf41ce9034d062a7c1f8563175f3 (patch)
treefb134ef41772ba61050a08cc4ed92c50cd057658 /include
parentd6277db4ab271862ed599da08d78961c70f00002 (diff)
[PATCH] Unify pxm_to_node() and node_to_pxm()
Consolidate the various arch-specific implementations of pxm_to_node() and node_to_pxm() into a single generic version. Signed-off-by: Yasunori Goto <y-goto@jp.fujitsu.com> Cc: "Luck, Tony" <tony.luck@intel.com> Cc: Andi Kleen <ak@muc.de> Cc: Dave Hansen <haveblue@us.ibm.com> Cc: "Brown, Len" <len.brown@intel.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include')
-rw-r--r--include/acpi/acpi_numa.h23
-rw-r--r--include/asm-x86_64/numa.h1
-rw-r--r--include/linux/acpi.h9
3 files changed, 32 insertions, 1 deletions
diff --git a/include/acpi/acpi_numa.h b/include/acpi/acpi_numa.h
new file mode 100644
index 000000000000..1049f2a0a6db
--- /dev/null
+++ b/include/acpi/acpi_numa.h
@@ -0,0 +1,23 @@
1#ifndef __ACPI_NUMA_H
2#define __ACPI_NUMA_H
3
4#ifdef CONFIG_ACPI_NUMA
5#include <linux/kernel.h>
6
7/* Proximity bitmap length */
8#if MAX_NUMNODES > 256
9#define MAX_PXM_DOMAINS MAX_NUMNODES
10#else
11#define MAX_PXM_DOMAINS (256) /* Old pxm spec is defined 8 bit */
12#endif
13
14extern int __cpuinitdata pxm_to_node_map[MAX_PXM_DOMAINS];
15extern int __cpuinitdata node_to_pxm_map[MAX_NUMNODES];
16
17extern int __cpuinit pxm_to_node(int);
18extern int __cpuinit node_to_pxm(int);
19extern int __cpuinit acpi_map_pxm_to_node(int);
20extern void __cpuinit acpi_unmap_pxm_to_node(int);
21
22#endif /* CONFIG_ACPI_NUMA */
23#endif /* __ACP_NUMA_H */
diff --git a/include/asm-x86_64/numa.h b/include/asm-x86_64/numa.h
index 1cc92fe02503..933ff11ece15 100644
--- a/include/asm-x86_64/numa.h
+++ b/include/asm-x86_64/numa.h
@@ -8,7 +8,6 @@ struct bootnode {
8}; 8};
9 9
10extern int compute_hash_shift(struct bootnode *nodes, int numnodes); 10extern int compute_hash_shift(struct bootnode *nodes, int numnodes);
11extern int pxm_to_node(int nid);
12 11
13#define ZONE_ALIGN (1UL << (MAX_ORDER+PAGE_SHIFT)) 12#define ZONE_ALIGN (1UL << (MAX_ORDER+PAGE_SHIFT))
14 13
diff --git a/include/linux/acpi.h b/include/linux/acpi.h
index 1cf0b91d05bd..90d6df1551ed 100644
--- a/include/linux/acpi.h
+++ b/include/linux/acpi.h
@@ -37,6 +37,7 @@
37#include <acpi/acpi.h> 37#include <acpi/acpi.h>
38#include <acpi/acpi_bus.h> 38#include <acpi/acpi_bus.h>
39#include <acpi/acpi_drivers.h> 39#include <acpi/acpi_drivers.h>
40#include <acpi/acpi_numa.h>
40#include <asm/acpi.h> 41#include <asm/acpi.h>
41 42
42 43
@@ -407,10 +408,18 @@ void acpi_table_print_madt_entry (acpi_table_entry_header *madt);
407void acpi_table_print_srat_entry (acpi_table_entry_header *srat); 408void acpi_table_print_srat_entry (acpi_table_entry_header *srat);
408 409
409/* the following four functions are architecture-dependent */ 410/* the following four functions are architecture-dependent */
411#ifdef CONFIG_HAVE_ARCH_PARSE_SRAT
412#define NR_NODE_MEMBLKS MAX_NUMNODES
413#define acpi_numa_slit_init(slit) do {} while (0)
414#define acpi_numa_processor_affinity_init(pa) do {} while (0)
415#define acpi_numa_memory_affinity_init(ma) do {} while (0)
416#define acpi_numa_arch_fixup() do {} while (0)
417#else
410void acpi_numa_slit_init (struct acpi_table_slit *slit); 418void acpi_numa_slit_init (struct acpi_table_slit *slit);
411void acpi_numa_processor_affinity_init (struct acpi_table_processor_affinity *pa); 419void acpi_numa_processor_affinity_init (struct acpi_table_processor_affinity *pa);
412void acpi_numa_memory_affinity_init (struct acpi_table_memory_affinity *ma); 420void acpi_numa_memory_affinity_init (struct acpi_table_memory_affinity *ma);
413void acpi_numa_arch_fixup(void); 421void acpi_numa_arch_fixup(void);
422#endif
414 423
415#ifdef CONFIG_ACPI_HOTPLUG_CPU 424#ifdef CONFIG_ACPI_HOTPLUG_CPU
416/* Arch dependent functions for cpu hotplug support */ 425/* Arch dependent functions for cpu hotplug support */