#ifndef _ASM_WORD_AT_A_TIME_H #define _ASM_WORD_AT_A_TIME_H #include struct word_at_a_time { /* unused */ }; #define WORD_AT_A_TIME_CONSTANTS {} /* 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) { #ifdef __tilegx__ unsigned long mask = __insn_v1cmpeqi(val, 0); #else /* tilepro */ unsigned long mask = __insn_seqib(val, 0); #endif *data = mask; return mask; } /* These operations are both nops. */ #define prep_zero_mask(val, data, c) (data) #define create_zero_mask(data) (data) /* And this operation just depends on endianness. */ static inline long find_zero(unsigned long mask) { #ifdef __BIG_ENDIAN return __builtin_clzl(mask) >> 3; #else return __builtin_ctzl(mask) >> 3; #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 */ te-cleanup'>emaclite-cleanup net-next plumbingsTobias Klauser
summaryrefslogtreecommitdiff
path: root/arch/c6x/lib/divremi.S
diff options
context:
space:
mode:
authorTobias Klauser <tklauser@distanz.ch>2016-10-20 15:44:19 +0200
committerTobias Klauser <tklauser@distanz.ch>2017-02-15 10:34:18 +0100
commit5db4992d8f040b8d8db0b86d42806e0c417f7ccf (patch)
tree5b06e952af482d45f3ade64e77824662e34b7fa2 /arch/c6x/lib/divremi.S
parent370ebb0ef6255132373ed35d13e7b1d8d2eb7003 (diff)
usbnet: pegasus: Use net_device_stats from struct net_devicends-private-remove
Instead of using a private copy of struct net_device_stats in struct pegasus, use stats from struct net_device. Also remove the now unnecessary .ndo_get_stats function. Cc: Petko Manolov <petkan@nucleusys.com> Cc: linux-usb@vger.kernel.org Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Diffstat (limited to 'arch/c6x/lib/divremi.S')