Fix kernels compiled without SMP support. Make intr_next_cpu() available
for UP kernels but as a stub that always returns the single CPU's local APIC ID. Reported by: kib
This commit is contained in:
parent
2749b67262
commit
4e9dba6322
@ -518,4 +518,14 @@ intr_shuffle_irqs(void *arg __unused)
|
||||
}
|
||||
SYSINIT(intr_shuffle_irqs, SI_SUB_SMP, SI_ORDER_SECOND, intr_shuffle_irqs,
|
||||
NULL);
|
||||
#else
|
||||
/*
|
||||
* Always route interrupts to the current processor in the UP case.
|
||||
*/
|
||||
u_int
|
||||
intr_next_cpu(void)
|
||||
{
|
||||
|
||||
return (PCPU_GET(apic_id));
|
||||
}
|
||||
#endif
|
||||
|
@ -152,9 +152,7 @@ int intr_bind(u_int vector, u_char cpu);
|
||||
int intr_config_intr(int vector, enum intr_trigger trig,
|
||||
enum intr_polarity pol);
|
||||
void intr_execute_handlers(struct intsrc *isrc, struct trapframe *frame);
|
||||
#ifdef SMP
|
||||
u_int intr_next_cpu(void);
|
||||
#endif
|
||||
struct intsrc *intr_lookup_source(int vector);
|
||||
int intr_register_pic(struct pic *pic);
|
||||
int intr_register_source(struct intsrc *isrc);
|
||||
|
@ -491,4 +491,14 @@ intr_shuffle_irqs(void *arg __unused)
|
||||
}
|
||||
SYSINIT(intr_shuffle_irqs, SI_SUB_SMP, SI_ORDER_SECOND, intr_shuffle_irqs,
|
||||
NULL);
|
||||
#else
|
||||
/*
|
||||
* Always route interrupts to the current processor in the UP case.
|
||||
*/
|
||||
u_int
|
||||
intr_next_cpu(void)
|
||||
{
|
||||
|
||||
return (PCPU_GET(apic_id));
|
||||
}
|
||||
#endif
|
||||
|
@ -139,9 +139,7 @@ int intr_bind(u_int vector, u_char cpu);
|
||||
int intr_config_intr(int vector, enum intr_trigger trig,
|
||||
enum intr_polarity pol);
|
||||
void intr_execute_handlers(struct intsrc *isrc, struct trapframe *frame);
|
||||
#ifdef SMP
|
||||
u_int intr_next_cpu(void);
|
||||
#endif
|
||||
struct intsrc *intr_lookup_source(int vector);
|
||||
int intr_register_pic(struct pic *pic);
|
||||
int intr_register_source(struct intsrc *isrc);
|
||||
|
Loading…
Reference in New Issue
Block a user