/arch/sparc/include/asm/ |
D | bitops_32.h | 21 unsigned long ___set_bit(unsigned long *addr, unsigned long mask); 22 unsigned long ___clear_bit(unsigned long *addr, unsigned long mask); 23 unsigned long ___change_bit(unsigned long *addr, unsigned long mask); 33 unsigned long *ADDR, mask; in test_and_set_bit() local 36 mask = 1 << (nr & 31); in test_and_set_bit() 38 return ___set_bit(ADDR, mask) != 0; in test_and_set_bit() 43 unsigned long *ADDR, mask; in set_bit() local 46 mask = 1 << (nr & 31); in set_bit() 48 (void) ___set_bit(ADDR, mask); in set_bit() 53 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/sh/include/asm/ |
D | bitops-llsc.h | 6 int mask; in set_bit() local 11 mask = 1 << (nr & 0x1f); in set_bit() 20 : "r" (a), "r" (mask) in set_bit() 27 int mask; in clear_bit() local 32 mask = 1 << (nr & 0x1f); in clear_bit() 41 : "r" (a), "r" (~mask) in clear_bit() 48 int mask; in change_bit() local 53 mask = 1 << (nr & 0x1f); in change_bit() 62 : "r" (a), "r" (mask) in change_bit() 69 int mask, retval; in test_and_set_bit() local [all …]
|
D | bitops-grb.h | 6 int mask; in set_bit() local 11 mask = 1 << (nr & 0x1f); in set_bit() 24 : "r" (mask) in set_bit() 30 int mask; in clear_bit() local 35 mask = ~(1 << (nr & 0x1f)); in clear_bit() 47 : "r" (mask) in clear_bit() 53 int mask; in change_bit() local 58 mask = 1 << (nr & 0x1f); in change_bit() 70 : "r" (mask) in change_bit() 76 int mask, retval; in test_and_set_bit() local [all …]
|
D | word-at-a-time.h | 17 static inline long count_masked_bytes(long mask) in count_masked_bytes() argument 20 long a = (0x0ff0001+mask) >> 23; in count_masked_bytes() 22 return a & mask; in count_masked_bytes() 28 unsigned long mask = ((a - c->one_bits) & ~a) & c->high_bits; in has_zero() local 29 *bits = mask; in has_zero() 30 return mask; in has_zero() 45 #define zero_bytemask(mask) (mask) argument 47 static inline unsigned long find_zero(unsigned long mask) in find_zero() argument 49 return count_masked_bytes(mask); in find_zero()
|
D | bitops-op32.h | 30 unsigned long mask = BIT_MASK(nr); in __set_bit() local 33 *p |= mask; in __set_bit() 48 unsigned long mask = BIT_MASK(nr); in __clear_bit() local 51 *p &= ~mask; in __clear_bit() 75 unsigned long mask = BIT_MASK(nr); in __change_bit() local 78 *p ^= mask; in __change_bit() 93 unsigned long mask = BIT_MASK(nr); in __test_and_set_bit() local 97 *p = old | mask; in __test_and_set_bit() 98 return (old & mask) != 0; in __test_and_set_bit() 112 unsigned long mask = BIT_MASK(nr); in __test_and_clear_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/powerpc/include/asm/ |
D | word-at-a-time.h | 22 unsigned long mask = (val & c->low_bits) + c->low_bits; in prep_zero_mask() local 23 return ~(mask | rhs); in prep_zero_mask() 26 #define create_zero_mask(mask) (mask) argument 28 static inline long find_zero(unsigned long mask) in find_zero() argument 32 asm (PPC_CNTLZL "%0,%1" : "=r" (leading_zero_bits) : "r" (mask)); in find_zero() 43 static inline unsigned long zero_bytemask(unsigned long mask) in zero_bytemask() argument 45 return ~1ul << __fls(mask); in zero_bytemask() 90 static inline unsigned long find_zero(unsigned long mask) in find_zero() argument 92 return mask >> 3; in find_zero() 96 static inline unsigned long zero_bytemask(unsigned long mask) in zero_bytemask() argument [all …]
|
/arch/arm/mach-rpc/ |
D | irq.c | 12 unsigned int val, mask; in iomd_ack_irq_a() local 14 mask = 1 << d->irq; in iomd_ack_irq_a() 16 iomd_writeb(val & ~mask, IOMD_IRQMASKA); in iomd_ack_irq_a() 17 iomd_writeb(mask, IOMD_IRQCLRA); in iomd_ack_irq_a() 22 unsigned int val, mask; in iomd_mask_irq_a() local 24 mask = 1 << d->irq; in iomd_mask_irq_a() 26 iomd_writeb(val & ~mask, IOMD_IRQMASKA); in iomd_mask_irq_a() 31 unsigned int val, mask; in iomd_unmask_irq_a() local 33 mask = 1 << d->irq; in iomd_unmask_irq_a() 35 iomd_writeb(val | mask, IOMD_IRQMASKA); in iomd_unmask_irq_a() [all …]
|
/arch/arm/mach-lpc32xx/ |
D | irq.c | 78 u32 mask; member 87 .mask = LPC32XX_CLKPWR_EXTSRC_GPI_08_BIT, 91 .mask = LPC32XX_CLKPWR_EXTSRC_GPI_09_BIT, 95 .mask = LPC32XX_CLKPWR_EXTSRC_GPI_19_BIT, 99 .mask = LPC32XX_CLKPWR_EXTSRC_GPI_07_BIT, 103 .mask = LPC32XX_CLKPWR_EXTSRC_GPI_00_BIT, 107 .mask = LPC32XX_CLKPWR_EXTSRC_GPI_01_BIT, 111 .mask = LPC32XX_CLKPWR_EXTSRC_GPI_02_BIT, 115 .mask = LPC32XX_CLKPWR_EXTSRC_GPI_03_BIT, 119 .mask = LPC32XX_CLKPWR_EXTSRC_GPI_04_BIT, [all …]
|
/arch/m32r/include/asm/ |
D | smp.h | 16 unsigned long mask[PHYSID_ARRAY_SIZE]; member 21 #define physid_set(physid, map) set_bit(physid, (map).mask) 22 #define physid_clear(physid, map) clear_bit(physid, (map).mask) 23 #define physid_isset(physid, map) test_bit(physid, (map).mask) 24 #define physid_test_and_set(physid, map) test_and_set_bit(physid, (map).mask) 26 #define physids_and(dst, src1, src2) bitmap_and((dst).mask, (src1).mask, (src2).mask, MA… 27 #define physids_or(dst, src1, src2) bitmap_or((dst).mask, (src1).mask, (src2).mask, MAX… 28 #define physids_clear(map) bitmap_zero((map).mask, MAX_APICS) 29 #define physids_complement(dst, src) bitmap_complement((dst).mask,(src).mask, MAX_APICS) 30 #define physids_empty(map) bitmap_empty((map).mask, MAX_APICS) [all …]
|
D | bitops.h | 46 __u32 mask; in set_bit() local 52 mask = (1 << (nr & 0x1F)); in set_bit() 61 : "r" (a), "r" (mask) in set_bit() 82 __u32 mask; in clear_bit() local 88 mask = (1 << (nr & 0x1F)); in clear_bit() 98 : "r" (a), "r" (~mask) in clear_bit() 118 __u32 mask; in change_bit() local 124 mask = (1 << (nr & 0x1F)); in change_bit() 133 : "r" (a), "r" (mask) in change_bit() 152 __u32 mask, oldbit; in test_and_set_bit() local [all …]
|
/arch/metag/include/asm/ |
D | bitops.h | 15 unsigned long mask = 1UL << (bit & 31); in set_bit() local 21 *p |= mask; in set_bit() 28 unsigned long mask = 1UL << (bit & 31); in clear_bit() local 34 *p &= ~mask; in clear_bit() 41 unsigned long mask = 1UL << (bit & 31); in change_bit() local 47 *p ^= mask; in change_bit() 55 unsigned long mask = 1UL << (bit & 31); in test_and_set_bit() local 61 if (!(old & mask)) { in test_and_set_bit() 63 *p = old | mask; in test_and_set_bit() 67 return (old & mask) != 0; in test_and_set_bit() [all …]
|
/arch/x86/include/asm/ |
D | mpspec.h | 93 unsigned long mask[PHYSID_ARRAY_SIZE]; member 98 #define physid_set(physid, map) set_bit(physid, (map).mask) 99 #define physid_clear(physid, map) clear_bit(physid, (map).mask) 100 #define physid_isset(physid, map) test_bit(physid, (map).mask) 102 test_and_set_bit(physid, (map).mask) 105 bitmap_and((dst).mask, (src1).mask, (src2).mask, MAX_LOCAL_APIC) 108 bitmap_or((dst).mask, (src1).mask, (src2).mask, MAX_LOCAL_APIC) 111 bitmap_zero((map).mask, MAX_LOCAL_APIC) 114 bitmap_complement((dst).mask, (src).mask, MAX_LOCAL_APIC) 117 bitmap_empty((map).mask, MAX_LOCAL_APIC) [all …]
|
D | word-at-a-time.h | 27 static inline long count_masked_bytes(unsigned long mask) in count_masked_bytes() argument 29 return mask*0x0001020304050608ul >> 56; in count_masked_bytes() 35 static inline long count_masked_bytes(long mask) in count_masked_bytes() argument 38 long a = (0x0ff0001+mask) >> 23; in count_masked_bytes() 40 return a & mask; in count_masked_bytes() 48 unsigned long mask = ((a - c->one_bits) & ~a) & c->high_bits; in has_zero() local 49 *bits = mask; in has_zero() 50 return mask; in has_zero() 65 #define zero_bytemask(mask) (mask) argument 67 static inline unsigned long find_zero(unsigned long mask) in find_zero() argument [all …]
|
/arch/tile/include/asm/ |
D | word-at-a-time.h | 14 unsigned long mask = __insn_v1cmpeqi(val, 0); in has_zero() local 16 unsigned long mask = __insn_seqib(val, 0); in has_zero() 18 *data = mask; in has_zero() 19 return mask; in has_zero() 27 static inline long find_zero(unsigned long mask) in find_zero() argument 30 return __builtin_clzl(mask) >> 3; in find_zero() 32 return __builtin_ctzl(mask) >> 3; in find_zero() 37 #define zero_bytemask(mask) (~1ul << (63 - __builtin_clzl(mask))) argument 39 #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_or(volatile unsigned long *p, unsigned long mask); 23 unsigned long _atomic_andn(volatile unsigned long *p, unsigned long mask); 24 unsigned long _atomic_xor(volatile unsigned long *p, unsigned long mask); 85 unsigned long mask = BIT_MASK(nr); in test_and_set_bit() local 88 return (_atomic_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_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_xor(addr, mask) & mask) != 0; in test_and_change_bit()
|
/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/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/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/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/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/pci/ |
D | pci-malta.c | 93 resource_size_t start, end, map, start1, end1, map1, map2, map3, mask; in mips_pcibios_init() local 129 mask = ~(start ^ end); in mips_pcibios_init() 132 mask != ~((mask & -mask) - 1)); in mips_pcibios_init() 135 gt64120_controller.mem_offset = (start & mask) - (map & mask); in mips_pcibios_init() 146 mask = ~(start ^ end); in mips_pcibios_init() 149 mask != ~((mask & -mask) - 1)); in mips_pcibios_init() 150 gt64120_io_resource.start = map & mask; in mips_pcibios_init() 151 gt64120_io_resource.end = (map & mask) | ~mask; in mips_pcibios_init() 199 MSC_READ(MSC01_PCI_SC2PMMSKL, mask); in mips_pcibios_init() 201 msc_mem_resource.start = start & mask; in mips_pcibios_init() [all …]
|
/arch/xtensa/kernel/ |
D | irq.c | 91 u32 mask = 1 << hw; in xtensa_irq_map() local 93 if (mask & XCHAL_INTTYPE_MASK_SOFTWARE) { in xtensa_irq_map() 97 } else if (mask & XCHAL_INTTYPE_MASK_EXTERN_EDGE) { in xtensa_irq_map() 101 } else if (mask & XCHAL_INTTYPE_MASK_EXTERN_LEVEL) { in xtensa_irq_map() 105 } else if (mask & XCHAL_INTTYPE_MASK_TIMER) { in xtensa_irq_map() 110 } else if (mask & XCHAL_INTTYPE_MASK_PROFILING) { in xtensa_irq_map() 126 unsigned mask = XCHAL_INTTYPE_MASK_EXTERN_EDGE | in xtensa_map_ext_irq() local 130 for (i = 0; mask; ++i, mask >>= 1) { in xtensa_map_ext_irq() 131 if ((mask & 1) && ext_irq-- == 0) in xtensa_map_ext_irq() 139 unsigned mask = (XCHAL_INTTYPE_MASK_EXTERN_EDGE | in xtensa_get_ext_irq_no() local [all …]
|