@@ -215,6 +215,88 @@ CONFIG_TASK_XACCT=n
215215CONFIG_TIMERLAT_TRACER=n
216216CONFIG_TRACING=n
217217```
218+ ---
219+
220+ ** Pi 3 / Zero 2W - Additional Step**
221+ This chipset needs an additional change to reduce interrupts when checking with cat /proc/interrupts.
222+
223+ Changes based on kernel 6.18 - Should be similar on others.
224+ Just replace the functions
225+
226+ drivers/irqchip/irq-bcm2835.c
227+
228+ ```
229+ void bcm2836_arm_irqchip_spin_gpu_irq(void);
230+
231+ static void armctrl_ack_irq(struct irq_data *d)
232+ {
233+ /* GPU IRQ rotation is now handled in bcm2836_chained_handle_irq */
234+ }
235+
236+ -----------------------------------------------------------------------
237+
238+ static void bcm2836_chained_handle_irq(struct irq_desc *desc)
239+ {
240+ u32 hwirq;
241+
242+ hwirq = get_next_armctrl_hwirq();
243+ if (hwirq != ~0) {
244+ generic_handle_domain_irq(intc.domain, hwirq);
245+ #if defined(CONFIG_SMP)
246+ bcm2836_arm_irqchip_spin_gpu_irq();
247+ #endif
248+ }
249+ }
250+
251+ ```
252+
253+ <br >
254+ drivers/irqchip/irq-bcm2836.c
255+ <br ><br >
256+
257+ ```
258+
259+ void bcm2836_arm_irqchip_spin_gpu_irq(void)
260+ {
261+ static const u32 gpu_irq_cpus[] = { 0, 1 };
262+ static u32 rr_cpu;
263+ static DEFINE_RAW_SPINLOCK(gpu_route_lock);
264+ unsigned long flags;
265+ u32 tries;
266+ u32 next;
267+ u32 fiq_bits;
268+ void __iomem *gpurouting = intc.base + LOCAL_GPU_ROUTING;
269+ u32 routing_val;
270+
271+ raw_spin_lock_irqsave(&gpu_route_lock, flags);
272+
273+ routing_val = readl(gpurouting);
274+ fiq_bits = routing_val & ~0x3;
275+
276+ /* Keep GPU IRQs on cores 0/1 so cores 2/3 stay free. */
277+ for (tries = 0; tries < 2; tries++) {
278+ next = gpu_irq_cpus[rr_cpu];
279+ rr_cpu = (rr_cpu + 1) % 2;
280+
281+ if (cpu_online(next)) {
282+ writel(fiq_bits | next, gpurouting);
283+
284+ /* Flush posted write so next IRQ sees the new route */
285+ readl(gpurouting);
286+
287+ raw_spin_unlock_irqrestore(&gpu_route_lock, flags);
288+ return;
289+ }
290+ }
291+
292+ writel(fiq_bits | 0, gpurouting);
293+ readl(gpurouting);
294+ raw_spin_unlock_irqrestore(&gpu_route_lock, flags);
295+ }
296+
297+ ```
298+
299+ ---
218300
219301
220302```
0 commit comments