Skip to content

Commit 4f71a06

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 89a25c3 commit 4f71a06

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
@@ -720,8 +720,6 @@ struct cpuinfo_core {
720720
#endif
721721
/** Clock rate (non-Turbo) of the core, in Hz */
722722
uint64_t frequency;
723-
724-
bool disabled;
725723
};
726724

727725
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
@@ -359,8 +359,6 @@ int main(int argc, char** argv) {
359359
printf("Cores:\n");
360360
for (uint32_t i = 0; i < cpuinfo_get_cores_count(); i++) {
361361
const struct cpuinfo_core* core = cpuinfo_get_core(i);
362-
if (core->disabled)
363-
continue;
364362
if (core->processor_count == 1) {
365363
printf("\t%" PRIu32 ": 1 processor (%" PRIu32 ")", i, core->processor_start);
366364
} else {

0 commit comments

Comments
 (0)