APEI is currently implemented so that it depends on x86 hardware.
The primary dependency is that GHES uses the x86 NMI for hardware
error notification and MCE for memory error handling. These patches
remove that dependency.
Other APEI features such as error reporting via external IRQ, error
serialization, or error injection, do not require changes to use them
on non-x86 architectures.
The following patch set eliminates the APEI Kconfig x86 dependency
by making these changes:
- treat NMI notification as GHES feature - CONFIG_ACPI_APEI_NMI
- reorganize GHES notification type init/deinitialization
so that we can decide in run time whether NMI is supported or not
- identify architectural boxes and abstract it accordingly (NMI and MCE)
- rework ioremap for both IRQ and NMI context
NMI code is kept in ghes.c file since NMI and IRQ context are tightly coupled.
Note, these patches introduce no functional changes for x86. The NMI notification
feature is selected for x86 by default. Architectures that want to use this
feature should also provide NMI code infrastructure.
V1->V2
- address Borislav comment
- abstract arch-specific calls instead of wrapping into the #ifdef
Tomasz Nowicki (5):
apei, mce: Factor out APEI architecture specific MCE calls.
acpi, apei, ghes: Introduce ACPI_APEI_NMI to make NMI error
notification a GHES feature.
acpi, apei, ghes: Introduce more generic mechanism to init/deinit
GHES error notifications.
apei, ghes, nmi: Factor out NMI arch-specific calls.
acpi, apei, ghes: Factor out ioremap virtual memory for IRQ and NMI
context.
arch/x86/kernel/acpi/Makefile | 1 +
arch/x86/kernel/acpi/apei.c | 87 ++++++++++++
drivers/acpi/apei/Kconfig | 10 +-
drivers/acpi/apei/apei-base.c | 32 +++++
drivers/acpi/apei/ghes.c | 301 +++++++++++++++++++++++++----------------
drivers/acpi/apei/hest.c | 26 +---
include/acpi/apei.h | 11 ++
7 files changed, 328 insertions(+), 140 deletions(-)
create mode 100644 arch/x86/kernel/acpi/apei.c
--
1.7.9.5
This series contains experimental patchwork for PCC and CPPC as defined
in the current ACPI5.0a spec. The PCC patch was tested on an ARMv7 platform
and on a hacked up PCC emulator. The CPPC part is only compile tested. Both are very
much a WIP. Any feedback and help with testing would be highly appreciated!
Ashwin Chaugule (2):
ACPI: Add support for Platform Communication Channel
CPPC: Initial support for Collaborative Processor Performance Control
arch/arm64/Kconfig | 2 +
drivers/acpi/Kconfig | 10 ++
drivers/acpi/Makefile | 2 +-
drivers/acpi/pcc.c | 209 +++++++++++++++++++++++++++++
drivers/cpufreq/Kconfig | 11 +-
drivers/cpufreq/Makefile | 1 +
drivers/cpufreq/cppc-cpufreq.c | 298 +++++++++++++++++++++++++++++++++++++++++
7 files changed, 531 insertions(+), 2 deletions(-)
create mode 100644 drivers/acpi/pcc.c
create mode 100644 drivers/cpufreq/cppc-cpufreq.c
--
1.8.3.2
Hello,
This patchset adds initial support for the PCC (Platform Communication Channel)
interface as described in the current ACPI 5.0a spec. See Section 14 of the
ACPI spec - http://acpi.info/DOWNLOADS/ACPI_5_Errata%20A.pdf for more details on
how PCC works.
In brief PCC (Platform Communication Channel) is a generic means for PCC clients,
to talk to the firmware. The PCC register space is typically memory mapped IO and
uses a doorbell mechanism to communicate synchronously from the OS to the firmware.
The PCC driver is completely agnostic to the protocol implemented by the PCC clients.
It only implements the enumeration of PCC channels and the low level transport mechanism
and leaves the rest to the PCC clients.
The PCC is meant to be useable in the future by clients such as CPPC
(Collaborative Processor Performance Control), RAS (Reliability,
Availability and Serviceability) and MPST (Memory Power State Tables) and possibly others.
While the PCC clients will come as following patches whenever they're ready, I wanted
to get feedback on this common driver and hope that it could be merged upstream. This
should hopefully help various folks that are working on drivers that rely on the PCC
interface.
Cheers,
Ashwin
=== Testing Methodology ===
The PCC test driver in [2/2] is a simple driver that was used to
demonstrate how PCC clients would use the PCC driver. The PCC driver was
tested by sending multiple PCC READS and PCC WRITES across a shared memory
region on an MSM ARMv7 platform. This memory is shared between an apps processor
and a power controller processor. So, one end of the PCC channel is the PCC test driver
running on the apps processor and the other end is a debugger script
(running on a JTAG debugger) thats attached to the power processor. The debugger
script is busy looping on the doorbell address waiting for a bit to flip. This bit
indicates a synchronous communication from the apps processor. The doorbell is rung
when the OS sends a PCC READ or PCC WRITE command. The PCC communication channel
is simply a few fake 32 bit registers that are incremented by the OS and the debugger
script. The OS increments the registers and then sends the PCC WRITE command. On a PCC
READ, the script increments these registers and then OS reads them back. The values
are always incremented by 1 by either end, so we know what value to expect for each
PCC READ/WRITE.
Ashwin Chaugule (2):
ACPI: Add support for Platform Communication Channel
PCC Test driver
drivers/acpi/Kconfig | 10 +++
drivers/acpi/Makefile | 2 +-
drivers/acpi/pcc-test.c | 172 +++++++++++++++++++++++++++++++++++++++++++
drivers/acpi/pcc.c | 192 ++++++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 375 insertions(+), 1 deletion(-)
create mode 100644 drivers/acpi/pcc-test.c
create mode 100644 drivers/acpi/pcc.c
--
1.8.3.2
APEI is currently implemented so that it depends on x86 hardware.
The primary dependency is that GHES uses the x86 NMI for hardware
error notification. These patches remove that dependency.
Other APEI features such as error reporting via external IRQ, error
serialization, or error injection, do not require changes to use them
on non-x86 architectures.
The following patch set eliminates the APEI Kconfig x86 dependency
by making these changes:
- replace arch specific calls with more generic one
- treat NMI notification as GHES feature - CONFIG_ACPI_APEI_NMI
- isolate NMI related code
- reorganize function logic
NMI code is kept in ghes.c file since NMI and IRQ context are tightly coupled.
Note, these patches introduce no functional changes for x86. The NMI notification
feature is selected for x86 by default. Architectures that want to use this
feature should also provide NMI code infrastructure.
Tomasz Nowicki (7):
apei, mce: Call MCE-specific code only for X86 architecture.
acpi, apei, ghes: Introduce more generic mechanism to init/deinit
GHES error notifications.
ACPI, APEI, GHES: Introduce ACPI_NMI to make NMI error notification a
GHES feature.
acpi, apei, ghes: Factor out NMI error notification context.
acpi, apei, ghes: Attach NMI init/deinit functions while
CONFIG_ACPI_NMI is enabled.
acpi, apei, ghes: Make unmapping functionality independent from
architecture.
acpi, apei, ghes: Factor out ioremap virtual memory for IRQ and NMI
context.
drivers/acpi/apei/Kconfig | 10 +-
drivers/acpi/apei/ghes.c | 329 ++++++++++++++++++++++++++++-----------------
drivers/acpi/apei/hest.c | 8 +-
3 files changed, 218 insertions(+), 129 deletions(-)
--
1.7.9.5
Hi Christoffer, Marc
Please pull in the ARM and ARM64 PSCIv0.2 patchwork from the git
branch below. These patches have been under review on LKAML since
early March and are now ACK'd. Also, since these patches are dependent
on the UAPI header file (uapi/linux/psci.h) added by the KVM PSCIv0.2
patchwork, it makes sense to submit the whole PSCIv0.2 patchwork (KVM
and core) as one set.
Cheers,
Ashwin
The following changes since commit 4447a208f7fc2e2dff8c6a8df2a1fd6dd72fb3e2:
ARM/ARM64: KVM: Advertise KVM_CAP_ARM_PSCI_0_2 to user space
(2014-04-30 04:18:58 -0700)
are available in the git repository at:
git://git.linaro.org/people/ashwin.chaugule/leg-kernel.git kvm-next-psci-v0.2
for you to fetch changes up to c814ca029e1015bb0ecec312f4bb9751ba1a711a:
ARM: Check if a CPU has gone offline (2014-05-15 10:16:30 -0400)
----------------------------------------------------------------
Ashwin Chaugule (3):
PSCI: Add initial support for PSCIv0.2 functions
Documentation: devicetree: Add new binding for PSCIv0.2
ARM: Check if a CPU has gone offline
Documentation/devicetree/bindings/arm/psci.txt | 37 +++-
arch/arm/include/asm/psci.h | 7 +-
arch/arm/kernel/psci.c | 196 +++++++++++++++++----
arch/arm/kernel/psci_smp.c | 33 ++++
arch/arm64/include/asm/cpu_ops.h | 2 +
arch/arm64/include/asm/psci.h | 2 +-
arch/arm64/kernel/psci.c | 231 +++++++++++++++++++++----
arch/arm64/kernel/smp.c | 22 +++
8 files changed, 452 insertions(+), 78 deletions(-)
This patchset introduces some functions as defined in the PSCI v0.2 spec
and a corresponding DT binding to differentiate it from previous PSCI versions.
Since PSCIv0.2 has standard function IDs, it is possible to statically assign them
rather than depend on values from DT.
This patchset depends on the PSCI header (/uapi/linux/psci.h) introduced by
http://www.spinics.net/lists/arm-kernel/msg319712.html which is now merged in the
ARM KVM tree next branch.
Changes in v10:
- Documented explicit use of case dual PSCI bindings for hypervisors.
- Corrected POWER_STATE macros as per new definitions.
- Added arm64 cpu_kill cpu-op and tied it to psci affinity info.
- Misc cleanups in prints.
Changes in v9:
- Rebased on top of KVM "next" - https://git.kernel.org/cgit/linux/kernel/git/kvmarm/kvmarm.git/log/?h=next
Changes in v8:
- Replace msleep(100) with 10 x msleep(10)
Changes in v7:
- Add two new functions: SYSTEM_OFF and SYSTEM_RESET as defined in PSCIv0.2.
- Added a delay before calling cpu_kill to avoid race with cpu_die.
Changes in v6:
- rebase on top of uapi/linux/psci.h introduced by Anups patch
http://www.spinics.net/lists/arm-kernel/msg319712.html
- rebase on top of Catalins tree tip.
Changes in v5:
- Add uapi/linux/psci.h to kbuild
- ret with err if PSCI_ID_VERSION is not implemented.
Changes in v4:
- Correct copyright banner format.
- Check if PSCI Version ID is supported.
- Add all PSCI RET codes in uapi header.
- Explicitely ret 1 from psci_cpu_kill()
Changes in v3:
- Roll up common functionality for getting conduit method.
- Remove #defines for ARM32 and ARM64 in uapi/linux/psci.h
- Remove functions not supported by PSCI v0.1
- Misc cleanups.
- Add PSCI_AFFINITY_INFO return types in uapi header.
- Changed function names for PSCI v0.1 and PSCI v0.2
- Added copyright info to uapi header.
- Fixed args to affinity_info call.
- Fix typo in psci_init definition when PSCI is not defined.
Changes in v2:
- Add AFFINITY_INFO and MIGRATE_INFO_TYPE functions.
- Add binding Documentation.
- Add function to get PSCI version.
- Add common #defines in uapi/linux/psci.h
- Implement cpu_kill and check if CPU is dead via AFFINITY_INFO.
- Misc cleanups.
Changes in v1:
- Add new binding "arm, psci-0.2"
- Separate conduit and PSCI function assignment methods.
Ashwin Chaugule (3):
PSCI: Add initial support for PSCIv0.2 functions
Documentation: devicetree: Add new binding for PSCIv0.2
ARM: Check if a CPU has gone offline
Documentation/devicetree/bindings/arm/psci.txt | 37 +++-
arch/arm/include/asm/psci.h | 7 +-
arch/arm/kernel/psci.c | 196 +++++++++++++++++----
arch/arm/kernel/psci_smp.c | 33 ++++
arch/arm64/include/asm/cpu_ops.h | 2 +
arch/arm64/include/asm/psci.h | 2 +-
arch/arm64/kernel/psci.c | 231 +++++++++++++++++++++----
arch/arm64/kernel/smp.c | 22 +++
8 files changed, 452 insertions(+), 78 deletions(-)
--
1.8.3.2
This patchset introduces some functions as defined in the PSCI v0.2 spec
and a corresponding DT binding to differentiate it from previous PSCI versions.
Since PSCIv0.2 has standard function IDs, it is possible to statically assign them
rather than depend on values from DT.
This patchset depends on the PSCI header (/uapi/linux/psci.h) introduced by
http://www.spinics.net/lists/arm-kernel/msg319712.html which is now merged in the
ARM KVM tree next branch.
Changes in v9:
- Rebased on top of KVM "next" - https://git.kernel.org/cgit/linux/kernel/git/kvmarm/kvmarm.git/log/?h=next
Changes in v8:
- Replace msleep(100) with 10 x msleep(10)
Changes in v7:
- Add two new functions: SYSTEM_OFF and SYSTEM_RESET as defined in PSCIv0.2.
- Added a delay before calling cpu_kill to avoid race with cpu_die.
Changes in v6:
- rebase on top of uapi/linux/psci.h introduced by Anups patch
http://www.spinics.net/lists/arm-kernel/msg319712.html
- rebase on top of Catalins tree tip.
Changes in v5:
- Add uapi/linux/psci.h to kbuild
- ret with err if PSCI_ID_VERSION is not implemented.
Changes in v4:
- Correct copyright banner format.
- Check if PSCI Version ID is supported.
- Add all PSCI RET codes in uapi header.
- Explicitely ret 1 from psci_cpu_kill()
Changes in v3:
- Roll up common functionality for getting conduit method.
- Remove #defines for ARM32 and ARM64 in uapi/linux/psci.h
- Remove functions not supported by PSCI v0.1
- Misc cleanups.
- Add PSCI_AFFINITY_INFO return types in uapi header.
- Changed function names for PSCI v0.1 and PSCI v0.2
- Added copyright info to uapi header.
- Fixed args to affinity_info call.
- Fix typo in psci_init definition when PSCI is not defined.
Changes in v2:
- Add AFFINITY_INFO and MIGRATE_INFO_TYPE functions.
- Add binding Documentation.
- Add function to get PSCI version.
- Add common #defines in uapi/linux/psci.h
- Implement cpu_kill and check if CPU is dead via AFFINITY_INFO.
- Misc cleanups.
Changes in v1:
- Add new binding "arm, psci-0.2"
- Separate conduit and PSCI function assignment methods.
Ashwin Chaugule (3):
PSCI: Add initial support for PSCIv0.2 functions
Documentation: devicetree: Add new binding for PSCIv0.2
ARM: Check if a CPU has gone offline
Documentation/devicetree/bindings/arm/psci.txt | 35 ++++-
arch/arm/include/asm/psci.h | 7 +-
arch/arm/kernel/psci.c | 196 +++++++++++++++++++-----
arch/arm/kernel/psci_smp.c | 31 ++++
arch/arm64/include/asm/psci.h | 2 +-
arch/arm64/kernel/psci.c | 200 ++++++++++++++++++++-----
6 files changed, 393 insertions(+), 78 deletions(-)
--
1.8.3.2