diff options
Diffstat (limited to 'arch/s390/kernel/early.c')
-rw-r--r-- | arch/s390/kernel/early.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/arch/s390/kernel/early.c b/arch/s390/kernel/early.c index 4d221c81c849..cf09948faad6 100644 --- a/arch/s390/kernel/early.c +++ b/arch/s390/kernel/early.c | |||
@@ -34,8 +34,25 @@ | |||
34 | 34 | ||
35 | char kernel_nss_name[NSS_NAME_SIZE + 1]; | 35 | char kernel_nss_name[NSS_NAME_SIZE + 1]; |
36 | 36 | ||
37 | static unsigned long machine_flags; | ||
38 | |||
37 | static void __init setup_boot_command_line(void); | 39 | static void __init setup_boot_command_line(void); |
38 | 40 | ||
41 | /* | ||
42 | * Get the TOD clock running. | ||
43 | */ | ||
44 | static void __init reset_tod_clock(void) | ||
45 | { | ||
46 | u64 time; | ||
47 | |||
48 | if (store_clock(&time) == 0) | ||
49 | return; | ||
50 | /* TOD clock not running. Set the clock to Unix Epoch. */ | ||
51 | if (set_clock(TOD_UNIX_EPOCH) != 0 || store_clock(&time) != 0) | ||
52 | disabled_wait(0); | ||
53 | |||
54 | sched_clock_base_cc = TOD_UNIX_EPOCH; | ||
55 | } | ||
39 | 56 | ||
40 | #ifdef CONFIG_SHARED_KERNEL | 57 | #ifdef CONFIG_SHARED_KERNEL |
41 | int __init savesys_ipl_nss(char *cmd, const int cmdlen); | 58 | int __init savesys_ipl_nss(char *cmd, const int cmdlen); |
@@ -370,6 +387,7 @@ static void __init setup_boot_command_line(void) | |||
370 | */ | 387 | */ |
371 | void __init startup_init(void) | 388 | void __init startup_init(void) |
372 | { | 389 | { |
390 | reset_tod_clock(); | ||
373 | ipl_save_parameters(); | 391 | ipl_save_parameters(); |
374 | rescue_initrd(); | 392 | rescue_initrd(); |
375 | clear_bss_section(); | 393 | clear_bss_section(); |
@@ -391,5 +409,6 @@ void __init startup_init(void) | |||
391 | setup_hpage(); | 409 | setup_hpage(); |
392 | sclp_facilities_detect(); | 410 | sclp_facilities_detect(); |
393 | detect_memory_layout(memory_chunk); | 411 | detect_memory_layout(memory_chunk); |
412 | S390_lowcore.machine_flags = machine_flags; | ||
394 | lockdep_on(); | 413 | lockdep_on(); |
395 | } | 414 | } |