【发布时间】:2014-09-26 07:58:03
【问题描述】:
如果 Linux softirq 通过中断 Linux 内核模式运行,并且被中断的任务正在使用 FPU,则不允许在 softirq 中使用 FPU。
如果被中断的任务是用户态进程,它仍然可以在 softirq 中使用 FPU,但不能中断内核态。
讨论中的代码如下。
问题是,为什么会这样?
static inline bool interrupted_kernel_fpu_idle(void)
{
return !__thread_has_fpu(current) &&
(read_cr0() & X86_CR0_TS);
}
【问题讨论】:
标签: c linux assembly linux-kernel x86