1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-21 11:13:30 +00:00

Use TRAPF_USERMODE() to replace an equivalent check in trap(). While

here, amend the related comment.
This commit is contained in:
Marcel Moolenaar 2003-06-06 23:44:05 +00:00
parent 447449473c
commit 0785ee125b
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=115916

View File

@ -699,10 +699,9 @@ trap(int vector, struct trapframe *framep)
/*
* Additionally check the privilege level. We don't want to
* panic when we're in the gateway page, running at user
* level.
* level. This happens for the signal trampolines.
*/
if (!user && (framep->tf_special.psr & IA64_PSR_CPL)
== IA64_PSR_CPL_KERN) {
if (!TRAPF_USERMODE(framep)) {
/* Check for copyin/copyout fault. */
if (td != NULL && td->td_pcb->pcb_onfault != 0) {
framep->tf_special.iip =