[PATCH 1/2] target/sparc: Provide hint about CPUSPARCState::irq_manager member

Philippe Mathieu-Daudé posted 2 patches 10 months ago
Maintainers: Fabien Chouteau <chouteau@adacore.com>, Frederic Konrad <konrad.frederic@yahoo.fr>, Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>, Artyom Tarasenko <atar4qemu@gmail.com>
[PATCH 1/2] target/sparc: Provide hint about CPUSPARCState::irq_manager member
Posted by Philippe Mathieu-Daudé 10 months ago
CPUSPARCState::irq_manager holds a pointer to a QDev,
so declare it as DeviceState instead of void.

Move the comment about Leon3 fields.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 target/sparc/cpu.h | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/target/sparc/cpu.h b/target/sparc/cpu.h
index 12a11ecb26..d02684569a 100644
--- a/target/sparc/cpu.h
+++ b/target/sparc/cpu.h
@@ -548,10 +548,9 @@ struct CPUArchState {
 #endif
     sparc_def_t def;
 
-    void *irq_manager;
+    /* Leon3 */
+    DeviceState *irq_manager;
     void (*qemu_irq_ack)(CPUSPARCState *env, int intno);
-
-    /* Leon3 cache control */
     uint32_t cache_control;
 };
 
-- 
2.41.0


Re: [PATCH 1/2] target/sparc: Provide hint about CPUSPARCState::irq_manager member
Posted by Clément Chigot 10 months ago
On Tue, Jan 30, 2024 at 12:31 PM Philippe Mathieu-Daudé
<philmd@linaro.org> wrote:
>
> CPUSPARCState::irq_manager holds a pointer to a QDev,
> so declare it as DeviceState instead of void.
>
> Move the comment about Leon3 fields.
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>  target/sparc/cpu.h | 5 ++---
>  1 file changed, 2 insertions(+), 3 deletions(-)

Reviewed-by: Clément Chigot <chigot@adacore.com>

> diff --git a/target/sparc/cpu.h b/target/sparc/cpu.h
> index 12a11ecb26..d02684569a 100644
> --- a/target/sparc/cpu.h
> +++ b/target/sparc/cpu.h
> @@ -548,10 +548,9 @@ struct CPUArchState {
>  #endif
>      sparc_def_t def;
>
> -    void *irq_manager;
> +    /* Leon3 */
> +    DeviceState *irq_manager;
>      void (*qemu_irq_ack)(CPUSPARCState *env, int intno);
> -
> -    /* Leon3 cache control */
>      uint32_t cache_control;
>  };
>
> --
> 2.41.0
>