Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F167753217
D40873.id124155.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
826 B
Referenced Files
None
Subscribers
None
D40873.id124155.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D40873: kinst: skip trampoline searching for riscv and arm64
Attached
Detach File
Event Timeline
Log In to Comment