commit 0bcd56ff07335f401f578914eed2cf0058e845c2 Author: Ryota Ozaki Date: Tue Jan 23 14:11:40 2018 +0900 Apply to psref diff --git a/sys/kern/subr_psref.c b/sys/kern/subr_psref.c index f4bb92a7057..623cf9d6466 100644 --- a/sys/kern/subr_psref.c +++ b/sys/kern/subr_psref.c @@ -94,6 +94,7 @@ struct psref_class { kcondvar_t prc_cv; struct percpu *prc_percpu; /* struct psref_cpu */ ipl_cookie_t prc_iplcookie; + unsigned int prc_xc_flags; }; /* @@ -124,6 +125,7 @@ psref_class_create(const char *name, int ipl) mutex_init(&class->prc_lock, MUTEX_DEFAULT, ipl); cv_init(&class->prc_cv, name); class->prc_iplcookie = makeiplcookie(ipl); + class->prc_xc_flags = XC_HIGHPRI_IPL(ipl); return class; } @@ -434,7 +436,8 @@ psreffed_p(struct psref_target *target, struct psref_class *class) * Ask all CPUs to say whether they hold a psref to the * target. */ - xc_wait(xc_broadcast(0, &psreffed_p_xc, &P, NULL)); + xc_wait(xc_broadcast(class->prc_xc_flags, &psreffed_p_xc, &P, + NULL)); } else psreffed_p_xc(&P, NULL);