]> git.baikalelectronics.ru Git - kernel.git/commitdiff
s390: use struct tpi_info in lowcore.h
authorSven Schnelle <svens@linux.ibm.com>
Mon, 10 May 2021 19:10:18 +0000 (21:10 +0200)
committerVasily Gorbik <gor@linux.ibm.com>
Mon, 7 Jun 2021 15:07:01 +0000 (17:07 +0200)
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>
arch/s390/include/asm/lowcore.h
arch/s390/kernel/irq.c
drivers/s390/cio/trace.h

index 3c85c60f56ac86a623816475b6dd1cd8d8acc35d..adf7f473ad8fca8c2cb69870e57e70063ad26ce2 100644 (file)
@@ -48,10 +48,15 @@ struct lowcore {
        __u8    pad_0x00a4[0x00a8-0x00a4];      /* 0x00a4 */
        __u64   trans_exc_code;                 /* 0x00a8 */
        __u64   monitor_code;                   /* 0x00b0 */
-       __u16   subchannel_id;                  /* 0x00b8 */
-       __u16   subchannel_nr;                  /* 0x00ba */
-       __u32   io_int_parm;                    /* 0x00bc */
-       __u32   io_int_word;                    /* 0x00c0 */
+       union {
+               struct {
+                       __u16   subchannel_id;  /* 0x00b8 */
+                       __u16   subchannel_nr;  /* 0x00ba */
+                       __u32   io_int_parm;    /* 0x00bc */
+                       __u32   io_int_word;    /* 0x00c0 */
+               };
+               struct tpi_info tpi_info;       /* 0x00b8 */
+       };
        __u8    pad_0x00c4[0x00c8-0x00c4];      /* 0x00c4 */
        __u32   stfl_fac_list;                  /* 0x00c8 */
        __u8    pad_0x00cc[0x00e8-0x00cc];      /* 0x00cc */
index 169258012530a47f12dc56bc616093bf61e8ec60..c0df4060d28d8a68a9dc95f2b0584cdfb139cb2f 100644 (file)
@@ -146,8 +146,8 @@ void noinstr do_io_irq(struct pt_regs *regs)
                account_idle_time_irq();
 
        do {
-               memcpy(&regs->int_code, &S390_lowcore.subchannel_id, 12);
-               if (S390_lowcore.io_int_word & BIT(31))
+               regs->tpi_info = S390_lowcore.tpi_info;
+               if (S390_lowcore.tpi_info.adapter_IO)
                        do_irq_async(regs, THIN_INTERRUPT);
                else
                        do_irq_async(regs, IO_INTERRUPT);
index 4803139bce14934e052d7b6bee9ae3f152fb58cc..86993de253451a948aa60e1169a9d2a8d1b6fd74 100644 (file)
@@ -168,10 +168,8 @@ TRACE_EVENT(s390_cio_tpi,
                        memset(&__entry->tpi_info, 0, sizeof(struct tpi_info));
                else if (addr)
                        __entry->tpi_info = *addr;
-               else {
-                       memcpy(&__entry->tpi_info, &S390_lowcore.subchannel_id,
-                              sizeof(struct tpi_info));
-               }
+               else
+                       __entry->tpi_info = S390_lowcore.tpi_info;
                __entry->cssid = __entry->tpi_info.schid.cssid;
                __entry->ssid = __entry->tpi_info.schid.ssid;
                __entry->schno = __entry->tpi_info.schid.sch_no;