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.

BTW, is there similar issue on ia64 linux case before?

thanks,

> 
> diff -r 8c806c66a597 xen/arch/ia64/linux-xen/setup.c
> --- a/xen/arch/ia64/linux-xen/setup.c Tue Apr 14 14:04:58 2009 +0900
> +++ b/xen/arch/ia64/linux-xen/setup.c Tue Apr 21 12:03:44 2009 +0900
> @@ -67,6 +67,7 @@
>  #include <xen/kexec.h>
>  #endif
> 
> +int enable_dom0_con_tasklet=0;
>  #if defined(CONFIG_SMP) && (IA64_CPU_SIZE > PAGE_SIZE)
>  # error "struct cpuinfo_ia64 too big!"
>  #endif
> @@ -592,6 +593,9 @@ late_setup_arch (char **cmdline_p)
>  #endif
> 
>       cpu_init();     /* initialize the bootstrap CPU */
> +
> +     enable_dom0_con_tasklet=1;
> +     printk("AAA: enable_dom0_con_tasklet\n");
> 
>  #ifdef CONFIG_ACPI_BOOT
>       acpi_boot_init();
> 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 12:03:44 2009 +0900
> @@ -117,6 +117,8 @@ custom_param("loglvl", parse_loglvl);
>  custom_param("loglvl", parse_loglvl);
>  custom_param("guest_loglvl", parse_guest_loglvl);
> 
> +extern int enable_dom0_con_tasklet;
> +
>  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(&notify_dom0_con_ring_tasklet);
> +              if (enable_dom0_con_tasklet )
> +                tasklet_schedule(&notify_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(&notify_dom0_con_ring_tasklet);
> +        if (enable_dom0_con_tasklet )
> +            tasklet_schedule(&notify_dom0_con_ring_tasklet);
> +     else
> +            send_guest_global_virq(dom0, VIRQ_CON_RING);
>      }
>  }
> 
> 
> Best Regards,
> 
> Akio Takebe
> 
> _______________________________________________
> Xen-ia64-devel mailing list
> Xen-ia64-devel@lists.xensource.com
> http://lists.xensource.com/xen-ia64-devel
> 

-- 
yamahata

_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel@lists.xensource.com
http://lists.xensource.com/xen-ia64-devel

Reply via email to