Hi,
Currently APEI depends on x86 architecture. It is because of many x86
specific features like "IA-32 Architecture Corrected Machine Check
" error source or NMI hardware error notification. However, many other
features like "PCI Express Device AER Structure" or GHES via external
interrupt can be still used perfectly by other architectures. So my idea
is to move x86 dependency away form Kconfig to APEI areas where it
really applies to.
I have started refactoring ghes.c driver in that direction. And here
comes my confusion, how should we treat x86 related parts, as fixed
profile? (which means we could use ACPI_REDUCED_HARDWARE or
CONFIG_ACPI_REDUCED_HARDWARE_ONLY define). I would like to ask for your
opinion.
Regards,
Tomasz
This reverts commit df86f5df79d8c2035a88fb985925e49475c0cdca.
APIC ID refers the hardware ID of the CPU, which means MPIDR on
ARM/ARM64, but in ACPI 5.0, GIC ID feild in GIC structure have
no explicit definition and may not refer to the MPIDR.
This patch just assume gic->gic_id as MPIDR which is not suitable,
revert it for now and wait for the explicit definition of GIC
structure is ready.
Signed-off-by: Hanjun Guo <hanjun.guo(a)linaro.org>
---
drivers/acpi/processor_core.c | 27 ---------------------------
1 file changed, 27 deletions(-)
diff --git a/drivers/acpi/processor_core.c b/drivers/acpi/processor_core.c
index 86d73d5..71e2065 100644
--- a/drivers/acpi/processor_core.c
+++ b/drivers/acpi/processor_core.c
@@ -70,28 +70,6 @@ static int map_lsapic_id(struct acpi_subtable_header *entry,
return 0;
}
-static int map_gic_id(struct acpi_subtable_header *entry,
- int device_declaration, u32 acpi_id, int *apic_id)
-{
- struct acpi_madt_generic_interrupt *gic =
- (struct acpi_madt_generic_interrupt *)entry;
-
- if (!(gic->flags & ACPI_MADT_ENABLED))
- return -ENODEV;
-
- /*
- * In the GIC interrupt model, logical processors are
- * required to have a Processor Device object in the DSDT,
- * so we should check device_declaration here
- */
- if (device_declaration && (gic->uid == acpi_id)) {
- *apic_id = gic->gic_id;
- return 0;
- }
-
- return -EINVAL;
-}
-
static int map_madt_entry(int type, u32 acpi_id)
{
unsigned long madt_end, entry;
@@ -127,9 +105,6 @@ static int map_madt_entry(int type, u32 acpi_id)
} else if (header->type == ACPI_MADT_TYPE_LOCAL_SAPIC) {
if (!map_lsapic_id(header, type, acpi_id, &apic_id))
break;
- } else if (header->type == ACPI_MADT_TYPE_GENERIC_INTERRUPT) {
- if (!map_gic_id(header, type, acpi_id, &apic_id))
- break;
}
entry += header->length;
}
@@ -160,8 +135,6 @@ static int map_mat_entry(acpi_handle handle, int type, u32 acpi_id)
map_lapic_id(header, acpi_id, &apic_id);
} else if (header->type == ACPI_MADT_TYPE_LOCAL_SAPIC) {
map_lsapic_id(header, type, acpi_id, &apic_id);
- } else if (header->type == ACPI_MADT_TYPE_GENERIC_INTERRUPT) {
- map_gic_id(header, type, acpi_id, &apic_id);
}
exit:
--
1.7.9.5
The leg-kernel release has been made and tagged as leg-20140318.0
This is based on mainline kernel v3.14-rc7
Repository : http://git.linaro.org/leg/acpi/leg-kernel.git
Direct Link: https://git.linaro.org/leg/acpi/leg-kernel.git/commit/9ce67dfb053ccec04f580…
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
The leg-kernel release has been made and tagged as leg-20140313.0
This is based on mainline kernel v3.14-rc6
Repository : http://git.linaro.org/leg/acpi/leg-kernel.git
Direct Link: https://git.linaro.org/leg/acpi/leg-kernel.git/commit/d8bfabcad828ad3dbf3b6…
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
The leg-kernel release has been made and tagged as leg-20140306.0
This is based on mainline kernel v3.14-rc5
Repository : http://git.linaro.org/leg/acpi/leg-kernel.git
Direct Link: https://git.linaro.org/leg/acpi/leg-kernel.git/commit/8506af0325655fef22731…
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
Hi,
The ACPI and leg-kernel repos will be moving from their current location
which to under the leg/ location instead.
So they will become
leg/acpi/acpi.git - The kernel development tree of the ACPI team
leg/acpi/acpi-asl.git - The ASL tree
leg/acpi/leg-kernel.git - the leg-kernel releases tree.
This is due to the arm/ location being meant for arm landing team.
ACPI Team if you could check wiki pages for references to old address
and update as needed that would be great.
Fathi if you could change the leg-kernel CI loop to the new address? We
will owe you a beer!
Thanks
Graeme
Hi,
Here are the minutes I took, its always difficult to capture everything
so I apologise if I missed something or misrepresented.
ACPI Power Management
---------------------
Not sure if it is ACPI core or driver that calls _PS? methods, Graeme
thinks
it is ACPI core. Must check.
PSCI transitions do not go through AML
Where people say "UEFI" when talking about hardware initialisation this
actually means
that by the time we enter kernel it will have been done. This does not
actually
mean UEFI needs to do this.
Fine grained means devices, so if two children shut off its upto
firmware to work
out and shut down the parent.
ASWG ASAP items, new GIC tables, flags for PSCI, GTDT memory mapped
timers.
Is there a way to repeat runtime PM ability to not shutdown due to
latency cost. Will
need to be investigated.
If using an embedded power controller, what is the path for events.
There is a general lack of latency type control in ACPI. Also missing
dependencies
between devices and also devices states and C states.
At least one CPU is always in control of D-State transitions.
Improved CPU state change latency is in discussion in ASWG.
Discussion on extending the spec to allow for P-States on devices, this
would give
devfreq support for ACPI machines.
Dong Wei - Please participate in ASWG to improve the spec.
Hi,
I checked this out in preperation for Connect as we know from experience
that getting a network connection is pot luck normally.
The ACPI kernel we generate will boot with the Foundation model.
Download the Linaro 14.01 release from here :-
http://releases.linaro.org/14.01/openembedded/aarch64
The you can start the Foundation model with the following commandline
Foundation_v8pkg/models/Linux64_GCC-4.1/Foundation_v8 --cores=4 --visualization --no-secure-memory --data=bl1.bin@0x0 --data=uefi_fvp-base.bin@0x8000000 --block-device=<YOUR ROOT FILESYSTEM IMAGE> --gicv3 --network=nat
You will get a few errors as AMBA bus does not actually exist on Foundation
model. But these are harmless.
Further details are in the release notes from Linaro.
Graeme
Some of the ACPI code is arch-dependent and make the code can't be
compiled on !x86 or !ia64, the first two patches just do some rework
on the idle_boot_override and _PDC related stuff to make the ACPI
code more arch-independent.
The third patch just introduce map_gic_id() for ACPI processor core
followed the ACPI 5.0 spec. Last two patches are just some cleanups.
I have compiled the kernel successfully after appling this patch set
on x86 and ia64.
Changs for v5:
Realign the additional lines to the open parenthesis
pr_info(xxxx);
xxxx;
Changes for v4:
a) remove preprocessor directives in function bodies;
b) add another two patches for cleanups.
Changes for v3:
Fix the issues pointed out by Lan Tianyu and add the Reviewed-by for
first patch.
Changes for v2:
a) add #if defined(CONFIG_X86) || defined(CONFIG_IA64) for
idle_boot_override related code;
b) Rebased on 3.14-rc1.
Changes since the RFC version:
a) Remove the RFC tag;
b) Move idle_boot_override out of the arch directory suggested
by Alan;
c) Make these 3 patches as a separate patch set since there are
not not related to the ARM/ARM64 platform.
Hanjun Guo (5):
ACPI / idle: Make idle_boot_override depend on x86 and ia64
ACPI / processor_core: Rework _PDC related stuff to make it more
arch-independent
ACPI / processor: Introduce map_gic_id() to get apic id from MADT or
_MAT method
ACPI: Move BAD_MADT_ENTRY() to linux/acpi.h
ACPI: Replace printk with pr_* in tables.c
arch/ia64/include/asm/acpi.h | 5 +-
arch/ia64/kernel/acpi.c | 18 ++++--
arch/x86/include/asm/acpi.h | 19 +------
arch/x86/kernel/acpi/boot.c | 4 --
arch/x86/kernel/acpi/cstate.c | 29 ++++++++++
drivers/acpi/processor_core.c | 92 ++++++++++++++++++------------
drivers/acpi/tables.c | 124 ++++++++++++++++++-----------------------
include/linux/acpi.h | 4 ++
8 files changed, 158 insertions(+), 137 deletions(-)
--
1.7.9.5
Hi List,
It seems I forgot to send a summary of the new branch layout on :-
https://git.linaro.org/arm/acpi/acpi.git
1) acpi-mainline-core is a copy of the latest patch series sent by Hanjun
to the linux-acpi list.
2) acpi-core is work on top of this patch series that has not yet been
sent to upstream.
3) acpi-drivers is work on top of acpi-core and contains the drivers to
boot the FVP Base model. It is likely these shall never be presented for
upstream.
Graeme
This commit moves ISA-specific code to separate function and makes that
function depend on CONFIG_{E}ISA so that we do not have to maintain
acpi_isa_irq_to_gsi() function for architectures which do not support ISA.
Signed-off-by: Tomasz Nowicki <tomasz.nowicki(a)linaro.org>
---
drivers/acpi/pci_irq.c | 36 +++++++++++++++++++++++++-----------
1 file changed, 25 insertions(+), 11 deletions(-)
diff --git a/drivers/acpi/pci_irq.c b/drivers/acpi/pci_irq.c
index 361b40c..9c62340 100644
--- a/drivers/acpi/pci_irq.c
+++ b/drivers/acpi/pci_irq.c
@@ -370,6 +370,30 @@ static struct acpi_prt_entry *acpi_pci_irq_lookup(struct pci_dev *dev, int pin)
return NULL;
}
+#if IS_ENABLED(CONFIG_ISA) || IS_ENABLED(CONFIG_EISA)
+static int acpi_isa_register_gsi(struct pci_dev *dev)
+{
+ u32 dev_gsi;
+
+ /* Interrupt Line values above 0xF are forbidden */
+ if (dev->irq > 0 && (dev->irq <= 0xF) &&
+ (acpi_isa_irq_to_gsi(dev->irq, &dev_gsi) == 0)) {
+ dev_warn(&dev->dev, "PCI INT %c: no GSI - using ISA IRQ %d\n",
+ pin_name(dev->pin), dev->irq);
+ acpi_register_gsi(&dev->dev, dev_gsi,
+ ACPI_LEVEL_SENSITIVE,
+ ACPI_ACTIVE_LOW);
+ return 0;
+ }
+ return -EINVAL;
+}
+#else
+static inline int acpi_isa_register_gsi(struct pci_dev *dev)
+{
+ return -ENODEV;
+}
+#endif
+
int acpi_pci_irq_enable(struct pci_dev *dev)
{
struct acpi_prt_entry *entry;
@@ -416,19 +440,9 @@ int acpi_pci_irq_enable(struct pci_dev *dev)
* driver reported one, then use it. Exit in any case.
*/
if (gsi < 0) {
- u32 dev_gsi;
- /* Interrupt Line values above 0xF are forbidden */
- if (dev->irq > 0 && (dev->irq <= 0xF) &&
- (acpi_isa_irq_to_gsi(dev->irq, &dev_gsi) == 0)) {
- dev_warn(&dev->dev, "PCI INT %c: no GSI - using ISA IRQ %d\n",
- pin_name(pin), dev->irq);
- acpi_register_gsi(&dev->dev, dev_gsi,
- ACPI_LEVEL_SENSITIVE,
- ACPI_ACTIVE_LOW);
- } else {
+ if (acpi_isa_register_gsi(dev))
dev_warn(&dev->dev, "PCI INT %c: no GSI\n",
pin_name(pin));
- }
kfree(entry);
return 0;
--
1.7.9.5