From 937122ae6dc02a639d13dd06132201548bd7364f Mon Sep 17 00:00:00 2001 From: jake Date: Sun, 21 Jan 2001 19:25:07 +0000 Subject: Make intr_nesting_level per-process, rather than per-cpu. Setup interrupt threads to run with it always >= 1, so that malloc can detect M_WAITOK from "interrupt" context. This is also necessary in order to context switch from sched_ithd() directly. Reviewed By: peter --- sys/alpha/include/cpu.h | 4 +--- sys/alpha/include/globaldata.h | 1 - sys/alpha/include/pcpu.h | 1 - 3 files changed, 1 insertion(+), 5 deletions(-) (limited to 'sys/alpha/include') diff --git a/sys/alpha/include/cpu.h b/sys/alpha/include/cpu.h index 3da213f..0edb2fc 100644 --- a/sys/alpha/include/cpu.h +++ b/sys/alpha/include/cpu.h @@ -65,7 +65,7 @@ struct clockframe { #define CLKF_USERMODE(framep) \ (((framep)->cf_tf.tf_regs[FRAME_PS] & ALPHA_PSL_USERMODE) != 0) #define CLKF_PC(framep) ((framep)->cf_tf.tf_regs[FRAME_PC]) -#define CLKF_INTR(framep) (PCPU_GET(intr_nesting_level) >= 2) +#define CLKF_INTR(framep) (curproc->p_intr_nesting_level >= 2) /* * Preempt the current process if in interrupt from user mode, @@ -92,8 +92,6 @@ struct clockframe { #define aston() PCPU_SET(astpending, 1) #ifdef _KERNEL -extern u_int astpending; -extern u_int32_t intr_nesting_level; /* bookeeping only; counts sw intrs */ extern u_int32_t want_resched; /* resched() was called */ #endif diff --git a/sys/alpha/include/globaldata.h b/sys/alpha/include/globaldata.h index 127dd09..d99c5a9 100644 --- a/sys/alpha/include/globaldata.h +++ b/sys/alpha/include/globaldata.h @@ -56,7 +56,6 @@ struct globaldata { u_int64_t gd_pending_ipis; /* pending IPI events */ u_int32_t gd_next_asn; /* next ASN to allocate */ u_int32_t gd_current_asngen; /* ASN rollover check */ - u_int32_t gd_intr_nesting_level; /* interrupt recursion */ u_int gd_astpending; SLIST_ENTRY(globaldata) gd_allcpu; diff --git a/sys/alpha/include/pcpu.h b/sys/alpha/include/pcpu.h index 127dd09..d99c5a9 100644 --- a/sys/alpha/include/pcpu.h +++ b/sys/alpha/include/pcpu.h @@ -56,7 +56,6 @@ struct globaldata { u_int64_t gd_pending_ipis; /* pending IPI events */ u_int32_t gd_next_asn; /* next ASN to allocate */ u_int32_t gd_current_asngen; /* ASN rollover check */ - u_int32_t gd_intr_nesting_level; /* interrupt recursion */ u_int gd_astpending; SLIST_ENTRY(globaldata) gd_allcpu; -- cgit v1.1