/arch/sparc/include/asm/ |
D | bitops_32.h | 22 unsigned long ___set_bit(unsigned long *addr, unsigned long mask); 23 unsigned long ___clear_bit(unsigned long *addr, unsigned long mask); 24 unsigned long ___change_bit(unsigned long *addr, unsigned long mask); 34 unsigned long *ADDR, mask; in test_and_set_bit() local 37 mask = 1 << (nr & 31); in test_and_set_bit() 39 return ___set_bit(ADDR, mask) != 0; in test_and_set_bit() 44 unsigned long *ADDR, mask; in set_bit() local 47 mask = 1 << (nr & 31); in set_bit() 49 (void) ___set_bit(ADDR, mask); in set_bit() 54 unsigned long *ADDR, mask; in test_and_clear_bit() local [all …]
|
/arch/mips/lib/ |
D | bitops.c | 24 unsigned long mask; in __mips_set_bit() local 28 mask = 1UL << bit; in __mips_set_bit() 30 *a |= mask; in __mips_set_bit() 46 unsigned long mask; in __mips_clear_bit() local 50 mask = 1UL << bit; in __mips_clear_bit() 52 *a &= ~mask; in __mips_clear_bit() 68 unsigned long mask; in __mips_change_bit() local 72 mask = 1UL << bit; in __mips_change_bit() 74 *a ^= mask; in __mips_change_bit() 91 unsigned long mask; in __mips_test_and_set_bit() local [all …]
|
/arch/frv/include/asm/ |
D | bitops.h | 33 unsigned int mask = 1UL << (nr & 31); in test_and_clear_bit() local 35 return (__atomic32_fetch_and(~mask, ptr) & mask) != 0; in test_and_clear_bit() 41 unsigned int mask = 1UL << (nr & 31); in test_and_set_bit() local 43 return (__atomic32_fetch_or(mask, ptr) & mask) != 0; in test_and_set_bit() 49 unsigned int mask = 1UL << (nr & 31); in test_and_change_bit() local 51 return (__atomic32_fetch_xor(mask, ptr) & mask) != 0; in test_and_change_bit() 72 int mask; in __clear_bit() local 75 mask = 1 << (nr & 31); in __clear_bit() 76 *a &= ~mask; in __clear_bit() 82 int mask; in __set_bit() local [all …]
|
/arch/sh/include/asm/ |
D | bitops-grb.h | 7 int mask; in set_bit() local 12 mask = 1 << (nr & 0x1f); in set_bit() 25 : "r" (mask) in set_bit() 31 int mask; in clear_bit() local 36 mask = ~(1 << (nr & 0x1f)); in clear_bit() 48 : "r" (mask) in clear_bit() 54 int mask; in change_bit() local 59 mask = 1 << (nr & 0x1f); in change_bit() 71 : "r" (mask) in change_bit() 77 int mask, retval; in test_and_set_bit() local [all …]
|
D | bitops-llsc.h | 7 int mask; in set_bit() local 12 mask = 1 << (nr & 0x1f); in set_bit() 21 : "r" (a), "r" (mask) in set_bit() 28 int mask; in clear_bit() local 33 mask = 1 << (nr & 0x1f); in clear_bit() 42 : "r" (a), "r" (~mask) in clear_bit() 49 int mask; in change_bit() local 54 mask = 1 << (nr & 0x1f); in change_bit() 63 : "r" (a), "r" (mask) in change_bit() 70 int mask, retval; in test_and_set_bit() local [all …]
|
D | bitops-cas.h | 16 unsigned mask, old; in set_bit() local 20 mask = 1U << (nr & 0x1f); in set_bit() 23 while (__bo_cas(a, old, old|mask) != old); in set_bit() 28 unsigned mask, old; in clear_bit() local 32 mask = 1U << (nr & 0x1f); in clear_bit() 35 while (__bo_cas(a, old, old&~mask) != old); in clear_bit() 40 unsigned mask, old; in change_bit() local 44 mask = 1U << (nr & 0x1f); in change_bit() 47 while (__bo_cas(a, old, old^mask) != old); in change_bit() 52 unsigned mask, old; in test_and_set_bit() local [all …]
|
D | word-at-a-time.h | 18 static inline long count_masked_bytes(long mask) in count_masked_bytes() argument 21 long a = (0x0ff0001+mask) >> 23; in count_masked_bytes() 23 return a & mask; in count_masked_bytes() 29 unsigned long mask = ((a - c->one_bits) & ~a) & c->high_bits; in has_zero() local 30 *bits = mask; in has_zero() 31 return mask; in has_zero() 46 #define zero_bytemask(mask) (mask) argument 48 static inline unsigned long find_zero(unsigned long mask) in find_zero() argument 50 return count_masked_bytes(mask); in find_zero()
|
/arch/powerpc/include/asm/ |
D | word-at-a-time.h | 23 unsigned long mask = (val & c->low_bits) + c->low_bits; in prep_zero_mask() local 24 return ~(mask | rhs); in prep_zero_mask() 27 #define create_zero_mask(mask) (mask) argument 29 static inline long find_zero(unsigned long mask) in find_zero() argument 33 asm (PPC_CNTLZL "%0,%1" : "=r" (leading_zero_bits) : "r" (mask)); in find_zero() 44 static inline unsigned long zero_bytemask(unsigned long mask) in zero_bytemask() argument 46 return ~1ul << __fls(mask); in zero_bytemask() 91 static inline unsigned long find_zero(unsigned long mask) in find_zero() argument 93 return mask >> 3; in find_zero() 97 static inline unsigned long zero_bytemask(unsigned long mask) in zero_bytemask() argument [all …]
|
/arch/arm/mach-rpc/ |
D | irq.c | 13 unsigned int val, mask; in iomd_ack_irq_a() local 15 mask = 1 << d->irq; in iomd_ack_irq_a() 17 iomd_writeb(val & ~mask, IOMD_IRQMASKA); in iomd_ack_irq_a() 18 iomd_writeb(mask, IOMD_IRQCLRA); in iomd_ack_irq_a() 23 unsigned int val, mask; in iomd_mask_irq_a() local 25 mask = 1 << d->irq; in iomd_mask_irq_a() 27 iomd_writeb(val & ~mask, IOMD_IRQMASKA); in iomd_mask_irq_a() 32 unsigned int val, mask; in iomd_unmask_irq_a() local 34 mask = 1 << d->irq; in iomd_unmask_irq_a() 36 iomd_writeb(val | mask, IOMD_IRQMASKA); in iomd_unmask_irq_a() [all …]
|
/arch/m32r/include/asm/ |
D | smp.h | 17 unsigned long mask[PHYSID_ARRAY_SIZE]; member 22 #define physid_set(physid, map) set_bit(physid, (map).mask) 23 #define physid_clear(physid, map) clear_bit(physid, (map).mask) 24 #define physid_isset(physid, map) test_bit(physid, (map).mask) 25 #define physid_test_and_set(physid, map) test_and_set_bit(physid, (map).mask) 27 #define physids_and(dst, src1, src2) bitmap_and((dst).mask, (src1).mask, (src2).mask, MA… 28 #define physids_or(dst, src1, src2) bitmap_or((dst).mask, (src1).mask, (src2).mask, MAX… 29 #define physids_clear(map) bitmap_zero((map).mask, MAX_APICS) 30 #define physids_complement(dst, src) bitmap_complement((dst).mask,(src).mask, MAX_APICS) 31 #define physids_empty(map) bitmap_empty((map).mask, MAX_APICS) [all …]
|
D | bitops.h | 47 __u32 mask; in set_bit() local 53 mask = (1 << (nr & 0x1F)); in set_bit() 62 : "r" (a), "r" (mask) in set_bit() 83 __u32 mask; in clear_bit() local 89 mask = (1 << (nr & 0x1F)); in clear_bit() 99 : "r" (a), "r" (~mask) in clear_bit() 119 __u32 mask; in change_bit() local 125 mask = (1 << (nr & 0x1F)); in change_bit() 134 : "r" (a), "r" (mask) in change_bit() 153 __u32 mask, oldbit; in test_and_set_bit() local [all …]
|
/arch/powerpc/sysdev/ |
D | fsl_rcpm.c | 34 unsigned int mask = 1 << hw_cpu; in rcpm_v1_irq_mask() local 36 setbits32(&rcpm_v1_regs->cpmimr, mask); in rcpm_v1_irq_mask() 37 setbits32(&rcpm_v1_regs->cpmcimr, mask); in rcpm_v1_irq_mask() 38 setbits32(&rcpm_v1_regs->cpmmcmr, mask); in rcpm_v1_irq_mask() 39 setbits32(&rcpm_v1_regs->cpmnmimr, mask); in rcpm_v1_irq_mask() 45 unsigned int mask = 1 << hw_cpu; in rcpm_v2_irq_mask() local 47 setbits32(&rcpm_v2_regs->tpmimr0, mask); in rcpm_v2_irq_mask() 48 setbits32(&rcpm_v2_regs->tpmcimr0, mask); in rcpm_v2_irq_mask() 49 setbits32(&rcpm_v2_regs->tpmmcmr0, mask); in rcpm_v2_irq_mask() 50 setbits32(&rcpm_v2_regs->tpmnmimr0, mask); in rcpm_v2_irq_mask() [all …]
|
/arch/metag/include/asm/ |
D | bitops.h | 16 unsigned long mask = 1UL << (bit & 31); in set_bit() local 22 *p |= mask; in set_bit() 29 unsigned long mask = 1UL << (bit & 31); in clear_bit() local 35 *p &= ~mask; in clear_bit() 42 unsigned long mask = 1UL << (bit & 31); in change_bit() local 48 *p ^= mask; in change_bit() 56 unsigned long mask = 1UL << (bit & 31); in test_and_set_bit() local 62 if (!(old & mask)) { in test_and_set_bit() 64 *p = old | mask; in test_and_set_bit() 68 return (old & mask) != 0; in test_and_set_bit() [all …]
|
/arch/x86/include/asm/ |
D | mpspec.h | 94 unsigned long mask[PHYSID_ARRAY_SIZE]; member 99 #define physid_set(physid, map) set_bit(physid, (map).mask) 100 #define physid_clear(physid, map) clear_bit(physid, (map).mask) 101 #define physid_isset(physid, map) test_bit(physid, (map).mask) 103 test_and_set_bit(physid, (map).mask) 106 bitmap_and((dst).mask, (src1).mask, (src2).mask, MAX_LOCAL_APIC) 109 bitmap_or((dst).mask, (src1).mask, (src2).mask, MAX_LOCAL_APIC) 112 bitmap_zero((map).mask, MAX_LOCAL_APIC) 115 bitmap_complement((dst).mask, (src).mask, MAX_LOCAL_APIC) 118 bitmap_empty((map).mask, MAX_LOCAL_APIC) [all …]
|
D | word-at-a-time.h | 28 static inline long count_masked_bytes(unsigned long mask) in count_masked_bytes() argument 30 return mask*0x0001020304050608ul >> 56; in count_masked_bytes() 36 static inline long count_masked_bytes(long mask) in count_masked_bytes() argument 39 long a = (0x0ff0001+mask) >> 23; in count_masked_bytes() 41 return a & mask; in count_masked_bytes() 49 unsigned long mask = ((a - c->one_bits) & ~a) & c->high_bits; in has_zero() local 50 *bits = mask; in has_zero() 51 return mask; in has_zero() 66 #define zero_bytemask(mask) (mask) argument 68 static inline unsigned long find_zero(unsigned long mask) in find_zero() argument [all …]
|
/arch/arm/mach-ixp4xx/ |
D | ixp4xx_qmgr.c | 119 u32 mask = 1 << (queue & (HALF_QUEUES - 1)); in qmgr_enable_irq() local 122 __raw_writel(__raw_readl(&qmgr_regs->irqen[half]) | mask, in qmgr_enable_irq() 131 u32 mask = 1 << (queue & (HALF_QUEUES - 1)); in qmgr_disable_irq() local 134 __raw_writel(__raw_readl(&qmgr_regs->irqen[half]) & ~mask, in qmgr_disable_irq() 136 __raw_writel(mask, &qmgr_regs->irqstat[half]); /* clear */ in qmgr_disable_irq() 140 static inline void shift_mask(u32 *mask) in shift_mask() argument 142 mask[3] = mask[3] << 1 | mask[2] >> 31; in shift_mask() 143 mask[2] = mask[2] << 1 | mask[1] >> 31; in shift_mask() 144 mask[1] = mask[1] << 1 | mask[0] >> 31; in shift_mask() 145 mask[0] <<= 1; in shift_mask() [all …]
|
/arch/tile/include/asm/ |
D | word-at-a-time.h | 15 unsigned long mask = __insn_v1cmpeqi(val, 0); in has_zero() local 17 unsigned long mask = __insn_seqib(val, 0); in has_zero() 19 *data = mask; in has_zero() 20 return mask; in has_zero() 28 static inline long find_zero(unsigned long mask) in find_zero() argument 31 return __builtin_clzl(mask) >> 3; in find_zero() 33 return __builtin_ctzl(mask) >> 3; in find_zero() 38 #define zero_bytemask(mask) (~1ul << (63 - __builtin_clzl(mask))) argument 40 #define zero_bytemask(mask) ((2ul << __builtin_ctzl(mask)) - 1) argument
|
D | bitops_64.h | 25 unsigned long mask = (1UL << (nr % BITS_PER_LONG)); in set_bit() local 26 __insn_fetchor((void *)(addr + nr / BITS_PER_LONG), mask); in set_bit() 31 unsigned long mask = (1UL << (nr % BITS_PER_LONG)); in clear_bit() local 32 __insn_fetchand((void *)(addr + nr / BITS_PER_LONG), ~mask); in clear_bit() 37 unsigned long mask = (1UL << (nr % BITS_PER_LONG)); in change_bit() local 43 oldval = cmpxchg(addr, guess, guess ^ mask); in change_bit() 58 unsigned long mask = (1UL << (nr % BITS_PER_LONG)); in test_and_set_bit() local 60 val = (__insn_fetchor((void *)(addr + nr / BITS_PER_LONG), mask) in test_and_set_bit() 61 & mask) != 0; in test_and_set_bit() 70 unsigned long mask = (1UL << (nr % BITS_PER_LONG)); in test_and_clear_bit() local [all …]
|
D | bitops_32.h | 22 unsigned long _atomic_fetch_or(volatile unsigned long *p, unsigned long mask); 23 unsigned long _atomic_fetch_andn(volatile unsigned long *p, unsigned long mask); 24 unsigned long _atomic_fetch_xor(volatile unsigned long *p, unsigned long mask); 85 unsigned long mask = BIT_MASK(nr); in test_and_set_bit() local 88 return (_atomic_fetch_or(addr, mask) & mask) != 0; in test_and_set_bit() 101 unsigned long mask = BIT_MASK(nr); in test_and_clear_bit() local 104 return (_atomic_fetch_andn(addr, mask) & mask) != 0; in test_and_clear_bit() 118 unsigned long mask = BIT_MASK(nr); in test_and_change_bit() local 121 return (_atomic_fetch_xor(addr, mask) & mask) != 0; in test_and_change_bit()
|
/arch/openrisc/include/asm/bitops/ |
D | atomic.h | 14 unsigned long mask = BIT_MASK(nr); in set_bit() local 25 : "r"(p), "r"(mask) in set_bit() 31 unsigned long mask = BIT_MASK(nr); in clear_bit() local 42 : "r"(p), "r"(~mask) in clear_bit() 48 unsigned long mask = BIT_MASK(nr); in change_bit() local 59 : "r"(p), "r"(mask) in change_bit() 65 unsigned long mask = BIT_MASK(nr); in test_and_set_bit() local 77 : "r"(p), "r"(mask) in test_and_set_bit() 80 return (old & mask) != 0; in test_and_set_bit() 85 unsigned long mask = BIT_MASK(nr); in test_and_clear_bit() local [all …]
|
/arch/sh/include/mach-common/mach/ |
D | magicpanelr2.h | 22 #define SETBITS_OUTB(mask, reg) __raw_writeb(__raw_readb(reg) | mask, reg) argument 23 #define SETBITS_OUTW(mask, reg) __raw_writew(__raw_readw(reg) | mask, reg) argument 24 #define SETBITS_OUTL(mask, reg) __raw_writel(__raw_readl(reg) | mask, reg) argument 25 #define CLRBITS_OUTB(mask, reg) __raw_writeb(__raw_readb(reg) & ~mask, reg) argument 26 #define CLRBITS_OUTW(mask, reg) __raw_writew(__raw_readw(reg) & ~mask, reg) argument 27 #define CLRBITS_OUTL(mask, reg) __raw_writel(__raw_readl(reg) & ~mask, reg) argument
|
/arch/arm/mach-imx/ |
D | iomux-v1.c | 50 unsigned long mask, unsigned long value) in imx_iomuxv1_rmwl() argument 54 reg &= ~mask; in imx_iomuxv1_rmwl() 63 unsigned long mask = 1 << pin; in imx_iomuxv1_set_puen() local 65 imx_iomuxv1_rmwl(MXC_PUEN(port), mask, on ? mask : 0); in imx_iomuxv1_set_puen() 71 unsigned long mask = 1 << pin; in imx_iomuxv1_set_ddir() local 73 imx_iomuxv1_rmwl(MXC_DDIR(port), mask, out ? mask : 0); in imx_iomuxv1_set_ddir() 79 unsigned long mask = 1 << pin; in imx_iomuxv1_set_gpr() local 81 imx_iomuxv1_rmwl(MXC_GPR(port), mask, af ? mask : 0); in imx_iomuxv1_set_gpr() 87 unsigned long mask = 1 << pin; in imx_iomuxv1_set_gius() local 89 imx_iomuxv1_rmwl(MXC_GIUS(port), mask, inuse ? mask : 0); in imx_iomuxv1_set_gius() [all …]
|
/arch/mips/bcm63xx/ |
D | prom.c | 23 u32 reg, mask; in prom_init() local 33 mask = CKCTL_3368_ALL_SAFE_EN; in prom_init() 35 mask = CKCTL_6328_ALL_SAFE_EN; in prom_init() 37 mask = CKCTL_6338_ALL_SAFE_EN; in prom_init() 39 mask = CKCTL_6345_ALL_SAFE_EN; in prom_init() 41 mask = CKCTL_6348_ALL_SAFE_EN; in prom_init() 43 mask = CKCTL_6358_ALL_SAFE_EN; in prom_init() 45 mask = CKCTL_6362_ALL_SAFE_EN; in prom_init() 47 mask = CKCTL_6368_ALL_SAFE_EN; in prom_init() 49 mask = 0; in prom_init() [all …]
|
/arch/xtensa/include/asm/ |
D | bitops.h | 106 unsigned long mask = 1UL << (bit & 31); in set_bit() local 117 : "a" (mask), "a" (p) in set_bit() 124 unsigned long mask = 1UL << (bit & 31); in clear_bit() local 135 : "a" (~mask), "a" (p) in clear_bit() 142 unsigned long mask = 1UL << (bit & 31); in change_bit() local 153 : "a" (mask), "a" (p) in change_bit() 161 unsigned long mask = 1UL << (bit & 31); in test_and_set_bit() local 172 : "a" (mask), "a" (p) in test_and_set_bit() 175 return tmp & mask; in test_and_set_bit() 182 unsigned long mask = 1UL << (bit & 31); in test_and_clear_bit() local [all …]
|
/arch/mips/kernel/ |
D | cmpxchg.c | 16 u32 old32, new32, load32, mask; in __xchg_small() local 24 mask = GENMASK((size * BITS_PER_BYTE) - 1, 0); in __xchg_small() 25 val &= mask; in __xchg_small() 36 mask <<= shift; in __xchg_small() 47 new32 = (load32 & ~mask) | (val << shift); in __xchg_small() 51 return (load32 & mask) >> shift; in __xchg_small() 57 u32 mask, old32, new32, load32, load; in __cmpxchg_small() local 65 mask = GENMASK((size * BITS_PER_BYTE) - 1, 0); in __cmpxchg_small() 66 old &= mask; in __cmpxchg_small() 67 new &= mask; in __cmpxchg_small() [all …]
|