IRQ controllers and timers are the two types of device the kernel
requires before being able to use the device driver model.
ACPI so far lacks a proper probing infrastructure similar to the one
we have with DT, where we're able to declare IRQ chips and
clocksources inside the driver code, and let the core code pick it up
and call us back on a match. This leads to all kind of really ugly
hacks all over the arm64 code and even in the ACPI layer.
It turns out that providing such a probing infrastructure is rather
easy, and provides a much deserved cleanup in both the arch code, the
GIC driver, and the architected timer driver.
I'm sure there is some more code to be deleted, and one can only
wonder why this wasn't done before the arm64 code was initially merged
(the diffstat says it all...).
Patches are against v4.2, and a branch is available at
git://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git acpi/device-probing
Marc Zyngier (5):
acpi: Add basic device probing infrastructure
irqchip/acpi: Add probing infrastructure for ACPI-based irqchips
irqchip/gic: Convert the GIC driver to ACPI probing
clocksource/acpi: Add probing infrastructure for ACPI-based
clocksources
clocksource/arm_arch_timer: Convert to ACPI probing
arch/arm64/include/asm/acpi.h | 1 -
arch/arm64/include/asm/irq.h | 13 -------
arch/arm64/kernel/acpi.c | 25 -------------
arch/arm64/kernel/time.c | 6 ----
drivers/acpi/scan.c | 41 +++++++++++++++++++++
drivers/clocksource/arm_arch_timer.c | 10 +-----
drivers/clocksource/clksrc-of.c | 4 +++
drivers/irqchip/irq-gic.c | 69 ++++++++++++++++++------------------
drivers/irqchip/irqchip.c | 5 ++-
include/asm-generic/vmlinux.lds.h | 11 ++++++
include/linux/acpi.h | 56 +++++++++++++++++++++++++++++
include/linux/acpi_irq.h | 10 ------
include/linux/clocksource.h | 6 ----
include/linux/irqchip.h | 16 +++++++++
include/linux/irqchip/arm-gic-acpi.h | 31 ----------------
15 files changed, 166 insertions(+), 138 deletions(-)
delete mode 100644 include/linux/acpi_irq.h
delete mode 100644 include/linux/irqchip/arm-gic-acpi.h
--
2.1.4
Currently, the BAD_MADT_ENTRY macro is used to do a very simple sanity
check on the various subtables that are defined for the MADT. The check
compares the size of the subtable data structure as defined by ACPICA to
the length entry in the subtable. If they are not the same, the assumption
is that the subtable is incorrect.
Over time, the ACPI spec has allowed for MADT subtables where this can
never be true (the local SAPIC subtable, for example). Or, more recently,
the spec has accumulated some minor flaws where there are three possible
sizes for a subtable, all of which are valid, but only for specific versions
of the spec (the GICC subtable). In both cases, BAD_MADT_ENTRY reports these
subtables as bad when they are not. In order to retain some sanity check
on the MADT subtables, we now have to special case these subtables. Of
necessity, these special cases have ended up in arch-dependent code (arm64)
or an arch has simply decided to forgo the check (ia64).
This patch set replaces the BAD_MADT_ENTRY macro with a function called
bad_madt_entry(). This function uses a data set of details about the
subtables to provide more sanity checking than before:
-- is the subtable legal for the version given in the FADT?
-- is the subtable legal for the revision of the MADT in use?
-- is the subtable of the proper length (including checking
on the one variable length subtable that is currently ignored),
given the FADT version and the MADT revision?
Further, this patch set adds in the call to bad_madt_entry() from the
acpi_table_parse_madt() function, allowing it to be used consistently
by all architectures, for all subtables, and removing the need for each
of the subtable traversal callback functions to use BAD_MADT_ENTRY.
In theory, as the ACPI specification changes, we would only have to add
additional information to the data set describing the MADT subtables in
order to continue providing sanity checks, even when new subtables are
added.
These patches have been tested on an APM Mustang (arm64) and are known to
work there. They have also been cross-compiled for x86 and ia64 with no
known failures.
Changes for v2:
-- Acked-by on 2/5 from Marc Zyngier and Catalin Marinas for ARM
-- Correct faulty end of loop test found by Timur Tabi
Al Stone (5):
ACPI: add in a bad_madt_entry() function to eventually replace the
macro
ACPI / ARM64: remove usage of BAD_MADT_ENTRY/BAD_MADT_GICC_ENTRY
ACPI / IA64: remove usage of BAD_MADT_ENTRY
ACPI / X86: remove usage of BAD_MADT_ENTRY
ACPI: remove definition of BAD_MADT_ENTRY macro
arch/arm64/include/asm/acpi.h | 8 --
arch/arm64/kernel/perf_event.c | 3 -
arch/arm64/kernel/smp.c | 2 -
arch/ia64/kernel/acpi.c | 20 ----
arch/x86/kernel/acpi/boot.c | 27 -----
drivers/acpi/tables.c | 241 +++++++++++++++++++++++++++++++++++++++++
drivers/irqchip/irq-gic-v2m.c | 2 -
drivers/irqchip/irq-gic.c | 6 -
include/linux/acpi.h | 4 -
9 files changed, 241 insertions(+), 72 deletions(-)
--
2.4.3
On Tue, Sep 8, 2015 at 12:03 PM, Leif Lindholm <leif.lindholm(a)linaro.org> wrote:
> On Tue, Sep 08, 2015 at 02:09:51PM +0100, Mark Rutland wrote:
>> On Tue, Sep 08, 2015 at 01:43:35PM +0100, Leif Lindholm wrote:
>> > The ACPI DBG2 table defines a debug console. Add support for parsing it
>> > and using it to select earlycon destination when no arguments provided.
>> >
>> > Signed-off-by: Leif Lindholm <leif.lindholm(a)linaro.org>
>>
>> [...]
>>
>> > diff --git a/drivers/acpi/console.c b/drivers/acpi/console.c
>> > new file mode 100644
>> > index 0000000..a985890
>> > --- /dev/null
>> > +++ b/drivers/acpi/console.c
>> > @@ -0,0 +1,103 @@
>> > +/*
>> > + * Copyright (c) 2012, Intel Corporation
>> > + * Copyright (c) 2015, Linaro Ltd.
>> > + *
>> > + * This program is free software; you can redistribute it and/or modify
>> > + * it under the terms of the GNU General Public License version 2 as
>> > + * published by the Free Software Foundation.
>> > + *
>> > + */
>> > +
>> > +#define DEBUG
>>
>> Why?
>
> Kept around from Lv Zheng's 2012 set. Will drop.
>
>> > +#define pr_fmt(fmt) "ACPI: " KBUILD_MODNAME ": " fmt
>> > +
>> > +#include <linux/acpi.h>
>> > +#include <linux/kernel.h>
>> > +#include <linux/serial_core.h>
>> > +
>> > +#define NUM_ELEMS(x) (sizeof(x) / sizeof(*x))
>>
>> Use ARRAY_SIZE (from kernel.h).
>
> I was sure there was something like that, but my grep-fu failed me.
> Will fix.
>
>> > +
>> > +#ifdef CONFIG_SERIAL_EARLYCON
>> > +static int use_earlycon __initdata;
>> > +static int __init setup_acpi_earlycon(char *buf)
>> > +{
>> > + if (!buf)
>> > + use_earlycon = 1;
>> > +
>> > + return 0;
>> > +}
>> > +early_param("earlycon", setup_acpi_earlycon);
>>
>> It seems a shame to add this after folding the OF case into the earlycon
>> code. What necessitates this being a separate early_param? Why is it too
>> early to parse DBG2?
>
> Currently, we don't even know where our ACPI tables are at this point
> (efi_init() is called two functions after parse_early_param() in
> setup_arch). More specifically, because acpi_boot_table_init() is
> called even later than that.
>
> If we moved both of those earlier, we could drop the extra earlycon
> param handling for ACPI. That would of course reduce the ability to
> have dynamically configurable debug messages for both of these.
Personally, I liked that we don't have to have the early_param
handling globally located. I'm not sure I see the benefit of
centralizing it especially if it doesn't even help for your case.
Rob
From: "Jonathan (Zhixiong) Zhang" <zjzhang(a)codeaurora.org>
Currently the kernel ignores CPER records that are unrecognized.
On the other hand, UEFI spec allows for non-standard (eg. vendor
proprietary) error section type in CPER (Common Platform Error Record),
as defined in section N2.3 of UEFI version 2.5. Therefore, user
is not able to see hardware error data of non-standard section.
If section Type field of Generic Error Data Entry is unrecognized,
prints out the raw data in dmesg buffer, and also adds a tracepoint
for reporting such hardware error.
V2:
1. Handle all unrecognized CPER records instead of matching with
section type that is known to be vendor proprietary. (Borislav)
Jonathan (Zhixiong) Zhang (2):
efi: print unrecognized CPER section
ras: acpi/apei: generate trace event for unrecognized CPER section
drivers/acpi/apei/ghes.c | 23 +++++++++++++++++++++--
drivers/firmware/efi/cper.c | 39 +++++++++++++++++++++++++++++++--------
drivers/ras/ras.c | 1 +
include/ras/ras_event.h | 45 +++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 98 insertions(+), 10 deletions(-)
--
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
Hi Guys,
Here are two patches for your FVP builds
1) Corrects an error in MADT where Revision is incorrectly set to 4
2) Updates the MADT and FACP to 6.0 spec
Have fun
Graeme
En xtop encontras lo ultimo en series y peliculas destacadas.
Encontranos con la palabra xtop con cualquier buscador.
Tienda online Venta por internet !
Peliculas Estrenos y preestrenos:
8 APELLIDOS VASCOS
AGUA
ABZURDAH
AGUAS TRANQUILAS
ANTMAN (EL HOMBRE HORMIGA)
Bajo el mismo cielo
BUSQUEDA IMPLACABLE 3 (TAKEN 3)
CENIZAS DEL PASADO
CERCANA OBSESION (THE BOY NEXT DOOR)
CHAPPIE
CIUDADES DE PAPEL (PAPER TOWNS)
CON DERECHO A ROCE
DE CABALLOS Y DE HOMBRES
DONDE SE ESCONDE EL DIABLO (WHERE THE DEVIL HIDES)
DOS DIAS UNA NOCHE (DEUX JOURS UNE NUIT)
DOS LOCAS EN FUGA (HOT PURSUIT)
DRAGON BALL Z RESURRECTION F (LA RESURRECCION DE FREEZER)
EL AÑO MAS VIOLENTO (A MOST VIOLENT YEAR)
El clan
EL GRAN PEQUEÑO (LITTLE BOY)
EL GRAN SECUESTRO DE MR HEINEKEN
EL GURU DE LAS BODAS (THE WEDDING RINGER)
EL NUEVO EXOTICO HOTEL MARIGOLD
EL PAYASO DEL MAL (CLOWN)
EL SECRETO DE ADALINE
EL SEPTIMO ENANITO (THE 7TH DWARF)
EL ULTIMO NARUTO LA PELICULA (THE LAST NARUTO THE MOVIE)
ELIMINADO (UNFRIENDED)
ESCRIBIENDO DE AMOR
INTENSAMENTE
JESSABELLE
JURASSIC WORLD (JURASSIC PARK IV)
LA CASA DEL DEMONIO (DEMONIC)
LA DAMA DE ORO (WOMAN IN GOLD)
LA MECANICA DEL CORAZON (JACK ET LA MECANIQUE DU COEUR)
LA NOCHE DEL DEMONIO 3 (INSIDIOUS)
LA OVEJA SHAUN LA PELICULA
LOS 33 DE SAN JOSE (33)
LUGARES OSCUROS (DARK PLACES)
MAD MAX 4 FURIA EN LA CARRETERA
MAGIC MIKE XXL
MAN ON WIRE (EL ALAMBRISTA)
MIENTRAS SEAMOS JOVENES (WHILE WERE YOUNG)
MIL VECES BUENAS NOCHES (A THOU SAND TIMES GOODNIGHT)
MINIONS
MISION IMPOSIBLE 5 NACION SECRETA
NOTAS PERFECTAS 2 (PITCH PERFECT 2)
PIXELES
POLTERGEIST (JUEGOS DIABOLICOS)
PUERTAS ADENTRO (MUSARAÑAS)
RAPIDOS Y FURIOSOS 7
RESUCITADOS
SHOWROOM
SPY UNA ESPIA DESPISTADA
TE SIGUE (IT FOLLOWS)
TED 2
TERAPIA DE BROADWAY (SHES FUNNY THAT WAY)
TERMINATOR 5 GENESIS
TERREMOTO LA FALLA DE SAN ANDRES
TOMORROWLAND EL MUNDO DEL MAÑANA
TRASH (LADRONES DE ESPERANZA)
TRUENO Y LA CASA MAGICA
UN CASTILLO EN ITALIA (UN CHATEAU EN ITALIE)
UN NUEVO DESPERTAR (THE HUMBLING)
UNA NOCHE PARA SOBREVIVIR (RUN ALL NIGHT)
VOLEY
series DE TV :
A TOUCH OF CLOTH
ANTMAN (EL HOMBRE HORMIGA)
BLACK MIRROR 02* TEMP DVD 01
COMBATE
DARK MATTER
DEVIOUS MAIDS
DOWNTON ABBEY
DR HOUSE
DRAGON BALL SUPE
EL TIEMPO ENTRE COSTURAS 01*
FEAR THE WALKING DEAD
GAME OF THRONES 05* TEMP DVD
GYM TONY
HEROES
HOUSE OF CARDS 03* TEMP DVD 03
HUMANS
INFIELES (MISTRESSES)
JONATHAN STRANGE AND MR NORRELL
LOS CABALLEROS DEL ZODIACO ALMA DORADA
MAJOR CRIMES
ORANGE IS THE NEW BLACK 03*
OUTLANDER
PATITO FEO
REVENGE 04* TEMP DVD 03
STITCHERS
TEEN WOLF
THE BLACKLIST
THE BRINK
THE FOSTERS
THE MESSENGERS
VIKINGOS 03* TEMP DVD 02
WAYWARD PINES
ZUMBA SCULPT
Hi Marc,
Tomasz and I reworked this patch set to address your comments,
mainly about the self-probe infrastructure and the way to init
GIC redistributor in GICC structures.
For the self-probe infrastructure, we introduce a new file in
drivers/acpi/ which can be reused for ioapic in the future;
For init GIC redistributor in GICC structures, I introduced
a flag in struct redist_region just as you suggested, and
get the redist base from GICC strucutes if no redistributor
regions are available from GICR strucutes. I think the naming
of the flag and functions are not good, please comment on them :)
For the proper namespace of domain token for ACPI, I think we
can use the Interrupt Controller Structure Types as the token,
(just some ideas, not implemented in the patch, trying to discuss
with you that if it makes sense to you), for Structure Types,
we got:
1 - I/O APIC
0xB - GICC CPU Interface Structure
0xC - GICD GIC Distributor Structure
0xD - GICv2m MSI Frame
0xE - GICR Redistributor Structure
0xF - ITS Structure
so except the GICD 0xC both for GICv2/3, others can used as
proper namespace for different domain tokens, what do you think?
Please comments on if we are on right direction, thanks.
Hanjun
Hanjun Guo (4):
irqchip / GIC / ACPI: Use IRQCHIP_ACPI_DECLARE to simplify GICv2 init
code
irqchip / GICv3: remove the useless comparision of device node in
xlate
irqchip / GICv3: Add ACPI support for GICv3+ initialization
irqchip / GICv3 / ACPI: Add GICR support via GICC structures
Tomasz Nowicki (2):
acpi, irqchip: Add self-probe infrastructure to initialize IRQ
controller
irqchip / GICv3: Refactor gic_of_init() for GICv3 driver
arch/arm64/include/asm/irq.h | 13 --
arch/arm64/kernel/acpi.c | 25 ---
drivers/acpi/Makefile | 2 +
drivers/acpi/irq.c | 136 +++++++++++++
drivers/irqchip/irq-gic-v3.c | 360 ++++++++++++++++++++++++++++++-----
drivers/irqchip/irq-gic.c | 4 +-
include/asm-generic/vmlinux.lds.h | 13 ++
include/linux/acpi.h | 18 ++
include/linux/acpi_irq.h | 4 +-
include/linux/irqchip.h | 13 ++
include/linux/irqchip/arm-gic-acpi.h | 9 +-
include/linux/mod_devicetable.h | 9 +
12 files changed, 512 insertions(+), 94 deletions(-)
create mode 100644 drivers/acpi/irq.c
--
1.9.1
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. See drivers/mailbox/pcc.c
This patchset introduces a CPPC based CPUFreq driver that works with existing governors
such as ondemand. The CPPC table parsing and the CPPC communication semantics are
abstracted into separate files to allow future CPPC based drivers to implement their
own governors if required.
Initial patchsets included an adaptation of the PID governor from intel_pstate.c. However
recent experiments led to extensive modifications of the algorithm to calculate CPU
busyness. Until it is verified that these changes are worthwhile, the existing governors
should provide for a good enough starting point for ARM64 servers.
Finer details about the PCC and CPPC spec are available in the latest ACPI 5.1
specification.[2]
Testing:
=======
This was tested on an SBSA compatible ARMv8 server with CPPCv2
firmware running on a remote processor. I verified that each CPUs
performance limits were detected and that new performance requests
were made by the on-demand governor proportional to the load on each
CPU. I also verified that using the acpi_processor driver correctly
maps the physical CPU ids to logical CPU ids, which helps in picking
up the proper _CPC details from a processor object, in the case where
CPU physical ids may not be contiguous.
Changes since V7:
- Simplied new kconfig options for PSS and idle.
- Separated patch to enable acpi processor on ARM64.
- Removed redundant kconfig cross deps on PCC.
- Decoupled processor_perflib from new PSS kconfig option.
Changes since V6:
- Separated PSS and CST from ACPI processor driver in two patches.
- Made new Kconfig symbols auto selectable from Arch Kconfigs.
Changes since V5:
- Checkpatch cleanups.
- Change pss_init to pss_perf_init. Rec by Srinivas Pandruvada.
- Explicit comment explaining why postcore_initcall to pcc mailbox.
- Fold acpi_processor_syscore_init/exit into CONFIG_ACPI_CST.
- Added patch with dummy functions used by ACPI_HOTPLUG_CPU.
Changes since V4:
- Misc cleanups. Addressed feedback from Rafael.
- Made acpi_processor.c independent of C-states, P-states and others.
- Per CPU scanning for _CPC is now made from acpi_processor.c
- Added new Kconfig options for legacy C states and P states to enable future
support for newer alternatives as defined in the ACPI spec 6.0.
Changes since V3:
- Split CPPC backend methods into separate files.
- Add frontend driver which plugs into existing CPUfreq governors.
- Simplify PCC driver by moving communication space mapping and read/write
into client drivers.
Changes since V2:
- Select driver if !X86, since intel_pstate will use HWP extensions instead.
- Added more comments.
- Added Freq domain awareness and PSD parsing.
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.
[1] - http://lwn.net/Articles/608715/
[2] - http://www.uefi.org/sites/default/files/resources/ACPI_5_1release.pdf
[3] - https://patches.linaro.org/40705/
Ashwin Chaugule (9):
PCC: Initialize PCC Mailbox earlier at boot
ACPI: Split out ACPI PSS from ACPI Processor driver
ACPI: Decouple ACPI idle and ACPI processor drivers
ACPI: Introduce CPU performance controls using CPPC
CPPC: Add a CPUFreq driver for use with CPPC
ACPI: Add weak routines for ACPI CPU Hotplug
CPPC: Probe for CPPC tables for each ACPI Processor object
PCC: Disable compilation by default
ACPI: Allow selection of the ACPI processor driver for ARM64
drivers/acpi/Kconfig | 35 +-
drivers/acpi/Makefile | 7 +-
drivers/acpi/acpi_processor.c | 18 +
drivers/acpi/cppc_acpi.c | 812 ++++++++++++++++++++++++++++++++++++++++
drivers/acpi/processor_driver.c | 90 +++--
drivers/cpufreq/Kconfig.arm | 17 +
drivers/cpufreq/Makefile | 2 +
drivers/cpufreq/cppc_cpufreq.c | 197 ++++++++++
drivers/mailbox/Kconfig | 1 +
drivers/mailbox/pcc.c | 8 +-
include/acpi/cppc_acpi.h | 137 +++++++
include/acpi/processor.h | 63 +++-
12 files changed, 1345 insertions(+), 42 deletions(-)
create mode 100644 drivers/acpi/cppc_acpi.c
create mode 100644 drivers/cpufreq/cppc_cpufreq.c
create mode 100644 include/acpi/cppc_acpi.h
--
1.9.1
Hi Al,
>Where does it "stall"? What's the last message you see? And if
you're not
>using earlycon, please do so; that will help determine how far the boot is
>getting.
If I boot it with acpi=force, no output. Does my usage below look correct?
GRUB_CMDLINE_LINUX="earlycon=uart8250,mmio32,0x1c021000 acpi=force
console=ttyS0,115200 loglevel=7"
>How were those checked?
In setup_arch() I was calling disable_acpi() right after the
acpi_boot_table_init() call
as that makes the system get to the prompt.
I am about to build the kernel with your .config and test it on one of
Mustangs
in the Linaro Austin lab. The Boot firmware version is 1.1.0-rh-0.15.
Itaru