This patch set is about to implement the CPU topology support for ACPI processor driver, which includes the os lever code and the ASL code. both are compiled ok, but not tested on the hardware;
For the ACPI processor driver, when cpu is hot added, arch_fix_phys_package_id(), acpi_map_lsapic() and arch_register_cpu() are arch specific; When cpu is hot removed, arch_unregister_cpu()/acpi_unmap_lsapic() is arch specific.
arch_register_cpu() will register the logic cpu on sysfs, create topology information interface, and create online/offline interface for cpu hotplug. unregister is doing the reverse.
For the ASL part, I implement the proto code for the CPU topology with one physical CPU and two cpu cores.
Hanjun Guo (5): ARM:ACPI: introduce arch_fix_phys_package_id() for armv7 ARM:ACPI: move topology_init() to arch/arm/kernel/topology.c ARM:ACPI: introduce arch_register_cpu() and arch_unregister_cpu() ARM:ACPI: remove CONFIG_X86 in processor_driver.c ASL code for CPU topology support for ACPI processor driver
arch/arm/boot/asl/exynos5250-arndale.acpi/dsdt.asl | 106 +++++++++++++++++++- arch/arm/include/asm/cpu.h | 6 ++ arch/arm/include/asm/topology.h | 1 + arch/arm/kernel/setup.c | 21 ---- arch/arm/kernel/topology.c | 54 ++++++++++ drivers/acpi/processor_driver.c | 9 -- 6 files changed, 165 insertions(+), 32 deletions(-)
arch_fix_phys_package_id() will use the slot number provided by ACPI, then we can get the right value in the "physical id" field of /proc/cpuinfo.
Signed-off-by: Hanjun Guo hanjun.guo@linaro.org --- arch/arm/include/asm/topology.h | 1 + arch/arm/kernel/topology.c | 10 ++++++++++ 2 files changed, 11 insertions(+)
diff --git a/arch/arm/include/asm/topology.h b/arch/arm/include/asm/topology.h index 5357eb1..932b75b 100644 --- a/arch/arm/include/asm/topology.h +++ b/arch/arm/include/asm/topology.h @@ -27,6 +27,7 @@ void init_cpu_topology(void); void store_cpu_topology(unsigned int cpuid); const struct cpumask *cpu_coregroup_mask(int cpu); int cluster_to_logical_mask(unsigned int socket_id, cpumask_t *cluster_mask); +extern void arch_fix_phys_package_id(int num, u32 slot);
#ifdef CONFIG_DISABLE_CPU_SCHED_DOMAIN_BALANCE /* Common values for CPUs */ diff --git a/arch/arm/kernel/topology.c b/arch/arm/kernel/topology.c index 8df74d6..d951ae2 100644 --- a/arch/arm/kernel/topology.c +++ b/arch/arm/kernel/topology.c @@ -290,6 +290,16 @@ void store_cpu_topology(unsigned int cpuid) cpu_topology[cpuid].socket_id, mpidr); }
+void arch_fix_phys_package_id(int num, u32 slot) +{ +#ifdef CONFIG_SMP + struct cputopo_arm *cpuid_topo = &cpu_topology[num]; + + if (cpuid_topo->socket_id == -1) + cpuid_topo->socket_id = slot; +#endif +} +EXPORT_SYMBOL_GPL(arch_fix_phys_package_id);
#ifdef CONFIG_SCHED_HMP
move topology_init() to where it belongs.
Signed-off-by: Hanjun Guo hanjun.guo@linaro.org --- arch/arm/kernel/setup.c | 21 --------------------- arch/arm/kernel/topology.c | 21 +++++++++++++++++++++ 2 files changed, 21 insertions(+), 21 deletions(-)
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c index 7b3d3d3..b00bb7a 100644 --- a/arch/arm/kernel/setup.c +++ b/arch/arm/kernel/setup.c @@ -859,27 +859,6 @@ void __init setup_arch(char **cmdline_p) #endif }
- -static int __init topology_init(void) -{ - int cpu; - -#ifdef CONFIG_NUMA - int node; - for_each_online_node(node) - register_one_node(node); -#endif - - for_each_possible_cpu(cpu) { - struct cpuinfo_arm *cpuinfo = &per_cpu(cpu_data, cpu); - cpuinfo->cpu.hotpluggable = 1; - register_cpu(&cpuinfo->cpu, cpu); - } - - return 0; -} -subsys_initcall(topology_init); - #ifdef CONFIG_HAVE_PROC_CPU static int __init proc_cpu_init(void) { diff --git a/arch/arm/kernel/topology.c b/arch/arm/kernel/topology.c index d951ae2..dcc551f 100644 --- a/arch/arm/kernel/topology.c +++ b/arch/arm/kernel/topology.c @@ -25,6 +25,7 @@ #include <asm/cputype.h> #include <asm/smp_plat.h> #include <asm/topology.h> +#include <asm/cpu.h>
/* * cpu power scale management @@ -455,3 +456,23 @@ void __init init_cpu_topology(void)
parse_dt_topology(); } + +static int __init topology_init(void) +{ + int cpu; + +#ifdef CONFIG_NUMA + int node; + for_each_online_node(node) + register_one_node(node); +#endif + + for_each_possible_cpu(cpu) { + struct cpuinfo_arm *cpuinfo = &per_cpu(cpu_data, cpu); + cpuinfo->cpu.hotpluggable = 1; + register_cpu(&cpuinfo->cpu, cpu); + } + + return 0; +} +subsys_initcall(topology_init);
Introduce arch_register_cpu() and arch_unregister_cpu() for ACPI processor driver.
Signed-off-by: Hanjun Guo hanjun.guo@linaro.org --- arch/arm/include/asm/cpu.h | 6 ++++++ arch/arm/kernel/topology.c | 33 ++++++++++++++++++++++++++++----- 2 files changed, 34 insertions(+), 5 deletions(-)
diff --git a/arch/arm/include/asm/cpu.h b/arch/arm/include/asm/cpu.h index 2744f06..a72f974 100644 --- a/arch/arm/include/asm/cpu.h +++ b/arch/arm/include/asm/cpu.h @@ -12,6 +12,7 @@
#include <linux/percpu.h> #include <linux/cpu.h> +#include <linux/topology.h>
struct cpuinfo_arm { struct cpu cpu; @@ -21,6 +22,11 @@ struct cpuinfo_arm { #endif };
+#ifdef CONFIG_HOTPLUG_CPU +extern int arch_register_cpu(int cpu); +extern void arch_unregister_cpu(int cpu); +#endif + DECLARE_PER_CPU(struct cpuinfo_arm, cpu_data);
#endif diff --git a/arch/arm/kernel/topology.c b/arch/arm/kernel/topology.c index dcc551f..82416a9 100644 --- a/arch/arm/kernel/topology.c +++ b/arch/arm/kernel/topology.c @@ -457,6 +457,32 @@ void __init init_cpu_topology(void) parse_dt_topology(); }
+#ifdef CONFIG_HOTPLUG_CPU +int __ref arch_register_cpu(int cpu) +{ + struct cpuinfo_arm *cpuinfo = &per_cpu(cpu_data, cpu); + + /* BSP cann't be taken down on arm */ + if (cpu) + cpuinfo->cpu.hotpluggable = 1; + + return register_cpu(&cpuinfo->cpu, cpu); +} +EXPORT_SYMBOL(arch_register_cpu); + +void arch_unregister_cpu(int cpu) +{ + unregister_cpu(&per_cpu(cpu_data, cpu).cpu); +} +EXPORT_SYMBOL(arch_unregister_cpu); +#else /* CONFIG_HOTPLUG_CPU */ + +static int __init arch_register_cpu(int cpu) +{ + return register_cpu(&per_cpu(cpu_data, cpu).cpu, cpu); +} +#endif /* CONFIG_HOTPLUG_CPU */ + static int __init topology_init(void) { int cpu; @@ -467,11 +493,8 @@ static int __init topology_init(void) register_one_node(node); #endif
- for_each_possible_cpu(cpu) { - struct cpuinfo_arm *cpuinfo = &per_cpu(cpu_data, cpu); - cpuinfo->cpu.hotpluggable = 1; - register_cpu(&cpuinfo->cpu, cpu); - } + for_each_present_cpu(cpu) + arch_register_cpu(cpu);
return 0; }
Since the fuctions needed by the ACPI processor driver are implemented, just remove CONFIG_X86.
Signed-off-by: Hanjun Guo hanjun.guo@linaro.org --- drivers/acpi/processor_driver.c | 9 --------- 1 file changed, 9 deletions(-)
diff --git a/drivers/acpi/processor_driver.c b/drivers/acpi/processor_driver.c index 0fe57d3..bec717f 100644 --- a/drivers/acpi/processor_driver.c +++ b/drivers/acpi/processor_driver.c @@ -374,12 +374,9 @@ static int acpi_processor_get_info(struct acpi_device *device) * ensure we get the right value in the "physical id" field * of /proc/cpuinfo */ -#ifdef CONFIG_X86 - /* BOZO: abstract out? */ status = acpi_evaluate_object(pr->handle, "_SUN", NULL, &buffer); if (ACPI_SUCCESS(status)) arch_fix_phys_package_id(pr->id, object.integer.value); -#endif
return 0; } @@ -841,13 +838,10 @@ static acpi_status acpi_processor_hotadd_init(struct acpi_processor *pr) if (acpi_map_lsapic(handle, &pr->id)) return AE_ERROR;
-#ifdef CONFIG_X86 - /* BOZO: abstract out? */ if (arch_register_cpu(pr->id)) { acpi_unmap_lsapic(pr->id); return AE_ERROR; } -#endif
/* CPU got hot-plugged, but cpu_data is not initialized yet * Set flag to delay cpu_idle/throttling initialization @@ -881,10 +875,7 @@ static int acpi_processor_handle_eject(struct acpi_processor *pr) "brought the CPU back online\n", pr->id); return -EAGAIN; } -#ifdef CONFIG_X86 - /* BOZO: abstract out? */ arch_unregister_cpu(pr->id); -#endif acpi_unmap_lsapic(pr->id); put_online_cpus(); return (0);
This is the proto ASL code for CPU topology support, based on the CPU topology of one phsical CPU and two cpu cores.
According to ACPI 5.0, _MAT should return GIC type of MADT entry, but I not sure about the parking_version, performance_interrupt, parked_address and base_address value of the _MAT method return buffer, if anyone give me some hints, that would be helpful.
Comments are welcomed!
Signed-off-by: Hanjun Guo hanjun.guo@linaro.org --- arch/arm/boot/asl/exynos5250-arndale.acpi/dsdt.asl | 106 +++++++++++++++++++- 1 file changed, 104 insertions(+), 2 deletions(-)
diff --git a/arch/arm/boot/asl/exynos5250-arndale.acpi/dsdt.asl b/arch/arm/boot/asl/exynos5250-arndale.acpi/dsdt.asl index 0ae1b12..5c045d8 100644 --- a/arch/arm/boot/asl/exynos5250-arndale.acpi/dsdt.asl +++ b/arch/arm/boot/asl/exynos5250-arndale.acpi/dsdt.asl @@ -14,14 +14,116 @@ DefinitionBlock ( "ARNDALE ", // table ID 0x00000001) // OEM revision { + /* Scope (_PR) { Processor (CPU0, 0x01, 0x00000410, 0x06) {} Processor (CPU1, 0x02, 0x00000410, 0x06) {} } + */
Scope (_SB) { - } -} + Device (SCK0) + { + Name (_HID, "ACPI0004") + Name (_UID, 0x00) + Method (_STA, 0, NotSerialized) + { + Return (0x0F) + } + + Device (PRC0) + { + Name (_HID, "ACPI0007") + Name (_UID, 0x00) + + /* CPU0 will be always present */ + Method (_STA, 0, NotSerialized) + { + Return (0x0F) + } + + Name (MAT0, Buffer (0x28) + { + /* 0000 */ 0x0B, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* type, len, reserved, gic_id */ + /* 0008 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, /* uid, flags */ + /* 0010 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* parking_version, performance_interrupt */ + /* 0018 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* parked_address */ + /* 0020 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 /* base_address */ + }) + + Name (MAT1, Buffer (0x28) + { + /* 0000 */ 0x0B, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + /* 0008 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + /* 0010 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + /* 0018 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + /* 0020 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }) + + Method (_MAT, 0, NotSerialized) + { + If (_STA()) + { + Return (MAT0) + } + Else + { + Return (MAT1) + } + } + } + + Device (PRC1) + { + Name (_HID, "ACPI0007") + Name (_UID, 0x01)
+ Name (STA1, 0x0F) + Method (_STA, 0, NotSerialized) + { + Return (STA1) + } + + Method (_EJ0, 1, NotSerialized) + { + If (LEqual (STA1, 0x0F)) + { + Store (0x00, STA1) + } + } + + Name (MAT0, Buffer (0x28) + { + /* 0000 */ 0x0B, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, /* type, len, reserved, gic_id */ + /* 0008 */ 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x01, /* uid, flags */ + /* 0010 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* parking_version, performance_interrupt */ + /* 0018 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* parked_address */ + /* 0020 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 /* base_address */ + }) + + Name (MAT1, Buffer (0x28) + { + /* 0000 */ 0x0B, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, + /* 0008 */ 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, + /* 0010 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + /* 0018 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + /* 0020 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + }) + + Method (_MAT, 0, NotSerialized) + { + If (_STA()) + { + Return (MAT0) + } + Else + { + Return (MAT1) + } + } + } + } +} +}
On 06/03/2013 09:21 PM, Hanjun Guo wrote:
This is the proto ASL code for CPU topology support, based on the CPU topology of one phsical CPU and two cpu cores.
According to ACPI 5.0, _MAT should return GIC type of MADT entry, but I not sure about the parking_version, performance_interrupt, parked_address and base_address value of the _MAT method return buffer, if anyone give me some hints, that would be helpful.
Comments are welcomed!
Signed-off-by: Hanjun Guo hanjun.guo@linaro.org
arch/arm/boot/asl/exynos5250-arndale.acpi/dsdt.asl | 106 +++++++++++++++++++- 1 file changed, 104 insertions(+), 2 deletions(-)
diff --git a/arch/arm/boot/asl/exynos5250-arndale.acpi/dsdt.asl b/arch/arm/boot/asl/exynos5250-arndale.acpi/dsdt.asl index 0ae1b12..5c045d8 100644 --- a/arch/arm/boot/asl/exynos5250-arndale.acpi/dsdt.asl +++ b/arch/arm/boot/asl/exynos5250-arndale.acpi/dsdt.asl @@ -14,14 +14,116 @@ DefinitionBlock ( "ARNDALE ", // table ID 0x00000001) // OEM revision {
- /* Scope (_PR) { Processor (CPU0, 0x01, 0x00000410, 0x06) {} Processor (CPU1, 0x02, 0x00000410, 0x06) {} }
- */
If you re-submit these patches, please feel free to remove the above Scope(). It was only used to test DSDTs and has no value.
On 2013-6-6 7:23, Al Stone wrote:
On 06/03/2013 09:21 PM, Hanjun Guo wrote:
This is the proto ASL code for CPU topology support, based on the CPU topology of one phsical CPU and two cpu cores.
According to ACPI 5.0, _MAT should return GIC type of MADT entry, but I not sure about the parking_version, performance_interrupt, parked_address and base_address value of the _MAT method return buffer, if anyone give me some hints, that would be helpful.
Comments are welcomed!
Signed-off-by: Hanjun Guo hanjun.guo@linaro.org
arch/arm/boot/asl/exynos5250-arndale.acpi/dsdt.asl | 106 +++++++++++++++++++- 1 file changed, 104 insertions(+), 2 deletions(-)
diff --git a/arch/arm/boot/asl/exynos5250-arndale.acpi/dsdt.asl b/arch/arm/boot/asl/exynos5250-arndale.acpi/dsdt.asl index 0ae1b12..5c045d8 100644 --- a/arch/arm/boot/asl/exynos5250-arndale.acpi/dsdt.asl +++ b/arch/arm/boot/asl/exynos5250-arndale.acpi/dsdt.asl @@ -14,14 +14,116 @@ DefinitionBlock ( "ARNDALE ", // table ID 0x00000001) // OEM revision {
- /* Scope (_PR) { Processor (CPU0, 0x01, 0x00000410, 0x06) {} Processor (CPU1, 0x02, 0x00000410, 0x06) {} }
- */
If you re-submit these patches, please feel free to remove the above Scope(). It was only used to test DSDTs and has no value.
Hi Al,
Thanks for the comments! Since the processor was defined as device with HID "ACPI0007" in my patch, ACPI_TPYE_PROCESSOR is no longer needed.
I will remove it as your advice :)
Thanks Hanjun
Hi Hanjun,
I have just compiled a kernel with your patches and it starts to boot then locks up. From the kernel log it looks like the CPUs are being recognised from your patches.
ACPI: Added _OSI(Module Device) ACPI: Added _OSI(Processor Device) ACPI: Added _OSI(3.0 _SCP Extensions) ACPI: Added _OSI(Processor Aggregator Device) ACPI: EC: EC description table is found, configuring boot EC ACPI: Interpreter enabled ACPI Exception: AE_NOT_FOUND, While evaluating Sleep State [_S1_] (20130117/hwxface-568) ACPI Exception: AE_NOT_FOUND, While evaluating Sleep State [_S2_] (20130117/hwxface-568) ACPI Exception: AE_NOT_FOUND, While evaluating Sleep State [_S3_] (20130117/hwxface-568) ACPI Exception: AE_NOT_FOUND, While evaluating Sleep State [_S5_] (20130117/hwxface-568) ACPI: (supports S0) ACPI: Using GIC for interrupt routing
After this line kernel locks up.
Complete boot log is here.
https://pastebin.linaro.org/view/ce5285bd
Graeme
On Tue, Jun 04, 2013 at 11:21:51AM +0800, Hanjun Guo wrote:
This patch set is about to implement the CPU topology support for ACPI processor driver, which includes the os lever code and the ASL code. both are compiled ok, but not tested on the hardware;
For the ACPI processor driver, when cpu is hot added, arch_fix_phys_package_id(), acpi_map_lsapic() and arch_register_cpu() are arch specific; When cpu is hot removed, arch_unregister_cpu()/acpi_unmap_lsapic() is arch specific.
arch_register_cpu() will register the logic cpu on sysfs, create topology information interface, and create online/offline interface for cpu hotplug. unregister is doing the reverse.
For the ASL part, I implement the proto code for the CPU topology with one physical CPU and two cpu cores.
Hanjun Guo (5): ARM:ACPI: introduce arch_fix_phys_package_id() for armv7 ARM:ACPI: move topology_init() to arch/arm/kernel/topology.c ARM:ACPI: introduce arch_register_cpu() and arch_unregister_cpu() ARM:ACPI: remove CONFIG_X86 in processor_driver.c ASL code for CPU topology support for ACPI processor driver
arch/arm/boot/asl/exynos5250-arndale.acpi/dsdt.asl | 106 +++++++++++++++++++- arch/arm/include/asm/cpu.h | 6 ++ arch/arm/include/asm/topology.h | 1 + arch/arm/kernel/setup.c | 21 ---- arch/arm/kernel/topology.c | 54 ++++++++++ drivers/acpi/processor_driver.c | 9 -- 6 files changed, 165 insertions(+), 32 deletions(-)
-- 1.7.9.5
Linaro-acpi mailing list Linaro-acpi@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-acpi
On 2013-6-4 19:34, Graeme Gregory wrote:
Hi Hanjun,
I have just compiled a kernel with your patches and it starts to boot then locks up. From the kernel log it looks like the CPUs are being recognised from your patches.
ACPI: Added _OSI(Module Device) ACPI: Added _OSI(Processor Device) ACPI: Added _OSI(3.0 _SCP Extensions) ACPI: Added _OSI(Processor Aggregator Device) ACPI: EC: EC description table is found, configuring boot EC ACPI: Interpreter enabled ACPI Exception: AE_NOT_FOUND, While evaluating Sleep State [_S1_] (20130117/hwxface-568) ACPI Exception: AE_NOT_FOUND, While evaluating Sleep State [_S2_] (20130117/hwxface-568) ACPI Exception: AE_NOT_FOUND, While evaluating Sleep State [_S3_] (20130117/hwxface-568) ACPI Exception: AE_NOT_FOUND, While evaluating Sleep State [_S5_] (20130117/hwxface-568) ACPI: (supports S0) ACPI: Using GIC for interrupt routing
After this line kernel locks up.
Complete boot log is here.
Hi Graeme,
Thanks a lot for the test, I will find out what's happening here.
Could you pls give me a boot log without my patch? In this way I can compare the log and solve this problem more quickly.
Thanks Hanjun
Graeme
On Tue, Jun 04, 2013 at 11:21:51AM +0800, Hanjun Guo wrote:
This patch set is about to implement the CPU topology support for ACPI processor driver, which includes the os lever code and the ASL code. both are compiled ok, but not tested on the hardware;
For the ACPI processor driver, when cpu is hot added, arch_fix_phys_package_id(), acpi_map_lsapic() and arch_register_cpu() are arch specific; When cpu is hot removed, arch_unregister_cpu()/acpi_unmap_lsapic() is arch specific.
arch_register_cpu() will register the logic cpu on sysfs, create topology information interface, and create online/offline interface for cpu hotplug. unregister is doing the reverse.
For the ASL part, I implement the proto code for the CPU topology with one physical CPU and two cpu cores.
Hanjun Guo (5): ARM:ACPI: introduce arch_fix_phys_package_id() for armv7 ARM:ACPI: move topology_init() to arch/arm/kernel/topology.c ARM:ACPI: introduce arch_register_cpu() and arch_unregister_cpu() ARM:ACPI: remove CONFIG_X86 in processor_driver.c ASL code for CPU topology support for ACPI processor driver
arch/arm/boot/asl/exynos5250-arndale.acpi/dsdt.asl | 106 +++++++++++++++++++- arch/arm/include/asm/cpu.h | 6 ++ arch/arm/include/asm/topology.h | 1 + arch/arm/kernel/setup.c | 21 ---- arch/arm/kernel/topology.c | 54 ++++++++++ drivers/acpi/processor_driver.c | 9 -- 6 files changed, 165 insertions(+), 32 deletions(-)
-- 1.7.9.5
Linaro-acpi mailing list Linaro-acpi@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-acpi
On Tue, Jun 04, 2013 at 07:55:28PM +0800, Hanjun Guo wrote:
On 2013-6-4 19:34, Graeme Gregory wrote:
Hi Hanjun,
I have just compiled a kernel with your patches and it starts to boot then locks up. From the kernel log it looks like the CPUs are being recognised from your patches.
ACPI: Added _OSI(Module Device) ACPI: Added _OSI(Processor Device) ACPI: Added _OSI(3.0 _SCP Extensions) ACPI: Added _OSI(Processor Aggregator Device) ACPI: EC: EC description table is found, configuring boot EC ACPI: Interpreter enabled ACPI Exception: AE_NOT_FOUND, While evaluating Sleep State [_S1_] (20130117/hwxface-568) ACPI Exception: AE_NOT_FOUND, While evaluating Sleep State [_S2_] (20130117/hwxface-568) ACPI Exception: AE_NOT_FOUND, While evaluating Sleep State [_S3_] (20130117/hwxface-568) ACPI Exception: AE_NOT_FOUND, While evaluating Sleep State [_S5_] (20130117/hwxface-568) ACPI: (supports S0) ACPI: Using GIC for interrupt routing
After this line kernel locks up.
Complete boot log is here.
Hi Graeme,
Thanks a lot for the test, I will find out what's happening here.
Could you pls give me a boot log without my patch? In this way I can compare the log and solve this problem more quickly.
Thanks Hanjun
Hi Hanjun,
Boot log before your patches is here.
https://pastebin.linaro.org/view/231789ce
Thanks
Graeme
Graeme
On Tue, Jun 04, 2013 at 11:21:51AM +0800, Hanjun Guo wrote:
This patch set is about to implement the CPU topology support for ACPI processor driver, which includes the os lever code and the ASL code. both are compiled ok, but not tested on the hardware;
For the ACPI processor driver, when cpu is hot added, arch_fix_phys_package_id(), acpi_map_lsapic() and arch_register_cpu() are arch specific; When cpu is hot removed, arch_unregister_cpu()/acpi_unmap_lsapic() is arch specific.
arch_register_cpu() will register the logic cpu on sysfs, create topology information interface, and create online/offline interface for cpu hotplug. unregister is doing the reverse.
For the ASL part, I implement the proto code for the CPU topology with one physical CPU and two cpu cores.
Hanjun Guo (5): ARM:ACPI: introduce arch_fix_phys_package_id() for armv7 ARM:ACPI: move topology_init() to arch/arm/kernel/topology.c ARM:ACPI: introduce arch_register_cpu() and arch_unregister_cpu() ARM:ACPI: remove CONFIG_X86 in processor_driver.c ASL code for CPU topology support for ACPI processor driver
arch/arm/boot/asl/exynos5250-arndale.acpi/dsdt.asl | 106 +++++++++++++++++++- arch/arm/include/asm/cpu.h | 6 ++ arch/arm/include/asm/topology.h | 1 + arch/arm/kernel/setup.c | 21 ---- arch/arm/kernel/topology.c | 54 ++++++++++ drivers/acpi/processor_driver.c | 9 -- 6 files changed, 165 insertions(+), 32 deletions(-)
-- 1.7.9.5
Linaro-acpi mailing list Linaro-acpi@lists.linaro.org http://lists.linaro.org/mailman/listinfo/linaro-acpi
On 2013-6-4 20:53, Graeme Gregory wrote:
On Tue, Jun 04, 2013 at 07:55:28PM +0800, Hanjun Guo wrote:
On 2013-6-4 19:34, Graeme Gregory wrote:
Hi Hanjun,
I have just compiled a kernel with your patches and it starts to boot then locks up. From the kernel log it looks like the CPUs are being recognised from your patches.
...
Boot log before your patches is here.
This bug is so freaky that I'm not sure what's happening here.
I have double checked the DSDT table and confirm it with BIOS guy, it is no error in the DSDT table except the _MAT return buffer, but this will not cause such problem because the parking_version and other values is not used by OS.
From the log I can found that the DSDT table I created becomes effective,
but cpu1 stalls when a system tick interrupt happens.
The dump stack attached: 6ACPI: Using GIC for interrupt routing 3INFO: rcu_sched self-detected stall on CPU { 1} (t=6001 jiffies g=4294967004 c=4294967003 q=8) 6Backtrace for cpu 1 (current): 3INFO: rcu_sched detected stalls on CPUs/tasks: { 1} (detected by 0, t=6002 jiffies, g=4294967004, c=4294967003, q=8) [<80011895>] (unwind_backtrace+0x1/0x9c) from [<80010cc5>] (smp_send_all_cpu_backtrace+0x49/0x98) [<80010cc5>] (smp_send_all_cpu_backtrace+0x49/0x98) from [<8005d6db>] (rcu_check_callbacks+0x227/0x4a8) [<8005d6db>] (rcu_check_callbacks+0x227/0x4a8) from [<80026c09>] (update_process_times+0x2d/0x4c) [<80026c09>] (update_process_times+0x2d/0x4c) from [<8004d111>] (tick_periodic+0x29/0x84) [<8004d111>] (tick_periodic+0x29/0x84) from [<8004d1dd>] (tick_handle_periodic+0x21/0x74) [<8004d1dd>] (tick_handle_periodic+0x21/0x74) from [<80332925>] (arch_timer_handler_phys+0x25/0x28) [<80332925>] (arch_timer_handler_phys+0x25/0x28) from [<80059d9d>] (handle_percpu_devid_irq+0x45/0xa4) [<80059d9d>] (handle_percpu_devid_irq+0x45/0xa4) from [<80057853>] (generic_handle_irq+0x1f/0x2c) [<80057853>] (generic_handle_irq+0x1f/0x2c) from [<8000d58d>] (handle_IRQ+0x29/0x68) [<8000d58d>] (handle_IRQ+0x29/0x68) from [<80008463>] (gic_handle_irq+0x27/0x50) [<80008463>] (gic_handle_irq+0x27/0x50) from [<8000c85b>] (__irq_svc+0x3b/0x5c) Exception stack(0xec081d00 to 0xec081d48) 1d00: 00000061 80617cd4 ec081d4c 806d7c40 00000001 806d7c40 00000005 8041d587 1d20: 8041d572 00000061 00004006 00000001 00000000 ec081d48 802387ad 8023876e 1d40: 80000133 ffffffff [<8000c85b>] (__irq_svc+0x3b/0x5c) from [<8023876e>] (acpi_ut_track_stack_ptr+0x16/0x34) [<8023876e>] (acpi_ut_track_stack_ptr+0x16/0x34) from [<802387ad>] (acpi_ut_trace+0x21/0x64) [<802387ad>] (acpi_ut_trace+0x21/0x64) from [<80239d6b>] (acpi_ut_short_divide+0x23/0x84) [<80239d6b>] (acpi_ut_short_divide+0x23/0x84) from [<8022c213>] (acpi_ex_integer_to_string+0x63/0xb0) [<8022c213>] (acpi_ex_integer_to_string+0x63/0xb0) from [<80239a87>] (acpi_ut_execute_UID+0x73/0xa8) [<80239a87>] (acpi_ut_execute_UID+0x73/0xa8) from [<802323ed>] (acpi_get_object_info+0x9f/0x2b6) [<802323ed>] (acpi_get_object_info+0x9f/0x2b6) from [<8023fac5>] (acpi_container_register_notify_handler+0x11/0x60) [<8023fac5>] (acpi_container_register_notify_handler+0x11/0x60) from [<80231a8d>] (acpi_ns_walk_namespace+0x8b/0x14e) [<80231a8d>] (acpi_ns_walk_namespace+0x8b/0x14e) from [<80232109>] (acpi_walk_namespace+0x77/0xa6) [<80232109>] (acpi_walk_namespace+0x77/0xa6) from [<805e5055>] (acpi_container_init+0x19/0x2c) [<805e5055>] (acpi_container_init+0x19/0x2c) from [<805e44cf>] (acpi_scan_init+0x1f/0xe4) [<805e44cf>] (acpi_scan_init+0x1f/0xe4) from [<805e434f>] (acpi_init+0x14f/0x1e8) [<805e434f>] (acpi_init+0x14f/0x1e8) from [<80008603>] (do_one_initcall+0xc7/0x10c) [<80008603>] (do_one_initcall+0xc7/0x10c) from [<805d470f>] (kernel_init_freeable+0xb7/0x148) [<805d470f>] (kernel_init_freeable+0xb7/0x148) from [<803cb667>] (kernel_init+0xf/0xa0) [<803cb667>] (kernel_init+0xf/0xa0) from [<8000cd7d>] (ret_from_fork+0x11/0x20)
acpi_container_init runs because I created a container device for SCK0 which named "ACPI0004", I didn't modify this part of the code, so I'm not sure what's going on here.
I think the same problem will happen on ARMv8, I will try to find out where the problem is.
I found that cpu logical id which matched the cpu acpi id is not implement for ARM, I will sent out the proto patch to linaro-acpi list.
To Graeme, pls send your config file to me, Thanks.
Thanks Hanjun