~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/s390/include/asm/topology.h

Version: ~ [ linux-5.16-rc3 ] ~ [ linux-5.15.5 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.82 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.162 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.218 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.256 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.291 ] ~ [ linux-4.8.17 ] ~ [ linux-4.7.10 ] ~ [ linux-4.6.7 ] ~ [ linux-4.5.7 ] ~ [ linux-4.4.293 ] ~ [ linux-4.3.6 ] ~ [ linux-4.2.8 ] ~ [ linux-4.1.52 ] ~ [ linux-4.0.9 ] ~ [ linux-3.18.140 ] ~ [ linux-3.16.85 ] ~ [ linux-3.14.79 ] ~ [ linux-3.12.74 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.5 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 #ifndef _ASM_S390_TOPOLOGY_H
  2 #define _ASM_S390_TOPOLOGY_H
  3 
  4 #include <linux/cpumask.h>
  5 #include <asm/numa.h>
  6 
  7 struct sysinfo_15_1_x;
  8 struct cpu;
  9 
 10 #ifdef CONFIG_SCHED_TOPOLOGY
 11 
 12 struct cpu_topology_s390 {
 13         unsigned short thread_id;
 14         unsigned short core_id;
 15         unsigned short socket_id;
 16         unsigned short book_id;
 17         unsigned short node_id;
 18         cpumask_t thread_mask;
 19         cpumask_t core_mask;
 20         cpumask_t book_mask;
 21 };
 22 
 23 DECLARE_PER_CPU(struct cpu_topology_s390, cpu_topology);
 24 
 25 #define topology_physical_package_id(cpu) (per_cpu(cpu_topology, cpu).socket_id)
 26 #define topology_thread_id(cpu)           (per_cpu(cpu_topology, cpu).thread_id)
 27 #define topology_sibling_cpumask(cpu) \
 28                 (&per_cpu(cpu_topology, cpu).thread_mask)
 29 #define topology_core_id(cpu)             (per_cpu(cpu_topology, cpu).core_id)
 30 #define topology_core_cpumask(cpu)        (&per_cpu(cpu_topology, cpu).core_mask)
 31 #define topology_book_id(cpu)             (per_cpu(cpu_topology, cpu).book_id)
 32 #define topology_book_cpumask(cpu)        (&per_cpu(cpu_topology, cpu).book_mask)
 33 
 34 #define mc_capable() 1
 35 
 36 int topology_cpu_init(struct cpu *);
 37 int topology_set_cpu_management(int fc);
 38 void topology_schedule_update(void);
 39 void store_topology(struct sysinfo_15_1_x *info);
 40 void topology_expect_change(void);
 41 const struct cpumask *cpu_coregroup_mask(int cpu);
 42 
 43 #else /* CONFIG_SCHED_TOPOLOGY */
 44 
 45 static inline void topology_schedule_update(void) { }
 46 static inline int topology_cpu_init(struct cpu *cpu) { return 0; }
 47 static inline void topology_expect_change(void) { }
 48 
 49 #endif /* CONFIG_SCHED_TOPOLOGY */
 50 
 51 #define POLARIZATION_UNKNOWN    (-1)
 52 #define POLARIZATION_HRZ        (0)
 53 #define POLARIZATION_VL         (1)
 54 #define POLARIZATION_VM         (2)
 55 #define POLARIZATION_VH         (3)
 56 
 57 #define SD_BOOK_INIT    SD_CPU_INIT
 58 
 59 #ifdef CONFIG_NUMA
 60 
 61 #define cpu_to_node cpu_to_node
 62 static inline int cpu_to_node(int cpu)
 63 {
 64         return per_cpu(cpu_topology, cpu).node_id;
 65 }
 66 
 67 /* Returns a pointer to the cpumask of CPUs on node 'node'. */
 68 #define cpumask_of_node cpumask_of_node
 69 static inline const struct cpumask *cpumask_of_node(int node)
 70 {
 71         return &node_to_cpumask_map[node];
 72 }
 73 
 74 /*
 75  * Returns the number of the node containing node 'node'. This
 76  * architecture is flat, so it is a pretty simple function!
 77  */
 78 #define parent_node(node) (node)
 79 
 80 #define pcibus_to_node(bus) __pcibus_to_node(bus)
 81 
 82 #define node_distance(a, b) __node_distance(a, b)
 83 
 84 #else /* !CONFIG_NUMA */
 85 
 86 #define numa_node_id numa_node_id
 87 static inline int numa_node_id(void)
 88 {
 89         return 0;
 90 }
 91 
 92 #endif /* CONFIG_NUMA */
 93 
 94 #include <asm-generic/topology.h>
 95 
 96 #endif /* _ASM_S390_TOPOLOGY_H */
 97 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | Wiki (Japanese) | Wiki (English) | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

osdn.jp