epoch: replace hand coded assertion
The assertion is equivalent to kstack_contains() so use that rather than spelling it out. Suggested by: jhb Reviewed by: jhb MFC after: 1 week Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D38107
This commit is contained in:
parent
cf57f20edc
commit
fa1d803c0f
@ -468,9 +468,7 @@ _epoch_enter_preempt(epoch_t epoch, epoch_tracker_t et EPOCH_FILE_LINE)
|
||||
|
||||
MPASS(cold || epoch != NULL);
|
||||
td = curthread;
|
||||
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);
|
||||
MPASS(kstack_contains(td, (vm_offset_t)et, sizeof(*et)));
|
||||
|
||||
INIT_CHECK(epoch);
|
||||
MPASS(epoch->e_flags & EPOCH_PREEMPT);
|
||||
|
Loading…
Reference in New Issue
Block a user