/openbmc/linux/arch/m68k/include/asm/ |
H A D | bitops.h | 31 static inline void bset_reg_set_bit(int nr, volatile unsigned long *vaddr) in bset_reg_set_bit() argument 33 char *p = (char *)vaddr + (nr ^ 31) / 8; in bset_reg_set_bit() 37 : "a" (p), "di" (nr & 7) in bset_reg_set_bit() 41 static inline void bset_mem_set_bit(int nr, volatile unsigned long *vaddr) in bset_mem_set_bit() argument 43 char *p = (char *)vaddr + (nr ^ 31) / 8; in bset_mem_set_bit() 47 : "di" (nr & 7)); in bset_mem_set_bit() 50 static inline void bfset_mem_set_bit(int nr, volatile unsigned long *vaddr) in bfset_mem_set_bit() argument 54 : "d" (nr ^ 31), "o" (*vaddr) in bfset_mem_set_bit() 59 #define set_bit(nr, vaddr) bset_reg_set_bit(nr, vaddr) argument 61 #define set_bit(nr, vaddr) bset_mem_set_bit(nr, vaddr) argument [all …]
|
/openbmc/u-boot/arch/arm/mach-omap2/am33xx/ |
H A D | ddr.c | 38 static inline u32 get_mr(int nr, u32 cs, u32 mr_addr) in get_mr() argument 43 writel(mr_addr, &emif_reg[nr]->emif_lpddr2_mode_reg_cfg); in get_mr() 45 mr = readl(&emif_reg[nr]->emif_lpddr2_mode_reg_data); in get_mr() 55 static inline void set_mr(int nr, u32 cs, u32 mr_addr, u32 mr_val) in set_mr() argument 58 writel(mr_addr, &emif_reg[nr]->emif_lpddr2_mode_reg_cfg); in set_mr() 59 writel(mr_val, &emif_reg[nr]->emif_lpddr2_mode_reg_data); in set_mr() 62 static void configure_mr(int nr, u32 cs) in configure_mr() argument 66 while (get_mr(nr, cs, LPDDR2_MR0) & LPDDR2_MR0_DAI_MASK) in configure_mr() 68 set_mr(nr, cs, LPDDR2_MR10, 0x56); in configure_mr() 70 set_mr(nr, cs, LPDDR2_MR1, 0x43); in configure_mr() [all …]
|
/openbmc/linux/arch/x86/include/asm/ |
H A D | bitops.h | 48 #define CONST_MASK_ADDR(nr, addr) WBYTE_ADDR((void *)(addr) + ((nr)>>3)) argument 49 #define CONST_MASK(nr) (1 << ((nr) & 7)) argument 52 arch_set_bit(long nr, volatile unsigned long *addr) in arch_set_bit() argument 54 if (__builtin_constant_p(nr)) { in arch_set_bit() 56 : CONST_MASK_ADDR(nr, addr) in arch_set_bit() 57 : "iq" (CONST_MASK(nr)) in arch_set_bit() 61 : : RLONG_ADDR(addr), "Ir" (nr) : "memory"); in arch_set_bit() 66 arch___set_bit(unsigned long nr, volatile unsigned long *addr) in arch___set_bit() argument 68 asm volatile(__ASM_SIZE(bts) " %1,%0" : : ADDR, "Ir" (nr) : "memory"); in arch___set_bit() 72 arch_clear_bit(long nr, volatile unsigned long *addr) in arch_clear_bit() argument [all …]
|
/openbmc/linux/arch/s390/include/asm/ |
H A D | bitops.h | 45 __bitops_word(unsigned long nr, const volatile unsigned long *ptr) in __bitops_word() argument 49 addr = (unsigned long)ptr + ((nr ^ (nr & (BITS_PER_LONG - 1))) >> 3); in __bitops_word() 53 static inline unsigned long __bitops_mask(unsigned long nr) in __bitops_mask() argument 55 return 1UL << (nr & (BITS_PER_LONG - 1)); in __bitops_mask() 58 static __always_inline void arch_set_bit(unsigned long nr, volatile unsigned long *ptr) in arch_set_bit() argument 60 unsigned long *addr = __bitops_word(nr, ptr); in arch_set_bit() 61 unsigned long mask = __bitops_mask(nr); in arch_set_bit() 66 static __always_inline void arch_clear_bit(unsigned long nr, volatile unsigned long *ptr) in arch_clear_bit() argument 68 unsigned long *addr = __bitops_word(nr, ptr); in arch_clear_bit() 69 unsigned long mask = __bitops_mask(nr); in arch_clear_bit() [all …]
|
H A D | facility.h | 25 static inline void __set_facility(unsigned long nr, void *facilities) in __set_facility() argument 29 if (nr >= MAX_FACILITY_BIT) in __set_facility() 31 ptr[nr >> 3] |= 0x80 >> (nr & 7); in __set_facility() 34 static inline void __clear_facility(unsigned long nr, void *facilities) in __clear_facility() argument 38 if (nr >= MAX_FACILITY_BIT) in __clear_facility() 40 ptr[nr >> 3] &= ~(0x80 >> (nr & 7)); in __clear_facility() 43 static inline int __test_facility(unsigned long nr, void *facilities) in __test_facility() argument 47 if (nr >= MAX_FACILITY_BIT) in __test_facility() 49 ptr = (unsigned char *) facilities + (nr >> 3); in __test_facility() 50 return (*ptr & (0x80 >> (nr & 7))) != 0; in __test_facility() [all …]
|
/openbmc/linux/drivers/hwmon/ |
H A D | f75375s.c | 46 #define F75375_REG_VOLT(nr) (0x10 + (nr)) argument 47 #define F75375_REG_VOLT_HIGH(nr) (0x20 + (nr) * 2) argument 48 #define F75375_REG_VOLT_LOW(nr) (0x21 + (nr) * 2) argument 50 #define F75375_REG_TEMP(nr) (0x14 + (nr)) argument 51 #define F75387_REG_TEMP11_LSB(nr) (0x1a + (nr)) argument 52 #define F75375_REG_TEMP_HIGH(nr) (0x28 + (nr) * 2) argument 53 #define F75375_REG_TEMP_HYST(nr) (0x29 + (nr) * 2) argument 55 #define F75375_REG_FAN(nr) (0x16 + (nr) * 2) argument 56 #define F75375_REG_FAN_MIN(nr) (0x2C + (nr) * 2) argument 57 #define F75375_REG_FAN_FULL(nr) (0x70 + (nr) * 0x10) argument [all …]
|
/openbmc/u-boot/arch/mips/include/asm/ |
H A D | bitops.h | 65 set_bit(int nr, volatile void *addr) in set_bit() argument 67 unsigned long *m = ((unsigned long *) addr) + (nr >> 5); in set_bit() 76 : "ir" (1UL << (nr & 0x1f)), "m" (*m)); in set_bit() 88 static __inline__ void __set_bit(int nr, volatile void * addr) in __set_bit() argument 90 unsigned long * m = ((unsigned long *) addr) + (nr >> 5); in __set_bit() 92 *m |= 1UL << (nr & 31); in __set_bit() 107 clear_bit(int nr, volatile void *addr) in clear_bit() argument 109 unsigned long *m = ((unsigned long *) addr) + (nr >> 5); in clear_bit() 118 : "ir" (~(1UL << (nr & 0x1f))), "m" (*m)); in clear_bit() 131 change_bit(int nr, volatile void *addr) in change_bit() argument [all …]
|
/openbmc/linux/arch/sh/include/asm/ |
H A D | bitops-op32.h | 14 #define BYTE_NUMBER(nr) ((nr ^ BITOP_LE_SWIZZLE) / BITS_PER_BYTE) argument 15 #define BYTE_OFFSET(nr) ((nr ^ BITOP_LE_SWIZZLE) % BITS_PER_BYTE) argument 17 #define BYTE_NUMBER(nr) ((nr) / BITS_PER_BYTE) argument 18 #define BYTE_OFFSET(nr) ((nr) % BITS_PER_BYTE) argument 22 arch___set_bit(unsigned long nr, volatile unsigned long *addr) in arch___set_bit() argument 24 if (__builtin_constant_p(nr)) { in arch___set_bit() 28 : "i" (BYTE_OFFSET(nr)), "i" (BYTE_NUMBER(nr)) in arch___set_bit() 32 unsigned long mask = BIT_MASK(nr); in arch___set_bit() 33 unsigned long *p = ((unsigned long *)addr) + BIT_WORD(nr); in arch___set_bit() 40 arch___clear_bit(unsigned long nr, volatile unsigned long *addr) in arch___clear_bit() argument [all …]
|
/openbmc/u-boot/arch/microblaze/include/asm/ |
H A D | bitops.h | 36 static inline void set_bit(int nr, volatile void *addr) in set_bit() argument 42 a += nr >> 5; in set_bit() 43 mask = 1 << (nr & 0x1f); in set_bit() 49 static inline void __set_bit(int nr, volatile void *addr) in __set_bit() argument 54 a += nr >> 5; in __set_bit() 55 mask = 1 << (nr & 0x1f); in __set_bit() 66 static inline void clear_bit(int nr, volatile void *addr) in clear_bit() argument 72 a += nr >> 5; in clear_bit() 73 mask = 1 << (nr & 0x1f); in clear_bit() 79 #define __clear_bit(nr, addr) clear_bit(nr, addr) argument [all …]
|
/openbmc/u-boot/include/ |
H A D | sh_pfc.h | 143 #define PORT_DATA_I(nr) \ argument 144 PINMUX_DATA(PORT##nr##_DATA, PORT##nr##_FN0, PORT##nr##_IN) 146 #define PORT_DATA_I_PD(nr) \ argument 147 PINMUX_DATA(PORT##nr##_DATA, PORT##nr##_FN0, \ 148 PORT##nr##_IN, PORT##nr##_IN_PD) 150 #define PORT_DATA_I_PU(nr) \ argument 151 PINMUX_DATA(PORT##nr##_DATA, PORT##nr##_FN0, \ 152 PORT##nr##_IN, PORT##nr##_IN_PU) 154 #define PORT_DATA_I_PU_PD(nr) \ argument 155 PINMUX_DATA(PORT##nr##_DATA, PORT##nr##_FN0, \ [all …]
|
/openbmc/qemu/include/qemu/ |
H A D | bitops.h | 21 #define BITS_TO_LONGS(nr) DIV_ROUND_UP(nr, BITS_PER_BYTE * sizeof(long)) argument 22 #define BITS_TO_U32S(nr) DIV_ROUND_UP(nr, BITS_PER_BYTE * sizeof(uint32_t)) argument 24 #define BIT(nr) (1UL << (nr)) argument 25 #define BIT_ULL(nr) (1ULL << (nr)) argument 59 #define BIT_MASK(nr) (1UL << ((nr) % BITS_PER_LONG)) argument 60 #define BIT_WORD(nr) ((nr) / BITS_PER_LONG) argument 67 static inline void set_bit(long nr, unsigned long *addr) in set_bit() argument 69 unsigned long mask = BIT_MASK(nr); in set_bit() 70 unsigned long *p = addr + BIT_WORD(nr); in set_bit() 80 static inline void set_bit_atomic(long nr, unsigned long *addr) in set_bit_atomic() argument [all …]
|
/openbmc/linux/net/netrom/ |
H A D | nr_timer.c | 37 struct nr_sock *nr = nr_sk(sk); in nr_init_timers() local 39 timer_setup(&nr->t1timer, nr_t1timer_expiry, 0); in nr_init_timers() 40 timer_setup(&nr->t2timer, nr_t2timer_expiry, 0); in nr_init_timers() 41 timer_setup(&nr->t4timer, nr_t4timer_expiry, 0); in nr_init_timers() 42 timer_setup(&nr->idletimer, nr_idletimer_expiry, 0); in nr_init_timers() 50 struct nr_sock *nr = nr_sk(sk); in nr_start_t1timer() local 52 sk_reset_timer(sk, &nr->t1timer, jiffies + nr->t1); in nr_start_t1timer() 57 struct nr_sock *nr = nr_sk(sk); in nr_start_t2timer() local 59 sk_reset_timer(sk, &nr->t2timer, jiffies + nr->t2); in nr_start_t2timer() 64 struct nr_sock *nr = nr_sk(sk); in nr_start_t4timer() local [all …]
|
H A D | nr_out.c | 81 struct nr_sock *nr = nr_sk(sk); in nr_send_iframe() local 86 skb->data[2] = nr->vs; in nr_send_iframe() 87 skb->data[3] = nr->vr; in nr_send_iframe() 89 if (nr->condition & NR_COND_OWN_RX_BUSY) in nr_send_iframe() 100 struct nr_sock *nr = nr_sk(sk); in nr_send_nak_frame() local 102 if ((skb = skb_peek(&nr->ack_queue)) == NULL) in nr_send_nak_frame() 108 skbn->data[2] = nr->va; in nr_send_nak_frame() 109 skbn->data[3] = nr->vr; in nr_send_nak_frame() 111 if (nr->condition & NR_COND_OWN_RX_BUSY) in nr_send_nak_frame() 116 nr->condition &= ~NR_COND_ACK_PENDING; in nr_send_nak_frame() [all …]
|
/openbmc/linux/include/asm-generic/bitops/ |
H A D | instrumented-non-atomic.h | 26 ___set_bit(unsigned long nr, volatile unsigned long *addr) in ___set_bit() argument 28 instrument_write(addr + BIT_WORD(nr), sizeof(long)); in ___set_bit() 29 arch___set_bit(nr, addr); in ___set_bit() 42 ___clear_bit(unsigned long nr, volatile unsigned long *addr) in ___clear_bit() argument 44 instrument_write(addr + BIT_WORD(nr), sizeof(long)); in ___clear_bit() 45 arch___clear_bit(nr, addr); in ___clear_bit() 58 ___change_bit(unsigned long nr, volatile unsigned long *addr) in ___change_bit() argument 60 instrument_write(addr + BIT_WORD(nr), sizeof(long)); in ___change_bit() 61 arch___change_bit(nr, addr); in ___change_bit() 64 static __always_inline void __instrument_read_write_bitop(long nr, volatile unsigned long *addr) in __instrument_read_write_bitop() argument [all …]
|
H A D | generic-non-atomic.h | 28 generic___set_bit(unsigned long nr, volatile unsigned long *addr) in generic___set_bit() argument 30 unsigned long mask = BIT_MASK(nr); in generic___set_bit() 31 unsigned long *p = ((unsigned long *)addr) + BIT_WORD(nr); in generic___set_bit() 37 generic___clear_bit(unsigned long nr, volatile unsigned long *addr) in generic___clear_bit() argument 39 unsigned long mask = BIT_MASK(nr); in generic___clear_bit() 40 unsigned long *p = ((unsigned long *)addr) + BIT_WORD(nr); in generic___clear_bit() 55 generic___change_bit(unsigned long nr, volatile unsigned long *addr) in generic___change_bit() argument 57 unsigned long mask = BIT_MASK(nr); in generic___change_bit() 58 unsigned long *p = ((unsigned long *)addr) + BIT_WORD(nr); in generic___change_bit() 73 generic___test_and_set_bit(unsigned long nr, volatile unsigned long *addr) in generic___test_and_set_bit() argument [all …]
|
/openbmc/u-boot/arch/nds32/include/asm/ |
H A D | bitops.h | 35 extern void set_bit(int nr, void *addr); 37 static inline void __set_bit(int nr, void *addr) in __set_bit() argument 42 a += nr >> 5; in __set_bit() 43 mask = 1 << (nr & 0x1f); in __set_bit() 49 extern void clear_bit(int nr, void *addr); 51 static inline void __clear_bit(int nr, void *addr) in __clear_bit() argument 57 a += nr >> 5; in __clear_bit() 58 mask = 1 << (nr & 0x1f); in __clear_bit() 66 extern void change_bit(int nr, void *addr); 68 static inline void __change_bit(int nr, void *addr) in __change_bit() argument [all …]
|
/openbmc/linux/arch/hexagon/include/asm/ |
H A D | bitops.h | 31 static inline int test_and_clear_bit(int nr, volatile void *addr) in test_and_clear_bit() argument 43 : "r" (addr), "r" (nr) in test_and_clear_bit() 55 static inline int test_and_set_bit(int nr, volatile void *addr) in test_and_set_bit() argument 67 : "r" (addr), "r" (nr) in test_and_set_bit() 81 static inline int test_and_change_bit(int nr, volatile void *addr) in test_and_change_bit() argument 93 : "r" (addr), "r" (nr) in test_and_change_bit() 106 static inline void clear_bit(int nr, volatile void *addr) in clear_bit() argument 108 test_and_clear_bit(nr, addr); in clear_bit() 111 static inline void set_bit(int nr, volatile void *addr) in set_bit() argument 113 test_and_set_bit(nr, addr); in set_bit() [all …]
|
/openbmc/u-boot/arch/x86/include/asm/ |
H A D | bitops.h | 39 static __inline__ void set_bit(int nr, volatile void * addr) in set_bit() argument 44 :"Ir" (nr)); in set_bit() 56 static __inline__ void __set_bit(int nr, volatile void * addr) in __set_bit() argument 61 :"Ir" (nr)); in __set_bit() 76 static __inline__ void clear_bit(int nr, volatile void * addr) in clear_bit() argument 81 :"Ir" (nr)); in clear_bit() 95 static __inline__ void __change_bit(int nr, volatile void * addr) in __change_bit() argument 100 :"Ir" (nr)); in __change_bit() 112 static __inline__ void change_bit(int nr, volatile void * addr) in change_bit() argument 117 :"Ir" (nr)); in change_bit() [all …]
|
/openbmc/linux/arch/alpha/include/asm/ |
H A D | bitops.h | 29 set_bit(unsigned long nr, volatile void * addr) in set_bit() argument 32 int *m = ((int *) addr) + (nr >> 5); in set_bit() 43 :"Ir" (1UL << (nr & 31)), "m" (*m)); in set_bit() 50 arch___set_bit(unsigned long nr, volatile unsigned long *addr) in arch___set_bit() argument 52 int *m = ((int *) addr) + (nr >> 5); in arch___set_bit() 54 *m |= 1 << (nr & 31); in arch___set_bit() 58 clear_bit(unsigned long nr, volatile void * addr) in clear_bit() argument 61 int *m = ((int *) addr) + (nr >> 5); in clear_bit() 72 :"Ir" (1UL << (nr & 31)), "m" (*m)); in clear_bit() 76 clear_bit_unlock(unsigned long nr, volatile void * addr) in clear_bit_unlock() argument [all …]
|
/openbmc/u-boot/arch/sandbox/include/asm/ |
H A D | bitops.h | 37 extern void set_bit(int nr, void *addr); 39 extern void clear_bit(int nr, void *addr); 41 extern void change_bit(int nr, void *addr); 43 static inline void __change_bit(int nr, void *addr) in __change_bit() argument 45 unsigned long mask = BIT_MASK(nr); in __change_bit() 46 unsigned long *p = ((unsigned long *)addr) + BIT_WORD(nr); in __change_bit() 51 static inline int __test_and_set_bit(int nr, void *addr) in __test_and_set_bit() argument 53 unsigned long mask = BIT_MASK(nr); in __test_and_set_bit() 54 unsigned long *p = ((unsigned long *)addr) + BIT_WORD(nr); in __test_and_set_bit() 61 static inline int test_and_set_bit(int nr, void *addr) in test_and_set_bit() argument [all …]
|
/openbmc/linux/arch/riscv/include/asm/ |
H A D | bitops.h | 36 #define __test_and_op_bit_ord(op, mod, nr, addr, ord) \ argument 39 __mask = BIT_MASK(nr); \ 42 : "=r" (__res), "+A" (addr[BIT_WORD(nr)]) \ 48 #define __op_bit_ord(op, mod, nr, addr, ord) \ argument 51 : "+A" (addr[BIT_WORD(nr)]) \ 52 : "r" (mod(BIT_MASK(nr))) \ 55 #define __test_and_op_bit(op, mod, nr, addr) \ argument 56 __test_and_op_bit_ord(op, mod, nr, addr, .aqrl) 57 #define __op_bit(op, mod, nr, addr) \ argument 58 __op_bit_ord(op, mod, nr, addr, ) [all …]
|
/openbmc/u-boot/arch/riscv/include/asm/ |
H A D | bitops.h | 35 static inline void __set_bit(int nr, void *addr) in __set_bit() argument 40 a += nr >> 5; in __set_bit() 41 mask = 1 << (nr & 0x1f); in __set_bit() 47 static inline void __clear_bit(int nr, void *addr) in __clear_bit() argument 52 a += nr >> 5; in __clear_bit() 53 mask = 1 << (nr & 0x1f); in __clear_bit() 59 static inline void __change_bit(int nr, void *addr) in __change_bit() argument 64 ADDR += nr >> 5; in __change_bit() 65 mask = 1 << (nr & 31); in __change_bit() 69 static inline int __test_and_set_bit(int nr, void *addr) in __test_and_set_bit() argument [all …]
|
/openbmc/linux/tools/perf/trace/beauty/ |
H A D | ioctl.c | 21 static size_t ioctl__scnprintf_tty_cmd(int nr, int dir, char *bf, size_t size) in ioctl__scnprintf_tty_cmd() argument 41 if (nr < strarray__ioctl_tty_cmd.nr_entries && strarray__ioctl_tty_cmd.entries[nr] != NULL) in ioctl__scnprintf_tty_cmd() 42 return scnprintf(bf, size, "%s", strarray__ioctl_tty_cmd.entries[nr]); in ioctl__scnprintf_tty_cmd() 44 return scnprintf(bf, size, "(%#x, %#x, %#x)", 'T', nr, dir); in ioctl__scnprintf_tty_cmd() 47 static size_t ioctl__scnprintf_drm_cmd(int nr, int dir, char *bf, size_t size) in ioctl__scnprintf_drm_cmd() argument 52 if (nr < strarray__drm_ioctl_cmds.nr_entries && strarray__drm_ioctl_cmds.entries[nr] != NULL) in ioctl__scnprintf_drm_cmd() 53 return scnprintf(bf, size, "DRM_%s", strarray__drm_ioctl_cmds.entries[nr]); in ioctl__scnprintf_drm_cmd() 55 return scnprintf(bf, size, "(%#x, %#x, %#x)", 'd', nr, dir); in ioctl__scnprintf_drm_cmd() 58 static size_t ioctl__scnprintf_sndrv_pcm_cmd(int nr, int dir, char *bf, size_t size) in ioctl__scnprintf_sndrv_pcm_cmd() argument 63 …if (nr < strarray__sndrv_pcm_ioctl_cmds.nr_entries && strarray__sndrv_pcm_ioctl_cmds.entries[nr] !… in ioctl__scnprintf_sndrv_pcm_cmd() [all …]
|
/openbmc/linux/arch/ia64/include/asm/ |
H A D | bitops.h | 40 set_bit (int nr, volatile void *addr) in set_bit() argument 46 m = (volatile __u32 *) addr + (nr >> 5); in set_bit() 47 bit = 1 << (nr & 31); in set_bit() 65 arch___set_bit(unsigned long nr, volatile unsigned long *addr) in arch___set_bit() argument 67 *((__u32 *) addr + (nr >> 5)) |= (1 << (nr & 31)); in arch___set_bit() 81 clear_bit (int nr, volatile void *addr) in clear_bit() argument 87 m = (volatile __u32 *) addr + (nr >> 5); in clear_bit() 88 mask = ~(1 << (nr & 31)); in clear_bit() 105 clear_bit_unlock (int nr, volatile void *addr) in clear_bit_unlock() argument 111 m = (volatile __u32 *) addr + (nr >> 5); in clear_bit_unlock() [all …]
|
/openbmc/u-boot/arch/arm/include/asm/ |
H A D | bitops.h | 30 extern void set_bit(int nr, volatile void * addr); 32 extern void clear_bit(int nr, volatile void * addr); 34 extern void change_bit(int nr, volatile void * addr); 36 static inline void __change_bit(int nr, volatile void *addr) in __change_bit() argument 38 unsigned long mask = BIT_MASK(nr); in __change_bit() 39 unsigned long *p = ((unsigned long *)addr) + BIT_WORD(nr); in __change_bit() 44 static inline int __test_and_set_bit(int nr, volatile void *addr) in __test_and_set_bit() argument 46 unsigned long mask = BIT_MASK(nr); in __test_and_set_bit() 47 unsigned long *p = ((unsigned long *)addr) + BIT_WORD(nr); in __test_and_set_bit() 54 static inline int test_and_set_bit(int nr, volatile void * addr) in test_and_set_bit() argument [all …]
|