diff options
Diffstat (limited to 'drivers/acpi')
-rw-r--r-- | drivers/acpi/Kconfig | 2 | ||||
-rw-r--r-- | drivers/acpi/numa.c | 48 | ||||
-rw-r--r-- | drivers/acpi/pci_link.c | 3 | ||||
-rw-r--r-- | drivers/acpi/processor_core.c | 2 |
4 files changed, 53 insertions, 2 deletions
diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig index 2b2fbec14540..94b8d820c512 100644 --- a/drivers/acpi/Kconfig +++ b/drivers/acpi/Kconfig | |||
@@ -161,7 +161,7 @@ config ACPI_THERMAL | |||
161 | config ACPI_NUMA | 161 | config ACPI_NUMA |
162 | bool "NUMA support" | 162 | bool "NUMA support" |
163 | depends on NUMA | 163 | depends on NUMA |
164 | depends on (IA64 || X86_64) | 164 | depends on (X86 || IA64) |
165 | default y if IA64_GENERIC || IA64_SGI_SN2 | 165 | default y if IA64_GENERIC || IA64_SGI_SN2 |
166 | 166 | ||
167 | config ACPI_ASUS | 167 | config ACPI_ASUS |
diff --git a/drivers/acpi/numa.c b/drivers/acpi/numa.c index 64b98e82feb7..e2c1a16078c9 100644 --- a/drivers/acpi/numa.c +++ b/drivers/acpi/numa.c | |||
@@ -36,12 +36,60 @@ | |||
36 | #define _COMPONENT ACPI_NUMA | 36 | #define _COMPONENT ACPI_NUMA |
37 | ACPI_MODULE_NAME("numa") | 37 | ACPI_MODULE_NAME("numa") |
38 | 38 | ||
39 | static nodemask_t nodes_found_map = NODE_MASK_NONE; | ||
40 | #define PXM_INVAL -1 | ||
41 | #define NID_INVAL -1 | ||
42 | |||
43 | /* maps to convert between proximity domain and logical node ID */ | ||
44 | int __cpuinitdata pxm_to_node_map[MAX_PXM_DOMAINS] | ||
45 | = { [0 ... MAX_PXM_DOMAINS - 1] = NID_INVAL }; | ||
46 | int __cpuinitdata node_to_pxm_map[MAX_NUMNODES] | ||
47 | = { [0 ... MAX_NUMNODES - 1] = PXM_INVAL }; | ||
48 | |||
39 | extern int __init acpi_table_parse_madt_family(enum acpi_table_id id, | 49 | extern int __init acpi_table_parse_madt_family(enum acpi_table_id id, |
40 | unsigned long madt_size, | 50 | unsigned long madt_size, |
41 | int entry_id, | 51 | int entry_id, |
42 | acpi_madt_entry_handler handler, | 52 | acpi_madt_entry_handler handler, |
43 | unsigned int max_entries); | 53 | unsigned int max_entries); |
44 | 54 | ||
55 | int __cpuinit pxm_to_node(int pxm) | ||
56 | { | ||
57 | if (pxm < 0) | ||
58 | return NID_INVAL; | ||
59 | return pxm_to_node_map[pxm]; | ||
60 | } | ||
61 | |||
62 | int __cpuinit node_to_pxm(int node) | ||
63 | { | ||
64 | if (node < 0) | ||
65 | return PXM_INVAL; | ||
66 | return node_to_pxm_map[node]; | ||
67 | } | ||
68 | |||
69 | int __cpuinit acpi_map_pxm_to_node(int pxm) | ||
70 | { | ||
71 | int node = pxm_to_node_map[pxm]; | ||
72 | |||
73 | if (node < 0){ | ||
74 | if (nodes_weight(nodes_found_map) >= MAX_NUMNODES) | ||
75 | return NID_INVAL; | ||
76 | node = first_unset_node(nodes_found_map); | ||
77 | pxm_to_node_map[pxm] = node; | ||
78 | node_to_pxm_map[node] = pxm; | ||
79 | node_set(node, nodes_found_map); | ||
80 | } | ||
81 | |||
82 | return node; | ||
83 | } | ||
84 | |||
85 | void __cpuinit acpi_unmap_pxm_to_node(int node) | ||
86 | { | ||
87 | int pxm = node_to_pxm_map[node]; | ||
88 | pxm_to_node_map[pxm] = NID_INVAL; | ||
89 | node_to_pxm_map[node] = PXM_INVAL; | ||
90 | node_clear(node, nodes_found_map); | ||
91 | } | ||
92 | |||
45 | void __init acpi_table_print_srat_entry(acpi_table_entry_header * header) | 93 | void __init acpi_table_print_srat_entry(acpi_table_entry_header * header) |
46 | { | 94 | { |
47 | 95 | ||
diff --git a/drivers/acpi/pci_link.c b/drivers/acpi/pci_link.c index b55ad1add1b0..228bdb626502 100644 --- a/drivers/acpi/pci_link.c +++ b/drivers/acpi/pci_link.c | |||
@@ -813,6 +813,9 @@ static int irqrouter_resume(struct sys_device *dev) | |||
813 | 813 | ||
814 | ACPI_FUNCTION_TRACE("irqrouter_resume"); | 814 | ACPI_FUNCTION_TRACE("irqrouter_resume"); |
815 | 815 | ||
816 | /* Make sure SCI is enabled again (Apple firmware bug?) */ | ||
817 | acpi_set_register(ACPI_BITREG_SCI_ENABLE, 1, ACPI_MTX_DO_NOT_LOCK); | ||
818 | |||
816 | acpi_in_resume = 1; | 819 | acpi_in_resume = 1; |
817 | list_for_each(node, &acpi_link.entries) { | 820 | list_for_each(node, &acpi_link.entries) { |
818 | link = list_entry(node, struct acpi_pci_link, node); | 821 | link = list_entry(node, struct acpi_pci_link, node); |
diff --git a/drivers/acpi/processor_core.c b/drivers/acpi/processor_core.c index a1b46fb41c80..decaebb4cbe9 100644 --- a/drivers/acpi/processor_core.c +++ b/drivers/acpi/processor_core.c | |||
@@ -110,7 +110,7 @@ static struct file_operations acpi_processor_info_fops = { | |||
110 | }; | 110 | }; |
111 | 111 | ||
112 | struct acpi_processor *processors[NR_CPUS]; | 112 | struct acpi_processor *processors[NR_CPUS]; |
113 | struct acpi_processor_errata errata; | 113 | struct acpi_processor_errata errata __read_mostly; |
114 | 114 | ||
115 | /* -------------------------------------------------------------------------- | 115 | /* -------------------------------------------------------------------------- |
116 | Errata Handling | 116 | Errata Handling |