* [PATCH] linux-user: Constify target_shmlba() argument
@ 2025-01-21 19:03 Philippe Mathieu-Daudé
2025-01-21 23:24 ` Richard Henderson
0 siblings, 1 reply; 2+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-01-21 19:03 UTC (permalink / raw)
To: qemu-devel; +Cc: Laurent Vivier, Philippe Mathieu-Daudé
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] linux-user: Constify target_shmlba() argument
2025-01-21 19:03 [PATCH] linux-user: Constify target_shmlba() argument Philippe Mathieu-Daudé
@ 2025-01-21 23:24 ` Richard Henderson
0 siblings, 0 replies; 2+ messages in thread
From: Richard Henderson @ 2025-01-21 23:24 UTC (permalink / raw)
To: qemu-devel
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~
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-01-21 23:25 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-21 19:03 [PATCH] linux-user: Constify target_shmlba() argument Philippe Mathieu-Daudé
2025-01-21 23:24 ` Richard Henderson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).