Make the various bits of SMP code conditional on SMP so that I can still

build non-SMP kernels.
This commit is contained in:
Doug Rabson 2001-10-29 11:57:12 +00:00
parent a4addc62ce
commit c3338474b9
4 changed files with 14 additions and 0 deletions

View File

@ -68,8 +68,10 @@ struct evcnt clock_intr_evcnt; /* event counter for clock intrs. */
#include <ddb/ddb.h>
#endif
#ifdef SMP
extern int mp_ipi_vector[]; /* XXX */
extern int mp_ipi_test;
#endif
volatile int mc_expected, mc_received;
@ -117,8 +119,10 @@ interrupt(u_int64_t vector, struct trapframe *framep)
/* divide hz (1024) by 8 to get stathz (128) */
if((++schedclk2 & 0x7) == 0)
statclock((struct clockframe *)framep);
#ifdef SMP
} else if (vector == mp_ipi_vector[IPI_TEST]) {
mp_ipi_test++;
#endif
} else
ia64_dispatch_intr(framep, vector);

View File

@ -143,6 +143,8 @@ ENTRY(mi_startup_trampoline, 0)
END(mi_startup_trampoline)
#ifdef SMP
/*
* AP wake-up entry point. The handoff state is similar as for the BSP,
* as described on page 3-9 of the IPF SAL Specification. The difference
@ -193,6 +195,8 @@ ENTRY(os_boot_rendez,0)
/* NOT REACHED */
END(os_boot_rendez)
#endif /* !SMP */
/**************************************************************************/
/*

View File

@ -143,6 +143,8 @@ ENTRY(mi_startup_trampoline, 0)
END(mi_startup_trampoline)
#ifdef SMP
/*
* AP wake-up entry point. The handoff state is similar as for the BSP,
* as described on page 3-9 of the IPF SAL Specification. The difference
@ -193,6 +195,8 @@ ENTRY(os_boot_rendez,0)
/* NOT REACHED */
END(os_boot_rendez)
#endif /* !SMP */
/**************************************************************************/
/*

View File

@ -99,6 +99,7 @@ ia64_sal_init(struct sal_system_table *saltab)
if (bootverbose)
printf("SMP: AP wake-up vector: 0x%lx\n",
dp->sale_vector);
#ifdef SMP
for (ipi = 0; ipi < IPI_COUNT; ipi++)
mp_ipi_vector[ipi] = dp->sale_vector + ipi;
@ -108,6 +109,7 @@ ia64_sal_init(struct sal_system_table *saltab)
0, 0, 0);
mp_hardware = 1;
#endif
break;
}
}