| /linux/drivers/gpu/drm/radeon/ |
| H A D | radeon_semaphore.c | 35 struct radeon_semaphore **semaphore) in radeon_semaphore_create() argument 39 *semaphore = kmalloc_obj(struct radeon_semaphore); in radeon_semaphore_create() 40 if (*semaphore == NULL) { in radeon_semaphore_create() 44 &(*semaphore)->sa_bo, 8, 8); in radeon_semaphore_create() 46 kfree(*semaphore); in radeon_semaphore_create() 47 *semaphore = NULL; in radeon_semaphore_create() 50 (*semaphore)->waiters = 0; in radeon_semaphore_create() 51 (*semaphore)->gpu_addr = radeon_sa_bo_gpu_addr((*semaphore)->sa_bo); in radeon_semaphore_create() 53 *((uint64_t *)radeon_sa_bo_cpu_addr((*semaphore)->sa_bo)) = 0; in radeon_semaphore_create() 59 struct radeon_semaphore *semaphore) in radeon_semaphore_emit_signal() argument [all …]
|
| H A D | radeon_test.c | 318 struct radeon_semaphore *semaphore = NULL; in radeon_test_ring_sync() local 321 r = radeon_semaphore_create(rdev, &semaphore); in radeon_test_ring_sync() 323 DRM_ERROR("Failed to create semaphore\n"); in radeon_test_ring_sync() 332 radeon_semaphore_emit_wait(rdev, ringA->idx, semaphore); in radeon_test_ring_sync() 344 radeon_semaphore_emit_wait(rdev, ringA->idx, semaphore); in radeon_test_ring_sync() 354 DRM_ERROR("Fence 1 signaled without waiting for semaphore.\n"); in radeon_test_ring_sync() 363 radeon_semaphore_emit_signal(rdev, ringB->idx, semaphore); in radeon_test_ring_sync() 375 DRM_ERROR("Fence 2 signaled without waiting for semaphore.\n"); in radeon_test_ring_sync() 384 radeon_semaphore_emit_signal(rdev, ringB->idx, semaphore); in radeon_test_ring_sync() 394 radeon_semaphore_free(rdev, &semaphore, NULL); in radeon_test_ring_sync() [all …]
|
| H A D | uvd_v3_1.c | 30 * uvd_v3_1_semaphore_emit - emit semaphore command 34 * @semaphore: semaphore to emit commands for 37 * Emit a semaphore command (either wait or signal) to the UVD ring. 41 struct radeon_semaphore *semaphore, in uvd_v3_1_semaphore_emit() argument 44 uint64_t addr = semaphore->gpu_addr; in uvd_v3_1_semaphore_emit()
|
| H A D | radeon_sync.c | 55 * radeon_sync_fence - use the semaphore to sync to a fence 60 * Sync to the fence using the semaphore objects 87 * Sync to the fence using the semaphore objects 130 struct radeon_semaphore *semaphore; in radeon_sync_rings() local 149 r = radeon_semaphore_create(rdev, &semaphore); in radeon_sync_rings() 153 sync->semaphores[count++] = semaphore; in radeon_sync_rings() 160 /* emit the signal semaphore */ in radeon_sync_rings() 161 if (!radeon_semaphore_emit_signal(rdev, i, semaphore)) { in radeon_sync_rings() 171 if (!radeon_semaphore_emit_wait(rdev, ring, semaphore)) { in radeon_sync_rings()
|
| H A D | uvd_v2_2.c | 63 * uvd_v2_2_semaphore_emit - emit semaphore command 67 * @semaphore: semaphore to emit commands for 70 * Emit a semaphore command (either wait or signal) to the UVD ring. 74 struct radeon_semaphore *semaphore, in uvd_v2_2_semaphore_emit() argument 77 uint64_t addr = semaphore->gpu_addr; in uvd_v2_2_semaphore_emit()
|
| /linux/tools/testing/selftests/bpf/ |
| H A D | usdt.h | 6 * - For USDTs without associated semaphore: 9 * - For USDTs with implicit (transparent to the user) semaphore: 13 * - For USDTs with explicit (user-defined and provided) semaphore: 22 * USDTs can have an associated (2-byte) activity counter (USDT semaphore), 24 * BPF-based tracer is attached to the USDT. This USDT semaphore can be used 99 * arguments. Zero arguments are acceptable as well. No USDT semaphore is 119 * implicitly-defined associated USDT semaphore, which will be "activated" by 123 * USDTs with semaphore are commonly used when there is a need to perform 126 * case, USDT semaphore can be used to avoid unnecessary extra work. If USDT 128 * USDT semaphore i [all...] |
| /linux/samples/hung_task/ |
| H A D | hung_task_tests.c | 4 * semaphore, etc. 7 * `<debugfs>/hung_task/semaphore`, `<debugfs>/hung_task/rw_semaphore_read`, 11 * mechanisms (e.g., mutex, semaphore, rw_semaphore_read, rw_semaphore_write, etc.). 20 #include <linux/semaphore.h> 25 #define HUNG_TASK_SEM_FILE "semaphore" 54 /* Semaphore-based read function */ 62 /* Second task waits on semaphore, entering uninterruptible sleep */ in read_dummy_semaphore() 74 /* Read-write semaphore read function */ 94 /* Read-write semaphore write function */ 119 /* File operations for semaphore */ [all …]
|
| /linux/ipc/ |
| H A D | sem.c | 32 * - multiple semaphore operations that alter the same semaphore in 48 * the per-semaphore array structure. 49 * Thus: Perfect SMP scaling between independent semaphore arrays. 51 * trashing on the semaphore array spinlock will limit the scaling. 61 * - A woken up task may not even touch the semaphore array anymore, it may 64 * semaphore array, lazily allocated). For backwards compatibility, multiple 68 * and per-semaphore list (stored in the array). This allows to achieve FIFO 94 /* One semaphore structure for each semaphore in the system. */ 98 * PID of the process that last modified the semaphore. For 107 /* that alter the semaphore */ [all …]
|
| /linux/fs/jffs2/ |
| H A D | README.Locking | 141 This read/write semaphore protects against concurrent access to the 154 This read/write semaphore protects against concurrent access to the 156 In read-only path, write-semaphore is too much exclusion. It's enough 157 by read-semaphore. But you must hold write-semaphore when updating, 162 when updating such a object is necessary under holding read semaphore. 163 For example, do_jffs2_getxattr() holds read-semaphore to scan xref and 164 xdatum at first. But it retries this process with holding write-semaphore 165 after release read-semaphore, if it's necessary to load name/value pair
|
| /linux/include/uapi/linux/ |
| H A D | sem.h | 29 struct sem *sem_base; /* ptr to first semaphore in array */ 41 unsigned short sem_num; /* semaphore index in array */ 42 short sem_op; /* semaphore operation */ 80 #define SEMMNI 32000 /* <= IPCMNI max # of semaphore identifiers */ 84 #define SEMVMX 32767 /* <= 32767 semaphore maximum value */ 90 #define SEMMAP SEMMNS /* # of entries in semaphore map */
|
| /linux/arch/x86/platform/intel/ |
| H A D | iosf_mbi.c | 254 dev_err(&mbi_pdev->dev, "Error P-Unit semaphore read failed\n"); in iosf_mbi_get_sem() 266 dev_err(&mbi_pdev->dev, "Error P-Unit semaphore reset failed\n"); in iosf_mbi_reset_semaphore() 286 * PMIC bus semaphore for these requests. Callers of these requests call 307 * 5) The P-Unit has a PMIC bus semaphore which we can request to stop 309 * As the fourth and final step we request this semaphore and wait for our 339 * we're holding the semaphore, the SoC hangs. in iosf_mbi_block_punit_i2c_access() 343 /* host driver writes to side band semaphore register */ in iosf_mbi_block_punit_i2c_access() 347 dev_err(&mbi_pdev->dev, "Error P-Unit semaphore request failed\n"); in iosf_mbi_block_punit_i2c_access() 351 /* host driver waits for bit 0 to be set in semaphore register */ in iosf_mbi_block_punit_i2c_access() 358 dev_dbg(&mbi_pdev->dev, "P-Unit semaphore acquired after %ums\n", in iosf_mbi_block_punit_i2c_access() [all …]
|
| /linux/tools/testing/selftests/powerpc/ptrace/ |
| H A D | child.h | 9 #include <semaphore.h> 16 /* The parent waits on this semaphore. */ 22 /* The child waits on this semaphore. */ 66 perror("Semaphore initialization failed"); in init_child_sync() 72 perror("Semaphore initialization failed"); in init_child_sync()
|
| /linux/drivers/input/serio/ |
| H A D | hp_sdc_mlc.c | 43 #include <linux/semaphore.h> 150 /* Try to down the semaphore */ in hp_sdc_mlc_in() 193 if (priv->trans.act.semaphore != &mlc->csem) in hp_sdc_mlc_cts() 203 priv->trans.act.semaphore = &mlc->csem; in hp_sdc_mlc_cts() 217 priv->trans.act.semaphore = &mlc->osem; in hp_sdc_mlc_cts() 228 /* Try to down the semaphore -- it should be up. */ in hp_sdc_mlc_out() 245 priv->trans.act.semaphore = &mlc->osem; in hp_sdc_mlc_out() 286 priv->trans.act.semaphore = &mlc->osem; in hp_sdc_mlc_out() 316 hp_sdc_mlc_priv.trans.act.semaphore = &mlc->osem; in hp_sdc_mlc_init()
|
| /linux/drivers/acpi/acpica/ |
| H A D | exsystem.c | 21 * PARAMETERS: semaphore - Semaphore to wait on 26 * DESCRIPTION: Implements a semaphore wait with a check to see if the 27 * semaphore is available immediately. If it is not, the 31 acpi_status acpi_ex_system_wait_semaphore(acpi_semaphore semaphore, u16 timeout) in acpi_ex_system_wait_semaphore() argument 37 status = acpi_os_wait_semaphore(semaphore, 1, ACPI_DO_NOT_WAIT); in acpi_ex_system_wait_semaphore() 47 status = acpi_os_wait_semaphore(semaphore, 1, timeout); in acpi_ex_system_wait_semaphore() 269 * We are going to simply delete the existing semaphore and in acpi_ex_system_reset_event()
|
| /linux/include/drm/ |
| H A D | task_barrier.h | 23 #include <linux/semaphore.h> 42 struct semaphore enter_turnstile; 43 struct semaphore exit_turnstile; 46 static inline void task_barrier_signal_turnstile(struct semaphore *turnstile, in task_barrier_signal_turnstile()
|
| /linux/drivers/net/ethernet/intel/e1000e/ |
| H A D | phy.c | 284 * Acquires semaphore, if necessary, then reads the PHY register at offset 310 * Acquires semaphore, if necessary, then writes the data to PHY register 334 * Sets PHY page required for PHY register access. Assumes semaphore is 352 * @locked: semaphore has already been acquired or not 354 * Acquires semaphore, if necessary, then reads the PHY register at offset 392 * Acquires semaphore then reads the PHY register at offset and stores the 394 * Release the acquired semaphore before exiting. 408 * in data. Assumes semaphore already acquired. 420 * @locked: semaphore has already been acquired or not 422 * Acquires semaphore, if necessary, then writes the data to PHY register [all …]
|
| H A D | 82571.c | 428 * e1000_get_hw_semaphore_82571 - Acquire hardware semaphore 431 * Acquire the HW semaphore to access the PHY or NVM 441 * the inter-port SMBI semaphore, there is old code in e1000_get_hw_semaphore_82571() 444 * we try for the semaphore to interwork with this in e1000_get_hw_semaphore_82571() 450 /* Get the SW semaphore */ in e1000_get_hw_semaphore_82571() 464 /* Get the FW semaphore. */ in e1000_get_hw_semaphore_82571() 469 /* Semaphore acquired if bit latched */ in e1000_get_hw_semaphore_82571() 487 * e1000_put_hw_semaphore_82571 - Release hardware semaphore 490 * Release hardware semaphore used to access the PHY or NVM 502 * e1000_get_hw_semaphore_82573 - Acquire hardware semaphore [all …]
|
| H A D | 80003es2lan.c | 203 * Acquire the semaphore to access the Kumeran interface. 219 * Release the semaphore used to access the Kumeran interface 234 * Acquire the semaphore to access the EEPROM. 256 * Release the semaphore used to access the EEPROM. 265 * e1000_acquire_swfw_sync_80003es2lan - Acquire SW/FW semaphore 267 * @mask: specifies which semaphore to acquire 269 * Acquire the SW/FW semaphore to access the PHY or NVM. The mask 310 * e1000_release_swfw_sync_80003es2lan - Release SW/FW semaphore 312 * @mask: specifies which semaphore to acquire 314 * Release the SW/FW semaphore used to access the PHY or NVM. The mask [all …]
|
| /linux/include/uapi/drm/ |
| H A D | qaic_accel.h | 19 /* semaphore flags */ 23 /* Semaphore commands */ 195 * struct qaic_sem - Defines a semaphore command for a BO slice. 215 * @sem0: In. Semaphore command 0. Must be 0 is not valid. 216 * @sem1: In. Semaphore command 1. Must be 0 is not valid. 217 * @sem2: In. Semaphore command 2. Must be 0 is not valid. 218 * @sem3: In. Semaphore command 3. Must be 0 is not valid.
|
| /linux/include/linux/ |
| H A D | hung_task.h | 29 * 01 - Blocked on semaphore (BLOCKER_TYPE_SEM) 30 * 10 - Blocked on rw-semaphore as READER (BLOCKER_TYPE_RWSEM_READER) 31 * 11 - Blocked on rw-semaphore as WRITER (BLOCKER_TYPE_RWSEM_WRITER)
|
| H A D | hil_mlc.h | 37 #include <linux/semaphore.h> 136 struct semaphore csem; /* Raised when loop idle */ 139 struct semaphore osem; /* Raised when outpacket dispatched */ 143 struct semaphore isem; /* Raised when a packet arrives */
|
| /linux/drivers/gpu/drm/amd/include/ivsrcid/isp/ |
| H A D | irqsrcs_isp_4_1.h | 27 #define ISP_4_1__SRCID__ISP_SEMA_WAIT_FAIL_TIMEOUT 0x12 // Semaphore wait fail timeout 28 #define ISP_4_1__SRCID__ISP_SEMA_WAIT_INCOMPLETE_TIMEOUT 0x13 // Semaphore wait incomplete timeout 29 #define ISP_4_1__SRCID__ISP_SEMA_SIGNAL_INCOMPLETE_TIMEOUT 0x14 // Semaphore signal incomplete tim…
|
| /linux/include/linux/raspberrypi/ |
| H A D | vchiq_arm.h | 12 #include <linux/semaphore.h> 48 struct semaphore free_fragments_sema; 49 struct semaphore free_fragments_mutex;
|
| /linux/drivers/nfc/st95hf/ |
| H A D | core.c | 204 * @exchange_lock: semaphore used for signaling the st95hf_remove 225 struct semaphore exchange_lock; 780 * check semaphore, if not down() already, then we don't in st95hf_irq_thread_handler() 782 * will be a bug. Note that down() of the semaphore is done in st95hf_irq_thread_handler() 785 * semaphore before leaving. Hence when the ISR is called in st95hf_irq_thread_handler() 787 * return 1 (indicating semaphore cant be taken and hence no in st95hf_irq_thread_handler() 788 * change in semaphore count). in st95hf_irq_thread_handler() 789 * If not, then we up() the semaphore and crash on in st95hf_irq_thread_handler() 849 /* up the semaphore before returning */ in st95hf_irq_thread_handler() 862 /* up the semaphore before returning */ in st95hf_irq_thread_handler() [all …]
|
| /linux/Documentation/driver-api/serial/ |
| H A D | driver.rst | 43 There are two locks. A per-port spinlock, and an overall semaphore. 56 The port_sem semaphore is used to protect against ports being added/ 58 semaphore has been the 'mutex' member of the tty_port struct, and
|