Home
last modified time | relevance | path

Searched +full:flags +full:- +full:mask (Results 1 – 25 of 1052) sorted by relevance

12345678910>>...43

/openbmc/u-boot/arch/microblaze/include/asm/
H A Dbitops.h10 #include <asm-generic/bitops/fls.h>
11 #include <asm-generic/bitops/__fls.h>
12 #include <asm-generic/bitops/fls64.h>
13 #include <asm-generic/bitops/__ffs.h>
39 int mask; in set_bit() local
40 unsigned long flags; in set_bit() local
43 mask = 1 << (nr & 0x1f); in set_bit()
44 save_flags_cli(flags); in set_bit()
45 *a |= mask; in set_bit()
46 restore_flags(flags); in set_bit()
[all …]
/openbmc/linux/arch/mips/lib/
H A Dbitops.c6 * Copyright (c) 1994-1997, 99, 2000, 06, 07 Ralf Baechle (ralf@linux-mips.org)
16 * __mips_set_bit - Atomically set a bit in memory. This is called by
25 unsigned long mask; in __mips_set_bit() local
26 unsigned long flags; in __mips_set_bit() local
28 mask = 1UL << bit; in __mips_set_bit()
29 raw_local_irq_save(flags); in __mips_set_bit()
30 *a |= mask; in __mips_set_bit()
31 raw_local_irq_restore(flags); in __mips_set_bit()
37 * __mips_clear_bit - Clears a bit in memory. This is called by clear_bit() if
46 unsigned long mask; in __mips_clear_bit() local
[all …]
/openbmc/u-boot/arch/sh/include/asm/
H A Dbitops.h4 #include <asm-generic/bitops/fls.h>
5 #include <asm-generic/bitops/__fls.h>
6 #include <asm-generic/bitops/fls64.h>
7 #include <asm-generic/bitops/__ffs.h>
16 int mask; in set_bit() local
18 unsigned long flags; in set_bit() local
21 mask = 1 << (nr & 0x1f); in set_bit()
22 local_irq_save(flags); in set_bit()
23 *a |= mask; in set_bit()
24 local_irq_restore(flags); in set_bit()
[all …]
/openbmc/linux/arch/powerpc/platforms/85xx/
H A Dsocrates_fpga_pic.c1 // SPDX-License-Identifier: GPL-2.0-only
22 #define SOCRATES_FPGA_IRQ_MASK ((1 << SOCRATES_FPGA_NUM_IRQS) - 1)
66 unsigned long flags; in socrates_fpga_pic_get_irq() local
77 raw_spin_lock_irqsave(&socrates_fpga_pic_lock, flags); in socrates_fpga_pic_get_irq()
79 raw_spin_unlock_irqrestore(&socrates_fpga_pic_lock, flags); in socrates_fpga_pic_get_irq()
80 for (i = SOCRATES_FPGA_NUM_IRQS - 1; i >= 0; i--) { in socrates_fpga_pic_get_irq()
102 chip->irq_eoi(&desc->irq_data); in socrates_fpga_pic_cascade()
107 unsigned long flags; in socrates_fpga_pic_ack() local
109 uint32_t mask; in socrates_fpga_pic_ack() local
112 raw_spin_lock_irqsave(&socrates_fpga_pic_lock, flags); in socrates_fpga_pic_ack()
[all …]
/openbmc/linux/arch/mips/kernel/
H A Dirq-gt641xx.c1 // SPDX-License-Identifier: GPL-2.0-or-later
5 * Copyright (C) 2007 Yoichi Yuasa <yuasa@linux-mips.org>
15 #define GT641XX_IRQ_TO_BIT(irq) (1U << (irq - GT641XX_IRQ_BASE))
21 unsigned long flags; in ack_gt641xx_irq() local
24 raw_spin_lock_irqsave(&gt641xx_irq_lock, flags); in ack_gt641xx_irq()
26 cause &= ~GT641XX_IRQ_TO_BIT(d->irq); in ack_gt641xx_irq()
28 raw_spin_unlock_irqrestore(&gt641xx_irq_lock, flags); in ack_gt641xx_irq()
33 unsigned long flags; in mask_gt641xx_irq() local
34 u32 mask; in mask_gt641xx_irq() local
36 raw_spin_lock_irqsave(&gt641xx_irq_lock, flags); in mask_gt641xx_irq()
[all …]
/openbmc/linux/drivers/gpio/
H A Dgpio-ath79.c1 // SPDX-License-Identifier: GPL-2.0-only
6 * Copyright (C) 2010-2011 Jaiganesh Narayanan <jnarayanan@atheros.com>
7 * Copyright (C) 2008-2011 Gabor Juhos <juhosg@openwrt.org>
13 #include <linux/platform_data/gpio-ath79.h>
46 return readl(ctrl->base + reg); in ath79_gpio_read()
52 writel(val, ctrl->base + reg); in ath79_gpio_write()
56 struct ath79_gpio_ctrl *ctrl, unsigned reg, u32 mask, u32 bits) in ath79_gpio_update_bits() argument
61 new_val = (old_val & ~mask) | (bits & mask); in ath79_gpio_update_bits()
72 u32 mask = BIT(irqd_to_hwirq(data)); in ath79_gpio_irq_unmask() local
73 unsigned long flags; in ath79_gpio_irq_unmask() local
[all …]
/openbmc/linux/fs/nfsd/
H A Dnfs4acl.c57 /* flags used to simulate posix default ACLs */
66 mask_from_posix(unsigned short perm, unsigned int flags) in mask_from_posix() argument
68 int mask = NFS4_ANYONE_MODE; in mask_from_posix() local
70 if (flags & NFS4_ACL_OWNER) in mask_from_posix()
71 mask |= NFS4_OWNER_MODE; in mask_from_posix()
73 mask |= NFS4_READ_MODE; in mask_from_posix()
75 mask |= NFS4_WRITE_MODE; in mask_from_posix()
76 if ((perm & ACL_WRITE) && (flags & NFS4_ACL_DIR)) in mask_from_posix()
77 mask |= NFS4_ACE_DELETE_CHILD; in mask_from_posix()
79 mask |= NFS4_EXECUTE_MODE; in mask_from_posix()
[all …]
/openbmc/linux/sound/soc/sof/
H A Dops.c1 // SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause)
16 u32 mask, u32 value) in snd_sof_pci_update_bits_unlocked() argument
18 struct pci_dev *pci = to_pci_dev(sdev->dev); in snd_sof_pci_update_bits_unlocked()
24 dev_dbg(sdev->dev, "Debug PCIR: %8.8x at %8.8x\n", old & mask, offset); in snd_sof_pci_update_bits_unlocked()
26 new = (old & ~mask) | (value & mask); in snd_sof_pci_update_bits_unlocked()
32 dev_dbg(sdev->dev, "Debug PCIW: %8.8x at %8.8x\n", value, in snd_sof_pci_update_bits_unlocked()
39 u32 mask, u32 value) in snd_sof_pci_update_bits() argument
41 unsigned long flags; in snd_sof_pci_update_bits() local
44 spin_lock_irqsave(&sdev->hw_lock, flags); in snd_sof_pci_update_bits()
45 change = snd_sof_pci_update_bits_unlocked(sdev, offset, mask, value); in snd_sof_pci_update_bits()
[all …]
/openbmc/linux/fs/notify/fanotify/
H A Dfanotify_user.c1 // SPDX-License-Identifier: GPL-2.0
101 * All flags that may be specified in parameter event_f_flags of fanotify_init.
103 * Internal and external open flags are stored together in field f_flags of
104 * struct file. Only external open flags shall be allowed in event_f_flags.
105 * Internal flags like FMODE_NONOTIFY, FMODE_EXEC, FMODE_NOCMTIME shall be
149 info->name_len); in fanotify_dir_name_info_len()
152 info->name2_len); in fanotify_dir_name_info_len()
167 if (fanotify_is_error_event(event->mask)) in fanotify_event_len()
173 (event->mask & FAN_ONDIR)) { in fanotify_event_len()
198 assert_spin_locked(&group->notification_lock); in fanotify_unhash_event()
[all …]
/openbmc/u-boot/arch/nios2/include/asm/bitops/
H A Datomic.h16 …ne ATOMIC_HASH(a) (&(__atomic_hash[ (((unsigned long) a)/L1_CACHE_BYTES) & (ATOMIC_HASH_SIZE-1) ]))
51 * set_bit - Atomically set a bit in memory
63 * restricted to acting on a single-word quantity.
67 unsigned long mask = BIT_MASK(nr); in set_bit() local
69 unsigned long flags; in set_bit() local
71 _atomic_spin_lock_irqsave(p, flags); in set_bit()
72 *p |= mask; in set_bit()
73 _atomic_spin_unlock_irqrestore(p, flags); in set_bit()
77 * clear_bit - Clears a bit in memory
88 unsigned long mask = BIT_MASK(nr); in clear_bit() local
[all …]
/openbmc/linux/drivers/ssb/
H A Dembedded.c5 * Copyright 2005-2008, Broadcom Corporation
6 * Copyright 2006-2008, Michael Buesch <m@bues.ch>
7 * Copyright 2012, Hauke Mehrtens <hauke@hauke-m.de>
25 if (ssb_chipco_available(&bus->chipco)) { in ssb_watchdog_timer_set()
26 ssb_chipco_watchdog_timer_set(&bus->chipco, ticks); in ssb_watchdog_timer_set()
29 if (ssb_extif_available(&bus->extif)) { in ssb_watchdog_timer_set()
30 ssb_extif_watchdog_timer_set(&bus->extif, ticks); in ssb_watchdog_timer_set()
33 return -ENODEV; in ssb_watchdog_timer_set()
42 if (ssb_chipco_available(&bus->chipco)) { in ssb_watchdog_register()
43 wdt.driver_data = &bus->chipco; in ssb_watchdog_register()
[all …]
H A Ddriver_extif.c22 return ssb_read32(extif->dev, offset); in extif_read32()
27 ssb_write32(extif->dev, offset, value); in extif_write32()
31 u32 mask, u32 value) in extif_write32_masked() argument
33 value &= mask; in extif_write32_masked()
34 value |= extif_read32(extif, offset) & ~mask; in extif_write32_masked()
143 if (!extif->dev) in ssb_extif_init()
145 spin_lock_init(&extif->gpio_lock); in ssb_extif_init()
148 u32 ssb_extif_gpio_in(struct ssb_extif *extif, u32 mask) in ssb_extif_gpio_in() argument
150 return extif_read32(extif, SSB_EXTIF_GPIO_IN) & mask; in ssb_extif_gpio_in()
153 u32 ssb_extif_gpio_out(struct ssb_extif *extif, u32 mask, u32 value) in ssb_extif_gpio_out() argument
[all …]
/openbmc/linux/arch/x86/kernel/apic/
H A Dipi.c1 // SPDX-License-Identifier: GPL-2.0
35 * - Disabled on the command line in apic_smt_update()
36 * - Only a single CPU is online in apic_smt_update()
37 * - Not all present CPUs have been at least booted once in apic_smt_update()
81 void native_send_call_func_ipi(const struct cpumask *mask) in native_send_call_func_ipi() argument
86 if (!cpumask_or_equal(mask, cpumask_of(cpu), cpu_online_mask)) in native_send_call_func_ipi()
89 if (cpumask_test_cpu(cpu, mask)) in native_send_call_func_ipi()
97 __apic_send_IPI_mask(mask, CALL_FUNCTION_VECTOR); in native_send_call_func_ipi()
102 static inline int __prepare_ICR2(unsigned int mask) in __prepare_ICR2() argument
104 return SET_XAPIC_DEST_FIELD(mask); in __prepare_ICR2()
[all …]
/openbmc/linux/arch/loongarch/include/asm/
H A Dirqflags.h1 /* SPDX-License-Identifier: GPL-2.0 */
3 * Copyright (C) 2020-2022 Loongson Technology Corporation Limited
16 u32 flags = CSR_CRMD_IE; in arch_local_irq_enable() local
18 "csrxchg %[val], %[mask], %[reg]\n\t" in arch_local_irq_enable()
19 : [val] "+r" (flags) in arch_local_irq_enable()
20 : [mask] "r" (CSR_CRMD_IE), [reg] "i" (LOONGARCH_CSR_CRMD) in arch_local_irq_enable()
26 u32 flags = 0; in arch_local_irq_disable() local
28 "csrxchg %[val], %[mask], %[reg]\n\t" in arch_local_irq_disable()
29 : [val] "+r" (flags) in arch_local_irq_disable()
30 : [mask] "r" (CSR_CRMD_IE), [reg] "i" (LOONGARCH_CSR_CRMD) in arch_local_irq_disable()
[all …]
/openbmc/linux/arch/sparc/lib/
H A Datomic32.c1 // SPDX-License-Identifier: GPL-2.0
3 * atomic32.c: 32-bit atomic_t implementation
8 * Based on asm-parisc/atomic.h Copyright (C) 2000 Philipp Rumpf
17 #define ATOMIC_HASH(a) (&__atomic_hash[(((unsigned long)a)>>8) & (ATOMIC_HASH_SIZE-1)])
20 [0 ... (ATOMIC_HASH_SIZE-1)] = __SPIN_LOCK_UNLOCKED(__atomic_hash)
35 unsigned long flags; \
36 spin_lock_irqsave(ATOMIC_HASH(v), flags); \
38 ret = v->counter; \
39 v->counter c_op i; \
41 spin_unlock_irqrestore(ATOMIC_HASH(v), flags); \
[all …]
/openbmc/linux/drivers/clk/baikal-t1/
H A Dccu-div.c1 // SPDX-License-Identifier: GPL-2.0-only
9 * Baikal-T1 CCU Dividers interface driver
12 #define pr_fmt(fmt) "bt1-ccu-div: " fmt
19 #include <linux/clk-provider.h>
27 #include "ccu-div.h"
35 GENMASK((_width) + CCU_DIV_CTL_CLKDIV_FLD - 1, CCU_DIV_CTL_CLKDIV_FLD)
48 * getter available with non-constant mask support.
50 static inline u32 ccu_div_get(u32 mask, u32 val) in ccu_div_get() argument
52 return (val & mask) >> CCU_DIV_CTL_CLKDIV_FLD; in ccu_div_get()
55 static inline u32 ccu_div_prep(u32 mask, u32 val) in ccu_div_prep() argument
[all …]
/openbmc/linux/drivers/clk/ti/
H A Dmux.c1 // SPDX-License-Identifier: GPL-2.0-only
7 * Tero Kristo <t-kristo@ti.com>
10 #include <linux/clk-provider.h>
28 * FIXME need a mux-specific flag to determine if val is bitwise or in ti_clk_mux_get_parent()
34 val = ti_clk_ll_ops->clk_readl(&mux->reg) >> mux->shift; in ti_clk_mux_get_parent()
35 val &= mux->mask; in ti_clk_mux_get_parent()
37 if (mux->table) { in ti_clk_mux_get_parent()
41 if (mux->table[i] == val) in ti_clk_mux_get_parent()
43 return -EINVAL; in ti_clk_mux_get_parent()
46 if (val && (mux->flags & CLK_MUX_INDEX_BIT)) in ti_clk_mux_get_parent()
[all …]
/openbmc/linux/drivers/bcma/
H A Ddriver_chipcommon.c7 * Copyright 2012, Hauke Mehrtens <hauke@hauke-m.de>
19 u32 mask, u32 value) in bcma_cc_write32_masked() argument
21 value &= mask; in bcma_cc_write32_masked()
22 value |= bcma_cc_read32(cc, offset) & ~mask; in bcma_cc_write32_masked()
30 if (cc->capabilities & BCMA_CC_CAP_PMU) in bcma_chipco_get_alp_clock()
39 struct bcma_bus *bus = cc->core->bus; in bcma_core_cc_has_pmu_watchdog()
41 if (cc->capabilities & BCMA_CC_CAP_PMU) { in bcma_core_cc_has_pmu_watchdog()
42 if (bus->chipinfo.id == BCMA_CHIP_ID_BCM53573) { in bcma_core_cc_has_pmu_watchdog()
43 WARN(bus->chipinfo.rev <= 1, "No watchdog available\n"); in bcma_core_cc_has_pmu_watchdog()
58 struct bcma_bus *bus = cc->core->bus; in bcma_chipco_watchdog_get_max_timer()
[all …]
/openbmc/linux/arch/x86/kernel/
H A Di8259.c1 // SPDX-License-Identifier: GPL-2.0
44 * This contains the irq mask for both 8259A irq controllers,
49 * Not all IRQs can be routed through the IO-APIC, eg. on certain (older)
50 * boards the timer interrupt is not really connected to any IO-APIC pin,
53 * Any '1' bit in this mask means the IRQ is routed through the IO-APIC.
61 unsigned int mask = 1 << irq; in mask_8259A_irq() local
62 unsigned long flags; in mask_8259A_irq() local
64 raw_spin_lock_irqsave(&i8259A_lock, flags); in mask_8259A_irq()
65 cached_irq_mask |= mask; in mask_8259A_irq()
70 raw_spin_unlock_irqrestore(&i8259A_lock, flags); in mask_8259A_irq()
[all …]
/openbmc/linux/drivers/net/ethernet/netronome/nfp/flower/
H A Dmatch.c1 // SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2 /* Copyright (C) 2017-2018 Netronome Systems, Inc. */
15 ext->nfp_flow_key_layer = key_type; in nfp_flower_compile_meta()
16 ext->mask_id = ~0; in nfp_flower_compile_meta()
18 msk->nfp_flow_key_layer = key_type; in nfp_flower_compile_meta()
19 msk->mask_id = ~0; in nfp_flower_compile_meta()
36 match.key->vlan_priority) | in nfp_flower_compile_tci()
38 match.key->vlan_id); in nfp_flower_compile_tci()
42 match.mask->vlan_priority) | in nfp_flower_compile_tci()
44 match.mask->vlan_id); in nfp_flower_compile_tci()
[all …]
/openbmc/linux/arch/parisc/include/asm/
H A Dbitops.h1 /* SPDX-License-Identifier: GPL-2.0 */
23 unsigned long mask = BIT_MASK(nr); in set_bit() local
24 unsigned long flags; in set_bit() local
27 _atomic_spin_lock_irqsave(addr, flags); in set_bit()
28 *addr |= mask; in set_bit()
29 _atomic_spin_unlock_irqrestore(addr, flags); in set_bit()
34 unsigned long mask = BIT_MASK(nr); in clear_bit() local
35 unsigned long flags; in clear_bit() local
38 _atomic_spin_lock_irqsave(addr, flags); in clear_bit()
39 *addr &= ~mask; in clear_bit()
[all …]
/openbmc/linux/sound/isa/ad1816a/
H A Dad1816a_lib.c1 // SPDX-License-Identifier: GPL-2.0-or-later
3 ad1816a.c - lowlevel code for Analog Devices AD1816A chip.
4 Copyright (C) 1999-2000 by Massimo Piccioni <dafastidio@libero.it>
24 for (timeout = 1000; timeout-- > 0; udelay(10)) in snd_ad1816a_busy_wait()
29 return -EBUSY; in snd_ad1816a_busy_wait()
46 unsigned char mask, unsigned char value) in snd_ad1816a_out_mask() argument
49 (value & mask) | (snd_ad1816a_in(chip, reg) & ~mask)); in snd_ad1816a_out_mask()
68 unsigned short mask, unsigned short value) in snd_ad1816a_write_mask() argument
71 (value & mask) | (snd_ad1816a_read(chip, reg) & ~mask)); in snd_ad1816a_write_mask()
99 unsigned long flags; in snd_ad1816a_open() local
[all …]
/openbmc/linux/arch/powerpc/platforms/powermac/
H A Dpfunc_core.c1 // SPDX-License-Identifier: GPL-2.0-only
84 while(bytes--) {
99 if ((cmd->cmdend - cmd->cmdptr) < 4) { in pmf_next32()
100 cmd->error = 1; in pmf_next32()
103 value = *((u32 *)cmd->cmdptr); in pmf_next32()
104 cmd->cmdptr += 4; in pmf_next32()
111 if ((cmd->cmdend - cmd->cmdptr) < count) { in pmf_next_blob()
112 cmd->error = 1; in pmf_next_blob()
115 value = cmd->cmdptr; in pmf_next_blob()
116 cmd->cmdptr += count; in pmf_next_blob()
[all …]
H A Dpfunc_base.c1 // SPDX-License-Identifier: GPL-2.0
29 unsigned int irq = irq_of_parse_and_map(func->node, 0); in macio_do_gpio_irq_enable()
31 return -EINVAL; in macio_do_gpio_irq_enable()
32 return request_irq(irq, macio_gpio_irq, 0, func->node->name, func); in macio_do_gpio_irq_enable()
37 unsigned int irq = irq_of_parse_and_map(func->node, 0); in macio_do_gpio_irq_disable()
39 return -EINVAL; in macio_do_gpio_irq_disable()
44 static int macio_do_gpio_write(PMF_STD_ARGS, u8 value, u8 mask) in macio_do_gpio_write() argument
46 u8 __iomem *addr = (u8 __iomem *)func->driver_data; in macio_do_gpio_write()
47 unsigned long flags; in macio_do_gpio_write() local
51 if (args && args->count && !args->u[0].v) in macio_do_gpio_write()
[all …]
/openbmc/linux/arch/powerpc/sysdev/
H A Dipic.c1 // SPDX-License-Identifier: GPL-2.0-or-later
35 .mask = IPIC_SIMSR_H,
42 .mask = IPIC_SIMSR_H,
49 .mask = IPIC_SIMSR_H,
56 .mask = IPIC_SIMSR_H,
63 .mask = IPIC_SIMSR_H,
70 .mask = IPIC_SIMSR_H,
77 .mask = IPIC_SIMSR_H,
84 .mask = IPIC_SIMSR_H,
91 .mask = IPIC_SIMSR_H,
[all …]

12345678910>>...43