Skip to content

Commit 33cc865

Browse files
Remove redundant 'disabled' declaration for PowerPC64 Linux
The 'disabled' field was declared for configurations other than SMT8 mode, but it is already handled during PowerPC64 Linux system initialization. This change removes the redundant code. make test: Start 1: init-test 1/3 Test #1: init-test ........................ Passed 0.02 sec Start 2: get-current-test 2/3 Test #2: get-current-test ................. Passed 0.02 sec Start 3: power-features-test 3/3 Test #3: power-features-test .............. Passed 0.02 sec 100% tests passed, 0 tests failed out of 3
1 parent 120dbed commit 33cc865

File tree

3 files changed

+0
-9
lines changed

3 files changed

+0
-9
lines changed

include/cpuinfo.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -692,8 +692,6 @@ struct cpuinfo_core {
692692
#endif
693693
/** Clock rate (non-Turbo) of the core, in Hz */
694694
uint64_t frequency;
695-
696-
bool disabled;
697695
};
698696

699697
struct cpuinfo_cluster {

src/powerpc/linux/cpuinfo.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,6 @@ static void parse_cpu_architecture(
117117
cpu_architecture_start);
118118
}
119119
processor->flags |= CPUINFO_POWERPC_LINUX_VALID_PROCESSOR;
120-
processor->core.disabled = false;
121120
} else {
122121
cpuinfo_log_warning(
123122
"processor %.*s in /proc/cpuinfo is ignored due not a Power processor",
@@ -326,10 +325,6 @@ bool cpuinfo_powerpc_linux_parse_proc_cpuinfo(
326325
.max_processors_count = max_processors_count,
327326
.processors = processors,
328327
};
329-
330-
for (int i = 0; i < max_processors_count; i++)
331-
processors[i].core.disabled = true;
332-
333328
return cpuinfo_linux_parse_multiline_file(
334329
"/proc/cpuinfo", BUFFER_SIZE, (cpuinfo_line_callback)parse_line, &state);
335330
}

tools/cpu-info.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -331,8 +331,6 @@ int main(int argc, char** argv) {
331331
printf("Cores:\n");
332332
for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
333333
const struct cpuinfo_core* core = cpuinfo_get_core(i);
334-
if (core->disabled)
335-
continue;
336334
if (core->processor_count == 1) {
337335
printf("\t%" PRIu32 ": 1 processor (%" PRIu32 ")", i, core->processor_start);
338336
} else {

0 commit comments

Comments
 (0)