|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-ia64-devel] [RFC][Patch] fix boot xen-ia64 on some ia64 platforms
Hi, Thank you for comments. Isaku Yamahata wrote: On Tue, Apr 21, 2009 at 10:27:02AM +0900, Akio Takebe wrote:Hi, The following changeset broke booting xen-ia64 on some kinds of ia64 boxes. http://xenbits.xensource.com/ext/ia64/xen-unstable.hg/rev/3fd8f9b34941 The tasklet_schedule call raise_softirq(). Because raise_softirq() use per_cpu, if we access per_cpu before cpu_init() the behavior would be unexpected. I make the following patch for this investigation. It can boot xen-ia64 on the ia64 boxes. I'm not sure why Tiger4 can boot the latest xen-ia64. I didn't find a good-looking solution, what do you think about it?Unfortunately, it happened to boot on my tiger4 so that I pushed out the change set. I Understood the issue. Looking into the boot sequence, it seems to somewhat difficult to move down init_console() after cpu_init() and remove all the printk() before cpu_init(). Hmm, it needs some consideration. I also move some function after cpu_init(). But it failed to boot. So we may need such a early_printk(). I think we should not call tasklet_schedule() before softirq_init() at least on x86. So how about the attached patch? BTW, is there similar issue on ia64 linux case before?
No, I have not met.
Best Regards,
Akio Takebe
---
diff -r 8c806c66a597 xen/arch/ia64/xen/xensetup.c
--- a/xen/arch/ia64/xen/xensetup.c Tue Apr 14 14:04:58 2009 +0900
+++ b/xen/arch/ia64/xen/xensetup.c Tue Apr 21 13:42:26 2009 +0900
@@ -564,9 +564,9 @@ skip_move:
end_boot_allocator();
+ late_setup_arch(&cmdline);
+
softirq_init();
-
- late_setup_arch(&cmdline);
scheduler_init();
idle_vcpu[0] = (struct vcpu*) ia64_r13;
diff -r 8c806c66a597 xen/common/softirq.c
--- a/xen/common/softirq.c Tue Apr 14 14:04:58 2009 +0900
+++ b/xen/common/softirq.c Tue Apr 21 13:42:26 2009 +0900
@@ -20,7 +20,7 @@ irq_cpustat_t irq_stat[NR_CPUS];
irq_cpustat_t irq_stat[NR_CPUS];
#endif
-static softirq_handler softirq_handlers[NR_SOFTIRQS];
+softirq_handler softirq_handlers[NR_SOFTIRQS];
asmlinkage void do_softirq(void)
{
diff -r 8c806c66a597 xen/drivers/char/console.c
--- a/xen/drivers/char/console.c Tue Apr 14 14:04:58 2009 +0900
+++ b/xen/drivers/char/console.c Tue Apr 21 13:42:26 2009 +0900
@@ -117,6 +117,8 @@ custom_param("loglvl", parse_loglvl);
custom_param("loglvl", parse_loglvl);
custom_param("guest_loglvl", parse_guest_loglvl);
+extern softirq_handler softirq_handlers[NR_SOFTIRQS];
+
static atomic_t print_everything = ATOMIC_INIT(0);
#define ___parse_loglvl(s, ps, lvlstr, lvlnum) \
@@ -354,7 +356,10 @@ static long guest_console_write(XEN_GUES
{
for ( kptr = kbuf; *kptr != '\0'; kptr++ )
putchar_console_ring(*kptr);
- tasklet_schedule(¬ify_dom0_con_ring_tasklet);
+ if (softirq_handlers[TASKLET_SOFTIRQ])
+ tasklet_schedule(¬ify_dom0_con_ring_tasklet);
+ else
+ send_guest_global_virq(dom0, VIRQ_CON_RING);
}
spin_unlock_irq(&console_lock);
@@ -435,7 +440,10 @@ static void __putstr(const char *str)
{
while ( (c = *str++) != '\0' )
putchar_console_ring(c);
- tasklet_schedule(¬ify_dom0_con_ring_tasklet);
+ if (softirq_handlers[TASKLET_SOFTIRQ])
+ tasklet_schedule(¬ify_dom0_con_ring_tasklet);
+ else
+ send_guest_global_virq(dom0, VIRQ_CON_RING);
}
}
_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ia64-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |