]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
cpu: Remove nr_cores from struct CPUState
authorXiaoyao Li <xiaoyao.li@intel.com>
Thu, 19 Dec 2024 11:01:23 +0000 (06:01 -0500)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 10 Jan 2025 22:34:45 +0000 (23:34 +0100)
There is no user of it now, remove it.

Signed-off-by: Xiaoyao Li <xiaoyao.li@intel.com>
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Link: https://lore.kernel.org/r/20241219110125.1266461-9-xiaoyao.li@intel.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
hw/core/cpu-common.c
include/hw/core/cpu.h
system/cpus.c

index 1edc16f65c809b8471b2fdb55403cb53441923d9..cb79566cc51bc7f4c11effe700584f9c3472f4b6 100644 (file)
@@ -243,7 +243,6 @@ static void cpu_common_initfn(Object *obj)
     cpu->cluster_index = UNASSIGNED_CLUSTER_INDEX;
     /* user-mode doesn't have configurable SMP topology */
     /* the default value is changed by qemu_init_vcpu() for system-mode */
-    cpu->nr_cores = 1;
     cpu->nr_threads = 1;
     cpu->cflags_next_tb = -1;
 
index c3ca0babcb3f87ec5022506a8ca2f119c242593a..fb397cdfc53d12d40d3e4e7f86251fc31c48b9f6 100644 (file)
@@ -407,7 +407,6 @@ struct qemu_work_item;
  *   Under TCG this value is propagated to @tcg_cflags.
  *   See TranslationBlock::TCG CF_CLUSTER_MASK.
  * @tcg_cflags: Pre-computed cflags for this cpu.
- * @nr_cores: Number of cores within this CPU package.
  * @nr_threads: Number of threads within this CPU core.
  * @thread: Host thread details, only live once @created is #true
  * @sem: WIN32 only semaphore used only for qtest
@@ -466,7 +465,6 @@ struct CPUState {
     CPUClass *cc;
     /*< public >*/
 
-    int nr_cores;
     int nr_threads;
 
     struct QemuThread *thread;
index 99f83806c16748f9007467c6788b175f448fa0fb..37e5892c2404c782552ddbae6a1494ce1274e4db 100644 (file)
@@ -687,7 +687,6 @@ void qemu_init_vcpu(CPUState *cpu)
 {
     MachineState *ms = MACHINE(qdev_get_machine());
 
-    cpu->nr_cores = machine_topo_get_cores_per_socket(ms);
     cpu->nr_threads =  ms->smp.threads;
     cpu->stopped = true;
     cpu->random_seed = qemu_guest_random_seed_thread_part1();