x86, apic, Fix missing replacement for VECTOR_UNDEFINED
PATCH 1/1 x86, apic, Fix missing replacement for VECTOR_UNDEFINED
linux.git commit 9345005f4eed805308193658d12e4e7e9c261e74 added a definition for VECTOR_UNDEFINED = -1. There is a missing replacement in the io_apic.c file. Found during debugging of another issue.
--- arch/x86/kernel/apic/io_apic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/kernel/apic/io_apic.c +1 -1
@@ -2240,7 +2240,7 @@ asmlinkage void smp_irq_move_cleanup_interrupt(void) apic->send_IPI_self (IRQ_MOVE_CLEANUP_VECTOR ); goto unlock; } -__this_cpu_write (vector_irq[vector],-1 ); +__this_cpu_write (vector_irq[vector],VECTOR_UNDEFINED ); unlock:raw_spin_unlock (&desc->lock); }
Signature · 1 line
1.7.9.3
Quoted 4 lines · Prarit Bhargava
linux.git commit
9345005f4eed805308193658d12e4e7e9c261e74added a definition forVECTOR_UNDEFINED= -1. There is a missing replacement in theio_apic.cfile. Found during debugging of another issue.
Quoted 9 lines
Cc Rui Wang <[email protected]>Cc Michel Lespinasse <[email protected]>Cc Seiji Aguchi <[email protected]>Cc Yang Zhang <[email protected]>Cc Paul Gortmaker <[email protected]>Signed-off-by Prarit Bhargava <[email protected]>
I think it would have been better to define VECTOR_UNDEFINED to be (-1) rather than -1, though, to ensure it can't be used erroneously as an arithmetic operation.
Quoted 16 lines · David Rientjes
Quoted 4 lines · Prarit Bhargava
linux.git commit
9345005f4eed805308193658d12e4e7e9c261e74added a definition forVECTOR_UNDEFINED= -1. There is a missing replacement in theio_apic.cfile. Found during debugging of another issue.Quoted 9 lines
Cc Rui Wang <[email protected]>Cc Michel Lespinasse <[email protected]>Cc Seiji Aguchi <[email protected]>Cc Yang Zhang <[email protected]>Cc Paul Gortmaker <[email protected]>Signed-off-by Prarit Bhargava <[email protected]>
Quoted 5 lines
Acked-by David Rientjes <[email protected]>I think it would have been better to define
VECTOR_UNDEFINEDto be (-1) rather than -1, though, to ensure it can't be used erroneously as an arithmetic operation.
Good point David, I'll push a separate patch for your suggestion. As always, thanks for acking :)
P.