Skip to content

Commit

Permalink
arm64: smp: Moved cpu_logical_map[] to smp.h
Browse files Browse the repository at this point in the history
asm/smp.h is included by linux/smp.h and some drivers, in particular
irqchip drivers can access cpu_logical_map[] in order to perform SMP
affinity tasks. Make arm64 consistent with other architectures here.

Signed-off-by: Florian Fainelli <[email protected]>
Signed-off-by: Will Deacon <[email protected]>
  • Loading branch information
ffainelli authored and wildea01 committed Jun 5, 2019
1 parent 78ed70b commit 262afe9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
6 changes: 6 additions & 0 deletions arch/arm64/include/asm/smp.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,12 @@ DECLARE_PER_CPU_READ_MOSTLY(int, cpu_number);
*/
#define raw_smp_processor_id() (*raw_cpu_ptr(&cpu_number))

/*
* Logical CPU mapping.
*/
extern u64 __cpu_logical_map[NR_CPUS];
#define cpu_logical_map(cpu) __cpu_logical_map[cpu]

struct seq_file;

/*
Expand Down
5 changes: 0 additions & 5 deletions arch/arm64/include/asm/smp_plat.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,6 @@ static inline u32 mpidr_hash_size(void)
return 1 << mpidr_hash.bits;
}

/*
* Logical CPU mapping.
*/
extern u64 __cpu_logical_map[NR_CPUS];
#define cpu_logical_map(cpu) __cpu_logical_map[cpu]
/*
* Retrieve logical cpu index corresponding to a given MPIDR.Aff*
* - mpidr: MPIDR.Aff* bits to be used for the look-up
Expand Down

0 comments on commit 262afe9

Please sign in to comment.