[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v7 10/15] machine: Make smp_parse generic enough for all arch
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [PATCH v7 10/15] machine: Make smp_parse generic enough for all arches |
Date: |
Mon, 23 Aug 2021 15:19:09 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 |
On 8/23/21 2:27 PM, Yanan Wang wrote:
> Currently the only difference between smp_parse and pc_smp_parse
> is the support of dies parameter and the related error reporting.
> With some arch compat variables like "bool dies_supported", we can
> make smp_parse generic enough for all arches and the PC specific
> one can be removed.
Ah, this is the opposite argument to my reply to your patch #5.
> Making smp_parse() generic enough can reduce code duplication and
> ease the code maintenance, and also allows extending the topology
> with more arch specific members (e.g., clusters) in the future.
>
> Suggested-by: Andrew Jones <drjones@redhat.com>
> Signed-off-by: Yanan Wang <wangyanan55@huawei.com>
> Reviewed-by: Andrew Jones <drjones@redhat.com>
> ---
> hw/core/machine.c | 110 ++++++++++++++++++++++++++++++++++++--------
> hw/i386/pc.c | 84 +--------------------------------
> include/hw/boards.h | 9 ++++
> 3 files changed, 100 insertions(+), 103 deletions(-)
- [PATCH v7 02/15] machine: Minor refactor/fix for the smp parsers, (continued)
- [PATCH v7 02/15] machine: Minor refactor/fix for the smp parsers, Yanan Wang, 2021/08/23
- [PATCH v7 03/15] machine: Uniformly use maxcpus to calculate the omitted parameters, Yanan Wang, 2021/08/23
- [PATCH v7 05/15] machine: Improve the error reporting of smp parsing, Yanan Wang, 2021/08/23
- [PATCH v7 04/15] machine: Set the value of cpus to match maxcpus if it's omitted, Yanan Wang, 2021/08/23
- [PATCH v7 06/15] hw: Add compat machines for 6.2, Yanan Wang, 2021/08/23
- [PATCH v7 09/15] machine: Tweak the order of topology members in struct CpuTopology, Yanan Wang, 2021/08/23
- [PATCH v7 08/15] machine: Use ms instead of global current_machine in sanity-check, Yanan Wang, 2021/08/23
- [PATCH v7 10/15] machine: Make smp_parse generic enough for all arches, Yanan Wang, 2021/08/23
- Re: [PATCH v7 10/15] machine: Make smp_parse generic enough for all arches,
Philippe Mathieu-Daudé <=
- [PATCH v7 12/15] machine: Move smp_prefer_sockets to struct SMPCompatProps, Yanan Wang, 2021/08/23
- [PATCH v7 07/15] machine: Prefer cores over sockets in smp parsing since 6.2, Yanan Wang, 2021/08/23
- [PATCH v7 13/15] machine: Put all sanity-check in the generic SMP parser, Yanan Wang, 2021/08/23
- [PATCH v7 15/15] tests/unit: Add a unit test for smp parsing, Yanan Wang, 2021/08/23
- [PATCH v7 11/15] machine: Remove smp_parse callback from MachineClass, Yanan Wang, 2021/08/23
- [PATCH v7 14/15] machine: Split out the smp parsing code, Yanan Wang, 2021/08/23