/drivers/gpu/drm/nouveau/nvkm/falcon/ |
D | v1.c | 32 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_emem() local 74 size -= rem; in nvkm_falcon_v1_load_emem() 84 if (rem) { in nvkm_falcon_v1_load_emem() 88 extra & (BIT(rem * 8) - 1)); in nvkm_falcon_v1_load_emem() 97 u8 rem = size % 4; in nvkm_falcon_v1_load_dmem() local 105 size -= rem; in nvkm_falcon_v1_load_dmem() [all …]
|
/drivers/gpu/drm/msm/ |
D | msm_perf.c | 63 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/ |
D | ssh_parser.c | 69 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/ |
D | dma-ring.c | 171 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()
|
D | hw-txe.c | 702 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(®, (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, ®, rem); in mei_txe_read()
|
/drivers/net/ethernet/rocker/ |
D | rocker_tlv.h | 45 #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)
|
D | rocker_tlv.c | 20 int rem; in rocker_tlv_parse() local 24 rocker_tlv_for_each(tlv, head, buf_len, rem) { in rocker_tlv_parse()
|
/drivers/iio/common/hid-sensors/ |
D | hid-sensor-attributes.c | 74 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/scsi/esas2r/ |
D | esas2r_io.c | 194 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/tty/serial/8250/ |
D | 8250_dwlib.c | 63 unsigned int quot, rem, base_baud = baud * 16; in dw8250_get_divisor() local 67 rem = p->uartclk % base_baud; in dw8250_get_divisor() 68 *frac = DIV_ROUND_CLOSEST(rem << d->dlf_size, base_baud); in dw8250_get_divisor()
|
/drivers/media/test-drivers/vidtv/ |
D | vidtv_ts.c | 24 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/char/agp/ |
D | isoch.c | 88 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/tuners/ |
D | mt2060.c | 86 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/mmc/core/ |
D | core.c | 1714 unsigned int from_new = *from, nr_new = nr, rem; in mmc_align_erase_size() local 1724 rem = from_new - temp; in mmc_align_erase_size() 1726 if (nr_new > rem) in mmc_align_erase_size() 1727 nr_new -= rem; in mmc_align_erase_size() 1733 rem = from_new % card->erase_size; in mmc_align_erase_size() 1734 if (rem) { in mmc_align_erase_size() 1735 rem = card->erase_size - rem; in mmc_align_erase_size() 1736 from_new += rem; in mmc_align_erase_size() 1737 if (nr_new > rem) in mmc_align_erase_size() 1738 nr_new -= rem; in mmc_align_erase_size() [all …]
|
/drivers/gpu/drm/i915/gt/ |
D | gen8_ppgtt.c | 466 unsigned int rem = sg_dma_len(iter->sg); in gen8_ppgtt_insert_huge() local 484 rem >= I915_GTT_PAGE_SIZE_2M && in gen8_ppgtt_insert_huge() 501 (IS_ALIGNED(rem, I915_GTT_PAGE_SIZE_64K) || in gen8_ppgtt_insert_huge() 502 rem >= (I915_PDES - index) * I915_GTT_PAGE_SIZE)) in gen8_ppgtt_insert_huge() 514 rem -= page_size; in gen8_ppgtt_insert_huge() 520 rem = sg_dma_len(iter->sg); in gen8_ppgtt_insert_huge() 521 if (!rem) in gen8_ppgtt_insert_huge() 525 iter->max = iter->dma + rem; in gen8_ppgtt_insert_huge() 529 (IS_ALIGNED(rem, I915_GTT_PAGE_SIZE_64K) || in gen8_ppgtt_insert_huge() 530 rem >= (I915_PDES - index) * I915_GTT_PAGE_SIZE))) in gen8_ppgtt_insert_huge() [all …]
|
/drivers/net/ethernet/stmicro/stmmac/ |
D | stmmac_tc.c | 96 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/gpu/drm/ |
D | drm_mm.c | 572 u64 rem; in drm_mm_insert_node_in_range() local 575 rem = adj_start & remainder_mask; in drm_mm_insert_node_in_range() 577 div64_u64_rem(adj_start, alignment, &rem); in drm_mm_insert_node_in_range() 578 if (rem) { in drm_mm_insert_node_in_range() 579 adj_start -= rem; in drm_mm_insert_node_in_range() 824 u64 rem; in drm_mm_scan_add_block() local 827 rem = adj_start & scan->remainder_mask; in drm_mm_scan_add_block() 829 div64_u64_rem(adj_start, scan->alignment, &rem); in drm_mm_scan_add_block() 830 if (rem) { in drm_mm_scan_add_block() 831 adj_start -= rem; in drm_mm_scan_add_block()
|
/drivers/media/i2c/cx25840/ |
D | cx25840-ir.c | 229 u32 rem; in pulse_width_count_to_ns() local 236 rem = do_div(n, CX25840_IR_REFCLK_FREQ / 1000000); /* / MHz => ns */ in pulse_width_count_to_ns() 237 if (rem >= CX25840_IR_REFCLK_FREQ / 1000000 / 2) in pulse_width_count_to_ns() 248 u32 rem; 256 rem = do_div(n, d); 257 if (rem >= d / 2) 271 u32 rem; in pulse_width_count_to_us() local 278 rem = do_div(n, CX25840_IR_REFCLK_FREQ / 1000000); /* / MHz => us */ in pulse_width_count_to_us() 279 if (rem >= CX25840_IR_REFCLK_FREQ / 1000000 / 2) in pulse_width_count_to_us() 295 u32 rem; in ns_to_pulse_clocks() local [all …]
|
/drivers/iio/adc/ |
D | stm32-dfsdm-core.c | 220 unsigned int spi_freq, rem; in stm32_dfsdm_parse_of() local 261 divider = div_u64_rem(clk_freq, spi_freq, &rem); in stm32_dfsdm_parse_of() 263 if (rem) in stm32_dfsdm_parse_of() 276 if (rem) { in stm32_dfsdm_parse_of() 279 clk_freq, spi_freq, priv->spi_clk_out_div + 1, rem); in stm32_dfsdm_parse_of()
|
/drivers/block/drbd/ |
D | drbd_nla.c | 11 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/ |
D | fintek-cir.c | 285 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/ |
D | ixgbe_ptp.c | 161 u32 esdp, tsauxc, clktiml, clktimh, trgttiml, trgttimh, rem; in ixgbe_ptp_setup_sdp_X540() local 201 div_u64_rem(ns, NS_PER_SEC, &rem); in ixgbe_ptp_setup_sdp_X540() 206 rem = (NS_PER_SEC - rem); in ixgbe_ptp_setup_sdp_X540() 209 clock_edge += div_u64(((u64)rem << cc->shift), cc->mult); in ixgbe_ptp_setup_sdp_X540() 238 u32 esdp, tsauxc, freqout, trgttiml, trgttimh, rem, tssdp; in ixgbe_ptp_setup_sdp_X550() local 284 div_u64_rem(ns, NS_PER_SEC, &rem); in ixgbe_ptp_setup_sdp_X550() 289 rem = (NS_PER_SEC - rem); in ixgbe_ptp_setup_sdp_X550() 292 clock_edge += div_u64(((u64)rem << cc->shift), cc->mult); in ixgbe_ptp_setup_sdp_X550()
|
/drivers/clk/hisilicon/ |
D | clk-hi3559a.c | 355 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/gpu/drm/i915/gem/selftests/ |
D | huge_pages.c | 32 u64 rem) in get_largest_page_size() argument 39 if (HAS_PAGE_SIZES(i915, page_size) && rem >= page_size) in get_largest_page_size() 66 u64 rem; in get_huge_pages() local 77 rem = obj->base.size; in get_huge_pages() 104 rem -= page_size; in get_huge_pages() 105 if (!rem) { in get_huge_pages() 111 } while ((rem - ((page_size-1) & page_mask)) >= page_size); in get_huge_pages() 190 u64 rem; in fake_get_huge_pages() local 202 rem = obj->base.size; in fake_get_huge_pages() 207 unsigned int page_size = get_largest_page_size(i915, rem); in fake_get_huge_pages() [all …]
|
/drivers/rtc/ |
D | rtc-sc27xx.c | 228 int ret, rem; in sprd_rtc_set_secs() local 231 day = div_s64_rem(secs, 86400, &rem); in sprd_rtc_set_secs() 232 hour = rem / 3600; in sprd_rtc_set_secs() 233 rem -= hour * 3600; in sprd_rtc_set_secs() 234 min = rem / 60; in sprd_rtc_set_secs() 235 sec = rem - min * 60; in sprd_rtc_set_secs()
|