summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormarcel <marcel@FreeBSD.org>2005-08-13 21:08:32 +0000
committermarcel <marcel@FreeBSD.org>2005-08-13 21:08:32 +0000
commit0bc686305b36ccd81078acb082892858ee92e8fd (patch)
treef8caf84b1a659720c7e2b98eb05f65710f56dfdb
parent51355225d4b006ca1150564e1fcaf42e99cbca26 (diff)
downloadFreeBSD-src-0bc686305b36ccd81078acb082892858ee92e8fd.zip
FreeBSD-src-0bc686305b36ccd81078acb082892858ee92e8fd.tar.gz
Fix the problem with the IPI for the lazy context switching of the
high FP registers. It was not that the IPI got lost due to the perceived unreliability of the IPI delivery, but rather that the IPI was not assigned a vector (ugh). Sending a 0 vector to a CPU results in a stray external interrupt. Add a KASSERT to ipi_send() to catch this. The initialization of the IPIs could be better, but it's not at all sure what the future of the code is. Avoid wasting a lot of time on something that is going to be rewritten anyway.
-rw-r--r--sys/ia64/ia64/mp_machdep.c1
-rw-r--r--sys/ia64/ia64/sal.c6
2 files changed, 5 insertions, 2 deletions
diff --git a/sys/ia64/ia64/mp_machdep.c b/sys/ia64/ia64/mp_machdep.c
index 59a4b7d..a045ff5 100644
--- a/sys/ia64/ia64/mp_machdep.c
+++ b/sys/ia64/ia64/mp_machdep.c
@@ -372,6 +372,7 @@ ipi_send(struct pcpu *cpu, int ipi)
pipi = __MEMIO_ADDR(ia64_lapic_address |
((cpu->pc_lid & LID_SAPIC_MASK) >> 12));
vector = (uint64_t)(ipi_vector[ipi] & 0xff);
+ KASSERT(vector != 0, ("IPI %d is not assigned a vector", ipi));
*pipi = vector;
CTR3(KTR_SMP, "ipi_send(%p, %ld), cpuid=%d", pipi, vector,
PCPU_GET(cpuid));
diff --git a/sys/ia64/ia64/sal.c b/sys/ia64/ia64/sal.c
index c05f7be..251c1ee 100644
--- a/sys/ia64/ia64/sal.c
+++ b/sys/ia64/ia64/sal.c
@@ -72,13 +72,15 @@ setup_ipi_vectors(int ceil)
int ipi;
ipi_vector[IPI_MCA_RENDEZ] = ceil - 0x10;
- ipi_vector[IPI_MCA_CMCV] = ceil - 0x30;
- ipi_vector[IPI_TEST] = ceil - 0x30 + 1;
ipi = IPI_AST; /* First generic IPI. */
ceil -= 0x20; /* First vector in group. */
while (ipi < IPI_COUNT)
ipi_vector[ipi++] = ceil++;
+
+ ipi_vector[IPI_HIGH_FP] = ceil - 0x30;
+ ipi_vector[IPI_MCA_CMCV] = ceil - 0x30 + 1;
+ ipi_vector[IPI_TEST] = ceil - 0x30 + 2;
}
void
OpenPOWER on IntegriCloud