diff options
author | David Rientjes <rientjes@google.com> | 2007-07-21 11:10:32 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-21 21:37:10 -0400 |
commit | 3484d79813707bb6045773953a809abba443dc20 (patch) | |
tree | a986c674698face8fc51132a1feeac53fa7946a2 /include | |
parent | 3af044e0f832cfa3fcdce14dc30678b79dd36995 (diff) |
x86_64: fake pxm-to-node mapping for fake numa
For NUMA emulation, our SLIT should represent the true NUMA topology of the
system but our proximity domain to node ID mapping needs to reflect the
emulated state.
When NUMA emulation has successfully setup fake nodes on the system, a new
function, acpi_fake_nodes() is called. This function determines the proximity
domain (_PXM) for each true node found on the system. It then finds which
emulated nodes have been allocated on this true node as determined by its
starting address. The node ID to PXM mapping is changed so that each fake
node ID points to the PXM of the true node that it is located on.
If the machine failed to register a SLIT, then we assume there is no special
requirement for emulated node affinity so we use the default LOCAL_DISTANCE,
which is newly exported to this code, as our measurement if the emulated nodes
appear in the same PXM. Otherwise, we use REMOTE_DISTANCE.
PXM_INVAL and NID_INVAL are also exported to the ACPI header file so that we
can compare node_to_pxm() results in generic code (in this case, the SRAT
code).
Cc: Len Brown <lenb@kernel.org>
Signed-off-by: David Rientjes <rientjes@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/acpi/acpi_numa.h | 1 | ||||
-rw-r--r-- | include/asm-x86_64/acpi.h | 11 | ||||
-rw-r--r-- | include/linux/acpi.h | 3 |
3 files changed, 15 insertions, 0 deletions
diff --git a/include/acpi/acpi_numa.h b/include/acpi/acpi_numa.h index e2fcee2b340d..62c5ee4311da 100644 --- a/include/acpi/acpi_numa.h +++ b/include/acpi/acpi_numa.h | |||
@@ -13,6 +13,7 @@ | |||
13 | 13 | ||
14 | extern int pxm_to_node(int); | 14 | extern int pxm_to_node(int); |
15 | extern int node_to_pxm(int); | 15 | extern int node_to_pxm(int); |
16 | extern void __acpi_map_pxm_to_node(int, int); | ||
16 | extern int acpi_map_pxm_to_node(int); | 17 | extern int acpi_map_pxm_to_node(int); |
17 | extern void __cpuinit acpi_unmap_pxm_to_node(int); | 18 | extern void __cpuinit acpi_unmap_pxm_to_node(int); |
18 | 19 | ||
diff --git a/include/asm-x86_64/acpi.h b/include/asm-x86_64/acpi.h index a29f05087a31..1da8f49c0fe2 100644 --- a/include/asm-x86_64/acpi.h +++ b/include/asm-x86_64/acpi.h | |||
@@ -29,6 +29,7 @@ | |||
29 | #ifdef __KERNEL__ | 29 | #ifdef __KERNEL__ |
30 | 30 | ||
31 | #include <acpi/pdc_intel.h> | 31 | #include <acpi/pdc_intel.h> |
32 | #include <asm/numa.h> | ||
32 | 33 | ||
33 | #define COMPILER_DEPENDENT_INT64 long long | 34 | #define COMPILER_DEPENDENT_INT64 long long |
34 | #define COMPILER_DEPENDENT_UINT64 unsigned long long | 35 | #define COMPILER_DEPENDENT_UINT64 unsigned long long |
@@ -141,6 +142,16 @@ extern int acpi_pci_disabled; | |||
141 | extern int acpi_skip_timer_override; | 142 | extern int acpi_skip_timer_override; |
142 | extern int acpi_use_timer_override; | 143 | extern int acpi_use_timer_override; |
143 | 144 | ||
145 | #ifdef CONFIG_ACPI_NUMA | ||
146 | extern void __init acpi_fake_nodes(const struct bootnode *fake_nodes, | ||
147 | int num_nodes); | ||
148 | #else | ||
149 | static inline void acpi_fake_nodes(const struct bootnode *fake_nodes, | ||
150 | int num_nodes) | ||
151 | { | ||
152 | } | ||
153 | #endif | ||
154 | |||
144 | #endif /*__KERNEL__*/ | 155 | #endif /*__KERNEL__*/ |
145 | 156 | ||
146 | #endif /*_ASM_ACPI_H*/ | 157 | #endif /*_ASM_ACPI_H*/ |
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index e88b62e6b3aa..d5680cd7746a 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h | |||
@@ -231,6 +231,9 @@ extern int acpi_paddr_to_node(u64 start_addr, u64 size); | |||
231 | 231 | ||
232 | extern int pnpacpi_disabled; | 232 | extern int pnpacpi_disabled; |
233 | 233 | ||
234 | #define PXM_INVAL (-1) | ||
235 | #define NID_INVAL (-1) | ||
236 | |||
234 | #else /* CONFIG_ACPI */ | 237 | #else /* CONFIG_ACPI */ |
235 | 238 | ||
236 | static inline int acpi_boot_init(void) | 239 | static inline int acpi_boot_init(void) |