Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 30720
b: refs/heads/master
c: dd56a8e
h: refs/heads/master
v: v3
  • Loading branch information
Yasunori Goto authored and Linus Torvalds committed Jun 28, 2006
1 parent 9991833 commit 003a593
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1f425994f96d85540d47eee98daabc1e211b454e
refs/heads/master: dd56a8e36f91f63c0a31e8a118d87b7cf01526b8
11 changes: 11 additions & 0 deletions trunk/drivers/acpi/acpi_memhotplug.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 003a593

Please sign in to comment.