Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 156189
b: refs/heads/master
c: 5d2619f
h: refs/heads/master
i:
  156187: 4ffd35d
v: v3
  • Loading branch information
Zhao Yakui authored and Len Brown committed Aug 2, 2009
1 parent 869d105 commit fff935f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: aa7b2b2e973874df99a45b31adbed5978b46be1f
refs/heads/master: 5d2619fca753d270e63e76c9e18437b0d9bc8d75
18 changes: 15 additions & 3 deletions trunk/drivers/acpi/acpi_memhotplug.c
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,12 @@ static int acpi_memory_enable_device(struct acpi_memory_device *mem_device)
num_enabled++;
continue;
}

/*
* If the memory block size is zero, please ignore it.
* Don't try to do the following memory hotplug flowchart.
*/
if (!info->length)
continue;
if (node < 0)
node = memory_add_physaddr_to_nid(info->start_addr);

Expand All @@ -257,8 +262,15 @@ static int acpi_memory_enable_device(struct acpi_memory_device *mem_device)
mem_device->state = MEMORY_INVALID_STATE;
return -EINVAL;
}

return result;
/*
* Sometimes the memory device will contain several memory blocks.
* When one memory block is hot-added to the system memory, it will
* be regarded as a success.
* Otherwise if the last memory block can't be hot-added to the system
* memory, it will be failure and the memory device can't be bound with
* driver.
*/
return 0;
}

static int acpi_memory_powerdown_device(struct acpi_memory_device *mem_device)
Expand Down

0 comments on commit fff935f

Please sign in to comment.