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
Hi,
I ran into some compile errors when I was prototyping the code
for the proposals in ASWG, it turns out that some field in FADT is
changed and "reserved4[0]" used in ACPI_FADT_V2_SIZE will
cause the error.
So my question is that the length of very version of FADT is
fixed, why not use a constant value for this puspose?
Here is the code:
/*
* Sizes of the various flavors of FADT. We need to look closely
* at the FADT length because the version number essentially tells
* us nothing because of many BIOS bugs where the version does not
* match the expected length. In other words, the length of the
* FADT is the bottom line as to what the version really is.
*
* For reference, the values below are as follows:
* FADT V1 size: 0x074
* FADT V2 size: 0x084
* FADT V3 size: 0x0F4
* FADT V4 size: 0x0F4
* FADT V5 size: 0x10C
*/
#define ACPI_FADT_V1_SIZE (u32) (ACPI_FADT_OFFSET (flags) + 4)
#define ACPI_FADT_V2_SIZE (u32) (ACPI_FADT_OFFSET (reserved4[0]) + 3)
#define ACPI_FADT_V3_SIZE (u32) (ACPI_FADT_OFFSET (sleep_control))
#define ACPI_FADT_V5_SIZE (u32) (sizeof (struct acpi_table_fadt))
Why not #define ACPI_FADT_V1_SIZE 0x074 ?
Did I miss something? any clarify will be appreciated :)
Thanks
Hanjun