| /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/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" 31 * reservations we care about total_bytes - SUM(space_info->bytes_) when 37 * code on the rules for each type, but generally block_rsv->reserved is how 38 * much space is accounted for in space_info->bytes_may_use. 52 * ->reserve [all …]
|
| H A D | block-group.c | 1 // SPDX-License-Identifier: GPL-2.0 7 #include "block-group.h" 8 #include "space-info.h" 9 #include "disk-io.h" 10 #include "free-space-cache.h" 11 #include "free-space-tree.h" 14 #include "ref-verify.h" 16 #include "tree-log.h" 17 #include "delalloc-space.h" 23 #include "extent-tree.h" [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/tools/testing/selftests/cgroup/ |
| H A D | test_freezer.c | 1 /* SPDX-License-Identifier: GPL-2.0 */ 12 #include <sys/wait.h> 32 return -1; in cg_check_frozen() 40 return -1; in cg_check_frozen() 56 * Attach a task to the given cgroup and wait for a cgroup frozen event. 62 int fd, ret = -1; in cg_enter_and_wait_for_frozen() 89 * Freeze the given cgroup and wait for the inotify signal. 95 int fd, ret = -1; in cg_freeze_wait() 119 * re-parented. 169 free(cgroup); in test_cgfreezer_simple() [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/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/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/fs/xfs/ |
| H A D | xfs_icache.c | 1 // SPDX-License-Identifier: GPL-2.0 3 * Copyright (c) 2000-2005 Silicon Graphics, Inc. 97 ip = alloc_inode_sb(mp->m_super, xfs_inode_cache, GFP_KERNEL | __GFP_NOFAIL); in xfs_inode_alloc() 99 if (inode_init_always(mp->m_super, VFS_I(ip))) { in xfs_inode_alloc() 105 VFS_I(ip)->i_mode = 0; in xfs_inode_alloc() 106 mapping_set_folio_min_order(VFS_I(ip)->i_mapping, in xfs_inode_alloc() 107 M_IGEO(mp)->min_folio_order); in xfs_inode_alloc() 110 ASSERT(atomic_read(&ip->i_pincount) == 0); in xfs_inode_alloc() 111 ASSERT(ip->i_ino == 0); in xfs_inode_alloc() 114 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/kernel/ |
| H A D | exit.c | 1 // SPDX-License-Identifier: GPL-2.0-only 43 #include <linux/posix-timers.h> 75 #include <uapi/linux/wait.h> 85 * overflowing 32-bit refcounts or the ldsem writer count. 139 nr_threads--; in __unhash_process() 141 detach_pid(post->pids, p, PIDTYPE_PID); in __unhash_process() 142 wake_up_all(&pid->wait_pidfd); in __unhash_process() 145 detach_pid(post->pids, p, PIDTYPE_TGID); in __unhash_process() 146 detach_pid(post->pids, p, PIDTYPE_PGID); in __unhash_process() 147 detach_pid(post->pids, p, PIDTYPE_SID); in __unhash_process() [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> 50 struct amdgpu_fpriv *fpriv = filp->driver_priv; in amdgpu_cs_parser_init() 52 if (cs->in.num_chunks == 0) in amdgpu_cs_parser_init() 53 return -EINVAL; in amdgpu_cs_parser_init() 56 p->adev = adev; in amdgpu_cs_parser_init() 57 p->filp = filp; in amdgpu_cs_parser_init() 59 p->ctx = amdgpu_ctx_get(fpriv, cs->in.ctx_id); in amdgpu_cs_parser_init() 60 if (!p->ctx) in amdgpu_cs_parser_init() 61 return -EINVAL; in amdgpu_cs_parser_init() [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 (spinlock) 52 * We need a spinlock (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 …]
|
| /linux/drivers/md/bcache/ |
| H A D | journal.h | 1 /* SPDX-License-Identifier: GPL-2.0 */ 8 * The journal is treated as a circular buffer of buckets - a journal entry 16 * superblock - all the things that are frequently updated. This is for future 22 * Currently, we don't journal BTREE_REPLACE operations - this will hopefully be 23 * fixed eventually. This isn't a bug - BTREE_REPLACE is used for insertions 32 * journal entry still open - i.e. that has keys that haven't been flushed to 38 * zero, we pop it off - thus, the size of the fifo tells us the number of open 48 * might contain keys for many journal entries - we handle this by making sure 54 * As mentioned previously, our fifo of refcounts tells us the number of open 56 * last_seq - the oldest journal entry we still need. We write last_seq in each [all …]
|
| /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_ref 392 io_poll_wake(struct wait_queue_entry * wait,unsigned mode,int sync,void * key) io_poll_wake() argument [all...] |
| H A D | io-wq.c | 1 // SPDX-License-Identifier: GPL-2.0 22 #include "io-wq.h" 32 IO_WORKER_F_FREE = 2, /* worker on free list */ 89 * The list of free workers. Protected by #workers_lock 128 struct wait_queue_entry wait; member 160 return __io_get_work_hash(atomic_read(&work->flags)); in io_get_work_hash() 165 return refcount_inc_not_zero(&worker->ref); in io_worker_get() 170 if (refcount_dec_and_test(&worker->ref)) in io_worker_release() 171 complete(&worker->ref_done); in io_worker_release() 176 return &wq->acct[bound ? IO_WQ_ACCT_BOUND : IO_WQ_ACCT_UNBOUND]; in io_get_acct() [all …]
|
| /linux/drivers/char/ |
| H A D | nwbutton.c | 1 // SPDX-License-Identifier: GPL-2.0-only 3 * NetWinder Button Driver- 22 #include <asm/mach-types.h> 48 * do so and return -ENOMEM. If an attempt is made to register a null pointer, 49 * it will fail to do so and return -EINVAL. 52 * free entry. 61 return -ENOMEM; in button_add_callback() 64 return -EINVAL; in button_add_callback() 76 * with -EINVAL. If there is more than one entry with the same address, 78 * last one to be registered first (FILO- First In Last Out). [all …]
|
| /linux/drivers/input/serio/ |
| H A D | userio.c | 6 * This program is free software; you can redistribute it and/or modify it 8 * the Free Software Foundation; either version 2 of the License, or (at 51 * userio_device_write - Write data from serio to a userio device in userspace 57 struct userio_device *userio = id->port_data; in userio_device_write() 59 scoped_guard(spinlock_irqsave, &userio->buf_lock) { in userio_device_write() 60 userio->buf[userio->head] = val; in userio_device_write() 61 userio->head = (userio->head + 1) % USERIO_BUFSIZE; in userio_device_write() 63 if (userio->head == userio->tail) in userio_device_write() 68 wake_up_interruptible(&userio->waitq); in userio_device_write() 78 return -ENOMEM; in userio_char_open() [all …]
|
| /linux/arch/mips/cavium-octeon/executive/ |
| H A D | cvmx-helper-xaui.c | 7 * Copyright (C) 2003-2018 Cavium, Inc. 9 * This file is free software; you can redistribute it and/or modify 11 * published by the Free Software Foundation. 14 * AS-IS and WITHOUT ANY WARRANTY; without even the implied warranty 20 * along with this file; if not, write to the Free Software 21 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 36 #include <asm/octeon/cvmx-config.h> 38 #include <asm/octeon/cvmx-helper.h> 40 #include <asm/octeon/cvmx-pko-defs.h> 41 #include <asm/octeon/cvmx-gmxx-defs.h> [all …]
|
| /linux/drivers/scsi/aacraid/ |
| H A D | commsup.c | 1 // SPDX-License-Identifier: GPL-2.0-or-later 9 * Copyright (c) 2000-2010 Adaptec, Inc. 10 * 2010-2015 PMC-Sierra, Inc. (aacraid@pmc-sierra.com) 11 * 2016-2017 Microsemi Corp. (aacraid@microsemi.com) 42 * fib_map_alloc - allocate the fib objects 51 dev->max_cmd_size = AAC_MAX_NATIVE_SIZE; in fib_map_alloc() 55 &dev->pdev->dev, dev->max_cmd_size, dev->scsi_host_ptr->can_queue, in fib_map_alloc() 56 AAC_NUM_MGT_FIB, &dev->hw_fib_pa)); in fib_map_alloc() 57 dev->hw_fib_va = dma_alloc_coherent(&dev->pdev->dev, in fib_map_alloc() 58 (dev->max_cmd_size + sizeof(struct aac_fib_xporthdr)) in fib_map_alloc() [all …]
|
| /linux/arch/arm/boot/dts/samsung/ |
| H A D | exynos5250-snow-common.dtsi | 1 // SPDX-License-Identifier: GPL-2.0 8 #include <dt-bindings/gpio/gpio.h> 9 #include <dt-bindings/clock/maxim,max77686.h> 10 #include <dt-bindings/interrupt-controller/irq.h> 11 #include <dt-bindings/input/input.h> 12 #include <dt-bindings/sound/samsung-i2s.h> 30 stdout-path = "serial3:115200n8"; 33 gpio-keys { 34 compatible = "gpio-keys"; 35 pinctrl-names = "default"; [all …]
|
| /linux/fs/jbd2/ |
| H A D | transaction.c | 1 // SPDX-License-Identifier: GPL-2.0+ 7 * Copyright 1998 Red Hat corp --- All Rights Reserved 26 #include <linux/backing-dev.h> 47 return -ENOMEM; in jbd2_journal_init_transaction_cache() 83 transaction->t_journal = journal; in jbd2_get_transaction() 84 transaction->t_state = T_RUNNING; in jbd2_get_transaction() 85 transaction->t_start_time = ktime_get(); in jbd2_get_transaction() 86 transaction->t_tid = journal->j_transaction_sequence++; in jbd2_get_transaction() 87 transaction->t_expires = jiffies + journal->j_commit_interval; in jbd2_get_transaction() 88 atomic_set(&transaction->t_updates, 0); in jbd2_get_transaction() [all …]
|