Last active
July 4, 2016 08:44
-
-
Save retrage/5dd99764268e39537d127e7a5abb26be to your computer and use it in GitHub Desktop.
Fix NetBSD de(4) problem on Hyper-V
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Index: amd64/include/i82093reg.h | |
=================================================================== | |
RCS file: /cvs/cvsroot/src/sys/arch/amd64/include/i82093reg.h,v | |
retrieving revision 1.5 | |
diff -u -r1.5 i82093reg.h | |
--- amd64/include/i82093reg.h 3 Jul 2008 14:02:25 -0000 1.5 | |
+++ amd64/include/i82093reg.h 4 Jul 2016 08:45:00 -0000 | |
@@ -50,6 +50,7 @@ | |
movq IOAPIC_SC_DATA(%rdi),%r15 ;\ | |
movl (%r15),%esi ;\ | |
orl $IOAPIC_REDLO_MASK,%esi ;\ | |
+ andl $~IOAPIC_REDLO_RIRR,%esi ;\ | |
movl %esi,(%r15) ;\ | |
movq IS_PIC(%r14),%rdi ;\ | |
ioapic_asm_unlock(num) | |
@@ -66,7 +67,7 @@ | |
movq IOAPIC_SC_DATA(%rdi),%r13 ;\ | |
movl %esi, (%r15) ;\ | |
movl (%r13),%r12d ;\ | |
- andl $~IOAPIC_REDLO_MASK,%r12d ;\ | |
+ andl $~(IOAPIC_REDLO_MASK|IOAPIC_REDLO_RIRR),%r12d ;\ | |
movl %esi,(%r15) ;\ | |
movl %r12d,(%r13) ;\ | |
movq IS_PIC(%r14),%rdi ;\ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Index: x86/x86/ioapic.c | |
=================================================================== | |
RCS file: /cvs/cvsroot/src/sys/arch/x86/x86/ioapic.c,v | |
retrieving revision 1.52 | |
diff -u -r1.52 ioapic.c | |
--- x86/x86/ioapic.c 27 Jul 2015 15:45:20 -0000 1.52 | |
+++ x86/x86/ioapic.c 4 Jul 2016 08:43:56 -0000 | |
@@ -508,6 +508,7 @@ | |
flags = ioapic_lock(sc); | |
redlo = ioapic_read_ul(sc, IOAPIC_REDLO(pin)); | |
redlo |= IOAPIC_REDLO_MASK; | |
+ redlo &= ~IOAPIC_REDLO_RIRR; | |
ioapic_write_ul(sc, IOAPIC_REDLO(pin), redlo); | |
ioapic_unlock(sc, flags); | |
} | |
@@ -548,7 +549,7 @@ | |
flags = ioapic_lock(sc); | |
redlo = ioapic_read_ul(sc, IOAPIC_REDLO(pin)); | |
- redlo &= ~IOAPIC_REDLO_MASK; | |
+ redlo &= ~(IOAPIC_REDLO_MASK | IOAPIC_REDLO_RIRR); | |
ioapic_write_ul(sc, IOAPIC_REDLO(pin), redlo); | |
ioapic_unlock(sc, flags); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment