preempt.h (68f0f2690e183306b52671a9ad09fb31808b0500) | preempt.h (69ea03b56ed2c7189ccd0b5910ad39f3cad1df21) |
---|---|
1/* SPDX-License-Identifier: GPL-2.0 */ 2#ifndef __LINUX_PREEMPT_H 3#define __LINUX_PREEMPT_H 4 5/* 6 * include/linux/preempt.h - macros for accessing and manipulating 7 * preempt_count (used for kernel preemption, interrupt count, etc.) 8 */ --- 12 unchanged lines hidden (view full) --- 21 * interrupts in the system, but we run all interrupt handlers with 22 * interrupts disabled, so we cannot have nesting interrupts. Though 23 * there are a few palaeontologic drivers which reenable interrupts in 24 * the handler, so we need more than one bit here. 25 * 26 * PREEMPT_MASK: 0x000000ff 27 * SOFTIRQ_MASK: 0x0000ff00 28 * HARDIRQ_MASK: 0x000f0000 | 1/* SPDX-License-Identifier: GPL-2.0 */ 2#ifndef __LINUX_PREEMPT_H 3#define __LINUX_PREEMPT_H 4 5/* 6 * include/linux/preempt.h - macros for accessing and manipulating 7 * preempt_count (used for kernel preemption, interrupt count, etc.) 8 */ --- 12 unchanged lines hidden (view full) --- 21 * interrupts in the system, but we run all interrupt handlers with 22 * interrupts disabled, so we cannot have nesting interrupts. Though 23 * there are a few palaeontologic drivers which reenable interrupts in 24 * the handler, so we need more than one bit here. 25 * 26 * PREEMPT_MASK: 0x000000ff 27 * SOFTIRQ_MASK: 0x0000ff00 28 * HARDIRQ_MASK: 0x000f0000 |
29 * NMI_MASK: 0x00100000 | 29 * NMI_MASK: 0x00f00000 |
30 * PREEMPT_NEED_RESCHED: 0x80000000 31 */ 32#define PREEMPT_BITS 8 33#define SOFTIRQ_BITS 8 34#define HARDIRQ_BITS 4 | 30 * PREEMPT_NEED_RESCHED: 0x80000000 31 */ 32#define PREEMPT_BITS 8 33#define SOFTIRQ_BITS 8 34#define HARDIRQ_BITS 4 |
35#define NMI_BITS 1 | 35#define NMI_BITS 4 |
36 37#define PREEMPT_SHIFT 0 38#define SOFTIRQ_SHIFT (PREEMPT_SHIFT + PREEMPT_BITS) 39#define HARDIRQ_SHIFT (SOFTIRQ_SHIFT + SOFTIRQ_BITS) 40#define NMI_SHIFT (HARDIRQ_SHIFT + HARDIRQ_BITS) 41 42#define __IRQ_MASK(x) ((1UL << (x))-1) 43 --- 312 unchanged lines hidden --- | 36 37#define PREEMPT_SHIFT 0 38#define SOFTIRQ_SHIFT (PREEMPT_SHIFT + PREEMPT_BITS) 39#define HARDIRQ_SHIFT (SOFTIRQ_SHIFT + SOFTIRQ_BITS) 40#define NMI_SHIFT (HARDIRQ_SHIFT + HARDIRQ_BITS) 41 42#define __IRQ_MASK(x) ((1UL << (x))-1) 43 --- 312 unchanged lines hidden --- |