diff options
Diffstat (limited to 'drivers/acpi')
-rw-r--r-- | drivers/acpi/acpi_memhotplug.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/acpi/acpi_memhotplug.c b/drivers/acpi/acpi_memhotplug.c index 81e970adeab3..e9175eaeb1df 100644 --- a/drivers/acpi/acpi_memhotplug.c +++ b/drivers/acpi/acpi_memhotplug.c | |||
@@ -230,17 +230,10 @@ static int acpi_memory_enable_device(struct acpi_memory_device *mem_device) | |||
230 | * (i.e. memory-hot-remove function) | 230 | * (i.e. memory-hot-remove function) |
231 | */ | 231 | */ |
232 | list_for_each_entry(info, &mem_device->res_list, list) { | 232 | list_for_each_entry(info, &mem_device->res_list, list) { |
233 | u64 start_pfn, end_pfn; | 233 | if (info->enabled) { /* just sanity check...*/ |
234 | |||
235 | start_pfn = info->start_addr >> PAGE_SHIFT; | ||
236 | end_pfn = (info->start_addr + info->length - 1) >> PAGE_SHIFT; | ||
237 | |||
238 | if (pfn_valid(start_pfn) || pfn_valid(end_pfn)) { | ||
239 | /* already enabled. try next area */ | ||
240 | num_enabled++; | 234 | num_enabled++; |
241 | continue; | 235 | continue; |
242 | } | 236 | } |
243 | |||
244 | result = add_memory(node, info->start_addr, info->length); | 237 | result = add_memory(node, info->start_addr, info->length); |
245 | if (result) | 238 | if (result) |
246 | continue; | 239 | continue; |