svn commit: r235260 - in stable/9/sys: amd64/amd64 amd64/include
i386/conf i386/i386 i386/include kern pc98/pc98
sparc64/include sparc64/sparc64 x86/x86
Attilio Rao
attilio at FreeBSD.org
Fri May 11 04:10:24 UTC 2012
Author: attilio
Date: Fri May 11 04:10:23 2012
New Revision: 235260
URL: http://svn.freebsd.org/changeset/base/235260
Log:
MFC r233961,234074,234105,234564,234723,234989,235231-235232:
- Fix a bug in x86 and sparc64 where the intr cpu mask does only
enables the BSP.
- Remove the SMP constraints for intr_add_cpu
Modified:
stable/9/sys/amd64/amd64/machdep.c
stable/9/sys/amd64/amd64/mp_machdep.c
stable/9/sys/amd64/include/intr_machdep.h
stable/9/sys/i386/i386/machdep.c
stable/9/sys/i386/i386/mp_machdep.c
stable/9/sys/i386/include/intr_machdep.h
stable/9/sys/pc98/pc98/machdep.c
stable/9/sys/sparc64/include/intr_machdep.h
stable/9/sys/sparc64/sparc64/intr_machdep.c
stable/9/sys/sparc64/sparc64/machdep.c
stable/9/sys/x86/x86/intr_machdep.c
Directory Properties:
stable/9/sys/ (props changed)
stable/9/sys/amd64/include/xen/ (props changed)
stable/9/sys/boot/ (props changed)
stable/9/sys/boot/i386/efi/ (props changed)
stable/9/sys/boot/ia64/efi/ (props changed)
stable/9/sys/boot/ia64/ski/ (props changed)
stable/9/sys/boot/powerpc/boot1.chrp/ (props changed)
stable/9/sys/boot/powerpc/ofw/ (props changed)
stable/9/sys/cddl/contrib/opensolaris/ (props changed)
stable/9/sys/conf/ (props changed)
stable/9/sys/contrib/dev/acpica/ (props changed)
stable/9/sys/contrib/octeon-sdk/ (props changed)
stable/9/sys/contrib/pf/ (props changed)
stable/9/sys/contrib/x86emu/ (props changed)
stable/9/sys/fs/ (props changed)
stable/9/sys/fs/ntfs/ (props changed)
stable/9/sys/i386/conf/XENHVM (props changed)
stable/9/sys/kern/subr_witness.c (props changed)
Modified: stable/9/sys/amd64/amd64/machdep.c
==============================================================================
--- stable/9/sys/amd64/amd64/machdep.c Fri May 11 04:02:37 2012 (r235259)
+++ stable/9/sys/amd64/amd64/machdep.c Fri May 11 04:10:23 2012 (r235260)
@@ -295,6 +295,11 @@ cpu_startup(dummy)
vm_pager_bufferinit();
cpu_setregs();
+
+ /*
+ * Add BSP as an interrupt target.
+ */
+ intr_add_cpu(0);
}
/*
Modified: stable/9/sys/amd64/amd64/mp_machdep.c
==============================================================================
--- stable/9/sys/amd64/amd64/mp_machdep.c Fri May 11 04:02:37 2012 (r235259)
+++ stable/9/sys/amd64/amd64/mp_machdep.c Fri May 11 04:10:23 2012 (r235260)
@@ -785,8 +785,6 @@ 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)
@@ -797,8 +795,6 @@ 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;
Modified: stable/9/sys/amd64/include/intr_machdep.h
==============================================================================
--- stable/9/sys/amd64/include/intr_machdep.h Fri May 11 04:02:37 2012 (r235259)
+++ stable/9/sys/amd64/include/intr_machdep.h Fri May 11 04:10:23 2012 (r235260)
@@ -140,9 +140,7 @@ 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);
Modified: stable/9/sys/i386/i386/machdep.c
==============================================================================
--- stable/9/sys/i386/i386/machdep.c Fri May 11 04:02:37 2012 (r235259)
+++ stable/9/sys/i386/i386/machdep.c Fri May 11 04:10:23 2012 (r235260)
@@ -336,6 +336,11 @@ cpu_startup(dummy)
#ifndef XEN
cpu_setregs();
#endif
+
+ /*
+ * Add BSP as an interrupt target.
+ */
+ intr_add_cpu(0);
}
/*
Modified: stable/9/sys/i386/i386/mp_machdep.c
==============================================================================
--- stable/9/sys/i386/i386/mp_machdep.c Fri May 11 04:02:37 2012 (r235259)
+++ stable/9/sys/i386/i386/mp_machdep.c Fri May 11 04:10:23 2012 (r235260)
@@ -822,8 +822,6 @@ 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)
@@ -834,8 +832,6 @@ 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;
Modified: stable/9/sys/i386/include/intr_machdep.h
==============================================================================
--- stable/9/sys/i386/include/intr_machdep.h Fri May 11 04:02:37 2012 (r235259)
+++ stable/9/sys/i386/include/intr_machdep.h Fri May 11 04:10:23 2012 (r235260)
@@ -131,9 +131,7 @@ 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
Modified: stable/9/sys/pc98/pc98/machdep.c
==============================================================================
--- stable/9/sys/pc98/pc98/machdep.c Fri May 11 04:02:37 2012 (r235259)
+++ stable/9/sys/pc98/pc98/machdep.c Fri May 11 04:10:23 2012 (r235260)
@@ -271,6 +271,11 @@ cpu_startup(dummy)
bufinit();
vm_pager_bufferinit();
cpu_setregs();
+
+ /*
+ * Add BSP as an interrupt target.
+ */
+ intr_add_cpu(0);
}
/*
Modified: stable/9/sys/sparc64/include/intr_machdep.h
==============================================================================
--- stable/9/sys/sparc64/include/intr_machdep.h Fri May 11 04:02:37 2012 (r235259)
+++ stable/9/sys/sparc64/include/intr_machdep.h Fri May 11 04:10:23 2012 (r235260)
@@ -91,10 +91,10 @@ struct intr_vector {
extern ih_func_t *intr_handlers[];
extern struct intr_vector intr_vectors[];
-#ifdef SMP
void intr_add_cpu(u_int cpu);
-#endif
+#ifdef SMP
int intr_bind(int vec, u_char cpu);
+#endif
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);
Modified: stable/9/sys/sparc64/sparc64/intr_machdep.c
==============================================================================
--- stable/9/sys/sparc64/sparc64/intr_machdep.c Fri May 11 04:02:37 2012 (r235259)
+++ stable/9/sys/sparc64/sparc64/intr_machdep.c Fri May 11 04:10:23 2012 (r235260)
@@ -554,4 +554,11 @@ 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
Modified: stable/9/sys/sparc64/sparc64/machdep.c
==============================================================================
--- stable/9/sys/sparc64/sparc64/machdep.c Fri May 11 04:02:37 2012 (r235259)
+++ stable/9/sys/sparc64/sparc64/machdep.c Fri May 11 04:10:23 2012 (r235260)
@@ -197,12 +197,10 @@ cpu_startup(void *arg)
cpu_identify(rdpr(ver), PCPU_GET(clock), curcpu);
-#ifdef SMP
/*
* Add BSP as an interrupt target.
*/
intr_add_cpu(0);
-#endif
}
void
Modified: stable/9/sys/x86/x86/intr_machdep.c
==============================================================================
--- stable/9/sys/x86/x86/intr_machdep.c Fri May 11 04:02:37 2012 (r235259)
+++ stable/9/sys/x86/x86/intr_machdep.c Fri May 11 04:10:23 2012 (r235260)
@@ -525,9 +525,6 @@ intr_shuffle_irqs(void *arg __unused)
return;
#endif
- /* The BSP is always a valid target. */
- CPU_SETOF(0, &intr_cpus);
-
/* Don't bother on UP. */
if (mp_ncpus == 1)
return;
@@ -568,4 +565,11 @@ intr_next_cpu(void)
return (PCPU_GET(apic_id));
}
+
+/* Use an empty stub for compatibility. */
+void
+intr_add_cpu(u_int cpu __unused)
+{
+
+}
#endif
More information about the svn-src-stable-9
mailing list