.. | .. |
---|
6271 | 6271 | * reason to cause large interrupt latencies while we do it. |
---|
6272 | 6272 | */ |
---|
6273 | 6273 | if (!mod) |
---|
6274 | | - local_irq_save(flags); |
---|
| 6274 | + flags = hard_local_irq_save(); |
---|
6275 | 6275 | ftrace_update_code(mod, start_pg); |
---|
6276 | 6276 | if (!mod) |
---|
6277 | | - local_irq_restore(flags); |
---|
| 6277 | + hard_local_irq_restore(flags); |
---|
6278 | 6278 | ret = 0; |
---|
6279 | 6279 | out: |
---|
6280 | 6280 | mutex_unlock(&ftrace_lock); |
---|
.. | .. |
---|
6865 | 6865 | unsigned long count, flags; |
---|
6866 | 6866 | int ret; |
---|
6867 | 6867 | |
---|
6868 | | - local_irq_save(flags); |
---|
| 6868 | + flags = hard_local_irq_save(); |
---|
6869 | 6869 | ret = ftrace_dyn_arch_init(); |
---|
6870 | | - local_irq_restore(flags); |
---|
| 6870 | + hard_local_irq_restore(flags); |
---|
6871 | 6871 | if (ret) |
---|
6872 | 6872 | goto failed; |
---|
6873 | 6873 | |
---|
.. | .. |
---|
7022 | 7022 | } |
---|
7023 | 7023 | } while_for_each_ftrace_op(op); |
---|
7024 | 7024 | out: |
---|
7025 | | - preempt_enable_notrace(); |
---|
| 7025 | + if (irqs_pipelined() && (hard_irqs_disabled() || !running_inband())) |
---|
| 7026 | + /* |
---|
| 7027 | + * Nothing urgent to schedule here. At latest the |
---|
| 7028 | + * timer tick will pick up whatever the tracing |
---|
| 7029 | + * functions kicked off. |
---|
| 7030 | + */ |
---|
| 7031 | + preempt_enable_no_resched_notrace(); |
---|
| 7032 | + else |
---|
| 7033 | + preempt_enable_notrace(); |
---|
7026 | 7034 | trace_clear_recursion(bit); |
---|
7027 | 7035 | } |
---|
7028 | 7036 | |
---|