aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/include/asm/lppaca.h
diff options
context:
space:
mode:
authorChris Metcalf <cmetcalf@tilera.com>2011-03-17 14:14:12 -0400
committerChris Metcalf <cmetcalf@tilera.com>2011-03-17 14:14:12 -0400
commit325d1605542960903c88409b199734a3d8fc6612 (patch)
tree9d8eeed393a3b5dcadd1ddb6b76634b464fd6bc7 /arch/powerpc/include/asm/lppaca.h
parentarch/tile: fix deadlock bugs in rwlock implementation (diff)
parentLinux 2.6.38 (diff)
downloadlinux-dev-325d1605542960903c88409b199734a3d8fc6612.tar.xz
linux-dev-325d1605542960903c88409b199734a3d8fc6612.zip
Merge tag 'v2.6.38' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 into for-linus
Diffstat (limited to 'arch/powerpc/include/asm/lppaca.h')
-rw-r--r--arch/powerpc/include/asm/lppaca.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/lppaca.h b/arch/powerpc/include/asm/lppaca.h
index 380d48bacd16..26b8c807f8f1 100644
--- a/arch/powerpc/include/asm/lppaca.h
+++ b/arch/powerpc/include/asm/lppaca.h
@@ -33,9 +33,25 @@
//
//----------------------------------------------------------------------------
#include <linux/cache.h>
+#include <linux/threads.h>
#include <asm/types.h>
#include <asm/mmu.h>
+/*
+ * We only have to have statically allocated lppaca structs on
+ * legacy iSeries, which supports at most 64 cpus.
+ */
+#ifdef CONFIG_PPC_ISERIES
+#if NR_CPUS < 64
+#define NR_LPPACAS NR_CPUS
+#else
+#define NR_LPPACAS 64
+#endif
+#else /* not iSeries */
+#define NR_LPPACAS 1
+#endif
+
+
/* The Hypervisor barfs if the lppaca crosses a page boundary. A 1k
* alignment is sufficient to prevent this */
struct lppaca {