^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) #ifndef _ASM_PARISC_TOPOLOGY_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2) #define _ASM_PARISC_TOPOLOGY_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) #ifdef CONFIG_PARISC_CPU_TOPOLOGY
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) #include <linux/cpumask.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) struct cputopo_parisc {
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) int thread_id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) int core_id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) int socket_id;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) cpumask_t thread_sibling;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) cpumask_t core_sibling;
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) };
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) extern struct cputopo_parisc cpu_topology[NR_CPUS];
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) #define topology_physical_package_id(cpu) (cpu_topology[cpu].socket_id)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) #define topology_core_id(cpu) (cpu_topology[cpu].core_id)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) #define topology_core_cpumask(cpu) (&cpu_topology[cpu].core_sibling)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) #define topology_sibling_cpumask(cpu) (&cpu_topology[cpu].thread_sibling)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) void init_cpu_topology(void);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) void store_cpu_topology(unsigned int cpuid);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) const struct cpumask *cpu_coregroup_mask(int cpu);
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) #else
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29) static inline void init_cpu_topology(void) { }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) static inline void store_cpu_topology(unsigned int cpuid) { }
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 31)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 32) #endif
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 33)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 34) #include <asm-generic/topology.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 35)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 36) #endif /* _ASM_ARM_TOPOLOGY_H */