/linux-4.4.14/arch/arm/common/ |
D | mcpm_platsmp.c | 25 unsigned int mpidr; in cpu_to_pcpu() local 27 mpidr = cpu_logical_map(cpu); in cpu_to_pcpu() 28 *pcpu = MPIDR_AFFINITY_LEVEL(mpidr, 0); in cpu_to_pcpu() 29 *pcluster = MPIDR_AFFINITY_LEVEL(mpidr, 1); in cpu_to_pcpu() 76 unsigned int mpidr, pcpu, pcluster; in mcpm_cpu_die() local 77 mpidr = read_cpuid_mpidr(); in mcpm_cpu_die() 78 pcpu = MPIDR_AFFINITY_LEVEL(mpidr, 0); in mcpm_cpu_die() 79 pcluster = MPIDR_AFFINITY_LEVEL(mpidr, 1); in mcpm_cpu_die()
|
D | mcpm_entry.c | 242 unsigned int mpidr, cpu, cluster; in mcpm_cpu_power_down() local 246 mpidr = read_cpuid_mpidr(); in mcpm_cpu_power_down() 247 cpu = MPIDR_AFFINITY_LEVEL(mpidr, 0); in mcpm_cpu_power_down() 248 cluster = MPIDR_AFFINITY_LEVEL(mpidr, 1); in mcpm_cpu_power_down() 331 unsigned int mpidr = read_cpuid_mpidr(); in mcpm_cpu_suspend() local 332 unsigned int cpu = MPIDR_AFFINITY_LEVEL(mpidr, 0); in mcpm_cpu_suspend() 333 unsigned int cluster = MPIDR_AFFINITY_LEVEL(mpidr, 1); in mcpm_cpu_suspend() 343 unsigned int mpidr, cpu, cluster; in mcpm_cpu_powered_up() local 350 mpidr = read_cpuid_mpidr(); in mcpm_cpu_powered_up() 351 cpu = MPIDR_AFFINITY_LEVEL(mpidr, 0); in mcpm_cpu_powered_up() [all …]
|
D | bL_switcher.c | 126 unsigned int mpidr = read_mpidr(); in bL_switchpoint() local 127 unsigned int clusterid = MPIDR_AFFINITY_LEVEL(mpidr, 1); in bL_switchpoint() 151 unsigned int mpidr, this_cpu, that_cpu; in bL_switch_to() local 238 mpidr = read_mpidr(); in bL_switch_to() 239 pr_debug("after switch: CPU %d MPIDR %#x\n", this_cpu, mpidr); in bL_switch_to() 240 BUG_ON(mpidr != ib_mpidr); in bL_switch_to() 518 int bL_switcher_get_logical_index(u32 mpidr) in bL_switcher_get_logical_index() argument 525 mpidr &= MPIDR_HWID_BITMASK; in bL_switcher_get_logical_index() 530 if ((mpidr == cpu_logical_map(cpu)) || in bL_switcher_get_logical_index() 531 (mpidr == cpu_logical_map(pairing))) in bL_switcher_get_logical_index()
|
/linux-4.4.14/arch/arm/mach-hisi/ |
D | platmcpm.c | 103 unsigned int mpidr, cpu, cluster; in hip04_boot_secondary() local 107 mpidr = cpu_logical_map(l_cpu); in hip04_boot_secondary() 108 cpu = MPIDR_AFFINITY_LEVEL(mpidr, 0); in hip04_boot_secondary() 109 cluster = MPIDR_AFFINITY_LEVEL(mpidr, 1); in hip04_boot_secondary() 158 unsigned int mpidr, cpu, cluster; in hip04_cpu_die() local 161 mpidr = cpu_logical_map(l_cpu); in hip04_cpu_die() 162 cpu = MPIDR_AFFINITY_LEVEL(mpidr, 0); in hip04_cpu_die() 163 cluster = MPIDR_AFFINITY_LEVEL(mpidr, 1); in hip04_cpu_die() 196 unsigned int mpidr, cpu, cluster; in hip04_cpu_kill() local 199 mpidr = cpu_logical_map(l_cpu); in hip04_cpu_kill() [all …]
|
/linux-4.4.14/arch/arm64/kernel/ |
D | topology.c | 242 u64 mpidr; in store_cpu_topology() local 247 mpidr = read_cpuid_mpidr(); in store_cpu_topology() 250 if (mpidr & MPIDR_UP_BITMASK) in store_cpu_topology() 254 if (mpidr & MPIDR_MT_BITMASK) { in store_cpu_topology() 256 cpuid_topo->thread_id = MPIDR_AFFINITY_LEVEL(mpidr, 0); in store_cpu_topology() 257 cpuid_topo->core_id = MPIDR_AFFINITY_LEVEL(mpidr, 1); in store_cpu_topology() 258 cpuid_topo->cluster_id = MPIDR_AFFINITY_LEVEL(mpidr, 2) | in store_cpu_topology() 259 MPIDR_AFFINITY_LEVEL(mpidr, 3) << 8; in store_cpu_topology() 263 cpuid_topo->core_id = MPIDR_AFFINITY_LEVEL(mpidr, 0); in store_cpu_topology() 264 cpuid_topo->cluster_id = MPIDR_AFFINITY_LEVEL(mpidr, 1) | in store_cpu_topology() [all …]
|
D | sleep.S | 37 .macro compute_mpidr_hash dst, rs0, rs1, rs2, rs3, mpidr, mask 38 and \mpidr, \mpidr, \mask // mask out MPIDR bits 39 and \dst, \mpidr, #0xff // mask=aff0 41 and \mask, \mpidr, #0xff00 // mask = aff1 44 and \mask, \mpidr, #0xff0000 // mask = aff2 47 and \mask, \mpidr, #0xff00000000 // mask = aff3
|
D | setup.c | 96 u64 mpidr = read_cpuid_mpidr() & MPIDR_HWID_BITMASK; in smp_setup_processor_id() local 97 cpu_logical_map(0) = mpidr; in smp_setup_processor_id() 105 pr_info("Booting Linux on physical CPU 0x%lx\n", (unsigned long)mpidr); in smp_setup_processor_id()
|
/linux-4.4.14/arch/arm/kernel/ |
D | topology.c | 231 unsigned int mpidr; in store_cpu_topology() local 237 mpidr = read_cpuid_mpidr(); in store_cpu_topology() 240 if ((mpidr & MPIDR_SMP_BITMASK) == MPIDR_SMP_VALUE) { in store_cpu_topology() 246 if (mpidr & MPIDR_MT_BITMASK) { in store_cpu_topology() 248 cpuid_topo->thread_id = MPIDR_AFFINITY_LEVEL(mpidr, 0); in store_cpu_topology() 249 cpuid_topo->core_id = MPIDR_AFFINITY_LEVEL(mpidr, 1); in store_cpu_topology() 250 cpuid_topo->socket_id = MPIDR_AFFINITY_LEVEL(mpidr, 2); in store_cpu_topology() 254 cpuid_topo->core_id = MPIDR_AFFINITY_LEVEL(mpidr, 0); in store_cpu_topology() 255 cpuid_topo->socket_id = MPIDR_AFFINITY_LEVEL(mpidr, 1); in store_cpu_topology() 275 cpu_topology[cpuid].socket_id, mpidr); in store_cpu_topology()
|
D | sleep.S | 37 .macro compute_mpidr_hash dst, rs0, rs1, rs2, mpidr, mask 38 and \mpidr, \mpidr, \mask @ mask out MPIDR bits 39 and \dst, \mpidr, #0xff @ mask=aff0 42 and \mask, \mpidr, #0xff00 @ mask = aff1 46 and \mask, \mpidr, #0xff0000 @ mask = aff2 77 ldmia r0, {r1, r6-r8} @ r1 = mpidr mask (r6,r7,r8) = l[0,1,2] shifts 147 ldmia r2, { r3-r6 } @ r3 = mpidr mask (r4,r5,r6) = l[0,1,2] shifts
|
D | devtree.c | 80 u32 mpidr = is_smp() ? read_cpuid_mpidr() & MPIDR_HWID_BITMASK : 0; in arm_dt_init_cpu_maps() local 140 if (hwid == mpidr) { in arm_dt_init_cpu_maps()
|
D | setup.c | 519 u32 mpidr = is_smp() ? read_cpuid_mpidr() & MPIDR_HWID_BITMASK : 0; in smp_setup_processor_id() local 520 u32 cpu = MPIDR_AFFINITY_LEVEL(mpidr, 0); in smp_setup_processor_id() 533 pr_info("Booting Linux on physical CPU 0x%x\n", mpidr); in smp_setup_processor_id()
|
/linux-4.4.14/virt/kvm/arm/ |
D | vgic-v3-emul.c | 241 static u32 compress_mpidr(unsigned long mpidr) in compress_mpidr() argument 245 ret = MPIDR_AFFINITY_LEVEL(mpidr, 0); in compress_mpidr() 246 ret |= MPIDR_AFFINITY_LEVEL(mpidr, 1) << 8; in compress_mpidr() 247 ret |= MPIDR_AFFINITY_LEVEL(mpidr, 2) << 16; in compress_mpidr() 248 ret |= MPIDR_AFFINITY_LEVEL(mpidr, 3) << 24; in compress_mpidr() 255 unsigned long mpidr; in uncompress_mpidr() local 257 mpidr = ((value >> 0) & 0xFF) << MPIDR_LEVEL_SHIFT(0); in uncompress_mpidr() 258 mpidr |= ((value >> 8) & 0xFF) << MPIDR_LEVEL_SHIFT(1); in uncompress_mpidr() 259 mpidr |= ((value >> 16) & 0xFF) << MPIDR_LEVEL_SHIFT(2); in uncompress_mpidr() 260 mpidr |= (u64)((value >> 24) & 0xFF) << MPIDR_LEVEL_SHIFT(3); in uncompress_mpidr() [all …]
|
/linux-4.4.14/arch/arm/mach-exynos/ |
D | platsmp.c | 56 u32 mpidr = cpu_logical_map(cpu); in platform_do_lowpower() local 57 u32 core_id = MPIDR_AFFINITY_LEVEL(mpidr, 0); in platform_do_lowpower() 303 u32 mpidr = cpu_logical_map(cpu); in exynos_boot_secondary() local 304 u32 core_id = MPIDR_AFFINITY_LEVEL(mpidr, 0); in exynos_boot_secondary() 441 u32 mpidr; in exynos_smp_prepare_cpus() local 445 mpidr = cpu_logical_map(i); in exynos_smp_prepare_cpus() 446 core_id = MPIDR_AFFINITY_LEVEL(mpidr, 0); in exynos_smp_prepare_cpus() 464 u32 mpidr = cpu_logical_map(cpu); in exynos_cpu_die() local 465 u32 core_id = MPIDR_AFFINITY_LEVEL(mpidr, 0); in exynos_cpu_die()
|
D | regs-pmu.h | 490 static inline unsigned int exynos_pmu_cpunr(unsigned int mpidr) in exynos_pmu_cpunr() argument 492 return ((MPIDR_AFFINITY_LEVEL(mpidr, 1) * MAX_CPUS_IN_CLUSTER) in exynos_pmu_cpunr() 493 + MPIDR_AFFINITY_LEVEL(mpidr, 0)); in exynos_pmu_cpunr()
|
D | suspend.c | 308 unsigned int mpidr = read_cpuid_mpidr(); in exynos5420_cpu_suspend() local 309 unsigned int cluster = MPIDR_AFFINITY_LEVEL(mpidr, 1); in exynos5420_cpu_suspend() 310 unsigned int cpu = MPIDR_AFFINITY_LEVEL(mpidr, 0); in exynos5420_cpu_suspend()
|
/linux-4.4.14/drivers/irqchip/ |
D | irq-gic-v3.c | 322 static u64 gic_mpidr_to_affinity(unsigned long mpidr) in gic_mpidr_to_affinity() argument 326 aff = ((u64)MPIDR_AFFINITY_LEVEL(mpidr, 3) << 32 | in gic_mpidr_to_affinity() 327 MPIDR_AFFINITY_LEVEL(mpidr, 2) << 16 | in gic_mpidr_to_affinity() 328 MPIDR_AFFINITY_LEVEL(mpidr, 1) << 8 | in gic_mpidr_to_affinity() 329 MPIDR_AFFINITY_LEVEL(mpidr, 0)); in gic_mpidr_to_affinity() 416 unsigned long mpidr = cpu_logical_map(smp_processor_id()); in gic_populate_rdist() local 425 aff = (MPIDR_AFFINITY_LEVEL(mpidr, 3) << 24 | in gic_populate_rdist() 426 MPIDR_AFFINITY_LEVEL(mpidr, 2) << 16 | in gic_populate_rdist() 427 MPIDR_AFFINITY_LEVEL(mpidr, 1) << 8 | in gic_populate_rdist() 428 MPIDR_AFFINITY_LEVEL(mpidr, 0)); in gic_populate_rdist() [all …]
|
D | irq-gic.c | 1070 u32 mpidr = cpu_logical_map(cpu); in __gic_init_bases() local 1071 u32 core_id = MPIDR_AFFINITY_LEVEL(mpidr, 0); in __gic_init_bases()
|
/linux-4.4.14/arch/arm64/include/asm/ |
D | smp_plat.h | 50 static inline int get_logical_index(u64 mpidr) in get_logical_index() argument 54 if (cpu_logical_map(cpu) == mpidr) in get_logical_index()
|
D | cputype.h | 32 #define MPIDR_AFFINITY_LEVEL(mpidr, level) \ argument 33 ((mpidr >> MPIDR_LEVEL_SHIFT(level)) & MPIDR_LEVEL_MASK)
|
D | kvm_host.h | 235 struct kvm_vcpu *kvm_mpidr_to_vcpu(struct kvm *kvm, unsigned long mpidr);
|
/linux-4.4.14/arch/arm/mach-vexpress/ |
D | tc2_pm.c | 207 unsigned int mpidr, cpu, cluster; in tc2_pm_init() local 247 mpidr = read_cpuid_mpidr(); in tc2_pm_init() 248 cpu = MPIDR_AFFINITY_LEVEL(mpidr, 0); in tc2_pm_init() 249 cluster = MPIDR_AFFINITY_LEVEL(mpidr, 1); in tc2_pm_init()
|
/linux-4.4.14/drivers/cpuidle/ |
D | cpuidle-big_little.c | 106 unsigned int mpidr = read_cpuid_mpidr(); in bl_powerdown_finisher() local 107 unsigned int cluster = MPIDR_AFFINITY_LEVEL(mpidr, 1); in bl_powerdown_finisher() 108 unsigned int cpu = MPIDR_AFFINITY_LEVEL(mpidr, 0); in bl_powerdown_finisher()
|
/linux-4.4.14/arch/arm/include/asm/ |
D | bL_switcher.h | 58 int bL_switcher_get_logical_index(u32 mpidr); 74 static inline int bL_switcher_get_logical_index(u32 mpidr) { return -EUNATCH; } in bL_switcher_get_logical_index() argument
|
D | smp_plat.h | 79 static inline int get_logical_index(u32 mpidr) in get_logical_index() argument 83 if (cpu_logical_map(cpu) == mpidr) in get_logical_index()
|
D | cputype.h | 59 #define MPIDR_AFFINITY_LEVEL(mpidr, level) \ argument 60 ((mpidr >> (MPIDR_LEVEL_BITS * level)) & MPIDR_LEVEL_MASK)
|
D | kvm_host.h | 227 struct kvm_vcpu *kvm_mpidr_to_vcpu(struct kvm *kvm, unsigned long mpidr);
|
/linux-4.4.14/include/linux/ |
D | arm-cci.h | 39 extern int cci_disable_port_by_cpu(u64 mpidr); 47 static inline int cci_disable_port_by_cpu(u64 mpidr) { return -ENODEV; } in cci_disable_port_by_cpu() argument
|
/linux-4.4.14/arch/arm/kvm/ |
D | psci.c | 130 unsigned long mpidr; in kvm_psci_vcpu_affinity_info() local 153 mpidr = kvm_vcpu_get_mpidr_aff(tmp); in kvm_psci_vcpu_affinity_info() 154 if ((mpidr & target_affinity_mask) == target_affinity) { in kvm_psci_vcpu_affinity_info()
|
D | arm.c | 1150 struct kvm_vcpu *kvm_mpidr_to_vcpu(struct kvm *kvm, unsigned long mpidr) in kvm_mpidr_to_vcpu() argument 1155 mpidr &= MPIDR_HWID_BITMASK; in kvm_mpidr_to_vcpu() 1157 if (mpidr == kvm_vcpu_get_mpidr_aff(vcpu)) in kvm_mpidr_to_vcpu()
|
/linux-4.4.14/drivers/bus/ |
D | arm-cci.c | 1637 u64 mpidr; member 1652 static inline void init_cpu_port(struct cpu_port *port, u32 index, u64 mpidr) in init_cpu_port() argument 1655 port->mpidr = mpidr; in init_cpu_port() 1663 static inline bool cpu_port_match(struct cpu_port *port, u64 mpidr) in cpu_port_match() argument 1665 return port->mpidr == (mpidr & MPIDR_HWID_BITMASK); in cpu_port_match() 1785 int notrace cci_disable_port_by_cpu(u64 mpidr) in cci_disable_port_by_cpu() argument 1791 if (is_valid && cpu_port_match(&cpu_port[cpu], mpidr)) { in cci_disable_port_by_cpu() 1886 [offsetof_cpu_port_mpidr_lsb] "i" (offsetof(struct cpu_port, mpidr)), in cci_enable_port_for_self() 1888 [offsetof_cpu_port_mpidr_lsb] "i" (offsetof(struct cpu_port, mpidr)+4), in cci_enable_port_for_self()
|
/linux-4.4.14/arch/arm/mach-shmobile/ |
D | headsmp.S | 53 adr r5, 1f @ array of per-cpu mpidr values
|
/linux-4.4.14/drivers/acpi/ |
D | processor_core.c | 90 int device_declaration, u32 acpi_id, phys_cpuid_t *mpidr) in map_gicc_mpidr() argument 104 *mpidr = gicc->arm_mpidr; in map_gicc_mpidr()
|
/linux-4.4.14/arch/arm64/kvm/ |
D | sys_regs.c | 426 u64 mpidr; in reset_mpidr() local 435 mpidr = (vcpu->vcpu_id & 0x0f) << MPIDR_LEVEL_SHIFT(0); in reset_mpidr() 436 mpidr |= ((vcpu->vcpu_id >> 4) & 0xff) << MPIDR_LEVEL_SHIFT(1); in reset_mpidr() 437 mpidr |= ((vcpu->vcpu_id >> 12) & 0xff) << MPIDR_LEVEL_SHIFT(2); in reset_mpidr() 438 vcpu_sys_reg(vcpu, MPIDR_EL1) = (1ULL << 31) | mpidr; in reset_mpidr()
|