ia64/xen-unstable

changeset 5780:ca90d2903b7b

Auto-disable IRQ balancing/affinity on buggy chipsets.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Thu Jul 14 11:09:21 2005 +0000 (2005-07-14)
parents 57dfd651cca4
children 98b83cc57eca
files linux-2.6-xen-sparse/arch/xen/i386/kernel/Makefile linux-2.6-xen-sparse/arch/xen/x86_64/kernel/Makefile xen/arch/x86/dom0_ops.c xen/arch/x86/irq.c xen/include/public/dom0_ops.h
line diff
     1.1 --- a/linux-2.6-xen-sparse/arch/xen/i386/kernel/Makefile	Thu Jul 14 10:37:49 2005 +0000
     1.2 +++ b/linux-2.6-xen-sparse/arch/xen/i386/kernel/Makefile	Thu Jul 14 11:09:21 2005 +0000
     1.3 @@ -10,12 +10,12 @@ extra-y := head.o init_task.o
     1.4  
     1.5  obj-y	:= process.o signal.o entry.o traps.o \
     1.6  		time.o ioport.o ldt.o setup.o \
     1.7 -		pci-dma.o i386_ksyms.o irq.o
     1.8 +		pci-dma.o i386_ksyms.o irq.o quirks.o
     1.9  
    1.10  c-obj-y	:= semaphore.o vm86.o \
    1.11  		ptrace.o sys_i386.o \
    1.12  		i387.o dmi_scan.o bootflag.o \
    1.13 -		doublefault.o quirks.o
    1.14 +		doublefault.o
    1.15  s-obj-y	:=
    1.16  
    1.17  obj-y				+= cpu/
     2.1 --- a/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/Makefile	Thu Jul 14 10:37:49 2005 +0000
     2.2 +++ b/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/Makefile	Thu Jul 14 11:09:21 2005 +0000
     2.3 @@ -51,7 +51,7 @@ topology-y                     += ../../
     2.4  swiotlb-$(CONFIG_SWIOTLB)      += ../../../ia64/lib/swiotlb.o
     2.5  microcode-$(subst m,y,$(CONFIG_MICROCODE))  += ../../../i386/kernel/microcode.o
     2.6  intel_cacheinfo-y		+= ../../../i386/kernel/cpu/intel_cacheinfo.o
     2.7 -quirks-y			+= ../../../i386/kernel/quirks.o
     2.8 +quirks-y			+= ../../i386/kernel/quirks.o
     2.9  
    2.10  c-link	:= init_task.o
    2.11  s-link	:= vsyscall.o 
     3.1 --- a/xen/arch/x86/dom0_ops.c	Thu Jul 14 10:37:49 2005 +0000
     3.2 +++ b/xen/arch/x86/dom0_ops.c	Thu Jul 14 11:09:21 2005 +0000
     3.3 @@ -18,6 +18,7 @@
     3.4  #include <xen/trace.h>
     3.5  #include <xen/console.h>
     3.6  #include <asm/shadow.h>
     3.7 +#include <asm/irq.h>
     3.8  #include <public/sched_ctl.h>
     3.9  
    3.10  #include <asm/mtrr.h>
    3.11 @@ -371,6 +372,23 @@ long arch_do_dom0_op(dom0_op_t *op, dom0
    3.12      }
    3.13      break;
    3.14  
    3.15 +    case DOM0_PLATFORM_QUIRK:
    3.16 +    {
    3.17 +        extern int opt_noirqbalance;
    3.18 +        switch ( op->u.platform_quirk.quirk_id )
    3.19 +        {
    3.20 +        case QUIRK_NOIRQBALANCING:
    3.21 +            printk("Platform quirk -- Disabling IRQ balancing/affinity.\n");
    3.22 +            opt_noirqbalance = 1;
    3.23 +            setup_ioapic_dest();
    3.24 +            break;
    3.25 +        default:
    3.26 +            ret = -EINVAL;
    3.27 +            break;
    3.28 +        }
    3.29 +    }
    3.30 +    break;
    3.31 +
    3.32      default:
    3.33          ret = -ENOSYS;
    3.34  
     4.1 --- a/xen/arch/x86/irq.c	Thu Jul 14 10:37:49 2005 +0000
     4.2 +++ b/xen/arch/x86/irq.c	Thu Jul 14 11:09:21 2005 +0000
     4.3 @@ -16,7 +16,7 @@
     4.4  #include <asm/smpboot.h>
     4.5  
     4.6  /* opt_noirqbalance: If true, software IRQ balancing/affinity is disabled. */
     4.7 -static int opt_noirqbalance = 0;
     4.8 +int opt_noirqbalance = 0;
     4.9  boolean_param("noirqbalance", opt_noirqbalance);
    4.10  
    4.11  irq_desc_t irq_desc[NR_IRQS];
     5.1 --- a/xen/include/public/dom0_ops.h	Thu Jul 14 10:37:49 2005 +0000
     5.2 +++ b/xen/include/public/dom0_ops.h	Thu Jul 14 11:09:21 2005 +0000
     5.3 @@ -357,7 +357,7 @@ typedef struct {
     5.4      u64     cpu_time;                 
     5.5  } dom0_getvcpucontext_t;
     5.6  
     5.7 -#define DOM0_GETDOMAININFOLIST    38
     5.8 +#define DOM0_GETDOMAININFOLIST   38
     5.9  typedef struct {
    5.10      /* IN variables. */
    5.11      domid_t               first_domain;
    5.12 @@ -367,6 +367,13 @@ typedef struct {
    5.13      memory_t              num_domains;
    5.14  } dom0_getdomaininfolist_t;
    5.15  
    5.16 +#define DOM0_PLATFORM_QUIRK      39  
    5.17 +#define QUIRK_NOIRQBALANCING  1
    5.18 +typedef struct {
    5.19 +    /* IN variables. */
    5.20 +    int quirk_id;
    5.21 +} dom0_platform_quirk_t;
    5.22 +
    5.23  typedef struct {
    5.24      u32 cmd;
    5.25      u32 interface_version; /* DOM0_INTERFACE_VERSION */
    5.26 @@ -400,6 +407,7 @@ typedef struct {
    5.27          dom0_ioport_permission_t ioport_permission;
    5.28          dom0_getvcpucontext_t    getvcpucontext;
    5.29          dom0_getdomaininfolist_t getdomaininfolist;
    5.30 +        dom0_platform_quirk_t    platform_quirk;
    5.31      } u;
    5.32  } dom0_op_t;
    5.33