Searched refs:clamp (Results 1 - 25 of 316) sorted by last modified time

1234567891011>>

/linux-master/mm/
H A Dvmalloc.c2249 nr_purge_helpers = clamp(nr_purge_helpers, 1U, nr_purge_nodes) - 1;
/linux-master/drivers/spi/
H A Dspi-stm32.c578 packet = clamp(xfer_len, 1U, spi->fifo_size / 2);
/linux-master/sound/pci/emu10k1/
H A Demuproc.c370 buf, &spaces[nspaces - clamp(65 - len, 0, nspaces)],
/linux-master/drivers/net/ethernet/chelsio/cxgb4/
H A Dsge.c3995 timer_index = clamp(timer_index, 0, SGE_TIMERREGS - 1);
/linux-master/kernel/
H A Dworkqueue.c1618 clamp(DIV_ROUND_UP(max_active * node_cpus, total_cpus),
5806 wq->saved_min_active = clamp(min_active, 0, wq->saved_max_active);
H A Dprofile.c80 prof_shift = clamp(par, 0, BITS_PER_LONG - 1);
90 prof_shift = clamp(par, 0, BITS_PER_LONG - 1);
/linux-master/kernel/sched/
H A Dfair.c89 sched_thermal_decay_shift = clamp(_shift, 0, 10);
706 return clamp(vlag, -limit, limit);
2680 p->numa_scan_period = clamp(p->numa_scan_period + diff,
3614 * Signed add and clamp on underflow.
3634 * Unsigned subtract and clamp on underflow.
3651 * Remove and clamp on negative, from a local variable.
8042 * the clamp() part. Ie: apply max aggregation
9561 interval = clamp(interval, 1UL, max_load_balance_interval);
11546 interval = clamp(interval, 1UL, max_load_balance_interval);
12983 shares = clamp(share
[all...]
H A Dcore.c1355 * Serializes updates of utilization clamp values
1357 * The (slow-path) user-space triggers utilization clamp value updates which
1444 * idle (which drops the max-clamp) by retaining the last known
1445 * max-clamp.
1458 /* Reset max-clamp retention only on idle exit */
1482 /* No tasks -- default clamp values */
1533 value = clamp(value, tg_min, tg_max);
1541 * The effective clamp bucket index of a task depends on, by increasing
1543 * - the task specific clamp value, when explicitly requested from userspace
1544 * - the task group effective clamp valu
[all...]
/linux-master/drivers/gpu/drm/etnaviv/
H A Detnaviv_gpu.c502 gpu->fe_waitcycles = clamp(gpu->base_rate_core >> (15 - gpu->freq_scale),
/linux-master/drivers/gpu/drm/amd/amdkfd/
H A Dkfd_svm.c2000 pages = clamp(pages, 1ULL << 9, 1ULL << 18);
/linux-master/drivers/hid/
H A Dhid-nintendo.c1366 new_val = clamp(new_val, (s32)-JC_MAX_STICK_MAG, (s32)JC_MAX_STICK_MAG);
1925 ctlr->rumble_ll_freq = clamp(ctlr->rumble_ll_freq,
1928 ctlr->rumble_lh_freq = clamp(ctlr->rumble_lh_freq,
1931 ctlr->rumble_rl_freq = clamp(ctlr->rumble_rl_freq,
1934 ctlr->rumble_rh_freq = clamp(ctlr->rumble_rh_freq,
/linux-master/drivers/usb/typec/ucsi/
H A Ducsi.c47 buf_size = clamp(buf_size, 0, 16);
/linux-master/drivers/clk/
H A Dclk.c1594 req->rate = clamp(req->rate, req->min_rate, req->max_rate);
2723 rate = clamp(rate, min, max);
/linux-master/block/
H A Dblk-iocost.c983 vcomp = clamp(vcomp, vcomp_min, vcomp_max);
990 ioc->vtime_err = clamp(ioc->vtime_err, -vperiod, vperiod);
1010 * If vrate is out of bounds, apply clamp gradually as the
1030 vrate = clamp(DIV64_U64_ROUND_UP(vrate * adj_pct, 100),
2430 ioc->busy_level = clamp(ioc->busy_level, -1000, 1000);
H A Dblk-cgroup.c1851 bool clamp; local
1867 clamp = use_delay > 0;
1885 if (clamp)
/linux-master/sound/pci/hda/
H A Dtas2781_hda_i2c.c206 val = clamp(nr_profile, 0, max);
278 val = clamp(nr_program, 0, max);
321 val = clamp(nr_config, 0, max);
/linux-master/sound/core/seq/
H A Dseq_ump_convert.c636 val = clamp(val, 0, 0x3fff);
870 val = clamp(val, 0, 0x3fff);
/linux-master/fs/bcachefs/
H A Dsysfs.c942 clamp(atomic_read(&ca->congested), 0, CONGESTED_MAX)
/linux-master/io_uring/
H A Dio_uring.c300 hash_bits = clamp(hash_bits, 1, 8);
/linux-master/drivers/ata/
H A Dlibata-core.c5930 host->n_tags = clamp(sht->can_queue, 1, ATA_MAX_QUEUE);
/linux-master/tools/include/linux/
H A Dkernel.h59 #define clamp(val, lo, hi) min((typeof(val))max(val, lo), hi) macro
/linux-master/drivers/thermal/
H A Dgov_power_allocator.c290 power_range = clamp(power_range, (s64)0, (s64)max_allocatable_power);
/linux-master/drivers/net/phy/
H A Dmicrel.c1597 dt = clamp(dt - 22, 0, 255);
/linux-master/drivers/gpu/drm/i915/gt/
H A Dintel_engine_cs.c534 u64 clamp = intel_clamp_##field(engine, engine->props.field); \
535 if (clamp != engine->props.field) { \
538 #field, clamp); \
539 engine->props.field = clamp; \
/linux-master/drivers/gpu/drm/display/
H A Ddrm_dp_helper.c1896 dp_aux_i2c_transfer_size = clamp(dp_aux_i2c_transfer_size, 1, DP_AUX_MAX_PAYLOAD_BYTES);
3823 f = clamp(DIV_ROUND_CLOSEST(fxp, 1 << pn), 1, 255);

Completed in 532 milliseconds

1234567891011>>