/linux/Documentation/devicetree/bindings/i2c/ |
H A D | i2c-arb-gpio-challenge.yaml | 1 # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause 3 --- 4 $id: http://devicetree.org/schemas/i2c/i2c-arb-gpio-challenge.yaml# 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 7 title: GPIO-based I2C Arbitration Using a Challenge & Response Mechanism 10 - Doug Anderson <dianders@chromium.org> 11 - Peter Rosin <peda@axentia.se> 18 standard I2C multi-master rules. Using GPIOs is generally useful in the case 30 others can see. These are all active low with pull-ups enabled. We'll 32 * OUR_CLAIM: output from us signaling to other hosts that we want the bus [all …]
|
/linux/drivers/gpu/drm/nouveau/ |
H A D | nouveau_dma.c | 5 * Permission is hereby granted, free of charge, to any person obtaining 37 * -EINVAL if GET pointer currently outside main push buffer 38 * -EBUSY if timeout exceeded 45 val = nvif_rd32(chan->userd, chan->user_get); in READ_GET() 46 if (chan->user_get_hi) in READ_GET() 47 val |= (uint64_t)nvif_rd32(chan->userd, chan->user_get_hi) << 32; in READ_GET() 61 return -EBUSY; in READ_GET() 64 if (val < chan->push.addr || in READ_GET() 65 val > chan->push.addr + (chan->dma.max << 2)) in READ_GET() 66 return -EINVAL; in READ_GET() [all …]
|
/linux/fs/btrfs/ |
H A D | space-info.c | 1 // SPDX-License-Identifier: GPL-2.0 7 #include "space-info.h" 10 #include "free-space-cache.h" 11 #include "ordered-data.h" 13 #include "block-group.h" 16 #include "extent-tree.h" 30 * reservations we care about total_bytes - SUM(space_info->bytes_) when 36 * code on the rules for each type, but generally block_rsv->reserved is how 37 * much space is accounted for in space_info->bytes_may_use. 51 * ->reserve [all …]
|
/linux/arch/arm/mach-omap1/ |
H A D | sleep.S | 2 * linux/arch/arm/mach-omap1/sleep.S 4 * Low-level OMAP7XX/1510/1610 sleep/wakeUp support 14 * This program is free software; you can redistribute it and/or modify it 16 * Free Software Foundation; either version 2 of the License, or (at your 31 * with this program; if not, write to the Free Software Foundation, Inc., 69 stmfd sp!, {r0 - r12, lr} 86 @ prepare to put SDRAM into self-refresh manually 118 * Let's wait for the next wake up event to wake us up. r0 can't be 122 mcr p15, 0, r2, c7, c0, 4 @ wait for interrupt 133 ldmfd sp!, {r0 - r12, pc} [all …]
|
/linux/drivers/rtc/ |
H A D | rtc-tegra.c | 1 // SPDX-License-Identifier: GPL-2.0+ 5 * Copyright (c) 2010-2019, NVIDIA Corporation. 59 * eight 32 kHz clocks (~250 us). Outside of these updates the CPU is free to 60 * write. CPU is always free to read. 64 return readl(info->base + TEGRA_RTC_REG_BUSY) & 1; in tegra_rtc_check_busy() 68 * Wait for hardware to be ready for writing. This function tries to maximize 74 * AHB side) occurs every eight 32 kHz clocks (~250 us). The behavior of this 75 * function allows us to make some assumptions without introducing a race, 76 * because 250 us is plenty of time to read/write a value. 81 int retries = 500; /* ~490 us is the worst case, ~250 us is best */ in tegra_rtc_wait_while_busy() [all …]
|
/linux/drivers/scsi/aic7xxx/ |
H A D | aic79xx.seq | 4 * Copyright (c) 1994-2001, 2004 Justin T. Gibbs. 5 * Copyright (c) 2000-2002 Adaptec Inc. 19 * 3. Neither the names of the above-listed copyright holders nor the names 24 * GNU General Public License ("GPL") version 2 as published by the Free 51 if ((ahd->bugs & AHD_INTCOLLISION_BUG) != 0) { 58 if ((ahd->bugs & AHD_INTCOLLISION_BUG) != 0) { 73 * If the kernel has caught up with us, thaw the queue. 100 cmp SCB_NEXT_COMPLETE[1], SCB_LIST_NULL jne . - 1; 124 if ((ahd->bugs & AHD_FAINT_LED_BUG) != 0) { 128 * and re-selections. Make the LED status [all …]
|
H A D | aic7xxx.seq | 4 * Copyright (c) 1994-2001 Justin T. Gibbs. 5 * Copyright (c) 2000-2001 Adaptec Inc. 19 * 3. Neither the names of the above-listed copyright holders nor the names 24 * GNU General Public License ("GPL") version 2 as published by the Free 60 * use byte 27 of the SCB as a pseudo-next pointer and to thread a list 61 * of SCBs that are awaiting selection. Since 0-0xfe are valid SCB indexes, 63 * this list every time a request sense occurs or after completing a non-tagged 78 if ((ahc->features & AHC_ULTRA2) != 0) { 82 if ((ahc->features & AHC_TWIN) != 0) { 88 if ((ahc->features & AHC_TWIN) != 0) { [all …]
|
/linux/kernel/ |
H A D | umh.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * umh - the kernel usermode helper 42 if (info->cleanup) in call_usermodehelper_freeinfo() 43 (*info->cleanup)(info); in call_usermodehelper_freeinfo() 49 struct completion *comp = xchg(&sub_info->complete, NULL); in umh_complete() 70 spin_lock_irq(¤t->sighand->siglock); in call_usermodehelper_exec_async() 72 spin_unlock_irq(¤t->sighand->siglock); in call_usermodehelper_exec_async() 80 current->fs->umask = 0022; in call_usermodehelper_exec_async() 88 retval = -ENOMEM; in call_usermodehelper_exec_async() 94 new->cap_bset = cap_intersect(usermodehelper_bset, new->cap_bset); in call_usermodehelper_exec_async() [all …]
|
H A D | exit.c | 1 // SPDX-License-Identifier: GPL-2.0-only 44 #include <linux/posix-timers.h> 74 #include <uapi/linux/wait.h> 84 * overflowing 32-bit refcounts or the ldsem writer count. 128 nr_threads--; in __unhash_process() 135 list_del_rcu(&p->tasks); in __unhash_process() 136 list_del_init(&p->sibling); in __unhash_process() 139 list_del_rcu(&p->thread_node); in __unhash_process() 143 * This function expects the tasklist_lock write-locked. 147 struct signal_struct *sig = tsk->signal; in __exit_signal() [all …]
|
/linux/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn32/ |
H A D | dcn32_clk_mgr_smu_msg.c | 4 * Permission is hereby granted, free of charge, to any person obtaining a 46 * Function to be used instead of REG_WAIT macro because the wait ends when 64 } while (max_retries--); in dcn32_smu_wait_for_response() 66 TRACE_SMU_DELAY(delay_us * (initial_max_retries - max_retries), clk_mgr->base.ctx); in dcn32_smu_wait_for_response() 73 /* Wait for response register to be ready */ in dcn32_smu_send_msg_with_param() 85 TRACE_SMU_MSG(msg_id, param_in, clk_mgr->base.ctx); in dcn32_smu_send_msg_with_param() 87 /* Wait for response */ in dcn32_smu_send_msg_with_param() 121 } while (max_retries--); in dcn32_smu_wait_for_response_delay() 123 TRACE_SMU_DELAY(*total_delay_us, clk_mgr->base.ctx); in dcn32_smu_wait_for_response_delay() 133 /* Wait for response register to be ready */ in dcn32_smu_send_msg_with_param_delay() [all …]
|
/linux/kernel/locking/ |
H A D | qspinlock_paravirt.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 16 * pv_wait(u8 *ptr, u8 val) -- suspends the vcpu if *ptr == val 17 * pv_kick(cpu) -- wakes a suspended vcpu 31 * mitigates the slight slowdown for non-overcommitted guest with this 32 * aggressive wait-early mechanism. 63 * The pending bit is set by the queue head vCPU of the MCS wait queue in 67 * enter the MCS wait queue. So lock starvation shouldn't happen as long 72 * mode spinning on the lock unless the MCS wait queue is empty. In this 85 * present in the MCS wait queue but the pending bit isn't set. in pv_hybrid_queued_unfair_trylock() 88 int val = atomic_read(&lock->val); in pv_hybrid_queued_unfair_trylock() [all …]
|
/linux/drivers/usb/storage/ |
H A D | usb.c | 1 // SPDX-License-Identifier: GPL-2.0+ 6 * (c) 1999-2003 Matthew Dharm (mdharm-usb@one-eyed-alien.net) 9 * (c) 2000 David L. Brown, Jr. (usb-storage@davidb.org) 10 * (c) 2003-2009 Alan Stern (stern@rowland.harvard.edu) 22 * similar to commands in the SCSI-II and ATAPI specifications. 25 * exhibits class-specific exemptions from the USB specification. 27 * that they are used to communicate wait, failed and OK on commands. 61 #include "uas-detect.h" 64 #define DRV_NAME "usb-storage" 67 MODULE_AUTHOR("Matthew Dharm <mdharm-usb@one-eyed-alien.net>"); [all …]
|
/linux/drivers/net/ethernet/marvell/ |
H A D | mvmdio.c | 13 * Thomas Petazzoni <thomas.petazzoni@free-electrons.com> 34 #include <linux/wait.h> 65 * - Kirkwood 88F6281 (Globalscale Dreamplug): 45us to 95us (Interrupt) 66 * - Armada 370 (Globalscale Mirabox): 41us to 43us (Polled) 68 #define MVMDIO_SMI_TIMEOUT 1000 /* 1000us = 1ms */ 76 * but also reflects SMI completion), use that to wait for 92 /* Wait for the SMI unit to be ready for another operation 97 struct orion_mdio_dev *dev = bus->priv; in orion_mdio_wait_ready() 101 if (dev->err_interrupt <= 0) { in orion_mdio_wait_ready() 102 if (!read_poll_timeout_atomic(ops->is_done, done, done, 2, in orion_mdio_wait_ready() [all …]
|
/linux/Documentation/RCU/ |
H A D | RTFP.txt | 4 This document describes RCU-related publications, and is followed by 19 with short-lived threads, such as the K42 research operating system. 20 However, Linux has long-lived tasks, so more is needed. 23 serialization, which is an RCU-like mechanism that relies on the presence 27 that these overheads were not so expensive in the mid-80s. Nonetheless, 28 passive serialization appears to be the first deferred-destruction 30 has lapsed, so this approach may be used in non-GPL software, if desired. 34 In 1987, Rashid et al. described lazy TLB-flush [RichardRashid87a]. 36 this paper helped inspire the update-side batching used in the later 38 a description of Argus that noted that use of out-of-date values can [all …]
|
/linux/fs/xfs/ |
H A D | xfs_icache.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Copyright (c) 2000-2005 Silicon Graphics, Inc. 94 ip = alloc_inode_sb(mp->m_super, xfs_inode_cache, GFP_KERNEL | __GFP_NOFAIL); in xfs_inode_alloc() 96 if (inode_init_always(mp->m_super, VFS_I(ip))) { in xfs_inode_alloc() 102 VFS_I(ip)->i_mode = 0; in xfs_inode_alloc() 103 mapping_set_folio_min_order(VFS_I(ip)->i_mapping, in xfs_inode_alloc() 104 M_IGEO(mp)->min_folio_order); in xfs_inode_alloc() 107 ASSERT(atomic_read(&ip->i_pincount) == 0); in xfs_inode_alloc() 108 ASSERT(ip->i_ino == 0); in xfs_inode_alloc() 111 ip->i_ino = ino; in xfs_inode_alloc() [all …]
|
H A D | xfs_trans_ail.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Copyright (c) 2000-2002,2005 Silicon Graphics, Inc. 36 __must_hold(&ailp->ail_lock) in xfs_ail_check() 46 if (list_empty(&ailp->ail_head)) in xfs_ail_check() 52 in_ail = test_bit(XFS_LI_IN_AIL, &lip->li_flags); in xfs_ail_check() 53 prev_lip = list_entry(lip->li_ail.prev, struct xfs_log_item, li_ail); in xfs_ail_check() 54 if (&prev_lip->li_ail != &ailp->ail_head) in xfs_ail_check() 55 prev_lsn = prev_lip->li_lsn; in xfs_ail_check() 56 next_lip = list_entry(lip->li_ail.next, struct xfs_log_item, li_ail); in xfs_ail_check() 57 if (&next_lip->li_ail != &ailp->ail_head) in xfs_ail_check() [all …]
|
/linux/drivers/gpu/drm/i915/ |
H A D | i915_utils.h | 4 * Permission is hereby granted, free of charge, to any person obtaining a 43 #define FDO_BUG_URL "https://drm.pages.freedesktop.org/intel-docs/how-to-file-i915-bugs.html" 63 #define i915_inject_probe_failure(i915) i915_inject_probe_error((i915), -ENODEV) 67 drm_dbg(&(i915)->drm, fmt, ##__VA_ARGS__); \ 69 drm_err(&(i915)->drm, fmt, ##__VA_ARGS__); \ 78 start__ >= max__ || size__ > max__ - start__; \ 90 start__ > max__ || size__ > max__ - start__; \ 98 (typeof(ptr))(__v & -BIT(n)); \ 101 #define ptr_unmask_bits(ptr, n) ((unsigned long)(ptr) & (BIT(n) - 1)) 105 *(bits) = __v & (BIT(n) - 1); \ [all …]
|
/linux/Documentation/filesystems/xfs/ |
H A D | xfs-delayed-logging-design.rst | 1 .. SPDX-License-Identifier: GPL-2.0 33 details logged are made up of the changes to in-core structures rather than 34 on-disk structures. Other objects - typically buffers - have their physical 64 place. This means that permanent transactions can be used for one-shot 65 modifications, but one-shot reservations cannot be used for permanent 68 In the code, a one-shot transaction pattern looks somewhat like this:: 97 While this might look similar to a one-shot transaction, there is an important 123 the on-disk journal. 142 in the journal and wait for that to complete. 165 transaction, we have to reserve enough space to record a full leaf-to-root split [all …]
|
/linux/Documentation/timers/ |
H A D | timers-howto.rst | 2 delays - Information on the various kernel delay / sleep mechanisms 14 ---------------- 23 and will busy wait for enough loop cycles to achieve 30 udelay is the generally preferred API; ndelay-level 31 precision may not actually exist on many non-PC devices. 38 NON-ATOMIC CONTEXT: 45 -- Backed by busy-wait loop: 49 -- Backed by hrtimers: 53 -- Backed by jiffies / legacy_timers 63 SLEEPING FOR "A FEW" USECS ( < ~10us? ): [all …]
|
/linux/tools/testing/selftests/timers/ |
H A D | skew_consistency.c | 2 * by: john stultz (johnstul@us.ibm.com) 6 * NOTE: This is a meta-test which cranks the ADJ_FREQ knob back 8 * that the inconsistency-check tests be present in the same directory it 12 * $ gcc skew_consistency.c -o skew_consistency -lrt 14 * This program is free software: you can redistribute it and/or modify 16 * the Free Software Foundation, either version 2 of the License, or 36 #include <sys/wait.h> 50 return system("./inconsistency-check -c 1 -t 600"); in main() 56 ppm = -ppm; in main()
|
/linux/io_uring/ |
H A D | poll.c | 1 // SPDX-License-Identifier: GPL-2.0 49 * We usually have 1-2 refs taken, 128 is more than enough and we want to 56 static int io_poll_wake(struct wait_queue_entry *wait, unsigned mode, int sync, 61 unsigned long priv = (unsigned long)wqe->private; in wqe_to_req() 68 unsigned long priv = (unsigned long)wqe->private; in wqe_is_double() 82 v = atomic_fetch_or(IO_POLL_RETRY_FLAG, &req->poll_refs); in io_poll_get_ownership_slowpath() 85 return !(atomic_fetch_inc(&req->poll_refs) & IO_POLL_REF_MASK); in io_poll_get_ownership_slowpath() 89 * If refs part of ->poll_refs (see IO_POLL_REF_MASK) is 0, it's free. We can 96 if (unlikely(atomic_read(&req->poll_refs) >= IO_POLL_REF_BIAS)) in io_poll_get_ownership() 98 return !(atomic_fetch_inc(&req->poll_refs) & IO_POLL_REF_MASK); in io_poll_get_ownership() [all …]
|
/linux/arch/arm/boot/dts/allwinner/ |
H A D | sun7i-a20-hummingbird.dts | 6 * This file is dual-licensed: you can use it either under the terms 11 * a) This file is free software; you can redistribute it and/or 13 * published by the Free Software Foundation; either version 2 of the 23 * b) Permission is hereby granted, free of charge, to any person 45 /dts-v1/; 46 #include "sun7i-a20.dtsi" 47 #include "sunxi-common-regulators.dtsi" 49 #include <dt-bindings/gpio/gpio.h> 50 #include <dt-bindings/interrupt-controller/irq.h> 54 compatible = "merrii,a20-hummingbird", "allwinner,sun7i-a20"; [all …]
|
/linux/drivers/gpu/drm/amd/amdgpu/ |
H A D | amdgpu_cs.c | 5 * Permission is hereby granted, free of charge, to any person obtaining a 31 #include <linux/dma-buf.h> 49 struct amdgpu_fpriv *fpriv = filp->driver_priv; in amdgpu_cs_parser_init() 51 if (cs->in.num_chunks == 0) in amdgpu_cs_parser_init() 52 return -EINVAL; in amdgpu_cs_parser_init() 55 p->adev = adev; in amdgpu_cs_parser_init() 56 p->filp = filp; in amdgpu_cs_parser_init() 58 p->ctx = amdgpu_ctx_get(fpriv, cs->in.ctx_id); in amdgpu_cs_parser_init() 59 if (!p->ctx) in amdgpu_cs_parser_init() 60 return -EINVAL; in amdgpu_cs_parser_init() [all …]
|
/linux/drivers/gpu/drm/scheduler/ |
H A D | sched_fence.c | 4 * Permission is hereby granted, free of charge, to any person obtaining a 28 #include <linux/wait.h> 38 return -ENOMEM; in drm_sched_fence_slab_init() 53 * smp_store_release() to ensure another thread racing us in drm_sched_fence_set_parent() 57 smp_store_release(&s_fence->parent, dma_fence_get(fence)); in drm_sched_fence_set_parent() 59 &s_fence->finished.flags)) in drm_sched_fence_set_parent() 60 dma_fence_set_deadline(fence, s_fence->deadline); in drm_sched_fence_set_parent() 69 * to some firmware) doesn't have to busy wait for parent to show in drm_sched_fence_scheduled() 75 dma_fence_signal(&fence->scheduled); in drm_sched_fence_scheduled() 81 dma_fence_set_error(&fence->finished, result); in drm_sched_fence_finished() [all …]
|
/linux/fs/ |
H A D | eventpoll.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 25 #include <linux/wait.h> 48 * 2) ep->mtx (mutex) 49 * 3) ep->lock (rwlock) 52 * We need a rwlock (ep->lock) because we manipulate objects 58 * we need a lock that will allow us to sleep. This lock is a 59 * mutex (ep->mtx). It is acquired during the event transfer loop, 68 * It is necessary to acquire multiple "ep->mtx"es at once in the 71 * epoll_ctl(e1, EPOLL_CTL_ADD, e2), e1->mtx will always be acquired 72 * before e2->mtx). Since we disallow cycles of epoll file [all …]
|