[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 13/13] xen: only register 3-level event channel for Dom0
The previous patch is wrong, correct version attached. ----8<----- commit e12daae7f69d6ddc22d3268e8d97048489d4d9ff Author: Wei Liu <wei.liu2@xxxxxxxxxx> Date: Thu Jan 31 14:31:40 2013 +0000 xen: only register 3-level event channel for Dom0 Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx> diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c index 919c7ed..e397c51 100644 --- a/arch/x86/xen/enlighten.c +++ b/arch/x86/xen/enlighten.c @@ -178,7 +178,6 @@ static void xen_vcpu_setup(int cpu) void xen_vcpu_restore(void) { int cpu; - int rc; for_each_possible_cpu(cpu) { bool other_cpu = (cpu != smp_processor_id()); @@ -198,14 +197,20 @@ void xen_vcpu_restore(void) BUG(); } - rc = xen_event_channel_register_nlevel(3); - if (!rc) { - printk(KERN_INFO "Register 3-level event channel succeeded.\n"); - xen_set_event_channel_nlevel(3); + if (xen_initial_domain()) { + int rc = xen_event_channel_register_nlevel(3); + if (!rc) { + printk(KERN_INFO + "Register 3-level event channel succeeded.\n"); + xen_set_event_channel_nlevel(3); + } else { + printk(KERN_INFO + "Register 3-level event channel failed with %d.\n" + "Fall back to default 2-level event channel.\n", + rc); + xen_set_event_channel_nlevel(2); + } } else { - printk(KERN_INFO "Register 3-level event channel failed with %d.\n" - "Fall back to default 2-level event channel.\n", - rc); xen_set_event_channel_nlevel(2); } } diff --git a/drivers/xen/events.c b/drivers/xen/events.c index 87088b2..8467d6a 100644 --- a/drivers/xen/events.c +++ b/drivers/xen/events.c @@ -2261,14 +2261,20 @@ void __init xen_init_IRQ(void) int i, rc; int cpu; - rc = xen_event_channel_register_nlevel(3); - if (!rc) { - printk(KERN_INFO "Register 3-level event channel succeeded.\n"); - xen_set_event_channel_nlevel(3); + if (xen_initial_domain()) { + rc = xen_event_channel_register_nlevel(3); + if (!rc) { + printk(KERN_INFO + "Register 3-level event channel succeeded.\n"); + xen_set_event_channel_nlevel(3); + } else { + printk(KERN_INFO + "Register 3-level event channel failed with %d.\n" + "Fall back to default 2-level event channel.\n", + rc); + xen_set_event_channel_nlevel(2); + } } else { - printk(KERN_INFO "Register 3-level event channel failed with %d.\n" - "Fall back to default 2-level event channel.\n", - rc); xen_set_event_channel_nlevel(2); } _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |