Page MenuHomeFreeBSD
Paste P592

Command-Line Input
ActivePublic

Authored by markj on Jun 28 2023, 5:06 PM.
Tags
None
Referenced Files
F63506547: Command-Line Input
Jun 28 2023, 5:06 PM
Subscribers
None
diff --git a/sys/cddl/dev/kinst/riscv/kinst_isa.h b/sys/cddl/dev/kinst/riscv/kinst_isa.h
index a2930bc5d..90246c293 100644
--- a/sys/cddl/dev/kinst/riscv/kinst_isa.h
+++ b/sys/cddl/dev/kinst/riscv/kinst_isa.h
@@ -19,7 +19,7 @@
* = 2 bytes, ebreak = 4 bytes) and non-compressed instructions (instruction 4
* bytes, ebreak = 4 bytes).
*/
-#define KINST_TRAMP_SIZE 8
+#define KINST_TRAMP_SIZE PAGE_SIZE
typedef uint32_t kinst_patchval_t;
diff --git a/sys/cddl/dev/kinst/trampoline.c b/sys/cddl/dev/kinst/trampoline.c
index babbf84f1..c8a810447 100644
--- a/sys/cddl/dev/kinst/trampoline.c
+++ b/sys/cddl/dev/kinst/trampoline.c
@@ -134,6 +134,9 @@ kinst_trampoline_alloc_locked(int how)
sx_assert(&kinst_tramp_sx, SX_XLOCKED);
+ chunk = NULL;
+ off = 0;
+#if 0
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 +145,7 @@ kinst_trampoline_alloc_locked(int how)
off--;
break;
}
+#endif
if (chunk == NULL) {
if ((how & M_NOWAIT) != 0)
return (NULL);