diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2009-05-05 10:12:55 +0100 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2009-05-05 10:12:55 +0100 |
commit | f3831a592fe4332a70baad64a860b345398885b7 (patch) | |
tree | fd27b986295fe5a4f1c0924a804228f829a4c894 /arch/s390/kernel/early.c | |
parent | 376f7839b72ec526173cafb5d8eadfc61e2effdf (diff) | |
parent | 8560b9321f9050968f393ce1ec67e47c1a0bd5cf (diff) |
Merge commit 'takashi/topic/asoc' into for-2.6.31
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 4d221c81c84..cf09948faad 100644 --- a/arch/s390/kernel/early.c +++ b/arch/s390/kernel/early.c @@ -34,8 +34,25 @@ char kernel_nss_name[NSS_NAME_SIZE + 1]; +static unsigned long machine_flags; + static void __init setup_boot_command_line(void); +/* + * Get the TOD clock running. + */ +static void __init reset_tod_clock(void) +{ + u64 time; + + if (store_clock(&time) == 0) + return; + /* TOD clock not running. Set the clock to Unix Epoch. */ + if (set_clock(TOD_UNIX_EPOCH) != 0 || store_clock(&time) != 0) + disabled_wait(0); + + sched_clock_base_cc = TOD_UNIX_EPOCH; +} #ifdef CONFIG_SHARED_KERNEL int __init savesys_ipl_nss(char *cmd, const int cmdlen); @@ -370,6 +387,7 @@ static void __init setup_boot_command_line(void) */ void __init startup_init(void) { + reset_tod_clock(); ipl_save_parameters(); rescue_initrd(); clear_bss_section(); @@ -391,5 +409,6 @@ void __init startup_init(void) setup_hpage(); sclp_facilities_detect(); detect_memory_layout(memory_chunk); + S390_lowcore.machine_flags = machine_flags; lockdep_on(); } |