History

Merge git://git.linux-mips.org/pub/scm/ralf/upstream-linus

Pull MIPS fixes from Ralf Baechle: - MIPS didn't define the new ioremap_uc. Defined it as an alias for ioremap_uncached. - Replace workaround for MIPS16 build issue with a correct one. * git://git.linux-mips.org/pub/scm/ralf/upstream-linus: MIPS: Define ioremap_uc MIPS: UAPI: Ignore __arch_swab{16,32,64} when using MIPS16 Revert "MIPS: UAPI: Fix unrecognized opcode WSBH/DSBH/DSHD when using MIPS16."

Linus Torvalds committed 11 years ago

Commit bbecce82 parents 1d8a12d da11f982 files · +8 −12Browse files

Unified · Split

2 files
  1. arch/mips/include/asm/io.h +1 −0
  2. arch/mips/include/uapi/asm/swab.h +7 −12
arch/mips/include/asm/io.h+1−0
@@ -256,6 +256,7 @@ static inline void __iomem * __ioremap_mode(phys_addr_t offset, unsigned long si · 255 unmodified lines
256256 */
257257 #define ioremap_nocache(offset, size) \
258258 __ioremap_mode((offset), (size), _CACHE_UNCACHED)
259+#define ioremap_uc ioremap_nocache
259260
260261 /*
261262 * ioremap_cachable - map bus memory into CPU space
arch/mips/include/uapi/asm/swab.h+7−12
@@ -13,16 +13,15 @@ · 12 unmodified lines
1313
1414 #define __SWAB_64_THRU_32__
1515
16−#if (defined(__mips_isa_rev) && (__mips_isa_rev >= 2)) || \
17− defined(_MIPS_ARCH_LOONGSON3A)
16+#if !defined(__mips16) && \
17+ ((defined(__mips_isa_rev) && (__mips_isa_rev >= 2)) || \
18+ defined(_MIPS_ARCH_LOONGSON3A))
1819
19−static inline __attribute__((nomips16)) __attribute_const__
20− __u16 __arch_swab16(__u16 x)
20+static inline __attribute_const__ __u16 __arch_swab16(__u16 x)
2121 {
2222 __asm__(
2323 " .set push \n"
2424 " .set arch=mips32r2 \n"
25− " .set nomips16 \n"
2625 " wsbh %0, %1 \n"
2726 " .set pop \n"
2827 : "=r" (x)
@@ -32,13 +31,11 @@ static inline __attribute__((nomips16)) __attribute_const__ · 3 unmodified lines
3231 }
3332 #define __arch_swab16 __arch_swab16
3433
35−static inline __attribute__((nomips16)) __attribute_const__
36− __u32 __arch_swab32(__u32 x)
34+static inline __attribute_const__ __u32 __arch_swab32(__u32 x)
3735 {
3836 __asm__(
3937 " .set push \n"
4038 " .set arch=mips32r2 \n"
41− " .set nomips16 \n"
4239 " wsbh %0, %1 \n"
4340 " rotr %0, %0, 16 \n"
4441 " .set pop \n"
@@ -54,13 +51,11 @@ static inline __attribute__((nomips16)) __attribute_const__ · 9 unmodified lines
5451 * 64-bit kernel on r2 CPUs.
5552 */
5653 #ifdef __mips64
57−static inline __attribute__((nomips16)) __attribute_const__
58− __u64 __arch_swab64(__u64 x)
54+static inline __attribute_const__ __u64 __arch_swab64(__u64 x)
5955 {
6056 __asm__(
6157 " .set push \n"
6258 " .set arch=mips64r2 \n"
63− " .set nomips16 \n"
6459 " dsbh %0, %1 \n"
6560 " dshd %0, %0 \n"
6661 " .set pop \n"
@@ -71,5 +66,5 @@ static inline __attribute__((nomips16)) __attribute_const__ · 4 unmodified lines
7166 }
7267 #define __arch_swab64 __arch_swab64
7368 #endif /* __mips64 */
74−#endif /* MIPS R2 or newer or Loongson 3A */
69+#endif /* (not __mips16) and (MIPS R2 or newer or Loongson 3A) */
7570 #endif /* _ASM_SWAB_H */