diff options
-rw-r--r-- | arch/mips/include/asm/io.h | 12 | ||||
-rw-r--r-- | arch/mips/pmc-sierra/yosemite/py-console.c | 12 |
2 files changed, 20 insertions, 4 deletions
diff --git a/arch/mips/include/asm/io.h b/arch/mips/include/asm/io.h index c98bf514ec7d..5b017f23e243 100644 --- a/arch/mips/include/asm/io.h +++ b/arch/mips/include/asm/io.h | |||
@@ -329,10 +329,14 @@ static inline void pfx##write##bwlq(type val, \ | |||
329 | "dsrl32 %L0, %L0, 0" "\n\t" \ | 329 | "dsrl32 %L0, %L0, 0" "\n\t" \ |
330 | "dsll32 %M0, %M0, 0" "\n\t" \ | 330 | "dsll32 %M0, %M0, 0" "\n\t" \ |
331 | "or %L0, %L0, %M0" "\n\t" \ | 331 | "or %L0, %L0, %M0" "\n\t" \ |
332 | ".set push" "\n\t" \ | ||
333 | ".set noreorder" "\n\t" \ | ||
334 | ".set nomacro" "\n\t" \ | ||
332 | "sd %L0, %2" "\n\t" \ | 335 | "sd %L0, %2" "\n\t" \ |
336 | ".set pop" "\n\t" \ | ||
333 | ".set mips0" "\n" \ | 337 | ".set mips0" "\n" \ |
334 | : "=r" (__tmp) \ | 338 | : "=r" (__tmp) \ |
335 | : "0" (__val), "m" (*__mem)); \ | 339 | : "0" (__val), "R" (*__mem)); \ |
336 | if (irq) \ | 340 | if (irq) \ |
337 | local_irq_restore(__flags); \ | 341 | local_irq_restore(__flags); \ |
338 | } else \ | 342 | } else \ |
@@ -355,12 +359,16 @@ static inline type pfx##read##bwlq(const volatile void __iomem *mem) \ | |||
355 | local_irq_save(__flags); \ | 359 | local_irq_save(__flags); \ |
356 | __asm__ __volatile__( \ | 360 | __asm__ __volatile__( \ |
357 | ".set mips3" "\t\t# __readq" "\n\t" \ | 361 | ".set mips3" "\t\t# __readq" "\n\t" \ |
362 | ".set push" "\n\t" \ | ||
363 | ".set noreorder" "\n\t" \ | ||
364 | ".set nomacro" "\n\t" \ | ||
358 | "ld %L0, %1" "\n\t" \ | 365 | "ld %L0, %1" "\n\t" \ |
366 | ".set pop" "\n\t" \ | ||
359 | "dsra32 %M0, %L0, 0" "\n\t" \ | 367 | "dsra32 %M0, %L0, 0" "\n\t" \ |
360 | "sll %L0, %L0, 0" "\n\t" \ | 368 | "sll %L0, %L0, 0" "\n\t" \ |
361 | ".set mips0" "\n" \ | 369 | ".set mips0" "\n" \ |
362 | : "=r" (__val) \ | 370 | : "=r" (__val) \ |
363 | : "m" (*__mem)); \ | 371 | : "R" (*__mem)); \ |
364 | if (irq) \ | 372 | if (irq) \ |
365 | local_irq_restore(__flags); \ | 373 | local_irq_restore(__flags); \ |
366 | } else { \ | 374 | } else { \ |
diff --git a/arch/mips/pmc-sierra/yosemite/py-console.c b/arch/mips/pmc-sierra/yosemite/py-console.c index b7f1d9c4a8a3..434d7b1a8c6a 100644 --- a/arch/mips/pmc-sierra/yosemite/py-console.c +++ b/arch/mips/pmc-sierra/yosemite/py-console.c | |||
@@ -65,11 +65,15 @@ static unsigned char readb_outer_space(unsigned long long phys) | |||
65 | 65 | ||
66 | __asm__ __volatile__ ( | 66 | __asm__ __volatile__ ( |
67 | " .set mips3 \n" | 67 | " .set mips3 \n" |
68 | " .set push \n" | ||
69 | " .set noreorder \n" | ||
70 | " .set nomacro \n" | ||
68 | " ld %0, %1 \n" | 71 | " ld %0, %1 \n" |
72 | " .set pop \n" | ||
69 | " lbu %0, (%0) \n" | 73 | " lbu %0, (%0) \n" |
70 | " .set mips0 \n" | 74 | " .set mips0 \n" |
71 | : "=r" (res) | 75 | : "=r" (res) |
72 | : "m" (vaddr)); | 76 | : "R" (vaddr)); |
73 | 77 | ||
74 | write_c0_status(sr); | 78 | write_c0_status(sr); |
75 | ssnop_4(); | 79 | ssnop_4(); |
@@ -89,11 +93,15 @@ static void writeb_outer_space(unsigned long long phys, unsigned char c) | |||
89 | 93 | ||
90 | __asm__ __volatile__ ( | 94 | __asm__ __volatile__ ( |
91 | " .set mips3 \n" | 95 | " .set mips3 \n" |
96 | " .set push \n" | ||
97 | " .set noreorder \n" | ||
98 | " .set nomacro \n" | ||
92 | " ld %0, %1 \n" | 99 | " ld %0, %1 \n" |
100 | " .set pop \n" | ||
93 | " sb %2, (%0) \n" | 101 | " sb %2, (%0) \n" |
94 | " .set mips0 \n" | 102 | " .set mips0 \n" |
95 | : "=&r" (tmp) | 103 | : "=&r" (tmp) |
96 | : "m" (vaddr), "r" (c)); | 104 | : "R" (vaddr), "r" (c)); |
97 | 105 | ||
98 | write_c0_status(sr); | 106 | write_c0_status(sr); |
99 | ssnop_4(); | 107 | ssnop_4(); |