aboutsummaryrefslogtreecommitdiff
path: root/arch/s390/kernel/kprobes.c
diff options
context:
space:
mode:
authorGravatar Heiko Carstens <hca@linux.ibm.com> 2023-09-11 21:40:04 +0200
committerGravatar Vasily Gorbik <gor@linux.ibm.com> 2023-09-19 13:26:56 +0200
commit527618abb92793b9d4dba548d55822dcebd95317 (patch)
treea33943001b1f0134ffc09e4cf0ecf1d267e44779 /arch/s390/kernel/kprobes.c
parents390/ctlreg: add type checking to __local_ctl_load() and __local_ctl_store() (diff)
downloadlinux-527618abb92793b9d4dba548d55822dcebd95317.tar.gz
linux-527618abb92793b9d4dba548d55822dcebd95317.tar.bz2
linux-527618abb92793b9d4dba548d55822dcebd95317.zip
s390/ctlreg: add struct ctlreg
Add struct ctlreg to enforce strict type checking / usage for control register functions. Reviewed-by: Alexander Gordeev <agordeev@linux.ibm.com> Signed-off-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
Diffstat (limited to 'arch/s390/kernel/kprobes.c')
-rw-r--r--arch/s390/kernel/kprobes.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/arch/s390/kernel/kprobes.c b/arch/s390/kernel/kprobes.c
index d4c2ece4f839..f0cf20d4b3c5 100644
--- a/arch/s390/kernel/kprobes.c
+++ b/arch/s390/kernel/kprobes.c
@@ -225,18 +225,18 @@ static void enable_singlestep(struct kprobe_ctlblk *kcb,
unsigned long ip)
{
union {
- unsigned long regs[3];
+ struct ctlreg regs[3];
struct {
- unsigned long control;
- unsigned long start;
- unsigned long end;
+ struct ctlreg control;
+ struct ctlreg start;
+ struct ctlreg end;
};
} per_kprobe;
/* Set up the PER control registers %cr9-%cr11 */
- per_kprobe.control = PER_EVENT_IFETCH;
- per_kprobe.start = ip;
- per_kprobe.end = ip;
+ per_kprobe.control.val = PER_EVENT_IFETCH;
+ per_kprobe.start.val = ip;
+ per_kprobe.end.val = ip;
/* Save control regs and psw mask */
__local_ctl_store(9, 11, kcb->kprobe_saved_ctl);