]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r363527: Allow swi_sched() to be called from NMI context.
authorAlexander Motin <mav@FreeBSD.org>
Fri, 7 Aug 2020 00:40:28 +0000 (00:40 +0000)
committerAlexander Motin <mav@FreeBSD.org>
Fri, 7 Aug 2020 00:40:28 +0000 (00:40 +0000)
commit3b472044ceed2b6823b9235ea22ce032f195b709
treed954ecd182b0cd0845a9f9c935c868bb035c40ce
parent586642b30e2a4ceafcd4662cbddf8495787cb145
MFC r363527: Allow swi_sched() to be called from NMI context.

For purposes of handling hardware error reported via NMIs I need a way to
escape NMI context, being too restrictive to do something significant.

To do it this change introduces new swi_sched() flag SWI_FROMNMI, making
it careful about used KPIs.  On platforms allowing IPI sending from NMI
context (x86 for now) it immediately wakes clk_intr_event via new IPI_SWI,
otherwise it works just like SWI_DELAY.
12 files changed:
share/man/man9/swi.9
sys/amd64/amd64/apic_vector.S
sys/amd64/amd64/mp_machdep.c
sys/amd64/include/smp.h
sys/i386/i386/apic_vector.s
sys/i386/i386/mp_machdep.c
sys/kern/kern_intr.c
sys/sys/interrupt.h
sys/x86/include/apicvar.h
sys/x86/include/x86_smp.h
sys/x86/x86/mp_x86.c
sys/x86/xen/xen_apic.c