linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM64: DT: define ARM64 specific arch_match_cpu_phys_id
@ 2013-10-21 12:29 Sudeep KarkadaNagesha
  2013-10-30 11:40 ` Sudeep KarkadaNagesha
  0 siblings, 1 reply; 3+ messages in thread
From: Sudeep KarkadaNagesha @ 2013-10-21 12:29 UTC (permalink / raw)
  To: linux-arm-kernel

From: Sudeep KarkadaNagesha <sudeep.karkadanagesha@arm.com>

OF/DT core library provides architecture specific hook to match the
logical cpu index with the corresponding physical identifier.

On ARM64, the MPIDR_EL1 contains specific bitfields(MPIDR_EL1.Aff{3..0})
which uniquely identify a CPU, in addition to some non-identifying
information and reserved bits. The ARM cpu binding defines the 'reg'
property to only contain the affinity bits, and any cpu nodes with other
bits set in their 'reg' entry are skipped.

This patch overrides the weak definition of arch_match_cpu_phys_id
with ARM64 specific version using MPIDR_EL1.Aff{3..0} as cpu physical
identifiers.

Signed-off-by: Sudeep KarkadaNagesha <sudeep.karkadanagesha@arm.com>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
---
 arch/arm64/kernel/setup.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/arm64/kernel/setup.c b/arch/arm64/kernel/setup.c
index 055cfb8..ff629f9 100644
--- a/arch/arm64/kernel/setup.c
+++ b/arch/arm64/kernel/setup.c
@@ -97,6 +97,11 @@ void __init early_print(const char *str, ...)
 	printk("%s", buf);
 }
 
+bool arch_match_cpu_phys_id(int cpu, u64 phys_id)
+{
+	return phys_id == cpu_logical_map(cpu);
+}
+
 static void __init setup_processor(void)
 {
 	struct cpu_info *cpu_info;
-- 
1.8.1.2

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH] ARM64: DT: define ARM64 specific arch_match_cpu_phys_id
  2013-10-21 12:29 [PATCH] ARM64: DT: define ARM64 specific arch_match_cpu_phys_id Sudeep KarkadaNagesha
@ 2013-10-30 11:40 ` Sudeep KarkadaNagesha
  2013-10-30 12:06   ` Catalin Marinas
  0 siblings, 1 reply; 3+ messages in thread
From: Sudeep KarkadaNagesha @ 2013-10-30 11:40 UTC (permalink / raw)
  To: linux-arm-kernel

Hi Catalin,

On 21/10/13 13:29, Sudeep KarkadaNagesha wrote:
> From: Sudeep KarkadaNagesha <sudeep.karkadanagesha@arm.com>
> 
> OF/DT core library provides architecture specific hook to match the
> logical cpu index with the corresponding physical identifier.
> 
> On ARM64, the MPIDR_EL1 contains specific bitfields(MPIDR_EL1.Aff{3..0})
> which uniquely identify a CPU, in addition to some non-identifying
> information and reserved bits. The ARM cpu binding defines the 'reg'
> property to only contain the affinity bits, and any cpu nodes with other
> bits set in their 'reg' entry are skipped.
> 
> This patch overrides the weak definition of arch_match_cpu_phys_id
> with ARM64 specific version using MPIDR_EL1.Aff{3..0} as cpu physical
> identifiers.
> 

Can you take this trivial patch for v3.13 ?

Regards,
Sudeep

> Signed-off-by: Sudeep KarkadaNagesha <sudeep.karkadanagesha@arm.com>
> Acked-by: Mark Rutland <mark.rutland@arm.com>
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Will Deacon <will.deacon@arm.com>
> ---
>  arch/arm64/kernel/setup.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/arch/arm64/kernel/setup.c b/arch/arm64/kernel/setup.c
> index 055cfb8..ff629f9 100644
> --- a/arch/arm64/kernel/setup.c
> +++ b/arch/arm64/kernel/setup.c
> @@ -97,6 +97,11 @@ void __init early_print(const char *str, ...)
>  	printk("%s", buf);
>  }
>  
> +bool arch_match_cpu_phys_id(int cpu, u64 phys_id)
> +{
> +	return phys_id == cpu_logical_map(cpu);
> +}
> +
>  static void __init setup_processor(void)
>  {
>  	struct cpu_info *cpu_info;
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] ARM64: DT: define ARM64 specific arch_match_cpu_phys_id
  2013-10-30 11:40 ` Sudeep KarkadaNagesha
@ 2013-10-30 12:06   ` Catalin Marinas
  0 siblings, 0 replies; 3+ messages in thread
From: Catalin Marinas @ 2013-10-30 12:06 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, Oct 30, 2013 at 11:40:50AM +0000, Sudeep KarkadaNagesha wrote:
> On 21/10/13 13:29, Sudeep KarkadaNagesha wrote:
> > From: Sudeep KarkadaNagesha <sudeep.karkadanagesha@arm.com>
> > 
> > OF/DT core library provides architecture specific hook to match the
> > logical cpu index with the corresponding physical identifier.
> > 
> > On ARM64, the MPIDR_EL1 contains specific bitfields(MPIDR_EL1.Aff{3..0})
> > which uniquely identify a CPU, in addition to some non-identifying
> > information and reserved bits. The ARM cpu binding defines the 'reg'
> > property to only contain the affinity bits, and any cpu nodes with other
> > bits set in their 'reg' entry are skipped.
> > 
> > This patch overrides the weak definition of arch_match_cpu_phys_id
> > with ARM64 specific version using MPIDR_EL1.Aff{3..0} as cpu physical
> > identifiers.
> > 
> 
> Can you take this trivial patch for v3.13 ?

I will take it (missed it with the KS event).

Thanks.

-- 
Catalin

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-10-30 12:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-21 12:29 [PATCH] ARM64: DT: define ARM64 specific arch_match_cpu_phys_id Sudeep KarkadaNagesha
2013-10-30 11:40 ` Sudeep KarkadaNagesha
2013-10-30 12:06   ` Catalin Marinas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).