aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/mm/hugetlbpage.c
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2007-03-09 18:05:37 -0500
committerArnd Bergmann <arnd@klappe.arndb.de>2007-03-09 18:07:50 -0500
commit94b2a4393c500a620de90c3266d595926302e26b (patch)
treecde58177f430751b67a7aa47f3f89042e91357bf /arch/powerpc/mm/hugetlbpage.c
parent50b520d4efbce45281f58112789470ec7965fd33 (diff)
[POWERPC] Fix spu SLB invalidations
The SPU code doesn't properly invalidate SPUs SLBs when necessary, for example when changing a segment size from the hugetlbfs code. In addition, it saves and restores the SLB content on context switches which makes it harder to properly handle those invalidations. This patch removes the saving & restoring for now, something more efficient might be found later on. It also adds a spu_flush_all_slbs(mm) that can be used by the core mm code to flush the SLBs of all SPEs that are running a given mm at the time of the flush. In order to do that, it adds a spinlock to the list of all SPEs and move some bits & pieces from spufs to spu_base.c Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/mm/hugetlbpage.c')
-rw-r--r--arch/powerpc/mm/hugetlbpage.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/powerpc/mm/hugetlbpage.c b/arch/powerpc/mm/hugetlbpage.c
index 8c77c791f87e..f6ffaaa7a5bf 100644
--- a/arch/powerpc/mm/hugetlbpage.c
+++ b/arch/powerpc/mm/hugetlbpage.c
@@ -24,6 +24,7 @@
24#include <asm/machdep.h> 24#include <asm/machdep.h>
25#include <asm/cputable.h> 25#include <asm/cputable.h>
26#include <asm/tlb.h> 26#include <asm/tlb.h>
27#include <asm/spu.h>
27 28
28#include <linux/sysctl.h> 29#include <linux/sysctl.h>
29 30
@@ -513,6 +514,9 @@ int prepare_hugepage_range(unsigned long addr, unsigned long len, pgoff_t pgoff)
513 if ((addr + len) > 0x100000000UL) 514 if ((addr + len) > 0x100000000UL)
514 err = open_high_hpage_areas(current->mm, 515 err = open_high_hpage_areas(current->mm,
515 HTLB_AREA_MASK(addr, len)); 516 HTLB_AREA_MASK(addr, len));
517#ifdef CONFIG_SPE_BASE
518 spu_flush_all_slbs(current->mm);
519#endif
516 if (err) { 520 if (err) {
517 printk(KERN_DEBUG "prepare_hugepage_range(%lx, %lx)" 521 printk(KERN_DEBUG "prepare_hugepage_range(%lx, %lx)"
518 " failed (lowmask: 0x%04hx, highmask: 0x%04hx)\n", 522 " failed (lowmask: 0x%04hx, highmask: 0x%04hx)\n",