riscv: remove sbi_clear_ipi()
S-mode software has write access to the SIP.SSIP bit, so instead of making a second round-trip through the SBI we can clear it ourselves. The SBI spec has deprecated this function for this exactly this reason. Submitted by: Danjel Q. <danq1222@gmail.com Reviewed by: kp Differential Revision: https://reviews.freebsd.org/D26952
This commit is contained in:
parent
fe76bef462
commit
6b35ff5fcb
@ -196,13 +196,6 @@ sbi_shutdown(void)
|
||||
(void)SBI_CALL0(SBI_SHUTDOWN, 0);
|
||||
}
|
||||
|
||||
static __inline void
|
||||
sbi_clear_ipi(void)
|
||||
{
|
||||
|
||||
(void)SBI_CALL0(SBI_CLEAR_IPI, 0);
|
||||
}
|
||||
|
||||
static __inline void
|
||||
sbi_send_ipi(const unsigned long *hart_mask)
|
||||
{
|
||||
|
@ -317,7 +317,7 @@ ipi_handler(void *arg)
|
||||
u_int cpu, ipi;
|
||||
int bit;
|
||||
|
||||
sbi_clear_ipi();
|
||||
csr_clear(sip, SIP_SSIP);
|
||||
|
||||
cpu = PCPU_GET(cpuid);
|
||||
|
||||
|
@ -183,8 +183,6 @@ sbi_init(void)
|
||||
("SBI doesn't implement sbi_console_putchar()"));
|
||||
KASSERT(sbi_probe_extension(SBI_CONSOLE_GETCHAR) != 0,
|
||||
("SBI doesn't implement sbi_console_getchar()"));
|
||||
KASSERT(sbi_probe_extension(SBI_CLEAR_IPI) != 0,
|
||||
("SBI doesn't implement sbi_clear_ipi()"));
|
||||
KASSERT(sbi_probe_extension(SBI_SEND_IPI) != 0,
|
||||
("SBI doesn't implement sbi_send_ipi()"));
|
||||
KASSERT(sbi_probe_extension(SBI_REMOTE_FENCE_I) != 0,
|
||||
|
Loading…
Reference in New Issue
Block a user