Commit a6654a4
committed
LoongArch: For all possible CPUs setup logical-physical CPU mapping
In order to support ACPI-based physical CPU hotplug, we suppose for all
"possible" CPUs cpu_logical_map() can work. Because some drivers want to
use cpu_logical_map() for all "possible" CPUs, while currently we only
setup logical-physical mapping for "present" CPUs. This lack of mapping
also causes cpu_to_node() cannot work for hot-added CPUs.
All "possible" CPUs are listed in MADT, and the "present" subset is
marked as ACPI_MADT_ENABLED. To setup logical-physical CPU mapping for
all possible CPUs and keep present CPUs continuous in cpu_present_mask,
we parse MADT twice. The first pass handles CPUs with ACPI_MADT_ENABLED
and the second pass handles CPUs without ACPI_MADT_ENABLED.
The global flag (cpu_enumerated) is removed because acpi_map_cpu() calls
cpu_number_map() rather than set_processor_mask() now.
Reported-by: Bibo Mao <[email protected]>
Signed-off-by: Huacai Chen <[email protected]>1 parent 2d5404c commit a6654a4
2 files changed
+55
-29
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
62 | | - | |
63 | 61 | | |
64 | | - | |
| 62 | + | |
65 | 63 | | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
| 64 | + | |
73 | 65 | | |
74 | | - | |
| 66 | + | |
75 | 67 | | |
76 | | - | |
| 68 | + | |
77 | 69 | | |
78 | 70 | | |
79 | 71 | | |
80 | 72 | | |
| 73 | + | |
81 | 74 | | |
82 | 75 | | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | 76 | | |
89 | | - | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
90 | 81 | | |
91 | 82 | | |
92 | | - | |
93 | | - | |
94 | | - | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
95 | 87 | | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
102 | | - | |
| 102 | + | |
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
113 | | - | |
| 113 | + | |
| 114 | + | |
114 | 115 | | |
115 | 116 | | |
116 | 117 | | |
117 | 118 | | |
118 | 119 | | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
119 | 136 | | |
120 | 137 | | |
121 | 138 | | |
| |||
143 | 160 | | |
144 | 161 | | |
145 | 162 | | |
146 | | - | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
147 | 167 | | |
148 | 168 | | |
149 | 169 | | |
150 | 170 | | |
151 | | - | |
152 | 171 | | |
153 | 172 | | |
154 | 173 | | |
| |||
310 | 329 | | |
311 | 330 | | |
312 | 331 | | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
313 | 336 | | |
314 | 337 | | |
315 | 338 | | |
| |||
324 | 347 | | |
325 | 348 | | |
326 | 349 | | |
327 | | - | |
328 | | - | |
| 350 | + | |
| 351 | + | |
329 | 352 | | |
330 | | - | |
| 353 | + | |
331 | 354 | | |
332 | 355 | | |
| 356 | + | |
| 357 | + | |
333 | 358 | | |
334 | 359 | | |
335 | 360 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
331 | 331 | | |
332 | 332 | | |
333 | 333 | | |
| 334 | + | |
334 | 335 | | |
335 | 336 | | |
336 | 337 | | |
337 | 338 | | |
338 | | - | |
339 | 339 | | |
340 | 340 | | |
341 | 341 | | |
| |||
380 | 380 | | |
381 | 381 | | |
382 | 382 | | |
| 383 | + | |
383 | 384 | | |
384 | 385 | | |
385 | 386 | | |
| |||
0 commit comments