aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/acpi/acpi_memhotplug.c
diff options
context:
space:
mode:
authorLv Zheng <lv.zheng@intel.com>2015-01-26 03:58:56 -0500
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2015-01-26 10:09:56 -0500
commita45de93eb10ae44446aec2c73d722562ab46092a (patch)
treedf3cdda47c765c1273c5eb4241d8f3c17b4c215b /drivers/acpi/acpi_memhotplug.c
parente044d8f92f79db167bb7f9dfd0f317e3238d82d1 (diff)
ACPICA: Resources: Provide common part for struct acpi_resource_address structures.
struct acpi_resource_address and struct acpi_resource_extended_address64 share substracts just at different offsets. To unify the parsing functions, OSPMs like Linux need a new ACPI_ADDRESS64_ATTRIBUTE as their substructs, so they can extract the shared data. This patch also synchronizes the structure changes to the Linux kernel. The usages are searched by matching the following keywords: 1. acpi_resource_address 2. acpi_resource_extended_address 3. ACPI_RESOURCE_TYPE_ADDRESS 4. ACPI_RESOURCE_TYPE_EXTENDED_ADDRESS And we found and fixed the usages in the following files: arch/ia64/kernel/acpi-ext.c arch/ia64/pci/pci.c arch/x86/pci/acpi.c arch/x86/pci/mmconfig-shared.c drivers/xen/xen-acpi-memhotplug.c drivers/acpi/acpi_memhotplug.c drivers/acpi/pci_root.c drivers/acpi/resource.c drivers/char/hpet.c drivers/pnp/pnpacpi/rsparser.c drivers/hv/vmbus_drv.c Build tests are passed with defconfig/allnoconfig/allyesconfig and defconfig+CONFIG_ACPI=n. Original-by: Thomas Gleixner <tglx@linutronix.de> Original-by: Jiang Liu <jiang.liu@linux.intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/acpi_memhotplug.c')
-rw-r--r--drivers/acpi/acpi_memhotplug.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/acpi/acpi_memhotplug.c b/drivers/acpi/acpi_memhotplug.c
index 23e2319ead41..ee28f4d15625 100644
--- a/drivers/acpi/acpi_memhotplug.c
+++ b/drivers/acpi/acpi_memhotplug.c
@@ -101,8 +101,8 @@ acpi_memory_get_resource(struct acpi_resource *resource, void *context)
101 /* Can we combine the resource range information? */ 101 /* Can we combine the resource range information? */
102 if ((info->caching == address64.info.mem.caching) && 102 if ((info->caching == address64.info.mem.caching) &&
103 (info->write_protect == address64.info.mem.write_protect) && 103 (info->write_protect == address64.info.mem.write_protect) &&
104 (info->start_addr + info->length == address64.minimum)) { 104 (info->start_addr + info->length == address64.address.minimum)) {
105 info->length += address64.address_length; 105 info->length += address64.address.address_length;
106 return AE_OK; 106 return AE_OK;
107 } 107 }
108 } 108 }
@@ -114,8 +114,8 @@ acpi_memory_get_resource(struct acpi_resource *resource, void *context)
114 INIT_LIST_HEAD(&new->list); 114 INIT_LIST_HEAD(&new->list);
115 new->caching = address64.info.mem.caching; 115 new->caching = address64.info.mem.caching;
116 new->write_protect = address64.info.mem.write_protect; 116 new->write_protect = address64.info.mem.write_protect;
117 new->start_addr = address64.minimum; 117 new->start_addr = address64.address.minimum;
118 new->length = address64.address_length; 118 new->length = address64.address.address_length;
119 list_add_tail(&new->list, &mem_device->res_list); 119 list_add_tail(&new->list, &mem_device->res_list);
120 120
121 return AE_OK; 121 return AE_OK;