This is a note to let you know that I've just added the patch titled
powerpc: Set nr_cpu_ids early and use it to free PACAs
to the 2.6.38-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
powerpc-set-nr_cpu_ids-early-and-use-it-to-free-pacas.patch
and it can be found in the queue-2.6.38 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.
>From c1854e00727f50f7ac99e98d26ece04c087ef785 Mon Sep 17 00:00:00 2001
From: Ryan Grimm <[email protected]>
Date: Thu, 31 Mar 2011 19:33:02 +0000
Subject: powerpc: Set nr_cpu_ids early and use it to free PACAs
From: Ryan Grimm <[email protected]>
commit c1854e00727f50f7ac99e98d26ece04c087ef785 upstream.
Without this, "holes" in the CPU numbering can cause us to
free too many PACAs
Signed-off-by: Benjamin Herrenschmidt <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
arch/powerpc/kernel/paca.c | 2 +-
arch/powerpc/kernel/setup-common.c | 3 +++
2 files changed, 4 insertions(+), 1 deletion(-)
--- a/arch/powerpc/kernel/paca.c
+++ b/arch/powerpc/kernel/paca.c
@@ -203,7 +203,7 @@ void __init free_unused_pacas(void)
{
int new_size;
- new_size = PAGE_ALIGN(sizeof(struct paca_struct) * num_possible_cpus());
+ new_size = PAGE_ALIGN(sizeof(struct paca_struct) * nr_cpu_ids);
if (new_size >= paca_size)
return;
--- a/arch/powerpc/kernel/setup-common.c
+++ b/arch/powerpc/kernel/setup-common.c
@@ -509,6 +509,9 @@ void __init smp_setup_cpu_maps(void)
*/
cpu_init_thread_core_maps(nthreads);
+ /* Now that possible cpus are set, set nr_cpu_ids for later use */
+ nr_cpu_ids = find_last_bit(cpumask_bits(cpu_possible_mask),NR_CPUS) + 1;
+
free_unused_pacas();
}
#endif /* CONFIG_SMP */
Patches currently in stable-queue which might be from [email protected] are
_______________________________________________
stable mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/stable