]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - arch/i386/kernel/timers/timer_tsc.c
[CPUFREQ] Check for not initialized freq on cpufreq changes
[mirror_ubuntu-artful-kernel.git] / arch / i386 / kernel / timers / timer_tsc.c
index 47675bbbb316eedb7edd0ba6a0bd7982d8d982a0..591a642af884a8404f895a155e765af11a600111 100644 (file)
@@ -272,6 +272,10 @@ time_cpufreq_notifier(struct notifier_block *nb, unsigned long val,
        if (val != CPUFREQ_RESUMECHANGE)
                write_seqlock_irq(&xtime_lock);
        if (!ref_freq) {
+               if (!freq->old){
+                       ref_freq = freq->new;
+                       goto end;
+               }
                ref_freq = freq->old;
                loops_per_jiffy_ref = cpu_data[freq->cpu].loops_per_jiffy;
 #ifndef CONFIG_SMP
@@ -297,6 +301,7 @@ time_cpufreq_notifier(struct notifier_block *nb, unsigned long val,
 #endif
        }
 
+end:
        if (val != CPUFREQ_RESUMECHANGE)
                write_sequnlock_irq(&xtime_lock);