CPPC is the first client to make use of the PCC Mailbox channel. So
enable it only when CPPC is also enabled.
Signed-off-by: Ashwin Chaugule <ashwin.chaugule(a)linaro.org>
---
drivers/mailbox/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mailbox/Kconfig b/drivers/mailbox/Kconfig
index 84b0a2d..60c8da6 100644
--- a/drivers/mailbox/Kconfig
+++ b/drivers/mailbox/Kconfig
@@ -45,7 +45,7 @@ config OMAP_MBOX_KFIFO_SIZE
config PCC
bool "Platform Communication Channel Driver"
- depends on ACPI
+ depends on ACPI && ACPI_CPPC
help
ACPI 5.0+ spec defines a generic mode of communication
between the OS and a platform such as the BMC. This medium
--
1.9.1
This change initializes the PCC Mailbox earlier than
the ACPI processor driver. This enables drivers introduced
in follow up patches (e.g. CPPC) to be probed via the ACPI
processor driver interface. The CPPC probe requires the PCC
channel to be initialized for it to query each CPUs performance
capabilites.
Signed-off-by: Ashwin Chaugule <ashwin.chaugule(a)linaro.org>
---
drivers/mailbox/pcc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/mailbox/pcc.c b/drivers/mailbox/pcc.c
index 7e91d68..8809587 100644
--- a/drivers/mailbox/pcc.c
+++ b/drivers/mailbox/pcc.c
@@ -352,4 +352,4 @@ static int __init pcc_init(void)
return 0;
}
-device_initcall(pcc_init);
+postcore_initcall(pcc_init);
--
1.9.1
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 V4:
- Misc cleanups. Addressed feedback from Rafael.
- Made acpi_processor.c independent of C-states, P-states and others.
- Per CPU scanning for _CPC is now made from acpi_processor.c
- Added new Kconfig options for legacy C states and P states to enable future
support for newer alternatives as defined in the ACPI spec 6.0.
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 (6):
PCC: Initialize PCC Mailbox earlier at boot
ACPI: Make ACPI processor driver more extensible
ACPI: Introduce CPU performance controls using CPPC
CPPC: Add a CPUFreq driver for use with CPPC
CPPC: Probe for CPPC tables for each ACPI Processor object
PCC: Enable PCC only when needed
drivers/acpi/Kconfig | 58 ++-
drivers/acpi/Makefile | 8 +-
drivers/acpi/cppc_acpi.c | 808 ++++++++++++++++++++++++++++++++++++++++
drivers/acpi/processor_driver.c | 89 +++--
drivers/cpufreq/Kconfig | 2 +-
drivers/cpufreq/Kconfig.arm | 16 +
drivers/cpufreq/Kconfig.x86 | 2 +
drivers/cpufreq/Makefile | 2 +
drivers/cpufreq/cppc_cpufreq.c | 197 ++++++++++
drivers/mailbox/Kconfig | 2 +-
drivers/mailbox/pcc.c | 2 +-
include/acpi/cppc_acpi.h | 137 +++++++
include/acpi/processor.h | 118 +++++-
13 files changed, 1380 insertions(+), 61 deletions(-)
create mode 100644 drivers/acpi/cppc_acpi.c
create mode 100644 drivers/cpufreq/cppc_cpufreq.c
create mode 100644 include/acpi/cppc_acpi.h
--
1.9.1
ACPI 6.0 specified MADT generic distributor version values, but
the detail definition is missing, add its support in this patch.
Signed-off-by: Hanjun Guo <hanjun.guo(a)linaro.org>
---
Hi Bob, Lv,
As discussed with Lv on linux-acpi maillist, I prepared this
patch for review.
Please treat this patch as a fix for next ACPICA version and
linux kernel 4.2 material, because we still can not
use the newest ACPICA for linux when this enum is missing,
any comments are welcomed.
Thanks
Hanjun
source/include/actbl1.h | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/source/include/actbl1.h b/source/include/actbl1.h
index 1c508a0..0235543 100644
--- a/source/include/actbl1.h
+++ b/source/include/actbl1.h
@@ -1050,6 +1050,18 @@ typedef struct acpi_madt_generic_distributor
} ACPI_MADT_GENERIC_DISTRIBUTOR;
+/* Values for Version in Generic Distributor (ACPI 6.0) */
+
+enum AcpiMadtGicVersionType
+{
+ ACPI_MADT_GIC_VER_UNKNOWN = 0,
+ ACPI_MADT_GIC_VER_V1 = 1,
+ ACPI_MADT_GIC_VER_V2 = 2,
+ ACPI_MADT_GIC_VER_V3 = 3,
+ ACPI_MADT_GIC_VER_V4 = 4,
+ ACPI_MADT_GIC_VER_RESERVED = 5 /* 5 and greater are reserved */
+};
+
/* 13: Generic MSI Frame (ACPI 5.1) */
--
1.9.1
From: Fu Wei <fu.wei(a)linaro.org>
This patchset:
(1)Export "arch_timer_get_rate" in arm_arch_timer.c for the
other drivers, like SBSA watchdog driver
(2)Introduce Documentation/devicetree/bindings/watchdog/sbsa-gwdt.txt
for FDT info of SBSA Generic Watchdog, and give two examples of
adding SBSA Generic Watchdog device node into the dts files:
foundation-v8.dts and amd-seattle-soc.dtsi.
(3)Introduce "pretimeout" into the watchdog framework, and update
Documentation/watchdog/watchdog-kernel-api.txt to introduce:
(1)the new elements in the watchdog_device and watchdog_ops struct;
(2)the new API "watchdog_init_timeouts".
(4)Introduce ARM SBSA watchdog driver:
a.Use linux kernel watchdog framework;
b.Work with FDT on ARM64;
c.Use "pretimeout" in watchdog framework;
d.In first timeout(WS0), do panic to save system context;
e.Support geting timeout and pretimeout from parameter and FDT
at the driver init stage.
(5)Parse SBSA Generic Watchdog Structure in GTDT table of ACPI,
and create a platform device with that information.
This platform device can be used by This Watchdog driver.
This patchset has been tested with watchdog daemon
(ACPI/FDT, module/build-in) on the following platforms:
(1)ARM Foundation v8 model
(2)AMD Seattle B0
Changelog:
v2: Improve watchdog-kernel-api.txt documentation for pretimeout support.
Export "arch_timer_get_rate" in arm_arch_timer.c.
Add watchdog_init_timeouts API for pretimeout support in framework.
Improve suspend and resume foundation in driver
Improve timeout/pretimeout values init code in driver.
Delete unnecessary items of the sbsa_gwdt struct and #define.
Delete all unnecessary debug info in driver.
Fix 64bit division bug.
Use the arch_timer interface to get watchdog clock rate.
Add MODULE_DEVICE_TABLE for platform device id.
Fix typoes.
v1: The first version upstream patchset to linux mailing list
Fu Wei (7):
clocksource: export "arch_timer_get_rate" for the other drivers
Documentation: add sbsa-gwdt.txt documentation
ARM64: add SBSA Generic Watchdog device node in foundation-v8.dts
ARM64: add SBSA Generic Watchdog device node in amd-seattle-soc.dtsi
Watchdog: introduce "pretimeout" into framework
Watchdog: introduce ARM SBSA watchdog driver
ACPI: import watchdog info of GTDT into platform device
.../devicetree/bindings/watchdog/sbsa-gwdt.txt | 36 ++
Documentation/watchdog/watchdog-kernel-api.txt | 62 ++-
arch/arm64/boot/dts/amd/amd-seattle-soc.dtsi | 11 +
arch/arm64/boot/dts/arm/foundation-v8.dts | 10 +
arch/arm64/kernel/acpi.c | 136 ++++++
drivers/clocksource/arm_arch_timer.c | 1 +
drivers/watchdog/Kconfig | 12 +
drivers/watchdog/Makefile | 1 +
drivers/watchdog/sbsa_gwdt.c | 476 +++++++++++++++++++++
drivers/watchdog/watchdog_core.c | 103 +++--
drivers/watchdog/watchdog_dev.c | 48 +++
include/linux/watchdog.h | 30 +-
12 files changed, 891 insertions(+), 35 deletions(-)
create mode 100644 Documentation/devicetree/bindings/watchdog/sbsa-gwdt.txt
create mode 100644 drivers/watchdog/sbsa_gwdt.c
--
1.9.1
Hi Hanjun / Mark / Tomasz,
I have tried the following branch on AMD Seattle.
http://git.linaro.org/leg/acpi/acpi.git devel
Last commit: f6b94809b273023f675d3504922457c9ffde7e81
I ran info a couple issues. Here are two patches (1 and 2),
which should resolve the issues. Please see if they make sense.
Also, patch 3 is needed for parsing _CCA information as a follow up of
the CCA patch series here (https://lkml.org/lkml/2015/5/20/1033).
Thanks,
Suravee
Suravee Suthikulpanit (3):
ARM64 / PCI / ACPI: Do not return error when a MMCONFIG entry already
exist
ACPI / PCI: Also look for _PRT in the PCI host bridge device
PCI: Generic function for setting up PCI device DMA coherency
arch/arm64/kernel/pci.c | 9 +++++++--
drivers/acpi/pci_irq.c | 46 +++++++++++++++++++++++++++++++++-------------
drivers/of/of_pci.c | 20 --------------------
drivers/pci/probe.c | 35 +++++++++++++++++++++++++++++++++--
include/linux/of_pci.h | 3 ---
5 files changed, 73 insertions(+), 40 deletions(-)
--
2.1.0
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 V3 (https://lkml.org/lkml/2015/5/7/1004):
* Remove ARCH64_SUPPORT_ACPI_CCA_ZERO and just use CONFIG_ARM64.
(per Catalin and Rafael)
* Do not need to call arch_setup_dma_ops() for acpi_device->dev.
(per Rafael)
* [3/6] (New) We also need to call arch_setup_dma_ops() for pci
devices and check the CCA of the host bridge. Similar logic
exists for OF. So, I refactor of_pci_dma_configure() to
the more generic version pci_dma_configure(), and add support
for 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 (6):
ACPI / scan: Parse _CCA and setup device coherency
arm64 : Introduce support for ACPI _CCA object
pci: Generic function for setting up PCI device DMA coherency
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 | 1 +
arch/arm64/include/asm/dma-mapping.h | 18 +++++-
arch/arm64/mm/dma-mapping.c | 92 +++++++++++++++++++++++++++++++
drivers/acpi/Kconfig | 3 +
drivers/acpi/acpi_platform.c | 10 +++-
drivers/acpi/scan.c | 40 ++++++++++++++
drivers/base/property.c | 12 ++++
drivers/crypto/ccp/ccp-platform.c | 60 +-------------------
drivers/net/ethernet/amd/xgbe/xgbe-main.c | 27 +--------
drivers/of/of_pci.c | 20 -------
drivers/pci/probe.c | 35 +++++++++++-
include/acpi/acpi_bus.h | 32 ++++++++++-
include/linux/acpi.h | 10 ++++
include/linux/of_pci.h | 3 -
include/linux/property.h | 2 +
15 files changed, 249 insertions(+), 116 deletions(-)
--
2.1.0