linux-user/arm/target_syscall.h | 2 +- linux-user/mips/target_syscall.h | 2 +- linux-user/mips64/target_syscall.h | 2 +- linux-user/sh4/target_syscall.h | 2 +- linux-user/sparc/target_syscall.h | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-)
Returning target segment low boundary address multiple
shouldn't need to modify the CPU env. Make it const.
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
linux-user/arm/target_syscall.h | 2 +-
linux-user/mips/target_syscall.h | 2 +-
linux-user/mips64/target_syscall.h | 2 +-
linux-user/sh4/target_syscall.h | 2 +-
linux-user/sparc/target_syscall.h | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/linux-user/arm/target_syscall.h b/linux-user/arm/target_syscall.h
index 412ad434cfc..de5661c296b 100644
--- a/linux-user/arm/target_syscall.h
+++ b/linux-user/arm/target_syscall.h
@@ -35,7 +35,7 @@ struct target_pt_regs {
#define TARGET_FORCE_SHMLBA
-static inline abi_ulong target_shmlba(CPUARMState *env)
+static inline abi_ulong target_shmlba(const CPUARMState *env)
{
return 4 * 4096;
}
diff --git a/linux-user/mips/target_syscall.h b/linux-user/mips/target_syscall.h
index 08ead678104..7aade628645 100644
--- a/linux-user/mips/target_syscall.h
+++ b/linux-user/mips/target_syscall.h
@@ -30,7 +30,7 @@ struct target_pt_regs {
#define TARGET_FORCE_SHMLBA
-static inline abi_ulong target_shmlba(CPUMIPSState *env)
+static inline abi_ulong target_shmlba(const CPUMIPSState *env)
{
return 0x40000;
}
diff --git a/linux-user/mips64/target_syscall.h b/linux-user/mips64/target_syscall.h
index 358dc2d64c9..c4d54bda1d6 100644
--- a/linux-user/mips64/target_syscall.h
+++ b/linux-user/mips64/target_syscall.h
@@ -27,7 +27,7 @@ struct target_pt_regs {
#define TARGET_FORCE_SHMLBA
-static inline abi_ulong target_shmlba(CPUMIPSState *env)
+static inline abi_ulong target_shmlba(const CPUMIPSState *env)
{
return 0x40000;
}
diff --git a/linux-user/sh4/target_syscall.h b/linux-user/sh4/target_syscall.h
index 148398855df..8fd504fff1b 100644
--- a/linux-user/sh4/target_syscall.h
+++ b/linux-user/sh4/target_syscall.h
@@ -21,7 +21,7 @@ struct target_pt_regs {
#define TARGET_FORCE_SHMLBA
-static inline abi_ulong target_shmlba(CPUSH4State *env)
+static inline abi_ulong target_shmlba(const CPUSH4State *env)
{
return 0x4000;
}
diff --git a/linux-user/sparc/target_syscall.h b/linux-user/sparc/target_syscall.h
index e4211653574..6ab47102045 100644
--- a/linux-user/sparc/target_syscall.h
+++ b/linux-user/sparc/target_syscall.h
@@ -45,7 +45,7 @@ struct target_pt_regs {
*/
#define TARGET_FORCE_SHMLBA
-static inline abi_ulong target_shmlba(CPUSPARCState *env)
+static inline abi_ulong target_shmlba(const CPUSPARCState *env)
{
#ifdef TARGET_SPARC64
return MAX(TARGET_PAGE_SIZE, 16 * 1024);
--
2.47.1
On 1/21/25 11:03, Philippe Mathieu-Daudé wrote: > Returning target segment low boundary address multiple > shouldn't need to modify the CPU env. Make it const. > > Signed-off-by: Philippe Mathieu-Daudé<philmd@linaro.org> > --- > linux-user/arm/target_syscall.h | 2 +- > linux-user/mips/target_syscall.h | 2 +- > linux-user/mips64/target_syscall.h | 2 +- > linux-user/sh4/target_syscall.h | 2 +- > linux-user/sparc/target_syscall.h | 2 +- > 5 files changed, 5 insertions(+), 5 deletions(-) Reviewed-by: Richard Henderson <richard.henderson@linaro.org> r~
© 2016 - 2025 Red Hat, Inc.