hc
2023-12-11 d2ccde1c8e90d38cee87a1b0309ad2827f3fd30d
kernel/arch/s390/include/asm/topology.h
....@@ -16,8 +16,8 @@
1616 unsigned short socket_id;
1717 unsigned short book_id;
1818 unsigned short drawer_id;
19
- unsigned short node_id;
2019 unsigned short dedicated : 1;
20
+ int booted_cores;
2121 cpumask_t thread_mask;
2222 cpumask_t core_mask;
2323 cpumask_t book_mask;
....@@ -25,7 +25,6 @@
2525 };
2626
2727 extern struct cpu_topology_s390 cpu_topology[NR_CPUS];
28
-extern cpumask_t cpus_with_topology;
2928
3029 #define topology_physical_package_id(cpu) (cpu_topology[cpu].socket_id)
3130 #define topology_thread_id(cpu) (cpu_topology[cpu].thread_id)
....@@ -37,6 +36,7 @@
3736 #define topology_drawer_id(cpu) (cpu_topology[cpu].drawer_id)
3837 #define topology_drawer_cpumask(cpu) (&cpu_topology[cpu].drawer_mask)
3938 #define topology_cpu_dedicated(cpu) (cpu_topology[cpu].dedicated)
39
+#define topology_booted_cores(cpu) (cpu_topology[cpu].booted_cores)
4040
4141 #define mc_capable() 1
4242
....@@ -45,6 +45,7 @@
4545 int topology_set_cpu_management(int fc);
4646 void topology_schedule_update(void);
4747 void store_topology(struct sysinfo_15_1_x *info);
48
+void update_cpu_masks(void);
4849 void topology_expect_change(void);
4950 const struct cpumask *cpu_coregroup_mask(int cpu);
5051
....@@ -54,6 +55,8 @@
5455 static inline void topology_schedule_update(void) { }
5556 static inline int topology_cpu_init(struct cpu *cpu) { return 0; }
5657 static inline int topology_cpu_dedicated(int cpu_nr) { return 0; }
58
+static inline int topology_booted_cores(int cpu_nr) { return 1; }
59
+static inline void update_cpu_masks(void) { }
5760 static inline void topology_expect_change(void) { }
5861
5962 #endif /* CONFIG_SCHED_TOPOLOGY */
....@@ -71,19 +74,17 @@
7174 #define cpu_to_node cpu_to_node
7275 static inline int cpu_to_node(int cpu)
7376 {
74
- return cpu_topology[cpu].node_id;
77
+ return 0;
7578 }
7679
7780 /* Returns a pointer to the cpumask of CPUs on node 'node'. */
7881 #define cpumask_of_node cpumask_of_node
7982 static inline const struct cpumask *cpumask_of_node(int node)
8083 {
81
- return &node_to_cpumask_map[node];
84
+ return cpu_possible_mask;
8285 }
8386
8487 #define pcibus_to_node(bus) __pcibus_to_node(bus)
85
-
86
-#define node_distance(a, b) __node_distance(a, b)
8788
8889 #else /* !CONFIG_NUMA */
8990