freebsd-nq/sys/riscv
Brooks Davis b75062f234 riscv: Fix thread0.td_kstack_pages init
Commit 0ef3ca7ae3 initialized
thread0.td_kstack_pages to KSTACK_PAGES.  Due to the lack of an
include of opt_kstack_pages.h it used the fallback value of 4 from
machine/param.h.  This meant that increasing KSTACK_PAGES in the kernel
config resulted in a panic in _epoch_enter_preempt as the following
assertion was false during network stack setup:

	MPASS((vm_offset_t)et >= td->td_kstack &&
	    (vm_offset_t)et + sizeof(struct epoch_tracker) <=
	    td->td_kstack + td->td_kstack_pages * PAGE_SIZE);

Switch to initializing with kstack_pages following other architectures.

Reviewed by:	imp, markj
Sponsored by:   DARPA, AFRL
Differential Revision:	https://reviews.freebsd.org/D38049
2023-01-17 16:37:42 +00:00
..
allwinner aw_wdog: support Allwinner D1 watchdog 2022-04-12 19:51:17 -03:00
conf intrng: Remove from NOTES file 2022-10-25 10:57:29 -06:00
include riscv: improve parsing of riscv,isa property strings 2022-10-28 13:28:08 -03:00
riscv riscv: Fix thread0.td_kstack_pages init 2023-01-17 16:37:42 +00:00
sifive riscv sifive: Remove unused devclass arguments to DRIVER_MODULE. 2022-05-10 10:21:38 -07:00