| /kernel/linux/linux-5.10/arch/mips/lib/ |
| D | bitops.c | 6 * 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 …]
|
| /kernel/linux/linux-6.6/arch/mips/lib/ |
| D | bitops.c | 6 * 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 …]
|
| /kernel/linux/linux-6.6/arch/loongarch/include/asm/ |
| D | irqflags.h | 1 /* 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 17 register u32 mask asm("t0") = CSR_CRMD_IE; in arch_local_irq_enable() 20 "csrxchg %[val], %[mask], %[reg]\n\t" in arch_local_irq_enable() 21 : [val] "+r" (flags) in arch_local_irq_enable() 22 : [mask] "r" (mask), [reg] "i" (LOONGARCH_CSR_CRMD) in arch_local_irq_enable() 28 u32 flags = 0; in arch_local_irq_disable() local 29 register u32 mask asm("t0") = CSR_CRMD_IE; in arch_local_irq_disable() 32 "csrxchg %[val], %[mask], %[reg]\n\t" in arch_local_irq_disable() [all …]
|
| /kernel/linux/linux-6.6/arch/powerpc/platforms/85xx/ |
| D | socrates_fpga_pic.c | 1 // 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 …]
|
| /kernel/linux/linux-5.10/arch/powerpc/platforms/85xx/ |
| D | socrates_fpga_pic.c | 1 // SPDX-License-Identifier: GPL-2.0-only 23 #define SOCRATES_FPGA_IRQ_MASK ((1 << SOCRATES_FPGA_NUM_IRQS) - 1) 67 unsigned long flags; in socrates_fpga_pic_get_irq() local 78 raw_spin_lock_irqsave(&socrates_fpga_pic_lock, flags); in socrates_fpga_pic_get_irq() 80 raw_spin_unlock_irqrestore(&socrates_fpga_pic_lock, flags); in socrates_fpga_pic_get_irq() 81 for (i = SOCRATES_FPGA_NUM_IRQS - 1; i >= 0; i--) { in socrates_fpga_pic_get_irq() 103 chip->irq_eoi(&desc->irq_data); in socrates_fpga_pic_cascade() 108 unsigned long flags; in socrates_fpga_pic_ack() local 110 uint32_t mask; in socrates_fpga_pic_ack() local 113 raw_spin_lock_irqsave(&socrates_fpga_pic_lock, flags); in socrates_fpga_pic_ack() [all …]
|
| /kernel/linux/linux-5.10/fs/notify/fanotify/ |
| D | fanotify_user.c | 1 // SPDX-License-Identifier: GPL-2.0 34 * All flags that may be specified in parameter event_f_flags of fanotify_init. 36 * Internal and external open flags are stored together in field f_flags of 37 * struct file. Only external open flags shall be allowed in event_f_flags. 38 * Internal flags like FMODE_NONOTIFY, FMODE_EXEC, FMODE_NOCMTIME shall be 77 info_len += fanotify_fid_info_len(dir_fh_len, info->name_len); in fanotify_event_info_len() 78 } else if ((fid_mode & FAN_REPORT_NAME) && (event->mask & FAN_ONDIR)) { in fanotify_event_info_len() 107 spin_lock(&group->notification_lock); in get_one_event() 117 event = ERR_PTR(-EINVAL); in get_one_event() 121 if (fanotify_is_perm_event(event->mask)) in get_one_event() [all …]
|
| /kernel/linux/linux-6.6/arch/mips/kernel/ |
| D | irq-gt641xx.c | 1 // 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(>641xx_irq_lock, flags); in ack_gt641xx_irq() 26 cause &= ~GT641XX_IRQ_TO_BIT(d->irq); in ack_gt641xx_irq() 28 raw_spin_unlock_irqrestore(>641xx_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(>641xx_irq_lock, flags); in mask_gt641xx_irq() [all …]
|
| /kernel/linux/linux-5.10/arch/mips/kernel/ |
| D | irq-gt641xx.c | 1 // 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(>641xx_irq_lock, flags); in ack_gt641xx_irq() 26 cause &= ~GT641XX_IRQ_TO_BIT(d->irq); in ack_gt641xx_irq() 28 raw_spin_unlock_irqrestore(>641xx_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(>641xx_irq_lock, flags); in mask_gt641xx_irq() [all …]
|
| /kernel/linux/linux-6.6/drivers/gpio/ |
| D | gpio-ath79.c | 1 // 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 …]
|
| /kernel/linux/linux-5.10/sound/soc/sof/ |
| D | ops.c | 1 // 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 …]
|
| /kernel/linux/linux-5.10/drivers/gpio/ |
| D | gpio-ath79.c | 1 // 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> 12 #include <linux/platform_data/gpio-ath79.h> 45 return readl(ctrl->base + reg); in ath79_gpio_read() 51 writel(val, ctrl->base + reg); in ath79_gpio_write() 55 struct ath79_gpio_ctrl *ctrl, unsigned reg, u32 mask, u32 bits) in ath79_gpio_update_bits() argument 60 new_val = (old_val & ~mask) | (bits & mask); in ath79_gpio_update_bits() 71 u32 mask = BIT(irqd_to_hwirq(data)); in ath79_gpio_irq_unmask() local 72 unsigned long flags; in ath79_gpio_irq_unmask() local [all …]
|
| D | gpio-ws16c48.c | 1 // SPDX-License-Identifier: GPL-2.0-only 34 * struct ws16c48_gpio - GPIO device private data structure 40 * @flow_mask: IRQ flow type mask for the respective I/O bits 57 const unsigned mask = BIT(offset % 8); in ws16c48_gpio_get_direction() local 59 if (ws16c48gpio->io_state[port] & mask) in ws16c48_gpio_get_direction() 69 const unsigned mask = BIT(offset % 8); in ws16c48_gpio_direction_input() local 70 unsigned long flags; in ws16c48_gpio_direction_input() local 72 raw_spin_lock_irqsave(&ws16c48gpio->lock, flags); in ws16c48_gpio_direction_input() 74 ws16c48gpio->io_state[port] |= mask; in ws16c48_gpio_direction_input() 75 ws16c48gpio->out_state[port] &= ~mask; in ws16c48_gpio_direction_input() [all …]
|
| /kernel/linux/linux-5.10/fs/nfsd/ |
| D | nfs4acl.c | 57 /* 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 …]
|
| /kernel/linux/linux-6.6/fs/nfsd/ |
| D | nfs4acl.c | 57 /* 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 …]
|
| /kernel/linux/linux-5.10/arch/x86/kernel/apic/ |
| D | ipi.c | 1 // SPDX-License-Identifier: GPL-2.0 33 * - Disabled on the command line in apic_smt_update() 34 * - Only a single CPU is online in apic_smt_update() 35 * - Not all present CPUs have been at least booted once in apic_smt_update() 55 apic->send_IPI_allbutself(vector); in apic_send_IPI_allbutself() 57 apic->send_IPI_mask_allbutself(cpu_online_mask, vector); in apic_send_IPI_allbutself() 71 apic->send_IPI(cpu, RESCHEDULE_VECTOR); in native_smp_send_reschedule() 76 apic->send_IPI(cpu, CALL_FUNCTION_SINGLE_VECTOR); in native_send_call_func_single_ipi() 79 void native_send_call_func_ipi(const struct cpumask *mask) in native_send_call_func_ipi() argument 84 if (!cpumask_or_equal(mask, cpumask_of(cpu), cpu_online_mask)) in native_send_call_func_ipi() [all …]
|
| /kernel/linux/linux-6.6/sound/soc/sof/ |
| D | ops.c | 1 // 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 …]
|
| /kernel/linux/linux-5.10/lib/ |
| D | cpumask.c | 1 // SPDX-License-Identifier: GPL-2.0 11 * cpumask_next - get the next cpu in a cpumask 19 /* -1 is a legal arg here. */ in cpumask_next() 20 if (n != -1) in cpumask_next() 27 * cpumask_next_and - get the next cpu in *src1p & *src2p 37 /* -1 is a legal arg here. */ in cpumask_next_and() 38 if (n != -1) in cpumask_next_and() 46 * cpumask_any_but - return a "random" in a cpumask, but not this one. 47 * @mask: the cpumask to search 50 * Often used to find any cpu but smp_processor_id() in a mask. [all …]
|
| /kernel/linux/linux-5.10/arch/mips/vr41xx/common/ |
| D | icu.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 5 * Copyright (C) 2001-2002 MontaVista Software Inc. 7 * Copyright (C) 2003-2006 Yoichi Yuasa <yuasa@linux-mips.org> 12 * - New creation, NEC VR4122 and VR4131 are supported. 13 * - Added support for NEC VR4111 and VR4121. 15 * Yoichi Yuasa <yuasa@linux-mips.org> 16 * - Coped with INTASSIGN of NEC VR4133. 84 #define SYSINT1_IRQ_TO_PIN(x) ((x) - SYSINT1_IRQ_BASE) /* Pin 0-15 */ 85 #define SYSINT2_IRQ_TO_PIN(x) ((x) - SYSINT2_IRQ_BASE) /* Pin 0-15 */ 87 #define INT_TO_IRQ(x) ((x) + 2) /* Int0-4 -> IRQ2-6 */ [all …]
|
| /kernel/linux/linux-6.6/fs/notify/fanotify/ |
| D | fanotify_user.c | 1 // 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 …]
|
| /kernel/linux/linux-6.6/arch/x86/kernel/apic/ |
| D | ipi.c | 1 // 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 if (WARN_ON_ONCE(!apic->nmi_to_offline_cpu)) in apic_send_nmi_to_offline_cpu() 106 apic->send_IPI(cpu, NMI_VECTOR); in apic_send_nmi_to_offline_cpu() [all …]
|
| /kernel/linux/linux-6.6/drivers/ssb/ |
| D | embedded.c | 5 * 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 …]
|
| /kernel/linux/linux-5.10/drivers/ssb/ |
| D | embedded.c | 5 * 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 …]
|
| /kernel/linux/linux-5.10/arch/loongarch/include/asm/ |
| D | irqflags.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 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() 36 u32 flags = 0; in arch_local_irq_save() local [all …]
|
| /kernel/linux/linux-5.10/arch/sparc/lib/ |
| D | atomic32.c | 1 // 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 …]
|
| /kernel/linux/linux-6.6/arch/sparc/lib/ |
| D | atomic32.c | 1 // 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 …]
|