.. | .. |
---|
8 | 8 | #include <linux/list.h> |
---|
9 | 9 | #include <linux/stringify.h> |
---|
10 | 10 | #include <linux/highmem.h> |
---|
| 11 | +#include <linux/irq_pipeline.h> |
---|
11 | 12 | #include <linux/mm.h> |
---|
12 | 13 | #include <linux/vmalloc.h> |
---|
13 | 14 | #include <linux/memory.h> |
---|
.. | .. |
---|
366 | 367 | if (nnops <= 1) |
---|
367 | 368 | return nnops; |
---|
368 | 369 | |
---|
369 | | - local_irq_save(flags); |
---|
| 370 | + flags = hard_local_irq_save(); |
---|
370 | 371 | add_nops(instr + off, nnops); |
---|
371 | | - local_irq_restore(flags); |
---|
| 372 | + hard_local_irq_restore(flags); |
---|
372 | 373 | |
---|
373 | 374 | DUMP_BYTES(instr, instrlen, "%px: [%d:%d) optimized NOPs: ", instr, off, i); |
---|
374 | 375 | |
---|
.. | .. |
---|
1065 | 1066 | */ |
---|
1066 | 1067 | memcpy(addr, opcode, len); |
---|
1067 | 1068 | } else { |
---|
1068 | | - local_irq_save(flags); |
---|
| 1069 | + flags = hard_local_irq_save(); |
---|
1069 | 1070 | memcpy(addr, opcode, len); |
---|
1070 | | - local_irq_restore(flags); |
---|
| 1071 | + hard_local_irq_restore(flags); |
---|
1071 | 1072 | sync_core(); |
---|
1072 | 1073 | |
---|
1073 | 1074 | /* |
---|
.. | .. |
---|
1099 | 1100 | temp_mm_state_t temp_state; |
---|
1100 | 1101 | |
---|
1101 | 1102 | lockdep_assert_irqs_disabled(); |
---|
| 1103 | + WARN_ON_ONCE(irq_pipeline_debug() && !hard_irqs_disabled()); |
---|
1102 | 1104 | |
---|
1103 | 1105 | /* |
---|
1104 | 1106 | * Make sure not to be in TLB lazy mode, as otherwise we'll end up |
---|
.. | .. |
---|
1192 | 1194 | */ |
---|
1193 | 1195 | VM_BUG_ON(!ptep); |
---|
1194 | 1196 | |
---|
1195 | | - local_irq_save(flags); |
---|
| 1197 | + local_irq_save_full(flags); |
---|
1196 | 1198 | |
---|
1197 | 1199 | pte = mk_pte(pages[0], pgprot); |
---|
1198 | 1200 | set_pte_at(poking_mm, poking_addr, ptep, pte); |
---|
.. | .. |
---|
1243 | 1245 | */ |
---|
1244 | 1246 | BUG_ON(memcmp(addr, opcode, len)); |
---|
1245 | 1247 | |
---|
1246 | | - local_irq_restore(flags); |
---|
| 1248 | + local_irq_restore_full(flags); |
---|
1247 | 1249 | pte_unmap_unlock(ptep, ptl); |
---|
1248 | 1250 | return addr; |
---|
1249 | 1251 | } |
---|