On 6/3/24 10:53, Zhao Liu wrote:
From: Zhao Liu <[email protected]>

In machine_parse_smp_config(), the number of total CPUs is calculated
by:

     drawers * books * sockets * dies * clusters * cores * threads

To avoid missing the future new topology level, use a local variable to
cache the calculation result so that total CPUs are only calculated
once.

Signed-off-by: Zhao Liu <[email protected]>
---
  hw/core/machine-smp.c | 8 ++++----
  1 file changed, 4 insertions(+), 4 deletions(-)

Reviewed-by: Philippe Mathieu-Daudé <[email protected]>


Reply via email to