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 V2 (https://lkml.org/lkml/2015/5/5/510):
* Reword ACPI_MUST_HAVE_CCA to ACPI_CCA_REQUIRED (per Rafael)
* Reword ACPI_SUPPORT_CCA_ZERO to ARCH64_SUPPORT_ACPI_CCA_ZERO
(per Rafael and Arnd)
* Misc code styling clean up (per Rafael)
* Only print missing _CCA warning message in debug mode.
* Refactor logic in acpi_setup_device_dma() into
if acpi_dma_is_supported() then call arch_setup_dma_ops().
* Do not allocate device dma_mask if !acpi_dma_is_supported()
(per Arnd).
* Re-use the dummy functions with the same signature.
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 | 92 +++++++++++++++++++++++++++++++
drivers/acpi/Kconfig | 6 ++
drivers/acpi/acpi_platform.c | 10 +++-
drivers/acpi/scan.c | 42 ++++++++++++++
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 | 32 ++++++++++-
include/linux/acpi.h | 10 ++++
include/linux/property.h | 2 +
12 files changed, 222 insertions(+), 91 deletions(-)
--
2.1.0
CPPC:
====
CPPC (Collaborative Processor Performance Control) is a new way to control CPU
performance using an abstract continous scale as against a discretized P-state scale
which is tied to CPU frequency only. It is defined in the ACPI 5.0+ spec. In brief,
the basic operation involves:
- OS makes a CPU performance request. (Can provide min and max tolerable bounds)
- Platform (such as BMC) is free to optimize request within requested bounds depending
on power/thermal budgets etc.
- Platform conveys its decision back to OS
The communication between OS and platform occurs through another medium called (PCC)
Platform communication Channel. This is a generic mailbox like mechanism which includes
doorbell semantics to indicate register updates. See drivers/mailbox/pcc.c
This patchset introduces a CPPC based CPUFreq driver that works with existing governors
such as ondemand. The CPPC table parsing and the CPPC communication semantics are
abstracted into separate files to allow future CPPC based drivers to implement their
own governors if required.
Initial patchsets included an adaptation of the PID governor from intel_pstate.c. However
recent experiments led to extensive modifications of the algorithm to calculate CPU
busyness. Until it is verified that these changes are worthwhile, the existing governors
should provide for a good enough starting point for ARM64 servers.
Finer details about the PCC and CPPC spec are available in the latest ACPI 5.1
specification.[2]
Changes since V3:
- Split CPPC backend methods into separate files.
- Add frontend driver which plugs into existing CPUfreq governors.
- Simplify PCC driver by moving communication space mapping and read/write
into client drivers.
Changes since V2:
- Select driver if !X86, since intel_pstate will use HWP extensions instead.
- Added more comments.
- Added Freq domain awareness and PSD parsing.
Changes since V1:
- Create a new driver based on Dirks suggestion.
- Fold in CPPC backend hooks into main driver.
Changes since V0: [1]
- Split intel_pstate.c into a generic PID governor and platform specific backend.
- Add CPPC accessors as PID backend.
[1] - http://lwn.net/Articles/608715/
[2] - http://www.uefi.org/sites/default/files/resources/ACPI_5_1release.pdf
[3] - https://patches.linaro.org/40705/
Ashwin Chaugule (2):
Mailbox: Restructure and simplify PCC mailbox code
CPPC: Add CPUFreq driver based on CPPC methods
drivers/cpufreq/Kconfig.arm | 15 +
drivers/cpufreq/Makefile | 1 +
drivers/cpufreq/cppc_acpi.c | 801 +++++++++++++++++++++++++++++++++++++++++
drivers/cpufreq/cppc_acpi.h | 134 +++++++
drivers/cpufreq/cppc_cpufreq.c | 186 ++++++++++
drivers/mailbox/pcc.c | 122 ++-----
6 files changed, 1174 insertions(+), 85 deletions(-)
create mode 100644 drivers/cpufreq/cppc_acpi.c
create mode 100644 drivers/cpufreq/cppc_acpi.h
create mode 100644 drivers/cpufreq/cppc_cpufreq.c
--
1.9.1
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 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 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 (2):
arm/arm64: ACPI: Introduce CONFIG_ACPI_MUST_HAVE_CCA
ACPI / scan: Parse _CCA and setup device coherency
arch/arm/Kconfig | 1 +
arch/arm64/Kconfig | 1 +
drivers/acpi/Kconfig | 3 +++
drivers/acpi/acpi_platform.c | 5 ++++-
drivers/acpi/scan.c | 45 ++++++++++++++++++++++++++++++++++++++++++++
include/acpi/acpi_bus.h | 9 ++++++++-
6 files changed, 62 insertions(+), 2 deletions(-)
--
2.1.0
This patch set is some minor cleanups for ACPI processor driver
to address the comments which raised by Rafael in ARM64 ACPI core
patches.
Boris and Konrad already reviewed the XEN/ACPI part, they seems are
ok with the changes for XEN [1] [2].
Sudeep, I didn't change the (int)phys_id < 0 to phys_id == PHYS_CPUID_INVALID
as they have the same effects and Rafael prefer the previous one
as he mentioned in ACPI core patch set comments, and PHYS_CPUID_INVALID
is still needed for typedef phys_cpuid_t in ACPI core, so if you are
not ok with it, please let me know.
v3:
- Reorder the patches to let "Introduce invalid_logical_cpuid()"
as the first one to avoid raising confusions.
- Replace "return invalid_logical_cpuid(cpuid) ? false : true;"
as "return !invalid_logical_cpuid(cpuid);"
- Some updates to the patch subject and changelog
- Rebase on top of 4.1-rc3
v2:
- rebased on top of 4.1-rc2
[1]: https://lkml.org/lkml/2015/5/5/733
[2]: https://lkml.org/lkml/2015/5/9/222
Hanjun Guo (7):
ACPI / processor: Introduce invalid_logical_cpuid()
Xen / ACPI / processor: use invalid_logical_cpuid()
Xen / ACPI / processor: Remove unneeded NULL check
ACPI / processor: remove cpu_index in acpi_processor_get_info()
ACPI / processor: remove phys_id in acpi_processor_get_info()
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>
Changelog:
v2: enable modularize
support both ACPI and FDT
separate ACPI support code from driver to arch/arm64 acpi supprt
move a function to header file for reusing the code
simplify WS0 irq routine: using panic()
add example dts code for foundation-v8 and AMD seattle Soc
add sbsa-gwdt.txt documentation for FDT
Test on ARM Foundation v8 model with watchdog deamon
(ACPI/FDT, module/build-in)
v1: draft patch for RFC and review
Fu Wei (6):
Documentation: add sbsa-gwdt.txt documentation for introducing
SBSA(Server Base System Architecture) Generic Watchdog info in FDT.
ARM64: add SBSA Generic Watchdog device node into foundation-v8.dts
ARM64: add SBSA Generic Watchdog device node into
amd-seattle-soc.dtsi
Watchdog: introdouce ARM SBSA watchdog driver (1)use linux
kernel watchdog framework (2)work with FDT
(3)support pretimeout, for now in first timeout(WS0), do
panic to save system context.
ACPI: move map_generic_timer_interrupt function from
arm_arch_timer.c to <linux/acpi.h> for sharing this to more file.
ACPI: add importing SBSA Generic watchdog info of GTDT into
platform device for whole system.
.../devicetree/bindings/watchdog/sbsa-gwdt.txt | 41 ++
arch/arm64/boot/dts/amd/amd-seattle-soc.dtsi | 11 +
arch/arm64/boot/dts/arm/foundation-v8.dts | 12 +
arch/arm64/kernel/acpi.c | 154 ++++++
drivers/clocksource/arm_arch_timer.c | 16 -
drivers/watchdog/Kconfig | 10 +
drivers/watchdog/Makefile | 1 +
drivers/watchdog/sbsa_gwdt.c | 578 +++++++++++++++++++++
drivers/watchdog/sbsa_gwdt.h | 99 ++++
include/linux/acpi.h | 18 +
10 files changed, 924 insertions(+), 16 deletions(-)
create mode 100644 Documentation/devicetree/bindings/watchdog/sbsa-gwdt.txt
create mode 100644 drivers/watchdog/sbsa_gwdt.c
create mode 100644 drivers/watchdog/sbsa_gwdt.h
Signed-off-by: Fu Wei <fu.wei(a)linaro.org>
--
1.9.1
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