From: Fu Wei <fu.wei(a)linaro.org>
This patchset update gtdt.asl for VExpress/AcpiTables/rtsm_ve-aemv8a
(1)Fix "Platform Timer Offset" value bug
(2)Add Memory-mapped GT and SBSA Generic Watchdog timer info
base on Foundation Model
Fu Wei (2):
Platforms/ARM: Fix "Platform Timer Offset" value bug in gtdt.asl
Platforms/ARM: update gtdt.asl for VExpress
.../VExpress/AcpiTables/rtsm_ve-aemv8a/gtdt.asl | 67 +++++++++++++++++-----
1 file changed, 53 insertions(+), 14 deletions(-)
Signed-off-by: Fu Wei <fu.wei(a)linaro.org>
--
1.8.3.1
From: Fu Wei <fu.wei(a)linaro.org>
This patchset:
(1)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.
(2)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".
(3)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, do panic to save system context;
e.Support getting timeout and pretimeout from parameter and FDT
at the driver init stage.
(4)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:
v3: Delete "export arch_timer_get_rate" patch.
Driver back to use arch_timer_get_cntfrq.
Improve watchdog_init_timeouts function and update relevant documentation.
Improve watchdog_timeout_invalid and watchdog_pretimeout_invalid.
Improve foundation-v8.dts: delete the unnecessary tag of device node.
Remove "ARM64 || COMPILE_TEST" from Kconfig.
Add comments in arch/arm64/kernel/acpi.c
Fix typoes and incorrect comments.
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 (6):
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: introdouce "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 | 47 +-
arch/arm64/boot/dts/amd/amd-seattle-soc.dtsi | 11 +
arch/arm64/boot/dts/arm/foundation-v8.dts | 10 +
arch/arm64/kernel/acpi.c | 145 +++++++
drivers/watchdog/Kconfig | 11 +
drivers/watchdog/Makefile | 1 +
drivers/watchdog/sbsa_gwdt.c | 474 +++++++++++++++++++++
drivers/watchdog/watchdog_core.c | 95 +++--
drivers/watchdog/watchdog_dev.c | 50 +++
include/linux/watchdog.h | 33 +-
11 files changed, 880 insertions(+), 33 deletions(-)
create mode 100644 Documentation/devicetree/bindings/watchdog/sbsa-gwdt.txt
create mode 100644 drivers/watchdog/sbsa_gwdt.c
--
1.9.1
Don't try to read the RSDP structure or RSDT/XSDT tables
from memory with the -c option. These are now provided
as files in /sysfs, and this allows acpidump to function
when /dev/mem is not available, which is the case when
booted in UEFI secure boot mode, and also for ARM servers.
Signed-off-by: Roy Franz <roy.franz(a)linaro.org>
---
This produces almost the same output with/without the "-c" option,
with the /sysfs files being used with "-c", with the following differences:
* Table address are 0x0 with -c, since we don't get them from the sysfs files
* the tables are listed in a different order.
This has been tested against the following Linux patch which is being submitted
upstream:
https://lists.linaro.org/pipermail/linaro-acpi/2015-May/004549.html
source/os_specific/service_layers/oslinuxtbl.c | 87 +++++++++++++-------------
1 file changed, 43 insertions(+), 44 deletions(-)
diff --git a/source/os_specific/service_layers/oslinuxtbl.c b/source/os_specific/service_layers/oslinuxtbl.c
index e090a3c..95cc674 100644
--- a/source/os_specific/service_layers/oslinuxtbl.c
+++ b/source/os_specific/service_layers/oslinuxtbl.c
@@ -686,70 +686,69 @@ OslTableInitialize (
return (AE_OK);
}
+ if (!Gbl_DumpCustomizedTables)
+ {
/* Get RSDP from memory */
- Status = OslLoadRsdp ();
- if (ACPI_FAILURE (Status))
- {
- return (Status);
- }
+ Status = OslLoadRsdp ();
+ if (ACPI_FAILURE (Status))
+ {
+ return (Status);
+ }
- /* Get XSDT from memory */
+ /* Get XSDT from memory */
- if (Gbl_Rsdp.Revision && !Gbl_DoNotDumpXsdt)
- {
- if (Gbl_Xsdt)
+ if (Gbl_Rsdp.Revision && !Gbl_DoNotDumpXsdt)
{
- free (Gbl_Xsdt);
- Gbl_Xsdt = NULL;
+ if (Gbl_Xsdt)
+ {
+ free (Gbl_Xsdt);
+ Gbl_Xsdt = NULL;
+ }
+
+ Gbl_Revision = 2;
+ Status = OslGetBiosTable (ACPI_SIG_XSDT, 0,
+ ACPI_CAST_PTR (ACPI_TABLE_HEADER *, &Gbl_Xsdt), &Address);
+ if (ACPI_FAILURE (Status))
+ {
+ return (Status);
+ }
}
- Gbl_Revision = 2;
- Status = OslGetBiosTable (ACPI_SIG_XSDT, 0,
- ACPI_CAST_PTR (ACPI_TABLE_HEADER *, &Gbl_Xsdt), &Address);
- if (ACPI_FAILURE (Status))
+ /* Get RSDT from memory */
+
+ if (Gbl_Rsdp.RsdtPhysicalAddress)
{
- return (Status);
+ if (Gbl_Rsdt)
+ {
+ free (Gbl_Rsdt);
+ Gbl_Rsdt = NULL;
+ }
+
+ Status = OslGetBiosTable (ACPI_SIG_RSDT, 0,
+ ACPI_CAST_PTR (ACPI_TABLE_HEADER *, &Gbl_Rsdt), &Address);
+ if (ACPI_FAILURE (Status))
+ {
+ return (Status);
+ }
}
- }
- /* Get RSDT from memory */
+ /* Get FADT from memory */
- if (Gbl_Rsdp.RsdtPhysicalAddress)
- {
- if (Gbl_Rsdt)
+ if (Gbl_Fadt)
{
- free (Gbl_Rsdt);
- Gbl_Rsdt = NULL;
+ free (Gbl_Fadt);
+ Gbl_Fadt = NULL;
}
- Status = OslGetBiosTable (ACPI_SIG_RSDT, 0,
- ACPI_CAST_PTR (ACPI_TABLE_HEADER *, &Gbl_Rsdt), &Address);
+ Status = OslGetBiosTable (ACPI_SIG_FADT, 0,
+ ACPI_CAST_PTR (ACPI_TABLE_HEADER *, &Gbl_Fadt), &Gbl_FadtAddress);
if (ACPI_FAILURE (Status))
{
return (Status);
}
- }
- /* Get FADT from memory */
-
- if (Gbl_Fadt)
- {
- free (Gbl_Fadt);
- Gbl_Fadt = NULL;
- }
-
- Status = OslGetBiosTable (ACPI_SIG_FADT, 0,
- ACPI_CAST_PTR (ACPI_TABLE_HEADER *, &Gbl_Fadt), &Gbl_FadtAddress);
- if (ACPI_FAILURE (Status))
- {
- return (Status);
- }
-
- if (!Gbl_DumpCustomizedTables)
- {
/* Add mandatory tables to global table list first */
-
Status = OslAddTableToList (ACPI_RSDP_NAME, 0);
if (ACPI_FAILURE (Status))
{
--
1.9.1
From: "Jonathan (Zhixiong) Zhang" <zjzhang(a)codeaurora.org>
On a platform with APEI (ACPI Platform Error Interface) enabled, firmware
updates a memory region with hardware error record using nocache
attribute. When OS reads the region, since it maps the region with cache
attribute even though EFI memory map defines this region as uncached, OS
gets stale data and errorneously reports there is no new HW error.
When ghes driver maps the memory region, it uses the cache attribute
according to EFI memory map, if EFI memory map feature is enabled.
Since both arch/x86 and arc/ia64 implemented architecture agnostic EFI
memory map attribue lookup function, the code is moved from arch/x86
and arch/ia64 into EFI subsystem.
Jonathan (Zhixiong) Zhang (2):
efi: arch, x86: arch, ia64: rearrange EFI memmap related functions
acpi, apei: use EFI memmap to map GHES memory
arch/ia64/kernel/efi.c | 11 -----------
arch/x86/platform/efi/efi.c | 18 ------------------
drivers/acpi/apei/ghes.c | 13 +++++++++++++
drivers/firmware/efi/efi.c | 27 +++++++++++++++++++++++++++
include/linux/efi.h | 1 +
5 files changed, 41 insertions(+), 29 deletions(-)
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
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