aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64
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 /arch/ia64
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 'arch/ia64')
-rw-r--r--arch/ia64/kernel/acpi-ext.c6
-rw-r--r--arch/ia64/pci/pci.c14
2 files changed, 10 insertions, 10 deletions
diff --git a/arch/ia64/kernel/acpi-ext.c b/arch/ia64/kernel/acpi-ext.c
index 8b9318d311a0..bd09bf74f187 100644
--- a/arch/ia64/kernel/acpi-ext.c
+++ b/arch/ia64/kernel/acpi-ext.c
@@ -69,10 +69,10 @@ static acpi_status find_csr_space(struct acpi_resource *resource, void *data)
69 status = acpi_resource_to_address64(resource, &addr); 69 status = acpi_resource_to_address64(resource, &addr);
70 if (ACPI_SUCCESS(status) && 70 if (ACPI_SUCCESS(status) &&
71 addr.resource_type == ACPI_MEMORY_RANGE && 71 addr.resource_type == ACPI_MEMORY_RANGE &&
72 addr.address_length && 72 addr.address.address_length &&
73 addr.producer_consumer == ACPI_CONSUMER) { 73 addr.producer_consumer == ACPI_CONSUMER) {
74 space->base = addr.minimum; 74 space->base = addr.address.minimum;
75 space->length = addr.address_length; 75 space->length = addr.address.address_length;
76 return AE_CTRL_TERMINATE; 76 return AE_CTRL_TERMINATE;
77 } 77 }
78 return AE_OK; /* keep looking */ 78 return AE_OK; /* keep looking */
diff --git a/arch/ia64/pci/pci.c b/arch/ia64/pci/pci.c
index 291a582777cf..46920aaa7e9e 100644
--- a/arch/ia64/pci/pci.c
+++ b/arch/ia64/pci/pci.c
@@ -188,12 +188,12 @@ static u64 add_io_space(struct pci_root_info *info,
188 188
189 name = (char *)(iospace + 1); 189 name = (char *)(iospace + 1);
190 190
191 min = addr->minimum; 191 min = addr->address.minimum;
192 max = min + addr->address_length - 1; 192 max = min + addr->address.address_length - 1;
193 if (addr->info.io.translation_type == ACPI_SPARSE_TRANSLATION) 193 if (addr->info.io.translation_type == ACPI_SPARSE_TRANSLATION)
194 sparse = 1; 194 sparse = 1;
195 195
196 space_nr = new_space(addr->translation_offset, sparse); 196 space_nr = new_space(addr->address.translation_offset, sparse);
197 if (space_nr == ~0) 197 if (space_nr == ~0)
198 goto free_resource; 198 goto free_resource;
199 199
@@ -247,7 +247,7 @@ static acpi_status resource_to_window(struct acpi_resource *resource,
247 if (ACPI_SUCCESS(status) && 247 if (ACPI_SUCCESS(status) &&
248 (addr->resource_type == ACPI_MEMORY_RANGE || 248 (addr->resource_type == ACPI_MEMORY_RANGE ||
249 addr->resource_type == ACPI_IO_RANGE) && 249 addr->resource_type == ACPI_IO_RANGE) &&
250 addr->address_length && 250 addr->address.address_length &&
251 addr->producer_consumer == ACPI_PRODUCER) 251 addr->producer_consumer == ACPI_PRODUCER)
252 return AE_OK; 252 return AE_OK;
253 253
@@ -284,7 +284,7 @@ static acpi_status add_window(struct acpi_resource *res, void *data)
284 if (addr.resource_type == ACPI_MEMORY_RANGE) { 284 if (addr.resource_type == ACPI_MEMORY_RANGE) {
285 flags = IORESOURCE_MEM; 285 flags = IORESOURCE_MEM;
286 root = &iomem_resource; 286 root = &iomem_resource;
287 offset = addr.translation_offset; 287 offset = addr.address.translation_offset;
288 } else if (addr.resource_type == ACPI_IO_RANGE) { 288 } else if (addr.resource_type == ACPI_IO_RANGE) {
289 flags = IORESOURCE_IO; 289 flags = IORESOURCE_IO;
290 root = &ioport_resource; 290 root = &ioport_resource;
@@ -297,8 +297,8 @@ static acpi_status add_window(struct acpi_resource *res, void *data)
297 resource = &info->res[info->res_num]; 297 resource = &info->res[info->res_num];
298 resource->name = info->name; 298 resource->name = info->name;
299 resource->flags = flags; 299 resource->flags = flags;
300 resource->start = addr.minimum + offset; 300 resource->start = addr.address.minimum + offset;
301 resource->end = resource->start + addr.address_length - 1; 301 resource->end = resource->start + addr.address.address_length - 1;
302 info->res_offset[info->res_num] = offset; 302 info->res_offset[info->res_num] = offset;
303 303
304 if (insert_resource(root, resource)) { 304 if (insert_resource(root, resource)) {