Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 223351
b: refs/heads/master
c: 82b8915
h: refs/heads/master
i:
  223349: d43562b
  223347: a63fee2
  223343: 271acbf
v: v3
  • Loading branch information
Maciej W. Rozycki authored and Ralf Baechle committed Dec 16, 2010
1 parent 1904b1b commit 6629be4
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: cf745a39dcb10ef80c4a2ff38448f57b69d4c4eb
refs/heads/master: 82b89152f00f7ad17844d5614d5011e8d7944ac9
12 changes: 10 additions & 2 deletions trunk/arch/mips/include/asm/io.h
Original file line number Diff line number Diff line change
Expand Up @@ -329,10 +329,14 @@ static inline void pfx##write##bwlq(type val, \
"dsrl32 %L0, %L0, 0" "\n\t" \
"dsll32 %M0, %M0, 0" "\n\t" \
"or %L0, %L0, %M0" "\n\t" \
".set push" "\n\t" \
".set noreorder" "\n\t" \
".set nomacro" "\n\t" \
"sd %L0, %2" "\n\t" \
".set pop" "\n\t" \
".set mips0" "\n" \
: "=r" (__tmp) \
: "0" (__val), "m" (*__mem)); \
: "0" (__val), "R" (*__mem)); \
if (irq) \
local_irq_restore(__flags); \
} else \
Expand All @@ -355,12 +359,16 @@ static inline type pfx##read##bwlq(const volatile void __iomem *mem) \
local_irq_save(__flags); \
__asm__ __volatile__( \
".set mips3" "\t\t# __readq" "\n\t" \
".set push" "\n\t" \
".set noreorder" "\n\t" \
".set nomacro" "\n\t" \
"ld %L0, %1" "\n\t" \
".set pop" "\n\t" \
"dsra32 %M0, %L0, 0" "\n\t" \
"sll %L0, %L0, 0" "\n\t" \
".set mips0" "\n" \
: "=r" (__val) \
: "m" (*__mem)); \
: "R" (*__mem)); \
if (irq) \
local_irq_restore(__flags); \
} else { \
Expand Down
12 changes: 10 additions & 2 deletions trunk/arch/mips/pmc-sierra/yosemite/py-console.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,15 @@ static unsigned char readb_outer_space(unsigned long long phys)

__asm__ __volatile__ (
" .set mips3 \n"
" .set push \n"
" .set noreorder \n"
" .set nomacro \n"
" ld %0, %1 \n"
" .set pop \n"
" lbu %0, (%0) \n"
" .set mips0 \n"
: "=r" (res)
: "m" (vaddr));
: "R" (vaddr));

write_c0_status(sr);
ssnop_4();
Expand All @@ -89,11 +93,15 @@ static void writeb_outer_space(unsigned long long phys, unsigned char c)

__asm__ __volatile__ (
" .set mips3 \n"
" .set push \n"
" .set noreorder \n"
" .set nomacro \n"
" ld %0, %1 \n"
" .set pop \n"
" sb %2, (%0) \n"
" .set mips0 \n"
: "=&r" (tmp)
: "m" (vaddr), "r" (c));
: "R" (vaddr), "r" (c));

write_c0_status(sr);
ssnop_4();
Expand Down

0 comments on commit 6629be4

Please sign in to comment.