diff options
author | Sven Schnelle <svens@linux.ibm.com> | 2021-05-05 23:01:11 +0300 |
---|---|---|
committer | Vasily Gorbik <gor@linux.ibm.com> | 2021-06-07 18:06:58 +0300 |
commit | 6c6a07fc7c98f31fffb0a00d2d7a5344df8b4ba8 (patch) | |
tree | a4f9b24e3f7f82d7241fcffa0991d5fd7b3221c8 /arch/s390/include/asm/lowcore.h | |
parent | 17e89e1340a377b2f14a14d7050f609328592793 (diff) | |
download | linux-6c6a07fc7c98f31fffb0a00d2d7a5344df8b4ba8.tar.xz |
s390/irq: add union/struct to access external interrupt parameters
gcc-11 warns:
arch/s390/kernel/irq.c: In function do_ext_irq:
arch/s390/kernel/irq.c:175:9: warning: memcpy reading 4 bytes from a region of size 0 [-Wstringop-overread]
175 | memcpy(®s->int_code, &S390_lowcore.ext_cpu_addr, 4);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Fix this by adding a struct for int_code to struct lowcore.
Signed-off-by: Sven Schnelle <svens@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/include/asm/lowcore.h')
-rw-r--r-- | arch/s390/include/asm/lowcore.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/arch/s390/include/asm/lowcore.h b/arch/s390/include/asm/lowcore.h index a6f0b8feb12e..d08813c7f462 100644 --- a/arch/s390/include/asm/lowcore.h +++ b/arch/s390/include/asm/lowcore.h @@ -22,8 +22,13 @@ struct lowcore { __u32 ipl_parmblock_ptr; /* 0x0014 */ __u8 pad_0x0018[0x0080-0x0018]; /* 0x0018 */ __u32 ext_params; /* 0x0080 */ - __u16 ext_cpu_addr; /* 0x0084 */ - __u16 ext_int_code; /* 0x0086 */ + union { + struct { + __u16 ext_cpu_addr; /* 0x0084 */ + __u16 ext_int_code; /* 0x0086 */ + } __packed; + __u32 ext_int_code_addr; + } __packed; __u32 svc_int_code; /* 0x0088 */ __u16 pgm_ilc; /* 0x008c */ __u16 pgm_code; /* 0x008e */ |