mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2025-01-11 17:04:19 +01:00
Add SWI_TQ_MASK to all interrupt masks except SWI_CLOCK_MASK. Use a
new macro SWI_LOW_MASK to give the mask for low priority SWIs instead of hard-coding this mask as SWI_CLOCK_MASK. Reviewed by: dfr
This commit is contained in:
parent
1bcc7e80bf
commit
5f582114dd
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=61126
@ -136,7 +136,7 @@ SYSCTL_INT(_hw,HW_FLOATINGPT, floatingpoint,
|
|||||||
"Floatingpoint instructions executed in hardware");
|
"Floatingpoint instructions executed in hardware");
|
||||||
|
|
||||||
#ifndef SMP
|
#ifndef SMP
|
||||||
static u_int npx0_imask = SWI_CLOCK_MASK;
|
static u_int npx0_imask = SWI_LOW_MASK;
|
||||||
static struct gate_descriptor npx_idt_probeintr;
|
static struct gate_descriptor npx_idt_probeintr;
|
||||||
static int npx_intrno;
|
static int npx_intrno;
|
||||||
static volatile u_int npx_intrs_while_probing;
|
static volatile u_int npx_intrs_while_probing;
|
||||||
|
@ -134,7 +134,7 @@ int clkintr_pending;
|
|||||||
int disable_rtc_set; /* disable resettodr() if != 0 */
|
int disable_rtc_set; /* disable resettodr() if != 0 */
|
||||||
volatile u_int idelayed;
|
volatile u_int idelayed;
|
||||||
int statclock_disable;
|
int statclock_disable;
|
||||||
u_int stat_imask = SWI_CLOCK_MASK;
|
u_int stat_imask = SWI_LOW_MASK;
|
||||||
#ifndef TIMER_FREQ
|
#ifndef TIMER_FREQ
|
||||||
#define TIMER_FREQ 1193182
|
#define TIMER_FREQ 1193182
|
||||||
#endif
|
#endif
|
||||||
|
@ -134,7 +134,7 @@ int clkintr_pending;
|
|||||||
int disable_rtc_set; /* disable resettodr() if != 0 */
|
int disable_rtc_set; /* disable resettodr() if != 0 */
|
||||||
volatile u_int idelayed;
|
volatile u_int idelayed;
|
||||||
int statclock_disable;
|
int statclock_disable;
|
||||||
u_int stat_imask = SWI_CLOCK_MASK;
|
u_int stat_imask = SWI_LOW_MASK;
|
||||||
#ifndef TIMER_FREQ
|
#ifndef TIMER_FREQ
|
||||||
#define TIMER_FREQ 1193182
|
#define TIMER_FREQ 1193182
|
||||||
#endif
|
#endif
|
||||||
|
@ -340,7 +340,7 @@ update_intr_masks(void)
|
|||||||
maskptr = intr_mptr[intr];
|
maskptr = intr_mptr[intr];
|
||||||
if (!maskptr)
|
if (!maskptr)
|
||||||
continue;
|
continue;
|
||||||
*maskptr |= SWI_CLOCK_MASK | (1 << intr);
|
*maskptr |= SWI_LOW_MASK | (1 << intr);
|
||||||
mask = *maskptr;
|
mask = *maskptr;
|
||||||
if (mask != intr_mask[intr]) {
|
if (mask != intr_mask[intr]) {
|
||||||
#if 0
|
#if 0
|
||||||
@ -427,7 +427,7 @@ icu_setup(int intr, inthand2_t *handler, void *arg, u_int *maskptr, int flags)
|
|||||||
disable_intr();
|
disable_intr();
|
||||||
intr_handler[intr] = handler;
|
intr_handler[intr] = handler;
|
||||||
intr_mptr[intr] = maskptr;
|
intr_mptr[intr] = maskptr;
|
||||||
intr_mask[intr] = mask | SWI_CLOCK_MASK | (1 << intr);
|
intr_mask[intr] = mask | SWI_LOW_MASK | (1 << intr);
|
||||||
intr_unit[intr] = arg;
|
intr_unit[intr] = arg;
|
||||||
#ifdef FAST_HI
|
#ifdef FAST_HI
|
||||||
if (flags & INTR_FAST) {
|
if (flags & INTR_FAST) {
|
||||||
|
@ -340,7 +340,7 @@ update_intr_masks(void)
|
|||||||
maskptr = intr_mptr[intr];
|
maskptr = intr_mptr[intr];
|
||||||
if (!maskptr)
|
if (!maskptr)
|
||||||
continue;
|
continue;
|
||||||
*maskptr |= SWI_CLOCK_MASK | (1 << intr);
|
*maskptr |= SWI_LOW_MASK | (1 << intr);
|
||||||
mask = *maskptr;
|
mask = *maskptr;
|
||||||
if (mask != intr_mask[intr]) {
|
if (mask != intr_mask[intr]) {
|
||||||
#if 0
|
#if 0
|
||||||
@ -427,7 +427,7 @@ icu_setup(int intr, inthand2_t *handler, void *arg, u_int *maskptr, int flags)
|
|||||||
disable_intr();
|
disable_intr();
|
||||||
intr_handler[intr] = handler;
|
intr_handler[intr] = handler;
|
||||||
intr_mptr[intr] = maskptr;
|
intr_mptr[intr] = maskptr;
|
||||||
intr_mask[intr] = mask | SWI_CLOCK_MASK | (1 << intr);
|
intr_mask[intr] = mask | SWI_LOW_MASK | (1 << intr);
|
||||||
intr_unit[intr] = arg;
|
intr_unit[intr] = arg;
|
||||||
#ifdef FAST_HI
|
#ifdef FAST_HI
|
||||||
if (flags & INTR_FAST) {
|
if (flags & INTR_FAST) {
|
||||||
|
@ -136,7 +136,7 @@ SYSCTL_INT(_hw,HW_FLOATINGPT, floatingpoint,
|
|||||||
"Floatingpoint instructions executed in hardware");
|
"Floatingpoint instructions executed in hardware");
|
||||||
|
|
||||||
#ifndef SMP
|
#ifndef SMP
|
||||||
static u_int npx0_imask = SWI_CLOCK_MASK;
|
static u_int npx0_imask = SWI_LOW_MASK;
|
||||||
static struct gate_descriptor npx_idt_probeintr;
|
static struct gate_descriptor npx_idt_probeintr;
|
||||||
static int npx_intrno;
|
static int npx_intrno;
|
||||||
static volatile u_int npx_intrs_while_probing;
|
static volatile u_int npx_intrs_while_probing;
|
||||||
|
@ -134,7 +134,7 @@ int clkintr_pending;
|
|||||||
int disable_rtc_set; /* disable resettodr() if != 0 */
|
int disable_rtc_set; /* disable resettodr() if != 0 */
|
||||||
volatile u_int idelayed;
|
volatile u_int idelayed;
|
||||||
int statclock_disable;
|
int statclock_disable;
|
||||||
u_int stat_imask = SWI_CLOCK_MASK;
|
u_int stat_imask = SWI_LOW_MASK;
|
||||||
#ifndef TIMER_FREQ
|
#ifndef TIMER_FREQ
|
||||||
#define TIMER_FREQ 1193182
|
#define TIMER_FREQ 1193182
|
||||||
#endif
|
#endif
|
||||||
|
@ -69,23 +69,23 @@
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* Corresponding interrupt-disable masks for cpl. The ordering is now by
|
* Corresponding interrupt-disable masks for cpl. The ordering is now by
|
||||||
* inclusion (where each mask is considered as a set of bits). Everything
|
* inclusion (where each mask is considered as a set of bits). Everything
|
||||||
* includes SWI_CLOCK_MASK so that softclock() doesn't
|
* except SWI_CLOCK_MASK includes SWI_LOW_MASK so that softclock() and low
|
||||||
* run while other swi handlers are running and timeout routines can call
|
* priority swi's don't run while other swi handlers are running and timeout
|
||||||
* swi handlers.
|
* routines can call swi handlers. SWI_TTY_MASK includes SWI_NET_MASK in
|
||||||
* SWI_TTY_MASK includes SWI_NET_MASK
|
* case tty interrupts are processed at splsofttty() for a tty that is in
|
||||||
* in case tty interrupts are processed at splsofttty() for a tty that is in
|
|
||||||
* SLIP or PPP line discipline (this is weaker than merging net_imask with
|
* SLIP or PPP line discipline (this is weaker than merging net_imask with
|
||||||
* tty_imask in isa.c - splimp() must mask hard and soft tty interrupts, but
|
* tty_imask in isa.c - splimp() must mask hard and soft tty interrupts, but
|
||||||
* spltty() apparently only needs to mask soft net interrupts).
|
* spltty() apparently only needs to mask soft net interrupts).
|
||||||
*/
|
*/
|
||||||
#define SWI_TTY_MASK (SWI_TTY_PENDING | SWI_CLOCK_MASK | SWI_NET_MASK)
|
#define SWI_TTY_MASK (SWI_TTY_PENDING | SWI_LOW_MASK | SWI_NET_MASK)
|
||||||
#define SWI_CAMNET_MASK (SWI_CAMNET_PENDING | SWI_CLOCK_MASK)
|
#define SWI_CAMNET_MASK (SWI_CAMNET_PENDING | SWI_LOW_MASK)
|
||||||
#define SWI_CAMBIO_MASK (SWI_CAMBIO_PENDING | SWI_CLOCK_MASK)
|
#define SWI_CAMBIO_MASK (SWI_CAMBIO_PENDING | SWI_LOW_MASK)
|
||||||
#define SWI_NET_MASK (SWI_NET_PENDING | SWI_CLOCK_MASK)
|
#define SWI_NET_MASK (SWI_NET_PENDING | SWI_LOW_MASK)
|
||||||
#define SWI_VM_MASK (SWI_VM_PENDING | SWI_CLOCK_MASK)
|
#define SWI_VM_MASK (SWI_VM_PENDING | SWI_LOW_MASK)
|
||||||
#define SWI_TQ_MASK (SWI_TQ_PENDING | SWI_CLOCK_MASK)
|
#define SWI_TQ_MASK (SWI_TQ_PENDING | SWI_LOW_MASK)
|
||||||
#define SWI_CLOCK_MASK SWI_CLOCK_PENDING
|
#define SWI_CLOCK_MASK SWI_CLOCK_PENDING
|
||||||
|
#define SWI_LOW_MASK (SWI_TQ_PENDING | SWI_CLOCK_MASK)
|
||||||
#define SWI_MASK (~HWI_MASK)
|
#define SWI_MASK (~HWI_MASK)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -134,7 +134,7 @@ int clkintr_pending;
|
|||||||
int disable_rtc_set; /* disable resettodr() if != 0 */
|
int disable_rtc_set; /* disable resettodr() if != 0 */
|
||||||
volatile u_int idelayed;
|
volatile u_int idelayed;
|
||||||
int statclock_disable;
|
int statclock_disable;
|
||||||
u_int stat_imask = SWI_CLOCK_MASK;
|
u_int stat_imask = SWI_LOW_MASK;
|
||||||
#ifndef TIMER_FREQ
|
#ifndef TIMER_FREQ
|
||||||
#define TIMER_FREQ 1193182
|
#define TIMER_FREQ 1193182
|
||||||
#endif
|
#endif
|
||||||
|
@ -340,7 +340,7 @@ update_intr_masks(void)
|
|||||||
maskptr = intr_mptr[intr];
|
maskptr = intr_mptr[intr];
|
||||||
if (!maskptr)
|
if (!maskptr)
|
||||||
continue;
|
continue;
|
||||||
*maskptr |= SWI_CLOCK_MASK | (1 << intr);
|
*maskptr |= SWI_LOW_MASK | (1 << intr);
|
||||||
mask = *maskptr;
|
mask = *maskptr;
|
||||||
if (mask != intr_mask[intr]) {
|
if (mask != intr_mask[intr]) {
|
||||||
#if 0
|
#if 0
|
||||||
@ -427,7 +427,7 @@ icu_setup(int intr, inthand2_t *handler, void *arg, u_int *maskptr, int flags)
|
|||||||
disable_intr();
|
disable_intr();
|
||||||
intr_handler[intr] = handler;
|
intr_handler[intr] = handler;
|
||||||
intr_mptr[intr] = maskptr;
|
intr_mptr[intr] = maskptr;
|
||||||
intr_mask[intr] = mask | SWI_CLOCK_MASK | (1 << intr);
|
intr_mask[intr] = mask | SWI_LOW_MASK | (1 << intr);
|
||||||
intr_unit[intr] = arg;
|
intr_unit[intr] = arg;
|
||||||
#ifdef FAST_HI
|
#ifdef FAST_HI
|
||||||
if (flags & INTR_FAST) {
|
if (flags & INTR_FAST) {
|
||||||
|
@ -340,7 +340,7 @@ update_intr_masks(void)
|
|||||||
maskptr = intr_mptr[intr];
|
maskptr = intr_mptr[intr];
|
||||||
if (!maskptr)
|
if (!maskptr)
|
||||||
continue;
|
continue;
|
||||||
*maskptr |= SWI_CLOCK_MASK | (1 << intr);
|
*maskptr |= SWI_LOW_MASK | (1 << intr);
|
||||||
mask = *maskptr;
|
mask = *maskptr;
|
||||||
if (mask != intr_mask[intr]) {
|
if (mask != intr_mask[intr]) {
|
||||||
#if 0
|
#if 0
|
||||||
@ -427,7 +427,7 @@ icu_setup(int intr, inthand2_t *handler, void *arg, u_int *maskptr, int flags)
|
|||||||
disable_intr();
|
disable_intr();
|
||||||
intr_handler[intr] = handler;
|
intr_handler[intr] = handler;
|
||||||
intr_mptr[intr] = maskptr;
|
intr_mptr[intr] = maskptr;
|
||||||
intr_mask[intr] = mask | SWI_CLOCK_MASK | (1 << intr);
|
intr_mask[intr] = mask | SWI_LOW_MASK | (1 << intr);
|
||||||
intr_unit[intr] = arg;
|
intr_unit[intr] = arg;
|
||||||
#ifdef FAST_HI
|
#ifdef FAST_HI
|
||||||
if (flags & INTR_FAST) {
|
if (flags & INTR_FAST) {
|
||||||
|
@ -136,7 +136,7 @@ SYSCTL_INT(_hw,HW_FLOATINGPT, floatingpoint,
|
|||||||
"Floatingpoint instructions executed in hardware");
|
"Floatingpoint instructions executed in hardware");
|
||||||
|
|
||||||
#ifndef SMP
|
#ifndef SMP
|
||||||
static u_int npx0_imask = SWI_CLOCK_MASK;
|
static u_int npx0_imask = SWI_LOW_MASK;
|
||||||
static struct gate_descriptor npx_idt_probeintr;
|
static struct gate_descriptor npx_idt_probeintr;
|
||||||
static int npx_intrno;
|
static int npx_intrno;
|
||||||
static volatile u_int npx_intrs_while_probing;
|
static volatile u_int npx_intrs_while_probing;
|
||||||
|
@ -134,7 +134,7 @@ int clkintr_pending;
|
|||||||
int disable_rtc_set; /* disable resettodr() if != 0 */
|
int disable_rtc_set; /* disable resettodr() if != 0 */
|
||||||
volatile u_int idelayed;
|
volatile u_int idelayed;
|
||||||
int statclock_disable;
|
int statclock_disable;
|
||||||
u_int stat_imask = SWI_CLOCK_MASK;
|
u_int stat_imask = SWI_LOW_MASK;
|
||||||
#ifndef TIMER_FREQ
|
#ifndef TIMER_FREQ
|
||||||
#define TIMER_FREQ 1193182
|
#define TIMER_FREQ 1193182
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user