summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--i386/configfrag.ac18
-rw-r--r--i386/i386at/interrupt.S5
-rw-r--r--linux/configfrag.ac5
-rw-r--r--x86_64/interrupt.S6
4 files changed, 22 insertions, 12 deletions
diff --git a/i386/configfrag.ac b/i386/configfrag.ac
index 6cd1fdf7..ec0a3009 100644
--- a/i386/configfrag.ac
+++ b/i386/configfrag.ac
@@ -100,11 +100,29 @@ AC_ARG_ENABLE([apic],
enable_apic=yes
[fi]
+[if [ $mach_ncpus -gt 1 ]; then]
+ # Do not enable in SMP, it is not MP-safe
+ enable_linux_groups=no
+[fi]
+
+[case $host_platform:$host_cpu in
+ at:i?86)
+ :;;
+ *)
+ # Linux glue was only really tested on i386
+ enable_linux_groups=no;;
+esac]
+
[if [ x"$enable_linux_groups" != xno ]; then]
# Linux glue does not like APIC
enable_apic=no
[fi]
+[case $host_platform:$host_cpu in
+ xen:*)
+ enable_apic=no;;
+esac]
+
[if [ x"$enable_apic" = xno ]; then]
AM_CONDITIONAL([enable_apic], [false])
[else]
diff --git a/i386/i386at/interrupt.S b/i386/i386at/interrupt.S
index ac71473b..164b0939 100644
--- a/i386/i386at/interrupt.S
+++ b/i386/i386at/interrupt.S
@@ -124,11 +124,10 @@ _call_handler:
movl S_IRQ,%eax /* copy irq number */
- shll $2,%eax /* irq * 4 */
- movl EXT(iunit)(%eax),%edx /* get device unit number */
+ movl EXT(iunit)(,%eax,4),%edx /* get device unit number */
movl %edx,(%esp) /* unit number as 1st arg */
- call *EXT(ivect)(%eax) /* call interrupt handler */
+ call *EXT(ivect)(,%eax,4) /* call interrupt handler */
movl S_IRQ,%ecx /* restore irq number */
movb EXT(irqinfo)(,%ecx,2),%al /* look up irq_info[irq].trigger */
diff --git a/linux/configfrag.ac b/linux/configfrag.ac
index a4f9c5a9..c851e563 100644
--- a/linux/configfrag.ac
+++ b/linux/configfrag.ac
@@ -55,11 +55,6 @@ dnl USE OF THIS SOFTWARE.
AC_ARG_ENABLE([linux-groups],
AS_HELP_STRING([--disable-linux-groups], [Linux drivers]))
-[if [ $mach_ncpus -gt 1 ]; then]
- # Do not enable in SMP, it is not MP-safe
- enable_linux_groups=no
-[fi]
-
AC_DEFUN([AC_OPTION_Linux_group], [
AC_ARG_ENABLE([$1-group],
AS_HELP_STRING([--enable-$1-group], [$2]),
diff --git a/x86_64/interrupt.S b/x86_64/interrupt.S
index 6c0b4e02..4b2d0482 100644
--- a/x86_64/interrupt.S
+++ b/x86_64/interrupt.S
@@ -123,11 +123,9 @@ _call_handler:
movq S_REGS,S_ARG3 /* address of interrupted registers as 4th arg */
movl S_IRQ,%eax /* copy irq number */
- shll $2,%eax /* irq * 4 */
- movl EXT(iunit)(%rax),%edi /* get device unit number as 1st arg */
+ movl EXT(iunit)(,%rax,4),%edi /* get device unit number as 1st arg */
- shll $1,%eax /* irq * 8 */
- call *EXT(ivect)(%rax) /* call interrupt handler */
+ call *EXT(ivect)(,%rax,8) /* call interrupt handler */
movl S_IRQ,%ecx
movb EXT(irqinfo)(,%rcx,2),%al /* look up irq_info[irq].trigger */