mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-17 23:22:12 -06:00
linux-user: remove #define smp_{cores, threads}
Those are unneeded now that CPUState nr_{cores,threads} is always initialized. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com> Acked-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
This commit is contained in:
parent
0c3d7c0051
commit
eab60fb9f5
3 changed files with 7 additions and 9 deletions
|
@ -29,12 +29,9 @@ void qtest_clock_warp(int64_t dest);
|
||||||
|
|
||||||
#ifndef CONFIG_USER_ONLY
|
#ifndef CONFIG_USER_ONLY
|
||||||
/* vl.c */
|
/* vl.c */
|
||||||
|
/* *-user doesn't have configurable SMP topology */
|
||||||
extern int smp_cores;
|
extern int smp_cores;
|
||||||
extern int smp_threads;
|
extern int smp_threads;
|
||||||
#else
|
|
||||||
/* *-user doesn't have configurable SMP topology */
|
|
||||||
#define smp_cores 1
|
|
||||||
#define smp_threads 1
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void list_cpus(FILE *f, fprintf_function cpu_fprintf, const char *optarg);
|
void list_cpus(FILE *f, fprintf_function cpu_fprintf, const char *optarg);
|
||||||
|
|
|
@ -2498,13 +2498,13 @@ void cpu_x86_cpuid(CPUX86State *env, uint32_t index, uint32_t count,
|
||||||
|
|
||||||
switch (count) {
|
switch (count) {
|
||||||
case 0:
|
case 0:
|
||||||
*eax = apicid_core_offset(smp_cores, smp_threads);
|
*eax = apicid_core_offset(cs->nr_cores, cs->nr_threads);
|
||||||
*ebx = smp_threads;
|
*ebx = cs->nr_threads;
|
||||||
*ecx |= CPUID_TOPOLOGY_LEVEL_SMT;
|
*ecx |= CPUID_TOPOLOGY_LEVEL_SMT;
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
*eax = apicid_pkg_offset(smp_cores, smp_threads);
|
*eax = apicid_pkg_offset(cs->nr_cores, cs->nr_threads);
|
||||||
*ebx = smp_cores * smp_threads;
|
*ebx = cs->nr_cores * cs->nr_threads;
|
||||||
*ecx |= CPUID_TOPOLOGY_LEVEL_CORE;
|
*ecx |= CPUID_TOPOLOGY_LEVEL_CORE;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -9943,7 +9943,8 @@ static void ppc_cpu_unrealizefn(DeviceState *dev, Error **errp)
|
||||||
|
|
||||||
int ppc_get_compat_smt_threads(PowerPCCPU *cpu)
|
int ppc_get_compat_smt_threads(PowerPCCPU *cpu)
|
||||||
{
|
{
|
||||||
int ret = MIN(smp_threads, kvmppc_smt_threads());
|
CPUState *cs = CPU(cpu);
|
||||||
|
int ret = MIN(cs->nr_threads, kvmppc_smt_threads());
|
||||||
|
|
||||||
switch (cpu->cpu_version) {
|
switch (cpu->cpu_version) {
|
||||||
case CPU_POWERPC_LOGICAL_2_05:
|
case CPU_POWERPC_LOGICAL_2_05:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue