82
83
84
85
86
87
88gate_desc idt_table[256]
89 __attribute__((__section__(".data.idt"))) = { { { { 0, 0 } } }, };
90#endif
91
92static int ignore_nmis;
93
94static inline void conditional_sti(struct pt_regs *regs)
95{
96 if (regs->flags & X86_EFLAGS_IF)
97 local_irq_enable();
98}
99
100static inline void preempt_conditional_sti(struct pt_regs *regs)
101{
102 inc_preempt_count();
103 if (regs->flags & X86_EFLAGS_IF)
104 local_irq_enable();
105}
106
107static inline void preempt_conditional_cli(struct pt_regs *regs)
108{
109 if (regs->flags & X86_EFLAGS_IF)
110 local_irq_disable();
111 dec_preempt_count();
112}
113
114#ifdef CONFIG_X86_32
115static inline void
116die_if_kernel(const char *str, struct pt_regs *regs, long err)
117{
118 if (!user_mode_vm(regs))
119 die(str, regs, err);
120}
121
122