]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/powerpc/mm/slice.c
on_each_cpu(): kill unused 'retry' parameter
[linux-2.6-omap-h63xx.git] / arch / powerpc / mm / slice.c
index f833dba2a0287ea06218f180620b8634300a58e7..2bd12d965db16521ca824027848661de20d1c4eb 100644 (file)
@@ -34,7 +34,7 @@
 #include <asm/mmu.h>
 #include <asm/spu.h>
 
-static spinlock_t slice_convert_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(slice_convert_lock);
 
 
 #ifdef DEBUG
@@ -218,7 +218,7 @@ static void slice_convert(struct mm_struct *mm, struct slice_mask mask, int psiz
        mb();
 
        /* XXX this is sub-optimal but will do for now */
-       on_each_cpu(slice_flush_segments, mm, 0, 1);
+       on_each_cpu(slice_flush_segments, mm, 1);
 #ifdef CONFIG_SPU_BASE
        spu_flush_all_slbs(mm);
 #endif
@@ -405,6 +405,8 @@ unsigned long slice_get_unmapped_area(unsigned long addr, unsigned long len,
 
        if (len > mm->task_size)
                return -ENOMEM;
+       if (len & ((1ul << pshift) - 1))
+               return -EINVAL;
        if (fixed && (addr & ((1ul << pshift) - 1)))
                return -EINVAL;
        if (fixed && addr > (mm->task_size - len))
@@ -549,6 +551,7 @@ EXPORT_SYMBOL_GPL(get_slice_psize);
  *
  * This is also called in init_new_context() to change back the user
  * psize from whatever the parent context had it set to
+ * N.B. This may be called before mm->context.id has been set.
  *
  * This function will only change the content of the {low,high)_slice_psize
  * masks, it will not flush SLBs as this shall be handled lazily by the