Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'irq-core-2026-04-12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull core irq updates from Thomas Gleixner:

- Invoke add_interrupt_randomness() in handle_percpu_devid_irq() and
cleanup the workaround in the Hyper-V driver, which would now invoke
it twice on ARM64. Removing it from the driver requires to add it to
the x86 system vector entry point

- Remove the pointles cpu_read_lock() around reading CPU possible mask,
which is read only after init

- Add documentation for the interaction between device tree bindings
and the interrupt type defines in irq.h

- Delete stale defines in the matrix allocator and the equivalent in
loongarch

* tag 'irq-core-2026-04-12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
Drivers: hv: Move add_interrupt_randomness() to hypervisor callback sysvec
genirq/chip: Invoke add_interrupt_randomness() in handle_percpu_devid_irq()
genirq/affinity: Remove cpus_read_lock() while reading cpu_possible_mask
genirq/matrix, LoongArch: Delete IRQ_MATRIX_BITS leftovers
genirq: Document interaction between <linux/irq.h> and DT binding defines

+12 -13
-1
arch/loongarch/include/asm/irq.h
··· 48 48 */ 49 49 #define NR_VECTORS 256 50 50 #define NR_LEGACY_VECTORS 16 51 - #define IRQ_MATRIX_BITS NR_VECTORS 52 51 53 52 #define AVEC_IRQ_SHIFT 4 54 53 #define AVEC_IRQ_BIT 8
+2
arch/x86/kernel/cpu/mshyperv.c
··· 161 161 if (vmbus_handler) 162 162 vmbus_handler(); 163 163 164 + add_interrupt_randomness(HYPERVISOR_CALLBACK_VECTOR); 165 + 164 166 if (ms_hyperv.hints & HV_DEPRECATING_AEOI_RECOMMENDED) 165 167 apic_eoi(); 166 168
-3
drivers/hv/mshv_synic.c
··· 12 12 #include <linux/mm.h> 13 13 #include <linux/interrupt.h> 14 14 #include <linux/io.h> 15 - #include <linux/random.h> 16 15 #include <linux/cpuhotplug.h> 17 16 #include <linux/reboot.h> 18 17 #include <asm/mshyperv.h> ··· 444 445 mb(); 445 446 if (msg->header.message_flags.msg_pending) 446 447 hv_set_non_nested_msr(HV_MSR_EOM, 0); 447 - 448 - add_interrupt_randomness(mshv_sint_vector); 449 448 } else { 450 449 pr_warn_once("%s: unknown message type 0x%x\n", __func__, 451 450 msg->header.message_type);
-3
drivers/hv/vmbus_drv.c
··· 32 32 #include <linux/ptrace.h> 33 33 #include <linux/sysfb.h> 34 34 #include <linux/efi.h> 35 - #include <linux/random.h> 36 35 #include <linux/kernel.h> 37 36 #include <linux/syscore_ops.h> 38 37 #include <linux/dma-map-ops.h> ··· 1360 1361 1361 1362 vmbus_message_sched(hv_cpu, hv_cpu->hyp_synic_message_page); 1362 1363 vmbus_message_sched(hv_cpu, hv_cpu->para_synic_message_page); 1363 - 1364 - add_interrupt_randomness(vmbus_interrupt); 1365 1364 } 1366 1365 1367 1366 static DEFINE_PER_CPU(bool, vmbus_irq_pending);
+4
include/linux/irq.h
··· 35 35 * 36 36 * Bits 0-7 are the same as the IRQF_* bits in linux/interrupt.h 37 37 * 38 + * Note that the first 6 definitions are shadowed by C preprocessor definitions 39 + * in include/dt-bindings/interrupt-controller/irq.h. This is not an issue, as 40 + * the actual values must be the same, due to being part of the stable DT ABI. 41 + * 38 42 * IRQ_TYPE_NONE - default, unspecified type 39 43 * IRQ_TYPE_EDGE_RISING - rising edge triggered 40 44 * IRQ_TYPE_EDGE_FALLING - falling edge triggered
+2 -5
kernel/irq/affinity.c
··· 115 115 if (resv > minvec) 116 116 return 0; 117 117 118 - if (affd->calc_sets) { 118 + if (affd->calc_sets) 119 119 set_vecs = maxvec - resv; 120 - } else { 121 - cpus_read_lock(); 120 + else 122 121 set_vecs = cpumask_weight(cpu_possible_mask); 123 - cpus_read_unlock(); 124 - } 125 122 126 123 return resv + min(set_vecs, maxvec - resv); 127 124 }
+3
kernel/irq/chip.c
··· 14 14 #include <linux/interrupt.h> 15 15 #include <linux/kernel_stat.h> 16 16 #include <linux/irqdomain.h> 17 + #include <linux/random.h> 17 18 18 19 #include <trace/events/irq.h> 19 20 ··· 929 928 pr_err_once("Spurious%s percpu IRQ%u on CPU%u\n", 930 929 enabled ? " and unmasked" : "", irq, cpu); 931 930 } 931 + 932 + add_interrupt_randomness(irq); 932 933 933 934 if (chip->irq_eoi) 934 935 chip->irq_eoi(&desc->irq_data);
+1 -1
kernel/irq/matrix.c
··· 39 39 40 40 /** 41 41 * irq_alloc_matrix - Allocate a irq_matrix structure and initialize it 42 - * @matrix_bits: Number of matrix bits must be <= IRQ_MATRIX_BITS 42 + * @matrix_bits: Number of matrix bits 43 43 * @alloc_start: From which bit the allocation search starts 44 44 * @alloc_end: At which bit the allocation search ends, i.e first 45 45 * invalid bit