s390/debug: use union tod_clock
authorHeiko Carstens <hca@linux.ibm.com>
Mon, 8 Feb 2021 15:32:27 +0000 (16:32 +0100)
committerVasily Gorbik <gor@linux.ibm.com>
Sat, 13 Feb 2021 16:17:54 +0000 (17:17 +0100)
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
arch/s390/kernel/debug.c

index b6619ae..bb958d3 100644 (file)
@@ -829,11 +829,11 @@ static inline debug_entry_t *get_active_entry(debug_info_t *id)
 static inline void debug_finish_entry(debug_info_t *id, debug_entry_t *active,
                                      int level, int exception)
 {
-       unsigned char clk[STORE_CLOCK_EXT_SIZE];
        unsigned long timestamp;
+       union tod_clock clk;
 
-       get_tod_clock_ext(clk);
-       timestamp = *(unsigned long *) &clk[0] >> 4;
+       store_tod_clock_ext(&clk);
+       timestamp = clk.us;
        timestamp -= TOD_UNIX_EPOCH >> 12;
        active->clock = timestamp;
        active->cpu = smp_processor_id();