Remove ipi_all() and ipi_self() as the former hasn't been used at

all to date and the latter also is only used in ia64 and powerpc
code which no longer serves a real purpose after bring-up and just
can be removed as well. Note that architectures like sun4u also
provide no means of implementing IPI'ing a CPU itself natively
in the first place.

Suggested by:	jhb
Reviewed by:	arch, grehan, jhb
This commit is contained in:
Marius Strobl 2008-09-28 18:34:14 +00:00
parent eb948eac0d
commit 6f04e7b9aa
15 changed files with 5 additions and 207 deletions

View File

@ -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

View File

@ -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);

View File

@ -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

View File

@ -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);

View File

@ -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

View File

@ -74,10 +74,6 @@ struct evcnt clock_intr_evcnt; /* event counter for clock intrs. */
#include <ddb/ddb.h>
#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");

View File

@ -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

View File

@ -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

View File

@ -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 */

View File

@ -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);

View File

@ -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.
*/

View File

@ -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;

View File

@ -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);
}

View File

@ -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);
}

View File

@ -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);