.. | .. |
---|
131 | 131 | { |
---|
132 | 132 | unsigned long long ns_now; |
---|
133 | 133 | struct cyc2ns_data data; |
---|
| 134 | + unsigned long flags; |
---|
134 | 135 | struct cyc2ns *c2n; |
---|
| 136 | + |
---|
| 137 | + flags = hard_cond_local_irq_save(); |
---|
135 | 138 | |
---|
136 | 139 | ns_now = cycles_2_ns(tsc_now); |
---|
137 | 140 | |
---|
.. | .. |
---|
163 | 166 | c2n->data[0] = data; |
---|
164 | 167 | raw_write_seqcount_latch(&c2n->seq); |
---|
165 | 168 | c2n->data[1] = data; |
---|
| 169 | + |
---|
| 170 | + hard_cond_local_irq_restore(flags); |
---|
166 | 171 | } |
---|
167 | 172 | |
---|
168 | 173 | static void set_cyc2ns_scale(unsigned long khz, int cpu, unsigned long long tsc_now) |
---|
.. | .. |
---|
759 | 764 | * calibration, which will take at least 50ms, and |
---|
760 | 765 | * read the end value. |
---|
761 | 766 | */ |
---|
762 | | - local_irq_save(flags); |
---|
| 767 | + flags = hard_local_irq_save(); |
---|
763 | 768 | tsc1 = tsc_read_refs(&ref1, hpet); |
---|
764 | 769 | tsc_pit_khz = pit_calibrate_tsc(latch, ms, loopmin); |
---|
765 | 770 | tsc2 = tsc_read_refs(&ref2, hpet); |
---|
766 | | - local_irq_restore(flags); |
---|
| 771 | + hard_local_irq_restore(flags); |
---|
767 | 772 | |
---|
768 | 773 | /* Pick the lowest PIT TSC calibration so far */ |
---|
769 | 774 | tsc_pit_min = min(tsc_pit_min, tsc_pit_khz); |
---|
.. | .. |
---|
872 | 877 | if (!fast_calibrate) |
---|
873 | 878 | fast_calibrate = cpu_khz_from_msr(); |
---|
874 | 879 | if (!fast_calibrate) { |
---|
875 | | - local_irq_save(flags); |
---|
| 880 | + flags = hard_local_irq_save(); |
---|
876 | 881 | fast_calibrate = quick_pit_calibrate(); |
---|
877 | | - local_irq_restore(flags); |
---|
| 882 | + hard_local_irq_restore(flags); |
---|
878 | 883 | } |
---|
879 | 884 | return fast_calibrate; |
---|
880 | 885 | } |
---|
.. | .. |
---|
942 | 947 | if (!sched_clock_stable()) |
---|
943 | 948 | return; |
---|
944 | 949 | |
---|
945 | | - local_irq_save(flags); |
---|
| 950 | + flags = hard_local_irq_save(); |
---|
946 | 951 | |
---|
947 | 952 | /* |
---|
948 | 953 | * We're coming out of suspend, there's no concurrency yet; don't |
---|
.. | .. |
---|
960 | 965 | per_cpu(cyc2ns.data[1].cyc2ns_offset, cpu) = offset; |
---|
961 | 966 | } |
---|
962 | 967 | |
---|
963 | | - local_irq_restore(flags); |
---|
| 968 | + hard_local_irq_restore(flags); |
---|
964 | 969 | } |
---|
965 | 970 | |
---|
966 | 971 | #ifdef CONFIG_CPU_FREQ |
---|
.. | .. |
---|
1411 | 1416 | if (boot_cpu_has(X86_FEATURE_NONSTOP_TSC_S3)) |
---|
1412 | 1417 | clocksource_tsc.flags |= CLOCK_SOURCE_SUSPEND_NONSTOP; |
---|
1413 | 1418 | |
---|
| 1419 | + clocksource_tsc.vdso_type = CLOCKSOURCE_VDSO_ARCHITECTED; |
---|
| 1420 | + |
---|
1414 | 1421 | /* |
---|
1415 | 1422 | * When TSC frequency is known (retrieved via MSR or CPUID), we skip |
---|
1416 | 1423 | * the refined calibration and directly register it as a clocksource. |
---|