diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2014-10-18 17:24:36 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-10-18 17:24:36 -0400 |
commit | 857b50f5d0eed113428c864e927289d8f5f2b864 (patch) | |
tree | 6864b17f92b855d35f896b84948b8d19b0105ce4 /arch/mips/include/uapi | |
parent | 168f07a1ea75870b3fdee3d69d978813eb1fd58d (diff) | |
parent | 31d6f57d3c65fd75c18ea9a3acebedc6cd60d656 (diff) |
Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus
Pull MIPS updates from Ralf Baechle:
"This is the MIPS pull request for the next kernel:
- Zubair's patch series adds CMA support for MIPS. Doing so it also
touches ARM64 and x86.
- remove the last instance of IRQF_DISABLED from arch/mips
- updates to two of the MIPS defconfig files.
- cleanup of how cache coherency bits are handled on MIPS and
implement support for write-combining.
- platform upgrades for Alchemy
- move MIPS DTS files to arch/mips/boot/dts/"
* 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: (24 commits)
MIPS: ralink: remove deprecated IRQF_DISABLED
MIPS: pgtable.h: Implement the pgprot_writecombine function for MIPS
MIPS: cpu-probe: Set the write-combine CCA value on per core basis
MIPS: pgtable-bits: Define the CCA bit for WC writes on Ingenic cores
MIPS: pgtable-bits: Move the CCA bits out of the core's ifdef blocks
MIPS: DMA: Add cma support
x86: use generic dma-contiguous.h
arm64: use generic dma-contiguous.h
asm-generic: Add dma-contiguous.h
MIPS: BPF: Add new emit_long_instr macro
MIPS: ralink: Move device-trees to arch/mips/boot/dts/
MIPS: Netlogic: Move device-trees to arch/mips/boot/dts/
MIPS: sead3: Move device-trees to arch/mips/boot/dts/
MIPS: Lantiq: Move device-trees to arch/mips/boot/dts/
MIPS: Octeon: Move device-trees to arch/mips/boot/dts/
MIPS: Add support for building device-tree binaries
MIPS: Create common infrastructure for building built-in device-trees
MIPS: SEAD3: Enable DEVTMPFS
MIPS: SEAD3: Regenerate defconfigs
MIPS: Alchemy: DB1300: Add touch penirq support
...
Diffstat (limited to 'arch/mips/include/uapi')
-rw-r--r-- | arch/mips/include/uapi/asm/swab.h | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/arch/mips/include/uapi/asm/swab.h b/arch/mips/include/uapi/asm/swab.h index ac9a8f9cd1fb..8f2d184dbe9f 100644 --- a/arch/mips/include/uapi/asm/swab.h +++ b/arch/mips/include/uapi/asm/swab.h | |||
@@ -13,12 +13,16 @@ | |||
13 | 13 | ||
14 | #define __SWAB_64_THRU_32__ | 14 | #define __SWAB_64_THRU_32__ |
15 | 15 | ||
16 | #if defined(__mips_isa_rev) && (__mips_isa_rev >= 2) | 16 | #if (defined(__mips_isa_rev) && (__mips_isa_rev >= 2)) || \ |
17 | defined(_MIPS_ARCH_LOONGSON3A) | ||
17 | 18 | ||
18 | static inline __attribute_const__ __u16 __arch_swab16(__u16 x) | 19 | static inline __attribute_const__ __u16 __arch_swab16(__u16 x) |
19 | { | 20 | { |
20 | __asm__( | 21 | __asm__( |
22 | " .set push \n" | ||
23 | " .set arch=mips32r2 \n" | ||
21 | " wsbh %0, %1 \n" | 24 | " wsbh %0, %1 \n" |
25 | " .set pop \n" | ||
22 | : "=r" (x) | 26 | : "=r" (x) |
23 | : "r" (x)); | 27 | : "r" (x)); |
24 | 28 | ||
@@ -29,8 +33,11 @@ static inline __attribute_const__ __u16 __arch_swab16(__u16 x) | |||
29 | static inline __attribute_const__ __u32 __arch_swab32(__u32 x) | 33 | static inline __attribute_const__ __u32 __arch_swab32(__u32 x) |
30 | { | 34 | { |
31 | __asm__( | 35 | __asm__( |
36 | " .set push \n" | ||
37 | " .set arch=mips32r2 \n" | ||
32 | " wsbh %0, %1 \n" | 38 | " wsbh %0, %1 \n" |
33 | " rotr %0, %0, 16 \n" | 39 | " rotr %0, %0, 16 \n" |
40 | " .set pop \n" | ||
34 | : "=r" (x) | 41 | : "=r" (x) |
35 | : "r" (x)); | 42 | : "r" (x)); |
36 | 43 | ||
@@ -46,8 +53,11 @@ static inline __attribute_const__ __u32 __arch_swab32(__u32 x) | |||
46 | static inline __attribute_const__ __u64 __arch_swab64(__u64 x) | 53 | static inline __attribute_const__ __u64 __arch_swab64(__u64 x) |
47 | { | 54 | { |
48 | __asm__( | 55 | __asm__( |
49 | " dsbh %0, %1\n" | 56 | " .set push \n" |
50 | " dshd %0, %0" | 57 | " .set arch=mips64r2 \n" |
58 | " dsbh %0, %1 \n" | ||
59 | " dshd %0, %0 \n" | ||
60 | " .set pop \n" | ||
51 | : "=r" (x) | 61 | : "=r" (x) |
52 | : "r" (x)); | 62 | : "r" (x)); |
53 | 63 | ||
@@ -55,5 +65,5 @@ static inline __attribute_const__ __u64 __arch_swab64(__u64 x) | |||
55 | } | 65 | } |
56 | #define __arch_swab64 __arch_swab64 | 66 | #define __arch_swab64 __arch_swab64 |
57 | #endif /* __mips64 */ | 67 | #endif /* __mips64 */ |
58 | #endif /* MIPS R2 or newer */ | 68 | #endif /* MIPS R2 or newer or Loongson 3A */ |
59 | #endif /* _ASM_SWAB_H */ | 69 | #endif /* _ASM_SWAB_H */ |