Page MenuHomeFreeBSD

D40873.id124155.diff
No OneTemporary

D40873.id124155.diff

diff --git a/sys/cddl/dev/kinst/trampoline.c b/sys/cddl/dev/kinst/trampoline.c
--- a/sys/cddl/dev/kinst/trampoline.c
+++ b/sys/cddl/dev/kinst/trampoline.c
@@ -134,6 +134,16 @@
sx_assert(&kinst_tramp_sx, SX_XLOCKED);
+#if defined(__riscv)
+ /*
+ * XXX: RISCV uses PAGE_SIZE-long trampolines as a workaround to a QEMU
+ * bug. However, BITSET(9) doesn't seem to be working properly when the
+ * bitset size is 1, so in this case we skip the bit searching
+ * completely.
+ */
+ chunk = NULL;
+ off = 0;
+#else
TAILQ_FOREACH(chunk, &kinst_trampchunks, next) {
/* All trampolines from this chunk are already allocated. */
if ((off = BIT_FFS(KINST_TRAMPS_PER_CHUNK, &chunk->free)) == 0)
@@ -142,6 +152,7 @@
off--;
break;
}
+#endif
if (chunk == NULL) {
if ((how & M_NOWAIT) != 0)
return (NULL);

File Metadata

Mime Type
text/plain
Expires
Tue, Aug 25, 7:23 AM (26 m, 2 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
37178647
Default Alt Text
D40873.id124155.diff (826 B)

Event Timeline