Re: [PATCH -v2 2/2] x86, cpu hotplug: Fix cpu bringup concurrencyissue

From: Borislav Petkov
Date: Wed Aug 18 2010 - 15:29:30 EST


From: "H. Peter Anvin" <hpa@xxxxxxxxx>
Date: Wed, Aug 18, 2010 at 03:03:33PM -0400

> On 08/16/2010 05:39 AM, Borislav Petkov wrote:
> >
> > diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig
> > index dcb0593..1598663 100644
> > --- a/arch/x86/Kconfig
> > +++ b/arch/x86/Kconfig
> > @@ -58,6 +58,7 @@ config X86
> > select ANON_INODES
> > select HAVE_ARCH_KMEMCHECK
> > select HAVE_USER_RETURN_NOTIFIER
> > + select ARCH_CPU_PROBE_RELEASE
> >
>
> warning: (X86) selects ARCH_CPU_PROBE_RELEASE which has unmet direct
> dependencies (HOTPLUG_CPU)

well I got

+config ARCH_CPU_PROBE_RELEASE
+ def_bool y
+ depends on HOTPLUG_CPU

but I guess ARCH_CPU_PROBE_RELEASE gets selected still. Why isn't that
"depends on" forcing it, I guess select is stronger.

> ... and build failure when compiling without CONFIG_HOTPLUG_CPU.

This hunk fixes the !CONFIG_HOTPLUG_CPU build here but I should've
caught it earlier, shame on me. Sorry for the inconvenience, can you
please drop this second patch for now, I'll send you a revised version
tomorrow.

Thanks.

diff --git a/drivers/base/cpu.c b/drivers/base/cpu.c
index 251acea..273cfb9 100644
--- a/drivers/base/cpu.c
+++ b/drivers/base/cpu.c
@@ -261,7 +261,7 @@ int __init cpu_dev_init(void)
}

static struct sysdev_class_attribute *cpu_sysdev_class_attrs[] = {
-#ifdef CONFIG_ARCH_CPU_PROBE_RELEASE
+#if defined(CONFIG_ARCH_CPU_PROBE_RELEASE) && defined(CONFIG_HOTPLUG_CPU)
&attr_probe,
&attr_release,
#endif


--
Regards/Gruss,
Boris.

Advanced Micro Devices GmbH
Einsteinring 24, 85609 Dornach
General Managers: Alberto Bozzo, Andrew Bowd
Registration: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/