Changes since V9:
- Default to PCC subspace headers as defined in ACPI v5.1
Changes since V8:
- Removed unncessary header files.
- Added kerneldoc comments.
- Added intro about PCC in pcc.c
Changes since V7:
- Added timeout to tx method in case the remote dies.
- Restructured usage of acpi_status. Had inverted logic previously.
Changes since V6:
- Cosmetic changes based on Lv's suggestions
Changes since V5:
- Optimize loop that matches channel request.
- Use platform_create_bundle.
- Replace ioread/writes.
- Remove redundant code and headers.
- Restructure common mailbox macros.
- Reformat PCC cmd parsing.
Changes since V4:
- Folded PCC Mailbox helpers into pcc.c
Changes since V3:
- Added PCC helper functions to work around "struct device" limitations.
- PCC driver changes to work with PCC specific Mailbox helpers.
Changes since V2:
- Rebased on top of git://git.linaro.org/landing-teams/working/fujitsu/integration.git
branch mailbox-for-3.17
- Added PCC API to mailbox framework as per Arnd's suggestion to allow usage without ACPI.
Changes since V1:
- Integration with Mailbox framework - https://lkml.org/lkml/2014/5/15/49
This patchset adds support for the PCC (Platform Communication Channel)
interface as described in the current ACPI 5.0 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 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.
Ashwin Chaugule (1):
Mailbox: Add support for Platform Communication Channel
drivers/mailbox/Kconfig | 12 ++
drivers/mailbox/Makefile | 2 +
drivers/mailbox/mailbox.c | 4 +-
drivers/mailbox/mailbox.h | 16 ++
drivers/mailbox/pcc.c | 367 ++++++++++++++++++++++++++++++++++++++++++++++
5 files changed, 398 insertions(+), 3 deletions(-)
create mode 100644 drivers/mailbox/mailbox.h
create mode 100644 drivers/mailbox/pcc.c
--
1.9.1
Hi our dear ACPI experts,
I ran my ci job yesterday night. then I run a test on my new leg Image, because I recompiled the FWTS in the test , so the test took a long time.
https://validation.linaro.org/scheduler/job/198839/log_file
The result.log is attached.
UPDATE:
(1)disabling STATIC_DEVMEM is working, it's not a blocker for FWTS in short term.
(2)we test the latest kernel, so the result should be better
Please let me know what are the rest problem we need to fix , according to the test log.
Great thanks for your time!
--
Best regards,
Fu Wei
Software Engineer From Red Hat
LEG Team
Linaro.org | Open source software for ARM SoCs
Ph: +86 186 2020 4684 (mobile)
IRC: fuwei
Skype: tekkamanninja
Room 1512, Regus One Corporate Avenue,Level 15,
One Corporate Avenue,222 Hubin Road,Huangpu District,
Shanghai,China 200021
The Mailbox API so far discounted controllers and clients that
may not have a DT based channel mapping capability, as in ACPI.
Allow such mailbox clients to ask for a mailbox channel by simply
specifying a token. The token would be globally unique
among channels provided by such controllers... which shouldn't
be a problem because practically non-DT means ACPI and ACPI
specifies just one controller instance called the Platform
Communications Channel (PCC) that could have max 256 subspaces
(channels or mailboxes). So this is simply going to be the value
from 'Signature' field (first 4bytes) of the SharedMemory Region
corresponding to the subspace/channel the client is interested in.
Signed-off-by: Jassi Brar <jaswinder.singh(a)linaro.org>
---
drivers/mailbox/mailbox.c | 50 +++++++++++++++++++++-----------------
include/linux/mailbox_controller.h | 7 ++++++
2 files changed, 35 insertions(+), 22 deletions(-)
diff --git a/drivers/mailbox/mailbox.c b/drivers/mailbox/mailbox.c
index afcb430..8260451 100644
--- a/drivers/mailbox/mailbox.c
+++ b/drivers/mailbox/mailbox.c
@@ -296,36 +296,42 @@ struct mbox_chan *mbox_request_channel(struct mbox_client *cl, int index)
{
struct device *dev = cl->dev;
struct mbox_controller *mbox;
- struct of_phandle_args spec;
- struct mbox_chan *chan;
+ struct mbox_chan *chan = NULL;
unsigned long flags;
int ret;
- if (!dev || !dev->of_node) {
- pr_debug("%s: No owner device node\n", __func__);
- return ERR_PTR(-ENODEV);
- }
-
mutex_lock(&con_mutex);
- if (of_parse_phandle_with_args(dev->of_node, "mboxes",
- "#mbox-cells", index, &spec)) {
- dev_dbg(dev, "%s: can't parse \"mboxes\" property\n", __func__);
- mutex_unlock(&con_mutex);
- return ERR_PTR(-ENODEV);
- }
-
- chan = NULL;
- list_for_each_entry(mbox, &mbox_cons, node)
- if (mbox->dev->of_node == spec.np) {
- chan = mbox->of_xlate(mbox, &spec);
- break;
+ if (!dev || !dev->of_node) { /* If it's an ACPI client */
+ list_for_each_entry(mbox, &mbox_cons, node) {
+ if (!mbox->global_xlate)
+ continue;
+ chan = mbox->global_xlate(mbox, index);
+ if (chan && !chan->cl)
+ break;
+ }
+ } else {
+ struct of_phandle_args spec;
+
+ if (of_parse_phandle_with_args(dev->of_node, "mboxes",
+ "#mbox-cells", index, &spec)) {
+ dev_dbg(dev, "%s: can't parse \"mboxes\" property\n",
+ __func__);
+ mutex_unlock(&con_mutex);
+ return ERR_PTR(-ENODEV);
}
- of_node_put(spec.np);
+ list_for_each_entry(mbox, &mbox_cons, node)
+ if (mbox->dev->of_node == spec.np) {
+ chan = mbox->of_xlate(mbox, &spec);
+ break;
+ }
+
+ of_node_put(spec.np);
+ }
if (!chan || chan->cl || !try_module_get(mbox->dev->driver->owner)) {
- dev_dbg(dev, "%s: mailbox not free\n", __func__);
+ pr_err("%s: mailbox not available\n", __func__);
mutex_unlock(&con_mutex);
return ERR_PTR(-EBUSY);
}
@@ -344,7 +350,7 @@ struct mbox_chan *mbox_request_channel(struct mbox_client *cl, int index)
ret = chan->mbox->ops->startup(chan);
if (ret) {
- dev_err(dev, "Unable to startup the chan (%d)\n", ret);
+ pr_err("Unable to startup the chan (%d)\n", ret);
mbox_free_channel(chan);
chan = ERR_PTR(ret);
}
diff --git a/include/linux/mailbox_controller.h b/include/linux/mailbox_controller.h
index d4cf96f..76871b2 100644
--- a/include/linux/mailbox_controller.h
+++ b/include/linux/mailbox_controller.h
@@ -67,6 +67,11 @@ struct mbox_chan_ops {
* @txpoll_period: If 'txdone_poll' is in effect, the API polls for
* last TX's status after these many millisecs
* @of_xlate: Controller driver specific mapping of channel via DT
+ * @global_xlate: Controller driver specific mapping of channel for
+ * non-DT based clients (like ACPI). The 'global_id'
+ * argument is a token to uniquely identify the mbox_chan
+ * fromm those provided by more than one such controllers.
+ * 'of_xlate' takes precedence for DT based clients.
* @poll: API private. Used to poll for TXDONE on all channels.
* @node: API private. To hook into list of controllers.
*/
@@ -80,6 +85,8 @@ struct mbox_controller {
unsigned txpoll_period;
struct mbox_chan *(*of_xlate)(struct mbox_controller *mbox,
const struct of_phandle_args *sp);
+ struct mbox_chan *(*global_xlate)(struct mbox_controller *mbox,
+ int global_id);
/* Internal to API */
struct timer_list poll;
struct list_head node;
--
1.8.1.2
Changes since V8:
- Removed unncessary header files.
- Added kerneldoc comments.
- Added intro about PCC in pcc.c
Changes since V7:
- Added timeout to tx method in case the remote dies.
- Restructured usage of acpi_status. Had inverted logic previously.
Changes since V6:
- Cosmetic changes based on Lv's suggestions
Changes since V5:
- Optimize loop that matches channel request.
- Use platform_create_bundle.
- Replace ioread/writes.
- Remove redundant code and headers.
- Restructure common mailbox macros.
- Reformat PCC cmd parsing.
Changes since V4:
- Folded PCC Mailbox helpers into pcc.c
Changes since V3:
- Added PCC helper functions to work around "struct device" limitations.
- PCC driver changes to work with PCC specific Mailbox helpers.
Changes since V2:
- Rebased on top of git://git.linaro.org/landing-teams/working/fujitsu/integration.git
branch mailbox-for-3.17
- Added PCC API to mailbox framework as per Arnd's suggestion to allow usage without ACPI.
Changes since V1:
- Integration with Mailbox framework - https://lkml.org/lkml/2014/5/15/49
This patchset adds support for the PCC (Platform Communication Channel)
interface as described in the current ACPI 5.0 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 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.
Ashwin Chaugule (1):
Mailbox: Add support for Platform Communication Channel
drivers/mailbox/Kconfig | 12 ++
drivers/mailbox/Makefile | 2 +
drivers/mailbox/mailbox.c | 4 +-
drivers/mailbox/mailbox.h | 16 ++
drivers/mailbox/pcc.c | 369 ++++++++++++++++++++++++++++++++++++++++++++++
5 files changed, 400 insertions(+), 3 deletions(-)
create mode 100644 drivers/mailbox/mailbox.h
create mode 100644 drivers/mailbox/pcc.c
--
1.9.1
This patchset introduces CPPC(Collaborative Processor Performance Control) as a backend
to the PID governor. The PID governor from intel_pstate.c maps cleanly onto some CPPC
interfaces.
e.g. The CPU performance requests are made on a continuous scale as against discrete pstate
levels. The CPU performance feedback over an interval is gauged using platform specific
counters which are also described by CPPC.
Although CPPC describes several other registers to provide more hints to the platform,
Linux as of today does not have the infrastructure to make use of those registers.
Some of the CPPC specific information could be made available from the scheduler as
part of the CPUfreq and Scheduler intergration work. Until then PID can be used as the
front end for CPPC.
This implementation was tested using a Thinkpad X240 Laptop which seemed to have
CPPC and PCC tables in its ACPI firmware. However, it seems as though some addresses
pointed to by the tables do not exist. This patchset also shows the hacks that
were made in order to work around those limitations and test the control flow.
This patchset builds on top of the PCC driver which is being reviewed separately[3].
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.
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. The PCC driver is being discussed in a
separate patchset [3] and is not included here, since CPPC is only one client of PCC.
Finer details about the PCC and CPPC spec are available in the latest ACPI 5.1
specification.[2]
[1] - http://lwn.net/Articles/608715/
[2] - http://www.uefi.org/sites/default/files/resources/ACPI_5_1release.pdf
[3] - http://comments.gmane.org/gmane.linux.acpi.devel/71171
Ashwin Chaugule (3):
PCC HACKS: Update PCC comm region with MSR data
CPPC as a PID controller backend
CPPC HACKS
drivers/cpufreq/Kconfig | 12 +
drivers/cpufreq/Makefile | 1 +
drivers/cpufreq/acpi_pid.c | 1085 ++++++++++++++++++++++++++++++++++++++++++++
drivers/mailbox/pcc.c | 125 ++++-
4 files changed, 1207 insertions(+), 16 deletions(-)
create mode 100644 drivers/cpufreq/acpi_pid.c
--
1.9.1
Changes since V7:
- Added timeout to tx method in case the remote dies.
- Restructured usage of acpi_status. Had inverted logic previously.
Changes since V6:
- Cosmetic changes based on Lv's suggestions
Changes since V5:
- Optimize loop that matches channel request.
- Use platform_create_bundle.
- Replace ioread/writes.
- Remove redundant code and headers.
- Restructure common mailbox macros.
- Reformat PCC cmd parsing.
Changes since V4:
- Folded PCC Mailbox helpers into pcc.c
Changes since V3:
- Added PCC helper functions to work around "struct device" limitations.
- PCC driver changes to work with PCC specific Mailbox helpers.
Changes since V2:
- Rebased on top of git://git.linaro.org/landing-teams/working/fujitsu/integration.git
branch mailbox-for-3.17
- Added PCC API to mailbox framework as per Arnd's suggestion to allow usage without ACPI.
Changes since V1:
- Integration with Mailbox framework - https://lkml.org/lkml/2014/5/15/49
This patchset adds support for the PCC (Platform Communication Channel)
interface as described in the current ACPI 5.0 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 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.
Ashwin Chaugule (2):
Mailbox: Add support for Platform Communication Channel
PCC test
drivers/mailbox/Kconfig | 12 ++
drivers/mailbox/Makefile | 2 +
drivers/mailbox/mailbox.c | 4 +-
drivers/mailbox/mailbox.h | 16 +++
drivers/mailbox/pcc-test.c | 204 +++++++++++++++++++++++++++++++
drivers/mailbox/pcc.c | 292 +++++++++++++++++++++++++++++++++++++++++++++
6 files changed, 527 insertions(+), 3 deletions(-)
create mode 100644 drivers/mailbox/mailbox.h
create mode 100644 drivers/mailbox/pcc-test.c
create mode 100644 drivers/mailbox/pcc.c
--
1.9.1
KVM on ARM relies on device tree information, which is not available
when booting with ACPI. In the case of VGIC we need to extract
the relevant data from the MADT table and probe it accordingly.
For the architected timer, we need to expose the correct
interrupt line to KVM from the GTDT table.
This series has been tested on the Foundation Model 0.8 build 5206
and is based on the "Introduce ACPI for ARM64 based on ACPI 5.1"
patch series from Hanjun Guo.
Alexander Spyridakis (2):
ARM64 / ACPI: VGIC probe support with ACPI
ARM64 / ACPI: Point KVM to the virtual timer interrupt when booting
with ACPI
include/kvm/arm_vgic.h | 6 ++++
virt/kvm/arm/arch_timer.c | 48 ++++++++++++++++++-------
virt/kvm/arm/vgic-v2.c | 91 +++++++++++++++++++++++++++++++++++++++++++++++
virt/kvm/arm/vgic.c | 27 ++++++++------
4 files changed, 150 insertions(+), 22 deletions(-)
--
1.9.1
Changes since V6:
- Cosmetic changes based on Lv's suggestions
Changes since V5:
- Optimize loop that matches channel request.
- Use platform_create_bundle.
- Replace ioread/writes.
- Remove redundant code and headers.
- Restructure common mailbox macros.
- Reformat PCC cmd parsing.
Changes since V4:
- Folded PCC Mailbox helpers into pcc.c
Changes since V3:
- Added PCC helper functions to work around "struct device" limitations.
- PCC driver changes to work with PCC specific Mailbox helpers.
Changes since V2:
- Rebased on top of git://git.linaro.org/landing-teams/working/fujitsu/integration.git
branch mailbox-for-3.17
- Added PCC API to mailbox framework as per Arnd's suggestion to allow usage without ACPI.
Changes since V1:
- Integration with Mailbox framework - https://lkml.org/lkml/2014/5/15/49
This patchset adds support for the PCC (Platform Communication Channel)
interface as described in the current ACPI 5.0 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 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.
Ashwin Chaugule (2):
Mailbox: Add support for Platform Communication Channel
PCC test
drivers/mailbox/Kconfig | 12 ++
drivers/mailbox/Makefile | 2 +
drivers/mailbox/mailbox.c | 4 +-
drivers/mailbox/mailbox.h | 16 +++
drivers/mailbox/pcc-test.c | 203 ++++++++++++++++++++++++++++++++
drivers/mailbox/pcc.c | 282 +++++++++++++++++++++++++++++++++++++++++++++
6 files changed, 516 insertions(+), 3 deletions(-)
create mode 100644 drivers/mailbox/mailbox.h
create mode 100644 drivers/mailbox/pcc-test.c
create mode 100644 drivers/mailbox/pcc.c
--
1.9.1
ACPI 5.1 has been released and now be freely available for
download [1]. It fixed some major gaps to run ACPI on ARM,
this patch just follow the ACPI 5.1 spec and prepare the
code to run ACPI on ARM64.
ACPI 5.1 has some major changes for the following tables and
method which are essential for ARM platforms:
1) MADT table updates.
2) FADT updates for PSCI
3) GTDT
This patch set is the ARM64 ACPI core patches covered MADT, FADT
and GTDT, platform board specific drivers are not covered by this
patch set, but we provided drivers for Juno to boot with ACPI only
for review purpose.
We first introduce acpi.c and its related head file which are needed
by ACPI core, and then get RSDP to extract all the ACPI boot-time tables.
When all the boot-time tables (FADT, MADT, GTDT) are ready, then
parse them to init the sytem when booted. Specifically,
a) we use FADT to init PSCI and use PSCI to boot SMP;
b) Use MADT for GIC init and SMP init;
c) GTDT for arch timer init.
This patch set is based on 3.17-rc4 and was tested by Graeme on Juno
and FVP base model boot with ACPI only OK, if you want to test them,
you can pull from acpi-5.1-v4 branch in leg/acpi repo:
git://git.linaro.org/leg/acpi/acpi.git
Updates since v3:
- Compile out sleep.c on ARM64 when ACPI enabled
- refactor the GIC init code to address the comments from Marc and
Arnd
- refactor the SMP init code to fix some logic problem when PSCI is
not present, also address some of Grant and Lorenzo's comments
- reorder the patch series and move ACPI table changes to the front
of patch set
- rebase on top of 3.17-rc4
Updates since v2:
- Refactor the code to make SMP/PSCI init with less sperated init
path by Tomasz
- make ACPI depend on EXPERT
- Address lots of comments from Catalin, Sudeep, Geoff
- Add Juno device ACPI driver patches for review
Updates since v1:
- Set ACPI default off on ARM64 suggested by Olof;
- Rebase the patch set on top of linux-next branch/linux-pm tree which
includes the ACPICA for full ACPI 5.1 support.
- Update the document as suggested;
- Adress lots of comments from Mark, Sudeep, Randy, Naresh, Olof, Geoff
and more...
[1]: http://www.uefi.org/sites/default/files/resources/ACPI_5_1release.pdf
Al Stone (3):
ARM64 / ACPI: Get RSDP and ACPI boot-time tables
ARM64 / ACPI: Introduce early_param for "acpi"
ARM64 / ACPI: Select ACPI_REDUCED_HARDWARE_ONLY if ACPI is enabled on
ARM64
Ashwin Chaugule (1):
ACPI / table: Add new function to get table entries
Graeme Gregory (4):
ARM64 / ACPI: Introduce sleep-arm.c
ARM64 / ACPI: If we chose to boot from acpi then disable FDT
ARM64 / ACPI: Enable ARM64 in Kconfig
Documentation: ACPI for ARM64
Hanjun Guo (8):
ARM64: Move the init of cpu_logical_map(0) before
unflatten_device_tree()
ARM64 / ACPI: Make PCI optional for ACPI on ARM64
ARM64 / ACPI: Parse FADT table to get PSCI flags for PSCI init
ACPI / table: Print GIC information when MADT is parsed
ARM64 / ACPI: Parse MADT for SMP initialization
ACPI / processor: Make it possible to get CPU hardware ID via GICC
ARM64 / ACPI: Introduce ACPI_IRQ_MODEL_GIC and register device's gsi
ARM64 / ACPI: Parse GTDT to initialize arch timer
Tomasz Nowicki (2):
ACPI / table: Count matched and successfully parsed entries without
specifying max entries
ARM64 / ACPI: Add GICv2 specific ACPI boot support
Documentation/arm64/arm-acpi.txt | 218 +++++++++++++++++++++
Documentation/kernel-parameters.txt | 3 +-
arch/arm64/Kconfig | 3 +
arch/arm64/include/asm/acenv.h | 18 ++
arch/arm64/include/asm/acpi.h | 96 ++++++++++
arch/arm64/include/asm/cpu_ops.h | 1 +
arch/arm64/include/asm/pci.h | 11 ++
arch/arm64/include/asm/psci.h | 3 +-
arch/arm64/include/asm/smp.h | 5 +-
arch/arm64/kernel/Makefile | 1 +
arch/arm64/kernel/acpi.c | 351 ++++++++++++++++++++++++++++++++++
arch/arm64/kernel/cpu_ops.c | 4 +-
arch/arm64/kernel/psci.c | 78 +++++---
arch/arm64/kernel/setup.c | 23 ++-
arch/arm64/kernel/smp.c | 2 +-
arch/arm64/kernel/time.c | 7 +
drivers/acpi/Kconfig | 6 +-
drivers/acpi/Makefile | 6 +-
drivers/acpi/bus.c | 3 +
drivers/acpi/internal.h | 5 +
drivers/acpi/processor_core.c | 37 ++++
drivers/acpi/sleep-arm.c | 28 +++
drivers/acpi/tables.c | 115 +++++++++--
drivers/clocksource/arm_arch_timer.c | 117 ++++++++++--
drivers/irqchip/irq-gic.c | 106 ++++++++++
drivers/irqchip/irqchip.c | 3 +
include/linux/acpi.h | 5 +
include/linux/clocksource.h | 6 +
include/linux/irqchip/arm-gic-acpi.h | 31 +++
include/linux/pci.h | 37 +++-
30 files changed, 1238 insertions(+), 91 deletions(-)
create mode 100644 Documentation/arm64/arm-acpi.txt
create mode 100644 arch/arm64/include/asm/acenv.h
create mode 100644 arch/arm64/include/asm/acpi.h
create mode 100644 arch/arm64/include/asm/pci.h
create mode 100644 arch/arm64/kernel/acpi.c
create mode 100644 drivers/acpi/sleep-arm.c
create mode 100644 include/linux/irqchip/arm-gic-acpi.h
--
1.7.9.5
ACPI 5.1 has been released and now be freely available for
download [1]. It fixed some major gaps to run ACPI on ARM,
this patch just follow the ACPI 5.1 spec and prepare the
code to run ACPI on ARM64.
ACPI 5.1 has some major changes for the following tables and
method which are essential for ARM platforms:
1) MADT table updates.
2) FADT updates for PSCI
3) GTDT
This patch set is the ARM64 ACPI core patches covered MADT, FADT
and GTDT, platform board specific drivers are not covered by this
patch set, but we provide drivers for Juno to boot with ACPI only
in the follwing patch set for review purpose.
We first introduce acpi.c and its related head file which are needed
by ACPI core, and then get RSDP to extract all the ACPI boot-time tables.
When all the boot-time tables (FADT, MADT, GTDT) are ready, then
parse them to init the sytem when booted. Specifically,
a) we use FADT to init PSCI and use PSCI to boot SMP;
b) Use MADT for GIC init and SMP init;
c) GTDT for arch timer init.
This patch set is based on 3.17-rc2 and was tested by Graeme on Juno
and FVP base model boot with ACPI only OK, if you want to test them,
you can pull from acpi-5.1-v3 branch in leg/acpi repo:
git://git.linaro.org/leg/acpi/acpi.git
Updates since v2:
- Refactor the code to make SMP/PSCI init with less sperated init
path by Tomasz
- make ACPI depend on EXPERT
- Address lots of comments from Catalin, Sudeep, Geoff
- Add Juno device ACPI driver patches for review
Updates since v1:
- Set ACPI default off on ARM64 suggested by Olof;
- Rebase the patch set on top of linux-next branch/linux-pm tree which
includes the ACPICA for full ACPI 5.1 support.
- Update the document as suggested;
- Adress lots of comments from Mark, Sudeep, Randy, Naresh, Olof, Geoff
and more...
[1]: http://www.uefi.org/sites/default/files/resources/ACPI_5_1release.pdf
Al Stone (3):
ARM64 / ACPI: Get RSDP and ACPI boot-time tables
ARM64 / ACPI: Introduce early_param for "acpi"
ARM64 / ACPI: Select ACPI_REDUCED_HARDWARE_ONLY if ACPI is enabled on
ARM64
Ashwin Chaugule (1):
ACPI / table: Add new function to get table entries
Graeme Gregory (4):
ARM64 / ACPI: Introduce lowlevel suspend function
ARM64 / ACPI: If we chose to boot from acpi then disable FDT
ARM64 / ACPI: Enable ARM64 in Kconfig
Documentation: ACPI for ARM64
Hanjun Guo (8):
ARM64: Move the init of cpu_logical_map(0) before
unflatten_device_tree()
ARM64 / ACPI: Make PCI optional for ACPI on ARM64
ARM64 / ACPI: Parse FADT table to get PSCI flags for PSCI init
ACPI / table: Print GIC information when MADT is parsed
ARM64 / ACPI: Parse MADT for SMP initialization
ACPI / processor: Make it possible to get CPU hardware ID via GICC
ARM64 / ACPI: Introduce ACPI_IRQ_MODEL_GIC and register device's gsi
ARM64 / ACPI: Parse GTDT to initialize arch timer
Tomasz Nowicki (1):
ARM64 / ACPI: Add GICv2 specific ACPI boot support
Documentation/arm64/arm-acpi.txt | 218 +++++++++++++++++++++
Documentation/kernel-parameters.txt | 3 +-
arch/arm64/Kconfig | 3 +
arch/arm64/include/asm/acenv.h | 18 ++
arch/arm64/include/asm/acpi.h | 108 ++++++++++
arch/arm64/include/asm/cpu_ops.h | 1 +
arch/arm64/include/asm/pci.h | 11 ++
arch/arm64/include/asm/psci.h | 3 +-
arch/arm64/include/asm/smp.h | 5 +-
arch/arm64/kernel/Makefile | 1 +
arch/arm64/kernel/acpi.c | 359 ++++++++++++++++++++++++++++++++++
arch/arm64/kernel/cpu_ops.c | 4 +-
arch/arm64/kernel/irq.c | 5 +
arch/arm64/kernel/psci.c | 78 +++++---
arch/arm64/kernel/setup.c | 23 ++-
arch/arm64/kernel/smp.c | 2 +-
arch/arm64/kernel/time.c | 7 +
drivers/acpi/Kconfig | 6 +-
drivers/acpi/Makefile | 2 +-
drivers/acpi/bus.c | 3 +
drivers/acpi/internal.h | 5 +
drivers/acpi/processor_core.c | 37 ++++
drivers/acpi/tables.c | 113 +++++++++--
drivers/clocksource/arm_arch_timer.c | 117 +++++++++--
drivers/irqchip/irq-gic.c | 114 +++++++++++
include/linux/acpi.h | 5 +
include/linux/clocksource.h | 6 +
include/linux/irqchip/arm-gic-acpi.h | 33 ++++
include/linux/pci.h | 37 +++-
29 files changed, 1237 insertions(+), 90 deletions(-)
create mode 100644 Documentation/arm64/arm-acpi.txt
create mode 100644 arch/arm64/include/asm/acenv.h
create mode 100644 arch/arm64/include/asm/acpi.h
create mode 100644 arch/arm64/include/asm/pci.h
create mode 100644 arch/arm64/kernel/acpi.c
create mode 100644 include/linux/irqchip/arm-gic-acpi.h
--
1.7.9.5
This patch set is example of the sort of driver changes needed to boot
Juno using ACPI tables, which using the ACPI tables devloped for MS
Windows and published by ARM [1].
For the smsc911x driver, it is based on the following ASL fragment
which is part of DSDT for Juno:
// LAN9118 Ethernet
//
Device(ETH0) {
Name(_HID, "ARMH9118")
Name(_UID, Zero)
Name(_CRS, ResourceTemplate() {
Memory32Fixed(ReadWrite, 0x1A000000, 0x1000)
Interrupt(ResourceConsumer, Level, ActiveHigh, Exclusive) { 192 }
})
}
UART driver is just for review purpose, ARM is working on a more
functional UART driver that does not poll to transmit. But it shows
how to initialise SBSA compatible UART without clock definitions in
DSDT.
You also can refer to the boot log from [2].
[1]: https://github.com/ARM-software/edk2/tree/juno-acpi/ArmPlatformPkg/ArmJunoP…
[2]: http://www.xora.org.uk/2014/08/29/juno-booting-from-acpi-tables/
Graeme Gregory (2):
net: smsc911x add support for probing from ACPI
tty: SBSA compatible UART
drivers/net/ethernet/smsc/smsc911x.c | 38 ++++
drivers/tty/Kconfig | 6 +
drivers/tty/Makefile | 1 +
drivers/tty/sbsauart.c | 328 ++++++++++++++++++++++++++++++++++
4 files changed, 373 insertions(+)
create mode 100644 drivers/tty/sbsauart.c
--
1.7.9.5
This patchset introduces CPPC(Collaborative Processor Performance Control) as a backend
to the PID governor. The PID governor from intel_pstate.c maps cleanly onto some CPPC
interfaces.
e.g. The CPU performance requests are made on a continuous scale as against discrete pstate
levels. The CPU performance feedback over an interval is gauged using platform specific
counters which are also described by CPPC.
Although CPPC describes several other registers to provide more hints to the platform,
Linux as of today does not have the infrastructure to make use of those registers.
Some of the CPPC specific information could be made available from the scheduler as
part of the CPUfreq and Scheduler intergration work. Until then PID can be used as the
front end for CPPC.
Beyond code restructuring and renaming, this patchset does not change the logic from the
intel_pstate.c driver. Kernel compilation times were compared with the original intel_pstate.c,
intel backend(intel_pid_ctrl.c) and the CPPC backend and no significant overheads were noticed.
Testing was performed on a Thinkpad X240 laptop.
PID_CTRL + INTEL_PSTATE:
=======================
real 5m37.742s
user 18m42.575s
sys 1m0.521s
PID_CTRL + CPPC_PID_CTRL:
========================
real 5m48.321s
user 18m24.487s
sys 0m59.327s
ORIGINAL INTEL_PSTATE:
======================
real 5m40.642s
user 18m37.411s
sys 1m0.185s
The complete patchset including the PCC hacks used for testing is available in [4].
Changes since V0: [1]
- Split intel_pstate.c into a generic PID governor and platform specific backend.
- Add CPPC accessors as PID backend.
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. The PCC driver is being discussed in a
separate patchset [3] and is not included here, since CPPC is only one client of PCC.
Finer details about the PCC and CPPC spec are available in the latest ACPI 5.1
specification.[2]
[1] - http://lwn.net/Articles/608715/
[2] - http://www.uefi.org/sites/default/files/resources/ACPI_5_1release.pdf
[3] - http://comments.gmane.org/gmane.linux.acpi.devel/70299
[4] - http://git.linaro.org/people/ashwin.chaugule/leg-kernel.git/shortlog/refs/h…
Ashwin Chaugule (6):
PID Controller governor
PID: Move Turbo detection into backend driver
PID: Move Baytrail specific accessors into backend driver
PID: Add new function pointers to read multiple registers
PID: Rename counters to make them more generic
PID: Add CPPC (Collaborative Processor Performance) backend driver
Documentation/cpu-freq/intel-pstate.txt | 43 --
Documentation/cpu-freq/pid_ctrl.txt | 41 ++
drivers/cpufreq/Kconfig | 19 +
drivers/cpufreq/Kconfig.x86 | 2 +-
drivers/cpufreq/Makefile | 4 +-
drivers/cpufreq/cppc_pid_ctrl.c | 406 +++++++++++++
drivers/cpufreq/intel_pid_ctrl.c | 408 +++++++++++++
drivers/cpufreq/intel_pstate.c | 1012 -------------------------------
drivers/cpufreq/pid_ctrl.c | 615 +++++++++++++++++++
drivers/cpufreq/pid_ctrl.h | 113 ++++
10 files changed, 1606 insertions(+), 1057 deletions(-)
delete mode 100644 Documentation/cpu-freq/intel-pstate.txt
create mode 100644 Documentation/cpu-freq/pid_ctrl.txt
create mode 100644 drivers/cpufreq/cppc_pid_ctrl.c
create mode 100644 drivers/cpufreq/intel_pid_ctrl.c
delete mode 100644 drivers/cpufreq/intel_pstate.c
create mode 100644 drivers/cpufreq/pid_ctrl.c
create mode 100644 drivers/cpufreq/pid_ctrl.h
--
1.9.1
Changes since V5:
- Optimize loop that matches channel request.
- Use platform_create_bundle.
- Replace ioread/writes.
- Remove redundant code and headers.
- Restructure common mailbox macros.
- Reformat PCC cmd parsing.
Changes since V4:
- Folded PCC Mailbox helpers into pcc.c
Changes since V3:
- Added PCC helper functions to work around "struct device" limitations.
- PCC driver changes to work with PCC specific Mailbox helpers.
Changes since V2:
- Rebased on top of git://git.linaro.org/landing-teams/working/fujitsu/integration.git
branch mailbox-for-3.17
- Added PCC API to mailbox framework as per Arnd's suggestion to allow usage without ACPI.
Changes since V1:
- Integration with Mailbox framework - https://lkml.org/lkml/2014/5/15/49
This patchset adds support for the PCC (Platform Communication Channel)
interface as described in the current ACPI 5.0 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 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.
Ashwin Chaugule (2):
Mailbox: Add support for Platform Communication Channel
PCC test
drivers/mailbox/Kconfig | 12 ++
drivers/mailbox/Makefile | 2 +
drivers/mailbox/mailbox.c | 4 +-
drivers/mailbox/mailbox.h | 16 +++
drivers/mailbox/pcc-test.c | 203 +++++++++++++++++++++++++++++++++
drivers/mailbox/pcc.c | 279 +++++++++++++++++++++++++++++++++++++++++++++
6 files changed, 513 insertions(+), 3 deletions(-)
create mode 100644 drivers/mailbox/mailbox.h
create mode 100644 drivers/mailbox/pcc-test.c
create mode 100644 drivers/mailbox/pcc.c
--
1.9.1
Changes since V4:
- Folded PCC Mailbox helpers into pcc.c
Changes since V3:
- Added PCC helper functions to work around "struct device" limitations.
- PCC driver changes to work with PCC specific Mailbox helpers.
Changes since V2:
- Rebased on top of git://git.linaro.org/landing-teams/working/fujitsu/integration.git
branch mailbox-for-3.17
- Added PCC API to mailbox framework as per Arnd's suggestion to allow usage without ACPI.
Changes since V1:
- Integration with Mailbox framework - https://lkml.org/lkml/2014/5/15/49
This patchset adds support for the PCC (Platform Communication Channel)
interface as described in the current ACPI 5.0 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 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.
Ashwin Chaugule (2):
Mailbox: Add support for Platform Communication Channel
PCC test
drivers/mailbox/Kconfig | 12 ++
drivers/mailbox/Makefile | 2 +
drivers/mailbox/mailbox.c | 4 -
drivers/mailbox/pcc-test.c | 207 ++++++++++++++++++++++++++
drivers/mailbox/pcc.c | 297 +++++++++++++++++++++++++++++++++++++
include/linux/mailbox_controller.h | 4 +
6 files changed, 522 insertions(+), 4 deletions(-)
create mode 100644 drivers/mailbox/pcc-test.c
create mode 100644 drivers/mailbox/pcc.c
--
1.9.1
Changes since V3:
- Added PCC helper functions to work around "struct device" limitations.
- PCC driver changes to work with PCC specific Mailbox helpers.
Changes since V2:
- Rebased on top of git://git.linaro.org/landing-teams/working/fujitsu/integration.git
branch mailbox-for-3.17
- Added PCC API to mailbox framework as per Arnd's suggestion to allow usage without ACPI.
Changes since V1:
- Integration with Mailbox framework - https://lkml.org/lkml/2014/5/15/49
This patchset adds support for the PCC (Platform Communication Channel)
interface as described in the current ACPI 5.0 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 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.
Ashwin Chaugule (4):
Mailbox: Prepare to add PCC Mailbox support
Mailbox: Add PCC Mailbox Helper functions
Mailbox: Add support for Platform Communication Channel
PCC test
drivers/mailbox/Kconfig | 19 +++
drivers/mailbox/Makefile | 4 +
drivers/mailbox/mailbox.c | 10 +-
drivers/mailbox/pcc-test.c | 208 +++++++++++++++++++++++++++++++
drivers/mailbox/pcc.c | 245 +++++++++++++++++++++++++++++++++++++
drivers/mailbox/pcc_mailbox.c | 136 ++++++++++++++++++++
include/linux/mailbox_controller.h | 4 +
7 files changed, 619 insertions(+), 7 deletions(-)
create mode 100644 drivers/mailbox/pcc-test.c
create mode 100644 drivers/mailbox/pcc.c
create mode 100644 drivers/mailbox/pcc_mailbox.c
--
1.9.1
Changes since V3:
- Added PCC helper functions to work around "struct device" limitations.
- PCC driver changes to work with PCC specific Mailbox helpers.
Changes since V2:
- Rebased on top of git://git.linaro.org/landing-teams/working/fujitsu/integration.git
branch mailbox-for-3.17
- Added PCC API to mailbox framework as per Arnd's suggestion to allow usage without ACPI.
Changes since V1:
- Integration with Mailbox framework - https://lkml.org/lkml/2014/5/15/49
This patchset adds support for the PCC (Platform Communication Channel)
interface as described in the current ACPI 5.0 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 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.
Ashwin Chaugule (4):
Mailbox: Prepare to add PCC Mailbox support
Mailbox: Add PCC Mailbox Helper functions
Mailbox: Add support for Platform Communication Channel
PCC test
drivers/mailbox/Kconfig | 19 +++
drivers/mailbox/Makefile | 4 +
drivers/mailbox/mailbox.c | 10 +-
drivers/mailbox/pcc-test.c | 208 +++++++++++++++++++++++++++++++
drivers/mailbox/pcc.c | 245 +++++++++++++++++++++++++++++++++++++
drivers/mailbox/pcc_mailbox.c | 136 ++++++++++++++++++++
include/linux/mailbox_controller.h | 4 +
7 files changed, 619 insertions(+), 7 deletions(-)
create mode 100644 drivers/mailbox/pcc-test.c
create mode 100644 drivers/mailbox/pcc.c
create mode 100644 drivers/mailbox/pcc_mailbox.c
--
1.9.1
This patchset adds support for the PCC (Platform Communication Channel)
interface as described in the current ACPI 5.0 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 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.
Changes since V2:
- Rebased on top of git://git.linaro.org/landing-teams/working/fujitsu/integration.git
branch mailbox-for-3.17
- Added PCC API to mailbox framework as per Arnd's suggestion to allow usage without ACPI.
Changes since V1:
-Integration with Mailbox framework - https://lkml.org/lkml/2014/5/15/49
Ashwin Chaugule (3):
Mailbox: Add support for PCC mailbox and channels
Add support for Platform Communication Channel
PCC-test: Test driver to trigger PCC commands
drivers/mailbox/Kconfig | 12 ++
drivers/mailbox/Makefile | 2 +
drivers/mailbox/mailbox.c | 118 +++++++++++++++++--
drivers/mailbox/pcc-test.c | 208 +++++++++++++++++++++++++++++++++
drivers/mailbox/pcc.c | 228 +++++++++++++++++++++++++++++++++++++
include/linux/mailbox_client.h | 6 +
include/linux/mailbox_controller.h | 1 +
7 files changed, 568 insertions(+), 7 deletions(-)
create mode 100644 drivers/mailbox/pcc-test.c
create mode 100644 drivers/mailbox/pcc.c
--
1.9.1
ACPI 5.1 has been released and now be freely available for
download [1]. It fixed some major gaps to run ACPI on ARM,
this patch just follow the ACPI 5.1 spec and prepare the
code to run ACPI on ARM64.
ACPI 5.1 has some major changes for the following tables and
method which are essential for ARM platforms:
1) MADT table updates.
New fields were introduced to cover MPIDR and virtualization in
GICC, and introduce GICR and GIC MSI frame structure to cover
GICv3 and GICv2m (this patch set only cover GICv2).
2) FADT updates for PSCI
New fields were introduced to cover PSCI and ACPI can use psci
to boot SMP and other PSCI related functions.
3) GTDT
GTDT was updated to support arch timer, memory-mapped tiemr,
SBSA watchdog timer, in this patch, only arch timer tested on
Juno board, so only arch timer init is available.
4) _DSD
_DSD (Device Specific Data) will provide some key values which
presented by FDT before, it makes possible that some devices can
be emumerated in ACPI way, please refer to the document provided
in this patch set for detail.
This patch set is the ARM64 ACPI core patches covered MADT, FADT
and GTDT, _DSD is not covered in this patch set. We first introduce
acpi.c and its related head file which are needed by ACPI core, and
then get RSDP to extract all the ACPI boot-time tables.
When all the boot-time tables (FADT, MADT, GTDT) are ready, then
parse them to init the sytem when booted. Specifically,
a) we use FADT to init PSCI and use PSCI to boot SMP;
b) Use MADT for GIC init and SMP init;
c) GTDT for arch timer init.
This patch set is based on Rafael's linux-pm tree/linux-next branch,
and I already compiled it OK with:
a) each patch applied on ARM64 with CONFIG_ACPI=y;
b) CONFIG_ACPI=n on ARM64;
c) CONFIG_ACPI=y on x86.
Updates since v1:
- Set ACPI default off on ARM64 suggested by Olof;
- Rebase the patch set on top of linux-next branch/linux-pm tree which
includes the ACPICA for full ACPI 5.1 support.
- Update the document as suggested;
- Adress lots of comments from Mark, Sudeep, Randy, Naresh, Olof, Geoff
and more...
[1]
http://www.uefi.org/sites/default/files/resources/ACPI_5_1release.pdf
Al Stone (3):
ARM64 / ACPI: Get RSDP and ACPI boot-time tables
ARM64 / ACPI: Select ACPI_REDUCED_HARDWARE_ONLY if ACPI is enabled on
ARM64
ARM64 / ACPI: Introduce early_param for "acpi" and set ACPI default
off
Ashwin Chaugule (1):
ACPI / table: Add new function to get table entries
Graeme Gregory (4):
ARM64 / ACPI: Introduce lowlevel suspend function
ARM64 / ACPI: If we chose to boot from acpi then disable FDT
ARM64 / ACPI: Enable ARM64 in Kconfig
Documentation: ACPI for ARM64
Hanjun Guo (9):
ARM64: Move the init of cpu_logical_map(0) before
unflatten_device_tree()
ARM64 / ACPI: Make PCI optional for ACPI on ARM64
ARM64 / ACPI: Parse FADT table to get PSCI flags for PSCI init
ARM64 / ACPI: Parse MADT to map logical cpu to MPIDR and get
cpu_possible/present_map
ACPI / table: Print GIC information when MADT is parsed
ARM64 / ACPI: Get the enable method for SMP initialization in ACPI
way
ACPI / processor: Make it possible to get CPU hardware ID via GICC
ARM64 / ACPI: Introduce ACPI_IRQ_MODEL_GIC and register device's gsi
ARM64 / ACPI: Parse GTDT to initialize arch timer
Tomasz Nowicki (1):
ARM64 / ACPI: Add GICv2 specific ACPI boot support
Documentation/arm64/arm-acpi.txt | 215 +++++++++++++++++++
Documentation/kernel-parameters.txt | 5 +-
arch/arm64/Kconfig | 3 +
arch/arm64/include/asm/acenv.h | 18 ++
arch/arm64/include/asm/acpi.h | 113 ++++++++++
arch/arm64/include/asm/cpu.h | 11 +
arch/arm64/include/asm/pci.h | 11 +
arch/arm64/include/asm/smp.h | 3 +-
arch/arm64/kernel/Makefile | 1 +
arch/arm64/kernel/acpi.c | 380 ++++++++++++++++++++++++++++++++++
arch/arm64/kernel/cpu_ops.c | 62 +++++-
arch/arm64/kernel/irq.c | 5 +
arch/arm64/kernel/psci.c | 89 ++++++--
arch/arm64/kernel/setup.c | 13 +-
arch/arm64/kernel/smp.c | 37 +++-
arch/arm64/kernel/time.c | 7 +
drivers/acpi/Kconfig | 6 +-
drivers/acpi/Makefile | 2 +-
drivers/acpi/bus.c | 3 +
drivers/acpi/internal.h | 5 +
drivers/acpi/processor_core.c | 37 ++++
drivers/acpi/tables.c | 109 ++++++++--
drivers/clocksource/arm_arch_timer.c | 117 +++++++++--
drivers/irqchip/irq-gic.c | 114 ++++++++++
include/linux/acpi.h | 5 +
include/linux/clocksource.h | 6 +
include/linux/irqchip/arm-gic-acpi.h | 36 ++++
include/linux/pci.h | 37 +++-
28 files changed, 1359 insertions(+), 91 deletions(-)
create mode 100644 Documentation/arm64/arm-acpi.txt
create mode 100644 arch/arm64/include/asm/acenv.h
create mode 100644 arch/arm64/include/asm/acpi.h
create mode 100644 arch/arm64/include/asm/cpu.h
create mode 100644 arch/arm64/include/asm/pci.h
create mode 100644 arch/arm64/kernel/acpi.c
create mode 100644 include/linux/irqchip/arm-gic-acpi.h
--
1.7.9.5
Hello,
Apologies in advance for a lengthy cover letter. Hopefully it has all the
required information so you dont need to read the ACPI spec. ;)
This patchset introduces the ideas behind CPPC (Collaborative Processor
Performance Control) and implements support for controlling CPU performance
using the existing PID (Proportional-Integral-Derivative) controller (from
intel_pstate.c) and some CPPC semantics.
The patchwork is not a final proposal of the CPPC implementation. I've had
to hack some sections due to lack of hardware, details of which are in the
Testing section.
There are several bits of information which are needed in order to make CPPC
work great on Linux based platforms and I'm hoping to start a wider discussion on
how to address the missing bits. The following sections briefly introduce CPPC
and later highlight the information which is missing.
More importantly, I'm also looking for ideas on how to support CPPC in the short
term, given that we will soon be seeing products based on ARM64 and X86 which
support CPPC.[1] Although we may not have all the information, we could make it
work with existing governors in a way this patchset demonstrates. Hopefully,
this approach is acceptable for mainline inclusion in the short term.
Finer details about the CPPC spec are available in the latest ACPI 5.1
specification.[2]
If these issues are being discussed on some other thread or elsewhere, or if
someone is already working on it, please let me know. Also, please correct me if
I have misunderstood anything.
What is CPPC:
=============
CPPC is the new interface for CPU performance control between the OS and the
platform defined in ACPI 5.0+. The interface is built on an abstract
representation of CPU performance rather than raw frequency. Basic operation
consists of:
* Platform enumerates supported performance range to OS
* OS requests desired performance level over some time window along
with min and max instantaneous limits
* Platform is free to optimize power/performance within bounds provided by OS
* Platform provides telemetry back to OS on delivered performance
Communication with the OS is abstracted via another ACPI construct called
Platform Communication Channel (PCC) which is essentially a generic shared
memory channel with doorbell interrupts going back and forth. This abstraction
allows the “platform” for CPPC to be a variety of different entities – driver,
firmware, BMC, etc.
CPPC describes the following registers:
* HighestPerformance: (read from platform)
Indicates the highest level of performance the processor is theoretically
capable of achieving, given ideal operating conditions.
* Nominal Performance: (read from platform)
Indicates the highest sustained performance level of the processor. This is the
highest operating performance level the CPU is expected to deliver continuously.
* LowestNonlinearPerformance: (read from platform)
Indicates the lowest performance level of the processor with non- linear power
savings.
* LowestPerformance: (read from platform)
Indicates the lowest performance level of the processor.
* GuaranteedPerformanceRegister: (read from platform)
Optional. If supported, contains register to read the current guaranteed
performance from. This is current max sustained performance of the CPU taking
into account all budgeting constraints. This can change at runtime and is
notified to the OS via ACPI notification mechanisms.
* DesiredPerformanceRegister: (write to platform)
Register to write desired performance level from the OS.
* MinimumPerformanceRegister: (write to platform)
Optional. This is the min allowable performance as requested by the OS.
* MaximumPerformanceRegister: (write to platform)
Optional. This is the max allowable performance as requested by the OS.
* PerformanceReductionToleranceRegister (write to platform)
Optional. This is the deviation below the desired perf value as requested by the
OS. If the Time window register(below) is supported, then this value is the min
performance on average over the time window that the OS desires.
* TimeWindowRegister: (write to platform)
Optional. The OS requests desired performance over this time window.
* CounterWraparoundTime: (read from platform)
Optional. Min time before the performance counters wrap around.
* ReferencePerformanceCounterRegister: (read from platform)
A counter that increments proportionally to the reference performance of the
processor.
* DeliveredPerformanceCounterRegister: (read from platform)
Delivered perf = reference perf * delta(delivered perf ctr)/delta(ref perf ctr)
* PerformanceLimitedRegister: (read from platform)
This is set by the platform in the event that it has to limit available
performance due to thermal or budgeting constraints.
* CPPCEnableRegister: (read/write from platform)
Enable/disable CPPC
* AutonomousSelectionEnable:
Platform decides CPU performance level w/o OS assist.
* AutonomousActivityWindowRegister:
This influences the increase or decrease in cpu performance of the platforms
autonomous selection policy.
* EnergyPerformancePreferenceRegister:
Provides a energy or perf bias hint to the platform when in autonomous mode.
* Reference Performance: (read from platform)
Indicates the rate at which the reference counter increments.
Whats missing in CPPC:
=====================
Currently CPPC makes no mention of power. However, this could be added in future
versions of the spec.
e.g. although CPPC works off of a continuous range of CPU perf levels, we could
discretize the scale such that we only extract points where the power level changes
substantially between CPU perf levels and export this information to the
scheduler.
Whats missing in the kernel:
============================
We may have some of this information in the scheduler, but I couldn't see a good way
to extract it for CPPC yet.
(1) An intelligent way to provide a min/max bound and a desired value for CPU
performance.
(2) A timing window for the platform to deliver requested performance within
bounds. This could be a kind of sampling interval between consecutive reads of
delivered cpu performance.
(3) Centralized decision making by any CPU in a freq domain for all its
siblings.
The last point needs some elaboration:
I see that the CPUfreq layer allows defining "related CPUs" and that we can have
the same policy for CPUs in the same freq domain and one governor per policy.
However, from what I could tell, there are at least 2 baked in assumptions in
this layer which break things at least for platforms like ARM (Please correct me
if I'm wrong!)
(a) All CPUs run at the exact same max, min and cur freq.
(b) Any CPU always gets exactly the freq it asked for.
So, although the CPUFreq layer is capable of making somewhat centralized cpufreq
decisions for CPUs under the same policy, it seems to be deciding things under
the wrong/inapplicable assumptions. Moreover only one CPU is in charge of
policy handling at a time and the policy handling is shifted to another CPU in the
domain, only if the former CPU is hotplugged out.
Not having a proper centralized decision maker adversely affects power saving
possibilities in platforms that can't distinguish when a CPU requests a specific
freq and then goes to sleep. This potentially has the effect of keeping other
CPUs in the domain running at a much higher frequency than required, while the
initial requester is deep asleep.
So, for point (3), I'm not sure which path we should take among the following:
(I) Fix cpufreq layer and add CPPC support as a cpufreq_driver. (a) Change
every call to get freq to make it read h/w registers and then snap value back to
freq table. This way, cpufreq can keep its idea of freq current. However, this
may end up waking CPUs to read counters, unless they are mem mapped. (b) Allow
any CPU in the "related_cpus" mask to make policy decisions on behalf of
siblings. So the policy maker switching is not tied to hotplug.
(II) Not touch CPUfreq and use the PID algorithm instead, but change the busyness
calculation to accumulate busyness values from all CPUs in common domain.
Requires implementation of domain awareness.
(III) Address these issues in the upcoming CPUfreq/CPUidle integration layer(?)
(IV) Handle it in the platform or lose out. I understand this has some potential
for adding latency to cpu freq requests so it may not be possible for all
platforms.
(V) ..?
For points (1) and (2), the long term solution IMHO is to work it out along with the
scheduler CPUFreq/CPUidle integration. But its not clear to me what would be
the best short term approach. I'd greatly appreciate any suggestions/comments.
If anyone is already working on these issues, please CC me as well.
Test setup:
==========
For the sake of experiments, I used the Thinkpad x240 laptop, which advertises
CPPC tables in its ACPI firmware. The PCC and CPPC drivers included in this
patchset are able to parse the tables and get all the required addresses.
However, it seems that this laptop doesn't implement PCC doorbell and the
firmware side of CPPC. The PCC doorbell calls would just wait forever. Not sure
whats going on there. So, I had to hack it and emulate what the platform
would've done to some extent.
I extracted the PID algo from intel_pstate.c and modified it with CPPC function
wrappers. It shouldn't be hard to replace PID with anything else we think is
suitable. In the long term, I hope we can make CPPC calls directly from the
scheduler.
There are two versions of the low level CPPC accessors. The one included in the
patchset is how I'd imagine it would work with platforms that completely
implement CPPC in firmware.
The other version is here [5]. This should help with DT or platforms with broken
firmware, enablement purposes etc.
I ran a simple kernel compilation with intel_pstate.c and the CPPC modified
version as the governors and saw no real difference in compile times. So no new
overheads added.
I verified that CPU freq requests were taken by reading out the PERF_STATUS register.
[1] - See the HWP section 14.4 http://www.intel.com/content/dam/www/public/us/en/documents/manuals/64-ia-3…
[2] - http://www.uefi.org/sites/default/files/resources/ACPI_5_1release.pdf
[3] - https://plus.google.com/+TheodoreTso/posts/2vEekAsG2QT
[4] - https://plus.google.com/+ArjanvandeVen/posts/dLn9T4ehywL
[5] - http://git.linaro.org/people/ashwin.chaugule/leg-kernel.git/blob/236d901d31…
Ashwin Chaugule (3):
ACPI: Add support for Platform Communication Channel
CPPC: Add support for Collaborative Processor Performance Control
CPPC: Add ACPI accessors to CPC registers
drivers/acpi/Kconfig | 10 +
drivers/acpi/Makefile | 1 +
drivers/acpi/pcc.c | 301 +++++++++++++++
drivers/cpufreq/Kconfig | 19 +
drivers/cpufreq/Makefile | 2 +
drivers/cpufreq/cppc.c | 874 ++++++++++++++++++++++++++++++++++++++++++++
drivers/cpufreq/cppc.h | 181 +++++++++
drivers/cpufreq/cppc_acpi.c | 80 ++++
8 files changed, 1468 insertions(+)
create mode 100644 drivers/acpi/pcc.c
create mode 100644 drivers/cpufreq/cppc.c
create mode 100644 drivers/cpufreq/cppc.h
create mode 100644 drivers/cpufreq/cppc_acpi.c
--
1.9.1
The flag definitions of TimerFlags and VirtualTimerFlags in
struct acpi_gtdt_timer_entry is missing, fix it.
Signed-off-by: Hanjun Guo <hanjun.guo(a)linaro.org>
---
Those two patches are for ACPICA, I will send them to Bob and Lv.
---
source/include/actbl3.h | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/source/include/actbl3.h b/source/include/actbl3.h
index b30e80f..1e59241 100644
--- a/source/include/actbl3.h
+++ b/source/include/actbl3.h
@@ -432,6 +432,10 @@ typedef struct acpi_gtdt_timer_entry
} ACPI_GTDT_TIMER_ENTRY;
+/* Flag Definitions: TimerFlags and VirtualTimerFlags above */
+
+#define ACPI_GTDT_GT_INTERRUPT_TRIGGER_MODE (1)
+#define ACPI_GTDT_GT_INTERRUPT_POLARITY (1<<1)
/* Flag Definitions: CommonFlags above */
--
1.7.9.5
Add the general description for GPIO on JUNO board. Define
pin number 256 as power button function (for demo) in
this patch. However,JUNO has no GPIO controller in hardware,
Using GPIO event emulation which can trigger the GPIO action,
then test the GPIO-signal event model for ACPI.
Signed-off-by: Yi Li <yi.li(a)linaro.org>
---
ArmPlatformPkg/ArmJunoPkg/AcpiTables/juno/dsdt.asl | 42 ++++++++++++++++++++
1 file changed, 42 insertions(+)
diff --git a/ArmPlatformPkg/ArmJunoPkg/AcpiTables/juno/dsdt.asl b/ArmPlatformPkg/ArmJunoPkg/AcpiTables/juno/dsdt.asl
index 5bfd521..e4e9cad 100644
--- a/ArmPlatformPkg/ArmJunoPkg/AcpiTables/juno/dsdt.asl
+++ b/ArmPlatformPkg/ArmJunoPkg/AcpiTables/juno/dsdt.asl
@@ -58,6 +58,48 @@ DefinitionBlock (
}
}
+ //GPIO controller description
+ Device (GPO0)
+ {
+ Name (_HID, "LNRO0009")
+ Name (_ADR, 0)
+ Name (_UID, 0)
+
+ Name (_CRS, ResourceTemplate () {
+ //GPIO Register Interface(demo,need to modify by the real h/w setting)
+ Memory32Fixed (ReadWrite, 0x1c010000, 0x1000)
+
+ //Interrupt vector 0x80 for GPIO controller(demo,need to modify by the real h/w setting)
+ Interrupt (ResourceConsumer, Edge, ActiveLow, Exclusive) {0x80}
+ })
+
+ Name (_AEI,ResourceTemplate () {
+ //Assume GPIO256 as PowerButton
+ GpioInt(Edge, ActiveLow, ExclusiveAndWake, PullUp, , " \\_SB.GPO0") {0x100}
+ })
+
+ //Handle all ACPI Events signaled by GPIO Controller GPO0
+ Method (_EVT, 0x1, Serialized)
+ {
+ //Arg0 - EventNumber. An Integer indicating the event number.
+ //(Controller-relative zero-based GPIO pin number) of the current event.
+ //Must be in the range 0x0000 - 0xffff.
+ Switch (ToInteger(Arg0))
+ {
+ //Pin number 256
+ Case (0x100)
+ {
+ //Notify OSPM the power button is pressed
+ Notify (PWRB, 0x80)
+ }
+ Default
+ {
+
+ }
+ }
+ }
+ }
+
//Power button device description
Device (PWRB)
{
--
1.7.9.5
Add the power button description on juno board, notify power
button with 0x80 value, the OS will detect the power button
is pressed, how to deal with the event which depends on OS's
policy. Usually the acpid deamon will call the specific
script to let OS shutdown.
Signed-off-by: Yi Li <yi.li(a)linaro.org>
---
ArmPlatformPkg/ArmJunoPkg/AcpiTables/juno/dsdt.asl | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/ArmPlatformPkg/ArmJunoPkg/AcpiTables/juno/dsdt.asl b/ArmPlatformPkg/ArmJunoPkg/AcpiTables/juno/dsdt.asl
index bdee349..5bfd521 100644
--- a/ArmPlatformPkg/ArmJunoPkg/AcpiTables/juno/dsdt.asl
+++ b/ArmPlatformPkg/ArmJunoPkg/AcpiTables/juno/dsdt.asl
@@ -58,6 +58,19 @@ DefinitionBlock (
}
}
+ //Power button device description
+ Device (PWRB)
+ {
+ Name (_HID, EISAID("PNP0C0C"))
+ Name (_ADR, 0)
+ Name (_UID, 0)
+
+ Method (_STA, 0x0, Notserialized)
+ {
+ Return (0x0F)
+ }
+ }
+
// apb_pclk
Device (CLK0) {
Name (_HID, "LNRO0008")
--
1.7.9.5
From: Al Stone <al.stone(a)linaro.org>
These patches are my best guess at initial ACPI tables for
XGene, in accordance with the new ACPI 5.1 specification.
These have not been fully tested yet but that process has
been started.
Al Stone (3):
APM / XGene: Minor cleanup of some of the basics
APM / XGene: Update core tables to replace ACPI 5.1 changes
APM / XGene: Add in empty SSDT for future use in developing complete
tables
platforms/APMXGene.acpi/APMXGene.manifest | 1 +
platforms/APMXGene.acpi/Apic.asl | 262 ++--
platforms/APMXGene.acpi/Dsdt.asl | 2215 ++++++++++++++++-------------
platforms/APMXGene.acpi/Facp.asl | 57 +-
platforms/APMXGene.acpi/Gtdt.asl | 87 +-
platforms/APMXGene.acpi/Rsdp.asl | 2 +-
platforms/APMXGene.acpi/Ssdt.asl | 21 +
platforms/APMXGene.acpi/Xsdt.asl | 10 +-
8 files changed, 1508 insertions(+), 1147 deletions(-)
create mode 100644 platforms/APMXGene.acpi/Ssdt.asl
--
1.9.3
Hello,
what is the current state of libacpica for aarch64? Are packages
available from Linaro (static libs and includes would be best)? Is it
available on which linaro trees? Is anything already in upstream
libacpica?
Thank you,
Claudio
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 architecture - HAVE_ACPI_APEI_NMI
- group and wrap around #ifdef CONFIG_HAVE_ACPI_APEI_NMI code which
is used only for NMI path
- identify architectural boxes and abstract it accordingly (tlb flush 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 hard selected for x86. Architectures that want to use this
feature should also provide NMI code infrastructure.
V1->V2
- address Borislav's comment
- abstract arch-specific calls instead of wrapping into the #ifdef
V2->V3
- address Robert's comment
- disable ACPI_APEI_NMI selection so that it is hard selected by arch Kconfig
- rename ACPI_APEI_NMI to ARCH_HAS_ACPI_APEI_NMI
V3->V4
- do not abstract NMI calls for archs which do not support it
- merge some of patches to make review process easier
V4->V5
- markers for preprocessor statements (#else, #endif) around long code block
Tomasz Nowicki (3):
apei, mce: Factor out APEI architecture specific MCE calls.
acpi, apei, ghes: Make NMI error notification to be GHES architecture
extension.
acpi, apei, ghes: Factor out ioremap virtual memory for IRQ and NMI
context.
arch/x86/Kconfig | 2 +
arch/x86/kernel/acpi/Makefile | 1 +
arch/x86/kernel/acpi/apei.c | 62 +++++++++++++++
drivers/acpi/apei/Kconfig | 8 +-
drivers/acpi/apei/apei-base.c | 13 ++++
drivers/acpi/apei/ghes.c | 173 +++++++++++++++++++++++++++---------------
drivers/acpi/apei/hest.c | 29 +------
include/acpi/apei.h | 4 +
include/linux/nmi.h | 4 +
9 files changed, 204 insertions(+), 92 deletions(-)
create mode 100644 arch/x86/kernel/acpi/apei.c
--
1.9.1
This patch set have no function change for x86 and ia64 and
just do some clean up to prepare for running ACPI on ARM64.
This patch set is splited out from the patch set [1]
"[PATCH v4 00/13] Enable ACPI on ARM64 in Kconfig" and hope it
can be merged first before ARM64 ACPI core patches.
[1]: https://lkml.org/lkml/2014/6/26/627
update from v2:
Don not select ACPI_LEGACY_TABLES_LOOKUP on IA64 which
is catched by Peter.
update from v1:
1. Drop "Make EC debugfs depend on X86 || IA64 in Kconfig";
2. Rename ACPI_SCAN_BIOS_NOT_EFI to ACPI_LEGACY_TABLES_LOOKUP
suggested by Rafael;
3. Rename ARCH_HAS_ACPI_PDC to ARCH_MIGHT_HAVE_ACPI_PDC suggested by Rafael;
4. Remove the help for ARCH_MIGHT_HAVE_ACPI_PDC because it can't be selected;
5. Rename acpi_arch_is_smp() to acpi_has_cpu_in_madt() to be more
explicit and easy understanding.
Graeme Gregory (2):
ACPI: ARM64 does not have a BIOS add config for BIOS table scan.
ACPI: Don't use acpi_lapic in ACPI core code
Hanjun Guo (1):
ACPI / processor: Introduce ARCH_HAS_ACPI_PDC
arch/ia64/Kconfig | 1 +
arch/ia64/include/asm/acpi.h | 5 +
arch/x86/Kconfig | 2 +
arch/x86/include/asm/acpi.h | 5 +
drivers/acpi/Kconfig | 6 ++
drivers/acpi/Makefile | 1 +
drivers/acpi/acpi_processor.c | 2 +-
drivers/acpi/internal.h | 5 +
drivers/acpi/osl.c | 4 +-
drivers/acpi/processor_core.c | 198 ---------------------------------------
drivers/acpi/processor_pdc.c | 206 +++++++++++++++++++++++++++++++++++++++++
11 files changed, 235 insertions(+), 200 deletions(-)
create mode 100644 drivers/acpi/processor_pdc.c
--
1.7.9.5
This patch set have no function change for x86 and ia64 and
just do some clean up to prepare for running ACPI on ARM64.
This patch set is splited out from the patch set [1]
"[PATCH v4 00/13] Enable ACPI on ARM64 in Kconfig" and hope it
can be merged first before ARM64 ACPI core patches.
[1]: https://lkml.org/lkml/2014/6/26/627
update from v1:
1. Drop "Make EC debugfs depend on X86 || IA64 in Kconfig";
2. Rename ACPI_SCAN_BIOS_NOT_EFI to ACPI_LEGACY_TABLES_LOOKUP
suggested by Rafael;
3. Rename ARCH_HAS_ACPI_PDC to ARCH_MIGHT_HAVE_ACPI_PDC suggested by Rafael;
4. Remove the help for ARCH_MIGHT_HAVE_ACPI_PDC because it can't be selected;
5. Rename acpi_arch_is_smp() to acpi_has_cpu_in_madt() to be more
explicit and easy understanding.
Graeme Gregory (2):
ACPI: ARM64 does not have a BIOS add config for BIOS table scan.
ACPI: Don't use acpi_lapic in ACPI core code
Hanjun Guo (1):
ACPI / processor: Introduce ARCH_HAS_ACPI_PDC
arch/ia64/Kconfig | 2 +
arch/ia64/include/asm/acpi.h | 5 +
arch/x86/Kconfig | 2 +
arch/x86/include/asm/acpi.h | 5 +
drivers/acpi/Kconfig | 6 ++
drivers/acpi/Makefile | 1 +
drivers/acpi/acpi_processor.c | 2 +-
drivers/acpi/internal.h | 5 +
drivers/acpi/osl.c | 4 +-
drivers/acpi/processor_core.c | 198 ---------------------------------------
drivers/acpi/processor_pdc.c | 206 +++++++++++++++++++++++++++++++++++++++++
11 files changed, 236 insertions(+), 200 deletions(-)
create mode 100644 drivers/acpi/processor_pdc.c
--
1.7.9.5
This patch set have no function change for x86 and ia64 and
just do some clean up to prepare for running ACPI on ARM64.
This patch set is splited out from the patch set [1]
"[PATCH v4 00/13] Enable ACPI on ARM64 in Kconfig" and hope it
can be merged first before ARM64 ACPI core patches.
[1]: https://lkml.org/lkml/2014/6/26/627
Graeme Gregory (2):
ACPI: ARM64 does not have a BIOS add config for BIOS table scan.
ACPI: Don't use acpi_lapic in ACPI core code
Hanjun Guo (2):
ACPI / processor: Introduce ARCH_HAS_ACPI_PDC
ACPI: Make EC debugfs depend on X86 || IA64 in Kconfig
arch/ia64/Kconfig | 2 +
arch/ia64/include/asm/acpi.h | 5 +
arch/x86/Kconfig | 2 +
arch/x86/include/asm/acpi.h | 5 +
drivers/acpi/Kconfig | 14 +++
drivers/acpi/Makefile | 1 +
drivers/acpi/acpi_processor.c | 2 +-
drivers/acpi/internal.h | 5 +
drivers/acpi/osl.c | 4 +-
drivers/acpi/processor_core.c | 198 ---------------------------------------
drivers/acpi/processor_pdc.c | 206 +++++++++++++++++++++++++++++++++++++++++
11 files changed, 244 insertions(+), 200 deletions(-)
create mode 100644 drivers/acpi/processor_pdc.c
--
1.7.9.5
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 architecture - HAVE_ACPI_APEI_NMI
- group and wrap around #ifdef CONFIG_HAVE_ACPI_APEI_NMI code which
is used only for NMI path
- identify architectural boxes and abstract it accordingly (tlb flush 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 hard selected for x86. Architectures that want to use this
feature should also provide NMI code infrastructure.
V1->V2
- address Borislav's comment
- abstract arch-specific calls instead of wrapping into the #ifdef
V2->V3
- address Robert's comment
- disable ACPI_APEI_NMI selection so that it is hard selected by arch Kconfig
- rename ACPI_APEI_NMI to ARCH_HAS_ACPI_APEI_NMI
V3->V4
- do not abstract NMI calls for archs which do not support it
- merge some of patches to make review process easier
Tomasz Nowicki (3):
apei, mce: Factor out APEI architecture specific MCE calls.
acpi, apei, ghes: Make NMI error notification to be GHES architecture
extension.
acpi, apei, ghes: Factor out ioremap virtual memory for IRQ and NMI
context.
arch/x86/Kconfig | 2 +
arch/x86/kernel/acpi/Makefile | 1 +
arch/x86/kernel/acpi/apei.c | 62 +++++++++++++++
drivers/acpi/apei/Kconfig | 8 +-
drivers/acpi/apei/apei-base.c | 13 ++++
drivers/acpi/apei/ghes.c | 173 ++++++++++++++++++++++++++---------------
drivers/acpi/apei/hest.c | 29 +------
include/acpi/apei.h | 4 +
include/linux/nmi.h | 4 +
9 files changed, 204 insertions(+), 92 deletions(-)
create mode 100644 arch/x86/kernel/acpi/apei.c
--
1.7.9.5
This patch set is the first part of ARM64 ACPI core patches to
running ACPI on ARM64, it just handle some compile errors when
ACPI is introduced to ARM64 platform and enable ACPI on ARM64
in Kconfig.
Following core patch sets for ACPI based SMP/GIC/Arch Timer
initialization to enable ACPI on ARM64 are under interally
review and will send out when ACPI 5.1 is released.
patch 1~3 are cleanups for ACPI core;
patch 4~13 are arch dependent code for ARM64 ACPI;
This patch set is based on linux-next branch of Rafael's linux-pm
tree, and PCI patches for ARM64 from Liviu:
Support for creating generic host_bridge from device tree
https://lkml.org/lkml/2014/3/14/279
Add support for PCI in AArch64
http://comments.gmane.org/gmane.linux.ports.arm.kernel/309392
Changes since v3:
- Introduce three new patches
- acpi: arm64 does not have a BIOS add config for BIOS table scan
- ACPI: Don't use acpi_lapic in ACPI core code
- ARM64 / ACPI: if we chose to boot from acpi then disable FDT
- Rebase on the latest linux-next branch of Rafael's tree, and
introduce asm/acenv.h for ARM64;
- Introduce ARCH_HAS_ACPI_PDC to move all the _PDC related code
to a single place and make x86 and ia64 select ARCH_HAS_ACPI_PDC;
- Fix some checpatch warning;
- Fix broken Signed-off-by chain;
- Remove duplicate interface macros for ACPICA pointed out by Mark
Rutland and Zheng Lv;
- Redefine ACPI_FLUSH_CPU_CACHE();
- Stub out some PCI functions suggested by Arnd and already merged into 3.16
Comments still need to be addressed:
- Empty PCI implementation in arch/arm64 which suggested by Arnd;
- suspend and sleep on ARM64 platform pointed out by Lorenzo;
Changes since v2:
- Make ACPI depend on PCI on ARM64
- rework all the patches and seperate some of the patches
into fine-grained, and add some comments and changelog to
make it easier for review.
Al Stone (3):
ARM64 / ACPI: Introduce arm-core.c and its related head file
ARM64 / ACPI: Introduce early_param for "acpi"
ARM64 / ACPI: Select ACPI_REDUCED_HARDWARE_ONLY if ACPI is enabled on
ARM64
Graeme Gregory (6):
acpi: arm64 does not have a BIOS add config for BIOS table scan.
ACPI: Don't use acpi_lapic in ACPI core code
ARM64 : Add dummy asm/cpu.h
ARM64 / ACPI: Introduce lowlevel suspend function
ARM64 / ACPI: if we chose to boot from acpi then disable FDT
ARM64 / ACPI: Enable ARM64 in Kconfig
Hanjun Guo (4):
ACPI / processor: Introduce ARCH_HAS_ACPI_PDC
ARM64 / ACPI: Introduce arch_fix_phys_package_id() for cpu topology
ARM64 / ACPI: Introduce PCI functions for ACPI on ARM64
ACPI: Make EC debugfs depend on X86 || IA64 in Kconfig
Documentation/kernel-parameters.txt | 3 +-
arch/arm64/Kconfig | 3 +
arch/arm64/include/asm/acenv.h | 18 +++
arch/arm64/include/asm/acpi.h | 61 +++++++++++
arch/arm64/include/asm/cpu.h | 11 ++
arch/arm64/include/asm/pci.h | 6 +
arch/arm64/include/asm/topology.h | 2 +
arch/arm64/kernel/pci.c | 28 +++++
arch/arm64/kernel/setup.c | 7 +-
arch/arm64/kernel/topology.c | 14 +++
arch/ia64/Kconfig | 2 +
arch/ia64/include/asm/acpi.h | 5 +
arch/x86/Kconfig | 2 +
arch/x86/include/asm/acpi.h | 5 +
drivers/acpi/Kconfig | 19 +++-
drivers/acpi/Makefile | 3 +
drivers/acpi/acpi_processor.c | 2 +-
drivers/acpi/internal.h | 5 +
drivers/acpi/osl.c | 4 +-
drivers/acpi/plat/Makefile | 1 +
drivers/acpi/plat/arm-core.c | 138 +++++++++++++++++++++++
drivers/acpi/processor_core.c | 198 ---------------------------------
drivers/acpi/processor_pdc.c | 206 +++++++++++++++++++++++++++++++++++
23 files changed, 539 insertions(+), 204 deletions(-)
create mode 100644 arch/arm64/include/asm/acenv.h
create mode 100644 arch/arm64/include/asm/acpi.h
create mode 100644 arch/arm64/include/asm/cpu.h
create mode 100644 drivers/acpi/plat/Makefile
create mode 100644 drivers/acpi/plat/arm-core.c
create mode 100644 drivers/acpi/processor_pdc.c
--
1.7.9.5
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.
=== Changelog ===
Changes since V1:
- Integration with Mailbox framework - https://lkml.org/lkml/2014/5/15/49
Ashwin Chaugule (3):
Mailbox: Add support for ACPI
ACPI: Add support for Platform Communication Channel
PCC test driver
drivers/acpi/Makefile | 2 +-
drivers/acpi/pcc-test.c | 208 ++++++++++++++++++++++++++++++++++
drivers/acpi/pcc.c | 225 +++++++++++++++++++++++++++++++++++++
drivers/mailbox/Kconfig | 11 ++
drivers/mailbox/mailbox.c | 155 ++++++++++++++++---------
include/linux/mailbox_client.h | 3 +
include/linux/mailbox_controller.h | 6 +
7 files changed, 557 insertions(+), 53 deletions(-)
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 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 - ARCH_HAS_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 hard selected for x86. Architectures that want to use this
feature should also provide NMI code infrastructure.
V1->V2
- address Borislav's comment
- abstract arch-specific calls instead of wrapping into the #ifdef
V2->V3
- address Robert's comment
- disable ACPI_APEI_NMI selection so that it is hard selected by arch Kconfig
- rename ACPI_APEI_NMI to ARCH_HAS_ACPI_APEI_NMI
Tomasz Nowicki (5):
apei, mce: Factor out APEI architecture specific MCE calls.
acpi, apei, ghes: Introduce ARCH_HAS_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/Kconfig | 1 +
arch/x86/kernel/acpi/Makefile | 1 +
arch/x86/kernel/acpi/apei.c | 87 ++++++++++++
drivers/acpi/apei/Kconfig | 8 +-
drivers/acpi/apei/apei-base.c | 32 +++++
drivers/acpi/apei/ghes.c | 301 +++++++++++++++++++++++++----------------
drivers/acpi/apei/hest.c | 29 +---
include/acpi/apei.h | 11 ++
8 files changed, 327 insertions(+), 143 deletions(-)
create mode 100644 arch/x86/kernel/acpi/apei.c
--
1.7.9.5
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
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
This patch set is the first part of ARM64 ACPI core patches to
running ACPI on ARM64, it just handle some compile errors when
ACPI is introduced to ARM64 platform and enable ACPI on ARM64
in Kconfig.
Following core patch sets for ACPI based SMP/GIC/Arch Timer
initialization to enable ACPI on ARM64 are still waited untill
some ACPI proposals approved by ASWG.
This patch set is based on 3.15-rc2 and PCI patches for ARM64 from
Liviu:
Support for creating generic host_bridge from device tree
https://lkml.org/lkml/2014/3/14/279
Add support for PCI in AArch64
http://comments.gmane.org/gmane.linux.ports.arm.kernel/309392
We did 3 review cycles inside linaro ACPI team, and I had compiled
all the patches ok on arm64 with:
- CONFIG_ACPI=n and CONFIG_PCI=n;
- CONFIG_ACPI=n and CONFIG_PCI=y;
- CONFIG_ACPI=y and CONFIG_PCI=y;
And compiled ok on x86.
Changes since v2:
- Make ACPI depend on PCI on ARM64
- rework all the patches and seperate some of the patches
into fine-grained, and add some comments and changelog to
make it easier for review.
Hanjun Guo (11):
ACPI / processor: Rework _PDC related stuff to make it more
arch-independent
ARM64 / ACPI: Introduce the skeleton of _PDC related for ARM64
ARM64 : Add dummy asm/cpu.h
ARM64 / ACPI: Introduce arm-core.c and its related head file
ARM64 / ACPI: Introduce early_param for "acpi"
ARM64 / ACPI: Introduce lowlevel suspend function
ARM64 / ACPI: Introduce arch_fix_phys_package_id() for cpu topology
ARM64 / ACPI: Introduce PCI functions for ACPI on ARM64
ARM64 / ACPI: Enable ARM64 in Kconfig
ARM64 / ACPI: Select ACPI_REDUCED_HARDWARE_ONLY if ACPI is enabled on
ARM64
ACPI: Make EC depend on X86 || IA64 in Kconfig
arch/arm64/Kconfig | 3 +
arch/arm64/include/asm/acpi.h | 94 +++++++++++++++++++++++++
arch/arm64/include/asm/cpu.h | 11 +++
arch/arm64/include/asm/pci.h | 11 +++
arch/arm64/include/asm/topology.h | 2 +
arch/arm64/kernel/pci.c | 34 +++++++++
arch/arm64/kernel/setup.c | 4 ++
arch/arm64/kernel/topology.c | 14 ++++
arch/ia64/include/asm/acpi.h | 5 +-
arch/ia64/kernel/acpi.c | 15 ++++
arch/x86/include/asm/acpi.h | 19 +----
arch/x86/kernel/acpi/cstate.c | 27 ++++++++
drivers/acpi/Kconfig | 6 +-
drivers/acpi/Makefile | 2 +
drivers/acpi/plat/Makefile | 1 +
drivers/acpi/plat/arm-core.c | 138 +++++++++++++++++++++++++++++++++++++
drivers/acpi/processor_core.c | 19 +----
17 files changed, 363 insertions(+), 42 deletions(-)
create mode 100644 arch/arm64/include/asm/acpi.h
create mode 100644 arch/arm64/include/asm/cpu.h
create mode 100644 drivers/acpi/plat/Makefile
create mode 100644 drivers/acpi/plat/arm-core.c
--
1.7.9.5
Enable C-State support for ARM64.
Signed-off-by: Jonghwan Choi <jhbird.choi(a)samsung.com>
---
drivers/acpi/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig
index ff5c83c..e434a3e 100644
--- a/drivers/acpi/Kconfig
+++ b/drivers/acpi/Kconfig
@@ -143,7 +143,7 @@ config ACPI_PROCESSOR
tristate "Processor"
select THERMAL
select CPU_IDLE
- depends on X86 || IA64
+ depends on X86 || IA64 || ARM64
default y
help
This driver installs ACPI as the idle handler for Linux and uses
--
1.7.10.4
To use acpi_cpufreq in both x86 and arm64, change the CONFIG_'s name
and location.
Signed-off-by: Jonghwan Choi <jhbird.choi(a)samsung.com>
---
drivers/cpufreq/Kconfig | 16 ++++++++++++++++
drivers/cpufreq/Kconfig.x86 | 26 +++++---------------------
drivers/cpufreq/Makefile | 2 +-
3 files changed, 22 insertions(+), 22 deletions(-)
diff --git a/drivers/cpufreq/Kconfig b/drivers/cpufreq/Kconfig
index cb5b936..cbc7925 100644
--- a/drivers/cpufreq/Kconfig
+++ b/drivers/cpufreq/Kconfig
@@ -232,6 +232,22 @@ depends on ARM || ARM64
source "drivers/cpufreq/Kconfig.arm"
endmenu
+config ACPI_CPUFREQ
+ tristate "ACPI Processor P-States driver"
+ depends on ACPI_PROCESSOR
+ help
+ This driver adds a CPUFreq driver which utilizes the ACPI
+ Processor Performance States.
+ This driver also supports Intel Enhanced Speedstep and newer
+ AMD CPUs.
+
+ To compile this driver as a module, choose M here: the
+ module will be called acpi-cpufreq.
+
+ For details, take a look at <file:Documentation/cpu-freq/>.
+
+ If in doubt, say N.
+
menu "AVR32 CPU frequency scaling drivers"
depends on AVR32
diff --git a/drivers/cpufreq/Kconfig.x86 b/drivers/cpufreq/Kconfig.x86
index d369349..fc3a3d7 100644
--- a/drivers/cpufreq/Kconfig.x86
+++ b/drivers/cpufreq/Kconfig.x86
@@ -29,26 +29,10 @@ config X86_PCC_CPUFREQ
If in doubt, say N.
-config X86_ACPI_CPUFREQ
- tristate "ACPI Processor P-States driver"
- depends on ACPI_PROCESSOR
- help
- This driver adds a CPUFreq driver which utilizes the ACPI
- Processor Performance States.
- This driver also supports Intel Enhanced Speedstep and newer
- AMD CPUs.
-
- To compile this driver as a module, choose M here: the
- module will be called acpi-cpufreq.
-
- For details, take a look at <file:Documentation/cpu-freq/>.
-
- If in doubt, say N.
-
config X86_ACPI_CPUFREQ_CPB
default y
bool "Legacy cpb sysfs knob support for AMD CPUs"
- depends on X86_ACPI_CPUFREQ && CPU_SUP_AMD
+ depends on ACPI_CPUFREQ && CPU_SUP_AMD
help
The powernow-k8 driver used to provide a sysfs knob called "cpb"
to disable the Core Performance Boosting feature of AMD CPUs. This
@@ -113,7 +97,7 @@ config X86_POWERNOW_K7_ACPI
config X86_POWERNOW_K8
tristate "AMD Opteron/Athlon64 PowerNow!"
- depends on ACPI && ACPI_PROCESSOR && X86_ACPI_CPUFREQ
+ depends on ACPI && ACPI_PROCESSOR && ACPI_CPUFREQ
help
This adds the CPUFreq driver for K8/early Opteron/Athlon64
processors.
Support for K10 and newer processors is now in acpi-cpufreq.
@@ -125,7 +109,7 @@ config X86_POWERNOW_K8
config X86_AMD_FREQ_SENSITIVITY
tristate "AMD frequency sensitivity feedback powersave bias"
- depends on CPU_FREQ_GOV_ONDEMAND && X86_ACPI_CPUFREQ && CPU_SUP_AMD
+ depends on CPU_FREQ_GOV_ONDEMAND && ACPI_CPUFREQ && CPU_SUP_AMD
help
This adds AMD-specific powersave bias function to the ondemand
governor, which allows it to make more power-conscious frequency
@@ -157,7 +141,7 @@ config X86_SPEEDSTEP_CENTRINO
depends on X86_32 || (X86_64 && ACPI_PROCESSOR)
help
This is deprecated and this functionality is now merged into
- acpi_cpufreq (X86_ACPI_CPUFREQ). Use that driver instead of
+ acpi_cpufreq (ACPI_CPUFREQ). Use that driver instead of
speedstep_centrino.
This adds the CPUFreq driver for Enhanced SpeedStep enabled
mobile CPUs. This means Intel Pentium M (Centrino) CPUs
@@ -265,7 +249,7 @@ config X86_E_POWERSAVER
This adds the CPUFreq driver for VIA C7 processors. However, this
driver
does not have any safeguards to prevent operating the CPU out of
spec
and is thus considered dangerous. Please use the regular ACPI
cpufreq
- driver, enabled by CONFIG_X86_ACPI_CPUFREQ.
+ driver, enabled by CONFIG_ACPI_CPUFREQ.
If in doubt, say N.
diff --git a/drivers/cpufreq/Makefile b/drivers/cpufreq/Makefile
index 54a05c9..bfeb0fb 100644
--- a/drivers/cpufreq/Makefile
+++ b/drivers/cpufreq/Makefile
@@ -13,6 +13,7 @@ obj-$(CONFIG_CPU_FREQ_GOV_INTERACTIVE) +=
cpufreq_interactive.o
obj-$(CONFIG_CPU_FREQ_GOV_COMMON) += cpufreq_governor.o
obj-$(CONFIG_GENERIC_CPUFREQ_CPU0) += cpufreq-cpu0.o
+obj-$(CONFIG_ACPI_CPUFREQ) += acpi-cpufreq.o
############################################################################
######
# x86 drivers.
@@ -21,7 +22,6 @@ obj-$(CONFIG_GENERIC_CPUFREQ_CPU0) += cpufreq-cpu0.o
# powernow-k8 can load then. ACPI is preferred to all other
hardware-specific drivers.
# speedstep-* is preferred over p4-clockmod.
-obj-$(CONFIG_X86_ACPI_CPUFREQ) += acpi-cpufreq.o
obj-$(CONFIG_X86_POWERNOW_K8) += powernow-k8.o
obj-$(CONFIG_X86_PCC_CPUFREQ) += pcc-cpufreq.o
obj-$(CONFIG_X86_POWERNOW_K6) += powernow-k6.o
--
1.7.10.4
Hi all,
I would like to support acpi cpufreq & cpuidle for ARM.
For supporting that, I tried to implement acpi cpufreq & cpuidle for ARM
with ACPI.
This patch is based on http://git.linaro.org/leg/acpi/leg-kernel.git.
[CPUFREQ]
I tried to separate this code into 3 parts which are common, x86-specific
and arm-specific code.
But as you know, there are too much x86-specific code in acpi-cpufreq.c
When I tried to implement acpi-cpufreq-arm, there were a lot of compile
error(due to x86-specific code).
So I used #ifdef CONFIG_X86 to solve those errors.(and some hack codes)
Later I will remove "#ifdef CONFIG_X86".
And, if "ARM64 / ACPI: Introduce arch_register/unregister_cpu() for arm64"
is merged,
Then I can remove #ifdef for arch_un/register_cpu.
[CPUIDLE]
As Sudeep mentioned, I tried to use FFH.
So I made cstate.c file in arm/arm64/kernel.(based on
arch/x86/kernel/acpi/cstate.c)
But I am not sure whether I implemented it properly.
Jonghwan Choi (7):
ACPI-Fix-compile-error-in-arch-x86-kernel-setup.c.patch
cpufreq-Change-CONFIG_-name-from-X86_ACPI_CPUFREQ-to.patch
acpi-Use-Hacks-to-allow-compilation-on-arm-environme.patch
arm64-Change-struct-cpuinfo_arm.patch
cpufreq-Add-ACPI-cpufreq-support-for-ARM.patch
acpi-Add-ACPI-cpuidle-support-for-ARM.patch
acpi-Allow-ACPI_PROCESSOR-for-ARM64.patch
Thanks
Best Regards
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
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 | 32 ++++
arch/arm64/include/asm/psci.h | 2 +-
arch/arm64/kernel/psci.c | 200 ++++++++++++++++++++-----
include/uapi/linux/psci.h | 5 +
7 files changed, 399 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
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.
*** BLURB HERE ***
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 | 32 ++++
arch/arm64/include/asm/psci.h | 2 +-
arch/arm64/kernel/psci.c | 200 ++++++++++++++++++++-----
include/uapi/linux/psci.h | 5 +
7 files changed, 399 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
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 | 179 +++++++++++++++++++-----
arch/arm/kernel/psci_smp.c | 21 +++
arch/arm64/include/asm/psci.h | 2 +-
arch/arm64/kernel/psci.c | 183 ++++++++++++++++++++-----
include/uapi/linux/psci.h | 5 +
7 files changed, 354 insertions(+), 78 deletions(-)
--
1.8.3.2
The UEFI Forum included the ACPI spec in its portfolio in October 2013
and will host future spec iterations, following the ACPI v5.0a release.
A UEFI Forum working group named ACPI Specification Working Group (ASWG)
has been established to handle future ACPI developments, any UEFI member
can join the group and contribute to ACPI specification.
So update the ownership and developers for ACPI in Kconfig accordingly,
and add another website link to ACPI specification too.
Signed-off-by: Hanjun Guo <hanjun.guo(a)linaro.org>
---
drivers/acpi/Kconfig | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig
index c205653..ab686b3 100644
--- a/drivers/acpi/Kconfig
+++ b/drivers/acpi/Kconfig
@@ -31,10 +31,14 @@ menuconfig ACPI
ACPI CA, see:
<http://acpica.org/>
- ACPI is an open industry specification co-developed by
- Hewlett-Packard, Intel, Microsoft, Phoenix, and Toshiba.
+ ACPI is an open industry specification originally co-developed by
+ Hewlett-Packard, Intel, Microsoft, Phoenix, and Toshiba. Currently,
+ it is developed by the ACPI Specification Working Group (ASWG) under
+ the UEFI Forum and any UEFI member can join the ASWG and contribute
+ to the ACPI specification.
The specification is available at:
<http://www.acpi.info>
+ <http://www.uefi.org/acpi/specs>
if ACPI
--
1.7.9.5
The UEFI Forum included the ACPI spec in its portfolio in October 2013
and will host future spec iterations, following the ACPI v5.0a release.
A UEFI Forum working group named ACPI Specification Working Group (ASWG)
has been established to handle future ACPI developments, any UEFI member
can join the group and contribute to ACPI specification.
So update the ownership and developers for ACPI in Kconfig accordingly,
and add another website link to ACPI specification too.
Signed-off-by: Hanjun Guo <hanjun.guo(a)linaro.org>
---
drivers/acpi/Kconfig | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig
index c205653..6bbf36e 100644
--- a/drivers/acpi/Kconfig
+++ b/drivers/acpi/Kconfig
@@ -32,9 +32,11 @@ menuconfig ACPI
<http://acpica.org/>
ACPI is an open industry specification co-developed by
- Hewlett-Packard, Intel, Microsoft, Phoenix, and Toshiba.
+ ACPI Specification Working Group (ASWG) under UEFI Forum, any
+ UEFI member can join ASWG and contribute to ACPI specification.
The specification is available at:
<http://www.acpi.info>
+ <http://www.uefi.org/acpi/specs>
if ACPI
--
1.7.9.5
The UEFI Forum included the ACPI spec in its portfolio in October 2013
and will host future spec iterations, following the ACPI v5.0a release.
A UEFI Forum working group named ACPI Specification Working Group (ASWG)
has been established to handle future ACPI developments, any UEFI member
can join the group and contribute to ACPI specification.
So update the ownership and developers for ACPI in Kconfig accordingly,
and update the website link to ACPI specification too.
Signed-off-by: Hanjun Guo <hanjun.guo(a)linaro.org>
---
drivers/acpi/Kconfig | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/acpi/Kconfig b/drivers/acpi/Kconfig
index c205653..831e541 100644
--- a/drivers/acpi/Kconfig
+++ b/drivers/acpi/Kconfig
@@ -32,9 +32,10 @@ menuconfig ACPI
<http://acpica.org/>
ACPI is an open industry specification co-developed by
- Hewlett-Packard, Intel, Microsoft, Phoenix, and Toshiba.
+ ACPI Specification Working Group (ASWG) under UEFI Forum, any
+ UEFI member can join ASWG and contribute to ACPI specification.
The specification is available at:
- <http://www.acpi.info>
+ <http://www.uefi.org/acpi/specs>
if ACPI
--
1.7.9.5
There is a duplicated Kconfig entry for "kernel/power/Kconfig"
in menu "Power management options" and "CPU Power Management",
remove the one from menu "CPU Power Management" suggested by
Viresh.
Signed-off-by: Hanjun Guo <hanjun.guo(a)linaro.org>
---
arch/arm64/Kconfig | 2 --
1 file changed, 2 deletions(-)
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index e6e4d37..e759af5 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -323,8 +323,6 @@ menu "CPU Power Management"
source "drivers/cpuidle/Kconfig"
-source "kernel/power/Kconfig"
-
source "drivers/cpufreq/Kconfig"
endmenu
--
1.7.9.5
Hi All,
I am trying to enable a i2c client driver under ACPI. The device is being enumerated behind adapter device and I am getting IRQ resource as well.
The problem I have now is, how do I pass the platform data to driver?
struct i2c_board_info {
char type[I2C_NAME_SIZE];
unsigned short flags;
unsigned short addr;
void *platform_data; ===========> how can I initialize this filed.
struct dev_archdata *archdata;
struct device_node *of_node;
struct acpi_dev_node acpi_node;
int irq;
};
In non ACPI environment I used to initialize the platform_data under board or platforms files. Under ACPI how do I do that?
Thanks,
Ram
After commit 74397174989e5 (arm64: Fix duplicated Kconfig entries),
I still get a duplicate Power management options section in linux-next
git repo, may be due to some merge conflicts, anyway, fix that in this
patch.
Signed-off-by: Hanjun Guo <hanjun.guo(a)linaro.org>
---
Based on linux-next repo, weird, did I miss something?
---
arch/arm64/Kconfig | 12 ------------
1 file changed, 12 deletions(-)
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
index d9f23ad..6085dca 100644
--- a/arch/arm64/Kconfig
+++ b/arch/arm64/Kconfig
@@ -317,24 +317,12 @@ config ARCH_SUSPEND_POSSIBLE
config ARM64_CPU_SUSPEND
def_bool PM_SLEEP
-endmenu
-
-menu "CPU Power Management"
-
source "drivers/cpuidle/Kconfig"
source "drivers/cpufreq/Kconfig"
endmenu
-menu "Power management options"
-
-source "kernel/power/Kconfig"
-
-source "drivers/cpufreq/Kconfig"
-
-endmenu
-
source "net/Kconfig"
source "drivers/Kconfig"
--
1.7.9.5
Hi All,
I am trying to enable a i2c client driver under ACPI. The device is being enumerated behind adapter device and I am getting IRQ resource as well.
The problem I have now is, how do I pass the platform data to driver?
struct i2c_board_info {
char type[I2C_NAME_SIZE];
unsigned short flags;
unsigned short addr;
void *platform_data; ===========> how can I initialize this filed.
struct dev_archdata *archdata;
struct device_node *of_node;
struct acpi_dev_node acpi_node;
int irq;
};
In non ACPI environment I used to initialize the platform_data under board or platforms files. Under ACPI how do I do that?
Thanks,
Ram
The leg-kernel release has been made and tagged as leg-20140401.0
This is based on mainline kernel v3.14
Repository : http://git.linaro.org/leg/acpi/leg-kernel.git
Direct Link: https://git.linaro.org/leg/acpi/leg-kernel.git/commit/a493444ce7f1792b44897…
Notes :-
1) starting from this release, a FDT is not used to describe the platform. The
kernel uses ACPI tables only. This release contains prototype code to boot
the CPUs from information held in the MADT. It is hard coded to PSCI control
method for the FVP base model
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 | 158 +++++++++++++++++++-----
arch/arm/kernel/psci_smp.c | 21 ++++
arch/arm64/kernel/psci.c | 163 ++++++++++++++++++++-----
include/uapi/linux/Kbuild | 1 +
include/uapi/linux/psci.h | 66 ++++++++++
7 files changed, 390 insertions(+), 61 deletions(-)
create mode 100644 include/uapi/linux/psci.h
--
1.8.3.2
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 | 155 +++++++++++++++++++-----
arch/arm/kernel/psci_smp.c | 21 ++++
arch/arm64/kernel/psci.c | 160 ++++++++++++++++++++-----
include/uapi/linux/psci.h | 66 ++++++++++
6 files changed, 383 insertions(+), 61 deletions(-)
create mode 100644 include/uapi/linux/psci.h
--
1.8.3.2
Hi Guys,
I pulled Aschwin's updated PSCI cleanup for upstream into acpi-mainline-core
this morning.
This invalidated the previous patch from Tomasz to hardcard PSCI booting method
so I replaced it with this simpler patch until we have ASWG compliant method.
We can of course improve this within acpi-core until that time.
Graeme
From: Al Stone <al.stone(a)linaro.org>
These patches are purely experimental; they just barely compile and they
do not run just yet. The reason for posting them is really just to stir
some discussion and see if this is a truly crazy idea or if it has some
potential for easing the ACPI transition.
These patches introduce GUFI: the Grand Unified Firmware Interface. Okay,
yes, it is a silly name. I didn't spend a lot of time on it. What I'm
most interested in is the idea and whether it is worth pursuing further,
and whether or not there are better ways to do this if it does make sense.
The idea is very simple: introduce a shim layer that looks like a merge of
some sort between ACPI and FDT functionality in the kernel. In that shim
layer, make it possible for a driver to make a single call to a function,
and with that call, retrieve configuration information stored in either
ACPI tables or a DT. Further, allow the kernel to specify which has
priority -- i.e., search through ACPI tables, and then through FDT if
data is not found, or vice versa -- or which is exclusive, either ACPI
or FDT only.
Why would I do this? As a kernel developer, this allows me to make changes
in the direction of either FDT or ACPI as quickly or as slowly as I want to.
Most of my config can be in FDT and I can then piecemeal convert to ACPI
as I figure out ASL and/or any driver changes that may be needed. Secondly,
if I do this well, the changes to convert from FDT to ACPI *should* be very
small; from ACPI to FDT may be much more difficult but over time that can
likely be improved as well. Third, in the really, really long term, maybe
someone comes up with yet another hardware configuration description format
that is so cool it provides sharks with laser beams on their heads and
*everyone* wants to convert to it. With this layer in place, perhaps we
can smooth even that transition by abstracting out the config info that's
needed and the API to retrieve it.
So, what do you think?
Al Stone (5):
ACPI: GUFI: add kernel config options for GUFI
ACPI: GUFI: add build commands for drivers/gufi
ACPI: GUFI: add in early prototype code for some GUFI functions
ACPI: GUFI: add in simple test driver placeholders
ACPI: GUFI: start modifying the vexpress-sysreg driver to use the GUFI
arch/arm64/Kconfig | 6 -
drivers/Kconfig | 2 +
drivers/Makefile | 1 +
drivers/acpi/acpi_platform.c | 1 +
drivers/gufi/Kconfig | 54 ++++++++
drivers/gufi/Makefile | 11 ++
drivers/gufi/gufi.c | 309 ++++++++++++++++++++++++++++++++++++++++++
drivers/gufi/gufi_acpi_test.c | 84 ++++++++++++
drivers/gufi/gufi_of_test.c | 83 ++++++++++++
drivers/mfd/vexpress-sysreg.c | 14 +-
include/linux/gufi.h | 83 ++++++++++++
11 files changed, 636 insertions(+), 12 deletions(-)
create mode 100644 drivers/gufi/Kconfig
create mode 100644 drivers/gufi/Makefile
create mode 100644 drivers/gufi/gufi.c
create mode 100644 drivers/gufi/gufi_acpi_test.c
create mode 100644 drivers/gufi/gufi_of_test.c
create mode 100644 include/linux/gufi.h
--
1.8.3.1
This patchset adds some new functions introduced by the PSCI v0.2 spec.
It also adds DT bindings to differentiate between PSCI v0.1 and v0.2 and
appropriately selects the Function IDs. The third patch makes use of a
new function, AFFINITY_INFO, added by PSCI v0.2 to ensure that CPU's
killed after CPU_OFF are actually offlined.
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 | 151 ++++++++++++++++++++----
arch/arm/kernel/psci_smp.c | 21 ++++
arch/arm64/kernel/psci.c | 154 +++++++++++++++++++++----
include/uapi/linux/psci.h | 45 ++++++++
6 files changed, 367 insertions(+), 46 deletions(-)
create mode 100644 include/uapi/linux/psci.h
--
1.8.3.2