blob: 826498c203541cc322b48e91a0270d6ce01c412b (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
#include <linux/types.h>
#include <asm/cputype.h>
#include <asm/cpu.h>
#include <asm/smp_plat.h>
static inline u8 tegra18_logical_to_cluster(u8 cpu) {
return MPIDR_AFFINITY_LEVEL(cpu_logical_map(cpu), 1);
}
static inline u8 tegra18_logical_to_cpu(u8 cpu) {
return MPIDR_AFFINITY_LEVEL(cpu_logical_map(cpu), 0);
}
static inline int tegra18_is_cpu_denver(u8 cpu)
{
return tegra18_logical_to_cluster(cpu) == 0;
}
static inline int tegra18_is_cpu_arm(u8 cpu)
{
return tegra18_logical_to_cluster(cpu) == 1;
}
static inline int tegra18_logical_to_physical_cpu(u8 cpu)
{
return (tegra18_logical_to_cluster(cpu) << 2) +
tegra18_logical_to_cpu(cpu);
}
|