diff options
author | Ingo Molnar <mingo@kernel.org> | 2015-10-20 10:16:46 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2015-10-20 10:16:46 +0200 |
commit | a1a2ab2ff7040bdc9a31bfe7173913971f7d723b (patch) | |
tree | a5b448aaedafafca6974710b7d64074ed964fe24 /arch/tile | |
parent | locking/rwsem: Use acquire/release semantics (diff) | |
parent | Linux 4.3-rc6 (diff) | |
download | linux-a1a2ab2ff7040bdc9a31bfe7173913971f7d723b.tar.xz linux-a1a2ab2ff7040bdc9a31bfe7173913971f7d723b.zip |
Merge tag 'v4.3-rc6' into locking/core, to pick up fixes before applying new changes
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'arch/tile')
-rw-r--r-- | arch/tile/include/asm/Kbuild | 1 | ||||
-rw-r--r-- | arch/tile/include/asm/word-at-a-time.h | 8 |
2 files changed, 7 insertions, 2 deletions
diff --git a/arch/tile/include/asm/Kbuild b/arch/tile/include/asm/Kbuild index 0b6cacaad933..ba35c41c71ff 100644 --- a/arch/tile/include/asm/Kbuild +++ b/arch/tile/include/asm/Kbuild @@ -40,5 +40,4 @@ generic-y += termbits.h generic-y += termios.h generic-y += trace_clock.h generic-y += types.h -generic-y += word-at-a-time.h generic-y += xor.h diff --git a/arch/tile/include/asm/word-at-a-time.h b/arch/tile/include/asm/word-at-a-time.h index 9e5ce0d7b292..b66a693c2c34 100644 --- a/arch/tile/include/asm/word-at-a-time.h +++ b/arch/tile/include/asm/word-at-a-time.h @@ -6,7 +6,7 @@ struct word_at_a_time { /* unused */ }; #define WORD_AT_A_TIME_CONSTANTS {} -/* Generate 0x01 byte values for non-zero bytes using a SIMD instruction. */ +/* Generate 0x01 byte values for zero bytes using a SIMD instruction. */ static inline unsigned long has_zero(unsigned long val, unsigned long *data, const struct word_at_a_time *c) { @@ -33,4 +33,10 @@ static inline long find_zero(unsigned long mask) #endif } +#ifdef __BIG_ENDIAN +#define zero_bytemask(mask) (~1ul << (63 - __builtin_clzl(mask))) +#else +#define zero_bytemask(mask) ((2ul << __builtin_ctzl(mask)) - 1) +#endif + #endif /* _ASM_WORD_AT_A_TIME_H */ |