hw/core/cpu: Move CacheType to general cpu.h
PATCH 1/1 hw/core/cpu: Move CacheType to general cpu.h
I386 has already defined cache types in target/i386/cpu.h.
Move CacheType to hw/core/cpu.h, so that ARM and other architectures could use it.
Cc Alireza Sanaee <[email protected]>
Signed-off-by Zhao Liu <[email protected]>
---
This is for Ali's ARM cache topology support:
https://lore.kernel.org/qemu-devel/[email protected]/
(Ali, if maintainer doesn't pick this, you can include this into your
series freely.)
--- include/hw/core/cpu.h | 6 ++++++ target/i386/cpu.h | 6 ------ 2 files changed, 6 insertions(+), 6 deletions(-)
include/hw/core/cpu.h +6 -0
@@ -1126,4 +1126,10 @@ extern const VMStateDescription vmstate_cpu_common;#define UNASSIGNED_CPU_INDEX -1#define UNASSIGNED_CLUSTER_INDEX -1 +enum CacheType { +DATA_CACHE , +INSTRUCTION_CACHE , +UNIFIED_CACHE +}; +#endif
target/i386/cpu.h +0 -6
@@ -1768,12 +1768,6 @@ typedef enum TPRAccess {/* Cache information data structures: */ -enum CacheType { -DATA_CACHE , -INSTRUCTION_CACHE , -UNIFIED_CACHE -}; - typedef struct CPUCacheInfo { enum CacheType type; uint8_t level;
Signature · 1 line
2.34.1
Quoted 11 lines · Zhao Liu
I386 has already defined cache types in
target/i386/cpu.h.Move CacheType to
hw/core/cpu.h, so that ARM and other architectures could use it.Cc Alireza Sanaee <[email protected]>Signed-off-by Zhao Liu <[email protected]>---
This is for Ali's ARM cache topology support:
https://lore.kernel.org/qemu-devel/[email protected]/
Quoted 6 lines
(Ali, if maintainer doesn't pick this, you can include this into your
series freely.)--- include/hw/core/cpu.h | 6 ++++++ target/i386/cpu.h | 6 ------ 2 files changed, 6 insertions(+), 6 deletions(-)
Reviewed-by Philippe Mathieu-Daudé <[email protected]>
and queued, thanks!