Home
last modified time | relevance | path

Searched refs:rem (Results 1 – 25 of 151) sorted by relevance

1234567

/drivers/gpu/drm/nouveau/nvkm/falcon/
Dv1.c32 u8 rem = size % 4; in nvkm_falcon_v1_load_imem() local
36 size -= rem; in nvkm_falcon_v1_load_imem()
51 if (rem) { in nvkm_falcon_v1_load_imem()
58 extra & (BIT(rem * 8) - 1)); in nvkm_falcon_v1_load_imem()
71 u8 rem = size % 4; in nvkm_falcon_v1_load_dmem() local
74 size -= rem; in nvkm_falcon_v1_load_dmem()
84 if (rem) { in nvkm_falcon_v1_load_dmem()
88 extra & (BIT(rem * 8) - 1)); in nvkm_falcon_v1_load_dmem()
/drivers/gpu/drm/msm/
Dmsm_perf.c63 int rem = sizeof(perf->buf); in refill_buf() local
68 n = snprintf(ptr, rem, "%%BUSY"); in refill_buf()
70 rem -= n; in refill_buf()
74 n = snprintf(ptr, rem, "\t%s", perfcntr->name); in refill_buf()
76 rem -= n; in refill_buf()
96 n = snprintf(ptr, rem, "%3d.%d%%", val / 10, val % 10); in refill_buf()
98 rem -= n; in refill_buf()
103 n = snprintf(ptr, rem, "\t%5d.%02d", in refill_buf()
106 rem -= n; in refill_buf()
110 n = snprintf(ptr, rem, "\n"); in refill_buf()
[all …]
/drivers/platform/surface/aggregator/
Dssh_parser.c69 bool sshp_find_syn(const struct ssam_span *src, struct ssam_span *rem) in sshp_find_syn() argument
75 rem->ptr = src->ptr + i; in sshp_find_syn()
76 rem->len = src->len - i; in sshp_find_syn()
82 rem->ptr = src->ptr + src->len - 1; in sshp_find_syn()
83 rem->len = 1; in sshp_find_syn()
87 rem->ptr = src->ptr + src->len; in sshp_find_syn()
88 rem->len = 0; in sshp_find_syn()
/drivers/misc/mei/
Ddma-ring.c171 u32 rd_idx, rem, slots; in mei_dma_ring_read() local
191 rem = slots - (dbuf_depth - rd_idx); in mei_dma_ring_read()
194 rem = slots; in mei_dma_ring_read()
197 mei_dma_copy_from(dev, buf, rd_idx, rem); in mei_dma_ring_read()
248 u32 wr_idx, rem, slots; in mei_dma_ring_write() local
260 rem = slots - (hbuf_depth - wr_idx); in mei_dma_ring_write()
263 rem = slots; in mei_dma_ring_write()
266 mei_dma_copy_to(dev, buf, wr_idx, rem); in mei_dma_ring_write()
Dhw-txe.c702 unsigned long rem; in mei_txe_write() local
739 rem = data_len & 0x3; in mei_txe_write()
740 if (rem > 0) { in mei_txe_write()
743 memcpy(&reg, (const u8 *)data + data_len - rem, rem); in mei_txe_write()
822 u32 rem; in mei_txe_read() local
829 rem = len & 0x3; in mei_txe_read()
841 if (rem) { in mei_txe_read()
843 memcpy(reg_buf, &reg, rem); in mei_txe_read()
/drivers/net/ethernet/rocker/
Drocker_tlv.h45 #define rocker_tlv_for_each(pos, head, len, rem) \ argument
46 for (pos = head, rem = len; \
47 rocker_tlv_ok(pos, rem); \
48 pos = rocker_tlv_next(pos, &(rem)))
50 #define rocker_tlv_for_each_nested(pos, tlv, rem) \ argument
52 rocker_tlv_len(tlv), rem)
Drocker_tlv.c20 int rem; in rocker_tlv_parse() local
24 rocker_tlv_for_each(tlv, head, buf_len, rem) { in rocker_tlv_parse()
/drivers/gpu/drm/i915/gt/
Dgen8_ppgtt.c506 unsigned int rem = sg_dma_len(iter->sg); in xehpsdv_ppgtt_insert_huge() local
529 rem >= I915_GTT_PAGE_SIZE_2M && in xehpsdv_ppgtt_insert_huge()
562 rem >= I915_GTT_PAGE_SIZE_64K && in xehpsdv_ppgtt_insert_huge()
574 GEM_BUG_ON(rem < page_size); in xehpsdv_ppgtt_insert_huge()
584 rem -= page_size; in xehpsdv_ppgtt_insert_huge()
590 rem = sg_dma_len(iter->sg); in xehpsdv_ppgtt_insert_huge()
591 if (!rem) in xehpsdv_ppgtt_insert_huge()
595 iter->max = iter->dma + rem; in xehpsdv_ppgtt_insert_huge()
600 } while (rem >= page_size && index < max); in xehpsdv_ppgtt_insert_huge()
614 unsigned int rem = sg_dma_len(iter->sg); in gen8_ppgtt_insert_huge() local
[all …]
/drivers/iio/common/hid-sensors/
Dhid-sensor-attributes.c74 int rem; in simple_div() local
83 rem = dividend % divisor; in simple_div()
84 if (rem) { in simple_div()
85 while (rem <= divisor) { in simple_div()
86 rem *= 10; in simple_div()
89 *micro_frac = (rem / divisor) * int_pow(10, 6 - exp); in simple_div()
362 int rem; in adjust_exponent_nano() local
387 rem = scale0 % divisor; in adjust_exponent_nano()
395 *val1 = rem * int_pow(10, 9 - exp) + res; in adjust_exponent_nano()
/drivers/ptp/
Dptp_dfl_tod.c174 u32 period, diff, rem, rem_period, adj_period; in dfl_tod_adjust_time() local
198 count = div_u64_rem(delta, diff, &rem); in dfl_tod_adjust_time()
199 rem_period = period - (rem << PERIOD_FRAC_OFFSET); in dfl_tod_adjust_time()
203 count = div_u64_rem(delta, diff, &rem); in dfl_tod_adjust_time()
204 rem_period = period + (rem << PERIOD_FRAC_OFFSET); in dfl_tod_adjust_time()
217 if (rem) in dfl_tod_adjust_time()
/drivers/scsi/esas2r/
Desas2r_io.c194 u32 rem = 0; in esas2r_build_sg_list_sge() local
217 rem = len - SGE_LEN_MAX; in esas2r_build_sg_list_sge()
319 if (rem) { in esas2r_build_sg_list_sge()
321 len = rem; in esas2r_build_sg_list_sge()
322 rem = 0; in esas2r_build_sg_list_sge()
378 u32 rem = 0; in esas2r_build_prd_iblk() local
404 rem = len - PRD_LEN_MAX; in esas2r_build_prd_iblk()
504 if (rem) { in esas2r_build_prd_iblk()
506 len = rem; in esas2r_build_prd_iblk()
507 rem = 0; in esas2r_build_prd_iblk()
/drivers/gpu/drm/i915/selftests/
Dintel_memory_region.c59 resource_size_t rem; in igt_mock_fill() local
67 rem = total; in igt_mock_fill()
86 rem -= size; in igt_mock_fill()
92 if (page_num * page_size <= rem) { in igt_mock_fill()
563 u64 rem; in igt_mock_io_size() local
591 rem = total - io_size; in igt_mock_io_size()
593 div64_u64_rem(i915_prandom_u64_state(&prng), rem, &size); in igt_mock_io_size()
601 __func__, rem, size); in igt_mock_io_size()
607 rem -= size; in igt_mock_io_size()
608 } while (rem); in igt_mock_io_size()
[all …]
/drivers/char/agp/
Disoch.c88 u32 step, rem, rem_isoch, rem_async; in agp_3_5_isochronous_node_enable() local
200 rem = target.n - tot_n; in agp_3_5_isochronous_node_enable()
221 master[ndevs-1].n += rem; in agp_3_5_isochronous_node_enable()
289 u32 trq, mrq, rem; in agp_3_5_nonisochronous_node_enable() local
297 rem = mrq + (trq % ndevs); in agp_3_5_nonisochronous_node_enable()
304 mcmd |= ((cdev == ndevs - 1) ? rem : mrq) << 24; in agp_3_5_nonisochronous_node_enable()
/drivers/media/test-drivers/vidtv/
Dvidtv_ts.c24 u64 rem; in vidtv_ts_write_pcr_bits() local
29 div = div64_u64_rem(pcr, 300, &rem); in vidtv_ts_write_pcr_bits()
31 pcr_low = rem; /* pcr_low = pcr % 300 */ in vidtv_ts_write_pcr_bits()
/drivers/mmc/core/
Dcore.c1713 unsigned int from_new = *from, nr_new = nr, rem; in mmc_align_erase_size() local
1723 rem = from_new - temp; in mmc_align_erase_size()
1725 if (nr_new > rem) in mmc_align_erase_size()
1726 nr_new -= rem; in mmc_align_erase_size()
1732 rem = from_new % card->erase_size; in mmc_align_erase_size()
1733 if (rem) { in mmc_align_erase_size()
1734 rem = card->erase_size - rem; in mmc_align_erase_size()
1735 from_new += rem; in mmc_align_erase_size()
1736 if (nr_new > rem) in mmc_align_erase_size()
1737 nr_new -= rem; in mmc_align_erase_size()
[all …]
/drivers/media/tuners/
Dmt2060.c86 int rem, val_len; in mt2060_writeregs() local
99 for (rem = len - 1; rem > 0; rem -= priv->i2c_max_regs) { in mt2060_writeregs()
100 val_len = min_t(int, rem, priv->i2c_max_regs); in mt2060_writeregs()
102 xfer_buf[0] = buf[0] + len - 1 - rem; in mt2060_writeregs()
103 memcpy(&xfer_buf[1], &buf[1 + len - 1 - rem], val_len); in mt2060_writeregs()
/drivers/gpu/drm/
Ddrm_mm.c569 u64 rem; in drm_mm_insert_node_in_range() local
572 rem = adj_start & remainder_mask; in drm_mm_insert_node_in_range()
574 div64_u64_rem(adj_start, alignment, &rem); in drm_mm_insert_node_in_range()
575 if (rem) { in drm_mm_insert_node_in_range()
576 adj_start -= rem; in drm_mm_insert_node_in_range()
821 u64 rem; in drm_mm_scan_add_block() local
824 rem = adj_start & scan->remainder_mask; in drm_mm_scan_add_block()
826 div64_u64_rem(adj_start, scan->alignment, &rem); in drm_mm_scan_add_block()
827 if (rem) { in drm_mm_scan_add_block()
828 adj_start -= rem; in drm_mm_scan_add_block()
/drivers/media/i2c/cx25840/
Dcx25840-ir.c209 u32 rem; in pulse_width_count_to_ns() local
216 rem = do_div(n, CX25840_IR_REFCLK_FREQ / 1000000); /* / MHz => ns */ in pulse_width_count_to_ns()
217 if (rem >= CX25840_IR_REFCLK_FREQ / 1000000 / 2) in pulse_width_count_to_ns()
228 u32 rem;
236 rem = do_div(n, d);
237 if (rem >= d / 2)
251 u32 rem; in pulse_width_count_to_us() local
258 rem = do_div(n, CX25840_IR_REFCLK_FREQ / 1000000); /* / MHz => us */ in pulse_width_count_to_us()
259 if (rem >= CX25840_IR_REFCLK_FREQ / 1000000 / 2) in pulse_width_count_to_us()
275 u32 rem; in ns_to_pulse_clocks() local
[all …]
/drivers/block/drbd/
Ddrbd_nla.c11 int rem; in drbd_nla_check_mandatory() local
21 nla_for_each_attr(nla, head, len, rem) { in drbd_nla_check_mandatory()
/drivers/media/rc/
Dfintek-cir.c285 fintek->rem = (fintek->cmd & BUF_LEN_MASK); in fintek_process_rx_ir_data()
286 fit_dbg("%s: rem: 0x%02x", __func__, fintek->rem); in fintek_process_rx_ir_data()
287 if (fintek->rem) in fintek_process_rx_ir_data()
293 fintek->rem = fintek_cmdsize(fintek->cmd, sample); in fintek_process_rx_ir_data()
297 fintek->rem--; in fintek_process_rx_ir_data()
300 fintek->rem--; in fintek_process_rx_ir_data()
314 if ((fintek->parser_state != CMD_HEADER) && !fintek->rem) in fintek_process_rx_ir_data()
/drivers/net/ethernet/intel/ixgbe/
Dixgbe_ptp.c164 u32 esdp, tsauxc, clktiml, clktimh, trgttiml, trgttimh, rem; in ixgbe_ptp_setup_sdp_X540() local
204 div_u64_rem(ns, NS_PER_SEC, &rem); in ixgbe_ptp_setup_sdp_X540()
209 rem = (NS_PER_SEC - rem); in ixgbe_ptp_setup_sdp_X540()
212 clock_edge += div_u64(((u64)rem << cc->shift), cc->mult); in ixgbe_ptp_setup_sdp_X540()
241 u32 esdp, tsauxc, freqout, trgttiml, trgttimh, rem, tssdp; in ixgbe_ptp_setup_sdp_X550() local
287 div_u64_rem(ns, NS_PER_SEC, &rem); in ixgbe_ptp_setup_sdp_X550()
292 rem = (NS_PER_SEC - rem); in ixgbe_ptp_setup_sdp_X550()
295 clock_edge += div_u64(((u64)rem << cc->shift), cc->mult); in ixgbe_ptp_setup_sdp_X550()
/drivers/net/ethernet/stmicro/stmmac/
Dstmmac_tc.c96 u32 off, data, mask, real_off, rem; in tc_fill_entry() local
122 rem = off % 4; in tc_fill_entry()
128 if (rem) { in tc_fill_entry()
136 entry->val.match_en = (mask << (rem * 8)) & in tc_fill_entry()
137 GENMASK(31, rem * 8); in tc_fill_entry()
138 entry->val.match_data = (data << (rem * 8)) & in tc_fill_entry()
139 GENMASK(31, rem * 8); in tc_fill_entry()
143 frag->val.match_en = (mask >> (rem * 8)) & in tc_fill_entry()
144 GENMASK(rem * 8 - 1, 0); in tc_fill_entry()
145 frag->val.match_data = (data >> (rem * 8)) & in tc_fill_entry()
[all …]
/drivers/clk/hisilicon/
Dclk-hi3559a.c355 u64 rem; in hi3559av100_calc_pll() local
363 rem = do_div(rate, 1000000); in hi3559av100_calc_pll()
364 rem = do_div(rate, PLL_MASK_WIDTH); in hi3559av100_calc_pll()
367 rem = rem * (1 << PLL_MASK_WIDTH); in hi3559av100_calc_pll()
368 do_div(rem, PLL_MASK_WIDTH); in hi3559av100_calc_pll()
369 *frac_val = rem; in hi3559av100_calc_pll()
/drivers/iio/afe/
Diio-rescale.c27 s32 rem, rem2; in rescale_process_scale() local
56 tmp = div_s64_rem(tmp, 1000000000LL, &rem); in rescale_process_scale()
59 if (!rem) in rescale_process_scale()
70 *val2 = rem / (int)tmp; in rescale_process_scale()
87 *val = div_s64_rem(tmp, abs(rescale->denominator), &rem); in rescale_process_scale()
89 tmp = (s64)rem * mult + (s64)abs(*val2) * abs(rescale->numerator); in rescale_process_scale()
/drivers/net/ethernet/microchip/lan966x/
Dlan966x_taprio.c396 u32 rem = 0; in lan966x_taprio_new_base_time() local
399 div_u64_rem(tmp, cycle_time, &rem); in lan966x_taprio_new_base_time()
400 rem = cycle_time - rem; in lan966x_taprio_new_base_time()
401 *new_base_time = threshold_time + rem; in lan966x_taprio_new_base_time()

1234567