This patch series introduce support for _CCA object, which is currently
used mainly by ARM64 platform to specify DMA coherency attribute for
devices when booting with ACPI.
A copy of ACPIv6 can be found here:
http://www.uefi.org/sites/default/files/resources/ACPI_6.0.pdf
This patch also introduces 2 new APIS:
1. acpi_dma_is_coherent() as part of ACPI API.
2. device_dma_is_coherent() as part of unified device property API.
This simplifies the logic in device drivers to determine device coherency
attribute regardless of booting with DT vs ACPI.
This has been tested on AMD-Seattle platform, which implements _CCA
object as described in the AMD Opteron A1100 Series Processor ACPI Porting Guide:
http://amd-dev.wpengine.netdna-cdn.com/wordpress/media/2012/10/Seattle_ACPI…
Changes from V1 (https://lkml.org/lkml/2015/4/29/290):
* Remove supports for 32-bit ARM since doesn't currently
supporting ACPI (Per Catalin suggestions.)
* Do not call arch_setup_dma_ops() and when _CCA is missing.
(per Arnd suggestion)
* Add CONFIG_ACPI_SUPPORT_CCA_ZERO kernel config flag to
allow architectures to specify the behavior when _CCA=0.
* Add dummy_dma_ops for ARM64 (per Catalin suggestions).
* Fixed build error when ACPI is not configured by defining
acpi_dma_is_coherent() for when CONFIG_ACPI is not set.
* Introduce device_dma_is_coherent().
* Use device_dma_is_coherent in crypto/ccp and amd-xgbe driver.
Changes from RFC: (https://lkml.org/lkml/2015/4/1/389)
* New logic for deriving and propagating coherent attribute from
parent devices. (by Mark)
* Introducing acpi_dma_is_coherent() API (Per Tom suggestion)
* Introducing CONFIG_ACPI_MUST_HAVE_CCA kernel configuration.
* Rebased to linux-4.1-rc1
Suravee Suthikulpanit (5):
ACPI / scan: Parse _CCA and setup device coherency
arm64 : Introduce support for ACPI _CCA object
device property: Introduces device_dma_is_coherent()
crypto: ccp - Unify coherency checking logic with
device_dma_is_coherent()
amd-xgbe: Unify coherency checking logic with device_dma_is_coherent()
arch/arm64/Kconfig | 2 +
arch/arm64/include/asm/dma-mapping.h | 18 +++++-
arch/arm64/mm/dma-mapping.c | 104 ++++++++++++++++++++++++++++++
drivers/acpi/Kconfig | 6 ++
drivers/acpi/acpi_platform.c | 4 +-
drivers/acpi/scan.c | 62 ++++++++++++++++++
drivers/base/property.c | 12 ++++
drivers/crypto/ccp/ccp-platform.c | 60 +----------------
drivers/net/ethernet/amd/xgbe/xgbe-main.c | 27 +-------
include/acpi/acpi_bus.h | 11 +++-
include/linux/acpi.h | 5 ++
include/linux/property.h | 2 +
12 files changed, 224 insertions(+), 89 deletions(-)
--
2.1.0
This patch set introduce self-probe infrastructure to init IRQ
controllers and stacked irqdomain support for ACPI based GICv2/3
init.
The self-probe infrastructure for ACPI GIC init is similar as
IRQCHIP_DECLARE() and based on the GIC version support in ACPI
MADT table.
We introduce acpi_irq_domain for GICv2/3 core domain to support
stacked irqdomain, and pass the gsi (global system interrupt) as
the agument (void *arg) for gic_irq_domain_alloc(), then we can
alloc virqs via acpi_register_gsi() with stacked irqdomain.
I already compiled this patch set ok with both ACPI=on/off on
ARM64 and also compiled ok on x86, tested with GICv2 init on
FVP model and it boot successfully.
Next step I would consolidate all the ACPI GIC init into one
file -- drivers/irqchip/irq-gic-acpi.c, and introduce ITS and
IORT support.
please comment on this patchset to see if we are on the right
direction.
Hanjun Guo (6):
irqchip / gic: Add GIC version support in ACPI MADT
irqchip: gic: ACPI: Use IRQCHIP_ACPI_DECLARE to simplify GICv2 init
code
irqchip / gic: Add stacked irqdomain support for ACPI based GICv2 init
ACPI / gsi: Add gsi_mutex to synchronize
acpi_register_gsi()/acpi_unregister_gsi()
irqchip / GICv3: Add ACPI support for GICv3+ initialization
irqchip / GICv3: Add stacked irqdomain support for ACPI based init
Tomasz Nowicki (3):
ACPICA: Introduce GIC version for arm based system
ACPI / irqchip: Add self-probe infrastructure to initialize IRQ
controller
irqchip / GICv3: Refactor gic_of_init() for GICv3 driver
arch/arm64/Kconfig | 1 +
arch/arm64/include/asm/irq.h | 13 --
arch/arm64/kernel/acpi.c | 25 ----
drivers/acpi/Makefile | 1 +
drivers/acpi/gsi.c | 39 ++---
drivers/acpi/irq.c | 40 ++++++
drivers/irqchip/Kconfig | 3 +
drivers/irqchip/Makefile | 1 +
drivers/irqchip/irq-gic-acpi.c | 116 +++++++++++++++
drivers/irqchip/irq-gic-v3.c | 267 ++++++++++++++++++++++++++++-------
drivers/irqchip/irq-gic.c | 38 ++---
drivers/irqchip/irqchip.h | 12 ++
include/acpi/actbl1.h | 17 ++-
include/asm-generic/vmlinux.lds.h | 13 ++
include/linux/acpi.h | 14 ++
include/linux/acpi_irq.h | 4 +-
include/linux/irqchip/arm-gic-acpi.h | 12 +-
include/linux/mod_devicetable.h | 7 +
18 files changed, 489 insertions(+), 134 deletions(-)
create mode 100644 drivers/acpi/irq.c
create mode 100644 drivers/irqchip/irq-gic-acpi.c
--
1.9.1
This patch set are some minor cleanups for ACPI processor driver
to address the comments which raised by Rafael in ARM64 ACPI core
patches, so this patch set is on top of ARM64 ACPI core patches
the git tree is
git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git
branch for-next/acpi.
Rafael, I assume this patchset will be taken with your tree if
it makes sense, any rebase work needed please let me know.
the last patch - ACPI / processor: Introduce invalid_phys_cpuid()
will cut u64 mpidr to int, but I think it is ok for error values,
correct me if I'm wrong.
Comments are welcomed.
Hanjun Guo (7):
ACPI / processor: remove cpu_index in acpi_processor_get_info()
ACPI / processor: remove phys_id in acpi_processor_get_info()
ACPI / processor: Introduce invalid_logical_cpuid()
Xen / ACPI / processor: use invalid_logical_cpuid()
Xen / ACPI / processor: Remove unneeded NULL check in
xen_acpi_processor_enable()
ACPI / processor: return specific error instead of -1
ACPI / processor: Introduce invalid_phys_cpuid()
drivers/acpi/acpi_processor.c | 20 +++++++++-----------
drivers/acpi/processor_core.c | 10 +++++-----
drivers/acpi/processor_pdc.c | 5 +----
drivers/xen/xen-acpi-cpuhotplug.c | 12 +++---------
include/linux/acpi.h | 10 ++++++++++
5 files changed, 28 insertions(+), 29 deletions(-)
--
1.9.1
From: Fu Wei <fu.wei(a)linaro.org>
This driver is designed for ARM AArch64 HW originally.
Now It's tested on Foundation model with Linux watchdog deamon.
It support two stages watch period, and will trigger a SPI after first timeout.
Fu Wei (1):
Watchdog: add SBSA watchdog driver
(1)use linux kernel watchdog framework
(2)support getting info from ACPI GTDT table
drivers/watchdog/Kconfig | 10 +
drivers/watchdog/Makefile | 1 +
drivers/watchdog/sbsa_gwdt.c | 805 +++++++++++++++++++++++++++++++++++++++++++
include/linux/sbsa_gwdt.h | 134 +++++++
4 files changed, 950 insertions(+)
create mode 100644 drivers/watchdog/sbsa_gwdt.c
create mode 100644 include/linux/sbsa_gwdt.h
--
1.9.1
On 04/30/2015 10:30 PM, Guenter Roeck wrote:
>> +/* Watchdog Refresh Frame */
>> +struct arm_sbsa_watchdog_refresh {
>> + uint32_t wrr; /* Watchdog Refresh Register */
>> + uint8_t res1[0xFCC - 0x004];
>> + struct arm_sbsa_watchdog_ident ident;
>> +};
>> +
>> +/* Watchdog Control Frame */
>> +struct arm_sbsa_watchdog_control {
>> + uint32_t wcs;
>> + uint32_t res1;
>> + uint32_t wor;
>> + uint32_t res2;
>> + uint64_t wcv;
>> + uint8_t res3[0xFCC - 0x018];
>> + struct arm_sbsa_watchdog_ident ident;
>> +};
>> +
>
> Why not just use defines instead of all those structures ?
I like structures. I think hardware register blocks should be defined
with structures that provide type checking.
>> +static int arm_sbsa_wdt_set_timeout(struct watchdog_device *wdev,
>> + unsigned int timeout)
>> +{
>> + struct arm_sbsa_watchdog_data *data =
>> + container_of(wdev, struct arm_sbsa_watchdog_data, wdev);
>> +
>> + wdev->timeout = timeout;
>> + writel(arch_timer_get_rate() * wdev->timeout, &data->control->wor);
>
> Do you also have to reset the counter ?
No. Programming a new timeout automatically resets the timer.
>> +static int __init arm_sbsa_wdt_probe(struct platform_device *pdev)
>> +{
>> + struct arm_sbsa_watchdog_data *data;
>> + struct resource *res;
>> + uint32_t iidr;
>> + int ret;
>> +
>> + data = devm_kzalloc(&pdev->dev, sizeof(*data), GFP_KERNEL);
>> + if (!data)
>> + return -ENOMEM;
>> +
>> + res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>> + if (!res || !res->start) {
>> + dev_err(&pdev->dev, "could not get control address\n");
>> + return -ENOMEM;
>> + }
>> +
> devm_ioremap_resource already prints an error message if res is NULL.
> And res->start can not be 0 unless there is a severe infrastructure
> problem.
Will fix.
>> + data->control = devm_ioremap_resource(&pdev->dev, res);
>> + if (!data->control)
>> + return -ENOMEM;
>> +
>> + res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
>> + if (!res || !res->start) {
>> + dev_err(&pdev->dev, "could not get refresh address\n");
>> + return -ENOMEM;
>> + }
> Same here.
>
>> + data->refresh = devm_ioremap_resource(&pdev->dev, res);
>> + if (!data->refresh)
>> + return -ENOMEM;
>> +
>> + res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
>> + if (!res || !res->start) {
>
> res->start checking is unnecessary. On a side note, irq == 0 might be a
> valid
> interrupt number.
Will fix.
>
>> + dev_err(&pdev->dev, "could not get interrupt\n");
>> + return -ENOMEM;
>> + }
>> +
>> + iidr = readl(&data->control->ident.w_iidr);
>> +
>> + /* We only support architecture version 0 */
>> + if (((iidr >> 16) & 0xf) != 0) {
>> + dev_info(&pdev->dev, "only architecture version 0 is
>> supported\n");
>> + return -ENODEV;
>> + }
>> +
>> + ret = devm_request_irq(&pdev->dev, res->start,
>> arm_sbsa_wdt_interrupt,
>> + 0, DRV_NAME, NULL);
>
> Please align continuation lines with '('.
Will fix.
>> + if (ret < 0) {
>> + dev_err(&pdev->dev, "could not request irq %u (ret=%i)\n",
>> + (unsigned int)res->start, ret);
>> + return ret;
>> + }
>> +
>> + data->wdev.info = &arm_sbsa_wdt_info;
>> + data->wdev.ops = &arm_sbsa_wdt_ops;
>> + data->wdev.min_timeout = 1;
>> + data->wdev.status = WATCHDOG_NOWAYOUT_INIT_STATUS;
>> +
>> + /* Calculate the maximum timeout in seconds that we can support */
>> + data->wdev.max_timeout = U32_MAX / arch_timer_get_rate();
>> +
>> + ret = watchdog_register_device(&data->wdev);
>> + if (ret < 0) {
>> + dev_err(&pdev->dev,
>> + "could not register watchdog device (ret=%i)\n", ret);
>> + return ret;
>> + }
>> +
>> + dev_info(&pdev->dev, "implementer code is %03x, max timeout is %u
>> seconds\n",
>> + (iidr & 0xf00) >> 1 | (iidr & 0x7f), data->wdev.max_timeout);
>
> "Implementer code" sounds very much like a debug message to me.
> It means nothing to me, and it won't mean anything to a user.
Fair enough. I thought it would be a handy way to know that the driver
found the hardware, but I'll move it to a pr_debug().
>> +
>> + /*
>> + * Bits [15:12] are an implementation-defined revision number
>> + * for the component.
>> + */
>> + arm_sbsa_wdt_info.firmware_version = (iidr >> 12) & 0xf;
>> +
> It might make sense to set that prior to registering the driver.
Ok.
>> +static struct platform_device *arm_sbsa_wdt_pdev;
>> +
>> +static int __init arm_sbsa_wdt_parse_gtdt(struct acpi_subtable_header
>> *header,
>> + const unsigned long end)
>> +{
>> + struct acpi_gtdt_watchdog *wdg = (struct acpi_gtdt_watchdog
>> *)header;
>> + struct platform_device *arm_sbsa_wdt_pdev;
>
> That is an interesting one. Makes me wonder if you ever tried to unload
> this driver.
> Did you ?
The driver can only be compiled in-kernel.
>> + struct resource res[3] = {};
>> + int trigger, polarity;
>> + int ret;
>> +
>> + if (!header ||
>
> That error check is kind of weird. Sure, 0 is an invalid address, but so
> are many other
> addresses. Is there any reason to believe that acpi_get_table_with_size
> would return
> a NULL pointer (but not some other invalid address) ?
If the table is uninitialized, then all the values are probably zero. I
was trying to come up with something. These are the only tests I could
come up with I know work.
>> + (unsigned long)header + sizeof(*wdg) > end ||
>> + header->length < sizeof(*wdg)) {
>
> So I really wonder how this is supposed to work.
>
> struct acpi_subtable_header {
> u8 type;
> u8 length;
> };
>
> struct acpi_gtdt_watchdog {
> struct acpi_gtdt_header header;
> ...
>
> struct acpi_gtdt_header {
> u8 type;
> u16 length;
> };
>
> Either the length is 16 bit or 8 bit. But both ???
> Or is it just luck and the value happens to be stored as little endian
> value and the length is less than 256 bytes ?
>
> I understand this seems to be copied from BAD_MADT_ENTRY or similar code,
> but it is still odd.
It's the best I could come up with. Sure it seems weird, but it works,
and since it's copied from BAD_MADT_ENTRY, I figured it was acceptable.
>
>> + pr_err("malformed subtable entry\n");
>> + return -EINVAL;
>> + }
>> +
>> + if (!wdg->control_frame_address || !wdg->refresh_frame_address) {
>> + pr_err("invalid control or refresh address\n");
>> + return -ENXIO;
>> + }
>> +
>> + arm_sbsa_wdt_pdev = platform_device_alloc(DRV_NAME, 0);
>> + if (!arm_sbsa_wdt_pdev)
>> + return -ENOMEM;
>> +
>> + res[0].name = "control";
>> + res[0].flags = IORESOURCE_MEM;
>> + res[0].start = wdg->control_frame_address;
>> + res[0].end = res[0].start + sizeof(struct
>> arm_sbsa_watchdog_control);
>
> Really ? Or should there be a -1 somewhere ?
You're right.
>> +
>> + res[1].name = "refresh";
>> + res[1].flags = IORESOURCE_MEM;
>> + res[1].start = wdg->refresh_frame_address;
>> + res[1].end = res[1].start + sizeof(struct
>> arm_sbsa_watchdog_refresh);
>
> Same here.
Ok.
>> + trigger = (wdg->timer_flags & ACPI_GTDT_WATCHDOG_IRQ_MODE) ?
>> + ACPI_EDGE_SENSITIVE : ACPI_LEVEL_SENSITIVE;
>> +
>> + polarity = (wdg->timer_flags & ACPI_GTDT_WATCHDOG_IRQ_POLARITY) ?
>> + ACPI_ACTIVE_LOW : ACPI_ACTIVE_HIGH;
>> +
>> + /* This should be the WS0 interrupt */
>> + ret = acpi_register_gsi(&arm_sbsa_wdt_pdev->dev,
>> wdg->timer_interrupt,
>> + trigger, polarity);
>> + if (ret <= 0) {
>
> 0 is not an error (the interrupt number could be 0).
Ok.
>> +static int __init arm_sbsa_wdt_init(void)
>> +{
>> + struct acpi_table_header *table;
>> + acpi_size tbl_size;
>> + acpi_status status;
>> + int count;
>> +
>> + pr_info("ARM Server Base System Architecture watchdog driver\n");
>> +
> This seems to assume that the watchdog is always supported, which is
> quite unlikely.
I'll make it a pr_debug.
>> + status = acpi_get_table_with_size(ACPI_SIG_GTDT, 0, &table,
>> &tbl_size);
>> + if (ACPI_FAILURE(status)) {
>> + pr_err("cannot locate GTDT table\n");
>> + return -EINVAL;
>> + }
>
> I am kind of completely unhappy with the noisiness here and below.
> Is this how acpi detection is supposed to happen ?
> And is it really an _error_ if the device isn't there,
> or does it just mean that the device isn't there ?
I think the GTDT is required. Most likely, the kernel will fail to boot
long before we get to this point if the GTDT is missing or corrupt.
However, I'm not an ACPI expert by any means. I'm hoping that someone
who knows a lot more than I do will review it. This driver was reviewed
and approved by some of our internal ACPI experts, so I presume that it
is correct.
>> + count = acpi_parse_entries(ACPI_SIG_GTDT, sizeof(struct
>> acpi_table_gtdt),
>> + arm_sbsa_wdt_parse_gtdt, table, ACPI_GTDT_TYPE_WATCHDOG, 0);
>> + if (count <= 0) {
>> + pr_err("no watchdog subtables found\n");
>> + return -EINVAL;
>> + }
>> +
>> + return platform_driver_probe(&arm_sbsa_wdt_driver,
>> arm_sbsa_wdt_probe);
>
> Another oddity. Is this how acpi device instantiation is supposed to
> happen ?
>
> I thought there are functions to register acpi drivers, such as
> acpi_bus_register_driver().
> Why doesn't this work here ?
I can't use acpi_bus_register_driver() because there are no ACPI IDs to
probe on. Watchdog information is stored as a subtable of the GTDT
table, and there's nothing in the ACPI layer that automatically creates
platforms from subtables. I have to create the platform from scratch,
which is why the code looks so messy.
--
Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the
Code Aurora Forum, a Linux Foundation Collaborative Project.
This patch series introduce ACPI support for AHCI platform driver.
Existing ACPI support for AHCI assumes the device controller is a PCI device.
Since there is no ACPI _CID for generic AHCI controller, the driver
could not use it for matching devices. Therefore, this patch introduces
a mechanism for drivers to match devices using ACPI _CLS method.
_CLS contains PCI-defined class-code.
This patch series also modifies ACPI modalias to add class-code to the
exisiting format, which currently only uses _HID and _CIDs. This is required
to support loadable modules w/ _CLS.
This is rebased from and tested with linux-4.1-rc1
This topic was discussed earlier here (as part of introducing support for
AMD Seattle SATA controller):
http://marc.info/?l=linux-arm-kernel&m=141083492521584&w=2
Changes from V8 (https://lkml.org/lkml/2015/3/30/729)
* Rebased to 4.1-rc1
* [1/3] Misc changes for ACPICA:
- Re-organized certain parts from patch 2 since it should
have been part of the ACPICA.
- Modified logic for copying class code string (Lv)
- Add changes and signed-off-by Lv Zheng
* [2/3] Rebased due to added PRP001 matching code
Changes from V7 (https://lkml.org/lkml/2015/3/26/592)
* [1/3] Return AE_AML_OPERAND_TYPE when _CLS package containing
invalid type (per Robert Moore suggestion).
* [2/3] Fixed build error due missing ACPI_DEVICE_CLASS definition
when disabling ACPI.
Changes from V6 (https://lkml.org/lkml/2015/3/25/797)
* Adding Acked-by Mika, and Reviewed-by Hanjun
* Minor clen up to use lower case 0xffffff for cls_msk
(per Mika suggestions).
* Modify the ACPI_DEVICE_CLASS macro to use designated initializer
(per Mika suggestions).
Changes from V5 (https://lkml.org/lkml/2015/3/6/24)
* Rebased and tested with acpi-5.1-v11
* Splitting up the ACPICA changes into a separate patch [1/3].
(per Mika suggestion)
* Adding class-code mask support (per Mika suggestion)
* Use macro to define struct acpi_device_id entry (per Mika suggestion)
* Note: Mika also recommend reordering the member of struct acpi_device_id
and define a macro to be used for declaring each table entry. This is a
large amount of changes, and will be done separtely from this patch series.
Changes from V4 (https://lkml.org/lkml/2015/3/2/56)
* [1/2] Bug fixed: Reorder the declaration of
struct acpi_pnp_device_id cls in the struct acpi_device_info
(include/acpi/actypes.h) since compatible_id_list must be last one.
* [2/2] Added Acked-by: Tejun Heo <tj(a)kernel.org>
Changes from V3 (https://lkml.org/lkml/2015/2/8/106)
* Instead of introducing new structure acpi_device_cls, add cls into
the acpi_device_id, and modify the __acpi_match_device
to also match for cls. (per Mika suggestion.)
* Add loadable module support, which requires changes in ACPI
modalias. (per Mika suggestion.)
* Rebased and tested with acpi-5.1-v9
Changes from V2 (https://lkml.org/lkml/2015/1/5/662)
* Update with review comment from Rafael in patch 1/2
* Rebased and tested with acpi-5.1-v8
Changes from V1 (https://lkml.org/lkml/2014/12/19/345)
* Rebased to 3.19.0-rc2
* Change from acpi_cls in device_driver to acpi_match_cls (Hanjun comment)
* Change the matching logic in acpi_driver_match_device() due to the new
special PRP0001 _HID.
* Simplify the return type of acpi_match_device_cls() to boolean.
Changes from RFC (https://lkml.org/lkml/2014/12/17/446)
* Remove #ifdef and make non-ACPI version of the acpi_match_device_cls
as inline. (per Arnd)
* Simplify logic to retrieve and evaluate _CLS handle. (per Hanjun)
Suravee Suthikulpanit (3):
ACPICA: Utilities: Add _CLS processing
ACPI / scan: Add support for ACPI _CLS device matching
ata: ahci_platform: Add ACPI _CLS matching
drivers/acpi/acpica/acinterp.h | 2 +
drivers/acpi/acpica/acutils.h | 4 ++
drivers/acpi/acpica/exutils.c | 32 ++++++++++++++
drivers/acpi/acpica/nsxfname.c | 23 ++++++++--
drivers/acpi/acpica/utids.c | 91 ++++++++++++++++++++++++++++++++++++++-
drivers/acpi/scan.c | 32 +++++++++++++-
drivers/ata/Kconfig | 2 +-
drivers/ata/ahci_platform.c | 9 ++++
include/acpi/acnames.h | 1 +
include/acpi/actypes.h | 24 +++++++----
include/linux/acpi.h | 14 ++++++
include/linux/mod_devicetable.h | 2 +
scripts/mod/devicetable-offsets.c | 2 +
scripts/mod/file2alias.c | 32 +++++++++++++-
14 files changed, 252 insertions(+), 18 deletions(-)
--
2.1.0
This patch series introduce ACPI support for AHCI platform driver.
Existing ACPI support for AHCI assumes the device controller is a PCI device.
Since there is no ACPI _CID for generic AHCI controller, the driver
could not use it for matching devices. Therefore, this patch introduces
a mechanism for drivers to match devices using ACPI _CLS method.
_CLS contains PCI-defined class-code.
This patch series also modifies ACPI modalias to add class-code to the
exisiting format, which currently only uses _HID and _CIDs. This is required
to support loadable modules w/ _CLS.
This is rebased from and tested with:
http://git.linaro.org/leg/acpi/acpi.git acpi-5.1-v11
This topic was discussed earlier here (as part of introducing support for
AMD Seattle SATA controller):
http://marc.info/?l=linux-arm-kernel&m=141083492521584&w=2
Changes from V7 (https://lkml.org/lkml/2015/3/26/592)
* [1/3] Return AE_AML_OPERAND_TYPE when _CLS package containing
invalid type (per Robert Moore suggestion).
* [2/3] Fixed build error due missing ACPI_DEVICE_CLASS definition
when disabling ACPI.
Changes from V6 (https://lkml.org/lkml/2015/3/25/797)
* Adding Acked-by Mika, and Reviewed-by Hanjun
* Minor clen up to use lower case 0xffffff for cls_msk
(per Mika suggestions).
* Modify the ACPI_DEVICE_CLASS macro to use designated initializer
(per Mika suggestions).
Changes from V5 (https://lkml.org/lkml/2015/3/6/24)
* Rebased and tested with acpi-5.1-v11
* Splitting up the ACPICA changes into a separate patch [1/3].
(per Mika suggestion)
* Adding class-code mask support (per Mika suggestion)
* Use macro to define struct acpi_device_id entry (per Mika suggestion)
* Note: Mika also recommend reordering the member of struct acpi_device_id
and define a macro to be used for declaring each table entry. This is a
large amount of changes, and will be done separtely from this patch series.
Changes from V4 (https://lkml.org/lkml/2015/3/2/56)
* [1/2] Bug fixed: Reorder the declaration of
struct acpi_pnp_device_id cls in the struct acpi_device_info
(include/acpi/actypes.h) since compatible_id_list must be last one.
* [2/2] Added Acked-by: Tejun Heo <tj(a)kernel.org>
Changes from V3 (https://lkml.org/lkml/2015/2/8/106)
* Instead of introducing new structure acpi_device_cls, add cls into
the acpi_device_id, and modify the __acpi_match_device
to also match for cls. (per Mika suggestion.)
* Add loadable module support, which requires changes in ACPI
modalias. (per Mika suggestion.)
* Rebased and tested with acpi-5.1-v9
Changes from V2 (https://lkml.org/lkml/2015/1/5/662)
* Update with review comment from Rafael in patch 1/2
* Rebased and tested with acpi-5.1-v8
Changes from V1 (https://lkml.org/lkml/2014/12/19/345)
* Rebased to 3.19.0-rc2
* Change from acpi_cls in device_driver to acpi_match_cls (Hanjun comment)
* Change the matching logic in acpi_driver_match_device() due to the new
special PRP0001 _HID.
* Simplify the return type of acpi_match_device_cls() to boolean.
Changes from RFC (https://lkml.org/lkml/2014/12/17/446)
* Remove #ifdef and make non-ACPI version of the acpi_match_device_cls
as inline. (per Arnd)
* Simplify logic to retrieve and evaluate _CLS handle. (per Hanjun)
Suravee Suthikulpanit (3):
ACPICA: Add ACPI _CLS processing
ACPI / scan: Add support for ACPI _CLS device matching
ata: ahci_platform: Add ACPI _CLS matching
drivers/acpi/acpica/acutils.h | 3 ++
drivers/acpi/acpica/nsxfname.c | 21 +++++++++--
drivers/acpi/acpica/utids.c | 73 +++++++++++++++++++++++++++++++++++++++
drivers/acpi/scan.c | 36 ++++++++++++++++---
drivers/ata/Kconfig | 2 +-
drivers/ata/ahci_platform.c | 9 +++++
include/acpi/acnames.h | 1 +
include/acpi/actypes.h | 4 ++-
include/linux/acpi.h | 14 ++++++++
include/linux/mod_devicetable.h | 2 ++
scripts/mod/devicetable-offsets.c | 2 ++
scripts/mod/file2alias.c | 32 +++++++++++++++--
12 files changed, 189 insertions(+), 10 deletions(-)
--
2.1.0