Skip to content

Commit

Permalink
[S390] clear_table inline assembly contraints
Browse files Browse the repository at this point in the history
Tell the compile that the clear_table inline assembly writes to the
memory referenced by *s.

Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
  • Loading branch information
Martin Schwidefsky committed Dec 25, 2008
1 parent c185b78 commit 4f7e90d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion arch/s390/include/asm/pgalloc.h
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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)
Expand Down

0 comments on commit 4f7e90d

Please sign in to comment.