diff options
author | Andrew Gallatin <gallatin@FreeBSD.org> | 2000-10-09 18:47:49 +0000 |
---|---|---|
committer | Andrew Gallatin <gallatin@FreeBSD.org> | 2000-10-09 18:47:49 +0000 |
commit | acadb17f53fb6874cdd6fe32aa2418799d560518 (patch) | |
tree | 9384111327f6c36a52bd03b7b1ee23683757db60 /sys | |
parent | a89effcde1027d280694b1c6cba556d419ae4d07 (diff) | |
download | src-acadb17f53fb6874cdd6fe32aa2418799d560518.tar.gz src-acadb17f53fb6874cdd6fe32aa2418799d560518.zip |
kernacc() only knows about mapped memory, not K0SEG addresses.
Before calling kernacc(), make sure that we're not calling it
with a K0SEG address.
This gets alphas booting with SMP_DEBUG & INVARIANTS options
approved by: jhb
Notes
Notes:
svn path=/head/; revision=66889
Diffstat (limited to 'sys')
-rw-r--r-- | sys/alpha/alpha/synch_machdep.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sys/alpha/alpha/synch_machdep.c b/sys/alpha/alpha/synch_machdep.c index 80d557913b49..184da83a9713 100644 --- a/sys/alpha/alpha/synch_machdep.c +++ b/sys/alpha/alpha/synch_machdep.c @@ -428,6 +428,9 @@ mtx_exit_hard(struct mtx *m, int type) #ifdef SMP_DEBUG +#define ISK0SEG(va) \ + ((va >= ALPHA_K0SEG_BASE && va <= ALPHA_K0SEG_END)) + int mtx_validate __P((struct mtx *, int)); int @@ -441,10 +444,12 @@ mtx_validate(struct mtx *m, int when) return 0; mtx_enter(&all_mtx, MTX_DEF); - ASS(kernacc((caddr_t)all_mtx.mtx_next, 4, 1) == 1); + ASS(ISK0SEG((vm_offset_t)all_mtx.mtx_next) || + kernacc((caddr_t)all_mtx.mtx_next, 4, 1) == 1); ASS(all_mtx.mtx_next->mtx_prev == &all_mtx); for (i = 0, mp = all_mtx.mtx_next; mp != &all_mtx; mp = mp->mtx_next) { - if (kernacc((caddr_t)mp->mtx_next, 4, 1) != 1) { + if (!ISK0SEG((vm_offset_t)all_mtx.mtx_next) && + kernacc((caddr_t)mp->mtx_next, 4, 1) != 1) { panic("mtx_validate: mp=%p mp->mtx_next=%p", mp, mp->mtx_next); } |