s390/time: rename store_tod_clock_ext() and use union tod_clock
Rename store_tod_clock_ext() to store_tod_clock_ext_cc() to reflect that it returns a condition code and also use union tod_clock as parameter. Signed-off-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Vasily Gorbik <gor@linux.ibm.com>
This commit is contained in:
Родитель
e4101be56c
Коммит
530f639f1e
|
@ -53,16 +53,15 @@ static inline int set_tod_clock(__u64 time)
|
||||||
return cc;
|
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;
|
int cc;
|
||||||
|
|
||||||
asm volatile(
|
asm volatile(
|
||||||
" stcke %1\n"
|
" stcke %1\n"
|
||||||
" ipm %0\n"
|
" ipm %0\n"
|
||||||
" srl %0,28\n"
|
" srl %0,28\n"
|
||||||
: "=d" (cc), "=Q" (*(addrtype *)time) : : "cc");
|
: "=d" (cc), "=Q" (*clk) : : "cc");
|
||||||
return cc;
|
return cc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -35,12 +35,12 @@
|
||||||
|
|
||||||
static void __init reset_tod_clock(void)
|
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;
|
return;
|
||||||
/* TOD clock not running. Set the clock to Unix Epoch. */
|
/* 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();
|
disabled_wait();
|
||||||
|
|
||||||
memset(tod_clock_base, 0, 16);
|
memset(tod_clock_base, 0, 16);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче