/kernel/linux/linux-5.10/drivers/hwspinlock/ |
H A D | hwspinlock_core.c | 62 * @hwlock: an hwspinlock which we want to trylock 91 int __hwspin_trylock(struct hwspinlock *hwlock, int mode, unsigned long *flags) in __hwspin_trylock() argument 95 if (WARN_ON(!hwlock || (!flags && mode == HWLOCK_IRQSTATE))) in __hwspin_trylock() 113 ret = spin_trylock_irqsave(&hwlock->lock, *flags); in __hwspin_trylock() 116 ret = spin_trylock_irq(&hwlock->lock); in __hwspin_trylock() 123 ret = spin_trylock(&hwlock->lock); in __hwspin_trylock() 132 ret = hwlock->bank->ops->trylock(hwlock); in __hwspin_trylock() 134 /* if hwlock is already taken, undo spin_trylock_* and exit */ in __hwspin_trylock() 138 spin_unlock_irqrestore(&hwlock in __hwspin_trylock() 206 __hwspin_lock_timeout(struct hwspinlock *hwlock, unsigned int to, int mode, unsigned long *flags) __hwspin_lock_timeout() argument 265 __hwspin_unlock(struct hwspinlock *hwlock, int mode, unsigned long *flags) __hwspin_unlock() argument 342 struct hwspinlock *hwlock; of_hwspin_lock_get_id() local 421 hwspin_lock_register_single(struct hwspinlock *hwlock, int id) hwspin_lock_register_single() argument 448 struct hwspinlock *hwlock = NULL; hwspin_lock_unregister_single() local 489 struct hwspinlock *hwlock; hwspin_lock_register() local 536 struct hwspinlock *hwlock, *tmp; hwspin_lock_unregister() local 646 __hwspin_lock_request(struct hwspinlock *hwlock) __hwspin_lock_request() argument 685 hwspin_lock_get_id(struct hwspinlock *hwlock) hwspin_lock_get_id() argument 711 struct hwspinlock *hwlock; hwspin_lock_request() local 754 struct hwspinlock *hwlock; hwspin_lock_request_specific() local 800 hwspin_lock_free(struct hwspinlock *hwlock) hwspin_lock_free() argument 844 struct hwspinlock **hwlock = res; devm_hwspin_lock_match() local 870 devm_hwspin_lock_free(struct device *dev, struct hwspinlock *hwlock) devm_hwspin_lock_free() argument 898 struct hwspinlock **ptr, *hwlock; devm_hwspin_lock_request() local 934 struct hwspinlock **ptr, *hwlock; devm_hwspin_lock_request_specific() local [all...] |
H A D | hwspinlock_internal.h | 62 static inline int hwlock_to_id(struct hwspinlock *hwlock) in hwlock_to_id() argument 64 int local_id = hwlock - &hwlock->bank->lock[0]; in hwlock_to_id() 66 return hwlock->bank->base_id + local_id; in hwlock_to_id()
|
H A D | omap_hwspinlock.c | 78 struct hwspinlock *hwlock; in omap_hwspinlock_probe() local 131 for (i = 0, hwlock = &bank->lock[0]; i < num_locks; i++, hwlock++) in omap_hwspinlock_probe() 132 hwlock->priv = io_base + LOCK_BASE_OFFSET + sizeof(u32) * i; in omap_hwspinlock_probe()
|
H A D | u8500_hsem.c | 89 struct hwspinlock *hwlock; in u8500_hsem_probe() local 115 for (i = 0, hwlock = &bank->lock[0]; i < num_locks; i++, hwlock++) in u8500_hsem_probe() 116 hwlock->priv = io_base + HSEM_REGISTER_OFFSET + sizeof(u32) * i; in u8500_hsem_probe()
|
H A D | sirf_hwspinlock.c | 57 struct hwspinlock *hwlock; in sirf_hwspinlock_probe() local 76 hwlock = &hwspin->bank.lock[idx]; in sirf_hwspinlock_probe() 77 hwlock->priv = hwspin->io_base + HW_SPINLOCK_OFFSET(idx); in sirf_hwspinlock_probe()
|
/kernel/linux/linux-6.6/drivers/hwspinlock/ |
H A D | hwspinlock_core.c | 62 * @hwlock: an hwspinlock which we want to trylock 91 int __hwspin_trylock(struct hwspinlock *hwlock, int mode, unsigned long *flags) in __hwspin_trylock() argument 95 if (WARN_ON(!hwlock || (!flags && mode == HWLOCK_IRQSTATE))) in __hwspin_trylock() 113 ret = spin_trylock_irqsave(&hwlock->lock, *flags); in __hwspin_trylock() 116 ret = spin_trylock_irq(&hwlock->lock); in __hwspin_trylock() 123 ret = spin_trylock(&hwlock->lock); in __hwspin_trylock() 132 ret = hwlock->bank->ops->trylock(hwlock); in __hwspin_trylock() 134 /* if hwlock is already taken, undo spin_trylock_* and exit */ in __hwspin_trylock() 138 spin_unlock_irqrestore(&hwlock in __hwspin_trylock() 206 __hwspin_lock_timeout(struct hwspinlock *hwlock, unsigned int to, int mode, unsigned long *flags) __hwspin_lock_timeout() argument 265 __hwspin_unlock(struct hwspinlock *hwlock, int mode, unsigned long *flags) __hwspin_unlock() argument 342 struct hwspinlock *hwlock; of_hwspin_lock_get_id() local 421 hwspin_lock_register_single(struct hwspinlock *hwlock, int id) hwspin_lock_register_single() argument 448 struct hwspinlock *hwlock = NULL; hwspin_lock_unregister_single() local 489 struct hwspinlock *hwlock; hwspin_lock_register() local 536 struct hwspinlock *hwlock, *tmp; hwspin_lock_unregister() local 646 __hwspin_lock_request(struct hwspinlock *hwlock) __hwspin_lock_request() argument 685 hwspin_lock_get_id(struct hwspinlock *hwlock) hwspin_lock_get_id() argument 711 struct hwspinlock *hwlock; hwspin_lock_request() local 754 struct hwspinlock *hwlock; hwspin_lock_request_specific() local 800 hwspin_lock_free(struct hwspinlock *hwlock) hwspin_lock_free() argument 844 struct hwspinlock **hwlock = res; devm_hwspin_lock_match() local 870 devm_hwspin_lock_free(struct device *dev, struct hwspinlock *hwlock) devm_hwspin_lock_free() argument 898 struct hwspinlock **ptr, *hwlock; devm_hwspin_lock_request() local 934 struct hwspinlock **ptr, *hwlock; devm_hwspin_lock_request_specific() local [all...] |
H A D | hwspinlock_internal.h | 62 static inline int hwlock_to_id(struct hwspinlock *hwlock) in hwlock_to_id() argument 64 int local_id = hwlock - &hwlock->bank->lock[0]; in hwlock_to_id() 66 return hwlock->bank->base_id + local_id; in hwlock_to_id()
|
H A D | omap_hwspinlock.c | 79 struct hwspinlock *hwlock; in omap_hwspinlock_probe() local 130 for (i = 0, hwlock = &bank->lock[0]; i < num_locks; i++, hwlock++) in omap_hwspinlock_probe() 131 hwlock->priv = io_base + LOCK_BASE_OFFSET + sizeof(u32) * i; in omap_hwspinlock_probe()
|
H A D | u8500_hsem.c | 89 struct hwspinlock *hwlock; in u8500_hsem_probe() local 115 for (i = 0, hwlock = &bank->lock[0]; i < num_locks; i++, hwlock++) in u8500_hsem_probe() 116 hwlock->priv = io_base + HSEM_REGISTER_OFFSET + sizeof(u32) * i; in u8500_hsem_probe()
|
H A D | sun6i_hwspinlock.c | 94 struct hwspinlock *hwlock; in sun6i_hwspinlock_probe() local 165 hwlock = &priv->bank->lock[i]; in sun6i_hwspinlock_probe() 166 hwlock->priv = io_base + SPINLOCK_LOCK_REGN + sizeof(u32) * i; in sun6i_hwspinlock_probe()
|
/kernel/linux/linux-5.10/include/linux/ |
H A D | hwspinlock.h | 63 int hwspin_lock_free(struct hwspinlock *hwlock); 65 int hwspin_lock_get_id(struct hwspinlock *hwlock); 71 int devm_hwspin_lock_free(struct device *dev, struct hwspinlock *hwlock); 107 static inline int hwspin_lock_free(struct hwspinlock *hwlock) in hwspin_lock_free() argument 113 int __hwspin_lock_timeout(struct hwspinlock *hwlock, unsigned int to, in __hwspin_lock_timeout() argument 120 int __hwspin_trylock(struct hwspinlock *hwlock, int mode, unsigned long *flags) in __hwspin_trylock() argument 126 void __hwspin_unlock(struct hwspinlock *hwlock, int mode, unsigned long *flags) in __hwspin_unlock() argument 135 static inline int hwspin_lock_get_id(struct hwspinlock *hwlock) in hwspin_lock_get_id() argument 147 int devm_hwspin_lock_free(struct device *dev, struct hwspinlock *hwlock) in devm_hwspin_lock_free() argument 168 * @hwlock 183 hwspin_trylock_irqsave(struct hwspinlock *hwlock, unsigned long *flags) hwspin_trylock_irqsave() argument 202 hwspin_trylock_irq(struct hwspinlock *hwlock) hwspin_trylock_irq() argument 221 hwspin_trylock_raw(struct hwspinlock *hwlock) hwspin_trylock_raw() argument 238 hwspin_trylock_in_atomic(struct hwspinlock *hwlock) hwspin_trylock_in_atomic() argument 258 hwspin_trylock(struct hwspinlock *hwlock) hwspin_trylock() argument 281 hwspin_lock_timeout_irqsave(struct hwspinlock *hwlock, unsigned int to, unsigned long *flags) hwspin_lock_timeout_irqsave() argument 305 hwspin_lock_timeout_irq(struct hwspinlock *hwlock, unsigned int to) hwspin_lock_timeout_irq() argument 328 hwspin_lock_timeout_raw(struct hwspinlock *hwlock, unsigned int to) hwspin_lock_timeout_raw() argument 350 hwspin_lock_timeout_in_atomic(struct hwspinlock *hwlock, unsigned int to) hwspin_lock_timeout_in_atomic() argument 375 hwspin_lock_timeout(struct hwspinlock *hwlock, unsigned int to) hwspin_lock_timeout() argument 392 hwspin_unlock_irqrestore(struct hwspinlock *hwlock, unsigned long *flags) hwspin_unlock_irqrestore() argument 409 hwspin_unlock_irq(struct hwspinlock *hwlock) hwspin_unlock_irq() argument 424 hwspin_unlock_raw(struct hwspinlock *hwlock) hwspin_unlock_raw() argument 439 hwspin_unlock_in_atomic(struct hwspinlock *hwlock) hwspin_unlock_in_atomic() argument 455 hwspin_unlock(struct hwspinlock *hwlock) hwspin_unlock() argument [all...] |
/kernel/linux/linux-6.6/include/linux/ |
H A D | hwspinlock.h | 63 int hwspin_lock_free(struct hwspinlock *hwlock); 65 int hwspin_lock_get_id(struct hwspinlock *hwlock); 71 int devm_hwspin_lock_free(struct device *dev, struct hwspinlock *hwlock); 107 static inline int hwspin_lock_free(struct hwspinlock *hwlock) in hwspin_lock_free() argument 113 int __hwspin_lock_timeout(struct hwspinlock *hwlock, unsigned int to, in __hwspin_lock_timeout() argument 120 int __hwspin_trylock(struct hwspinlock *hwlock, int mode, unsigned long *flags) in __hwspin_trylock() argument 126 void __hwspin_unlock(struct hwspinlock *hwlock, int mode, unsigned long *flags) in __hwspin_unlock() argument 135 static inline int hwspin_lock_get_id(struct hwspinlock *hwlock) in hwspin_lock_get_id() argument 147 int devm_hwspin_lock_free(struct device *dev, struct hwspinlock *hwlock) in devm_hwspin_lock_free() argument 168 * @hwlock 183 hwspin_trylock_irqsave(struct hwspinlock *hwlock, unsigned long *flags) hwspin_trylock_irqsave() argument 202 hwspin_trylock_irq(struct hwspinlock *hwlock) hwspin_trylock_irq() argument 221 hwspin_trylock_raw(struct hwspinlock *hwlock) hwspin_trylock_raw() argument 238 hwspin_trylock_in_atomic(struct hwspinlock *hwlock) hwspin_trylock_in_atomic() argument 258 hwspin_trylock(struct hwspinlock *hwlock) hwspin_trylock() argument 281 hwspin_lock_timeout_irqsave(struct hwspinlock *hwlock, unsigned int to, unsigned long *flags) hwspin_lock_timeout_irqsave() argument 305 hwspin_lock_timeout_irq(struct hwspinlock *hwlock, unsigned int to) hwspin_lock_timeout_irq() argument 328 hwspin_lock_timeout_raw(struct hwspinlock *hwlock, unsigned int to) hwspin_lock_timeout_raw() argument 350 hwspin_lock_timeout_in_atomic(struct hwspinlock *hwlock, unsigned int to) hwspin_lock_timeout_in_atomic() argument 375 hwspin_lock_timeout(struct hwspinlock *hwlock, unsigned int to) hwspin_lock_timeout() argument 392 hwspin_unlock_irqrestore(struct hwspinlock *hwlock, unsigned long *flags) hwspin_unlock_irqrestore() argument 409 hwspin_unlock_irq(struct hwspinlock *hwlock) hwspin_unlock_irq() argument 424 hwspin_unlock_raw(struct hwspinlock *hwlock) hwspin_unlock_raw() argument 439 hwspin_unlock_in_atomic(struct hwspinlock *hwlock) hwspin_unlock_in_atomic() argument 455 hwspin_unlock(struct hwspinlock *hwlock) hwspin_unlock() argument [all...] |
/kernel/linux/linux-5.10/drivers/spi/ |
H A D | spi-sprd-adi.c | 114 struct hwspinlock *hwlock; member 171 if (sadi->hwlock) { in sprd_adi_read() 172 ret = hwspin_lock_timeout_irqsave(sadi->hwlock, in sprd_adi_read() 225 if (sadi->hwlock) in sprd_adi_read() 226 hwspin_unlock_irqrestore(sadi->hwlock, &flags); in sprd_adi_read() 237 if (sadi->hwlock) { in sprd_adi_write() 238 ret = hwspin_lock_timeout_irqsave(sadi->hwlock, in sprd_adi_write() 270 if (sadi->hwlock) in sprd_adi_write() 271 hwspin_unlock_irqrestore(sadi->hwlock, &flags); in sprd_adi_write() 495 sadi->hwlock in sprd_adi_probe() [all...] |
/kernel/linux/linux-5.10/drivers/irqchip/ |
H A D | irq-stm32-exti.c | 68 struct hwspinlock *hwlock; member 304 struct hwspinlock *hwlock = chip_data->host_data->hwlock; in stm32_irq_set_type() local 310 if (hwlock) { in stm32_irq_set_type() 311 err = hwspin_lock_timeout_in_atomic(hwlock, HWSPNLCK_TIMEOUT); in stm32_irq_set_type() 329 if (hwlock) in stm32_irq_set_type() 330 hwspin_unlock_in_atomic(hwlock); in stm32_irq_set_type() 507 struct hwspinlock *hwlock = chip_data->host_data->hwlock; in stm32_exti_h_set_type() local 514 if (hwlock) { in stm32_exti_h_set_type() [all...] |
/kernel/linux/linux-6.6/drivers/irqchip/ |
H A D | irq-stm32-exti.c | 63 struct hwspinlock *hwlock; member 361 struct hwspinlock *hwlock = chip_data->host_data->hwlock; in stm32_irq_set_type() local 367 if (hwlock) { in stm32_irq_set_type() 368 err = hwspin_lock_timeout_in_atomic(hwlock, HWSPNLCK_TIMEOUT); in stm32_irq_set_type() 386 if (hwlock) in stm32_irq_set_type() 387 hwspin_unlock_in_atomic(hwlock); in stm32_irq_set_type() 564 struct hwspinlock *hwlock = chip_data->host_data->hwlock; in stm32_exti_h_set_type() local 571 if (hwlock) { in stm32_exti_h_set_type() [all...] |
/kernel/linux/linux-5.10/drivers/nvmem/ |
H A D | sc27xx-efuse.c | 65 struct hwspinlock *hwlock; member 90 ret = hwspin_lock_timeout_raw(efuse->hwlock, in sc27xx_efuse_lock() 103 hwspin_unlock_raw(efuse->hwlock); in sc27xx_efuse_unlock() 233 efuse->hwlock = devm_hwspin_lock_request_specific(&pdev->dev, ret); in sc27xx_efuse_probe() 234 if (!efuse->hwlock) { in sc27xx_efuse_probe()
|
H A D | sprd-efuse.c | 66 struct hwspinlock *hwlock; member 89 ret = hwspin_lock_timeout_raw(efuse->hwlock, in sprd_efuse_lock() 102 hwspin_unlock_raw(efuse->hwlock); in sprd_efuse_unlock() 386 dev_err(&pdev->dev, "failed to get hwlock id\n"); in sprd_efuse_probe() 390 efuse->hwlock = devm_hwspin_lock_request_specific(&pdev->dev, ret); in sprd_efuse_probe() 391 if (!efuse->hwlock) { in sprd_efuse_probe() 392 dev_err(&pdev->dev, "failed to request hwlock\n"); in sprd_efuse_probe()
|
/kernel/linux/linux-6.6/drivers/nvmem/ |
H A D | sc27xx-efuse.c | 64 struct hwspinlock *hwlock; member 89 ret = hwspin_lock_timeout_raw(efuse->hwlock, in sc27xx_efuse_lock() 102 hwspin_unlock_raw(efuse->hwlock); in sc27xx_efuse_unlock() 232 efuse->hwlock = devm_hwspin_lock_request_specific(&pdev->dev, ret); in sc27xx_efuse_probe() 233 if (!efuse->hwlock) { in sc27xx_efuse_probe()
|
H A D | sprd-efuse.c | 66 struct hwspinlock *hwlock; member 89 ret = hwspin_lock_timeout_raw(efuse->hwlock, in sprd_efuse_lock() 102 hwspin_unlock_raw(efuse->hwlock); in sprd_efuse_unlock() 386 dev_err(&pdev->dev, "failed to get hwlock id\n"); in sprd_efuse_probe() 390 efuse->hwlock = devm_hwspin_lock_request_specific(&pdev->dev, ret); in sprd_efuse_probe() 391 if (!efuse->hwlock) { in sprd_efuse_probe() 392 dev_err(&pdev->dev, "failed to request hwlock\n"); in sprd_efuse_probe()
|
/kernel/linux/linux-6.6/drivers/spi/ |
H A D | spi-sprd-adi.c | 150 struct hwspinlock *hwlock; member 226 if (sadi->hwlock) { in sprd_adi_read() 227 ret = hwspin_lock_timeout_irqsave(sadi->hwlock, in sprd_adi_read() 281 if (sadi->hwlock) in sprd_adi_read() 282 hwspin_unlock_irqrestore(sadi->hwlock, &flags); in sprd_adi_read() 292 if (sadi->hwlock) { in sprd_adi_write() 293 ret = hwspin_lock_timeout_irqsave(sadi->hwlock, in sprd_adi_write() 330 if (sadi->hwlock) in sprd_adi_write() 331 hwspin_unlock_irqrestore(sadi->hwlock, &flags); in sprd_adi_write() 557 sadi->hwlock in sprd_adi_probe() [all...] |
/kernel/linux/linux-5.10/drivers/isdn/hardware/mISDN/ |
H A D | mISDNisar.c | 199 spin_lock_irqsave(isar->hwlock, flags); in load_firmware() 201 spin_unlock_irqrestore(isar->hwlock, flags); in load_firmware() 216 spin_lock_irqsave(isar->hwlock, flags); in load_firmware() 228 spin_unlock_irqrestore(isar->hwlock, flags); in load_firmware() 257 spin_lock_irqsave(isar->hwlock, flags); in load_firmware() 268 spin_unlock_irqrestore(isar->hwlock, flags); in load_firmware() 288 spin_lock_irqsave(isar->hwlock, flags); in load_firmware() 310 spin_unlock_irqrestore(isar->hwlock, flags); in load_firmware() 328 spin_lock_irqsave(isar->hwlock, flags); in load_firmware() 334 spin_unlock_irqrestore(isar->hwlock, flag in load_firmware() [all...] |
H A D | mISDNipac.c | 564 spin_lock_irqsave(isac->hwlock, flags); in isac_l1hw() 570 spin_unlock_irqrestore(isac->hwlock, flags); in isac_l1hw() 573 spin_unlock_irqrestore(isac->hwlock, flags); in isac_l1hw() 598 spin_lock_irqsave(isac->hwlock, flags); in isac_ctrl() 612 spin_unlock_irqrestore(isac->hwlock, flags); in isac_ctrl() 634 spin_lock_irqsave(isac->hwlock, flags); in isac_l1cmd() 636 spin_unlock_irqrestore(isac->hwlock, flags); in isac_l1cmd() 639 spin_lock_irqsave(isac->hwlock, flags); in isac_l1cmd() 641 spin_unlock_irqrestore(isac->hwlock, flags); in isac_l1cmd() 644 spin_lock_irqsave(isac->hwlock, flag in isac_l1cmd() [all...] |
/kernel/linux/linux-6.6/drivers/isdn/hardware/mISDN/ |
H A D | mISDNisar.c | 199 spin_lock_irqsave(isar->hwlock, flags); in load_firmware() 201 spin_unlock_irqrestore(isar->hwlock, flags); in load_firmware() 216 spin_lock_irqsave(isar->hwlock, flags); in load_firmware() 228 spin_unlock_irqrestore(isar->hwlock, flags); in load_firmware() 257 spin_lock_irqsave(isar->hwlock, flags); in load_firmware() 268 spin_unlock_irqrestore(isar->hwlock, flags); in load_firmware() 288 spin_lock_irqsave(isar->hwlock, flags); in load_firmware() 310 spin_unlock_irqrestore(isar->hwlock, flags); in load_firmware() 328 spin_lock_irqsave(isar->hwlock, flags); in load_firmware() 334 spin_unlock_irqrestore(isar->hwlock, flag in load_firmware() [all...] |
H A D | mISDNipac.c | 564 spin_lock_irqsave(isac->hwlock, flags); in isac_l1hw() 570 spin_unlock_irqrestore(isac->hwlock, flags); in isac_l1hw() 573 spin_unlock_irqrestore(isac->hwlock, flags); in isac_l1hw() 598 spin_lock_irqsave(isac->hwlock, flags); in isac_ctrl() 612 spin_unlock_irqrestore(isac->hwlock, flags); in isac_ctrl() 634 spin_lock_irqsave(isac->hwlock, flags); in isac_l1cmd() 636 spin_unlock_irqrestore(isac->hwlock, flags); in isac_l1cmd() 639 spin_lock_irqsave(isac->hwlock, flags); in isac_l1cmd() 641 spin_unlock_irqrestore(isac->hwlock, flags); in isac_l1cmd() 644 spin_lock_irqsave(isac->hwlock, flag in isac_l1cmd() [all...] |
/kernel/linux/linux-5.10/drivers/pinctrl/stm32/ |
H A D | pinctrl-stm32.c | 112 struct hwspinlock *hwlock; member 445 if (pctl->hwlock) { in stm32_gpio_domain_activate() 446 ret = hwspin_lock_timeout_in_atomic(pctl->hwlock, in stm32_gpio_domain_activate() 458 if (pctl->hwlock) in stm32_gpio_domain_activate() 459 hwspin_unlock_in_atomic(pctl->hwlock); in stm32_gpio_domain_activate() 467 if (pctl->hwlock) in stm32_gpio_domain_activate() 468 hwspin_unlock_in_atomic(pctl->hwlock); in stm32_gpio_domain_activate() 776 if (pctl->hwlock) { in stm32_pmx_set_mode() 777 err = hwspin_lock_timeout_in_atomic(pctl->hwlock, in stm32_pmx_set_mode() 795 if (pctl->hwlock) in stm32_pmx_set_mode() [all...] |