mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
[PATCH] hot-add-mem x86_64: memory_add_physaddr_to_nid node fixup
In cases where the acpi memory-add event does not containe the pxm (node) infomation allow the driver to look up node info based on the address. The acpi_get_node call returns -1 if it can't decode the pxm info, this causes add_memory to panic. acpi_get_node would have to decode the resource from the handle (a lenghty proposition). This seems to be the cleanist point to interject the hook. [[email protected]: build fixes] [[email protected]: build fixes] Signed-off-by: Keith Mannthey <[email protected]> Cc: KAMEZAWA Hiroyuki <[email protected]> Cc: Andi Kleen <[email protected]> Signed-off-by: KAMEZAWA Hiroyuki <[email protected]> Signed-off-by: Yasunori Goto <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
4942e998b4
commit
8c2676a587
4 changed files with 25 additions and 0 deletions
|
|
@ -238,6 +238,10 @@ static int acpi_memory_enable_device(struct acpi_memory_device *mem_device)
|
|||
num_enabled++;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (node < 0)
|
||||
node = memory_add_physaddr_to_nid(info->start_addr);
|
||||
|
||||
result = add_memory(node, info->start_addr, info->length);
|
||||
if (result)
|
||||
continue;
|
||||
|
|
|
|||
Loading…
Reference in a new issue