hc
2024-09-20 cf4ce59b3b70238352c7f1729f0f7223214828ad
kernel/kernel/irq/handle.c
....@@ -145,11 +145,18 @@
145145 for_each_action_of_desc(desc, action) {
146146 irqreturn_t res;
147147
148
+ /*
149
+ * If this IRQ would be threaded under force_irqthreads, mark it so.
150
+ */
151
+ if (irq_settings_can_thread(desc) &&
152
+ !(action->flags & (IRQF_NO_THREAD | IRQF_PERCPU | IRQF_ONESHOT)))
153
+ lockdep_hardirq_threaded();
154
+
148155 trace_irq_handler_entry(irq, action);
149156 res = action->handler(irq, action->dev_id);
150157 trace_irq_handler_exit(irq, action, res);
151158
152
- if (WARN_ONCE(!irqs_disabled(),"irq %u handler %pF enabled interrupts\n",
159
+ if (WARN_ONCE(!irqs_disabled(),"irq %u handler %pS enabled interrupts\n",
153160 irq, action->handler))
154161 local_irq_disable();
155162
....@@ -166,7 +173,7 @@
166173
167174 __irq_wake_thread(desc, action);
168175
169
- /* Fall through to add to randomness */
176
+ fallthrough; /* to add to randomness */
170177 case IRQ_HANDLED:
171178 *flags |= action->flags;
172179 break;
....@@ -185,16 +192,10 @@
185192 {
186193 irqreturn_t retval;
187194 unsigned int flags = 0;
188
- struct pt_regs *regs = get_irq_regs();
189
- u64 ip = regs ? instruction_pointer(regs) : 0;
190195
191196 retval = __handle_irq_event_percpu(desc, &flags);
192197
193
-#ifdef CONFIG_PREEMPT_RT_FULL
194
- desc->random_ip = ip;
195
-#else
196
- add_interrupt_randomness(desc->irq_data.irq, flags, ip);
197
-#endif
198
+ add_interrupt_randomness(desc->irq_data.irq);
198199
199200 if (!noirqdebug)
200201 note_interrupt(desc, retval);