Module Name: src Committed By: cherry Date: Thu Sep 20 05:08:45 UTC 2018
Modified Files: src/sys/arch/x86/x86: intr.c Log Message: When we removed the XEN special case from isa/isa_machdep.c there was a corner case that was missed in x86/intr.c:intr_establish_xname() In isa_machdep.c:isa_intr_establish_xname() the legacy_irq parameter is never set to -1. It is also incorrect to call isa_intr_establish_xname() with a legacy_irq parameter of -1. Thus we infer that whenever we see (legacy_irq == -1) in intr_establish_xname() which is downstream, we were *NOT* called from isa_machdep.c:isa_intr_establish_xname() Given that there are no other users of intr_establish_xnam() which pass a valid legacy_irq != -1, we assume therefore that we *WERE* called from isa_machdep.c:isa_intr_establish_xname() in this case. This is an important distinction in the case where a valid legacy_irq > NUM_LEGACY_IRQS was passed down from isa_intr_establish_xname() but was ignored by xen_pirq_alloc() and overwritten with the "pseudo" irq which is then passed back. We thus pass the incorrect "legacy" irq value to pirq_establish(). Even though non ISA (ie; PCI and MSI(X) cases), this is the correct behaviour, we need to maintain (bug?) compatibility with the isa case. Thus the one liner diff. CVS: ---------------------------------------------------------------------- CVS: CVSROOT cvs.NetBSD.org:/cvsroot CVS: please use "PR category/123" to have the commitmsg appended to PR 123 CVS: CVS: Please evaluate your changes and consider the following. CVS: Abort checkin if you answer no. CVS: => For all changes: CVS: Do the changed files compile? CVS: Has the change been tested? CVS: => If you are not completely familiar with the changed components: CVS: Has the change been posted for review? CVS: Have you allowed enough time for feedback? CVS: => If the change is major: CVS: => If the change adds files to, or removes files from $DESTDIR: CVS: => If you are changing a library or kernel interface: CVS: Have you successfully run "./build.sh release"? To generate a diff of this commit: cvs rdiff -u -r1.129 -r1.130 src/sys/arch/x86/x86/intr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.