On Tue, Oct 24, 2023 at 02:08:42PM +0200, Jan Beulich wrote: > On 24.10.2023 14:06, Jan Beulich wrote: > > On 24.10.2023 13:36, Roger Pau Monné wrote: > >> What is your reasoning for wanting the smp_processor_id() check in > >> the caller rather than bogus_8259A_irq()? It does seem fine to me to > >> do such check in bogus_8259A_irq(), as whether the IRQ is bogus also > >> depends on whether it fired on the BSP or any of the APs. > > > > bogus_8259A_irq() shouldn't be concerned about the CPU it runs on; it > > should solely deal with 8259A aspects. > > Or to put it differently: The function is supposed to tell whether an > IRQ is bogus from the pov of the PIC. The caller decides under what > conditions to actually invoke this checking.
I understand that the PIC itself is agnostic as to which the CPU the irq (vector) has been injected, but the added CPU vendor checks are there to deal with possibly a bogus PIC implementation, and hence doesn't feel that off place IMO. Anyway, will adjust as requested, albeit I think it hampers readability and that's more valuable than whether the check is contextually better fit in do_IRQ() or bogus_8259A_irq(). Thanks, Roger.
