diff --git a/sys/amd64/amd64/mp_machdep.c b/sys/amd64/amd64/mp_machdep.c index 2de63e3649d6..7996a901a5ba 100644 --- a/sys/amd64/amd64/mp_machdep.c +++ b/sys/amd64/amd64/mp_machdep.c @@ -1012,21 +1012,6 @@ ipi_selected(u_int32_t cpus, u_int ipi) } -/* - * send an IPI INTerrupt containing 'vector' to all CPUs, including myself - */ -void -ipi_all(u_int ipi) -{ - - if (IPI_IS_BITMAPED(ipi) || (ipi == IPI_STOP && stop_cpus_with_nmi)) { - ipi_selected(all_cpus, ipi); - return; - } - CTR2(KTR_SMP, "%s: ipi: %x", __func__, ipi); - lapic_ipi_vectored(ipi, APIC_IPI_DEST_ALL); -} - /* * send an IPI to all CPUs EXCEPT myself */ @@ -1042,21 +1027,6 @@ ipi_all_but_self(u_int ipi) lapic_ipi_vectored(ipi, APIC_IPI_DEST_OTHERS); } -/* - * send an IPI to myself - */ -void -ipi_self(u_int ipi) -{ - - if (IPI_IS_BITMAPED(ipi) || (ipi == IPI_STOP && stop_cpus_with_nmi)) { - ipi_selected(PCPU_GET(cpumask), ipi); - return; - } - CTR2(KTR_SMP, "%s: ipi: %x", __func__, ipi); - lapic_ipi_vectored(ipi, APIC_IPI_DEST_SELF); -} - #ifdef STOP_NMI /* * send NMI IPI to selected CPUs diff --git a/sys/amd64/include/smp.h b/sys/amd64/include/smp.h index f961d6baa509..06222f8a9e9a 100644 --- a/sys/amd64/include/smp.h +++ b/sys/amd64/include/smp.h @@ -55,9 +55,7 @@ void cpu_add(u_int apic_id, char boot_cpu); void cpustop_handler(void); void init_secondary(void); void ipi_selected(u_int cpus, u_int ipi); -void ipi_all(u_int ipi); void ipi_all_but_self(u_int ipi); -void ipi_self(u_int ipi); void ipi_bitmap_handler(struct trapframe frame); u_int mp_bootaddress(u_int); int mp_grab_cpu_hlt(void); diff --git a/sys/i386/i386/mp_machdep.c b/sys/i386/i386/mp_machdep.c index 5c80cfb32d6a..4488915cba91 100644 --- a/sys/i386/i386/mp_machdep.c +++ b/sys/i386/i386/mp_machdep.c @@ -1193,21 +1193,6 @@ ipi_selected(u_int32_t cpus, u_int ipi) } -/* - * send an IPI INTerrupt containing 'vector' to all CPUs, including myself - */ -void -ipi_all(u_int ipi) -{ - - if (IPI_IS_BITMAPED(ipi) || (ipi == IPI_STOP && stop_cpus_with_nmi)) { - ipi_selected(all_cpus, ipi); - return; - } - CTR2(KTR_SMP, "%s: ipi: %x", __func__, ipi); - lapic_ipi_vectored(ipi, APIC_IPI_DEST_ALL); -} - /* * send an IPI to all CPUs EXCEPT myself */ @@ -1223,21 +1208,6 @@ ipi_all_but_self(u_int ipi) lapic_ipi_vectored(ipi, APIC_IPI_DEST_OTHERS); } -/* - * send an IPI to myself - */ -void -ipi_self(u_int ipi) -{ - - if (IPI_IS_BITMAPED(ipi) || (ipi == IPI_STOP && stop_cpus_with_nmi)) { - ipi_selected(PCPU_GET(cpumask), ipi); - return; - } - CTR2(KTR_SMP, "%s: ipi: %x", __func__, ipi); - lapic_ipi_vectored(ipi, APIC_IPI_DEST_SELF); -} - #ifdef STOP_NMI /* * send NMI IPI to selected CPUs diff --git a/sys/i386/include/smp.h b/sys/i386/include/smp.h index 99051779fe79..0b821d28b32e 100644 --- a/sys/i386/include/smp.h +++ b/sys/i386/include/smp.h @@ -65,9 +65,7 @@ void cpu_add(u_int apic_id, char boot_cpu); void cpustop_handler(void); void init_secondary(void); void ipi_selected(u_int cpus, u_int ipi); -void ipi_all(u_int ipi); void ipi_all_but_self(u_int ipi); -void ipi_self(u_int ipi); void ipi_bitmap_handler(struct trapframe frame); u_int mp_bootaddress(u_int); int mp_grab_cpu_hlt(void); diff --git a/sys/i386/xen/mp_machdep.c b/sys/i386/xen/mp_machdep.c index c1af917a8a1f..945ae69255e7 100644 --- a/sys/i386/xen/mp_machdep.c +++ b/sys/i386/xen/mp_machdep.c @@ -964,26 +964,6 @@ ipi_selected(u_int32_t cpus, u_int ipi) } } -/* - * send an IPI INTerrupt containing 'vector' to all CPUs, including myself - */ -void -ipi_all(u_int ipi) -{ - - if (IPI_IS_BITMAPED(ipi) || (ipi == IPI_STOP && stop_cpus_with_nmi)) { - ipi_selected(all_cpus, ipi); - return; - } - CTR2(KTR_SMP, "%s: ipi: %x", __func__, ipi); - - /* - * - */ - - ipi_selected(-1, ipi); -} - /* * send an IPI to all CPUs EXCEPT myself */ @@ -999,21 +979,6 @@ ipi_all_but_self(u_int ipi) ipi_selected(((int)-1 & ~(1 << curcpu)), ipi); } -/* - * send an IPI to myself - */ -void -ipi_self(u_int ipi) -{ - - if (IPI_IS_BITMAPED(ipi) || (ipi == IPI_STOP && stop_cpus_with_nmi)) { - ipi_selected(PCPU_GET(cpumask), ipi); - return; - } - CTR2(KTR_SMP, "%s: ipi: %x", __func__, ipi); - ipi_pcpu(curcpu, ipi); -} - #ifdef STOP_NMI /* * send NMI IPI to selected CPUs diff --git a/sys/ia64/ia64/interrupt.c b/sys/ia64/ia64/interrupt.c index 7ba1455df259..0c50b48a88b9 100644 --- a/sys/ia64/ia64/interrupt.c +++ b/sys/ia64/ia64/interrupt.c @@ -74,10 +74,6 @@ struct evcnt clock_intr_evcnt; /* event counter for clock intrs. */ #include #endif -#ifdef SMP -extern int mp_ipi_test; -#endif - static void ia64_dispatch_intr(void *, u_int); static void @@ -241,9 +237,6 @@ interrupt(struct trapframe *tf) cpu_spinwait(); atomic_clear_int(&started_cpus, mybit); atomic_clear_int(&stopped_cpus, mybit); - } else if (vector == ipi_vector[IPI_TEST]) { - CTR1(KTR_SMP, "IPI_TEST, cpuid=%d", PCPU_GET(cpuid)); - mp_ipi_test++; } else if (vector == ipi_vector[IPI_PREEMPT]) { CTR1(KTR_SMP, "IPI_PREEMPT, cpuid=%d", PCPU_GET(cpuid)); __asm __volatile("mov cr.eoi = r0;; srlz.d"); diff --git a/sys/ia64/ia64/mp_machdep.c b/sys/ia64/ia64/mp_machdep.c index 23b86fb31b14..ce2b4d1c8754 100644 --- a/sys/ia64/ia64/mp_machdep.c +++ b/sys/ia64/ia64/mp_machdep.c @@ -72,8 +72,6 @@ void ia64_ap_startup(void); #define LID_SAPIC_SET(id,eid) (((id & 0xff) << 8 | (eid & 0xff)) << 16); #define LID_SAPIC_MASK 0xffff0000UL -int mp_ipi_test = 0; - /* Variables used by os_boot_rendez and ia64_ap_startup */ struct pcpu *ap_pcpu; void *ap_stack; @@ -269,9 +267,6 @@ cpu_mp_start() if (!ap_awake) printf("SMP: WARNING: cpu%d did not wake up\n", pc->pc_cpuid); - } else { - pc->pc_awake = 1; - ipi_self(IPI_TEST); } } } @@ -285,9 +280,6 @@ cpu_mp_unleash(void *dummy) if (mp_ncpus <= 1) return; - if (mp_ipi_test != 1) - printf("SMP: WARNING: sending of a test IPI failed\n"); - cpus = 0; smp_cpus = 0; SLIST_FOREACH(pc, &cpuhead, pc_allcpu) { @@ -325,19 +317,6 @@ ipi_selected(cpumask_t cpus, int ipi) } } -/* - * send an IPI to all CPUs, including myself. - */ -void -ipi_all(int ipi) -{ - struct pcpu *pc; - - SLIST_FOREACH(pc, &cpuhead, pc_allcpu) { - ipi_send(pc, ipi); - } -} - /* * send an IPI to all CPUs EXCEPT myself. */ @@ -352,16 +331,6 @@ ipi_all_but_self(int ipi) } } -/* - * send an IPI to myself. - */ -void -ipi_self(int ipi) -{ - - ipi_send(pcpup, ipi); -} - /* * Send an IPI to the specified processor. The lid parameter holds the * cr.lid (CR64) contents of the target processor. Only the id and eid diff --git a/sys/ia64/ia64/sal.c b/sys/ia64/ia64/sal.c index 6a55f39ae3cd..4f46d652b02a 100644 --- a/sys/ia64/ia64/sal.c +++ b/sys/ia64/ia64/sal.c @@ -80,7 +80,6 @@ setup_ipi_vectors(int ceil) ipi_vector[IPI_HIGH_FP] = ceil - 0x30; ipi_vector[IPI_MCA_CMCV] = ceil - 0x30 + 1; - ipi_vector[IPI_TEST] = ceil - 0x30 + 2; } void diff --git a/sys/ia64/include/smp.h b/sys/ia64/include/smp.h index cf1fab31f317..c6d98f7b4f35 100644 --- a/sys/ia64/include/smp.h +++ b/sys/ia64/include/smp.h @@ -17,14 +17,13 @@ #define IPI_HIGH_FP 1 #define IPI_MCA_CMCV 2 #define IPI_MCA_RENDEZ 3 -#define IPI_TEST 4 /* Machine independent IPIs. */ -#define IPI_AST 5 -#define IPI_RENDEZVOUS 6 -#define IPI_STOP 7 -#define IPI_PREEMPT 8 +#define IPI_AST 4 +#define IPI_RENDEZVOUS 5 +#define IPI_STOP 6 +#define IPI_PREEMPT 7 -#define IPI_COUNT 9 +#define IPI_COUNT 8 #ifndef LOCORE @@ -32,10 +31,8 @@ struct pcpu; extern int ipi_vector[]; -void ipi_all(int ipi); void ipi_all_but_self(int ipi); void ipi_selected(cpumask_t cpus, int ipi); -void ipi_self(int ipi); void ipi_send(struct pcpu *, int ipi); #endif /* !LOCORE */ diff --git a/sys/mips/include/smp.h b/sys/mips/include/smp.h index d0ac25d00660..798beed245c6 100644 --- a/sys/mips/include/smp.h +++ b/sys/mips/include/smp.h @@ -30,9 +30,7 @@ extern u_int32_t boot_cpu_id; void ipi_selected(u_int cpus, u_int32_t ipi); -void ipi_all(u_int32_t ipi); void ipi_all_but_self(u_int32_t ipi); -void ipi_self(u_int32_t ipi); intrmask_t smp_handle_ipi(struct trapframe *frame); void smp_init_secondary(u_int32_t cpuid); void mips_ipi_send(int thread_id); diff --git a/sys/mips/mips/mp_machdep.c b/sys/mips/mips/mp_machdep.c index 1a7e27265be0..3f7d731dffbb 100644 --- a/sys/mips/mips/mp_machdep.c +++ b/sys/mips/mips/mp_machdep.c @@ -85,16 +85,6 @@ ipi_selected(u_int32_t cpus, u_int ipi) } } -/* - * send an IPI INTerrupt containing 'vector' to all CPUs, including myself - */ -void -ipi_all(u_int ipi) -{ - - ipi_selected(all_cpus, ipi); -} - /* * send an IPI to all CPUs EXCEPT myself */ @@ -105,16 +95,6 @@ ipi_all_but_self(u_int ipi) ipi_selected(PCPU_GET(other_cpus), ipi); } -/* - * send an IPI to myself - */ -void -ipi_self(u_int ipi) -{ - - ipi_selected(PCPU_GET(cpumask), ipi); -} - /* * Handle an IPI sent to this processor. */ diff --git a/sys/powerpc/include/smp.h b/sys/powerpc/include/smp.h index 4d364ab1a0a3..2b054c5fde53 100644 --- a/sys/powerpc/include/smp.h +++ b/sys/powerpc/include/smp.h @@ -36,14 +36,10 @@ #define IPI_RENDEZVOUS 2 #define IPI_STOP 3 -#define IPI_PPC_TEST 4 - #ifndef LOCORE -void ipi_all(int ipi); void ipi_all_but_self(int ipi); void ipi_selected(cpumask_t cpus, int ipi); -void ipi_self(int ipi); struct cpuref { uintptr_t cr_hwref; diff --git a/sys/powerpc/powerpc/intr_machdep.c b/sys/powerpc/powerpc/intr_machdep.c index dbf3cfc19e6f..3e073489eec5 100644 --- a/sys/powerpc/powerpc/intr_machdep.c +++ b/sys/powerpc/powerpc/intr_machdep.c @@ -235,11 +235,6 @@ powerpc_enable_intr(void) PIC_ENABLE(pic, i->irq, vector); } -#ifdef SMP - /* Send ourself a test IPI message. */ - ipi_self(IPI_PPC_TEST); -#endif - return (0); } diff --git a/sys/powerpc/powerpc/mp_machdep.c b/sys/powerpc/powerpc/mp_machdep.c index 12962fb6a7be..5d05fd158101 100644 --- a/sys/powerpc/powerpc/mp_machdep.c +++ b/sys/powerpc/powerpc/mp_machdep.c @@ -50,8 +50,6 @@ volatile static u_int ap_state; volatile static uint32_t ap_decr; volatile static uint32_t ap_tbl; -int mp_ipi_test = 0; - void machdep_ap_bootstrap(void) { @@ -182,11 +180,6 @@ cpu_mp_unleash(void *dummy) if (mp_ncpus <= 1) return; - if (mp_ipi_test != 1) { - printf("SMP: ERROR: sending of a test IPI failed\n"); - return; - } - cpus = 0; smp_cpus = 0; SLIST_FOREACH(pc, &cpuhead, pc_allcpu) { @@ -263,9 +256,6 @@ powerpc_ipi_handler(void *arg) atomic_clear_int(&started_cpus, self); atomic_clear_int(&stopped_cpus, self); break; - case IPI_PPC_TEST: - mp_ipi_test++; - break; } } @@ -292,17 +282,6 @@ ipi_selected(cpumask_t cpus, int ipi) } } -/* Send an IPI to all CPUs, including myself. */ -void -ipi_all(int ipi) -{ - struct pcpu *pc; - - SLIST_FOREACH(pc, &cpuhead, pc_allcpu) { - ipi_send(pc, ipi); - } -} - /* Send an IPI to all CPUs EXCEPT myself. */ void ipi_all_but_self(int ipi) @@ -314,11 +293,3 @@ ipi_all_but_self(int ipi) ipi_send(pc, ipi); } } - -/* Send an IPI to myself. */ -void -ipi_self(int ipi) -{ - - ipi_send(pcpup, ipi); -} diff --git a/sys/sun4v/include/smp.h b/sys/sun4v/include/smp.h index d1d9da42bb46..4f5adc53c36c 100644 --- a/sys/sun4v/include/smp.h +++ b/sys/sun4v/include/smp.h @@ -82,7 +82,6 @@ void cpu_ipi_stop(struct trapframe *tf); void cpu_ipi_preempt(struct trapframe *tf); void ipi_selected(u_int cpus, u_int ipi); -void ipi_all(u_int ipi); void ipi_all_but_self(u_int ipi); vm_offset_t mp_tramp_alloc(void);