Re: [PATCH v2 09/18] ACPI / processor: Make it possible to get CPU hardware ID via GICC

2014-08-19 Thread Hanjun Guo
On 2014-8-19 2:34, Sudeep Holla wrote: [...] >> >> +#include >> + >> /* Basic configuration for ACPI */ >> #ifdefCONFIG_ACPI >> /* >> @@ -59,6 +61,18 @@ static inline void disable_acpi(void) >> acpi_noirq = 1; >> } >> >> +u32 pack_mpidr_into_32_bits(u64 mpidr); >> + >> +/* >> + *

Re: [PATCH v2 10/18] ARM64 / ACPI: Introduce ACPI_IRQ_MODEL_GIC and register device's gsi

2014-08-19 Thread Hanjun Guo
On 2014-8-19 2:34, Sudeep Holla wrote: > > > On 04/08/14 16:28, Hanjun Guo wrote: >> Introduce ACPI_IRQ_MODEL_GIC which is needed for ARM64 as GIC is >> used, and then register device's gsi with the core IRQ subsystem. >> >> acpi_register_gsi() is si

Re: [PATCH v2 08/18] ARM64 / ACPI: Get the enable method for SMP initialization in ACPI way

2014-08-19 Thread Hanjun Guo
On 2014-8-19 2:56, Geoff Levand wrote: > Hi Hanjun, Hi Geoff, > > On Mon, 2014-08-04 at 23:28 +0800, Hanjun Guo wrote: >> --- a/arch/arm64/include/asm/acpi.h >> +++ b/arch/arm64/include/asm/acpi.h >> @@ -14,6 +14,27 @@ >> >> /* Basic configuration

Re: [PATCH v2 05/18] ARM64 / ACPI: Parse FADT table to get PSCI flags for PSCI init

2014-08-19 Thread Hanjun Guo
On 2014-8-19 19:10, Mark Rutland wrote: @@ -47,6 +49,26 @@ void __init __acpi_unmap_table(char *map, unsigned long size) early_memunmap(map, size); } +static int __init acpi_parse_fadt(struct acpi_table_header *table) +{ + struct acpi_table_fadt *fadt

Re: [Linaro-acpi] [PATCH v2 06/18] ARM64 / ACPI: Parse MADT to map logical cpu to MPIDR and get cpu_possible/present_map

2014-08-19 Thread Hanjun Guo
On 2014-8-20 0:46, Zi Shen Lim wrote: > Hanjun, Hi Lim, > > On Tue, Aug 19, 2014 at 6:00 AM, Hanjun Guo wrote: >> Will INTERRUPT_CONTROLLER confuse people? There is only one GIC redistributor >> (some people regard it as interrupt controller) in ARM system, if we use &g

Re: [PATCH v2 08/18] ARM64 / ACPI: Get the enable method for SMP initialization in ACPI way

2014-08-19 Thread Hanjun Guo
On 2014-8-20 3:25, Geoff Levand wrote: > Hi Hanjun, > > On Tue, 2014-08-19 at 20:11 +0800, Hanjun Guo wrote: >> On 2014-8-19 2:56, Geoff Levand wrote: > >>> message = acpi_disabled ? dn->full_name : ""; >>> >>> ... >>>

Re: [PATCH v2 05/18] ARM64 / ACPI: Parse FADT table to get PSCI flags for PSCI init

2014-08-19 Thread Hanjun Guo
ks Hanjun > > Bob > > > >> -Original Message- >> From: Hanjun Guo [mailto:hanjun@linaro.org] >> Sent: Tuesday, August 19, 2014 5:14 AM >> To: Mark Rutland >> Cc: Catalin Marinas; Rafael J. Wysocki; graeme.greg...@linaro.org; Arnd >> Ber

Re: [PATCH v2 06/18] ARM64 / ACPI: Parse MADT to map logical cpu to MPIDR and get cpu_possible/present_map

2014-08-20 Thread Hanjun Guo
On 2014-8-20 22:38, Catalin Marinas wrote: > On Tue, Aug 19, 2014 at 08:36:46AM +0100, Hanjun Guo wrote: >> On 2014-8-18 22:27, Catalin Marinas wrote: >>> On Mon, Aug 04, 2014 at 04:28:13PM +0100, Hanjun Guo wrote: >>>> diff --git a/arch/arm64/include/asm/acpi.h b

Re: [PATCH v2 08/18] ARM64 / ACPI: Get the enable method for SMP initialization in ACPI way

2014-08-20 Thread Hanjun Guo
On 2014-8-20 22:52, Catalin Marinas wrote: > On Tue, Aug 19, 2014 at 09:32:25AM +0100, Hanjun Guo wrote: >> On 2014-8-18 22:27, Catalin Marinas wrote: >>> On Mon, Aug 04, 2014 at 04:28:15PM +0100, Hanjun Guo wrote: >>>> +#ifdef CONFIG_ACPI >>>> +/* >&g

Re: [PATCH v2 09/18] ACPI / processor: Make it possible to get CPU hardware ID via GICC

2014-08-20 Thread Hanjun Guo
On 2014-8-20 22:56, Catalin Marinas wrote: > On Tue, Aug 19, 2014 at 09:37:34AM +0100, Hanjun Guo wrote: >> On 2014-8-18 22:27, Catalin Marinas wrote: >>> On Mon, Aug 04, 2014 at 04:28:16PM +0100, Hanjun Guo wrote: >>>> diff --git a/drivers/acpi/processor_core.c b

Re: [PATCH 19/19] Documentation: ACPI for ARM64

2014-08-20 Thread Hanjun Guo
On 2014-8-21 6:17, Olof Johansson wrote: > On Mon, Aug 18, 2014 at 05:29:26PM +0800, Hanjun Guo wrote: >> On 2014-8-15 18:01, Catalin Marinas wrote: >>> Hanjun, >> >> Hi Catalin, >> >>> >>> On Fri, Aug 15, 2014 at 10:09:42AM +0100, Hanjun Guo

Re: [PATCH v3 13/17] ARM64 / ACPI: Add GICv2 specific ACPI boot support

2014-09-04 Thread Hanjun Guo
On 2014年09月03日 19:17, Hanjun Guo wrote: >>>>>>> + >>>>>>> +#ifdef CONFIG_ACPI >>>>>>> +#define ACPI_MAX_GIC_CPU_INTERFACE_ENTRIES 65535 >>>>>> With GICv2? I doubt it. >>>>> I will create

Re: [PATCH v3 09/17] ARM64 / ACPI: Parse MADT for SMP initialization

2014-09-04 Thread Hanjun Guo
Hi Lorenzo, On 2014年09月04日 01:21, Lorenzo Pieralisi wrote: > On Mon, Sep 01, 2014 at 03:57:47PM +0100, Hanjun Guo wrote: >> MADT contains the information for MPIDR which is essential for >> SMP initialization, parse the GIC cpu interface structures to >> get the MPID

[PATCH v3 00/17] Introduce ACPI for ARM64 based on ACPI 5.1

2014-09-01 Thread Hanjun Guo
PI / 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 t

[PATCH v3 01/17] ARM64: Move the init of cpu_logical_map(0) before unflatten_device_tree()

2014-09-01 Thread Hanjun Guo
It always make sense to initialize CPU0's logical map entry from the hardware values, so move the initialization of cpu_logical_map(0) before unflatten_device_tree() which is needed by ACPI code later. Signed-off-by: Hanjun Guo --- arch/arm64/kernel/setup.c |2 +- 1 file chang

[PATCH v3 06/17] ARM64 / ACPI: Make PCI optional for ACPI on ARM64

2014-09-01 Thread Hanjun Guo
: Hanjun Guo --- arch/arm64/include/asm/pci.h | 11 +++ drivers/acpi/Makefile|2 +- drivers/acpi/internal.h |5 + include/linux/pci.h | 37 +++-- 4 files changed, 44 insertions(+), 11 deletions(-) create mode 100644

[PATCH v3 09/17] ARM64 / ACPI: Parse MADT for SMP initialization

2014-09-01 Thread Hanjun Guo
and Parking protocol, but the Parking protocol is only specified for ARMv7 now, so make PSCI as the only way for the SMP boot protocol before some updates for the ACPI spec or the Parking protocol spec. Signed-off-by: Hanjun Guo Signed-off-by: Tomasz Nowicki --- arch/arm64/include/asm/acpi.h

[PATCH v3 03/17] ARM64 / ACPI: Introduce lowlevel suspend function

2014-09-01 Thread Hanjun Guo
acpi_suspend_lowlevel as this is also required by core. This will be filled in when standards are defined for arm64 ACPI global power states. Signed-off-by: Graeme Gregory Signed-off-by: Hanjun Guo --- arch/arm64/include/asm/acpi.h | 12 arch/arm64/kernel/acpi.c |7 +++ 2

[PATCH v3 05/17] ARM64 / ACPI: If we chose to boot from acpi then disable FDT

2014-09-01 Thread Hanjun Guo
From: Graeme Gregory If the early boot methods of acpi are happy that we have valid ACPI tables and acpi=off has not been passed. Then do not unflat devicetree effectively disabling further hardware probing from DT. Signed-off-by: Graeme Gregory Signed-off-by: Hanjun Guo --- arch/arm64

[PATCH v3 02/17] ARM64 / ACPI: Get RSDP and ACPI boot-time tables

2014-09-01 Thread Hanjun Guo
() mechanism here to get the RSDP and all the table pointers. Signed-off-by: Al Stone Signed-off-by: Graeme Gregory Signed-off-by: Tomasz Nowicki Signed-off-by: Hanjun Guo --- arch/arm64/include/asm/acenv.h | 18 +++ arch/arm64/include/asm/acpi.h | 45 ++ arch

[PATCH v3 04/17] ARM64 / ACPI: Introduce early_param for "acpi"

2014-09-01 Thread Hanjun Guo
From: Al Stone Introduce one early parameters "off" for "acpi" to disable ACPI on ARM64. Signed-off-by: Al Stone Signed-off-by: Graeme Gregory Signed-off-by: Hanjun Guo --- Documentation/kernel-parameters.txt |3 ++- arch/arm64/kernel/acpi.c| 15

[PATCH v3 07/17] ARM64 / ACPI: Parse FADT table to get PSCI flags for PSCI init

2014-09-01 Thread Hanjun Guo
d-off-by: Hanjun Guo Signed-off-by: Graeme Gregory Signed-off-by: Tomasz Nowicki --- arch/arm64/include/asm/acpi.h | 17 + arch/arm64/include/asm/psci.h |3 +- arch/arm64/kernel/acpi.c | 31 +++- arch/arm64/kernel/psci.c

[PATCH v3 08/17] ACPI / table: Print GIC information when MADT is parsed

2014-09-01 Thread Hanjun Guo
When MADT is parsed, print GIC information to make the boot log look pretty. Signed-off-by: Hanjun Guo Signed-off-by: Tomasz Nowicki --- drivers/acpi/tables.c | 43 +++ 1 file changed, 43 insertions(+) diff --git a/drivers/acpi/tables.c b/drivers/acpi

[PATCH v3 10/17] ACPI / processor: Make it possible to get CPU hardware ID via GICC

2014-09-01 Thread Hanjun Guo
Introduce a new function map_gicc_mpidr() to allow MPIDRs to be obtained from the GICC Structure introduced by ACPI 5.1. MPIDR is the CPU hardware ID as local APIC ID on x86 platform, so we use MPIDR not the GIC CPU interface ID to identify CPUs. Signed-off-by: Hanjun Guo --- arch/arm64

[PATCH v3 11/17] ARM64 / ACPI: Introduce ACPI_IRQ_MODEL_GIC and register device's gsi

2014-09-01 Thread Hanjun Guo
ly-by: Amit Daniel Kachhap Signed-off-by: Hanjun Guo --- arch/arm64/kernel/acpi.c | 73 ++ drivers/acpi/bus.c |3 ++ include/linux/acpi.h |1 + 3 files changed, 77 insertions(+) diff --git a/arch/arm64/kernel/acpi.c b/arch/arm64/k

[PATCH v3 12/17] ACPI / table: Add new function to get table entries

2014-09-01 Thread Hanjun Guo
normally called after acpi_table_parse(). Signed-off-by: Ashwin Chaugule Signed-off-by: Hanjun Guo --- drivers/acpi/tables.c | 70 +++-- include/linux/acpi.h |4 +++ 2 files changed, 54 insertions(+), 20 deletions(-) diff --git a/drivers/acpi

[PATCH v3 13/17] ARM64 / ACPI: Add GICv2 specific ACPI boot support

2014-09-01 Thread Hanjun Guo
. NOTE: This commit allow to initialize GICv1/2 only. Signed-off-by: Tomasz Nowicki Signed-off-by: Hanjun Guo --- arch/arm64/include/asm/acpi.h|2 - arch/arm64/kernel/acpi.c | 23 +++ arch/arm64/kernel/irq.c |5 ++ drivers/irqchip/irq-gic.c

[PATCH v3 17/17] Documentation: ACPI for ARM64

2014-09-01 Thread Hanjun Guo
From: Graeme Gregory Add documentation for the guidelines of how to use ACPI on ARM64. Signed-off-by: Graeme Gregory Signed-off-by: Hanjun Guo --- Documentation/arm64/arm-acpi.txt | 218 ++ 1 file changed, 218 insertions(+) create mode 100644

[PATCH v3 14/17] ARM64 / ACPI: Parse GTDT to initialize arch timer

2014-09-01 Thread Hanjun Guo
Using the information presented by GTDT to initialize the arch timer (not memory-mapped). Originally-by: Amit Daniel Kachhap Signed-off-by: Hanjun Guo --- arch/arm64/kernel/time.c |7 ++ drivers/clocksource/arm_arch_timer.c | 117 -- include

[PATCH v3 15/17] ARM64 / ACPI: Select ACPI_REDUCED_HARDWARE_ONLY if ACPI is enabled on ARM64

2014-09-01 Thread Hanjun Guo
From: Al Stone ACPI reduced hardware mode is disabled by default, but ARM64 can only run properly in ACPI hardware reduced mode, so select ACPI_REDUCED_HARDWARE_ONLY if ACPI is enabled on ARM64. Reviewed-by: Grant Likely Signed-off-by: Al Stone Signed-off-by: Hanjun Guo --- arch/arm64

[PATCH v3 16/17] ARM64 / ACPI: Enable ARM64 in Kconfig

2014-09-01 Thread Hanjun Guo
-off-by: Al Stone Signed-off-by: Hanjun Guo --- arch/arm64/Kconfig |2 ++ drivers/acpi/Kconfig |6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index 065438c..8dabaeb 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64

[RFC PATCH for Juno 2/2] tty: SBSA compatible UART

2014-09-01 Thread Hanjun Guo
From: Graeme Gregory This is a subset of pl011 UART which does not supprt DMA or baud rate changing. It is specified in the Server Base System Architecture document from ARM. Signed-off-by: Graeme Gregory --- drivers/tty/Kconfig|6 + drivers/tty/Makefile |1 + drivers/tty/sbsaua

[RFC PATCH for Juno 0/2] Drivers for Juno to boot from ACPI

2014-09-01 Thread Hanjun Guo
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

[RFC PATCH for Juno 1/2] net: smsc911x add support for probing from ACPI

2014-09-01 Thread Hanjun Guo
From: Graeme Gregory This is a standard platform device to resources are converted in the ACPI core in the same fasion as DT resources. For the other DT provided information there is _DSD for ACPI. Signed-off-by: Graeme Gregory --- drivers/net/ethernet/smsc/smsc911x.c | 38 ++

Re: [PATCH v3 13/17] ARM64 / ACPI: Add GICv2 specific ACPI boot support

2014-09-02 Thread Hanjun Guo
On 2014年09月02日 21:02, Marc Zyngier wrote: > On 02/09/14 12:48, Tomasz Nowicki wrote: >> On 01.09.2014 19:35, Marc Zyngier wrote: >>> On 01/09/14 15:57, Hanjun Guo wrote: >>>> From: Tomasz Nowicki >>>> >>>> ACPI kernel uses MADT table for

Re: [PATCH v3 13/17] ARM64 / ACPI: Add GICv2 specific ACPI boot support

2014-09-03 Thread Hanjun Guo
>> + >> +#ifdef CONFIG_ACPI >> +#define ACPI_MAX_GIC_CPU_INTERFACE_ENTRIES 65535 > With GICv2? I doubt it. I will create macro for each GIC driver: #define ACPI_MAX_GICV2_CPU_INTERFACE_ENTRIES8 #define ACPI_MAX_GICV3_CPU_INTERFACE_ENTRIES65535 >>> Where do y

Re: [PATCH 19/19] Documentation: ACPI for ARM64

2014-08-13 Thread Hanjun Guo
:27:50PM +0100, Olof Johansson wrote: >>>>> On Mon, Jul 28, 2014 at 11:07:50AM +0200, Arnd Bergmann wrote: >>>>>> On Saturday 26 July 2014 19:34:48 Olof Johansson wrote: >>>>>>> On Thu, Jul 24,

Re: [PATCH 19/19] Documentation: ACPI for ARM64

2014-08-15 Thread Hanjun Guo
On 2014-8-14 18:27, Catalin Marinas wrote: > On Thu, Aug 14, 2014 at 04:21:25AM +0100, Hanjun Guo wrote: >> On 2014-8-14 7:41, Rafael J. Wysocki wrote: >>> On Tuesday, August 12, 2014 07:23:47 PM Catalin Marinas wrote: >>>> If we consider ACPI unusable on ARM but

Re: [RFC PATCH 1/9] ACPI: Add support for device specific properties

2014-08-18 Thread Hanjun Guo
rties->package.elements[i]; > + /* > + * Only two elements allowed, the first one must be a string and > + * the second one has to satisfy certain conditions. > + */ > + if (property->package.count != 2 > + |

Re: [RFC PATCH 1/9] ACPI: Add support for device specific properties

2014-08-18 Thread Hanjun Guo
On 2014-8-18 16:27, Mika Westerberg wrote: > On Mon, Aug 18, 2014 at 04:13:29PM +0800, Hanjun Guo wrote: >> Hi, >> >> Some minor comments below. >> >> On 2014-8-17 14:04, Mika Westerberg wrote: >>> Device Tree is used in many embedded systems to describe

Re: [PATCH 19/19] Documentation: ACPI for ARM64

2014-08-18 Thread Hanjun Guo
On 2014-8-15 18:01, Catalin Marinas wrote: > Hanjun, Hi Catalin, > > On Fri, Aug 15, 2014 at 10:09:42AM +0100, Hanjun Guo wrote: >> On 2014-8-14 18:27, Catalin Marinas wrote: >>> On Thu, Aug 14, 2014 at 04:21:25AM +0100, Hanjun Guo wrote: >>>> On 201

Re: [PATCH 10/19] ARM64 / ACPI: Get the enable method for SMP initialization in ACPI way

2014-08-04 Thread Hanjun Guo
Hi Olof, On 2014-7-31 18:57, Hanjun Guo wrote: > On 2014-7-31 14:54, Olof Johansson wrote: [...] >>> +static void __init acpi_smp_init_cpus(void) >>> +{ >>> + int cpu; >>> + >>> + for_each_possible_cpu(cpu) { >>> + if (cpu_

[PATCH v2 01/18] ARM64: Move the init of cpu_logical_map(0) before unflatten_device_tree()

2014-08-04 Thread Hanjun Guo
It always make sense to initialize CPU0's logical map entry from the hardware values, so move the initialization of cpu_logical_map(0) before unflatten_device_tree() which is needed by ACPI code later. Signed-off-by: Hanjun Guo --- arch/arm64/kernel/setup.c |2 +- 1 file chang

[PATCH v2 02/18] ARM64 / ACPI: Get RSDP and ACPI boot-time tables

2014-08-04 Thread Hanjun Guo
-off-by: Tomasz Nowicki Signed-off-by: Hanjun Guo --- arch/arm64/include/asm/acenv.h | 18 +++ arch/arm64/include/asm/acpi.h | 45 ++ arch/arm64/include/asm/cpu.h | 11 +++ arch/arm64/kernel/Makefile |1 + arch/arm64/kernel/acpi.c | 69

[PATCH v2 00/18] Introduce ACPI for ARM64 based on ACPI 5.1

2014-08-04 Thread Hanjun Guo
et 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

[PATCH v2 04/18] ARM64 / ACPI: Make PCI optional for ACPI on ARM64

2014-08-04 Thread Hanjun Guo
: Hanjun Guo --- arch/arm64/include/asm/pci.h | 11 +++ drivers/acpi/Makefile|2 +- drivers/acpi/internal.h |5 + include/linux/pci.h | 37 +++-- 4 files changed, 44 insertions(+), 11 deletions(-) create mode 100644

[PATCH v2 05/18] ARM64 / ACPI: Parse FADT table to get PSCI flags for PSCI init

2014-08-04 Thread Hanjun Guo
d-off-by: Hanjun Guo Signed-off-by: Graeme Gregory --- arch/arm64/include/asm/acpi.h | 12 ++ arch/arm64/kernel/acpi.c | 37 + arch/arm64/kernel/psci.c | 89 ++--- arch/arm64/kernel/setup.c |2 + 4 files chan

[PATCH v2 03/18] ARM64 / ACPI: Introduce lowlevel suspend function

2014-08-04 Thread Hanjun Guo
acpi_suspend_lowlevel as this is also required by core. This will be filled in when standards are defined for arm64 ACPI global power states. Signed-off-by: Graeme Gregory Signed-off-by: Hanjun Guo --- arch/arm64/include/asm/acpi.h | 12 arch/arm64/kernel/acpi.c |7 +++ 2

[PATCH v2 17/18] ARM64 / ACPI: Enable ARM64 in Kconfig

2014-08-04 Thread Hanjun Guo
-off-by: Al Stone Signed-off-by: Hanjun Guo --- arch/arm64/Kconfig |2 ++ drivers/acpi/Kconfig |6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index 95835bc..1e0ca19 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64

[PATCH v2 12/18] ARM64 / ACPI: Add GICv2 specific ACPI boot support

2014-08-04 Thread Hanjun Guo
. NOTE: This commit allow to initialize GICv1/2 only. Signed-off-by: Tomasz Nowicki Signed-off-by: Hanjun Guo --- arch/arm64/include/asm/acpi.h|2 - arch/arm64/kernel/acpi.c | 26 +++- arch/arm64/kernel/irq.c |5 ++ drivers/irqchip/irq-gic.c

[PATCH v2 15/18] ARM64 / ACPI: Introduce early_param for "acpi" and set ACPI default off

2014-08-04 Thread Hanjun Guo
From: Al Stone Introduce one early parameters "on" for "acpi" to enable ACPI on ARM64. Disable ACPI before early parameters parsed, and enable it to pass "acpi=on" if people want use ACPI on ARM64. Signed-off-by: Al Stone Signed-off-by: Graeme Greg

[PATCH v2 16/18] ARM64 / ACPI: If we chose to boot from acpi then disable FDT

2014-08-04 Thread Hanjun Guo
From: Graeme Gregory If the early boot methods of acpi are happy that we have valid ACPI tables and acpi=on has been passed. Then do not unflat devicetree effectively disabling further hardware probing from DT. Signed-off-by: Graeme Gregory Signed-off-by: Hanjun Guo --- arch/arm64/kernel

[PATCH v2 18/18] Documentation: ACPI for ARM64

2014-08-04 Thread Hanjun Guo
From: Graeme Gregory Add documentation for the guidelines of how to use ACPI on ARM64. Signed-off-by: Graeme Gregory Signed-off-by: Hanjun Guo --- Documentation/arm64/arm-acpi.txt | 215 ++ 1 file changed, 215 insertions(+) create mode 100644

[PATCH v2 14/18] ARM64 / ACPI: Select ACPI_REDUCED_HARDWARE_ONLY if ACPI is enabled on ARM64

2014-08-04 Thread Hanjun Guo
From: Al Stone ACPI reduced hardware mode is disabled by default, but ARM64 can only run properly in ACPI hardware reduced mode, so select ACPI_REDUCED_HARDWARE_ONLY if ACPI is enabled on ARM64. Reviewed-by: Grant Likely Signed-off-by: Al Stone Signed-off-by: Hanjun Guo --- arch/arm64

[PATCH v2 13/18] ARM64 / ACPI: Parse GTDT to initialize arch timer

2014-08-04 Thread Hanjun Guo
Using the information presented by GTDT to initialize the arch timer (not memory-mapped). Originally-by: Amit Daniel Kachhap Signed-off-by: Hanjun Guo --- arch/arm64/kernel/time.c |7 ++ drivers/clocksource/arm_arch_timer.c | 117 -- include

[PATCH v2 10/18] ARM64 / ACPI: Introduce ACPI_IRQ_MODEL_GIC and register device's gsi

2014-08-04 Thread Hanjun Guo
ly-by: Amit Daniel Kachhap Signed-off-by: Hanjun Guo --- arch/arm64/kernel/acpi.c | 73 ++ drivers/acpi/bus.c |3 ++ include/linux/acpi.h |1 + 3 files changed, 77 insertions(+) diff --git a/arch/arm64/kernel/acpi.c b/arch/arm64/k

[PATCH v2 06/18] ARM64 / ACPI: Parse MADT to map logical cpu to MPIDR and get cpu_possible/present_map

2014-08-04 Thread Hanjun Guo
MADT contains the information for MPIDR which is essential for SMP initialization, parse the GIC cpu interface structures to get the MPIDR value and map it to cpu_logical_map(), and add enabled cpu with valid MPIDR into cpu_possible_map and cpu_present_map. Signed-off-by: Hanjun Guo Signed-off

[PATCH v2 07/18] ACPI / table: Print GIC information when MADT is parsed

2014-08-04 Thread Hanjun Guo
When MADT is parsed, print GIC information to make the boot log look pretty. Signed-off-by: Hanjun Guo Signed-off-by: Tomasz Nowicki --- drivers/acpi/tables.c | 39 ++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/drivers/acpi/tables.c b

[PATCH v2 11/18] ACPI / table: Add new function to get table entries

2014-08-04 Thread Hanjun Guo
normally called after acpi_table_parse(). Signed-off-by: Ashwin Chaugule Signed-off-by: Hanjun Guo --- drivers/acpi/tables.c | 70 +++-- include/linux/acpi.h |4 +++ 2 files changed, 54 insertions(+), 20 deletions(-) diff --git a/drivers/acpi

[PATCH v2 08/18] ARM64 / ACPI: Get the enable method for SMP initialization in ACPI way

2014-08-04 Thread Hanjun Guo
ACPI 5.1 only has two explicit methods to boot up SMP, PSCI and Parking protocol, but the Parking protocol is only suitable for ARMv7 now, so make PSCI as the only way for the SMP boot protocol before some updates for the ACPI spec or the Parking protocol spec. Signed-off-by: Hanjun Guo Signed

[PATCH v2 09/18] ACPI / processor: Make it possible to get CPU hardware ID via GICC

2014-08-04 Thread Hanjun Guo
Introduce a new function map_gicc_mpidr() to allow MPIDRs to be obtained from the GICC Structure introduced by ACPI 5.1. MPIDR is the CPU hardware ID as local APIC ID on x86 platform, so we use MPIDR not the GIC CPU interface ID to identify CPUs. Signed-off-by: Hanjun Guo --- arch/arm64

Re: [Linaro-acpi] [PATCH v2 00/18] Introduce ACPI for ARM64 based on ACPI 5.1

2014-08-04 Thread Hanjun Guo
On 2014-8-5 1:30, Alexander Spyridakis wrote: > On 4 August 2014 17:28, Hanjun Guo <mailto:hanjun@linaro.org>> wrote: >> >> 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 pat

Re: [PATCH v2 18/18] Documentation: ACPI for ARM64

2014-08-04 Thread Hanjun Guo
On 2014-8-5 4:48, Randy Dunlap wrote: > On 08/04/14 08:28, Hanjun Guo wrote: >> From: Graeme Gregory >> >> Add documentation for the guidelines of how to use ACPI >> on ARM64. >> >> Signed-off-by: Graeme Gregory >> Signed-off-by: Hanjun Guo >&

Re: [PATCH v5 12/18] ACPI / processor: Make it possible to get CPU hardware ID via GICC

2014-10-30 Thread Hanjun Guo
On 2014-10-29 18:43, Lorenzo Pieralisi wrote: > On Mon, Oct 27, 2014 at 09:58:10AM +0000, Hanjun Guo wrote: > > [...] > >>>> +static int map_gicc_mpidr(struct acpi_subtable_header *entry, >>>> + int device_declaration, u32 acpi_id

Re: [PATCH v5 12/18] ACPI / processor: Make it possible to get CPU hardware ID via GICC

2014-10-30 Thread Hanjun Guo
On 2014-10-30 5:33, Rafael J. Wysocki wrote: > On Monday, October 27, 2014 05:58:10 PM Hanjun Guo wrote: >> On 2014-10-25 1:39, Lorenzo Pieralisi wrote: >>> On Fri, Oct 17, 2014 at 02:37:08PM +0100, Hanjun Guo wrote: >>>> Introduce a new function map_gicc_mpidr()

[PATCH 1/3] ACPI / processor: Update the comments in processor.h

2014-10-30 Thread Hanjun Guo
In commit 46ba51e (ACPI / processor: Introduce ARCH_MIGHT_HAVE_ACPI_PDC), acpi_processor_set_pdc() was moved to processor_pdc.c, so update the comments accordingly. Signed-off-by: Hanjun Guo --- include/acpi/processor.h |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a

[PATCH 3/3] ACPI / processor: Rename acpi_(un)map_lsapic() to acpi_(un)map_cpu()

2014-10-30 Thread Hanjun Guo
dependent so rename them as acpi_(un)map_map() to make arch agnostic and explicit. Signed-off-by: Hanjun Guo --- arch/ia64/kernel/acpi.c |9 - arch/x86/kernel/acpi/boot.c |9 - drivers/acpi/acpi_processor.c |6 +++--- include/linux/acpi.h |4 ++-- 4

[PATCH 2/3] ACPI / processor: Convert apic_id to phys_id to make it arch agnostic

2014-10-30 Thread Hanjun Guo
: Hanjun Guo --- drivers/acpi/acpi_processor.c | 14 +-- drivers/acpi/processor_core.c | 56 - include/acpi/processor.h |8 +++--- 3 files changed, 39 insertions(+), 39 deletions(-) diff --git a/drivers/acpi/acpi_processor.c b/drivers

Re: [PATCH 3/3] ACPI / processor: Rename acpi_(un)map_lsapic() to acpi_(un)map_cpu()

2014-10-30 Thread Hanjun Guo
On 2014年10月31日 04:12, Rafael J. Wysocki wrote: On Thursday, October 30, 2014 05:53:00 PM Hanjun Guo wrote: acpi_map_lsapic() will allocate a logical CPU number and map it to physical CPU id (such as APIC id) for the hot-added CPU, it will also do some mapping for NUMA node id and etc

Re: [PATCH v5 12/18] ACPI / processor: Make it possible to get CPU hardware ID via GICC

2014-10-27 Thread Hanjun Guo
On 2014-10-25 1:39, Lorenzo Pieralisi wrote: > On Fri, Oct 17, 2014 at 02:37:08PM +0100, Hanjun Guo wrote: >> Introduce a new function map_gicc_mpidr() to allow MPIDRs to be obtained >> from the GICC Structure introduced by ACPI 5.1. >> >> MPIDR is the CPU hardware

Re: [PATCH V7 3/5] arm64: mm: add PROT_DEVICE_nGnRnE and PROT_NORMAL_WT

2015-07-23 Thread Hanjun Guo
+Cc Ard and Leif. On 07/22/2015 05:59 AM, Jonathan (Zhixiong) Zhang wrote: From: "Jonathan (Zhixiong) Zhang" UEFI spec 2.5 section 2.3.6.1 defines that EFI_MEMORY_[UC|WC|WT|WB] are possible EFI memory types for AArch64. Each of those EFI memory types is mapped to a corresponding AArch64 memory

Re: [PATCH V7 4/5] arm64: apei: implement arch_apei_get_mem_attributes()

2015-07-23 Thread Hanjun Guo
n PROT_NORMAL_WT; + return PAGE_KERNEL; +} The change log is not matching the code here, and the PROT_DEVICE_nGnRE in the change log is wrong, if you fix that, Acked-by: Hanjun Guo Thanks Hanjun -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a

Re: [PATCH v2 0/7] Making the generic ACPI GSI layer irqdomain aware

2015-07-24 Thread Hanjun Guo
f it, tested on FVP and QEMU, booted OK, for this patch set, Tested-by: Hanjun Guo I will sync with Suravee to prepare a single patch for ACPI self-probing, GICv2m and GICv3 support. Thank you for putting thing together! Hanjun -- To unsubscribe from this list: send the line "unsubscribe

Re: [PATCH v2 4/7] acpi: gsi: Always perform an irq domain lookup

2015-07-24 Thread Hanjun Guo
: Hanjun Guo Thanks Hanjun -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/

Re: [PATCH v2 1/7] genirq: irqdomain: Use an accessor for the of_node field

2015-07-24 Thread Hanjun Guo
On 07/23/2015 09:05 PM, Marc Zyngier wrote: The struct irq_domain contains a "struct device_node *" field (of_node) that is almost the only link between the irqdomain and the device tree infrastructure. In order to prepare for the removal of that field, convert all users outside of kernel/irq/ir

Re: [PATCH v2 2/7] genirq: irqdomain: Remove irqdomain dependency on struct device_node

2015-07-24 Thread Hanjun Guo
d pointers in domain_token are required to use another structure such as an IDR. Signed-off-by: Marc Zyngier Reviewed-by: Hanjun Guo Thanks Hanjun --- include/linux/irqdomain.h | 66 ++-- kernel/irq/irqdomain.c| 77 +++

Re: [PATCH v2 3/7] genirq: irqdomain: Add irq_create_acpi_mapping

2015-07-24 Thread Hanjun Guo
); +} A little bit of hack to me :) , but I agree it's the first step to merge them in a single structure, Reviewed-by: Hanjun Guo Thanks Hanjun -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org

Re: [PATCH v2 5/7] acpi: gsi: Add acpi_set_irq_model to initialize the GSI layer

2015-07-24 Thread Hanjun Guo
On 07/23/2015 09:05 PM, Marc Zyngier wrote: In order to start embrassing irqdomains at the GSI level, introduce a new initializer: void acpi_set_irq_model(enum acpi_irq_model_id model, unsigned long domain_token, int (*populate)(struct acpi_gsi_des

Re: [PATCH v2 6/7] irqchip: GIC: Switch ACPI support to stacked domains

2015-07-24 Thread Hanjun Guo
On 07/23/2015 09:05 PM, Marc Zyngier wrote: Now that the basic ACPI GSI code is irq domain aware, make sure that the ACPI support in the GIC doesn't pointlessly deviate from the DT path. Signed-off-by: Marc Zyngier Reviewed-by: Hanjun Guo Thanks Hanjun --- drivers/irqchip/irq-

Re: [PATCH v2 7/7] acpi: gsi: Cleanup acpi_register_gsi

2015-07-24 Thread Hanjun Guo
& - irq_type != irq_get_trigger_type(irq)) - irq_set_irq_type(irq, irq_type); - return irq; + return irq_create_acpi_mapping(d, &data); For ARM64, Reviewed-by: Hanjun Guo Thanks Hanjun -- To unsubscribe from this list: send the line "unsubscribe

Re: [PATCH v4 01/10] irqchip / GIC: Add GIC version support in ACPI MADT

2015-08-05 Thread Hanjun Guo
On 08/04/2015 08:06 PM, Marc Zyngier wrote: On 29/07/15 11:08, Hanjun Guo wrote: There is a field added in ACPI 6.0 MADT table to indicate the GIC version, so parse the table to get its value for later use. If GIC version presented in MADT is 0, we need to fallback to hardware discovery to get

Re: [PATCH v4 01/10] irqchip / GIC: Add GIC version support in ACPI MADT

2015-08-05 Thread Hanjun Guo
On 08/05/2015 08:57 PM, Marc Zyngier wrote: On 05/08/15 13:40, Hanjun Guo wrote: On 08/04/2015 08:06 PM, Marc Zyngier wrote: On 29/07/15 11:08, Hanjun Guo wrote: There is a field added in ACPI 6.0 MADT table to indicate the GIC version, so parse the table to get its value for later use. If

Re: [PATCH v4 02/10] ACPI / irqchip: Add self-probe infrastructure to initialize IRQ controller

2015-08-05 Thread Hanjun Guo
Hi Marc, On 08/04/2015 08:27 PM, Marc Zyngier wrote: On 29/07/15 11:08, Hanjun Guo wrote: This self-probe infrastructure works in the similar way as OF, but there is some different in the mechanism: For DT, the init fn will be called once it finds compatible strings in DT, but for ACPI, we

Re: [PATCH v4 06/10] irqchip / GICv3: Add ACPI support for GICv3+ initialization

2015-08-05 Thread Hanjun Guo
On 08/04/2015 09:17 PM, Marc Zyngier wrote: On 29/07/15 11:08, Hanjun Guo wrote: From: Tomasz Nowicki With the refator of gic_of_init(), GICv3/4 can be initialized by gic_init_bases() with gic distributor base address and gic redistributor region(s). So get the redistributor region base

Re: [PATCH v4 07/10] irqchip / GICv3 / ACPI: Add GICR support via GICC structures

2015-08-05 Thread Hanjun Guo
On 08/04/2015 09:37 PM, Marc Zyngier wrote: On 29/07/15 11:08, Hanjun Guo wrote: On systems supporting GICv3 and above, in MADT GICC structures, the field of GICR Base Address holds the 64-bit physical address of the associated Redistributor if the GIC Redistributors are not in the always-on

Re: [PATCH v2 6/9] irqchip / gic: Add stacked irqdomain support for ACPI based GICv2 init

2015-07-07 Thread Hanjun Guo
Hi Marc, On 06/30/2015 08:17 PM, Marc Zyngier wrote: On 30/06/15 12:50, Hanjun Guo wrote: Hi Marc, On 06/29/2015 04:39 PM, Marc Zyngier wrote: On 27/06/15 04:52, Hanjun Guo wrote: On 06/24/2015 01:38 AM, Lorenzo Pieralisi wrote: On Tue, Jun 23, 2015 at 04:11:38PM +0100, Hanjun Guo wrote

Re: [PATCH v7 8/8] clocksource: simplify ACPI code in arm_arch_timer.c

2015-08-27 Thread Hanjun Guo
Hi Thomas, Thanks for the comments, I got some questions and reply below. On 08/26/2015 03:17 AM, Thomas Gleixner wrote: On Wed, 26 Aug 2015, Fu Wei wrote: /* Initialize per-processor generic timer */ -static int __init arch_timer_acpi_init(struct acpi_table_header *table) +void __init arch_

Re: [PATCH v7 8/8] clocksource: simplify ACPI code in arm_arch_timer.c

2015-08-27 Thread Hanjun Guo
On 08/27/2015 08:08 PM, Thomas Gleixner wrote: On Thu, 27 Aug 2015, Hanjun Guo wrote: On 08/26/2015 03:17 AM, Thomas Gleixner wrote: On Wed, 26 Aug 2015, Fu Wei wrote: /* Initialize per-processor generic timer */ -static int __init arch_timer_acpi_init(struct acpi_table_header *table

Re: [PATCH v7 8/8] clocksource: simplify ACPI code in arm_arch_timer.c

2015-08-27 Thread Hanjun Guo
On 08/27/2015 08:28 PM, Hanjun Guo wrote: On 08/27/2015 08:08 PM, Thomas Gleixner wrote: On Thu, 27 Aug 2015, Hanjun Guo wrote: On 08/26/2015 03:17 AM, Thomas Gleixner wrote: On Wed, 26 Aug 2015, Fu Wei wrote: /* Initialize per-processor generic timer */ -static int __init

[PATCH v4 05/10] irqchip / GICv3: remove the useless comparision of device node in xlate

2015-07-29 Thread Hanjun Guo
is is also a blocker of making this function usable in the context of ACPI, so just remove it. Signed-off-by: Hanjun Guo --- drivers/irqchip/irq-gic-v3.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/irqchip/irq-gic-v3.c b/drivers/irqchip/irq-gic-v3.c index 19a65de..c0b96c6 10

[PATCH v4 06/10] irqchip / GICv3: Add ACPI support for GICv3+ initialization

2015-07-29 Thread Hanjun Guo
omasz Nowicki [hj: Rework this patch and fix multi issues] Signed-off-by: Hanjun Guo --- drivers/irqchip/irq-gic-v3.c | 174 +-- 1 file changed, 169 insertions(+), 5 deletions(-) diff --git a/drivers/irqchip/irq-gic-v3.c b/drivers/irqchip/irq-gic-v3.c index c0

[PATCH v4 00/10] ACPI GIC Self-probing, GICv2m and GICv3 support

2015-07-29 Thread Hanjun Guo
some PCI patches) work fine. Patches are on top of Marc's branch irq/gsi-irq-domain-v2, and available at: git://git.linaro.org/leg/acpi/acpi.git gsi-irqdomain Comments are warmly welcomed. >From v3: - Rework GICv3 patches on top of Marc's tree - Add gicV2m support Hanjun Gu

[PATCH v4 01/10] irqchip / GIC: Add GIC version support in ACPI MADT

2015-07-29 Thread Hanjun Guo
various irqchips and also ACPI doesn't support irqchips which are not compatible with ARM GIC spec, so GIC version can be used to load different GIC drivers which is needed for the later patch. Signed-off-by: Hanjun Guo --- arch/arm64/Kconfig | 1 + drivers/irqchip/Kc

[PATCH v4 04/10] irqchip / GICv3: Refactor gic_of_init() for GICv3 driver

2015-07-29 Thread Hanjun Guo
Nowicki Signed-off-by: Hanjun Guo --- drivers/irqchip/irq-gic-v3.c | 105 +-- 1 file changed, 61 insertions(+), 44 deletions(-) diff --git a/drivers/irqchip/irq-gic-v3.c b/drivers/irqchip/irq-gic-v3.c index 5492f4e..19a65de 100644 --- a/drivers/irqchip/irq

[PATCH v4 02/10] ACPI / irqchip: Add self-probe infrastructure to initialize IRQ controller

2015-07-29 Thread Hanjun Guo
Nowicki 's work. Signed-off-by: Hanjun Guo --- drivers/irqchip/irq-gic-acpi.c| 33 + include/asm-generic/vmlinux.lds.h | 13 + include/linux/acpi.h | 16 include/linux/irqchip.h | 13 + include/

[PATCH v4 08/10] ACPI: GIC: Add ACPI helper functions to query irq-domain tokens for for GIC MSI and ITS

2015-07-29 Thread Hanjun Guo
: Hanjun Guo --- drivers/acpi/Makefile | 1 + drivers/acpi/acpi_gic.c | 234 include/acpi/acpi_gic.h | 23 + include/linux/acpi.h| 1 + 4 files changed, 259 insertions(+) create mode 100644 drivers/acpi/acpi_gic.c create mode 100644

[PATCH v4 07/10] irqchip / GICv3 / ACPI: Add GICR support via GICC structures

2015-07-29 Thread Hanjun Guo
it with GICR base address in GICC structures in that case. As GICR base in MADT GICC is another way to indicate the GIC version is 3 or 4, add its support to find out the GIC versions. Signed-off-by: Hanjun Guo --- drivers/irqchip/irq-gic-acpi.c | 35 ++- drivers/irqchip/irq-gic-v3.c

[PATCH v4 10/10] irqchip / gicv2m: Introducing gicv2m_acpi_init()

2015-07-29 Thread Hanjun Guo
: Hanjun Guo --- drivers/irqchip/irq-gic-v2m.c | 111 +++- drivers/irqchip/irq-gic.c | 3 ++ include/linux/irqchip/arm-gic.h | 7 +++ 3 files changed, 98 insertions(+), 23 deletions(-) diff --git a/drivers/irqchip/irq-gic-v2m.c b/drivers/irqchip/irq-gic

[PATCH v4 09/10] PCI: ACPI: Bind GIC MSI frame to PCI host bridge

2015-07-29 Thread Hanjun Guo
From: Suravee Suthikulpanit This patch introduces pci_host_bridge_acpi_msi_domain(), which queries a GIC MSI irq-domain token and use it to retrieve an irq_domain with DOMAIN_BUS_PCI_MSI bus type, and bind it to PCI host-bridge. Signed-off-by: Suravee Suthikulpanit Signed-off-by: Hanjun Guo

[PATCH v4 03/10] irqchip / GIC / ACPI: Use IRQCHIP_ACPI_DECLARE to simplify GICv2 init code

2015-07-29 Thread Hanjun Guo
driver manually in arch/arm64/kernel/acpi.c. >From now on, GIC init calls reside in their drivers only. This means the code becomes cleaner and it is not spread outside irqchip driver. Signed-off-by: Hanjun Guo --- arch/arm64/include/asm/irq.h | 13 - arch/arm64/kernel/acp

<    2   3   4   5   6   7   8   9   10   11   >