From 7d45c12ce45d15aab93214ea214d6b5b4bbb8689 Mon Sep 17 00:00:00 2001 From: Justus Winter <4winter@informatik.uni-hamburg.de> Date: Sat, 7 Mar 2015 17:07:46 +0100 Subject: add revert-spl-thing.patch --- debian/patches/revert-spl-thing.patch | 108 ++++++++++++++++++++++++++++++++++ debian/patches/series | 1 + 2 files changed, 109 insertions(+) create mode 100644 debian/patches/revert-spl-thing.patch diff --git a/debian/patches/revert-spl-thing.patch b/debian/patches/revert-spl-thing.patch new file mode 100644 index 0000000..de4fbb8 --- /dev/null +++ b/debian/patches/revert-spl-thing.patch @@ -0,0 +1,108 @@ +commit f36b303045935bfd5ff830023e2dcf6e3124432a +Author: Justus Winter <4winter@informatik.uni-hamburg.de> +Date: Sat Mar 7 10:28:19 2015 +0100 + + Revert "Make spl7 just clear IF instead of setting the PIC mask" + + This reverts commit 6f8e390eea2ac9aaa754e1ab2ecd73af5857f798. + +diff --git a/i386/i386/locore.S b/i386/i386/locore.S +index cfda86f..fe39b67 100644 +--- a/i386/i386/locore.S ++++ b/i386/i386/locore.S +@@ -119,7 +119,6 @@ LEXT(retry_table_end) ;\ + * Uses %eax, %ebx, %ecx. + */ + #define TIME_TRAP_UENTRY \ +- pushf /* Save flags */ ;\ + cli /* block interrupts */ ;\ + movl VA_ETC,%ebx /* get timer value */ ;\ + movl CX(EXT(current_tstamp),%edx),%ecx /* get old time stamp */;\ +@@ -132,7 +131,7 @@ LEXT(retry_table_end) ;\ + 0: addl $(TH_SYSTEM_TIMER-TH_USER_TIMER),%ecx ;\ + /* switch to sys timer */;\ + movl %ecx,CX(EXT(current_timer),%edx) /* make it current */ ;\ +- popf /* allow interrupts */ ++ sti /* allow interrupts */ + + /* + * Update time on system call entry. +@@ -142,7 +141,6 @@ LEXT(retry_table_end) ;\ + * Same as TIME_TRAP_UENTRY, but preserves %eax. + */ + #define TIME_TRAP_SENTRY \ +- pushf /* Save flags */ ;\ + cli /* block interrupts */ ;\ + movl VA_ETC,%ebx /* get timer value */ ;\ + movl CX(EXT(current_tstamp),%edx),%ecx /* get old time stamp */;\ +@@ -157,7 +155,7 @@ LEXT(retry_table_end) ;\ + 0: addl $(TH_SYSTEM_TIMER-TH_USER_TIMER),%ecx ;\ + /* switch to sys timer */;\ + movl %ecx,CX(EXT(current_timer),%edx) /* make it current */ ;\ +- popf /* allow interrupts */ ++ sti /* allow interrupts */ + + /* + * update time on user trap exit. +diff --git a/i386/i386/spl.S b/i386/i386/spl.S +index 41458ac..3c07509 100644 +--- a/i386/i386/spl.S ++++ b/i386/i386/spl.S +@@ -140,35 +140,15 @@ Entry(splsched) + Entry(splhigh) + Entry(splhi) + ENTRY(spl7) +- /* ipl7 just clears IF */ +- movl $SPL7,%eax +- xchgl EXT(curr_ipl),%eax +- cli +- ret ++ SETIPL(SPL7) + + ENTRY(splx) + movl S_ARG0,%edx /* get ipl */ +- +-#if MACH_KDB || MACH_TTD +- /* First make sure that if we're exitting from ipl7, IF is still cleared */ +- cmpl $SPL7,EXT(curr_ipl) /* from ipl7? */ +- jne 0f +- pushfl +- popl %eax +- testl $0x200,%eax /* IF? */ +- jz 0f +- int3 /* Oops, interrupts got enabled?! */ +- +-0: +-#endif /* MACH_KDB || MACH_TTD */ + testl %edx,%edx /* spl0? */ + jz EXT(spl0) /* yes, handle specially */ + cmpl EXT(curr_ipl),%edx /* same ipl as current? */ + jne spl /* no */ +- cmpl $SPL7,%edx /* spl7? */ +- je 1f /* to ipl7, don't enable interrupts */ + sti /* ensure interrupts are enabled */ +-1: + movl %edx,%eax /* return previous ipl */ + ret + +@@ -227,20 +207,6 @@ splx_cli: + .align TEXT_ALIGN + .globl spl + spl: +-#if MACH_KDB || MACH_TTD +- /* First make sure that if we're exitting from ipl7, IF is still cleared */ +- cmpl $SPL7,EXT(curr_ipl) /* from ipl7? */ +- jne 0f +- pushfl +- popl %eax +- testl $0x200,%eax /* IF? */ +- jz 0f +- int3 /* Oops, interrupts got enabled?! */ +- +-0: +-#endif /* MACH_KDB || MACH_TTD */ +- cmpl $SPL7,%edx /* spl7? */ +- je EXT(spl7) /* yes, handle specially */ + movl EXT(pic_mask)(,%edx,4),%eax + /* get PIC mask */ + cli /* disable interrupts */ diff --git a/debian/patches/series b/debian/patches/series index f8f5c70..d0f85d2 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -9,3 +9,4 @@ vm_cache_policy.patch vm_page_cleanq.patch task-load.patch 0001-kern-inherit-the-name-of-the-parent-task.patch +revert-spl-thing.patch -- cgit v1.2.3