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:
Mitchell Horne 2020-10-26 19:06:30 +00:00
parent fe76bef462
commit 6b35ff5fcb
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=367067
3 changed files with 1 additions and 10 deletions

View File

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

View File

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

View File

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