Fix P49 irq-affinity-logging patch line numbers and struct placement

The original P49 patch had incorrect line numbers that caused
patch --fuzz=3 to insert cpu_id field and methods at wrong locations,
corrupting irq_helpers.rs. Regenerate from clean P0-P48 baseline.
This commit is contained in:
2026-05-20 23:25:51 +03:00
parent 95bbc56f97
commit 7c03b6dcc6
@@ -1,16 +1,14 @@
diff --git a/drivers/pcid/src/driver_interface/irq_helpers.rs b/drivers/pcid/src/driver_interface/irq_helpers.rs
index 28ca077a..dadf6192 100644
index f62cc055..8bfbc604 100644
--- a/drivers/pcid/src/driver_interface/irq_helpers.rs
+++ b/drivers/pcid/src/driver_interface/irq_helpers.rs
@@ -233,0 +234 @@ pub struct InterruptVector {
@@ -266,0 +267 @@ pub struct InterruptVector {
+ cpu_id: usize,
@@ -251,0 +253,4 @@ impl InterruptVector {
@@ -284,0 +286,18 @@ impl InterruptVector {
+ pub fn cpu_id(&self) -> usize {
+ self.cpu_id
+ }
+
@@ -260,0 +266,14 @@ impl InterruptVector {
+
+ /// Log the IRQ affinity for this vector.
+ pub fn log_affinity(&self, driver: &str) {
+ let kind_str = match self.kind {
@@ -24,23 +22,24 @@ index 28ca077a..dadf6192 100644
+ self.vector
+ );
+ }
@@ -294,0 +314 @@ pub fn pci_allocate_interrupt_vector(
+ log::info!("{driver}: allocated MSI-X interrupt on CPU {bsp_cpu_id}");
@@ -297,0 +318 @@ pub fn pci_allocate_interrupt_vector(
+ cpu_id: bsp_cpu_id,
@@ -300,0 +322,3 @@ pub fn pci_allocate_interrupt_vector(
+ let bsp_cpu_id = read_bsp_apic_id()
+ .unwrap_or_else(|err| panic!("{driver}: failed to read BSP APIC ID: {err}"));
+ log::info!("{driver}: allocated MSI interrupt on CPU {bsp_cpu_id}");
@@ -303,0 +328 @@ pub fn pci_allocate_interrupt_vector(
+ cpu_id: bsp_cpu_id,
@@ -307,0 +333,2 @@ pub fn pci_allocate_interrupt_vector(
+
@@ -331,0 +351 @@ pub fn pci_allocate_interrupt_vector(
+ log::info!("{driver}: allocated MSI-X interrupt on CPU {bsp_cpu_id}");
@@ -339,0 +360 @@ pub fn pci_allocate_interrupt_vector(
+ cpu_id: bsp_cpu_id,
@@ -348,0 +370,3 @@ pub fn pci_allocate_interrupt_vector(
+ let bsp_cpu_id = read_bsp_apic_id()
+ .unwrap_or_else(|err| panic!("{driver}: failed to read BSP APIC ID: {err}"));
+ log::info!("{driver}: allocated MSI interrupt on CPU {bsp_cpu_id}");
@@ -351,0 +376 @@ pub fn pci_allocate_interrupt_vector(
+ cpu_id: bsp_cpu_id,
@@ -359,0 +385,2 @@ pub fn pci_allocate_interrupt_vector(
+ let bsp_cpu_id = read_bsp_apic_id().unwrap_or(0);
+ log::info!("{driver}: allocated legacy INTx interrupt on CPU {bsp_cpu_id}");
@@ -310,0 +338 @@ pub fn pci_allocate_interrupt_vector(
@@ -362,0 +390 @@ pub fn pci_allocate_interrupt_vector(
+ cpu_id: bsp_cpu_id,
@@ -325,0 +354,2 @@ pub fn pci_allocate_interrupt_vector(
@@ -378,0 +407,2 @@ pub fn pci_allocate_interrupt_vector(
+ let bsp_cpu_id = read_bsp_apic_id().unwrap_or(0);
+ log::info!("{driver}: allocated legacy INTx interrupt on CPU {bsp_cpu_id}");
@@ -328,0 +359 @@ pub fn pci_allocate_interrupt_vector(
@@ -381,0 +412 @@ pub fn pci_allocate_interrupt_vector(
+ cpu_id: bsp_cpu_id,