summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Zammit <damien@zamaudio.com>2019-11-10 13:26:58 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2019-11-10 13:28:38 +0100
commitde7a51dbb8af4ad7a541067f41ae4e8c2dd42711 (patch)
tree89f5e9add472e78e82692e3304fbe5c12b973405
parente25084d499bf62241792dde77f97159cf6dd3c55 (diff)
spl: Squash levels 1-6 into level 7
* i386/i386/spl.S (SETIPL): Remove macro. (splsoftclock, spl1, spl2, spl3, splnet, splhdw, spl4, splbio, spldcm, spl5, spltty, splimp, splvm, spl6): Move entries to the spl7 entry.
-rw-r--r--i386/i386/spl.S43
1 files changed, 11 insertions, 32 deletions
diff --git a/i386/i386/spl.S b/i386/i386/spl.S
index 307739f5..20a80766 100644
--- a/i386/i386/spl.S
+++ b/i386/i386/spl.S
@@ -30,25 +30,6 @@
#endif
/*
- * Set IPL to the specified value.
- *
- * NOTE: Normally we would not have to enable interrupts
- * here. Linux drivers, however, use cli()/sti(), so we must
- * guard against the case where a Mach routine which
- * has done an spl() calls a Linux routine that returns
- * with interrupts disabled. A subsequent splx() can,
- * potentially, return with interrupts disabled.
- */
-#define SETIPL(level) \
- mb; \
- movl $(level),%edx; \
- cmpl EXT(curr_ipl),%edx; \
- jne spl; \
- sti; \
- movl %edx,%eax; \
- ret
-
-/*
* Program PICs with mask in %eax.
*/
#ifndef MACH_XEN
@@ -117,39 +98,37 @@ ENTRY(spl0)
popl %eax /* return previous mask */
ret
+
+/*
+ * Historically, SETIPL(level) was called
+ * for spl levels 1-6, now we have combined
+ * all the intermediate levels into the highest level
+ * such that interrupts are either on or off,
+ * since modern hardware can handle it.
+ * This simplifies the interrupt handling
+ * especially for the linux drivers.
+ */
Entry(splsoftclock)
ENTRY(spl1)
- SETIPL(SPL1)
-
ENTRY(spl2)
- SETIPL(SPL2)
-
ENTRY(spl3)
- SETIPL(SPL3)
-
Entry(splnet)
Entry(splhdw)
ENTRY(spl4)
- SETIPL(SPL4)
-
Entry(splbio)
Entry(spldcm)
ENTRY(spl5)
- SETIPL(SPL5)
-
Entry(spltty)
Entry(splimp)
Entry(splvm)
ENTRY(spl6)
- SETIPL(SPL6)
-
Entry(splclock)
Entry(splsched)
Entry(splhigh)
Entry(splhi)
ENTRY(spl7)
mb;
- /* ipl7 just clears IF */
+ /* just clear IF */
movl $SPL7,%eax
xchgl EXT(curr_ipl),%eax
cli