.. | .. |
---|
598 | 598 | unsigned long flags; |
---|
599 | 599 | |
---|
600 | 600 | /* Forced update. Make sure all relevant TIF flags are different */ |
---|
601 | | - local_irq_save(flags); |
---|
| 601 | + flags = hard_local_irq_save(); |
---|
602 | 602 | __speculation_ctrl_update(~tif, tif); |
---|
603 | | - local_irq_restore(flags); |
---|
| 603 | + hard_local_irq_restore(flags); |
---|
604 | 604 | } |
---|
605 | 605 | |
---|
606 | 606 | /* Called from seccomp/prctl update */ |
---|
.. | .. |
---|
700 | 700 | |
---|
701 | 701 | /* |
---|
702 | 702 | * We use this if we don't have any better idle routine.. |
---|
| 703 | + * |
---|
| 704 | + * IRQ pipeline: safe_halt() returns with hard irqs on, caller does |
---|
| 705 | + * not need to force enable. |
---|
703 | 706 | */ |
---|
704 | 707 | void __cpuidle default_idle(void) |
---|
705 | 708 | { |
---|
.. | .. |
---|
722 | 725 | |
---|
723 | 726 | void stop_this_cpu(void *dummy) |
---|
724 | 727 | { |
---|
725 | | - local_irq_disable(); |
---|
| 728 | + hard_local_irq_disable(); |
---|
726 | 729 | /* |
---|
727 | 730 | * Remove this CPU: |
---|
728 | 731 | */ |
---|
.. | .. |
---|
822 | 825 | } |
---|
823 | 826 | |
---|
824 | 827 | __monitor((void *)¤t_thread_info()->flags, 0, 0); |
---|
825 | | - if (!need_resched()) |
---|
| 828 | + if (!need_resched()) { |
---|
826 | 829 | __sti_mwait(0, 0); |
---|
827 | | - else |
---|
| 830 | + } else { |
---|
| 831 | + hard_cond_local_irq_enable(); |
---|
828 | 832 | raw_local_irq_enable(); |
---|
| 833 | + } |
---|
829 | 834 | } else { |
---|
| 835 | + hard_cond_local_irq_enable(); |
---|
830 | 836 | raw_local_irq_enable(); |
---|
831 | 837 | } |
---|
832 | 838 | __current_clr_polling(); |
---|