[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>
This commit is contained in:
committed by
Linus Torvalds
parent
d6277db4ab
commit
762834e8bf
@@ -0,0 +1,23 @@
|
||||
#ifndef __ACPI_NUMA_H
|
||||
#define __ACPI_NUMA_H
|
||||
|
||||
#ifdef CONFIG_ACPI_NUMA
|
||||
#include <linux/kernel.h>
|
||||
|
||||
/* Proximity bitmap length */
|
||||
#if MAX_NUMNODES > 256
|
||||
#define MAX_PXM_DOMAINS MAX_NUMNODES
|
||||
#else
|
||||
#define MAX_PXM_DOMAINS (256) /* Old pxm spec is defined 8 bit */
|
||||
#endif
|
||||
|
||||
extern int __cpuinitdata pxm_to_node_map[MAX_PXM_DOMAINS];
|
||||
extern int __cpuinitdata node_to_pxm_map[MAX_NUMNODES];
|
||||
|
||||
extern int __cpuinit pxm_to_node(int);
|
||||
extern int __cpuinit node_to_pxm(int);
|
||||
extern int __cpuinit acpi_map_pxm_to_node(int);
|
||||
extern void __cpuinit acpi_unmap_pxm_to_node(int);
|
||||
|
||||
#endif /* CONFIG_ACPI_NUMA */
|
||||
#endif /* __ACP_NUMA_H */
|
||||
@@ -8,7 +8,6 @@ struct bootnode {
|
||||
};
|
||||
|
||||
extern int compute_hash_shift(struct bootnode *nodes, int numnodes);
|
||||
extern int pxm_to_node(int nid);
|
||||
|
||||
#define ZONE_ALIGN (1UL << (MAX_ORDER+PAGE_SHIFT))
|
||||
|
||||
|
||||
@@ -37,6 +37,7 @@
|
||||
#include <acpi/acpi.h>
|
||||
#include <acpi/acpi_bus.h>
|
||||
#include <acpi/acpi_drivers.h>
|
||||
#include <acpi/acpi_numa.h>
|
||||
#include <asm/acpi.h>
|
||||
|
||||
|
||||
@@ -407,10 +408,18 @@ void acpi_table_print_madt_entry (acpi_table_entry_header *madt);
|
||||
void acpi_table_print_srat_entry (acpi_table_entry_header *srat);
|
||||
|
||||
/* the following four functions are architecture-dependent */
|
||||
#ifdef CONFIG_HAVE_ARCH_PARSE_SRAT
|
||||
#define NR_NODE_MEMBLKS MAX_NUMNODES
|
||||
#define acpi_numa_slit_init(slit) do {} while (0)
|
||||
#define acpi_numa_processor_affinity_init(pa) do {} while (0)
|
||||
#define acpi_numa_memory_affinity_init(ma) do {} while (0)
|
||||
#define acpi_numa_arch_fixup() do {} while (0)
|
||||
#else
|
||||
void acpi_numa_slit_init (struct acpi_table_slit *slit);
|
||||
void acpi_numa_processor_affinity_init (struct acpi_table_processor_affinity *pa);
|
||||
void acpi_numa_memory_affinity_init (struct acpi_table_memory_affinity *ma);
|
||||
void acpi_numa_arch_fixup(void);
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_ACPI_HOTPLUG_CPU
|
||||
/* Arch dependent functions for cpu hotplug support */
|
||||
|
||||
Reference in New Issue
Block a user