* [kvm-unit-tests PATCH] lib: s390x: css: Cleanup chsc inline assembly
@ 2025-02-06 14:58 Janosch Frank
2025-02-06 17:27 ` Claudio Imbrenda
0 siblings, 1 reply; 2+ messages in thread
From: Janosch Frank @ 2025-02-06 14:58 UTC (permalink / raw)
To: kvm; +Cc: linux-s390, imbrenda, nrb, hca
Name the CHSC command block pointer instead of naming it "p".
Also replace the two "m" constraints with a memory globber so the
constraints are easier to read.
Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
---
To me it makes more sense to have a separate commit that has a message
explaining why we changed it instead of sending a v2, so here it is.
---
lib/s390x/css.h | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/lib/s390x/css.h b/lib/s390x/css.h
index 06bb59c7..167f8e83 100644
--- a/lib/s390x/css.h
+++ b/lib/s390x/css.h
@@ -364,16 +364,16 @@ bool get_chsc_scsc(void);
#define CHSC_RSP_EBUSY 0x000B
#define CHSC_RSP_MAX 0x000B
-static inline int _chsc(void *p)
+static inline int _chsc(void *com_blk)
{
int cc;
- asm volatile(" .insn rre,0xb25f0000,%2,0\n"
+ asm volatile(" .insn rre,0xb25f0000,%[com_blk],0\n"
" ipm %[cc]\n"
" srl %[cc],28\n"
- : [cc] "=d" (cc), "=m" (p)
- : "d" (p), "m" (p)
- : "cc");
+ : [cc] "=d" (cc)
+ : [com_blk] "d" (com_blk)
+ : "cc", "memory");
return cc;
}
--
2.43.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [kvm-unit-tests PATCH] lib: s390x: css: Cleanup chsc inline assembly
2025-02-06 14:58 [kvm-unit-tests PATCH] lib: s390x: css: Cleanup chsc inline assembly Janosch Frank
@ 2025-02-06 17:27 ` Claudio Imbrenda
0 siblings, 0 replies; 2+ messages in thread
From: Claudio Imbrenda @ 2025-02-06 17:27 UTC (permalink / raw)
To: Janosch Frank; +Cc: kvm, linux-s390, nrb, hca
On Thu, 6 Feb 2025 14:58:49 +0000
Janosch Frank <frankja@linux.ibm.com> wrote:
> Name the CHSC command block pointer instead of naming it "p".
>
> Also replace the two "m" constraints with a memory globber so the
> constraints are easier to read.
>
> Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
> ---
>
> To me it makes more sense to have a separate commit that has a message
> explaining why we changed it instead of sending a v2, so here it is.
makes sense
>
> ---
> lib/s390x/css.h | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/lib/s390x/css.h b/lib/s390x/css.h
> index 06bb59c7..167f8e83 100644
> --- a/lib/s390x/css.h
> +++ b/lib/s390x/css.h
> @@ -364,16 +364,16 @@ bool get_chsc_scsc(void);
> #define CHSC_RSP_EBUSY 0x000B
> #define CHSC_RSP_MAX 0x000B
>
> -static inline int _chsc(void *p)
> +static inline int _chsc(void *com_blk)
> {
> int cc;
>
> - asm volatile(" .insn rre,0xb25f0000,%2,0\n"
> + asm volatile(" .insn rre,0xb25f0000,%[com_blk],0\n"
> " ipm %[cc]\n"
> " srl %[cc],28\n"
> - : [cc] "=d" (cc), "=m" (p)
> - : "d" (p), "m" (p)
> - : "cc");
> + : [cc] "=d" (cc)
> + : [com_blk] "d" (com_blk)
> + : "cc", "memory");
>
> return cc;
> }
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-02-06 17:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-06 14:58 [kvm-unit-tests PATCH] lib: s390x: css: Cleanup chsc inline assembly Janosch Frank
2025-02-06 17:27 ` Claudio Imbrenda
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox