[PATCH 08/24] linux-user/aarch64/mte: Include missing 'user/abitypes.h' header

Philippe Mathieu-Daudé posted 24 patches 1 week, 2 days ago
[PATCH 08/24] linux-user/aarch64/mte: Include missing 'user/abitypes.h' header
Posted by Philippe Mathieu-Daudé 1 week, 2 days ago
abi_long type is defined in "user/abitypes.h".
Include it in order to avoid when refactoring:

  linux-user/aarch64/mte_user_helper.h:30:42: error: unknown type name ‘abi_long’; did you mean ‘u_long’?
     30 | void arm_set_mte_tcf0(CPUArchState *env, abi_long value);
        |                                          ^~~~~~~~
        |                                          u_long

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 linux-user/aarch64/mte_user_helper.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/linux-user/aarch64/mte_user_helper.h b/linux-user/aarch64/mte_user_helper.h
index 8685e5175a..0c53abda22 100644
--- a/linux-user/aarch64/mte_user_helper.h
+++ b/linux-user/aarch64/mte_user_helper.h
@@ -9,6 +9,8 @@
 #ifndef AARCH64_MTE_USER_HELPER_H
 #define AARCH64_MTE USER_HELPER_H
 
+#include "user/abitypes.h"
+
 #ifndef PR_MTE_TCF_SHIFT
 # define PR_MTE_TCF_SHIFT       1
 # define PR_MTE_TCF_NONE        (0UL << PR_MTE_TCF_SHIFT)
-- 
2.45.2


Re: [PATCH 08/24] linux-user/aarch64/mte: Include missing 'user/abitypes.h' header
Posted by Richard Henderson 1 week, 1 day ago
On 11/13/24 17:12, Philippe Mathieu-Daudé wrote:
> abi_long type is defined in "user/abitypes.h".
> Include it in order to avoid when refactoring:
> 
>    linux-user/aarch64/mte_user_helper.h:30:42: error: unknown type name ‘abi_long’; did you mean ‘u_long’?
>       30 | void arm_set_mte_tcf0(CPUArchState *env, abi_long value);
>          |                                          ^~~~~~~~
>          |                                          u_long
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>   linux-user/aarch64/mte_user_helper.h | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/linux-user/aarch64/mte_user_helper.h b/linux-user/aarch64/mte_user_helper.h
> index 8685e5175a..0c53abda22 100644
> --- a/linux-user/aarch64/mte_user_helper.h
> +++ b/linux-user/aarch64/mte_user_helper.h
> @@ -9,6 +9,8 @@
>   #ifndef AARCH64_MTE_USER_HELPER_H
>   #define AARCH64_MTE USER_HELPER_H
>   
> +#include "user/abitypes.h"
> +
>   #ifndef PR_MTE_TCF_SHIFT
>   # define PR_MTE_TCF_SHIFT       1
>   # define PR_MTE_TCF_NONE        (0UL << PR_MTE_TCF_SHIFT)

Or maybe just switch to uint64_t.
This is aarch64, so it's always going to be 64 bits.
This is private between the prctl syscall and gdbstub.

r~

Re: [PATCH 08/24] linux-user/aarch64/mte: Include missing 'user/abitypes.h' header
Posted by Pierrick Bouvier 1 week, 2 days ago

On 11/13/24 17:12, Philippe Mathieu-Daudé wrote:
> abi_long type is defined in "user/abitypes.h".
> Include it in order to avoid when refactoring:
> 
>    linux-user/aarch64/mte_user_helper.h:30:42: error: unknown type name ‘abi_long’; did you mean ‘u_long’?
>       30 | void arm_set_mte_tcf0(CPUArchState *env, abi_long value);
>          |                                          ^~~~~~~~
>          |                                          u_long
> 
> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
> ---
>   linux-user/aarch64/mte_user_helper.h | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/linux-user/aarch64/mte_user_helper.h b/linux-user/aarch64/mte_user_helper.h
> index 8685e5175a..0c53abda22 100644
> --- a/linux-user/aarch64/mte_user_helper.h
> +++ b/linux-user/aarch64/mte_user_helper.h
> @@ -9,6 +9,8 @@
>   #ifndef AARCH64_MTE_USER_HELPER_H
>   #define AARCH64_MTE USER_HELPER_H
>   
> +#include "user/abitypes.h"
> +
>   #ifndef PR_MTE_TCF_SHIFT
>   # define PR_MTE_TCF_SHIFT       1
>   # define PR_MTE_TCF_NONE        (0UL << PR_MTE_TCF_SHIFT)

Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>