[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <4FC64D0C.5090603@redhat.com>
Date: Wed, 30 May 2012 18:38:36 +0200
From: Igor Mammedov <imammedo@...hat.com>
To: Rob Landley <rob@...dley.net>
CC: linux-kernel@...r.kernel.org, tglx@...utronix.de, mingo@...hat.com,
hpa@...or.com, x86@...nel.org, luto@....edu,
suresh.b.siddha@...el.com, avi@...hat.com, a.p.zijlstra@...llo.nl,
johnstul@...ibm.com, arjan@...ux.intel.com
Subject: Re: [RFC v2] [x86]: abort secondary cpu bringup gracefully
On 05/25/2012 08:11 PM, Rob Landley wrote:
> On 05/24/2012 10:41 AM, Igor Mammedov wrote:
>> ping for reviewers.
>>
>> Please review patch.
>
> I can't hugely comment on the guts of what the patch is doing, but:
>
>>> --- a/arch/x86/kernel/smpboot.c
>>> +++ b/arch/x86/kernel/smpboot.c
>>> @@ -136,6 +136,10 @@ EXPORT_PER_CPU_SYMBOL(cpu_info);
>>>
>>> atomic_t init_deasserted;
>>>
>>> +#ifdef CONFIG_HOTPLUG_CPU
>>> +static void remove_siblinginfo(int cpu);
>>> +#endif
>>> +
>
> #ifdefs should almost never be in C code, they should be in header
> files. You can stub out functions with empty inline versions. For a
> random example, see kernel/smpboot.h
If it were not just local function, then I'd do so. But since this
function is used only in this file and defined under the same #ifdefs
after smp_callin(), it could stay there and not pollute headers
with non public function declaration.
I made remove_siblinginfo() a forward declaration before smp_callin(),
because of I didn't have much justification to move ~20 lines function
to be available a bit earlier that it is now.
However thanks for mentioning stubs. I should add stub for building
kernel without CONFIG_HOTPLUG_CPU, to prevent build breakage.
I'll fix and repost patch.
--
-----
Igor
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists