diff options
-rw-r--r-- | drivers/acpi/acpi_memhotplug.c | 3 | ||||
-rw-r--r-- | drivers/acpi/numa.c | 15 | ||||
-rw-r--r-- | include/linux/acpi.h | 6 |
3 files changed, 22 insertions, 2 deletions
diff --git a/drivers/acpi/acpi_memhotplug.c b/drivers/acpi/acpi_memhotplug.c index 0424326eae15..1012284ff4f7 100644 --- a/drivers/acpi/acpi_memhotplug.c +++ b/drivers/acpi/acpi_memhotplug.c | |||
@@ -215,7 +215,7 @@ static int acpi_memory_enable_device(struct acpi_memory_device *mem_device) | |||
215 | { | 215 | { |
216 | int result, num_enabled = 0; | 216 | int result, num_enabled = 0; |
217 | struct acpi_memory_info *info; | 217 | struct acpi_memory_info *info; |
218 | int node = 0; | 218 | int node; |
219 | 219 | ||
220 | ACPI_FUNCTION_TRACE("acpi_memory_enable_device"); | 220 | ACPI_FUNCTION_TRACE("acpi_memory_enable_device"); |
221 | 221 | ||
@@ -228,6 +228,7 @@ static int acpi_memory_enable_device(struct acpi_memory_device *mem_device) | |||
228 | return result; | 228 | return result; |
229 | } | 229 | } |
230 | 230 | ||
231 | node = acpi_get_node(mem_device->handle); | ||
231 | /* | 232 | /* |
232 | * Tell the VM there is more memory here... | 233 | * Tell the VM there is more memory here... |
233 | * Note: Assume that this function returns zero on success | 234 | * Note: Assume that this function returns zero on success |
diff --git a/drivers/acpi/numa.c b/drivers/acpi/numa.c index e2c1a16078c9..13d6d5bdea26 100644 --- a/drivers/acpi/numa.c +++ b/drivers/acpi/numa.c | |||
@@ -254,5 +254,18 @@ int acpi_get_pxm(acpi_handle h) | |||
254 | } while (ACPI_SUCCESS(status)); | 254 | } while (ACPI_SUCCESS(status)); |
255 | return -1; | 255 | return -1; |
256 | } | 256 | } |
257 | |||
258 | EXPORT_SYMBOL(acpi_get_pxm); | 257 | EXPORT_SYMBOL(acpi_get_pxm); |
258 | |||
259 | int acpi_get_node(acpi_handle *handle) | ||
260 | { | ||
261 | int pxm, node = -1; | ||
262 | |||
263 | ACPI_FUNCTION_TRACE("acpi_get_node"); | ||
264 | |||
265 | pxm = acpi_get_pxm(handle); | ||
266 | if (pxm >= 0) | ||
267 | node = acpi_map_pxm_to_node(pxm); | ||
268 | |||
269 | return_VALUE(node); | ||
270 | } | ||
271 | EXPORT_SYMBOL(acpi_get_node); | ||
diff --git a/include/linux/acpi.h b/include/linux/acpi.h index 90d6df1551ed..88b5dfd8ee12 100644 --- a/include/linux/acpi.h +++ b/include/linux/acpi.h | |||
@@ -528,12 +528,18 @@ static inline void acpi_set_cstate_limit(unsigned int new_limit) { return; } | |||
528 | 528 | ||
529 | #ifdef CONFIG_ACPI_NUMA | 529 | #ifdef CONFIG_ACPI_NUMA |
530 | int acpi_get_pxm(acpi_handle handle); | 530 | int acpi_get_pxm(acpi_handle handle); |
531 | int acpi_get_node(acpi_handle *handle); | ||
531 | #else | 532 | #else |
532 | static inline int acpi_get_pxm(acpi_handle handle) | 533 | static inline int acpi_get_pxm(acpi_handle handle) |
533 | { | 534 | { |
534 | return 0; | 535 | return 0; |
535 | } | 536 | } |
537 | static inline int acpi_get_node(acpi_handle *handle) | ||
538 | { | ||
539 | return 0; | ||
540 | } | ||
536 | #endif | 541 | #endif |
542 | extern int acpi_paddr_to_node(u64 start_addr, u64 size); | ||
537 | 543 | ||
538 | extern int pnpacpi_disabled; | 544 | extern int pnpacpi_disabled; |
539 | 545 | ||