direct-io.hg

changeset 7399:420db20e103c

Force RTC driver to fail to load in domU by preventing it
from binding to IRQ8.
Signed-off-by: Keir Fraser <keir@xensource.com>
author kaf24@firebug.cl.cam.ac.uk
date Mon Oct 17 14:02:36 2005 +0100 (2005-10-17)
parents 446aa56ca4fe
children 5e4e11d059a1
files linux-2.6-xen-sparse/arch/xen/kernel/evtchn.c
line diff
     1.1 --- a/linux-2.6-xen-sparse/arch/xen/kernel/evtchn.c	Mon Oct 17 13:50:28 2005 +0100
     1.2 +++ b/linux-2.6-xen-sparse/arch/xen/kernel/evtchn.c	Mon Oct 17 14:02:36 2005 +0100
     1.3 @@ -42,6 +42,7 @@
     1.4  #include <asm-xen/xen-public/physdev.h>
     1.5  #include <asm/hypervisor.h>
     1.6  #include <asm-xen/evtchn.h>
     1.7 +#include <linux/mc146818rtc.h> /* RTC_IRQ */
     1.8  
     1.9  /*
    1.10   * This lock protects updates to the following mapping and reference-count
    1.11 @@ -744,6 +745,13 @@ void __init init_IRQ(void)
    1.12  	{
    1.13  		irq_bindcount[pirq_to_irq(i)] = 1;
    1.14  
    1.15 +#ifdef RTC_IRQ
    1.16 +		/* If not domain 0, force our RTC driver to fail its probe. */
    1.17 +		if ((i == RTC_IRQ) &&
    1.18 +		    !(xen_start_info->flags & SIF_INITDOMAIN))
    1.19 +			continue;
    1.20 +#endif
    1.21 +
    1.22  		irq_desc[pirq_to_irq(i)].status  = IRQ_DISABLED;
    1.23  		irq_desc[pirq_to_irq(i)].action  = 0;
    1.24  		irq_desc[pirq_to_irq(i)].depth   = 1;