Home
last modified time | relevance | path

Searched refs:DIV_ROUND_UP (Results 1 – 200 of 712) sorted by relevance

1234

/linux-4.4.14/include/linux/mfd/syscon/
Datmel-smc.h87 u32 clk_period = DIV_ROUND_UP(NSEC_PER_SEC, clk_rate); in at91sam9_smc_setup_ns_to_cycles()
91 cycles = DIV_ROUND_UP(timing_ns, clk_period); in at91sam9_smc_setup_ns_to_cycles()
117 u32 clk_period = DIV_ROUND_UP(NSEC_PER_SEC, clk_rate); in at91sam9_smc_pulse_ns_to_cycles()
121 cycles = DIV_ROUND_UP(timing_ns, clk_period); in at91sam9_smc_pulse_ns_to_cycles()
147 u32 clk_period = DIV_ROUND_UP(NSEC_PER_SEC, clk_rate); in at91sam9_smc_cycle_ns_to_cycles()
151 cycles = DIV_ROUND_UP(timing_ns, clk_period); in at91sam9_smc_cycle_ns_to_cycles()
/linux-4.4.14/drivers/media/i2c/
Dsmiapp-pll.c206 DIV_ROUND_UP(limits->max_pll_multiplier, mul)); in __smiapp_pll_calculate()
211 more_mul_min = DIV_ROUND_UP(limits->min_pll_op_freq_hz, in __smiapp_pll_calculate()
218 DIV_ROUND_UP(limits->min_pll_multiplier, mul)); in __smiapp_pll_calculate()
294 min_vt_div = DIV_ROUND_UP(op_pll->pix_clk_div * op_pll->sys_clk_div in __smiapp_pll_calculate()
302 DIV_ROUND_UP(pll->pll_op_clk_freq_hz, in __smiapp_pll_calculate()
314 DIV_ROUND_UP(pll->pll_op_clk_freq_hz, in __smiapp_pll_calculate()
326 DIV_ROUND_UP(min_vt_div, in __smiapp_pll_calculate()
339 DIV_ROUND_UP(max_vt_div, in __smiapp_pll_calculate()
343 DIV_ROUND_UP(pll->pll_op_clk_freq_hz, in __smiapp_pll_calculate()
357 uint16_t pix_div = DIV_ROUND_UP(vt_div, sys_div); in __smiapp_pll_calculate()
[all …]
Daptina-pll.c69 mf_min = DIV_ROUND_UP(limits->m_min, pll->m); in aptina_pll_calculate()
76 mf_max = min(mf_max, DIV_ROUND_UP(limits->n_max * limits->p1_max, div)); in aptina_pll_calculate()
141 p1_min = max(limits->p1_min, DIV_ROUND_UP(limits->out_clock_min * div, in aptina_pll_calculate()
151 mf_low = roundup(max(mf_min, DIV_ROUND_UP(pll->ext_clock * p1, in aptina_pll_calculate()
/linux-4.4.14/tools/include/linux/
Dbitops.h17 #define BITS_TO_LONGS(nr) DIV_ROUND_UP(nr, BITS_PER_BYTE * sizeof(long))
18 #define BITS_TO_U64(nr) DIV_ROUND_UP(nr, BITS_PER_BYTE * sizeof(u64))
19 #define BITS_TO_U32(nr) DIV_ROUND_UP(nr, BITS_PER_BYTE * sizeof(u32))
20 #define BITS_TO_BYTES(nr) DIV_ROUND_UP(nr, BITS_PER_BYTE)
Dkernel.h9 #define DIV_ROUND_UP(n,d) (((n) + (d) - 1) / (d)) macro
/linux-4.4.14/drivers/ssb/
Ddriver_extif.c94 tmp = DIV_ROUND_UP(10, ns) << SSB_PROG_WCNT_3_SHIFT; in ssb_extif_timing_init()
95 tmp |= DIV_ROUND_UP(40, ns) << SSB_PROG_WCNT_1_SHIFT; in ssb_extif_timing_init()
96 tmp |= DIV_ROUND_UP(120, ns); in ssb_extif_timing_init()
100 tmp = DIV_ROUND_UP(10, ns) << SSB_PROG_WCNT_3_SHIFT; in ssb_extif_timing_init()
101 tmp |= DIV_ROUND_UP(20, ns) << SSB_PROG_WCNT_2_SHIFT; in ssb_extif_timing_init()
102 tmp |= DIV_ROUND_UP(100, ns) << SSB_PROG_WCNT_1_SHIFT; in ssb_extif_timing_init()
103 tmp |= DIV_ROUND_UP(120, ns); in ssb_extif_timing_init()
Ddriver_chipcommon.c443 tmp = DIV_ROUND_UP(10, ns) << SSB_PROG_WCNT_3_SHIFT; /* Waitcount-3 = 10ns */ in ssb_chipco_timing_init()
444 tmp |= DIV_ROUND_UP(40, ns) << SSB_PROG_WCNT_1_SHIFT; /* Waitcount-1 = 40ns */ in ssb_chipco_timing_init()
445 tmp |= DIV_ROUND_UP(240, ns); /* Waitcount-0 = 240ns */ in ssb_chipco_timing_init()
449 tmp = DIV_ROUND_UP(10, ns) << SSB_FLASH_WCNT_3_SHIFT; /* Waitcount-3 = 10nS */ in ssb_chipco_timing_init()
450 tmp |= DIV_ROUND_UP(10, ns) << SSB_FLASH_WCNT_1_SHIFT; /* Waitcount-1 = 10nS */ in ssb_chipco_timing_init()
451 tmp |= DIV_ROUND_UP(120, ns); /* Waitcount-0 = 120nS */ in ssb_chipco_timing_init()
462 tmp = DIV_ROUND_UP(10, ns) << SSB_PROG_WCNT_3_SHIFT; /* Waitcount-3 = 10ns */ in ssb_chipco_timing_init()
463 tmp |= DIV_ROUND_UP(20, ns) << SSB_PROG_WCNT_2_SHIFT; /* Waitcount-2 = 20ns */ in ssb_chipco_timing_init()
464 tmp |= DIV_ROUND_UP(100, ns) << SSB_PROG_WCNT_1_SHIFT; /* Waitcount-1 = 100ns */ in ssb_chipco_timing_init()
465 tmp |= DIV_ROUND_UP(120, ns); /* Waitcount-0 = 120ns */ in ssb_chipco_timing_init()
/linux-4.4.14/drivers/ide/
Dpalm_bk3710.c85 t0 = DIV_ROUND_UP(palm_bk3710_udmatimings[mode].cycletime, in palm_bk3710_setudmamode()
87 tenv = DIV_ROUND_UP(20, ideclk_period) - 1; in palm_bk3710_setudmamode()
88 trp = DIV_ROUND_UP(palm_bk3710_udmatimings[mode].rptime, in palm_bk3710_setudmamode()
125 t0 = DIV_ROUND_UP(cycletime, ideclk_period); in palm_bk3710_setdmamode()
126 td = DIV_ROUND_UP(t->active, ideclk_period); in palm_bk3710_setdmamode()
154 t0 = DIV_ROUND_UP(cycletime, ideclk_period); in palm_bk3710_setpiomode()
155 t2 = DIV_ROUND_UP(t->active, ideclk_period); in palm_bk3710_setpiomode()
176 t0 = DIV_ROUND_UP(t->cyc8b, ideclk_period); in palm_bk3710_setpiomode()
177 t2 = DIV_ROUND_UP(t->act8b, ideclk_period); in palm_bk3710_setpiomode()
Dtx4938ide.c35 wt = DIV_ROUND_UP(t->act8b, cycle) - 2; in tx4938ide_tune_ebusc()
37 wt = max_t(int, wt, DIV_ROUND_UP(35, cycle)); in tx4938ide_tune_ebusc()
43 shwt = DIV_ROUND_UP(t->setup, cycle); in tx4938ide_tune_ebusc()
Dcmd640.c536 cycle_count = DIV_ROUND_UP(cycle_time, clock_time); in cmd640_set_mode()
538 setup_count = DIV_ROUND_UP(setup_time, clock_time); in cmd640_set_mode()
540 active_count = DIV_ROUND_UP(active_time, clock_time); in cmd640_set_mode()
544 recovery_count = DIV_ROUND_UP(recovery_time, clock_time); in cmd640_set_mode()
/linux-4.4.14/drivers/irqchip/
Dirq-gic.c75 u32 saved_spi_enable[DIV_ROUND_UP(1020, 32)];
76 u32 saved_spi_active[DIV_ROUND_UP(1020, 32)];
77 u32 saved_spi_conf[DIV_ROUND_UP(1020, 16)];
78 u32 saved_spi_target[DIV_ROUND_UP(1020, 4)];
568 for (i = 0; i < DIV_ROUND_UP(gic_irqs, 16); i++) in gic_dist_save()
572 for (i = 0; i < DIV_ROUND_UP(gic_irqs, 4); i++) in gic_dist_save()
576 for (i = 0; i < DIV_ROUND_UP(gic_irqs, 32); i++) in gic_dist_save()
580 for (i = 0; i < DIV_ROUND_UP(gic_irqs, 32); i++) in gic_dist_save()
609 for (i = 0; i < DIV_ROUND_UP(gic_irqs, 16); i++) in gic_dist_restore()
613 for (i = 0; i < DIV_ROUND_UP(gic_irqs, 4); i++) in gic_dist_restore()
[all …]
Dirq-dw-apb-ictl.c139 for (i = 0; i < DIV_ROUND_UP(nrirqs, 32); i++) { in dw_apb_ictl_init()
Dirq-atmel-aic-common.c227 nchips = DIV_ROUND_UP(nirqs, 32); in aic_common_of_init()
/linux-4.4.14/drivers/gpu/drm/i915/
Dintel_dsi_panel_vbt.c444 pclk += DIV_ROUND_UP(mode->vtotal * in vbt_panel_init()
465 burst_mode_ratio = DIV_ROUND_UP( in vbt_panel_init()
469 pclk = DIV_ROUND_UP(pclk * burst_mode_ratio, 100); in vbt_panel_init()
528 intel_dsi->lp_byte_clk = DIV_ROUND_UP(tlpx_ns * ui_den, 8 * ui_num); in vbt_panel_init()
539 prepare_cnt = DIV_ROUND_UP(ths_prepare_ns * ui_den, ui_num * 2); in vbt_panel_init()
542 exit_zero_cnt = DIV_ROUND_UP( in vbt_panel_init()
558 clk_zero_cnt = DIV_ROUND_UP( in vbt_panel_init()
564 trail_cnt = DIV_ROUND_UP(tclk_trail_ns * ui_den, 2 * ui_num); in vbt_panel_init()
598 tlpx_ui = DIV_ROUND_UP(tlpx_ns * ui_den, ui_num); in vbt_panel_init()
603 lp_to_hs_switch = DIV_ROUND_UP(4 * tlpx_ui + prepare_cnt * 2 + in vbt_panel_init()
[all …]
Dintel_dsi_pll.c101 hsync_bytes = DIV_ROUND_UP(hsync * bpp, 8); in dsi_rr_formula()
102 hbp_bytes = DIV_ROUND_UP(hbp * bpp, 8); in dsi_rr_formula()
103 hactive_bytes = DIV_ROUND_UP(hactive * bpp, 8); in dsi_rr_formula()
104 hfp_bytes = DIV_ROUND_UP(hfp * bpp, 8); in dsi_rr_formula()
487 dsi_ratio = DIV_ROUND_UP(dsi_clk * 2, BXT_REF_CLOCK_KHZ); in bxt_configure_dsi_pll()
Dintel_pm.c571 entries_required = DIV_ROUND_UP(entries_required, wm->cacheline_size); in intel_calculate_wm()
713 entries = DIV_ROUND_UP(entries, display->cacheline_size); in g4x_compute_wm0()
725 entries = DIV_ROUND_UP(entries, cursor->cacheline_size); in g4x_compute_wm0()
803 entries = DIV_ROUND_UP(min(small, large), display->cacheline_size); in g4x_compute_srwm()
808 entries = DIV_ROUND_UP(entries, cursor->cacheline_size); in g4x_compute_srwm()
906 ret = DIV_ROUND_UP(ret, 64); in vlv_wm_method2()
1007 fifo_extra = DIV_ROUND_UP(fifo_left, wm_state->num_active_planes ?: 1); in vlv_compute_fifo()
1441 entries = DIV_ROUND_UP(entries, I915_FIFO_LINE_SIZE); in i965_update_wm()
1451 entries = DIV_ROUND_UP(entries, in i965_update_wm()
1588 entries = DIV_ROUND_UP(entries, wm_info->cacheline_size); in i9xx_update_wm()
[all …]
/linux-4.4.14/drivers/pwm/
Dpwm-img.c103 output_clk_hz = DIV_ROUND_UP(NSEC_PER_SEC, period_ns); in img_pwm_config()
105 mul = DIV_ROUND_UP(input_clk_hz, output_clk_hz); in img_pwm_config()
108 timebase = DIV_ROUND_UP(mul, 1); in img_pwm_config()
111 timebase = DIV_ROUND_UP(mul, 8); in img_pwm_config()
114 timebase = DIV_ROUND_UP(mul, 64); in img_pwm_config()
117 timebase = DIV_ROUND_UP(mul, 512); in img_pwm_config()
124 duty = DIV_ROUND_UP(timebase * duty_ns, period_ns); in img_pwm_config()
/linux-4.4.14/arch/unicore32/mm/
Dinit.c401 DIV_ROUND_UP(PAGE_SIZE, SZ_1K), in mem_init()
403 DIV_ROUND_UP((VMALLOC_END - VMALLOC_START), SZ_1M), in mem_init()
405 DIV_ROUND_UP(((unsigned long)high_memory - PAGE_OFFSET), SZ_1M), in mem_init()
407 DIV_ROUND_UP((MODULES_END - MODULES_VADDR), SZ_1M), in mem_init()
410 DIV_ROUND_UP((__init_end - __init_begin), SZ_1K), in mem_init()
412 DIV_ROUND_UP((_etext - _stext), SZ_1K), in mem_init()
414 DIV_ROUND_UP((_edata - _sdata), SZ_1K)); in mem_init()
/linux-4.4.14/drivers/media/platform/s5p-mfc/
Dregs-mfc-v8.h112 ((DIV_ROUND_UP((mbw * 16), 64) * DIV_ROUND_UP((mbh * 16), 64) * 256) \
113 + (DIV_ROUND_UP((mbw) * (mbh), 32) * 16))
Ds5p_mfc_opr_v6.h23 #define MB_WIDTH(x_size) DIV_ROUND_UP(x_size, 16)
24 #define MB_HEIGHT(y_size) DIV_ROUND_UP(y_size, 16)
Dregs-mfc-v6.h382 (((((imw + 127) / 64) * 16) * DIV_ROUND_UP(imh, 64) * 256) + \
383 (DIV_ROUND_UP((mbw) * (mbh), 32) * 16))
/linux-4.4.14/drivers/memory/
Demif.c439 val = max(min_tck->tWTR, DIV_ROUND_UP(timings->tWTR, t_ck)) - 1; in get_sdram_tim_1_shdw()
443 val = DIV_ROUND_UP(timings->tFAW, t_ck*4); in get_sdram_tim_1_shdw()
445 val = max(min_tck->tRRD, DIV_ROUND_UP(timings->tRRD, t_ck)); in get_sdram_tim_1_shdw()
448 val = DIV_ROUND_UP(timings->tRAS_min + timings->tRPab, t_ck) - 1; in get_sdram_tim_1_shdw()
451 val = max(min_tck->tRASmin, DIV_ROUND_UP(timings->tRAS_min, t_ck)); in get_sdram_tim_1_shdw()
454 val = max(min_tck->tWR, DIV_ROUND_UP(timings->tWR, t_ck)) - 1; in get_sdram_tim_1_shdw()
457 val = max(min_tck->tRCD, DIV_ROUND_UP(timings->tRCD, t_ck)) - 1; in get_sdram_tim_1_shdw()
460 val = max(min_tck->tRPab, DIV_ROUND_UP(timings->tRPab, t_ck)) - 1; in get_sdram_tim_1_shdw()
472 val = max(min_tck->tWTR, DIV_ROUND_UP(timings->tWTR, t_ck)) - 1; in get_sdram_tim_1_shdw_derated()
480 val = DIV_ROUND_UP(timings->tFAW + 7500, 4 * t_ck) - 1; in get_sdram_tim_1_shdw_derated()
[all …]
/linux-4.4.14/include/uapi/linux/
Dmroute6.h50 #if !defined(DIV_ROUND_UP)
51 #define DIV_ROUND_UP(x,y) (((x) + ((y) - 1)) / (y)) macro
56 if_mask ifs_bits[DIV_ROUND_UP(IF_SETSIZE, NIFBITS)];
/linux-4.4.14/kernel/rcu/
Dtree.h76 # define NUM_RCU_LVL_1 DIV_ROUND_UP(NR_CPUS, RCU_FANOUT_1)
85 # define NUM_RCU_LVL_1 DIV_ROUND_UP(NR_CPUS, RCU_FANOUT_2)
86 # define NUM_RCU_LVL_2 DIV_ROUND_UP(NR_CPUS, RCU_FANOUT_1)
95 # define NUM_RCU_LVL_1 DIV_ROUND_UP(NR_CPUS, RCU_FANOUT_3)
96 # define NUM_RCU_LVL_2 DIV_ROUND_UP(NR_CPUS, RCU_FANOUT_2)
97 # define NUM_RCU_LVL_3 DIV_ROUND_UP(NR_CPUS, RCU_FANOUT_1)
/linux-4.4.14/drivers/clk/sunxi/
Dclk-sun9i-core.c43 n = DIV_ROUND_UP(*freq, 6000000); in sun9i_a80_get_pll4_factors()
122 div = DIV_ROUND_UP(parent_rate, *freq); in sun9i_a80_get_gt_factors()
187 _p = order_base_2(DIV_ROUND_UP(parent_rate, *freq)); in sun9i_a80_get_ahb_factors()
274 div = DIV_ROUND_UP(parent_rate, *freq); in sun9i_a80_get_apb1_factors()
Dclk-sunxi.c95 div = DIV_ROUND_UP(parent_rate, rate); in sun6i_ahb1_clk_round()
108 calcm = DIV_ROUND_UP(div, 1 << calcp); in sun6i_ahb1_clk_round()
455 *n = DIV_ROUND_UP(div, (*k+1)); in sun4i_get_pll5_factors()
482 *n = DIV_ROUND_UP(div, (*k+1)) - 1; in sun6i_a31_get_pll6_factors()
509 div = order_base_2(DIV_ROUND_UP(parent_rate, *freq)); in sun5i_a13_get_ahb_factors()
538 parent_rate = DIV_ROUND_UP(parent_rate, *freq); in sun4i_get_apb1_factors()
584 div = DIV_ROUND_UP(parent_rate, *freq); in sun7i_a20_get_out_factors()
595 calcm = DIV_ROUND_UP(div, 1 << calcp); in sun7i_a20_get_out_factors()
Dclk-sun8i-mbus.c41 div = DIV_ROUND_UP(parent_rate, *freq); in sun8i_a23_get_mbus_factors()
Dclk-mod0.c41 div = DIV_ROUND_UP(parent_rate, *freq); in sun4i_a10_get_mod0_factors()
52 calcm = DIV_ROUND_UP(div, 1 << calcp); in sun4i_a10_get_mod0_factors()
Dclk-sun6i-ar100.c65 div = DIV_ROUND_UP(parent_rate, req->rate); in ar100_determine_rate()
Dclk-sun9i-mmc.c109 count = DIV_ROUND_UP((r->end - r->start + 1), SUN9I_MMC_WIDTH); in sun9i_a80_mmc_config_clk_probe()
/linux-4.4.14/arch/arm/mach-omap2/
Domap_twl.c59 return DIV_ROUND_UP(uv - 600000, 12500); in twl4030_uv_to_vsel()
130 return DIV_ROUND_UP(uv - 709000, 12660) + 1; in twl6030_uv_to_vsel()
132 return DIV_ROUND_UP(uv - 607700, 12660) + 1; in twl6030_uv_to_vsel()
/linux-4.4.14/drivers/gpu/drm/vmwgfx/device_include/
Dsvga3d_surfacedefs.h39 #define DIV_ROUND_UP(x, y) (((x) + (y) - 1) / (y)) macro
990 block_size->width = DIV_ROUND_UP(pixel_size->width, in svga3dsurface_get_size_in_blocks()
992 block_size->height = DIV_ROUND_UP(pixel_size->height, in svga3dsurface_get_size_in_blocks()
994 block_size->depth = DIV_ROUND_UP(pixel_size->depth, in svga3dsurface_get_size_in_blocks()
1103 const u32 rowstride = DIV_ROUND_UP(width, bw) * desc->bytes_per_block; in svga3dsurface_get_pixel_offset()
1104 const u32 imgstride = DIV_ROUND_UP(height, bh) * rowstride; in svga3dsurface_get_pixel_offset()
/linux-4.4.14/drivers/video/fbdev/omap2/dss/
Dhdmi_pll.c58 n = DIV_ROUND_UP(clkin, hw->fint_max); in hdmi_pll_compute()
63 m2 = DIV_ROUND_UP(min_dco, target_bitclk); in hdmi_pll_compute()
84 sd = DIV_ROUND_UP(fint * m, 250000000); in hdmi_pll_compute()
Dpll.c143 m_start = max(DIV_ROUND_UP(clkdco, out_max), 1ul); in dss_pll_hsdiv_calc()
173 n_start = max(DIV_ROUND_UP(clkin, fint_hw_max), 1ul); in dss_pll_calc()
181 m_start = max(DIV_ROUND_UP(DIV_ROUND_UP(pll_min, fint), 2), in dss_pll_calc()
Ddsi.c1292 lp_clk_div = DIV_ROUND_UP(dsi_fclk, lp_clk_max * 2); in dsi_lp_clock_calc()
1392 cinfo->mX[HSDIV_DSI] = DIV_ROUND_UP(cinfo->clkdco, max_dsi_fck); in dsi_pll_calc_dsi_fck()
3508 width_bytes = DIV_ROUND_UP(timings->x_res * bpp, 8); in dsi_config_cmd_mode_interleaving()
3509 bllp = hbp + hfp + hsa + DIV_ROUND_UP(width_bytes + 6, ndl); in dsi_config_cmd_mode_interleaving()
3678 ths_eot = DIV_ROUND_UP(4, ndl); in dsi_proto_timings()
3680 ddr_clk_pre = DIV_ROUND_UP(tclk_pre + tlpx + tclk_zero + tclk_prepare, in dsi_proto_timings()
3682 ddr_clk_post = DIV_ROUND_UP(tclk_post + ths_trail, 4) + ths_eot; in dsi_proto_timings()
3696 enter_hs_mode_lat = 1 + DIV_ROUND_UP(tlpx, 4) + in dsi_proto_timings()
3697 DIV_ROUND_UP(ths_prepare, 4) + in dsi_proto_timings()
3698 DIV_ROUND_UP(ths_zero + 3, 4); in dsi_proto_timings()
[all …]
Ddss.c552 fckd_stop = max(DIV_ROUND_UP(prate * m, fck_hw_max), 1ul); in dss_div_calc()
555 fck = DIV_ROUND_UP(prate, fckd) * m; in dss_div_calc()
602 fck_div = DIV_ROUND_UP(prate * dss.feat->dss_fck_multiplier, in dss_setup_default_clock()
604 fck = DIV_ROUND_UP(prate, fck_div) * dss.feat->dss_fck_multiplier; in dss_setup_default_clock()
/linux-4.4.14/drivers/media/dvb-frontends/
Dhorus3a.c268 fc_lpf = (u8)DIV_ROUND_UP(symbol_rate * 47, 40000); in horus3a_set_params()
270 fc_lpf = (u8)DIV_ROUND_UP(symbol_rate * 27, 40000) + 5; in horus3a_set_params()
305 fc_lpf = (u8)DIV_ROUND_UP( in horus3a_set_params()
308 fc_lpf = (u8)DIV_ROUND_UP( in horus3a_set_params()
/linux-4.4.14/lib/mpi/
Dmpicoder.c55 nlimbs = DIV_ROUND_UP(nbytes, BYTES_PER_MPI_LIMB); in mpi_read_raw_data()
99 nbytes = DIV_ROUND_UP(nbits, 8); in mpi_read_from_buffer()
100 nlimbs = DIV_ROUND_UP(nbytes, BYTES_PER_MPI_LIMB); in mpi_read_from_buffer()
267 nlimbs = DIV_ROUND_UP(nbytes, BYTES_PER_MPI_LIMB); in mpi_set_buffer()
483 nlimbs = DIV_ROUND_UP(nbytes, BYTES_PER_MPI_LIMB); in mpi_read_raw_from_sgl()
/linux-4.4.14/arch/s390/kernel/
Dsuspend.c55 return DIV_ROUND_UP(pages, PAGE_KEY_DATA_SIZE); in page_key_additional_pages()
81 size = DIV_ROUND_UP(pages, PAGE_KEY_DATA_SIZE); in page_key_alloc()
Dperf_cpum_sf.c305 CPUM_SF_SDB_DIAG_FACTOR = DIV_ROUND_UP(si.dsdes, si.bsdes); in sfb_set_limits()
426 n_sdb = DIV_ROUND_UP(freq, factor * ((PAGE_SIZE-64) / sample_size)); in allocate_buffers()
455 return min_t(unsigned long, min, DIV_ROUND_UP(percent * base, 100)); in min_percent()
496 ratio = DIV_ROUND_UP(100 * OVERFLOW_REG(hwc) * cpuhw->sfb.num_sdb, in sfb_account_overflows()
1290 OVERFLOW_REG(hwc) = DIV_ROUND_UP(OVERFLOW_REG(hwc) + in hw_perf_event_update()
/linux-4.4.14/drivers/gpu/host1x/hw/
Dintr_hw.c50 for (i = 0; i < DIV_ROUND_UP(host->info->nb_pts, 32); i++) { in syncpt_thresh_isr()
67 for (i = 0; i < DIV_ROUND_UP(host->info->nb_pts, 32); ++i) { in _host1x_intr_disable_all_syncpt_intrs()
/linux-4.4.14/drivers/net/ethernet/stmicro/stmmac/
Dstmmac_mdio.c164 msleep(DIV_ROUND_UP(data->delays[0], 1000)); in stmmac_mdio_reset()
168 msleep(DIV_ROUND_UP(data->delays[1], 1000)); in stmmac_mdio_reset()
172 msleep(DIV_ROUND_UP(data->delays[2], 1000)); in stmmac_mdio_reset()
/linux-4.4.14/drivers/spi/
Dspi-orion.c142 spr = DIV_ROUND_UP(spr, speed); in orion_spi_baudrate_set()
166 rate = DIV_ROUND_UP(tclk_hz, speed); in orion_spi_baudrate_set()
564 DIV_ROUND_UP(tclk_hz, devdata->min_divisor)); in orion_spi_probe()
567 DIV_ROUND_UP(tclk_hz, devdata->min_divisor); in orion_spi_probe()
570 master->min_speed_hz = DIV_ROUND_UP(tclk_hz, devdata->max_divisor); in orion_spi_probe()
Dspi-bcm63xx-hsspi.c131 reg = DIV_ROUND_UP(2048, DIV_ROUND_UP(bs->speed_hz, hz)); in bcm63xx_hsspi_set_clk()
Dspi-txx9.c191 int n = DIV_ROUND_UP(c->baseclk, speed_hz) - 1; in txx9spi_work_one()
356 master->min_speed_hz = DIV_ROUND_UP(c->baseclk, SPI_MAX_DIVIDER + 1); in txx9spi_probe()
Dspi-efm32.c136 clkdiv = 64 * (DIV_ROUND_UP(2 * clkfreq, speed) - 4); in efm32_spi_setup_transfer()
197 t->len * DIV_ROUND_UP(t->bits_per_word, 8); in efm32_spi_txrx_bufs()
Dspi-xcomm.c82 divider = DIV_ROUND_UP(SPI_XCOMM_CLOCK, t->speed_hz); in spi_xcomm_setup_transfer()
/linux-4.4.14/drivers/gpu/drm/amd/amdgpu/
Damdgpu_pll.c55 tmp = DIV_ROUND_UP(nom_min, *nom); in amdgpu_pll_reduce_ratio()
62 tmp = DIV_ROUND_UP(den_min, *den); in amdgpu_pll_reduce_ratio()
226 unsigned tmp = DIV_ROUND_UP(fb_div_min, fb_div); in amdgpu_pll_compute()
/linux-4.4.14/drivers/i2c/busses/
Di2c-rk3x.c520 DIV_ROUND_UP((scl_rise_ns + spec_setup_start) * 1000, 875)); in rk3x_i2c_calc_divs()
522 DIV_ROUND_UP((scl_rise_ns + spec_setup_start + in rk3x_i2c_calc_divs()
530 clk_rate_khz = DIV_ROUND_UP(clk_rate, 1000); in rk3x_i2c_calc_divs()
537 min_total_div = DIV_ROUND_UP(clk_rate_khz, scl_rate_khz * 8); in rk3x_i2c_calc_divs()
540 min_low_div = DIV_ROUND_UP(clk_rate_khz * min_low_ns, 8 * 1000000); in rk3x_i2c_calc_divs()
541 min_high_div = DIV_ROUND_UP(clk_rate_khz * min_high_ns, 8 * 1000000); in rk3x_i2c_calc_divs()
576 ideal_low_div = DIV_ROUND_UP(clk_rate_khz * min_low_ns, in rk3x_i2c_calc_divs()
Di2c-mxs.c703 divider = DIV_ROUND_UP(clk, speed); in mxs_i2c_derive_timing()
745 leadin = DIV_ROUND_UP(600 * (clk / 1000000), 1000); in mxs_i2c_derive_timing()
746 bus_free = DIV_ROUND_UP(1300 * (clk / 1000000), 1000); in mxs_i2c_derive_timing()
751 leadin = DIV_ROUND_UP(4700 * (clk / 1000000), 1000); in mxs_i2c_derive_timing()
752 bus_free = DIV_ROUND_UP(4700 * (clk / 1000000), 1000); in mxs_i2c_derive_timing()
Di2c-nomadik.c382 slsu = DIV_ROUND_UP(100, ns); /* Fast */ in setup_i2c_controller()
385 slsu = DIV_ROUND_UP(10, ns); /* High */ in setup_i2c_controller()
389 slsu = DIV_ROUND_UP(250, ns); /* Standard */ in setup_i2c_controller()
/linux-4.4.14/fs/jfs/
Djfs_dtree.h77 #define NDTINTERNAL(klen) (DIV_ROUND_UP((4 + (klen)), 15))
136 #define NDTLEAF_LEGACY(klen) (DIV_ROUND_UP((2 + (klen)), 15))
/linux-4.4.14/drivers/scsi/snic/
Dvnic_wq.h69 DIV_ROUND_UP(entries, VNIC_WQ_BUF_DFLT_BLK_ENTRIES)
71 DIV_ROUND_UP(entries, VNIC_WQ_BUF_DFLT_BLK_ENTRIES)
/linux-4.4.14/drivers/clk/ti/
Ddivider.c116 return DIV_ROUND_UP(parent_rate, div); in ti_clk_divider_recalc_rate()
160 bestdiv = DIV_ROUND_UP(parent_rate, rate); in ti_clk_divider_bestdiv()
186 now = DIV_ROUND_UP(parent_rate, i); in ti_clk_divider_bestdiv()
209 return DIV_ROUND_UP(*prate, div); in ti_clk_divider_round_rate()
224 div = DIV_ROUND_UP(parent_rate, rate); in ti_clk_divider_set_rate()
Dfapll.c424 synth_post_div_m = DIV_ROUND_UP(frac_rate, rate); in ti_fapll_synth_round_rate()
425 r = DIV_ROUND_UP(frac_rate, synth_post_div_m); in ti_fapll_synth_round_rate()
459 post_div_m = DIV_ROUND_UP(frac_rate, rate); in ti_fapll_synth_set_rate()
461 post_rate = DIV_ROUND_UP(frac_rate, post_div_m); in ti_fapll_synth_set_rate()
/linux-4.4.14/drivers/firewire/
Dcore-card.c248 delayed ? DIV_ROUND_UP(HZ, 100) : 0)) in fw_schedule_bus_reset()
343 card->reset_jiffies + DIV_ROUND_UP(HZ, 8)); in bm_work()
410 fw_schedule_bm_work(card, DIV_ROUND_UP(HZ, 8)); in bm_work()
434 fw_schedule_bm_work(card, DIV_ROUND_UP(HZ, 8)); in bm_work()
542 DIV_ROUND_UP(DEFAULT_SPLIT_TIMEOUT * HZ, 8000); in fw_card_initialize()
/linux-4.4.14/drivers/net/wireless/ti/wlcore/
Dscan.c180 min_dwell_time_active = DIV_ROUND_UP(min_dwell_time_active, 1000); in wlcore_scan_get_channels()
181 max_dwell_time_active = DIV_ROUND_UP(max_dwell_time_active, 1000); in wlcore_scan_get_channels()
182 dwell_time_passive = DIV_ROUND_UP(dwell_time_passive, 1000); in wlcore_scan_get_channels()
183 dwell_time_dfs = DIV_ROUND_UP(dwell_time_dfs, 1000); in wlcore_scan_get_channels()
/linux-4.4.14/include/linux/
Diommu-helper.h31 return DIV_ROUND_UP(size, io_page_size); in iommu_num_pages()
Ddelay.h39 udelay(DIV_ROUND_UP(x, 1000)); in ndelay()
Dbitops.h13 #define BITS_TO_LONGS(nr) DIV_ROUND_UP(nr, BITS_PER_BYTE * sizeof(long))
/linux-4.4.14/arch/arm/mach-s3c24xx/
Dcpufreq-utils.c47 refresh = DIV_ROUND_UP(refresh, (1000 * 1000)); /* apply scale */ in s3c2410_cpufreq_setrefresh()
Diotiming-s3c2412.c70 return cyc_tns ? DIV_ROUND_UP(cyc_tns, clk_tns) : 0; in to_div()
278 refresh = DIV_ROUND_UP(refresh, (1000 * 1000)); /* apply scale */ in s3c2412_cpufreq_setrefresh()
/linux-4.4.14/drivers/base/regmap/
Dregcache-lzo.c112 DIV_ROUND_UP(map->cache_size_raw, in regcache_lzo_get_blkindex()
120 (DIV_ROUND_UP(map->cache_size_raw, in regcache_lzo_get_blkpos()
127 return DIV_ROUND_UP(map->cache_size_raw, in regcache_lzo_get_blksize()
/linux-4.4.14/drivers/mtd/nand/
Dpxa3xx_nand.c420 u32 tCH_min = DIV_ROUND_UP(t->tCH_min, 1000); in pxa3xx_nand_set_sdr_timing()
421 u32 tCS_min = DIV_ROUND_UP(t->tCS_min, 1000); in pxa3xx_nand_set_sdr_timing()
422 u32 tWH_min = DIV_ROUND_UP(t->tWH_min, 1000); in pxa3xx_nand_set_sdr_timing()
423 u32 tWP_min = DIV_ROUND_UP(t->tWC_min - t->tWH_min, 1000); in pxa3xx_nand_set_sdr_timing()
424 u32 tREH_min = DIV_ROUND_UP(t->tREH_min, 1000); in pxa3xx_nand_set_sdr_timing()
425 u32 tRP_min = DIV_ROUND_UP(t->tRC_min - t->tREH_min, 1000); in pxa3xx_nand_set_sdr_timing()
427 u32 tWHR_min = DIV_ROUND_UP(t->tWHR_min, 1000); in pxa3xx_nand_set_sdr_timing()
428 u32 tAR_min = DIV_ROUND_UP(t->tAR_min, 1000); in pxa3xx_nand_set_sdr_timing()
674 DIV_ROUND_UP(do_bytes, 4)); in handle_data_pio()
679 DIV_ROUND_UP(info->oob_size, 4)); in handle_data_pio()
[all …]
Dsunxi_nand.c852 u32 clk_cycles = DIV_ROUND_UP(duration, clk_period); in _sunxi_nand_lookup_timing()
912 min_clk_period = DIV_ROUND_UP(timings->tRR_min, 3); in sunxi_nand_chip_set_timings()
928 min_clk_period = DIV_ROUND_UP(timings->tRC_min, 2); in sunxi_nand_chip_set_timings()
932 min_clk_period = DIV_ROUND_UP(timings->tWC_min, 2); in sunxi_nand_chip_set_timings()
942 tADL = DIV_ROUND_UP(timings->tADL_min, min_clk_period) >> 3; in sunxi_nand_chip_set_timings()
948 tWHR = DIV_ROUND_UP(timings->tWHR_min, min_clk_period) >> 3; in sunxi_nand_chip_set_timings()
978 min_clk_period = DIV_ROUND_UP(min_clk_period, 1000); in sunxi_nand_chip_set_timings()
1062 ecc->bytes = DIV_ROUND_UP(ecc->strength * fls(8 * 1024), 8); in sunxi_nand_hw_common_ecc_ctrl_init()
Dtxx9ndfmc.c256 DIV_ROUND_UP((ns) * DIV_ROUND_UP(gbusclk, 1000), 1000000)
/linux-4.4.14/drivers/clk/
Dclk-clps711x.c67 f_pll = DIV_ROUND_UP(CLPS711X_OSC_FREQ * tmp, 2); in _clps711x_clk_init()
81 f_bus = DIV_ROUND_UP(f_cpu, 2); in _clps711x_clk_init()
Dclk-axi-clkgen.c157 d_min = max_t(unsigned long, DIV_ROUND_UP(fin, fpfd_max), 1); in axi_clkgen_calc_params()
160 m_min = max_t(unsigned long, DIV_ROUND_UP(fvco_min, fin) * d_min, 1); in axi_clkgen_calc_params()
164 _d_min = max(d_min, DIV_ROUND_UP(fin * m, fvco_max)); in axi_clkgen_calc_params()
Dclk-pwm.c83 pwm->period != DIV_ROUND_UP(NSEC_PER_SEC, clk_pwm->fixed_rate)) { in clk_pwm_probe()
/linux-4.4.14/arch/m68k/include/asm/
Ddelay.h117 #define ndelay(n) __delay(DIV_ROUND_UP((n) * ((((HZSCALE) >> 11) * (loops_per_jiffy >> 11)) >> 6), …
/linux-4.4.14/drivers/gpu/drm/vc4/
Dvc4_bo.c34 int min_pitch = DIV_ROUND_UP(args->width * args->bpp, 8); in vc4_dumb_create()
/linux-4.4.14/drivers/clk/mxs/
Dclk-ssp.c36 clock_rate = DIV_ROUND_UP(ssp_clk, rate * clock_divide); in mxs_ssp_set_clk_rate()
/linux-4.4.14/drivers/gpu/drm/nouveau/nvkm/subdev/fb/
Dnv25.c33 u32 tiles = DIV_ROUND_UP(size, 0x40); in nv25_fb_tile_comp()
Dnv35.c33 u32 tiles = DIV_ROUND_UP(size, 0x40); in nv35_fb_tile_comp()
Dnv36.c33 u32 tiles = DIV_ROUND_UP(size, 0x40); in nv36_fb_tile_comp()
Dnv40.c33 u32 tiles = DIV_ROUND_UP(size, 0x80); in nv40_fb_tile_comp()
Dnv20.c46 u32 tiles = DIV_ROUND_UP(size, 0x40); in nv20_fb_tile_comp()
Dnv30.c52 u32 tiles = DIV_ROUND_UP(size, 0x40); in nv30_fb_tile_comp()
/linux-4.4.14/drivers/gpu/drm/vgem/
Dvgem_drv.c101 num_pages = DIV_ROUND_UP(obj->base.size, PAGE_SIZE); in vgem_gem_fault()
177 uint64_t pitch = args->width * DIV_ROUND_UP(args->bpp, 8); in vgem_gem_dumb_create()
/linux-4.4.14/arch/arm/include/asm/
Dkprobes.h75 #define MAX_COPIED_INSN DIV_ROUND_UP(RELATIVEJUMP_SIZE, sizeof(kprobe_opcode_t))
/linux-4.4.14/drivers/watchdog/
Ds3c2410_wdt.c315 freq = DIV_ROUND_UP(freq, 128); in s3c2410wdt_set_heartbeat()
327 divisor = DIV_ROUND_UP(count, 0xffff); in s3c2410wdt_set_heartbeat()
336 __func__, timeout, divisor, count, DIV_ROUND_UP(count, divisor)); in s3c2410wdt_set_heartbeat()
338 count = DIV_ROUND_UP(count, divisor); in s3c2410wdt_set_heartbeat()
Dlpc18xx_wdt.c110 val = DIV_ROUND_UP(lpc18xx_wdt->wdt_dev.timeout * lpc18xx_wdt->clk_rate, in __lpc18xx_wdt_set_timeout()
254 lpc18xx_wdt->wdt_dev.min_timeout = DIV_ROUND_UP(LPC18XX_WDT_TC_MIN * in lpc18xx_wdt_probe()
Dintel-mid_wdt.c57 in_size = DIV_ROUND_UP(sizeof(ipc_wd_start), 4); in wdt_start()
Df71808e_wdt.c230 watchdog.timer_val = DIV_ROUND_UP(timeout, 60); in watchdog_set_timeout()
705 DIV_ROUND_UP(start_withtimeout, 60)); in watchdog_init()
/linux-4.4.14/fs/gfs2/
Dbmap.h42 tmp = DIV_ROUND_UP(tmp, sdp->sd_inptrs); in gfs2_write_calc_reserv()
Dxattr.c54 (sizeof(__be64) * DIV_ROUND_UP(dsize, jbsize)), 8); in ea_calc_size()
468 unsigned int nptrs = DIV_ROUND_UP(amount, sdp->sd_jbsize); in gfs2_iter_unstuffed()
685 ea->ea_num_ptrs = DIV_ROUND_UP(er->er_data_len, sdp->sd_jbsize); in ea_write()
812 blks += DIV_ROUND_UP(er.er_data_len, jbsize); in ea_init()
958 blks = 2 + DIV_ROUND_UP(es->es_er->er_data_len, in ea_set_simple()
1071 blks += DIV_ROUND_UP(er.er_data_len, GFS2_SB(&ip->i_inode)->sd_jbsize); in ea_set_i()
1246 unsigned int nptrs = DIV_ROUND_UP(amount, sdp->sd_jbsize); in ea_acl_chmod_unstuffed()
Dlog.c60 blks += DIV_ROUND_UP(nstruct - first, second); in gfs2_struct2blk()
453 reserved += DIV_ROUND_UP(mbuf, buf_limit(sdp)); in calc_reserved()
454 reserved += DIV_ROUND_UP(dbuf, databuf_limit(sdp)); in calc_reserved()
/linux-4.4.14/drivers/gpu/drm/armada/
Darmada_510.c68 div = DIV_ROUND_UP(ref, rate); in armada510_crtc_compute_clock()
/linux-4.4.14/drivers/acpi/
Dacpi_cmos_rtc.c46 for (i = 0; i < DIV_ROUND_UP(bits, 8); ++i, ++address, ++value) in acpi_cmos_rtc_space_handler()
/linux-4.4.14/drivers/infiniband/hw/cxgb4/
Dqp.c302 res_wr->len16_pkd = cpu_to_be32(DIV_ROUND_UP(wr_len, 16)); in create_qp()
520 *len16 = DIV_ROUND_UP(size, 16); in build_rdma_send()
563 *len16 = DIV_ROUND_UP(size, 16); in build_rdma_write()
593 *len16 = DIV_ROUND_UP(sizeof wqe->read, 16); in build_rdma_read()
607 *len16 = DIV_ROUND_UP(sizeof wqe->recv + in build_rdma_recv()
649 *len16 = DIV_ROUND_UP(sizeof(wqe->fr) + sizeof(*sglp), 16); in build_memreg()
671 *len16 = DIV_ROUND_UP(sizeof(wqe->fr) + sizeof(*imdp) in build_memreg()
682 *len16 = DIV_ROUND_UP(sizeof wqe->inv, 16); in build_inv_stag()
855 idx += DIV_ROUND_UP(len16*16, T4_EQ_ENTRY_SIZE); in c4iw_post_send()
926 idx += DIV_ROUND_UP(len16*16, T4_EQ_ENTRY_SIZE); in c4iw_post_receive()
[all …]
Dmem.c87 req->wr.wr_mid = cpu_to_be32(FW_WR_LEN16_V(DIV_ROUND_UP(wr_len, 16))); in _c4iw_write_mem_dma_aligned()
91 req->len16 = cpu_to_be32(DIV_ROUND_UP(wr_len-sizeof(req->wr), 16)); in _c4iw_write_mem_dma_aligned()
126 num_wqe = DIV_ROUND_UP(len, C4IW_MAX_INLINE_SIZE); in _c4iw_write_mem_inline()
151 FW_WR_LEN16_V(DIV_ROUND_UP(wr_len, 16))); in _c4iw_write_mem_inline()
155 DIV_ROUND_UP(copy_len, T4_ULPTX_MIN_IO))); in _c4iw_write_mem_inline()
156 req->len16 = cpu_to_be32(DIV_ROUND_UP(wr_len-sizeof(req->wr), in _c4iw_write_mem_inline()
/linux-4.4.14/drivers/gpu/drm/rcar-du/
Drcar_du_drv.h69 #define RCAR_DU_MAX_GROUPS DIV_ROUND_UP(RCAR_DU_MAX_CRTCS, 2)
/linux-4.4.14/lib/
Dkfifo.c207 ret = DIV_ROUND_UP(ret + len - l, esize); in kfifo_copy_from_user()
211 ret = DIV_ROUND_UP(ret, esize); in kfifo_copy_from_user()
267 ret = DIV_ROUND_UP(ret + len - l, esize); in kfifo_copy_to_user()
271 ret = DIV_ROUND_UP(ret, esize); in kfifo_copy_to_user()
Dbch.c87 #define BCH_ECC_WORDS(_p) DIV_ROUND_UP(GF_M(_p)*GF_T(_p), 32)
88 #define BCH_ECC_BYTES(_p) DIV_ROUND_UP(GF_M(_p)*GF_T(_p), 8)
1084 const int plen = DIV_ROUND_UP(bch->ecc_bits+1, 32); in build_mod8_tables()
1085 const int ecclen = DIV_ROUND_UP(bch->ecc_bits, 32); in build_mod8_tables()
1175 genpoly = bch_alloc(DIV_ROUND_UP(m*t+1, 32)*sizeof(*genpoly), &err); in compute_generator_polynomial()
1297 words = DIV_ROUND_UP(m*t, 32); in init_bch()
1298 bch->ecc_bytes = DIV_ROUND_UP(m*t, 8); in init_bch()
Diov_iter.c591 n = DIV_ROUND_UP(len, PAGE_SIZE); in iov_iter_get_pages()
636 n = DIV_ROUND_UP(len, PAGE_SIZE); in iov_iter_get_pages_alloc()
761 npages += DIV_ROUND_UP(p + v.iov_len, PAGE_SIZE) in iov_iter_npages()
771 npages += DIV_ROUND_UP(p + v.iov_len, PAGE_SIZE) in iov_iter_npages()
Ddigsig.c118 mlen = DIV_ROUND_UP(mblen, 8); in digsig_verify_rsa()
/linux-4.4.14/net/9p/
Dtrans_virtio.c343 nr_pages = DIV_ROUND_UP(n + *offs, PAGE_SIZE); in p9_get_mapped_pages()
364 nr_pages = DIV_ROUND_UP((unsigned long)p + len, PAGE_SIZE) - in p9_get_mapped_pages()
416 out_nr_pages = DIV_ROUND_UP(n + offs, PAGE_SIZE); in p9_virtio_zc_request()
427 in_nr_pages = DIV_ROUND_UP(n + offs, PAGE_SIZE); in p9_virtio_zc_request()
/linux-4.4.14/drivers/gpu/drm/gma500/
Doaktrail_hdmi.c180 np_min = DIV_ROUND_UP(oaktrail_hdmi_limit.vco.min, target * 10); in oaktrail_hdmi_find_dpll()
187 nr_min = DIV_ROUND_UP((refclk * 1000), (target * 10 * np_max)); in oaktrail_hdmi_find_dpll()
188 nr_max = DIV_ROUND_UP((refclk * 1000), (target * 10 * np_min)); in oaktrail_hdmi_find_dpll()
194 np = DIV_ROUND_UP((refclk * 1000), (target * 10 * nr_max)); in oaktrail_hdmi_find_dpll()
195 nr = DIV_ROUND_UP((refclk * 1000), (target * 10 * np)); in oaktrail_hdmi_find_dpll()
/linux-4.4.14/sound/firewire/
Dpackets-buffer.c42 pages = DIV_ROUND_UP(count, packets_per_page); in iso_packets_buffer_init()
Dlib.c181 port->len = DIV_ROUND_UP(len, 4) * 4; in snd_fw_async_midi_port_init()
Diso-resources.c59 s400_bytes = DIV_ROUND_UP(bytes, 1 << (speed - SCODE_400)); in packet_bandwidth()
/linux-4.4.14/drivers/staging/media/omap4iss/
Diss_csiphy.c208 csi2phy.ths_term = DIV_ROUND_UP(25 * csi2_ddrclk_khz, 2000000) - 1; in omap4iss_csiphy_config()
209 csi2phy.ths_settle = DIV_ROUND_UP(90 * csi2_ddrclk_khz, 1000000) + 3; in omap4iss_csiphy_config()
/linux-4.4.14/drivers/mmc/host/
Ddw_mmc-rockchip.c84 #define TUNING_ITERATION_TO_PHASE(i) (DIV_ROUND_UP((i) * 360, NUM_PHASES))
138 i += DIV_ROUND_UP(20 * NUM_PHASES, 360); in dw_mci_rk3288_execute_tuning()
/linux-4.4.14/drivers/gpu/drm/radeon/
Drv770_dma.c58 num_loops = DIV_ROUND_UP(size_in_dw, 0xFFFF); in rv770_copy_dma()
Devergreen_dma.c124 num_loops = DIV_ROUND_UP(size_in_dw, 0xfffff); in evergreen_copy_dma()
/linux-4.4.14/drivers/video/console/
Dbitblit.c29 int width = DIV_ROUND_UP(vc->vc_font.width, 8); in update_attr()
148 u32 width = DIV_ROUND_UP(vc->vc_font.width, 8); in bit_putcs()
177 pitch = DIV_ROUND_UP(image.width, 8) + scan_align; in bit_putcs()
242 int w = DIV_ROUND_UP(vc->vc_font.width, 8), c; in bit_cursor()
/linux-4.4.14/drivers/tty/serial/8250/
D8250_mtk.c78 quot = DIV_ROUND_UP(port->uartclk, 4 * baud); in mtk8250_set_termios()
85 quot = DIV_ROUND_UP(port->uartclk, 256 * baud); in mtk8250_set_termios()
D8250_lpc18xx.c69 rs485_dly_reg = DIV_ROUND_UP(rs485->delay_rts_after_send in lpc18xx_rs485_config()
/linux-4.4.14/drivers/gpio/
Dgpio-stmpe.c164 int num_banks = DIV_ROUND_UP(stmpe->num_gpios, 8); in stmpe_gpio_irq_sync_unlock()
222 int num_banks = DIV_ROUND_UP(stmpe->num_gpios, 8); in stmpe_dbg_show_one()
300 int num_banks = DIV_ROUND_UP(stmpe->num_gpios, 8); in stmpe_gpio_irq()
Dgpio-74xx-mmio.c138 DIV_ROUND_UP(MMIO_74XX_BIT_CNT(priv->flags), 8), in mmio_74xx_gpio_probe()
/linux-4.4.14/drivers/hwmon/
Dpwm-fan.c50 duty = DIV_ROUND_UP(pwm * (ctx->pwm->period - 1), MAX_PWM); in __set_pwm()
312 duty = DIV_ROUND_UP(ctx->pwm_value * (ctx->pwm->period - 1), MAX_PWM); in pwm_fan_resume()
/linux-4.4.14/drivers/net/ethernet/chelsio/cxgb4/
Dcxgb4_uld.h58 (w)->wr.wr_mid = htonl(FW_WR_LEN16_V(DIV_ROUND_UP(sizeof(*w), 16)) | \
71 (w)->wr.wr_mid = htonl(FW_WR_LEN16_V(DIV_ROUND_UP(wrlen, 16)) | \
/linux-4.4.14/drivers/clk/bcm/
Dclk-iproc-asiu.c122 div = DIV_ROUND_UP(*parent_rate, rate); in iproc_asiu_clk_round_rate()
148 div = DIV_ROUND_UP(parent_rate, rate); in iproc_asiu_clk_set_rate()
/linux-4.4.14/drivers/gpu/drm/
Ddrm_gem_cma_helper.c223 unsigned int min_pitch = DIV_ROUND_UP(args->width * args->bpp, 8); in drm_gem_cma_dumb_create_internal()
262 args->pitch = DIV_ROUND_UP(args->width * args->bpp, 8); in drm_gem_cma_dumb_create()
Ddrm_dp_helper.c500 return DIV_ROUND_UP((I2C_START_LEN + I2C_ADDR_LEN + in drm_dp_i2c_msg_duration()
517 return DIV_ROUND_UP(i2c_time_us, aux_time_us + AUX_RETRY_INTERVAL); in drm_dp_i2c_retry_count()
/linux-4.4.14/drivers/misc/sgi-gru/
Dgruhandles.h74 #define GRU_DS_BYTES_TO_AU(n) DIV_ROUND_UP(n, GRU_DSR_AU_BYTES)
75 #define GRU_CB_COUNT_TO_AU(n) DIV_ROUND_UP(n, GRU_CBR_AU_SIZE)
/linux-4.4.14/arch/blackfin/include/asm/
Dgpio.h15 #define GPIO_BANK_NUM DIV_ROUND_UP(MAX_BLACKFIN_GPIOS, GPIO_BANKSIZE)
/linux-4.4.14/drivers/pinctrl/spear/
Dpinctrl-plgpio.c368 regs_count = DIV_ROUND_UP(count, MAX_GPIO_PER_REG); in plgpio_irq_handler()
545 DIV_ROUND_UP(plgpio->chip.ngpio, MAX_GPIO_PER_REG), in plgpio_probe()
621 int i, reg_count = DIV_ROUND_UP(plgpio->chip.ngpio, MAX_GPIO_PER_REG); in plgpio_suspend()
660 int i, reg_count = DIV_ROUND_UP(plgpio->chip.ngpio, MAX_GPIO_PER_REG); in plgpio_resume()
/linux-4.4.14/drivers/clk/qcom/
Dclk-rcg2.c525 div = DIV_ROUND_UP((2 * parent_rate), req->rate) - 1; in clk_byte_determine_rate()
541 div = DIV_ROUND_UP((2 * parent_rate), rate) - 1; in clk_byte_set_rate()
582 div = DIV_ROUND_UP((2 * parent_rate), rate) - 1; in clk_byte2_determine_rate()
600 div = DIV_ROUND_UP((2 * parent_rate), rate) - 1; in clk_byte2_set_rate()
/linux-4.4.14/drivers/media/pci/pt3/
Dpt3.h78 #define MAX_DESC_BUFS DIV_ROUND_UP(MAX_NUM_XFERS, DESCS_IN_PAGE)
/linux-4.4.14/drivers/net/ethernet/ti/
Dcpsw_ale.h85 #define ALE_ENTRY_WORDS DIV_ROUND_UP(ALE_ENTRY_BITS, 32)
/linux-4.4.14/drivers/media/platform/omap3isp/
Dispcsiphy.c224 reg |= (DIV_ROUND_UP(25 * csi2_ddrclk_khz, 2000000) - 1) in omap3isp_csiphy_config()
227 reg |= (DIV_ROUND_UP(90 * csi2_ddrclk_khz, 1000000) + 3) in omap3isp_csiphy_config()
/linux-4.4.14/drivers/md/bcache/
Dmovinggc.c88 bio->bi_max_vecs = DIV_ROUND_UP(KEY_SIZE(&io->w->key), in moving_init()
152 * DIV_ROUND_UP(KEY_SIZE(&w->key), PAGE_SECTORS), in read_moving()
Dwriteback.c115 bio->bi_max_vecs = DIV_ROUND_UP(KEY_SIZE(&w->key), PAGE_SECTORS); in dirty_init()
247 * DIV_ROUND_UP(KEY_SIZE(&w->key), PAGE_SECTORS), in read_dirty()
/linux-4.4.14/drivers/pinctrl/mvebu/
Dpinctrl-armada-xp.c417 nregs = DIV_ROUND_UP(soc->nmodes, MVEBU_MPPS_PER_REG); in armada_xp_pinctrl_suspend()
431 nregs = DIV_ROUND_UP(soc->nmodes, MVEBU_MPPS_PER_REG); in armada_xp_pinctrl_resume()
493 nregs = DIV_ROUND_UP(soc->nmodes, MVEBU_MPPS_PER_REG); in armada_xp_pinctrl_probe()
/linux-4.4.14/drivers/net/wireless/ath/ath5k/
Dpcu.c147 bitrate = DIV_ROUND_UP(bitrate, 2); in ath5k_hw_get_frame_duration()
153 bitrate = DIV_ROUND_UP(bitrate, 4); in ath5k_hw_get_frame_duration()
163 symbols = DIV_ROUND_UP(bits * 10, symbol_bits); in ath5k_hw_get_frame_duration()
/linux-4.4.14/drivers/regulator/
Dtwl-regulator.c500 int vsel = DIV_ROUND_UP(min_uV - 600000, 12500); in twl4030smps_set_voltage()
738 vsel = DIV_ROUND_UP(min_uV - 600000, 12500); in twl6030smps_map_voltage()
761 vsel = DIV_ROUND_UP(min_uV - 700000, 12500); in twl6030smps_map_voltage()
784 vsel = DIV_ROUND_UP(min_uV - 1852000, 38600); in twl6030smps_map_voltage()
792 vsel = DIV_ROUND_UP(min_uV - 2161000, 38600); in twl6030smps_map_voltage()
Dhelpers.c262 ret = DIV_ROUND_UP(min_uV - rdev->desc->min_uV, rdev->desc->uV_step); in regulator_map_voltage_linear()
316 ret = DIV_ROUND_UP(min_uV - range->min_uV, in regulator_map_voltage_linear_range()
Dda9052-regulator.c200 DIV_ROUND_UP(min_uV - DA9052_CONST_3uV, in da9052_map_voltage()
203 sel = DIV_ROUND_UP(min_uV - info->min_uV, info->step_uV); in da9052_map_voltage()
Drc5t583-regulator.c61 return DIV_ROUND_UP(curr_uV, reg->reg_info->enable_uv_per_us); in rc5t583_regulator_enable_time()
Dmax8649.c82 return DIV_ROUND_UP(voltage, rate); in max8649_enable_time()
Dda903x.c206 sel = DIV_ROUND_UP(thresh - min_uV, info->desc.uV_step); in da9030_map_ldo14_voltage()
209 sel = DIV_ROUND_UP(min_uV - thresh, info->desc.uV_step); in da9030_map_ldo14_voltage()
/linux-4.4.14/fs/nfs/
Dnfs4session.h32 #define SLOT_TABLE_SZ DIV_ROUND_UP(NFS4_MAX_SLOT_TABLE, 8*sizeof(long))
/linux-4.4.14/drivers/phy/
Dphy-qcom-ufs-i.h40 usleep_range(DIV_ROUND_UP(sleep_us, 4), sleep_us); \
/linux-4.4.14/drivers/gpu/drm/amd/amdkfd/
Dkfd_interrupt.c170 uint32_t ih_ring_entry[DIV_ROUND_UP( in interrupt_wq()
/linux-4.4.14/drivers/clocksource/
Dtimer-sun5i.c252 ce->timer.ticks_per_jiffy = DIV_ROUND_UP(ndata->new_rate, HZ); in sun5i_rate_cb_clkevt()
279 ce->timer.ticks_per_jiffy = DIV_ROUND_UP(rate, HZ); in sun5i_setup_clockevent()
Dtimer-keystone.c196 timer.hz_period = DIV_ROUND_UP(rate, HZ); in keystone_timer_init()
Dsun4i_timer.c188 ticks_per_jiffy = DIV_ROUND_UP(rate, HZ); in sun4i_timer_init()
Dtimer-digicolor.c180 dc_timer_dev.ticks_per_jiffy = DIV_ROUND_UP(rate, HZ); in digicolor_timer_init()
/linux-4.4.14/drivers/net/ethernet/chelsio/cxgb4vf/
Dt4vf_hw.c381 len16 = DIV_ROUND_UP(offsetof(struct fw_params_cmd, in t4vf_query_params()
419 len16 = DIV_ROUND_UP(offsetof(struct fw_params_cmd, in t4vf_set_params()
1204 size_t len16 = DIV_ROUND_UP(offsetof(struct fw_vi_mac_cmd, in t4vf_alloc_mac_filt()
1285 size_t len16 = DIV_ROUND_UP(offsetof(struct fw_vi_mac_cmd, in t4vf_change_mac()
1330 size_t len16 = DIV_ROUND_UP(offsetof(struct fw_vi_mac_cmd, in t4vf_set_addr_hash()
1372 size_t len16 = DIV_ROUND_UP(len, 16); in t4vf_get_port_stats()
/linux-4.4.14/kernel/power/
Dsnapshot.c445 nr_blocks = DIV_ROUND_UP(pages, BM_BITS_PER_BLOCK); in create_zone_bm_rtree()
1045 rtree = nodes = DIV_ROUND_UP(zone->spanned_pages, BM_BITS_PER_BLOCK); in snapshot_additional_pages()
1046 rtree += DIV_ROUND_UP(rtree * sizeof(struct rtree_node), in snapshot_additional_pages()
1049 nodes = DIV_ROUND_UP(nodes, BM_ENTRIES_PER_LEVEL); in snapshot_additional_pages()
1609 - 2 * DIV_ROUND_UP(reserved_size, PAGE_SIZE); in hibernate_preallocate_memory()
1611 size = DIV_ROUND_UP(image_size, PAGE_SIZE); in hibernate_preallocate_memory()
1872 nr_meta_pages = DIV_ROUND_UP(nr_pages * sizeof(long), PAGE_SIZE); in swsusp_save()
2369 nr_pages = DIV_ROUND_UP(nr_pages, PBES_PER_LINKED_PAGE); in prepare_image()
/linux-4.4.14/arch/m68k/mm/
Dinit.c127 #define MLK_ROUNDUP(b, t) b, t, DIV_ROUND_UP(((t) - (b)), 1024) in print_memmap()
/linux-4.4.14/drivers/clk/tegra/
Dcvb.c43 uv = DIV_ROUND_UP(uv, step) * align->step_uv + align->offset_uv; in round_cvb_voltage()
Dclk-divider.c103 return DIV_ROUND_UP(output_rate * mul, div + mul); in clk_frac_div_round_rate()
/linux-4.4.14/drivers/gpu/drm/nouveau/nvkm/subdev/clk/
Dgk20a.c363 n_lo = DIV_ROUND_UP(m_old * clk->params->min_vco, in _gk20a_pllg_program_mnp()
396 n_lo = DIV_ROUND_UP(clk->m * clk->params->min_vco, in _gk20a_pllg_program_mnp()
455 n_lo = DIV_ROUND_UP(m * clk->params->min_vco, in gk20a_pllg_disable()
/linux-4.4.14/arch/metag/mm/
Dmmu-meta2.c139 unsigned int pages = DIV_ROUND_UP(mem_size, 1 << 22); in mmu_init()
/linux-4.4.14/drivers/mfd/
Dpm8921-core.c364 chip->num_blocks = DIV_ROUND_UP(chip->num_irqs, 8); in pm8921_probe()
365 chip->num_masters = DIV_ROUND_UP(chip->num_blocks, 8); in pm8921_probe()
Dtwl4030-irq.c97 .bytes_ixr = DIV_ROUND_UP(nbits, 8), \
99 .bytes_edr = DIV_ROUND_UP((2*(nbits)), 8), \
/linux-4.4.14/drivers/net/ethernet/qlogic/qed/
Dqed_cxt.c197 *p_line += DIV_ROUND_UP(p_blk->total_size, in qed_ilt_cli_adv_line()
322 lines = DIV_ROUND_UP(sz_left, p_blk->real_size_in_page); in qed_ilt_blk_alloc()
420 size = DIV_ROUND_UP(cid_cnt, in qed_cid_map_alloc()
526 DIV_ROUND_UP(cid_cnt, in qed_cxt_mngr_setup()
/linux-4.4.14/net/dccp/ccids/
Dccid2.c88 u32 max_ratio = DIV_ROUND_UP(ccid2_hc_tx_sk(sk)->tx_cwnd, 2); in ccid2_change_l_ack_ratio()
578 maxincr = DIV_ROUND_UP(dp->dccps_l_ack_ratio, 2); in ccid2_hc_tx_packet_recv()
724 max_ratio = DIV_ROUND_UP(hc->tx_cwnd, 2); in ccid2_hc_tx_init()
/linux-4.4.14/arch/arc/mm/
Dcache.c245 num_lines = DIV_ROUND_UP(sz, L1_CACHE_BYTES); in __cache_line_loop_v2()
287 num_lines = DIV_ROUND_UP(sz, L1_CACHE_BYTES); in __cache_line_loop_v3()
356 num_lines = DIV_ROUND_UP(sz, L1_CACHE_BYTES); in __cache_line_loop_v4()
/linux-4.4.14/drivers/scsi/fnic/
Dvnic_wq.h82 DIV_ROUND_UP(entries, VNIC_WQ_BUF_BLK_ENTRIES)
Dvnic_rq.h79 DIV_ROUND_UP(entries, VNIC_RQ_BUF_BLK_ENTRIES)
/linux-4.4.14/drivers/video/fbdev/
Dclps711x-fb.c83 val = DIV_ROUND_UP(var->xres, 16) - 1; in clps711x_fb_check_var()
87 val = DIV_ROUND_UP(var->yres * var->xres * var->bits_per_pixel, 128); in clps711x_fb_check_var()
/linux-4.4.14/drivers/iio/adc/
Dad_sigma_delta.c280 DIV_ROUND_UP(chan->scan_type.realbits + chan->scan_type.shift, 8), in ad_sigma_delta_single_conversion()
373 reg_size = DIV_ROUND_UP(reg_size, 8); in ad_sd_trigger_handler()
/linux-4.4.14/drivers/staging/iio/light/
Disl29028.c88 unsigned int period = DIV_ROUND_UP(1000, sampling); in isl29028_set_proxim_sampling()
111 mdelay(DIV_ROUND_UP(1000, chip->prox_sampling)); in isl29028_enable_proximity()
/linux-4.4.14/drivers/misc/vmw_vmci/
Dvmci_queue_pair.c263 (DIV_ROUND_UP(_QPE.produce_size, PAGE_SIZE) + \
264 DIV_ROUND_UP(_QPE.consume_size, PAGE_SIZE) + 2))
279 for (i = 0; i < DIV_ROUND_UP(size, PAGE_SIZE) + 1; i++) { in qp_free_queue()
301 const u64 num_pages = DIV_ROUND_UP(size, PAGE_SIZE) + 1; in qp_alloc_queue()
627 const u64 num_pages = DIV_ROUND_UP(size, PAGE_SIZE) + 1; in qp_host_alloc_queue()
975 const u64 num_ppns = DIV_ROUND_UP(produce_size, PAGE_SIZE) + in qp_guest_endpoint_create()
976 DIV_ROUND_UP(consume_size, PAGE_SIZE) + 2; in qp_guest_endpoint_create()
1187 DIV_ROUND_UP(produce_size, PAGE_SIZE) + 1; in qp_alloc_guest_work()
1189 DIV_ROUND_UP(consume_size, PAGE_SIZE) + 1; in qp_alloc_guest_work()
1468 (DIV_ROUND_UP(entry->qp.produce_size, PAGE_SIZE) + 1); in qp_broker_create()
/linux-4.4.14/sound/usb/
Dendpoint.c736 max_packs_per_period = DIV_ROUND_UP(period_bytes, minsize); in data_ep_set_params()
739 urbs_per_period = DIV_ROUND_UP(max_packs_per_period, in data_ep_set_params()
742 urb_packs = DIV_ROUND_UP(max_packs_per_period, urbs_per_period); in data_ep_set_params()
745 ep->max_urb_frames = DIV_ROUND_UP(frames_per_period, in data_ep_set_params()
/linux-4.4.14/fs/minix/
Dminix.h92 return DIV_ROUND_UP(bits, blocksize * 8); in minix_blocks_needed()
/linux-4.4.14/drivers/net/wireless/ath/ath9k/
Dcommon-beacon.c99 bs->bs_bmissthreshold = DIV_ROUND_UP(conf->bmiss_timeout, conf->intval); in ath9k_cmn_beacon_config_sta()
/linux-4.4.14/mm/
Dswap_cgroup.c153 length = DIV_ROUND_UP(max_pages, SC_PER_PAGE); in swap_cgroup_swapon()
Dcma_debug.c189 u32s = DIV_ROUND_UP(cma_bitmap_maxno(cma), BITS_PER_BYTE * sizeof(u32)); in cma_debugfs_add_one()
/linux-4.4.14/net/netfilter/
Dnft_bitwise.c37 for (i = 0; i < DIV_ROUND_UP(priv->len, 4); i++) in nft_bitwise_eval()
/linux-4.4.14/fs/btrfs/
Dordered-data.h151 int num_sectors = (int)DIV_ROUND_UP(bytes, root->sectorsize); in btrfs_ordered_sum_size()
/linux-4.4.14/sound/soc/codecs/
Dpcm512x.c514 ranges[1].min = DIV_ROUND_UP(16000000, frame_size); in pcm512x_hw_rule_rate()
713 num *= DIV_ROUND_UP(pllin_rate / den, 20000000); in pcm512x_find_pll_coeff()
714 den *= DIV_ROUND_UP(pllin_rate / den, 20000000); in pcm512x_find_pll_coeff()
770 P = DIV_ROUND_UP(pllin_rate, 20000000); in pcm512x_find_pll_coeff()
1018 ncp_div = DIV_ROUND_UP(dac_rate, 2048000); in pcm512x_set_dividers()
/linux-4.4.14/net/mac80211/
Drc80211_minstrel.c448 DIV_ROUND_UP(rate->bitrate, 1 << shift), erp, 1, in calc_rate_durations()
451 DIV_ROUND_UP(rate->bitrate, 1 << shift), erp, 1, in calc_rate_durations()
520 mr->bitrate = DIV_ROUND_UP(sband->bitrates[i].bitrate, in minstrel_rate_init()
Dutil.c107 dur += 4 * DIV_ROUND_UP((16 + 8 * (len + 4) + 6) * 10, in ieee80211_frame_duration()
123 dur += DIV_ROUND_UP(8 * (len + 4) * 10, rate); in ieee80211_frame_duration()
184 bitrate = DIV_ROUND_UP(rate->bitrate, 1 << shift); in ieee80211_rts_duration()
227 bitrate = DIV_ROUND_UP(rate->bitrate, 1 << shift); in ieee80211_ctstoself_duration()
1334 (u8) DIV_ROUND_UP(sband->bitrates[i].bitrate, in ieee80211_build_preq_ies_band()
1620 brate = DIV_ROUND_UP(sband->bitrates[j].bitrate, in ieee80211_sta_get_rates()
2461 brate = DIV_ROUND_UP(br->bitrate, (1 << shift) * 5); in ieee80211_parse_bitrates()
2509 rate = DIV_ROUND_UP(sband->bitrates[i].bitrate, in ieee80211_add_srates_ie()
2558 rate = DIV_ROUND_UP(sband->bitrates[i].bitrate, in ieee80211_add_ext_srates_ie()
2661 ri.legacy = DIV_ROUND_UP(bitrate, (1 << shift)); in ieee80211_calculate_rx_timestamp()
[all …]
/linux-4.4.14/arch/x86/kernel/
Despfix_64.c70 #define ESPFIX_MAX_PAGES DIV_ROUND_UP(CONFIG_NR_CPUS, ESPFIX_STACKS_PER_PAGE)
/linux-4.4.14/drivers/net/ethernet/mellanox/mlx5/core/
Den_tx.c219 ds_cnt += DIV_ROUND_UP(ihs - sizeof(eseg->inline_hdr_start), in mlx5e_sq_xmit()
268 MLX5E_TX_SKB_CB(skb)->num_wqebbs = DIV_ROUND_UP(ds_cnt, in mlx5e_sq_xmit()
/linux-4.4.14/drivers/scsi/csiostor/
Dcsio_scsi.c213 DIV_ROUND_UP(size, 16))); in csio_scsi_init_cmd_wr()
373 FW_WR_LEN16_V(DIV_ROUND_UP(size, 16))); in csio_scsi_init_read_wr()
426 FW_WR_LEN16_V(DIV_ROUND_UP(size, 16))); in csio_scsi_init_write_wr()
656 DIV_ROUND_UP(size, 16))); in csio_scsi_init_abrt_cls_wr()
1237 int count = DIV_ROUND_UP(tmo, CSIO_SCSI_ABORT_Q_POLL_MS); in csio_scsi_abort_io_q()
1277 int count = DIV_ROUND_UP(60 * 1000, CSIO_SCSI_ABORT_Q_POLL_MS); in csio_scsim_cleanup_io()
1323 int count = DIV_ROUND_UP(60 * 1000, CSIO_SCSI_ABORT_Q_POLL_MS); in csio_scsim_cleanup_io_lnode()
2138 count = DIV_ROUND_UP((ioreq->tmo + 10) * 1000, CSIO_SCSI_TM_POLL_MS); in csio_eh_lun_reset_handler()
/linux-4.4.14/arch/arm/mach-davinci/
Daemif.c71 result = DIV_ROUND_UP((wanted * clk), NSEC_PER_MSEC) - 1; in aemif_calc_rate()
/linux-4.4.14/drivers/gpu/drm/rockchip/
Drockchip_drm_fbdev.c64 bytes_per_pixel = DIV_ROUND_UP(sizes->surface_bpp, 8); in rockchip_drm_fbdev_create()
Drockchip_drm_gem.c232 int min_pitch = DIV_ROUND_UP(args->width * args->bpp, 8); in rockchip_gem_dumb_create()
/linux-4.4.14/drivers/gpu/drm/nouveau/nvkm/subdev/volt/
Dgk20a.c98 mv = DIV_ROUND_UP(mv, 1000); in gk20a_volt_calc_voltage()
/linux-4.4.14/net/ipv6/
Dudp_offload.c53 skb_shinfo(skb)->gso_segs = DIV_ROUND_UP(skb->len, mss); in udp6_ufo_fragment()
/linux-4.4.14/drivers/xen/
Dxlate_mmu.c149 unsigned long range = DIV_ROUND_UP(nr, XEN_PFN_PER_PAGE) << PAGE_SHIFT; in xen_xlate_remap_gfn_array()
/linux-4.4.14/drivers/net/ethernet/cisco/enic/
Dvnic_wq.h77 DIV_ROUND_UP(entries, VNIC_WQ_BUF_BLK_ENTRIES(entries))
Dvnic_rq.h65 DIV_ROUND_UP(entries, VNIC_RQ_BUF_BLK_ENTRIES(entries))
/linux-4.4.14/drivers/usb/host/
Dxhci.c1161 unsigned int number = DIV_ROUND_UP(ep_index, 2); in xhci_get_endpoint_address()
2131 bw_reserved = DIV_ROUND_UP(SS_BW_RESERVED*SS_BW_LIMIT_IN, 100); in xhci_check_ss_bw()
2135 bw_reserved = DIV_ROUND_UP(SS_BW_RESERVED*SS_BW_LIMIT_OUT, 100); in xhci_check_ss_bw()
2204 bw_reserved = DIV_ROUND_UP(HS_BW_RESERVED * max_bandwidth, 100); in xhci_check_bw_table()
2207 bw_reserved = DIV_ROUND_UP(FS_BW_RESERVED * max_bandwidth, 100); in xhci_check_bw_table()
2241 bw_used = DIV_ROUND_UP(bw_table->interval0_esit_payload, block_size) + in xhci_check_bw_table()
2271 largest_mps = DIV_ROUND_UP( in xhci_check_bw_table()
2374 unsigned int mps = DIV_ROUND_UP(ep_bw->max_packet_size, SS_BLOCK); in xhci_get_ss_bw_consumed()
2380 return DIV_ROUND_UP(ep_bw->mult * ep_bw->num_packets * in xhci_get_ss_bw_consumed()
4301 sel = DIV_ROUND_UP(udev->u1_params.sel, 1000); in xhci_get_timeout_no_hub_lpm()
[all …]
/linux-4.4.14/arch/x86/platform/efi/
Defi_64.c91 n_pgds = DIV_ROUND_UP((max_pfn << PAGE_SHIFT), PGDIR_SIZE); in efi_call_phys_prolog()
115 nr_pgds = DIV_ROUND_UP((max_pfn << PAGE_SHIFT) , PGDIR_SIZE); in efi_call_phys_epilog()
/linux-4.4.14/drivers/usb/host/whci/
Dqset.c373 std->num_pointers = DIV_ROUND_UP(ep - sp, WHCI_PAGE_SIZE); in qset_fill_page_list()
510 num_pointers = DIV_ROUND_UP(ep - sp, WHCI_PAGE_SIZE); in qset_add_urb_sg()
667 ntds_remaining = DIV_ROUND_UP(remaining, QTD_MAX_XFER_SIZE); in qset_add_urb()
/linux-4.4.14/drivers/scsi/cxgbi/cxgb4i/
Dcxgb4i.c161 #define DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d)) macro
499 return DIV_ROUND_UP(skb->len, 8); in calc_tx_flits_ofld()
514 flowclen16 = DIV_ROUND_UP(flowclen, 16); in tx_flowc_wr_credits()
638 credits_needed = DIV_ROUND_UP(dlen, 16); in push_tx_frames()
640 credits_needed = DIV_ROUND_UP( in push_tx_frames()
645 credits_needed += DIV_ROUND_UP( in push_tx_frames()
1468 DIV_ROUND_UP(sizeof(struct cpl_abort_req), 16); in init_act_open()
1566 req->len16 = htonl(DIV_ROUND_UP(wr_len - sizeof(req->wr), 16)); in ulp_mem_io_set_hdr()
/linux-4.4.14/drivers/md/
Dbitmap.c760 bytes = DIV_ROUND_UP(chunks, 8); in bitmap_storage_alloc()
764 num_pages = DIV_ROUND_UP(bytes, PAGE_SIZE); in bitmap_storage_alloc()
798 roundup(DIV_ROUND_UP(num_pages*4, 8), sizeof(unsigned long)), in bitmap_storage_alloc()
1069 node_offset = bitmap->cluster_slot * (DIV_ROUND_UP(store->bytes, PAGE_SIZE)); in bitmap_init_from_disk()
1974 bytes = DIV_ROUND_UP(bitmap->counts.chunks, 8); in bitmap_resize()
1977 space = DIV_ROUND_UP(bytes, 512); in bitmap_resize()
1986 bytes = DIV_ROUND_UP(chunks, 8); in bitmap_resize()
2003 pages = DIV_ROUND_UP(chunks, PAGE_COUNTER_RATIO); in bitmap_resize()
/linux-4.4.14/drivers/infiniband/hw/mlx5/
Dmem.c110 *ncont = DIV_ROUND_UP(i, (1 << m)); in mlx5_ib_cont_pages()
/linux-4.4.14/drivers/net/wireless/brcm80211/brcmfmac/
Dfweh.h121 #define BRCMF_EVENTING_MASK_LEN DIV_ROUND_UP(BRCMF_E_LAST, 8)
/linux-4.4.14/drivers/input/misc/
Dgpio_tilt_polled.c154 tdev->threshold = DIV_ROUND_UP(pdata->debounce_interval, in gpio_tilt_polled_probe()
/linux-4.4.14/net/wireless/
Dlib80211_crypt_ccmp.c241 blocks = DIV_ROUND_UP(data_len, AES_BLOCK_LEN); in lib80211_ccmp_encrypt()
347 blocks = DIV_ROUND_UP(data_len, AES_BLOCK_LEN); in lib80211_ccmp_decrypt()
/linux-4.4.14/drivers/gpu/drm/tegra/
Ddpaux.c76 for (i = 0; i < DIV_ROUND_UP(size, 4); i++) { in tegra_dpaux_write_fifo()
92 for (i = 0; i < DIV_ROUND_UP(size, 4); i++) { in tegra_dpaux_read_fifo()
/linux-4.4.14/drivers/clk/at91/
Dclk-pll.c190 tmpdiv = DIV_ROUND_UP(parent_rate, characteristics->input.max); in clk_pll_get_best_div_mul()
202 maxdiv = DIV_ROUND_UP(parent_rate * PLL_MUL_MAX(layout), rate); in clk_pll_get_best_div_mul()
/linux-4.4.14/drivers/gpu/drm/udl/
Dudl_gem.c81 args->pitch = args->width * DIV_ROUND_UP(args->bpp, 8); in udl_dumb_create()
/linux-4.4.14/drivers/gpu/drm/nouveau/nvkm/engine/gr/
Dctxgm204.c952 const u32 dist_nr = DIV_ROUND_UP(gr->tpc_total, 4); in gm204_grctx_generate_405b60()
/linux-4.4.14/drivers/reset/
Dreset-lpc18xx.c191 rc->delay_us = DIV_ROUND_UP(fcclk, firc * firc); in lpc18xx_rgu_probe()
/linux-4.4.14/drivers/clk/meson/
Dclk-cpu.c80 div = DIV_ROUND_UP(parent_rate, rate); in meson_clk_cpu_set_rate()
/linux-4.4.14/drivers/media/usb/em28xx/
Dem28xx-audio.c797 bytes_per_transfer = DIV_ROUND_UP(48000 * 2 * 2, 125 * interval); in em28xx_audio_urb_init()
803 num_urb = DIV_ROUND_UP(bytes_per_transfer, ep_size); in em28xx_audio_urb_init()
821 npackets = DIV_ROUND_UP(urb_size, ep_size); in em28xx_audio_urb_init()
/linux-4.4.14/drivers/nvmem/
Dcore.c245 cell->bytes = DIV_ROUND_UP(cell->nbits + cell->bit_offset, in nvmem_cell_info_to_nvmem_cell()
662 cell->bytes = DIV_ROUND_UP(cell->nbits + cell->bit_offset, in of_nvmem_cell_get()
809 if (cell->bytes != DIV_ROUND_UP(cell->nbits, BITS_PER_BYTE)) in nvmem_shift_read_buffer_in_place()
/linux-4.4.14/drivers/net/ethernet/ezchip/
Dnps_enet.c30 u32 i, len = DIV_ROUND_UP(frame_len, sizeof(u32)); in nps_enet_clean_rx_fifo()
363 u32 i, len = DIV_ROUND_UP(length, sizeof(u32)); in nps_enet_send_frame()
/linux-4.4.14/drivers/input/keyboard/
Dpmic8xxx-keypad.c157 udelay((2 * DIV_ROUND_UP(USEC_PER_SEC, KEYP_CLOCK_FREQ)) + 1); in pmic8xxx_chk_sync_read()
211 udelay((4 * DIV_ROUND_UP(USEC_PER_SEC, KEYP_CLOCK_FREQ)) + 1); in pmic8xxx_kp_read_matrix()
/linux-4.4.14/drivers/gpu/drm/vmwgfx/
Dvmwgfx_mob.c394 data_size = DIV_ROUND_UP(data_size, PAGE_SIZE); in vmw_mob_calculate_pt_pages()
502 unsigned long num_pt_pages = DIV_ROUND_UP(pt_size, PAGE_SIZE); in vmw_mob_build_pt()
/linux-4.4.14/fs/pstore/
Dram_core.c237 ecc_blocks = DIV_ROUND_UP(prz->buffer_size - prz->ecc_info.ecc_size, in persistent_ram_init_ecc()
394 page_count = DIV_ROUND_UP(size + offset_in_page(start), PAGE_SIZE); in persistent_ram_vmap()
/linux-4.4.14/drivers/dma/
Dsa11x0-dma.c552 j += DIV_ROUND_UP(len, DMA_MAX_SIZE & ~DMA_ALIGN) - 1; in sa11x0_dma_prep_slave_sg()
583 unsigned mult = DIV_ROUND_UP(tlen, in sa11x0_dma_prep_slave_sg()
623 sgperiod = DIV_ROUND_UP(period, DMA_MAX_SIZE & ~DMA_ALIGN); in sa11x0_dma_prep_dma_cyclic()
643 unsigned mult = DIV_ROUND_UP(tlen, DMA_MAX_SIZE & ~DMA_ALIGN); in sa11x0_dma_prep_dma_cyclic()

1234