Skip to content

Commit 6e090ff

Browse files
calmisibonzini
authored andcommitted
cpu: Remove nr_cores from struct CPUState
There is no user of it now, remove it. Signed-off-by: Xiaoyao Li <[email protected]> Reviewed-by: Zhao Liu <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Paolo Bonzini <[email protected]>
1 parent 473d79b commit 6e090ff

File tree

3 files changed

+0
-4
lines changed

3 files changed

+0
-4
lines changed

hw/core/cpu-common.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,6 @@ static void cpu_common_initfn(Object *obj)
243243
cpu->cluster_index = UNASSIGNED_CLUSTER_INDEX;
244244
/* user-mode doesn't have configurable SMP topology */
245245
/* the default value is changed by qemu_init_vcpu() for system-mode */
246-
cpu->nr_cores = 1;
247246
cpu->nr_threads = 1;
248247
cpu->cflags_next_tb = -1;
249248

include/hw/core/cpu.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,6 @@ struct qemu_work_item;
407407
* Under TCG this value is propagated to @tcg_cflags.
408408
* See TranslationBlock::TCG CF_CLUSTER_MASK.
409409
* @tcg_cflags: Pre-computed cflags for this cpu.
410-
* @nr_cores: Number of cores within this CPU package.
411410
* @nr_threads: Number of threads within this CPU core.
412411
* @thread: Host thread details, only live once @created is #true
413412
* @sem: WIN32 only semaphore used only for qtest
@@ -466,7 +465,6 @@ struct CPUState {
466465
CPUClass *cc;
467466
/*< public >*/
468467

469-
int nr_cores;
470468
int nr_threads;
471469

472470
struct QemuThread *thread;

system/cpus.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -687,7 +687,6 @@ void qemu_init_vcpu(CPUState *cpu)
687687
{
688688
MachineState *ms = MACHINE(qdev_get_machine());
689689

690-
cpu->nr_cores = machine_topo_get_cores_per_socket(ms);
691690
cpu->nr_threads = ms->smp.threads;
692691
cpu->stopped = true;
693692
cpu->random_seed = qemu_guest_random_seed_thread_part1();

0 commit comments

Comments
 (0)