From 003a593d7c70a535f3acf7869f090d6da89e2884 Mon Sep 17 00:00:00 2001 From: Yasunori Goto Date: Tue, 27 Jun 2006 02:53:29 -0700 Subject: [PATCH] --- yaml --- r: 30720 b: refs/heads/master c: dd56a8e36f91f63c0a31e8a118d87b7cf01526b8 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/acpi/acpi_memhotplug.c | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 33ada937a83e..99cd6e8ab758 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 1f425994f96d85540d47eee98daabc1e211b454e +refs/heads/master: dd56a8e36f91f63c0a31e8a118d87b7cf01526b8 diff --git a/trunk/drivers/acpi/acpi_memhotplug.c b/trunk/drivers/acpi/acpi_memhotplug.c index 3721f8dd0de3..5652569b3762 100644 --- a/trunk/drivers/acpi/acpi_memhotplug.c +++ b/trunk/drivers/acpi/acpi_memhotplug.c @@ -234,6 +234,17 @@ static int acpi_memory_enable_device(struct acpi_memory_device *mem_device) * (i.e. memory-hot-remove function) */ list_for_each_entry(info, &mem_device->res_list, list) { + u64 start_pfn, end_pfn; + + start_pfn = info->start_addr >> PAGE_SHIFT; + end_pfn = (info->start_addr + info->length - 1) >> PAGE_SHIFT; + + if (pfn_valid(start_pfn) || pfn_valid(end_pfn)) { + /* already enabled. try next area */ + num_enabled++; + continue; + } + result = add_memory(info->start_addr, info->length); if (result) continue;