Re: [PATCH] Avoid mask based num_possible_cpus and num_online_cpus -v5
From: Tony Luck
Date: Tue Feb 14 2012 - 18:00:47 EST
On Tue, Feb 14, 2012 at 1:35 PM, Srivatsa S. Bhat
<srivatsa.bhat@xxxxxxxxxxxxxxxxxx> wrote:
> Right. And we should also ensure that nobody messes directly with
> cpu_possible_map as well. I have written up a patch for ia64 (see below).
> Sorry, I haven't even compile tested it - I neither have the toolchain nor the
> hardware. I hope it works!
Thanks for doing this - compiles and seems to work.
Tested-by: Tony Luck <tony.luck@xxxxxxxxx>
Can we get this added to the series - so it gets applied along with
Venki's patch.
> 0 files changed, 0 insertions(+), 0 deletions(-)
I think your patch generation script needs some attention - I see
arch/ia64/kernel/setup.c | 2 +-
arch/ia64/kernel/smp.c | 2 +-
arch/ia64/kernel/smpboot.c | 12 ++++++------
3 files changed, 8 insertions(+), 8 deletions(-)
> @@ -609,7 +609,7 @@ smp_prepare_cpus (unsigned int max_cpus)
> /*
> * We have the boot CPU online for sure.
> */
> - cpu_set(0, cpu_online_map);
> + set_cpu_online(0, true);
> cpu_set(0, cpu_callin_map);
>
> local_cpu_data->loops_per_jiffy = loops_per_jiffy;
Generic code has already marked cpu 0 online ... so this one could
just be dropped (and the preceding comment too). Though it does no
harm to set it again.
-Tony
--
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/