Home
last modified time | relevance | path

Searched +full:lock +full:- +full:offset (Results 1 – 25 of 348) sorted by relevance

12345678910>>...14

/openbmc/qemu/block/
H A Dreqlist.c9 * Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
12 * See the COPYING file in the top-level directory.
20 void reqlist_init_req(BlockReqList *reqs, BlockReq *req, int64_t offset, in reqlist_init_req() argument
24 .offset = offset, in reqlist_init_req()
27 qemu_co_queue_init(&req->wait_queue); in reqlist_init_req()
31 BlockReq *reqlist_find_conflict(BlockReqList *reqs, int64_t offset, in reqlist_find_conflict() argument
37 if (ranges_overlap(offset, bytes, r->offset, r->bytes)) { in reqlist_find_conflict()
45 bool coroutine_fn reqlist_wait_one(BlockReqList *reqs, int64_t offset, in reqlist_wait_one() argument
46 int64_t bytes, CoMutex *lock) in reqlist_wait_one() argument
48 BlockReq *r = reqlist_find_conflict(reqs, offset, bytes); in reqlist_wait_one()
[all …]
H A Dblock-copy.c9 * Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
12 * See the COPYING file in the top-level directory.
19 #include "block/block-copy.h"
20 #include "block/block_int-io.h"
21 #include "block/dirty-bitmap.h"
23 #include "system/block-backend.h"
25 #include "qemu/co-shared-resource.h"
29 #include "qemu/error-report.h"
52 int64_t offset; member
59 /* Coroutine where async block-copy is running */
[all …]
H A Dblkdebug.c4 * Copyright (C) 2016-2017 Red Hat, Inc.
29 #include "qemu/config-file.h"
30 #include "block/block-io.h"
35 #include "qapi/qapi-visit-block-core.h"
39 #include "qapi/qobject-input-visitor.h"
42 /* All APIs are thread-safe */
57 /* State. Protected by lock */
62 QemuMutex lock; member
75 /* List entry protected BDRVBlkdebugState's lock */
97 int64_t offset; member
[all …]
H A Dcopy-before-write.c2 * copy-before-write filter driver
4 * The driver performs Copy-Before-Write (CBW) operation: it is injected above
7 * Copyright (c) 2018-2021 Virtuozzo International GmbH.
10 * Sementsov-Ogievskiy Vladimir <vsementsov@virtuozzo.com>
29 #include "system/block-backend.h"
34 #include "block/block-copy.h"
35 #include "block/dirty-bitmap.h"
37 #include "block/copy-before-write.h"
40 #include "qapi/qapi-visit-block-core.h"
50 * @lock: protects access to @access_bitmap, @done_bitmap and
[all …]
H A Dnvme.c4 * Copyright 2016 - 2018 Red Hat, Inc.
11 * See the COPYING file in the top-level directory.
19 #include "qemu/defer-call.h"
20 #include "qemu/error-report.h"
21 #include "qemu/host-pci-mmio.h"
22 #include "qemu/main-loop.h"
27 #include "qemu/vfio-helpers.h"
28 #include "block/block-io.h"
30 #include "system/block-backend.h"
45 #define NVME_NUM_REQS (NVME_QUEUE_SIZE - 1)
[all …]
H A Dvpc.c30 #include "system/block-backend.h"
38 #include "qapi/qobject-input-visitor.h"
39 #include "qapi/qapi-visit-block-core.h"
63 /* always big-endian */
69 /* Offset of next header structure, 0xFFFFFFFF if none */
105 /* Offset of next header structure, 0xFFFFFFFF if none */
108 /* Offset of the Block Allocation Table (BAT) */
122 /* Backing file name (in UTF-16) */
138 CoMutex lock; member
164 .name = "vpc-runtime-opts",
[all …]
H A Dqcow.c4 * Copyright (c) 2004-2006 Fabrice Bellard
27 #include "qemu/error-report.h"
30 #include "system/block-backend.h"
39 #include "qapi/qobject-input-visitor.h"
40 #include "qapi/qapi-visit-block-core.h"
89 CoMutex lock; member
103 be32_to_cpu(cow_header->magic) == QCOW_MAGIC && in qcow_probe()
104 be32_to_cpu(cow_header->version) == QCOW_VERSION) in qcow_probe()
113 BDRVQcowState *s = bs->opaque; in qcow_open()
132 ret = bdrv_pread(bs->file, 0, sizeof(header), &header, 0); in qcow_open()
[all …]
H A Dqcow2.c4 * Copyright (c) 2004-2006 Fabrice Bellard
28 #include "system/block-backend.h"
29 #include "qemu/main-loop.h"
32 #include "qemu/error-report.h"
34 #include "qapi/qapi-events-block-core.h"
42 #include "qapi/qobject-input-visitor.h"
43 #include "qapi/qapi-visit-block-core.h"
46 #include "block/dirty-bitmap.h"
51 - Support for multiple incremental snapshots.
52 - Memory management by reference counts.
[all …]
/openbmc/qemu/include/block/
H A Dreqlist.h9 * Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
12 * See the COPYING file in the top-level directory.
21 * The API is not thread-safe and shouldn't be. The struct is public to be part
22 * of other structures and protected by third-party locks, see
23 * block/block-copy.c for example.
27 int64_t offset; member
40 void reqlist_init_req(BlockReqList *reqs, BlockReq *req, int64_t offset,
42 /* Search for request in the list intersecting with @offset/@bytes area. */
43 BlockReq *reqlist_find_conflict(BlockReqList *reqs, int64_t offset,
50 * @lock is passed to qemu_co_queue_wait()
[all …]
/openbmc/qemu/include/qemu/
H A Dcoroutine.h11 * See the COPYING.LIB file in the top-level directory.
18 #include "qemu/coroutine-core.h"
30 * These functions are re-entrant and may be used outside the BQL.
55 /* Context that is holding the lock. Useful to avoid spinning
56 * when two coroutines on the same AioContext try to get the lock. :)
78 * mutex->holder doesn't need any synchronisation if the assertion holds in qemu_co_mutex_assert_locked()
84 assert(qatomic_read(&mutex->locked) && in qemu_co_mutex_assert_locked()
85 mutex->holder == qemu_coroutine_self()); in qemu_co_mutex_assert_locked()
93 * from an external mutex in order to maintain thread-safety.
107 * Enqueue at front instead of back. Use this to re-queue a request when
[all …]
/openbmc/u-boot/drivers/mtd/nand/raw/
H A Dnand_util.c1 // SPDX-License-Identifier: GPL-2.0
5 * Copyright (C) 2006 by Weiss-Electronic GmbH.
10 * @references: borrowed heavily from Linux mtd-utils code:
16 * Artem Bityutskiy <dedekind1@gmail.com> from mtd-utils
41 * nand_erase_opts: - erase NAND flash with support for various options
58 int percent_complete = -1; in nand_erase_opts()
59 const char *mtd_device = mtd->name; in nand_erase_opts()
63 if ((opts->offset & (mtd->erasesize - 1)) != 0) { in nand_erase_opts()
64 printf("Attempt to erase non block-aligned data\n"); in nand_erase_opts()
65 return -1; in nand_erase_opts()
[all …]
/openbmc/qemu/include/tcg/
H A Ddebuginfo.h4 * SPDX-License-Identifier: GPL-2.0-or-later
19 uint64_t offset; /* Offset from the symbol. */ member
38 * Take the debuginfo lock.
43 * Fill each on N Qs with the debuginfo about Q->ADDRESS as specified by
44 * Q->FLAGS:
46 * - DEBUGINFO_SYMBOL: update Q->SYMBOL and Q->OFFSET. If symbol debuginfo is
48 * - DEBUINFO_LINE: update Q->FILE and Q->LINE. If line debuginfo is missing,
51 * This function must be called under the debuginfo lock. The results can be
52 * accessed only until the debuginfo lock is released.
57 * Release the debuginfo lock.
/openbmc/u-boot/arch/arm/mach-stm32mp/
H A Dbsec.c1 // SPDX-License-Identifier: GPL-2.0+
3 * Copyright (C) 2018, STMicroelectronics - All Rights Reserved
16 /* BSEC REGISTER OFFSET (base relative) */
24 #define BSEC_SPLOCK_OFF 0x064 /* Program safmem sticky lock */
25 #define BSEC_SWLOCK_OFF 0x07C /* write in OTP sticky lock */
26 #define BSEC_SRLOCK_OFF 0x094 /* shadowing sticky lock */
36 /* LOCK Register */
47 * OTP Lock services definition
53 * bsec_check_error() - Check status of one otp
55 * @otp: otp number (0 - BSEC_OTP_MAX_VALUE)
[all …]
/openbmc/qemu/hw/watchdog/
H A Dtrace-events3 # allwinner-wdt.c
4 allwinner_wdt_read(uint64_t offset, uint64_t data, unsigned size) "Allwinner watchdog read: offset
5 allwinner_wdt_write(uint64_t offset, uint64_t data, unsigned size) "Allwinner watchdog write: offse…
10 # cmsdk-apb-watchdog.c
11 cmsdk_apb_watchdog_read(uint64_t offset, uint64_t data, unsigned size) "CMSDK APB watchdog read: of…
12 cmsdk_apb_watchdog_write(uint64_t offset, uint64_t data, unsigned size) "CMSDK APB watchdog write:
14 cmsdk_apb_watchdog_lock(uint32_t lock) "CMSDK APB watchdog: lock %" PRIu32
16 # wdt-aspeed.c
21 imx2_wdt_read(uint32_t addr, uint16_t data) "[0x%" PRIx32 "] -> 0x%" PRIx16
22 imx2_wdt_write(uint32_t addr, uint16_t data) "[0x%" PRIx32 "] <- 0x%" PRIx16
H A Dcmsdk-apb-watchdog.c13 * This is a model of the "APB watchdog" which is part of the Cortex-M
14 * System Design Kit (CMSDK) and documented in the Cortex-M System
31 #include "hw/qdev-properties.h"
33 #include "hw/qdev-clock.h"
34 #include "hw/watchdog/cmsdk-apb-watchdog.h"
88 return s->intstatus && (s->control & R_WDOGCONTROL_INTEN_MASK); in cmsdk_apb_watchdog_intstatus()
94 return s->resetstatus && (s->control & R_WDOGCONTROL_RESEN_MASK); in cmsdk_apb_watchdog_resetstatus()
102 if (s->itcr) { in cmsdk_apb_watchdog_update()
104 * Not checking that !s->is_luminary since s->itcr can't be written in cmsdk_apb_watchdog_update()
105 * when s->is_luminary in the first place. in cmsdk_apb_watchdog_update()
[all …]
/openbmc/openbmc/meta-facebook/meta-yosemite4/recipes-phosphor/gpio/phosphor-gpio-monitor/
H A Ddisable-i3c-hub13 if [ "$unplugged_slot" -lt 5 ]; then
14 hub_path="/sys/kernel/debug/i3c-hub-0-*/reg"
15 i3c_hub_lock="/tmp/i3c-hub0.lock"
18 hub_path="/sys/kernel/debug/i3c-hub-1-*/reg"
19 i3c_hub_lock="/tmp/i3c-hub1.lock"
23 for file in $hub_path/{offset,access}; do
24 if [[ $file == *"/offset" ]]; then
32 flock -x 100
40 if [ "$unplugged_slot" -gt 4 ]; then
41 ((unplugged_slot=unplugged_slot-4))
[all …]
H A Den-i3c-hub-scan-fru2 # shellcheck source=meta-facebook/meta-yosemite4/recipes-yosemite4/plat-tool/files/yosemite4-common
3 source /usr/libexec/yosemite4-common-functions
15 echo "Do 12V on enable i3c-hub"
17 if [ "$target_slot" -lt 5 ]; then
18 hub_path="/sys/kernel/debug/i3c-hub-0-*/reg"
19 i3c_hub_lock="/tmp/i3c-hub0.lock"
22 hub_path="/sys/kernel/debug/i3c-hub-1-*/reg"
23 i3c_hub_lock="/tmp/i3c-hub1.lock"
27 for file in $hub_path/{offset,access}; do
28 if [[ $file == *"/offset" ]]; then
[all …]
/openbmc/qemu/hw/display/
H A Dqxl-render.c29 DisplaySurface *surface = qemu_console_surface(qxl->vga.con); in qxl_blit()
37 trace_qxl_render_blit(qxl->guest_primary.qxl_stride, in qxl_blit()
38 rect->left, rect->right, rect->top, rect->bottom); in qxl_blit()
39 src = qxl->guest_primary.data; in qxl_blit()
40 if (qxl->guest_primary.qxl_stride < 0) { in qxl_blit()
43 src += (qxl->guest_primary.surface.height - rect->top - 1) * in qxl_blit()
44 qxl->guest_primary.abs_stride; in qxl_blit()
46 src += rect->top * qxl->guest_primary.abs_stride; in qxl_blit()
48 dst += rect->top * qxl->guest_primary.abs_stride; in qxl_blit()
49 src += rect->left * qxl->guest_primary.bytes_pp; in qxl_blit()
[all …]
/openbmc/qemu/tcg/
H A Ddebuginfo.c4 * SPDX-License-Identifier: GPL-2.0-or-later
13 static QemuMutex lock; variable
25 qemu_mutex_init(&lock); in debuginfo_init()
30 QEMU_LOCK_GUARD(&lock); in debuginfo_report_elf()
46 qemu_mutex_lock(&lock); in debuginfo_lock()
75 q[i].offset = dwfl_offset; in debuginfo_query()
94 qemu_mutex_unlock(&lock); in debuginfo_unlock()
/openbmc/openbmc/meta-facebook/meta-yosemite4/recipes-phosphor/state/phosphor-state-manager/
H A Dcheck-i3c-hub6 # shellcheck source=meta-facebook/meta-yosemite4/recipes-phosphor/state/phosphor-state-manager/powe…
7 source /usr/libexec/phosphor-state-manager/power-cmd
8 # shellcheck source=meta-facebook/meta-yosemite4/recipes-yosemite4/plat-tool/files/yosemite4-common
9 source /usr/libexec/yosemite4-common-functions
12 IO_EXP_SLOT_PWR_STATUS=$((CHASSIS_ID - 1))
13 GPIOCHIP_IO_EXP_SLOT_PWR_CTRL=$(basename "/sys/bus/i2c/devices/$SPIDER_BOARD_IO_EXP_BUS_NUM-00$IO_E…
26 if [ "$target_slot" -lt 5 ]; then
27 hub_path="/sys/kernel/debug/i3c-hub-0-*/reg"
28 i3c_hub_lock="/run/i3c-hub0.lock"
31 hub_path="/sys/kernel/debug/i3c-hub-1-*/reg"
[all …]
/openbmc/qemu/hw/cxl/
H A Dcxl-component-utils.c7 * COPYING file in the top-level directory.
64 static uint64_t cxl_cache_mem_read_reg(void *opaque, hwaddr offset, in cxl_cache_mem_read_reg() argument
68 ComponentRegisters *cregs = &cxl_cstate->crb; in cxl_cache_mem_read_reg()
72 if (cregs->special_ops && cregs->special_ops->read) { in cxl_cache_mem_read_reg()
73 return cregs->special_ops->read(cxl_cstate, offset, 4); in cxl_cache_mem_read_reg()
75 QEMU_BUILD_BUG_ON(sizeof(*cregs->cache_mem_registers) != 4); in cxl_cache_mem_read_reg()
76 return cregs->cache_mem_registers[offset / 4]; in cxl_cache_mem_read_reg()
91 static void dumb_hdm_handler(CXLComponentState *cxl_cstate, hwaddr offset, in dumb_hdm_handler() argument
94 ComponentRegisters *cregs = &cxl_cstate->crb; in dumb_hdm_handler()
95 uint32_t *cache_mem = cregs->cache_mem_registers; in dumb_hdm_handler()
[all …]
/openbmc/u-boot/drivers/mtd/onenand/
H A Donenand_base.c4 * Copyright (C) 2005-2007 Samsung Electronics
8 * Adrian Hunter <ext-adrian.hunter@nokia.com>:
9 * auto-placement support, read-while load support, various fixes
14 * Flex-OneNAND support
33 /* It should access 16-bit instead of 8-bit */
41 while (len-- > 0) in memcpy_16()
47 * onenand_oob_128 - oob info for Flex-Onenand with 4KB page
68 * onenand_oob_64 - oob info for large (2KB) page
85 * onenand_oob_32 - oob info for middle (1KB) page
122 * onenand_readw - [OneNAND Interface] Read OneNAND register
[all …]
/openbmc/u-boot/include/
H A Dspi_flash.h1 /* SPDX-License-Identifier: GPL-2.0 */
14 #include <linux/mtd/spi-nor.h>
33 int (*read)(struct udevice *dev, u32 offset, size_t len, void *buf);
34 int (*write)(struct udevice *dev, u32 offset, size_t len,
36 int (*erase)(struct udevice *dev, u32 offset, size_t len);
38 * get_sw_write_prot() - Check state of software write-protect feature
40 * SPI flash chips can lock a region of the flash defined by a
45 * @return 0 if no region is write-protected, 1 if a region is
46 * write-protected, -ENOSYS if the driver does not implement this,
47 * other -ve value on error
[all …]
/openbmc/u-boot/include/configs/
H A Dap325rxa.h1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * Configuation settings for the Renesas Solutions AP-325RXA board
46 /* maybe more, but if so u-boot doesn't know about it... */
51 /* Address of u-boot image in Flash (NOT run time address in SDRAM) ?!? */
77 #define CONFIG_SYS_ATA_DATA_OFFSET 0x200 /* data reg offset */
78 #define CONFIG_SYS_ATA_REG_OFFSET 0x200 /* reg offset */
79 #define CONFIG_SYS_ATA_ALT_OFFSET 0x210 /* alternate register offset */
82 /* if you use all NOR Flash , you change dip-switch. Please see Manual. */
90 /* Timeout for Flash set sector lock bit operations (in ms) */
92 /* Timeout for Flash clear lock bit operations (in ms) */
[all …]
/openbmc/u-boot/drivers/mtd/ubi/
H A Deba.c1 // SPDX-License-Identifier: GPL-2.0+
9 * The UBI Eraseblock Association (EBA) sub-system.
11 * This sub-system is responsible for I/O to/from logical eraseblock.
17 * The EBA sub-system implements per-logical eraseblock locking. Before
19 * per-logical eraseblock locking is implemented by means of the lock tree. The
20 * lock tree is an RB-tree which refers all the currently locked logical
21 * eraseblocks. The lock tree elements are &struct ubi_ltree_entry objects.
45 * next_sqnum - get next sequence number.
56 spin_lock(&ubi->ltree_lock); in ubi_next_sqnum()
57 sqnum = ubi->global_sqnum++; in ubi_next_sqnum()
[all …]

12345678910>>...14