Merge branch 'oprofile-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git...
[pandora-kernel.git] / arch / s390 / include / asm / pgalloc.h
index f5b2bf3..ddad590 100644 (file)
@@ -28,6 +28,8 @@ void disable_noexec(struct mm_struct *, struct task_struct *);
 
 static inline void clear_table(unsigned long *s, unsigned long val, size_t n)
 {
+       typedef struct { char _[n]; } addrtype;
+
        *s = val;
        n = (n / 256) - 1;
        asm volatile(
@@ -39,7 +41,8 @@ static inline void clear_table(unsigned long *s, unsigned long val, size_t n)
                "0:     mvc     256(256,%0),0(%0)\n"
                "       la      %0,256(%0)\n"
                "       brct    %1,0b\n"
-               : "+a" (s), "+d" (n));
+               : "+a" (s), "+d" (n), "=m" (*(addrtype *) s)
+               : "m" (*(addrtype *) s));
 }
 
 static inline void crst_table_init(unsigned long *crst, unsigned long entry)
@@ -137,6 +140,7 @@ static inline void pud_populate(struct mm_struct *mm, pud_t *pud, pmd_t *pmd)
 
 static inline pgd_t *pgd_alloc(struct mm_struct *mm)
 {
+       spin_lock_init(&mm->context.list_lock);
        INIT_LIST_HEAD(&mm->context.crst_list);
        INIT_LIST_HEAD(&mm->context.pgtable_list);
        return (pgd_t *) crst_table_alloc(mm, s390_noexec);