summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--arch/s390/include/asm/timex.h5
-rw-r--r--arch/s390/kernel/early.c6
2 files changed, 5 insertions, 6 deletions
diff --git a/arch/s390/include/asm/timex.h b/arch/s390/include/asm/timex.h
index 271a1e12cc73..24964579684b 100644
--- a/arch/s390/include/asm/timex.h
+++ b/arch/s390/include/asm/timex.h
@@ -53,16 +53,15 @@ static inline int set_tod_clock(__u64 time)
return cc;
}
-static inline int store_tod_clock_ext(char *time)
+static inline int store_tod_clock_ext_cc(union tod_clock *clk)
{
- typedef struct { char _[STORE_CLOCK_EXT_SIZE]; } addrtype;
int cc;
asm volatile(
" stcke %1\n"
" ipm %0\n"
" srl %0,28\n"
- : "=d" (cc), "=Q" (*(addrtype *)time) : : "cc");
+ : "=d" (cc), "=Q" (*clk) : : "cc");
return cc;
}
diff --git a/arch/s390/kernel/early.c b/arch/s390/kernel/early.c
index ee063b56b5d1..8f046f985d8e 100644
--- a/arch/s390/kernel/early.c
+++ b/arch/s390/kernel/early.c
@@ -35,12 +35,12 @@
static void __init reset_tod_clock(void)
{
- char time[STORE_CLOCK_EXT_SIZE];
+ union tod_clock clk;
- if (store_tod_clock_ext(time) == 0)
+ if (store_tod_clock_ext_cc(&clk) == 0)
return;
/* TOD clock not running. Set the clock to Unix Epoch. */
- if (set_tod_clock(TOD_UNIX_EPOCH) != 0 || store_tod_clock_ext(time) != 0)
+ if (set_tod_clock(TOD_UNIX_EPOCH) || store_tod_clock_ext_cc(&clk))
disabled_wait();
memset(tod_clock_base, 0, 16);