Reverts r234074,234105,234564,234723,234989,235231-235232 and part of
r234247. Use, instead, the static intializer introduced in r239923 for x86 and sparc64 intr_cpus, unwinding the code to the initial version. Reviewed by: marius
This commit is contained in:
parent
a10cee30c9
commit
af2bdacafb
@ -298,11 +298,6 @@ cpu_startup(dummy)
|
||||
vm_pager_bufferinit();
|
||||
|
||||
cpu_setregs();
|
||||
|
||||
/*
|
||||
* Add BSP as an interrupt target.
|
||||
*/
|
||||
intr_add_cpu(0);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -784,6 +784,8 @@ init_secondary(void)
|
||||
* We tell the I/O APIC code about all the CPUs we want to receive
|
||||
* interrupts. If we don't want certain CPUs to receive IRQs we
|
||||
* can simply not tell the I/O APIC code about them in this function.
|
||||
* We also do not tell it about the BSP since it tells itself about
|
||||
* the BSP internally to work with UP kernels and on UP machines.
|
||||
*/
|
||||
static void
|
||||
set_interrupt_apic_ids(void)
|
||||
@ -794,6 +796,8 @@ set_interrupt_apic_ids(void)
|
||||
apic_id = cpu_apic_ids[i];
|
||||
if (apic_id == -1)
|
||||
continue;
|
||||
if (cpu_info[apic_id].cpu_bsp)
|
||||
continue;
|
||||
if (cpu_info[apic_id].cpu_disabled)
|
||||
continue;
|
||||
|
||||
|
@ -140,7 +140,9 @@ int elcr_probe(void);
|
||||
enum intr_trigger elcr_read_trigger(u_int irq);
|
||||
void elcr_resume(void);
|
||||
void elcr_write_trigger(u_int irq, enum intr_trigger trigger);
|
||||
#ifdef SMP
|
||||
void intr_add_cpu(u_int cpu);
|
||||
#endif
|
||||
int intr_add_handler(const char *name, int vector, driver_filter_t filter,
|
||||
driver_intr_t handler, void *arg, enum intr_type flags,
|
||||
void **cookiep);
|
||||
|
@ -338,11 +338,6 @@ cpu_startup(dummy)
|
||||
#ifndef XEN
|
||||
cpu_setregs();
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Add BSP as an interrupt target.
|
||||
*/
|
||||
intr_add_cpu(0);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -823,6 +823,8 @@ init_secondary(void)
|
||||
* We tell the I/O APIC code about all the CPUs we want to receive
|
||||
* interrupts. If we don't want certain CPUs to receive IRQs we
|
||||
* can simply not tell the I/O APIC code about them in this function.
|
||||
* We also do not tell it about the BSP since it tells itself about
|
||||
* the BSP internally to work with UP kernels and on UP machines.
|
||||
*/
|
||||
static void
|
||||
set_interrupt_apic_ids(void)
|
||||
@ -833,6 +835,8 @@ set_interrupt_apic_ids(void)
|
||||
apic_id = cpu_apic_ids[i];
|
||||
if (apic_id == -1)
|
||||
continue;
|
||||
if (cpu_info[apic_id].cpu_bsp)
|
||||
continue;
|
||||
if (cpu_info[apic_id].cpu_disabled)
|
||||
continue;
|
||||
|
||||
|
@ -131,7 +131,9 @@ int elcr_probe(void);
|
||||
enum intr_trigger elcr_read_trigger(u_int irq);
|
||||
void elcr_resume(void);
|
||||
void elcr_write_trigger(u_int irq, enum intr_trigger trigger);
|
||||
#ifdef SMP
|
||||
void intr_add_cpu(u_int cpu);
|
||||
#endif
|
||||
int intr_add_handler(const char *name, int vector, driver_filter_t filter,
|
||||
driver_intr_t handler, void *arg, enum intr_type flags, void **cookiep);
|
||||
#ifdef SMP
|
||||
|
@ -273,11 +273,6 @@ cpu_startup(dummy)
|
||||
bufinit();
|
||||
vm_pager_bufferinit();
|
||||
cpu_setregs();
|
||||
|
||||
/*
|
||||
* Add BSP as an interrupt target.
|
||||
*/
|
||||
intr_add_cpu(0);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -91,10 +91,10 @@ struct intr_vector {
|
||||
extern ih_func_t *intr_handlers[];
|
||||
extern struct intr_vector intr_vectors[];
|
||||
|
||||
void intr_add_cpu(u_int cpu);
|
||||
#ifdef SMP
|
||||
int intr_bind(int vec, u_char cpu);
|
||||
void intr_add_cpu(u_int cpu);
|
||||
#endif
|
||||
int intr_bind(int vec, u_char cpu);
|
||||
int intr_describe(int vec, void *ih, const char *descr);
|
||||
void intr_setup(int level, ih_func_t *ihf, int pri, iv_func_t *ivf,
|
||||
void *iva);
|
||||
|
@ -456,7 +456,7 @@ intr_describe(int vec, void *ih, const char *descr)
|
||||
* allocate CPUs round-robin.
|
||||
*/
|
||||
|
||||
static cpuset_t intr_cpus;
|
||||
static cpuset_t intr_cpus = CPUSET_T_INITIALIZER(0x1);
|
||||
static int current_cpu;
|
||||
|
||||
static void
|
||||
@ -554,11 +554,4 @@ intr_shuffle_irqs(void *arg __unused)
|
||||
}
|
||||
SYSINIT(intr_shuffle_irqs, SI_SUB_SMP, SI_ORDER_SECOND, intr_shuffle_irqs,
|
||||
NULL);
|
||||
#else /* !SMP */
|
||||
/* Use an empty stub for compatibility. */
|
||||
void
|
||||
intr_add_cpu(u_int cpu __unused)
|
||||
{
|
||||
|
||||
}
|
||||
#endif
|
||||
|
@ -196,11 +196,6 @@ cpu_startup(void *arg)
|
||||
printf("machine: %s\n", sparc64_model);
|
||||
|
||||
cpu_identify(rdpr(ver), PCPU_GET(clock), curcpu);
|
||||
|
||||
/*
|
||||
* Add BSP as an interrupt target.
|
||||
*/
|
||||
intr_add_cpu(0);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -452,7 +452,7 @@ DB_SHOW_COMMAND(irqs, db_show_irqs)
|
||||
* allocate CPUs round-robin.
|
||||
*/
|
||||
|
||||
static cpuset_t intr_cpus;
|
||||
static cpuset_t intr_cpus = CPUSET_T_INITIALIZER(0x1);
|
||||
static int current_cpu;
|
||||
|
||||
/*
|
||||
@ -565,11 +565,4 @@ intr_next_cpu(void)
|
||||
|
||||
return (PCPU_GET(apic_id));
|
||||
}
|
||||
|
||||
/* Use an empty stub for compatibility. */
|
||||
void
|
||||
intr_add_cpu(u_int cpu __unused)
|
||||
{
|
||||
|
||||
}
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user