[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 2/5] hw/cpu/cluster: Only add CPU objects to CPU cluster
From: |
Peter Maydell |
Subject: |
Re: [PATCH 2/5] hw/cpu/cluster: Only add CPU objects to CPU cluster |
Date: |
Tue, 21 Feb 2023 17:56:20 +0000 |
On Thu, 16 Feb 2023 at 14:23, Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
>
> Do not recursively add CPU and all their children objects.
> Simply iterate on the cluster direct children, which must
> be of TYPE_CPU. Otherwise raise an error.
The documentation in include/hw/cpu/cluster.h says:
* The CPUs may be either direct children of the cluster object, or indirect
* children (e.g. children of children of the cluster object).
If we want to change that we need to update the documentation too.
I'm not sure why this doesn't hit the error on the armsse.c
use of TYPE_CLUSTER -- there the objects we have to put in
the cluster are TYPE_ARMV7M, which are not themselves
TYPE_CPU. They're a container which contains a TYPE_CPU.
This is why the docs say that it's OK to have the CPU
be an indirect child. I think one of the riscv boards
may be also using this facility, but I'm less sure there.
thanks
-- PMM
- [PATCH 0/5] hw/cpu/cluster: Restrict CPU cluster to a particular CPU type, Philippe Mathieu-Daudé, 2023/02/16
- [PATCH 1/5] hw/cpu: Extend CPUState::cluster_index documentation, Philippe Mathieu-Daudé, 2023/02/16
- [PATCH 2/5] hw/cpu/cluster: Only add CPU objects to CPU cluster, Philippe Mathieu-Daudé, 2023/02/16
- Re: [PATCH 2/5] hw/cpu/cluster: Only add CPU objects to CPU cluster,
Peter Maydell <=
- [PATCH 3/5] hw/cpu/cluster: Restrict CPU cluster to a particular CPU type, Philippe Mathieu-Daudé, 2023/02/16
- [PATCH 4/5] hw/arm: Restrict CPU clusters to the expected type, Philippe Mathieu-Daudé, 2023/02/16
- [PATCH 5/5] hw/riscv: Restrict CPU clusters to the expected type, Philippe Mathieu-Daudé, 2023/02/16