| /linux/kernel/time/ |
| H A D | sleep_timeout.c | 3 * Kernel internal schedule timeout and sleeping functions 25 struct process_timer *timeout = timer_container_of(timeout, t, timer); in process_timeout() local 27 wake_up_process(timeout->task); in process_timeout() 31 * schedule_timeout - sleep until timeout 32 * @timeout: timeout value in jiffies 34 * Make the current task sleep until @timeout jiffies have elapsed. 42 * %TASK_UNINTERRUPTIBLE - at least @timeout jiffies are guaranteed to 53 * Specifying a @timeout value of %MAX_SCHEDULE_TIMEOUT will schedule 54 * the CPU away without a bound on the timeout. In this case the return 61 signed long __sched schedule_timeout(signed long timeout) in schedule_timeout() argument [all …]
|
| /linux/kernel/sched/ |
| H A D | completion.c | 87 long (*action)(long), long timeout, int state) in do_wait_for_common() argument 94 timeout = -ERESTARTSYS; in do_wait_for_common() 100 timeout = action(timeout); in do_wait_for_common() 102 } while (!x->done && timeout); in do_wait_for_common() 105 return timeout; in do_wait_for_common() 109 return timeout ?: 1; in do_wait_for_common() 114 long (*action)(long), long timeout, int state) in __wait_for_common() argument 121 timeout = do_wait_for_common(x, action, timeout, state); in __wait_for_common() 126 return timeout; in __wait_for_common() 130 wait_for_common(struct completion *x, long timeout, int state) in wait_for_common() argument [all …]
|
| /linux/net/netfilter/ |
| H A D | nf_conntrack_timeout.c | 28 static int untimeout(struct nf_conn *ct, void *timeout) in untimeout() argument 35 t = rcu_access_pointer(timeout_ext->timeout); in untimeout() 37 if (!timeout || t == timeout) in untimeout() 38 RCU_INIT_POINTER(timeout_ext->timeout, NULL); in untimeout() 45 void nf_ct_untimeout(struct net *net, struct nf_ct_timeout *timeout) in nf_ct_untimeout() argument 49 .data = timeout, in nf_ct_untimeout() 56 static void __nf_ct_timeout_put(struct nf_ct_timeout *timeout) in __nf_ct_timeout_put() argument 61 h->timeout_put(timeout); in __nf_ct_timeout_put() 68 struct nf_ct_timeout *timeout; in nf_ct_set_timeout() local 77 errmsg = "Timeout policy base is empty"; in nf_ct_set_timeout() [all …]
|
| /linux/io_uring/ |
| H A D | timeout.c | 15 #include "timeout.h" 33 /* timeout update */ 82 struct io_timeout *timeout = io_kiocb_to_cmd(req, struct io_timeout); in io_is_timeout_noseq() local 85 return !timeout->off || data->flags & IORING_TIMEOUT_MULTISHOT; in io_is_timeout_noseq() 96 static inline bool io_timeout_finish(struct io_timeout *timeout, in io_timeout_finish() argument 102 if (!timeout->off || (timeout->repeats && --timeout->repeats)) in io_timeout_finish() 113 struct io_timeout *timeout = io_kiocb_to_cmd(req, struct io_timeout); in io_timeout_complete() local 117 if (!io_timeout_finish(timeout, data)) { in io_timeout_complete() 121 list_add(&timeout->list, ctx->timeout_list.prev); in io_timeout_complete() 137 struct io_timeout *timeout; in io_flush_killed_timeouts() local [all …]
|
| H A D | wait.c | 67 * wake up. If not, and we have a normal timeout, switch to that and keep 75 /* no general timeout, or shorter (or equal), we are done */ in io_cqring_min_timer_wakeup() 76 if (iowq->timeout == KTIME_MAX || in io_cqring_min_timer_wakeup() 77 ktime_compare(iowq->min_timeout, iowq->timeout) >= 0) in io_cqring_min_timer_wakeup() 82 /* got events since we started waiting, min timeout is done */ in io_cqring_min_timer_wakeup() 88 /* if we have any events and min timeout expired, we're done */ in io_cqring_min_timer_wakeup() 109 hrtimer_set_expires(timer, iowq->timeout); in io_cqring_min_timer_wakeup() 118 ktime_t timeout; in io_cqring_schedule_timeout() local 121 timeout = ktime_add_ns(iowq->min_timeout, start_time); in io_cqring_schedule_timeout() 125 timeout = iowq->timeout; in io_cqring_schedule_timeout() [all …]
|
| /linux/drivers/watchdog/ |
| H A D | da9063_wdt.c | 25 * Watchdog selector to timeout in seconds. 27 * others: timeout = 2048 ms * 2^(TWDSCALE-1). 52 * Read the currently active timeout. 72 da9063_wdt_update_timeout(struct da9063 *da9063, unsigned int timeout) in da9063_wdt_update_timeout() argument 78 * The watchdog triggers a reboot if a timeout value is already in da9063_wdt_update_timeout() 79 * programmed because the timeout value combines two functions in da9063_wdt_update_timeout() 81 * The watchdog must be disabled to be able to change the timeout in da9063_wdt_update_timeout() 83 * new timeout value which enables the watchdog again. in da9063_wdt_update_timeout() 90 regval = da9063_wdt_timeout_to_sel(timeout); in da9063_wdt_update_timeout() 101 ret = da9063_wdt_update_timeout(da9063, wdd->timeout); in da9063_wdt_start() [all …]
|
| H A D | ts4800_wdt.c | 36 * TS-4800 supports the following timeout values: 45 * Keep the regmap/timeout map ordered by timeout 48 const int timeout; member 79 unsigned int timeout) in ts4800_wdt_set_timeout() argument 85 if (ts4800_wdt_map[i].timeout >= timeout) in ts4800_wdt_set_timeout() 89 wdd->timeout = ts4800_wdt_map[i].timeout; in ts4800_wdt_set_timeout() 151 wdd->min_timeout = ts4800_wdt_map[0].timeout; in ts4800_wdt_probe() 152 wdd->max_timeout = ts4800_wdt_map[MAX_TIMEOUT_INDEX].timeout; in ts4800_wdt_probe() 160 * must be called to initialize timeout and feed_val with valid values. in ts4800_wdt_probe() 161 * Default to maximum timeout if none, or an invalid one, is provided in in ts4800_wdt_probe() [all …]
|
| H A D | kempld_wdt.c | 8 * Note: From the PLD watchdog point of view timeout and pretimeout are 10 * First the pretimeout stage runs out before the timeout stage gets 14 * |-----------------------T timeout 84 static unsigned int timeout = DEFAULT_TIMEOUT; variable 85 module_param(timeout, uint, 0); 86 MODULE_PARM_DESC(timeout, 87 "Watchdog timeout in seconds. (>=0, default=" 130 unsigned int timeout) in kempld_wdt_set_stage_timeout() argument 144 stage_timeout64 = (u64)timeout * pld->pld_clock; in kempld_wdt_set_stage_timeout() 173 unsigned int timeout; in kempld_wdt_get_timeout() local [all …]
|
| H A D | smsc37b787_wdt.c | 33 * reset the system (causing a reboot) after the timeout occurs. 77 static int timeout = 60; /* timeout value: default is 60 "units" */ variable 190 * Bit 0 Status Bit: 0 = Timer counting, 1 = Timeout occurred in wdt_timer_ctrl() 192 * Bit 2 Force Timeout: 1 = Forces WD timeout event (self-cleaning) in wdt_timer_ctrl() 193 * Bit 3 P20 Force Timeout enabled: in wdt_timer_ctrl() 194 * 0 = P20 activity does not generate the WD timeout event in wdt_timer_ctrl() 196 * controller, to force the WD timeout event. in wdt_timer_ctrl() 225 /* disable the timeout */ in wb_smsc_wdt_initialize() 264 /* disable timeout */ in wb_smsc_wdt_shutdown() 271 /* set timeout => enable watchdog */ [all …]
|
| H A D | marvell_gti_wdt.c | 18 * This will generate the interrupt to arm core whenever timeout happens. 21 * This will generate interrupt to arm core on 1st timeout happens 22 * This will generate interrupt to SCP processor on 2nd timeout happens 25 * This will generate interrupt to arm core on 1st timeout happens 26 * Will generate interrupt to SCP processor on 2nd timeout happens, 28 * Reboot on 3rd timeout. 32 * effectively 2nd timeout is ignored within hardware. 34 * First timeout is effectively watchdog pretimeout. 152 unsigned int timeout) in gti_wdt_settimeout() argument 157 /* Update new timeout */ in gti_wdt_settimeout() [all …]
|
| H A D | sl28cpld_wdt.c | 36 static int timeout; variable 37 module_param(timeout, int, 0); 38 MODULE_PARM_DESC(timeout, "Initial watchdog timeout in seconds"); 92 unsigned int timeout) in sl28cpld_wdt_set_timeout() argument 97 ret = regmap_write(wdt->regmap, wdt->offset + WDT_TIMEOUT, timeout); in sl28cpld_wdt_set_timeout() 101 wdd->timeout = timeout; in sl28cpld_wdt_set_timeout() 144 "kontron,assert-wdt-timeout-pin"); in sl28cpld_wdt_probe() 166 * Initial timeout value, may be overwritten by device tree or module in sl28cpld_wdt_probe() 172 * this case gracefully and set out own timeout. in sl28cpld_wdt_probe() 179 wdd->timeout = val; in sl28cpld_wdt_probe() [all …]
|
| H A D | sun4v_wdt.c | 27 static unsigned int timeout; variable 28 module_param(timeout, uint, 0); 29 MODULE_PARM_DESC(timeout, "Watchdog timeout in seconds (default=" 49 * HV watchdog timer will round up the timeout in sun4v_wdt_ping() 53 hverr = sun4v_mach_set_watchdog(wdd->timeout * 1000, NULL); in sun4v_wdt_ping() 61 unsigned int timeout) in sun4v_wdt_set_timeout() argument 63 wdd->timeout = timeout; in sun4v_wdt_set_timeout() 89 .timeout = WDT_TIMEOUT, 104 * watchdog-max-timeout in sun4v_wdt_init() 135 value = mdesc_get_property(handle, node, "watchdog-max-timeout", NULL); in sun4v_wdt_init() [all …]
|
| H A D | dw_wdt.c | 7 * in the many subsystems. The watchdog has 16 different timeout periods 51 /* There are sixteen TOPs (timeout periods) that can be set in the watchdog. */ 93 u32 timeout; member 123 unsigned int timeout, u32 *top_val) in dw_wdt_find_best_top() argument 128 * Find a TOP with timeout greater or equal to the requested number. in dw_wdt_find_best_top() 129 * Note we'll select a TOP with maximum timeout if the requested in dw_wdt_find_best_top() 130 * timeout couldn't be reached. in dw_wdt_find_best_top() 133 if (dw_wdt->timeouts[idx].sec >= timeout) in dw_wdt_find_best_top() 150 * We'll find a timeout greater or equal to one second anyway because in dw_wdt_get_min_timeout() 163 struct dw_wdt_timeout *timeout = &dw_wdt->timeouts[DW_WDT_NUM_TOPS - 1]; in dw_wdt_get_max_timeout_ms() local [all …]
|
| H A D | visconti_wdt.c | 43 u32 timeout = wdev->timeout * VISCONTI_WDT_FREQ; in visconti_wdt_start() local 47 writel(timeout, priv->base + WDT_MAX); in visconti_wdt_start() 76 u32 timeout = wdev->timeout * VISCONTI_WDT_FREQ; in visconti_wdt_get_timeleft() local 79 if (timeout <= cnt) in visconti_wdt_get_timeleft() 81 timeout -= cnt; in visconti_wdt_get_timeleft() 83 return timeout / VISCONTI_WDT_FREQ; in visconti_wdt_get_timeleft() 86 static int visconti_wdt_set_timeout(struct watchdog_device *wdev, unsigned int timeout) in visconti_wdt_set_timeout() argument 91 wdev->timeout = timeout; in visconti_wdt_set_timeout() 92 val = wdev->timeout * VISCONTI_WDT_FREQ; in visconti_wdt_set_timeout() 94 /* Clear counter before setting timeout because WDT expires */ in visconti_wdt_set_timeout() [all …]
|
| /linux/block/ |
| H A D | blk-timeout.c | 3 * Functions related to generic timeout handling of requests. 75 * request by deleting the timer and calling the q's timeout function. 76 * LLDDs who implement their own error recovery MAY ignore the timeout 82 * All we need to ensure is that timeout scan takes place in blk_abort_request() 83 * immediately and that scan sees the new timeout value. in blk_abort_request() 109 unsigned long blk_rq_timeout(unsigned long timeout) in blk_rq_timeout() argument 114 if (time_after(timeout, maxt)) in blk_rq_timeout() 115 timeout = maxt; in blk_rq_timeout() 117 return timeout; in blk_rq_timeout() 121 * blk_add_timer - Start timeout timer for a single request [all …]
|
| /linux/tools/testing/selftests/firmware/ |
| H A D | fw_fallback.sh | 30 local timeout=10 33 timeout=$(( $timeout - 1 )) 34 if [ "$timeout" -eq 0 ]; then 57 local timeout=10 60 timeout=$(( $timeout - 1 )) 61 if [ "$timeout" -eq 0 ]; then 86 local timeout=10 89 timeout=$(( $timeout - 1 )) 90 if [ "$timeout" -eq 0 ]; then 119 local timeout=10 [all …]
|
| /linux/tools/testing/vsock/ |
| H A D | timeout.c | 2 /* Timeout API for single-threaded programs that use blocking 12 * timeout_begin(TIMEOUT); 25 #include "timeout.h" 27 static volatile bool timeout; 37 timeout = true; 40 /* Start a timeout. Call timeout_check() to verify that the timeout hasn't 41 * expired. timeout_end() must be called to stop the timeout. Timeouts cannot in timeout_begin() 49 /* Exit with an error message if the timeout has expired */ in timeout_check() 52 if (timeout) { in timeout_check() 26 static volatile bool timeout; global() variable [all...] |
| /linux/tools/include/nolibc/sys/ |
| H A D | select.h | 60 * fd_set *except_fds, struct timeval *timeout); 64 int _sys_select(int nfds, fd_set *rfds, fd_set *wfds, fd_set *efds, struct timeval *timeout) in sys_select() argument 69 if (timeout) { in sys_select() 70 t.tv_sec = timeout->tv_sec; in sys_select() 71 t.tv_nsec = (uint32_t)timeout->tv_usec * 1000; in sys_select() 74 timeout ? &t : NULL, NULL); in sys_select() 78 if (timeout) { in sys_select() 79 t.tv_sec = timeout->tv_sec; in sys_select() 80 t.tv_nsec = (uint32_t)timeout->tv_usec * 1000; in sys_select() 83 timeout in sys_select() 97 select(int nfds,fd_set * rfds,fd_set * wfds,fd_set * efds,struct timeval * timeout) select() argument [all...] |
| /linux/drivers/accel/ivpu/ |
| H A D | ivpu_hw.c | 102 vdev->timeout.boot = -1; in timeouts_init() 103 vdev->timeout.jsm = -1; in timeouts_init() 104 vdev->timeout.tdr = -1; in timeouts_init() 105 vdev->timeout.inference = -1; in timeouts_init() 106 vdev->timeout.autosuspend = -1; in timeouts_init() 107 vdev->timeout.d0i3_entry_msg = -1; in timeouts_init() 109 vdev->timeout.boot = 50; in timeouts_init() 110 vdev->timeout.jsm = 15000; in timeouts_init() 111 vdev->timeout.tdr = 30000; in timeouts_init() 112 vdev->timeout.inference = 900000; in timeouts_init() [all …]
|
| /linux/tools/testing/selftests/drivers/net/mlxsw/ |
| H A D | vxlan.sh | 37 : ${TIMEOUT:=20000} # ms 485 busywait "$TIMEOUT" wait_for_offload grep_bridge_fdb 00:00:00:00:00:00 \ 501 busywait "$TIMEOUT" wait_for_offload grep_bridge_fdb \ 504 busywait "$TIMEOUT" wait_for_offload grep_bridge_fdb \ 515 busywait "$TIMEOUT" not wait_for_offload grep_bridge_fdb \ 526 busywait "$TIMEOUT" wait_for_offload grep_bridge_fdb \ 529 busywait "$TIMEOUT" wait_for_offload grep_bridge_fdb \ 540 busywait "$TIMEOUT" not wait_for_offload grep_bridge_fdb \ 551 busywait "$TIMEOUT" wait_for_offload grep_bridge_fdb \ 554 busywait "$TIMEOUT" wait_for_offload grep_bridge_fdb \ [all …]
|
| /linux/arch/arm/mach-sa1100/ |
| H A D | ssp.c | 23 #define TIMEOUT 100000 macro 48 * %-ETIMEDOUT timeout occurred 53 int timeout = TIMEOUT; in ssp_write_word() local 56 if (!--timeout) in ssp_write_word() 63 timeout = TIMEOUT; in ssp_write_word() 65 if (!--timeout) in ssp_write_word() 85 * %-ETIMEDOUT timeout occurred 90 int timeout = TIMEOUT; in ssp_read_word() local 93 if (!--timeout) in ssp_read_word() 112 * %-ETIMEDOUT timeout occurred [all …]
|
| /linux/drivers/gpu/drm/xe/ |
| H A D | xe_hw_engine_class_sysfs.c | 20 * xe_hw_engine_timeout_in_range - Helper to check if timeout is in range 21 * @timeout: timeout to validate 25 * This helper helps to validate if timeout is in min-max range of HW engine 30 bool xe_hw_engine_timeout_in_range(u64 timeout, u64 min, u64 max) in xe_hw_engine_timeout_in_range() argument 32 return timeout >= min && timeout <= max; in xe_hw_engine_timeout_in_range() 93 u32 timeout; in job_timeout_max_store() local 96 err = kstrtou32(buf, 0, &timeout); in job_timeout_max_store() 100 if (timeout < eclass->sched_props.job_timeout_min) in job_timeout_max_store() 103 if (!xe_hw_engine_timeout_in_range(timeout, in job_timeout_max_store() 108 WRITE_ONCE(eclass->sched_props.job_timeout_max, timeout); in job_timeout_max_store() [all …]
|
| /linux/drivers/gpu/host1x/ |
| H A D | fence.c | 49 * or cancelled. As such, for such situations, set up a timeout, so in host1x_syncpt_fence_enable_signaling() 52 if (sf->timeout) { in host1x_syncpt_fence_enable_signaling() 53 /* Reference for timeout path. */ in host1x_syncpt_fence_enable_signaling() 79 * Already on timeout path, but we removed the fence before in host1x_fence_signal() 80 * timeout path could, so drop interrupt path reference. in host1x_fence_signal() 86 if (f->timeout && cancel_delayed_work(&f->timeout_work)) { in host1x_fence_signal() 88 * We know that the timeout path will not be entered. in host1x_fence_signal() 89 * Safe to drop the timeout path's reference now. in host1x_fence_signal() 105 /* Already on interrupt path, drop timeout path reference if any. */ in do_fence_timeout() 106 if (f->timeout) in do_fence_timeout() [all …]
|
| /linux/include/linux/ |
| H A D | swait.h | 193 #define __swait_event_timeout(wq, condition, timeout) \ argument 195 TASK_UNINTERRUPTIBLE, timeout, \ 198 #define swait_event_timeout_exclusive(wq, condition, timeout) \ argument 200 long __ret = timeout; \ 202 __ret = __swait_event_timeout(wq, condition, timeout); \ 218 #define __swait_event_interruptible_timeout(wq, condition, timeout) \ argument 220 TASK_INTERRUPTIBLE, timeout, \ 223 #define swait_event_interruptible_timeout_exclusive(wq, condition, timeout)\ argument 225 long __ret = timeout; \ 228 condition, timeout); \ [all …]
|
| /linux/include/net/netfilter/ |
| H A D | nf_conntrack_timeout.h | 22 struct nf_ct_timeout __rcu *timeout; member 29 struct nf_ct_timeout *timeout; in nf_ct_timeout_data() local 31 timeout = rcu_dereference(t->timeout); in nf_ct_timeout_data() 32 if (timeout == NULL) in nf_ct_timeout_data() 35 return (unsigned int *)timeout->data; in nf_ct_timeout_data() 53 struct nf_ct_timeout *timeout, in nf_ct_timeout_ext_add() argument 63 rcu_assign_pointer(timeout_ext->timeout, timeout); in nf_ct_timeout_ext_add() 85 void nf_ct_untimeout(struct net *net, struct nf_ct_timeout *timeout); 106 void (*timeout_put)(struct nf_ct_timeout *timeout);
|