Re: [Fastboot] [PATCH] kexec: Fix CONFIG_SMP=n compilation (ia64)

From: Magnus Damm <magnus.damm_at_gmail.com>
Date: 2007-02-05 17:41:37
On 2/3/07, Horms <horms@verge.net.au> wrote:
> On Fri, Feb 02, 2007 at 08:53:00PM +0900, Magnus Damm wrote:
> > On 2/2/07, Magnus Damm <magnus.damm@gmail.com> wrote:
> > > On 2/2/07, Andrew Morton <akpm@linux-foundation.org> wrote:
> > > > Magnus Damm <magnus@valinux.co.jp> wrote:
> > > >
> > > > > kexec: Fix CONFIG_SMP=n compilation (ia64)
> > > > >
> > > > > This patch makes it possible to compile kexec for ia64 without SMP support.
> > > > > --- 0002/arch/ia64/kernel/machine_kexec.c
> > > > > +++ work/arch/ia64/kernel/machine_kexec.c     2007-02-01 12:35:46.000000000 +0900
> > > > > @@ -70,12 +70,14 @@ void machine_kexec_cleanup(struct kimage
> > > > >
> > > > >  void machine_shutdown(void)
> > > > >  {
> > > > > +#ifdef CONFIG_SMP
> > > > >       int cpu;
> > > > >
> > > > >       for_each_online_cpu(cpu) {
> > > > >               if (cpu != smp_processor_id())
> > > > >                       cpu_down(cpu);
> > > > >       }
> > > > > +#endif
> > > > >       kexec_disable_iosapic();
> > > > >  }
> > > >
> > > > hm.  I suspect this one should have been #ifndef CONFIG_HOTPLUG_CPU?
> >
> > Re-reading this I assume you mean #ifdef CONFIG_HOTPLUG_CPU.
> >
> > I would be happy to resend a new updated version of the patch, but I
> > wonder if it may be better to fail miserably during the build than
> > fail silently in the case of CONFIG_SMP=y but CONFIG_HOTPLUG_CPU=n.
>
> There used to be alternate code for the CONFIG_SMP +
> !CONFIG_HOTPLUG_CPU, but this was removed because it was determined to
> be flakey and not maintainable (I can dig up the threads if you want).
> I think that this means that if we have CONFIG_KEXEC and CONFIG_SMP then
> CONFIG_HOTPLUG_CPU is required. I think this is expressable in Kconfig
> somehow.

My mistake, the following lines from linux-2.6.20/arch/ia64/Kconfig
seem to handle this case already:

config KEXEC
	bool "kexec system call (EXPERIMENTAL)"
	depends on EXPERIMENTAL && !IA64_HP_SIM && (!SMP || HOTPLUG_CPU)

I'll send an updated patch in a short while. Thanks!

/ magnus
-
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Received on Mon Feb 05 17:45:58 2007

This archive was generated by hypermail 2.1.8 : 2007-02-05 17:46:14 EST