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
From: Hanjun Guo hanjun.guo@linaro.org
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 | 11 +++++++++++ 2 files changed, 12 insertions(+)
diff --git a/arch/arm/include/asm/topology.h b/arch/arm/include/asm/topology.h index 58b8b84..a7809fc 100644 --- a/arch/arm/include/asm/topology.h +++ b/arch/arm/include/asm/topology.h @@ -26,6 +26,7 @@ extern struct cputopo_arm cpu_topology[NR_CPUS]; void init_cpu_topology(void); void store_cpu_topology(unsigned int cpuid); const struct cpumask *cpu_coregroup_mask(int cpu); +void arch_fix_phys_package_id(int num, u32 slot);
#else
diff --git a/arch/arm/kernel/topology.c b/arch/arm/kernel/topology.c index c5a5954..1cb4350 100644 --- a/arch/arm/kernel/topology.c +++ b/arch/arm/kernel/topology.c @@ -289,6 +289,17 @@ 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); + /* * init_cpu_topology is called at boot when only one cpu is running * which prevent simultaneous write access to cpu_topology array
From: Hanjun Guo hanjun.guo@linaro.org
move topology_init() to where it belongs.
Signed-off-by: Hanjun Guo hanjun.guo@linaro.org --- arch/arm/kernel/setup.c | 15 --------------- arch/arm/kernel/topology.c | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 15 deletions(-)
diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c index 638f0a1..52c23ba 100644 --- a/arch/arm/kernel/setup.c +++ b/arch/arm/kernel/setup.c @@ -851,21 +851,6 @@ void __init setup_arch(char **cmdline_p) #endif }
- -static int __init topology_init(void) -{ - int cpu; - - 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 1cb4350..0444325 100644 --- a/arch/arm/kernel/topology.c +++ b/arch/arm/kernel/topology.c @@ -24,6 +24,7 @@
#include <asm/cputype.h> #include <asm/topology.h> +#include <asm/cpu.h>
/* * cpu power scale management @@ -324,3 +325,18 @@ void __init init_cpu_topology(void)
parse_dt_topology(); } + +static int __init topology_init(void) +{ + int cpu; + + 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); +
From: Hanjun Guo hanjun.guo@linaro.org
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 0444325..4c54fb0 100644 --- a/arch/arm/kernel/topology.c +++ b/arch/arm/kernel/topology.c @@ -326,15 +326,38 @@ 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;
- 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; }
From: Hanjun Guo hanjun.guo@linaro.org
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 | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-)
diff --git a/drivers/acpi/processor_driver.c b/drivers/acpi/processor_driver.c index 89b71c7..9c7a4ae 100644 --- a/drivers/acpi/processor_driver.c +++ b/drivers/acpi/processor_driver.c @@ -370,12 +370,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; } @@ -601,7 +598,7 @@ err_remove_sysfs: err_clear_processor: /* * processor_device_array is not cleared to allow checks for buggy BIOS - */ + */ per_cpu(processors, pr->id) = NULL; err_free_cpumask: free_cpumask_var(pr->throttling.shared_cpu_map); @@ -837,13 +834,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 @@ -877,10 +871,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);
From: Graeme Gregory graeme.gregory@linaro.org
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 Signed-off-by: Graeme Gregory graeme.gregory@linaro.org --- arch/arm/boot/asl/exynos5250-arndale.acpi/dsdt.asl | 102 ++++++++++++++++++++ 1 file changed, 102 insertions(+)
diff --git a/arch/arm/boot/asl/exynos5250-arndale.acpi/dsdt.asl b/arch/arm/boot/asl/exynos5250-arndale.acpi/dsdt.asl index 67b1b42..c67aeec 100644 --- a/arch/arm/boot/asl/exynos5250-arndale.acpi/dsdt.asl +++ b/arch/arm/boot/asl/exynos5250-arndale.acpi/dsdt.asl @@ -52,4 +52,106 @@ DefinitionBlock ( } } } + + 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 2013-6-25 22:38, Graeme Gregory wrote:
From: Graeme Gregory graeme.gregory@linaro.org
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 Signed-off-by: Graeme Gregory graeme.gregory@linaro.org
arch/arm/boot/asl/exynos5250-arndale.acpi/dsdt.asl | 102 ++++++++++++++++++++ 1 file changed, 102 insertions(+)
diff --git a/arch/arm/boot/asl/exynos5250-arndale.acpi/dsdt.asl b/arch/arm/boot/asl/exynos5250-arndale.acpi/dsdt.asl index 67b1b42..c67aeec 100644 --- a/arch/arm/boot/asl/exynos5250-arndale.acpi/dsdt.asl +++ b/arch/arm/boot/asl/exynos5250-arndale.acpi/dsdt.asl @@ -52,4 +52,106 @@ DefinitionBlock ( } } }
Hi Graeme,
Scope (_PR) should be deleted, because Each processor in the system must be declared in the ACPI namespace in either the _SB or _PR scope but not both,
Since we declared ACPI0007 processor device, processors in _PR are not needed.
- Device (SCK0)
Device (SCK0) should be in the Scope (_SB), right?
Sorry for the late review and reply, should I make a patch for this?
Thanks Hanjun
- {
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)
}
}
}
- }
}
Hi Hanjun,
You are correct I mis-merged this patch into the tree. If you already have a patch I will take it or I can work on one this afternoon!
Thanks
Graeme
On 02/07/13 13:53, Hanjun Guo wrote:
On 2013-6-25 22:38, Graeme Gregory wrote:
From: Graeme Gregory graeme.gregory@linaro.org
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 Signed-off-by: Graeme Gregory graeme.gregory@linaro.org
arch/arm/boot/asl/exynos5250-arndale.acpi/dsdt.asl | 102 ++++++++++++++++++++ 1 file changed, 102 insertions(+)
diff --git a/arch/arm/boot/asl/exynos5250-arndale.acpi/dsdt.asl b/arch/arm/boot/asl/exynos5250-arndale.acpi/dsdt.asl index 67b1b42..c67aeec 100644 --- a/arch/arm/boot/asl/exynos5250-arndale.acpi/dsdt.asl +++ b/arch/arm/boot/asl/exynos5250-arndale.acpi/dsdt.asl @@ -52,4 +52,106 @@ DefinitionBlock ( } } }
Hi Graeme,
Scope (_PR) should be deleted, because Each processor in the system must be declared in the ACPI namespace in either the _SB or _PR scope but not both,
Since we declared ACPI0007 processor device, processors in _PR are not needed.
- Device (SCK0)
Device (SCK0) should be in the Scope (_SB), right?
Sorry for the late review and reply, should I make a patch for this?
Thanks Hanjun
- {
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 2013-7-2 21:10, Graeme Gregory wrote:
Hi Hanjun,
You are correct I mis-merged this patch into the tree. If you already have a patch I will take it or I can work on one this afternoon!
No, I haven't got a patch for this. if you don't have time for this, I will send one tomorrow.
Thanks
Graeme
On 02/07/13 13:53, Hanjun Guo wrote:
On 2013-6-25 22:38, Graeme Gregory wrote:
From: Graeme Gregory graeme.gregory@linaro.org
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 Signed-off-by: Graeme Gregory graeme.gregory@linaro.org
arch/arm/boot/asl/exynos5250-arndale.acpi/dsdt.asl | 102 ++++++++++++++++++++ 1 file changed, 102 insertions(+)
diff --git a/arch/arm/boot/asl/exynos5250-arndale.acpi/dsdt.asl b/arch/arm/boot/asl/exynos5250-arndale.acpi/dsdt.asl index 67b1b42..c67aeec 100644 --- a/arch/arm/boot/asl/exynos5250-arndale.acpi/dsdt.asl +++ b/arch/arm/boot/asl/exynos5250-arndale.acpi/dsdt.asl @@ -52,4 +52,106 @@ DefinitionBlock ( } } }
Hi Graeme,
Scope (_PR) should be deleted, because Each processor in the system must be declared in the ACPI namespace in either the _SB or _PR scope but not both,
Since we declared ACPI0007 processor device, processors in _PR are not needed.
- Device (SCK0)
Device (SCK0) should be in the Scope (_SB), right?
Sorry for the late review and reply, should I make a patch for this?
Thanks Hanjun
Hi Hanjun,
I think the patch I just sent out should correct your reported issues, sorry for the mistake.
Graeme
On 02/07/13 13:53, Hanjun Guo wrote:
On 2013-6-25 22:38, Graeme Gregory wrote:
From: Graeme Gregory graeme.gregory@linaro.org
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 Signed-off-by: Graeme Gregory graeme.gregory@linaro.org
arch/arm/boot/asl/exynos5250-arndale.acpi/dsdt.asl | 102 ++++++++++++++++++++ 1 file changed, 102 insertions(+)
diff --git a/arch/arm/boot/asl/exynos5250-arndale.acpi/dsdt.asl b/arch/arm/boot/asl/exynos5250-arndale.acpi/dsdt.asl index 67b1b42..c67aeec 100644 --- a/arch/arm/boot/asl/exynos5250-arndale.acpi/dsdt.asl +++ b/arch/arm/boot/asl/exynos5250-arndale.acpi/dsdt.asl @@ -52,4 +52,106 @@ DefinitionBlock ( } } }
Hi Graeme,
Scope (_PR) should be deleted, because Each processor in the system must be declared in the ACPI namespace in either the _SB or _PR scope but not both,
Since we declared ACPI0007 processor device, processors in _PR are not needed.
- Device (SCK0)
Device (SCK0) should be in the Scope (_SB), right?
Sorry for the late review and reply, should I make a patch for this?
Thanks Hanjun
- {
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/25/2013 08:38 AM, Graeme Gregory wrote:
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.
Random questions:
-- boot test was done on Arndale? OMAP?
-- should we start thinking about formal ACKs on patches? It still seems a bit early for that but maybe after LCE...?
On 25/06/13 16:08, Al Stone wrote:
On 06/25/2013 08:38 AM, Graeme Gregory wrote:
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.
Random questions:
-- boot test was done on Arndale? OMAP?
-- should we start thinking about formal ACKs on patches? It still seems a bit early for that but maybe after LCE...?
Done on Arndale, although beaglebone has EARLY_PRINTK it does not actually have many other drivers essential like MMC :-)
Graeme
On 2013-6-25 22:38, Graeme Gregory wrote:
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.
Hi Graeme,
Thank you very much for the re-basing and the test work. Now I'm working on the armv8 cpu topology, I will test the logic of the code on Arndale after that.
Thanks Hanjun