mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
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 <[email protected]> Original-by: Jiang Liu <[email protected]> Signed-off-by: Lv Zheng <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
This commit is contained in:
parent
e044d8f92f
commit
a45de93eb1
15 changed files with 125 additions and 115 deletions
|
|
@ -410,12 +410,12 @@ static __init void pnpacpi_parse_address_option(struct pnp_dev *dev,
|
|||
if (p->resource_type == ACPI_MEMORY_RANGE) {
|
||||
if (p->info.mem.write_protect == ACPI_READ_WRITE_MEMORY)
|
||||
flags = IORESOURCE_MEM_WRITEABLE;
|
||||
pnp_register_mem_resource(dev, option_flags, p->minimum,
|
||||
p->minimum, 0, p->address_length,
|
||||
pnp_register_mem_resource(dev, option_flags, p->address.minimum,
|
||||
p->address.minimum, 0, p->address.address_length,
|
||||
flags);
|
||||
} else if (p->resource_type == ACPI_IO_RANGE)
|
||||
pnp_register_port_resource(dev, option_flags, p->minimum,
|
||||
p->minimum, 0, p->address_length,
|
||||
pnp_register_port_resource(dev, option_flags, p->address.minimum,
|
||||
p->address.minimum, 0, p->address.address_length,
|
||||
IORESOURCE_IO_FIXED);
|
||||
}
|
||||
|
||||
|
|
@ -429,12 +429,12 @@ static __init void pnpacpi_parse_ext_address_option(struct pnp_dev *dev,
|
|||
if (p->resource_type == ACPI_MEMORY_RANGE) {
|
||||
if (p->info.mem.write_protect == ACPI_READ_WRITE_MEMORY)
|
||||
flags = IORESOURCE_MEM_WRITEABLE;
|
||||
pnp_register_mem_resource(dev, option_flags, p->minimum,
|
||||
p->minimum, 0, p->address_length,
|
||||
pnp_register_mem_resource(dev, option_flags, p->address.minimum,
|
||||
p->address.minimum, 0, p->address.address_length,
|
||||
flags);
|
||||
} else if (p->resource_type == ACPI_IO_RANGE)
|
||||
pnp_register_port_resource(dev, option_flags, p->minimum,
|
||||
p->minimum, 0, p->address_length,
|
||||
pnp_register_port_resource(dev, option_flags, p->address.minimum,
|
||||
p->address.minimum, 0, p->address.address_length,
|
||||
IORESOURCE_IO_FIXED);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue