All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] target/riscv: Include missing headers in '*internals.h'
@ 2024-12-03 20:08 Philippe Mathieu-Daudé
  2024-12-03 20:08 ` [PATCH 1/2] target/riscv: Include missing headers in 'vector_internals.h' Philippe Mathieu-Daudé
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-12-03 20:08 UTC (permalink / raw)
  To: qemu-devel
  Cc: Weiwei Li, Daniel Henrique Barboza, Palmer Dabbelt, Liu Zhiwei,
	Bin Meng, qemu-riscv, Alistair Francis,
	Philippe Mathieu-Daudé

2 trivial RISC-V oriented patches extracted from a bigger
series which refactor include/exec/ headers.

Philippe Mathieu-Daudé (2):
  target/riscv: Include missing headers in 'vector_internals.h'
  target/riscv: Include missing headers in 'internals.h'

 target/riscv/internals.h        | 3 +++
 target/riscv/vector_internals.h | 1 +
 2 files changed, 4 insertions(+)

-- 
2.45.2



^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 1/2] target/riscv: Include missing headers in 'vector_internals.h'
  2024-12-03 20:08 [PATCH 0/2] target/riscv: Include missing headers in '*internals.h' Philippe Mathieu-Daudé
@ 2024-12-03 20:08 ` Philippe Mathieu-Daudé
  2024-12-03 21:07   ` Daniel Henrique Barboza
  2024-12-04  2:29   ` Alistair Francis
  2024-12-03 20:08 ` [PATCH 2/2] target/riscv: Include missing headers in 'internals.h' Philippe Mathieu-Daudé
  2024-12-04  2:41 ` [PATCH 0/2] target/riscv: Include missing headers in '*internals.h' Alistair Francis
  2 siblings, 2 replies; 8+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-12-03 20:08 UTC (permalink / raw)
  To: qemu-devel
  Cc: Weiwei Li, Daniel Henrique Barboza, Palmer Dabbelt, Liu Zhiwei,
	Bin Meng, qemu-riscv, Alistair Francis,
	Philippe Mathieu-Daudé

Rather than relying on implicit includes, explicit them,
in order to avoid when refactoring unrelated headers:

  target/riscv/vector_internals.h:36:12: error: call to undeclared function 'FIELD_EX32'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     36 |     return FIELD_EX32(simd_data(desc), VDATA, NF);
        |            ^

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 target/riscv/vector_internals.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/target/riscv/vector_internals.h b/target/riscv/vector_internals.h
index 9e1e15b5750..a11cc8366dc 100644
--- a/target/riscv/vector_internals.h
+++ b/target/riscv/vector_internals.h
@@ -20,6 +20,7 @@
 #define TARGET_RISCV_VECTOR_INTERNALS_H
 
 #include "qemu/bitops.h"
+#include "hw/registerfields.h"
 #include "cpu.h"
 #include "tcg/tcg-gvec-desc.h"
 #include "internals.h"
-- 
2.45.2



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 2/2] target/riscv: Include missing headers in 'internals.h'
  2024-12-03 20:08 [PATCH 0/2] target/riscv: Include missing headers in '*internals.h' Philippe Mathieu-Daudé
  2024-12-03 20:08 ` [PATCH 1/2] target/riscv: Include missing headers in 'vector_internals.h' Philippe Mathieu-Daudé
@ 2024-12-03 20:08 ` Philippe Mathieu-Daudé
  2024-12-03 21:07   ` Daniel Henrique Barboza
  2024-12-04  2:29   ` Alistair Francis
  2024-12-04  2:41 ` [PATCH 0/2] target/riscv: Include missing headers in '*internals.h' Alistair Francis
  2 siblings, 2 replies; 8+ messages in thread
From: Philippe Mathieu-Daudé @ 2024-12-03 20:08 UTC (permalink / raw)
  To: qemu-devel
  Cc: Weiwei Li, Daniel Henrique Barboza, Palmer Dabbelt, Liu Zhiwei,
	Bin Meng, qemu-riscv, Alistair Francis,
	Philippe Mathieu-Daudé

Rather than relying on implicit includes, explicit them,
in order to avoid when refactoring unrelated headers:

  target/riscv/internals.h:49:15: error: use of undeclared identifier 'PRV_S'
     49 |         ret = PRV_S;
        |               ^
  target/riscv/internals.h:93:9: error: call to undeclared function 'env_archcpu'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     93 |     if (env_archcpu(env)->cfg.ext_zfinx) {
        |         ^
  target/riscv/internals.h:101:15: error: unknown type name 'float32'; did you mean 'float'?
    101 | static inline float32 check_nanbox_s(CPURISCVState *env, uint64_t f)
        |               ^~~~~~~
        |               float

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

diff --git a/target/riscv/internals.h b/target/riscv/internals.h
index ddbdee885bc..76934eaa7b5 100644
--- a/target/riscv/internals.h
+++ b/target/riscv/internals.h
@@ -19,7 +19,10 @@
 #ifndef RISCV_CPU_INTERNALS_H
 #define RISCV_CPU_INTERNALS_H
 
+#include "exec/cpu-common.h"
 #include "hw/registerfields.h"
+#include "fpu/softfloat-types.h"
+#include "target/riscv/cpu_bits.h"
 
 /*
  * The current MMU Modes are:
-- 
2.45.2



^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/2] target/riscv: Include missing headers in 'vector_internals.h'
  2024-12-03 20:08 ` [PATCH 1/2] target/riscv: Include missing headers in 'vector_internals.h' Philippe Mathieu-Daudé
@ 2024-12-03 21:07   ` Daniel Henrique Barboza
  2024-12-04  2:29   ` Alistair Francis
  1 sibling, 0 replies; 8+ messages in thread
From: Daniel Henrique Barboza @ 2024-12-03 21:07 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-devel
  Cc: Weiwei Li, Palmer Dabbelt, Liu Zhiwei, Bin Meng, qemu-riscv,
	Alistair Francis



On 12/3/24 5:08 PM, Philippe Mathieu-Daudé wrote:
> Rather than relying on implicit includes, explicit them,
> in order to avoid when refactoring unrelated headers:
> 
>    target/riscv/vector_internals.h:36:12: error: call to undeclared function 'FIELD_EX32'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
>       36 |     return FIELD_EX32(simd_data(desc), VDATA, NF);
>          |            ^
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---

Reviewed-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>

>   target/riscv/vector_internals.h | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/target/riscv/vector_internals.h b/target/riscv/vector_internals.h
> index 9e1e15b5750..a11cc8366dc 100644
> --- a/target/riscv/vector_internals.h
> +++ b/target/riscv/vector_internals.h
> @@ -20,6 +20,7 @@
>   #define TARGET_RISCV_VECTOR_INTERNALS_H
>   
>   #include "qemu/bitops.h"
> +#include "hw/registerfields.h"
>   #include "cpu.h"
>   #include "tcg/tcg-gvec-desc.h"
>   #include "internals.h"



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/2] target/riscv: Include missing headers in 'internals.h'
  2024-12-03 20:08 ` [PATCH 2/2] target/riscv: Include missing headers in 'internals.h' Philippe Mathieu-Daudé
@ 2024-12-03 21:07   ` Daniel Henrique Barboza
  2024-12-04  2:29   ` Alistair Francis
  1 sibling, 0 replies; 8+ messages in thread
From: Daniel Henrique Barboza @ 2024-12-03 21:07 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-devel
  Cc: Weiwei Li, Palmer Dabbelt, Liu Zhiwei, Bin Meng, qemu-riscv,
	Alistair Francis



On 12/3/24 5:08 PM, Philippe Mathieu-Daudé wrote:
> Rather than relying on implicit includes, explicit them,
> in order to avoid when refactoring unrelated headers:
> 
>    target/riscv/internals.h:49:15: error: use of undeclared identifier 'PRV_S'
>       49 |         ret = PRV_S;
>          |               ^
>    target/riscv/internals.h:93:9: error: call to undeclared function 'env_archcpu'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
>       93 |     if (env_archcpu(env)->cfg.ext_zfinx) {
>          |         ^
>    target/riscv/internals.h:101:15: error: unknown type name 'float32'; did you mean 'float'?
>      101 | static inline float32 check_nanbox_s(CPURISCVState *env, uint64_t f)
>          |               ^~~~~~~
>          |               float
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---

Reviewed-by: Daniel Henrique Barboza <dbarboza@ventanamicro.com>

>   target/riscv/internals.h | 3 +++
>   1 file changed, 3 insertions(+)
> 
> diff --git a/target/riscv/internals.h b/target/riscv/internals.h
> index ddbdee885bc..76934eaa7b5 100644
> --- a/target/riscv/internals.h
> +++ b/target/riscv/internals.h
> @@ -19,7 +19,10 @@
>   #ifndef RISCV_CPU_INTERNALS_H
>   #define RISCV_CPU_INTERNALS_H
>   
> +#include "exec/cpu-common.h"
>   #include "hw/registerfields.h"
> +#include "fpu/softfloat-types.h"
> +#include "target/riscv/cpu_bits.h"
>   
>   /*
>    * The current MMU Modes are:



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/2] target/riscv: Include missing headers in 'vector_internals.h'
  2024-12-03 20:08 ` [PATCH 1/2] target/riscv: Include missing headers in 'vector_internals.h' Philippe Mathieu-Daudé
  2024-12-03 21:07   ` Daniel Henrique Barboza
@ 2024-12-04  2:29   ` Alistair Francis
  1 sibling, 0 replies; 8+ messages in thread
From: Alistair Francis @ 2024-12-04  2:29 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: qemu-devel, Weiwei Li, Daniel Henrique Barboza, Palmer Dabbelt,
	Liu Zhiwei, Bin Meng, qemu-riscv, Alistair Francis

On Wed, Dec 4, 2024 at 5:09 AM Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
>
> Rather than relying on implicit includes, explicit them,
> in order to avoid when refactoring unrelated headers:
>
>   target/riscv/vector_internals.h:36:12: error: call to undeclared function 'FIELD_EX32'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
>      36 |     return FIELD_EX32(simd_data(desc), VDATA, NF);
>         |            ^
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>

Reviewed-by: Alistair Francis <alistair.francis@wdc.com>

Alistair

> ---
>  target/riscv/vector_internals.h | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/target/riscv/vector_internals.h b/target/riscv/vector_internals.h
> index 9e1e15b5750..a11cc8366dc 100644
> --- a/target/riscv/vector_internals.h
> +++ b/target/riscv/vector_internals.h
> @@ -20,6 +20,7 @@
>  #define TARGET_RISCV_VECTOR_INTERNALS_H
>
>  #include "qemu/bitops.h"
> +#include "hw/registerfields.h"
>  #include "cpu.h"
>  #include "tcg/tcg-gvec-desc.h"
>  #include "internals.h"
> --
> 2.45.2
>
>


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/2] target/riscv: Include missing headers in 'internals.h'
  2024-12-03 20:08 ` [PATCH 2/2] target/riscv: Include missing headers in 'internals.h' Philippe Mathieu-Daudé
  2024-12-03 21:07   ` Daniel Henrique Barboza
@ 2024-12-04  2:29   ` Alistair Francis
  1 sibling, 0 replies; 8+ messages in thread
From: Alistair Francis @ 2024-12-04  2:29 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: qemu-devel, Weiwei Li, Daniel Henrique Barboza, Palmer Dabbelt,
	Liu Zhiwei, Bin Meng, qemu-riscv, Alistair Francis

On Wed, Dec 4, 2024 at 5:09 AM Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
>
> Rather than relying on implicit includes, explicit them,
> in order to avoid when refactoring unrelated headers:
>
>   target/riscv/internals.h:49:15: error: use of undeclared identifier 'PRV_S'
>      49 |         ret = PRV_S;
>         |               ^
>   target/riscv/internals.h:93:9: error: call to undeclared function 'env_archcpu'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
>      93 |     if (env_archcpu(env)->cfg.ext_zfinx) {
>         |         ^
>   target/riscv/internals.h:101:15: error: unknown type name 'float32'; did you mean 'float'?
>     101 | static inline float32 check_nanbox_s(CPURISCVState *env, uint64_t f)
>         |               ^~~~~~~
>         |               float
>
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>

Reviewed-by: Alistair Francis <alistair.francis@wdc.com>

Alistair

> ---
>  target/riscv/internals.h | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/target/riscv/internals.h b/target/riscv/internals.h
> index ddbdee885bc..76934eaa7b5 100644
> --- a/target/riscv/internals.h
> +++ b/target/riscv/internals.h
> @@ -19,7 +19,10 @@
>  #ifndef RISCV_CPU_INTERNALS_H
>  #define RISCV_CPU_INTERNALS_H
>
> +#include "exec/cpu-common.h"
>  #include "hw/registerfields.h"
> +#include "fpu/softfloat-types.h"
> +#include "target/riscv/cpu_bits.h"
>
>  /*
>   * The current MMU Modes are:
> --
> 2.45.2
>
>


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 0/2] target/riscv: Include missing headers in '*internals.h'
  2024-12-03 20:08 [PATCH 0/2] target/riscv: Include missing headers in '*internals.h' Philippe Mathieu-Daudé
  2024-12-03 20:08 ` [PATCH 1/2] target/riscv: Include missing headers in 'vector_internals.h' Philippe Mathieu-Daudé
  2024-12-03 20:08 ` [PATCH 2/2] target/riscv: Include missing headers in 'internals.h' Philippe Mathieu-Daudé
@ 2024-12-04  2:41 ` Alistair Francis
  2 siblings, 0 replies; 8+ messages in thread
From: Alistair Francis @ 2024-12-04  2:41 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé
  Cc: qemu-devel, Weiwei Li, Daniel Henrique Barboza, Palmer Dabbelt,
	Liu Zhiwei, Bin Meng, qemu-riscv, Alistair Francis

On Wed, Dec 4, 2024 at 5:09 AM Philippe Mathieu-Daudé <philmd@linaro.org> wrote:
>
> 2 trivial RISC-V oriented patches extracted from a bigger
> series which refactor include/exec/ headers.
>
> Philippe Mathieu-Daudé (2):
>   target/riscv: Include missing headers in 'vector_internals.h'
>   target/riscv: Include missing headers in 'internals.h'

Thanks!

Applied to riscv-to-apply.next

Alistair

>
>  target/riscv/internals.h        | 3 +++
>  target/riscv/vector_internals.h | 1 +
>  2 files changed, 4 insertions(+)
>
> --
> 2.45.2
>
>


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-12-04  2:42 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-03 20:08 [PATCH 0/2] target/riscv: Include missing headers in '*internals.h' Philippe Mathieu-Daudé
2024-12-03 20:08 ` [PATCH 1/2] target/riscv: Include missing headers in 'vector_internals.h' Philippe Mathieu-Daudé
2024-12-03 21:07   ` Daniel Henrique Barboza
2024-12-04  2:29   ` Alistair Francis
2024-12-03 20:08 ` [PATCH 2/2] target/riscv: Include missing headers in 'internals.h' Philippe Mathieu-Daudé
2024-12-03 21:07   ` Daniel Henrique Barboza
2024-12-04  2:29   ` Alistair Francis
2024-12-04  2:41 ` [PATCH 0/2] target/riscv: Include missing headers in '*internals.h' Alistair Francis

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.