Hi Hanjun and others,
I have rebased these patches on the 3.10rcX based tree and done a quick
boot test and they don't cause any oopses. So I thought I would push them
to the tree.
Thanks
Graeme
We are able to inject GHES from userspace. Kernel can parse error status block
and print error message in a more descriptive way:
[...]
[ 0.744715] GHES: APEI firmware first mode is enabled by APEI bit.
[ 0.744749] EINJ: Error INJection is initialized.
[...]
# echo 0x20 > /sys/kernel/debug/apei/einj/error_inject
[ 149.010380] {1}[Hardware Error]: Hardware error from APEI Generic Hardware Error Source: 2
[ 149.017080] {1}[Hardware Error]: APEI generic hardware error status
[ 149.023217] {1}[Hardware Error]: severity: 1, fatal
[ 149.027998] {1}[Hardware Error]: section: 0, severity: 0, recoverable
[ 149.034317] {1}[Hardware Error]: flags: 0x00
[ 149.038501] {1}[Hardware Error]: section_type: memory error
where 0x20 can be random error ID because of the hack. Please see following
patches for more explanation.
Here is the first part of cpu topology and cpu-hotplug code for RFC.
In this part of code, MADT is being parsed and the cpu possible map and
cpu present map are prefilled.
CPU possible map is equal to the GIC entries in MADT no matter enabled or
disabled, and cpu present map limits to the enabled cpu in MADT.
Without this patch set, CPU possible map is equal to the cpus found in FDT,
and cpu possible map is the same as cpu present map with no hotplugble cpus.
Boot information with this patch (with --cores=4):
ACPI: GIC (acpi_id[0x0000] gic_id[0x0000] enabled) // MADT was parsed
ACPI: GIC (acpi_id[0x0001] gic_id[0x0001] enabled)
ACPI: GIC (acpi_id[0x0002] gic_id[0x0002] disabled)
ACPI: GIC (acpi_id[0x0003] gic_id[0x0003] disabled)
ACPI: GIC (acpi_id[0x0004] gic_id[0x0004] disabled)
ACPI: GIC (acpi_id[0x0005] gic_id[0x0005] disabled)
ACPI: GIC (acpi_id[0x0006] gic_id[0x0006] disabled)
ACPI: GIC (acpi_id[0x0007] gic_id[0x0007] disabled)
2 CPUs available, 8 CPUs total //find 2 enabled cpus which
// is the same as MADT described
ACPI: GIC Distributor (id[0x0000] address[0x2c001000] gsi_base[0]) // IOAPIC(GIC distributor is also parsed)
Using ACPI (MADT) for SMP configuration information
SMP: limits to 4 CPUs // the foundation model supports only 4 four cpus
SMP: Allowing 4 CPUs, 2 hotplug CPUs // so limits to 4 cpus, and 2 disabled in MADT can be hotpluged
PERCPU: Embedded 10 pages/cpu @ffffffc03ffa7000 s11520 r8192 d21248 u40960
[....]
CPU1: Booted secondary processor
Brought up 2 CPUs
SMP: Total of 2 processors activated (400.00 BogoMIPS).
Because only 2 cpus is enabled in MADT, so the system will up 2 cpus
in despite of --cores=4.
Next step will prototype cpu topology code for ACPI driver.
This is the RFC version only, will updated and rebased on the new acpi branch.
Hanjun Guo (3):
ARM / ACPI: MADT for armv8 foundation model
ARM / ACPI: Core functions for MADT parse
ARM / ACPI: Prefill cpu possible and present map when boot with MADT
arch/arm64/boot/asl/foundation-v8.acpi/apic.asl | 175 ++++++++-------
arch/arm64/include/asm/acpi.h | 3 +
arch/arm64/kernel/setup.c | 6 +
arch/arm64/kernel/smp.c | 2 +
drivers/acpi/plat/arm/boot.c | 261 ++++++++++++++++++++++-
drivers/acpi/tables.c | 21 ++
6 files changed, 374 insertions(+), 94 deletions(-)
--
1.7.9.5
Hi Guys,
Discussed this with Al and I think everyone is finished with 3.9 work
now! I am going to switch the acpi branch to be the contents of the
acpi-combined branch at 10AM tomorrow my local time!
The two branches will initially be :-
acpi - our work branch now based off 3.10-rcX kernel (and will track
mainline releases/rc releases)
acpi-ltfixes - is the acpi branch + some needed fixes from Samsung
landing team for Arndale prototyping.
We can of course create more short term branches for demos, prototyping
as needed.
Thanks
Graeme
From: Naresh Bhat <naresh.bhat(a)linaro.org>
CC drivers/acpi/fan.o
drivers/acpi/fan.c: In function ‘fan_get_cur_state’:
drivers/acpi/fan.c:96:9: warning: ‘acpi_state’ may be used uninitialized in this function [-Wuninitialized]
---
drivers/acpi/fan.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/acpi/fan.c b/drivers/acpi/fan.c
index f815da8..f61f7fd 100644
--- a/drivers/acpi/fan.c
+++ b/drivers/acpi/fan.c
@@ -84,7 +84,7 @@ static int fan_get_cur_state(struct thermal_cooling_device *cdev, unsigned long
{
struct acpi_device *device = cdev->devdata;
int result;
- int acpi_state;
+ int acpi_state = 0;
if (!device)
return -EINVAL;
--
1.7.9.5
From: Al Stone <ahs3(a)redhat.com>
There are a few places where the printk()s no longer serve
a useful purpose -- those printk()s are removed by the first
patch. The second and third patches remove printk() in favor
of proper use of pr_err() and pr_debug(), respectively.
Al Stone (3):
ARM: ACPI: remove some unneeded printk messages used for initial
debugging
ARM: ACPI: use pr_err() as one should and not printk()
ACPI: ARM: use pr_debug() as one should and not printk()
drivers/acpi/osl.c | 31 +++++++++++++++----------------
drivers/acpi/plat/arm/boot.c | 9 ---------
2 files changed, 15 insertions(+), 25 deletions(-)
--
1.8.1.4
Hi guys,
I have extracted the necessary fixes from Samsung Landing Team tree for
Arndale network (actually usb hack) and LPAE.
I have uploaded these on top of our acpi-combined branch as
acpi-combined-ltfixes. This should make it easier for people testing armv7.
I have attached my config file for this.
Thanks
Graeme