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.
This commit is contained in:
parent
857b66d505
commit
86257f240a
@ -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));
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user