Commit 3f4fb108 authored by Helge Deller's avatar Helge Deller

parisc: Don't hardcode PSW values in gsc_*() functions

Signed-off-by: default avatarHelge Deller <deller@gmx.de>
parent b752c7b2
...@@ -34,10 +34,10 @@ static inline unsigned char gsc_readb(unsigned long addr) ...@@ -34,10 +34,10 @@ static inline unsigned char gsc_readb(unsigned long addr)
unsigned char ret; unsigned char ret;
__asm__ __volatile__( __asm__ __volatile__(
" rsm 2,%0\n" " rsm %3,%0\n"
" ldbx 0(%2),%1\n" " ldbx 0(%2),%1\n"
" mtsm %0\n" " mtsm %0\n"
: "=&r" (flags), "=r" (ret) : "r" (addr) ); : "=&r" (flags), "=r" (ret) : "r" (addr), "i" (PSW_SM_D) );
return ret; return ret;
} }
...@@ -48,10 +48,10 @@ static inline unsigned short gsc_readw(unsigned long addr) ...@@ -48,10 +48,10 @@ static inline unsigned short gsc_readw(unsigned long addr)
unsigned short ret; unsigned short ret;
__asm__ __volatile__( __asm__ __volatile__(
" rsm 2,%0\n" " rsm %3,%0\n"
" ldhx 0(%2),%1\n" " ldhx 0(%2),%1\n"
" mtsm %0\n" " mtsm %0\n"
: "=&r" (flags), "=r" (ret) : "r" (addr) ); : "=&r" (flags), "=r" (ret) : "r" (addr), "i" (PSW_SM_D) );
return ret; return ret;
} }
...@@ -87,20 +87,20 @@ static inline void gsc_writeb(unsigned char val, unsigned long addr) ...@@ -87,20 +87,20 @@ static inline void gsc_writeb(unsigned char val, unsigned long addr)
{ {
long flags; long flags;
__asm__ __volatile__( __asm__ __volatile__(
" rsm 2,%0\n" " rsm %3,%0\n"
" stbs %1,0(%2)\n" " stbs %1,0(%2)\n"
" mtsm %0\n" " mtsm %0\n"
: "=&r" (flags) : "r" (val), "r" (addr) ); : "=&r" (flags) : "r" (val), "r" (addr), "i" (PSW_SM_D) );
} }
static inline void gsc_writew(unsigned short val, unsigned long addr) static inline void gsc_writew(unsigned short val, unsigned long addr)
{ {
long flags; long flags;
__asm__ __volatile__( __asm__ __volatile__(
" rsm 2,%0\n" " rsm %3,%0\n"
" sths %1,0(%2)\n" " sths %1,0(%2)\n"
" mtsm %0\n" " mtsm %0\n"
: "=&r" (flags) : "r" (val), "r" (addr) ); : "=&r" (flags) : "r" (val), "r" (addr), "i" (PSW_SM_D) );
} }
static inline void gsc_writel(unsigned int val, unsigned long addr) static inline void gsc_writel(unsigned int val, unsigned long addr)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment