On 6/3/24 10:53, Zhao Liu wrote:
From: Zhao Liu <zhao1....@intel.com>

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 <zhao1....@intel.com>
---
  hw/core/machine-smp.c | 8 ++++----
  1 file changed, 4 insertions(+), 4 deletions(-)

Reviewed-by: Philippe Mathieu-Daudé <phi...@linaro.org>


Reply via email to