/kernel/linux/linux-5.10/drivers/rtc/ |
H A D | rtc-rx8025.c | 419 static int rx8025_get_clock_adjust(struct device *dev, int *adj) in rx8025_get_clock_adjust() argument 428 *adj = digoff >= 64 ? digoff - 128 : digoff; in rx8025_get_clock_adjust() 429 if (*adj > 0) in rx8025_get_clock_adjust() 430 (*adj)--; in rx8025_get_clock_adjust() 431 *adj *= -RX8025_ADJ_RESOLUTION; in rx8025_get_clock_adjust() 436 static int rx8025_set_clock_adjust(struct device *dev, int adj) in rx8025_set_clock_adjust() argument 442 adj /= -RX8025_ADJ_RESOLUTION; in rx8025_set_clock_adjust() 443 if (adj > RX8025_ADJ_DATA_MAX) in rx8025_set_clock_adjust() 444 adj = RX8025_ADJ_DATA_MAX; in rx8025_set_clock_adjust() 445 else if (adj < RX8025_ADJ_DATA_MI in rx8025_set_clock_adjust() 466 int err, adj; rx8025_sysfs_show_clock_adjust() local 479 int adj, err; rx8025_sysfs_store_clock_adjust() local [all...] |
/kernel/linux/linux-5.10/arch/x86/math-emu/ |
H A D | poly_tan.c | 57 unsigned long adj; in poly_tan() local 178 adj = 0xffffffff; /* We want approx 1.0 here, but in poly_tan() 181 adj = accum.msw >> -(exponent + 1); /* tan */ in poly_tan() 182 adj = mul_32_32(adj, adj); /* tan^2 */ in poly_tan() 184 adj = 0; in poly_tan() 185 adj = mul_32_32(0x898cc517, adj); /* delta * tan^2 */ in poly_tan() 187 fix_up.msw += adj; in poly_tan() [all...] |
/kernel/linux/linux-6.6/arch/x86/math-emu/ |
H A D | poly_tan.c | 57 unsigned long adj; in poly_tan() local 178 adj = 0xffffffff; /* We want approx 1.0 here, but in poly_tan() 181 adj = accum.msw >> -(exponent + 1); /* tan */ in poly_tan() 182 adj = mul_32_32(adj, adj); /* tan^2 */ in poly_tan() 184 adj = 0; in poly_tan() 185 adj = mul_32_32(0x898cc517, adj); /* delta * tan^2 */ in poly_tan() 187 fix_up.msw += adj; in poly_tan() [all...] |
/kernel/linux/linux-5.10/drivers/net/ethernet/cadence/ |
H A D | macb_ptp.c | 123 u64 adj; in gem_ptp_adjfine() local 136 adj = (u64)scaled_ppm * word; in gem_ptp_adjfine() 140 adj += (USEC_PER_SEC >> 1); in gem_ptp_adjfine() 141 adj >>= PPM_FRACTION; /* remove fractions */ in gem_ptp_adjfine() 142 adj = div_u64(adj, USEC_PER_SEC); in gem_ptp_adjfine() 143 adj = neg_adj ? (word - adj) : (word + adj); in gem_ptp_adjfine() 145 incr_spec.ns = (adj >> GEM_SUBNSINCR_SIZ in gem_ptp_adjfine() 156 u32 adj, sign = 0; gem_ptp_adjtime() local 203 u64 adj; gem_ptp_init_timer() local [all...] |
/kernel/linux/linux-5.10/drivers/gpu/drm/atmel-hlcdc/ |
H A D | atmel_hlcdc_crtc.c | 69 struct drm_display_mode *adj = &c->state->adjusted_mode; in atmel_hlcdc_crtc_mode_set_nofb() local 82 vm.vfront_porch = adj->crtc_vsync_start - adj->crtc_vdisplay; in atmel_hlcdc_crtc_mode_set_nofb() 83 vm.vback_porch = adj->crtc_vtotal - adj->crtc_vsync_end; in atmel_hlcdc_crtc_mode_set_nofb() 84 vm.vsync_len = adj->crtc_vsync_end - adj->crtc_vsync_start; in atmel_hlcdc_crtc_mode_set_nofb() 85 vm.hfront_porch = adj->crtc_hsync_start - adj->crtc_hdisplay; in atmel_hlcdc_crtc_mode_set_nofb() 86 vm.hback_porch = adj in atmel_hlcdc_crtc_mode_set_nofb() [all...] |
/kernel/linux/linux-6.6/drivers/net/ethernet/cadence/ |
H A D | macb_ptp.c | 128 u64 adj; in gem_ptp_adjfine() local 141 adj = (u64)scaled_ppm * word; in gem_ptp_adjfine() 145 adj += (USEC_PER_SEC >> 1); in gem_ptp_adjfine() 146 adj >>= PPM_FRACTION; /* remove fractions */ in gem_ptp_adjfine() 147 adj = div_u64(adj, USEC_PER_SEC); in gem_ptp_adjfine() 148 adj = neg_adj ? (word - adj) : (word + adj); in gem_ptp_adjfine() 150 incr_spec.ns = (adj >> GEM_SUBNSINCR_SIZ in gem_ptp_adjfine() 161 u32 adj, sign = 0; gem_ptp_adjtime() local 208 u64 adj; gem_ptp_init_timer() local [all...] |
/kernel/linux/linux-6.6/drivers/gpu/drm/atmel-hlcdc/ |
H A D | atmel_hlcdc_crtc.c | 70 struct drm_display_mode *adj = &c->state->adjusted_mode; in atmel_hlcdc_crtc_mode_set_nofb() local 104 vm.vfront_porch = adj->crtc_vsync_start - adj->crtc_vdisplay; in atmel_hlcdc_crtc_mode_set_nofb() 105 vm.vback_porch = adj->crtc_vtotal - adj->crtc_vsync_end; in atmel_hlcdc_crtc_mode_set_nofb() 106 vm.vsync_len = adj->crtc_vsync_end - adj->crtc_vsync_start; in atmel_hlcdc_crtc_mode_set_nofb() 107 vm.hfront_porch = adj->crtc_hsync_start - adj->crtc_hdisplay; in atmel_hlcdc_crtc_mode_set_nofb() 108 vm.hback_porch = adj in atmel_hlcdc_crtc_mode_set_nofb() [all...] |
/kernel/linux/linux-6.6/arch/s390/include/asm/vdso/ |
H A D | gettimeofday.h | 27 u64 adj, now; in __arch_get_hw_counter() local 30 adj = vd->arch_data.tod_steering_end - now; in __arch_get_hw_counter() 31 if (unlikely((s64) adj > 0)) in __arch_get_hw_counter() 32 now += (vd->arch_data.tod_steering_delta < 0) ? (adj >> 15) : -(adj >> 15); in __arch_get_hw_counter()
|
/kernel/linux/linux-6.6/drivers/net/ethernet/marvell/octeontx2/af/ |
H A D | ptp.c | 178 u64 comp, adj = 0, cycles_per_sec, ns_drift = 0; in ptp_calc_adjusted_comp() local 211 adj = comp * ns_drift; in ptp_calc_adjusted_comp() 212 adj = adj / 1000000000ULL; in ptp_calc_adjusted_comp() 215 comp += adj; in ptp_calc_adjusted_comp() 220 adj = comp * cycle_time; in ptp_calc_adjusted_comp() 221 adj = adj / 1000000000ULL; in ptp_calc_adjusted_comp() 222 adj = adj / CYCLE_MUL in ptp_calc_adjusted_comp() 315 u64 comp, adj; ptp_adjfine() local [all...] |
/kernel/linux/linux-5.10/arch/s390/include/asm/vdso/ |
H A D | gettimeofday.h | 28 u64 adj, now; in __arch_get_hw_counter() local 31 adj = vdso->arch_data.tod_steering_end - now; in __arch_get_hw_counter() 32 if (unlikely((s64) adj > 0)) in __arch_get_hw_counter() 33 now += (vdso->arch_data.tod_steering_delta < 0) ? (adj >> 15) : -(adj >> 15); in __arch_get_hw_counter()
|
/kernel/linux/linux-5.10/arch/x86/kernel/ |
H A D | tsc_sync.c | 51 struct tsc_adjust *adj = this_cpu_ptr(&tsc_adjust); in tsc_verify_tsc_adjust() local 62 if (!resume && time_before(jiffies, adj->nextcheck)) in tsc_verify_tsc_adjust() 65 adj->nextcheck = jiffies + HZ; in tsc_verify_tsc_adjust() 68 if (adj->adjusted == curval) in tsc_verify_tsc_adjust() 72 wrmsrl(MSR_IA32_TSC_ADJUST, adj->adjusted); in tsc_verify_tsc_adjust() 74 if (!adj->warned || resume) { in tsc_verify_tsc_adjust() 76 smp_processor_id(), adj->adjusted, curval); in tsc_verify_tsc_adjust() 77 adj->warned = true; in tsc_verify_tsc_adjust()
|
/kernel/linux/linux-6.6/arch/x86/kernel/ |
H A D | tsc_sync.c | 52 struct tsc_adjust *adj = this_cpu_ptr(&tsc_adjust); in tsc_verify_tsc_adjust() local 63 if (!resume && time_before(jiffies, adj->nextcheck)) in tsc_verify_tsc_adjust() 66 adj->nextcheck = jiffies + HZ; in tsc_verify_tsc_adjust() 69 if (adj->adjusted == curval) in tsc_verify_tsc_adjust() 73 wrmsrl(MSR_IA32_TSC_ADJUST, adj->adjusted); in tsc_verify_tsc_adjust() 75 if (!adj->warned || resume) { in tsc_verify_tsc_adjust() 77 smp_processor_id(), adj->adjusted, curval); in tsc_verify_tsc_adjust() 78 adj->warned = true; in tsc_verify_tsc_adjust()
|
/kernel/linux/linux-5.10/arch/sparc/kernel/ |
H A D | time_64.c | 117 static int tick_add_compare(unsigned long adj) in tick_add_compare() argument 142 : "r" (orig_tick), "r" (adj)); in tick_add_compare() 148 return ((long)(new_tick - (orig_tick+adj))) > 0L; in tick_add_compare() 151 static unsigned long tick_add_tick(unsigned long adj) in tick_add_tick() argument 160 : "r" (adj)); in tick_add_tick() 250 static unsigned long stick_add_tick(unsigned long adj) in stick_add_tick() argument 258 : "r" (adj)); in stick_add_tick() 263 static int stick_add_compare(unsigned long adj) in stick_add_compare() argument 273 : "r" (orig_tick + adj)); in stick_add_compare() 279 return ((long)(new_tick - (orig_tick+adj))) > in stick_add_compare() 392 hbtick_add_tick(unsigned long adj) hbtick_add_tick() argument 402 hbtick_add_compare(unsigned long adj) hbtick_add_compare() argument [all...] |
/kernel/linux/linux-6.6/arch/sparc/kernel/ |
H A D | time_64.c | 117 static int tick_add_compare(unsigned long adj) in tick_add_compare() argument 142 : "r" (orig_tick), "r" (adj)); in tick_add_compare() 148 return ((long)(new_tick - (orig_tick+adj))) > 0L; in tick_add_compare() 151 static unsigned long tick_add_tick(unsigned long adj) in tick_add_tick() argument 160 : "r" (adj)); in tick_add_tick() 250 static unsigned long stick_add_tick(unsigned long adj) in stick_add_tick() argument 258 : "r" (adj)); in stick_add_tick() 263 static int stick_add_compare(unsigned long adj) in stick_add_compare() argument 273 : "r" (orig_tick + adj)); in stick_add_compare() 279 return ((long)(new_tick - (orig_tick+adj))) > in stick_add_compare() 392 hbtick_add_tick(unsigned long adj) hbtick_add_tick() argument 402 hbtick_add_compare(unsigned long adj) hbtick_add_compare() argument [all...] |
/kernel/linux/linux-5.10/drivers/block/drbd/ |
H A D | drbd_vli.h | 136 u64 adj = 1; in vli_decode_bits() local 141 *out = ((in & ((~0ULL) >> (64-t))) >> b) + adj; \ in vli_decode_bits() 144 adj += 1ULL << (t - b); \ in vli_decode_bits() 159 u64 adj = 1; in __vli_encode_bits() local 168 *out = ((in - adj) << b) | v; \ in __vli_encode_bits() 171 adj = max + 1; \ in __vli_encode_bits()
|
/kernel/linux/linux-6.6/drivers/block/drbd/ |
H A D | drbd_vli.h | 136 u64 adj = 1; in vli_decode_bits() local 141 *out = ((in & ((~0ULL) >> (64-t))) >> b) + adj; \ in vli_decode_bits() 144 adj += 1ULL << (t - b); \ in vli_decode_bits() 159 u64 adj = 1; in __vli_encode_bits() local 168 *out = ((in - adj) << b) | v; \ in __vli_encode_bits() 171 adj = max + 1; \ in __vli_encode_bits()
|
/kernel/linux/linux-5.10/drivers/interconnect/imx/ |
H A D | imx.c | 37 freq = (node->avg_bw + node->peak_bw) * node_data->desc->adj->bw_mul; in imx_icc_node_set() 38 do_div(freq, node_data->desc->adj->bw_div); in imx_icc_node_set() 82 const struct imx_icc_node_adj_desc *adj = node_data->desc->adj; in imx_icc_node_init_qos() local 87 if (adj->main_noc) { in imx_icc_node_init_qos() 92 dn = of_parse_phandle(dev->of_node, adj->phandle_name, 0); in imx_icc_node_init_qos() 95 adj->phandle_name); in imx_icc_node_init_qos() 101 adj->phandle_name, node->name); in imx_icc_node_init_qos() 154 if (node_desc->adj) { in imx_icc_node_add()
|
/kernel/linux/linux-6.6/drivers/interconnect/imx/ |
H A D | imx.c | 70 freq = (node->avg_bw + node->peak_bw) * node_data->desc->adj->bw_mul; in imx_icc_node_set() 71 do_div(freq, node_data->desc->adj->bw_div); in imx_icc_node_set() 121 const struct imx_icc_node_adj_desc *adj = node_data->desc->adj; in imx_icc_node_init_qos() local 126 if (adj->main_noc) { in imx_icc_node_init_qos() 131 dn = of_parse_phandle(dev->of_node, adj->phandle_name, 0); in imx_icc_node_init_qos() 134 adj->phandle_name); in imx_icc_node_init_qos() 140 adj->phandle_name, node->name); in imx_icc_node_init_qos() 197 if (node_desc->adj) { in imx_icc_node_add()
|
/kernel/linux/linux-6.6/drivers/ptp/ |
H A D | ptp_mock.c | 16 * and thus "adj" between -68,719,476 and 68,719,476 29 * 64-bit overflow during the multiplication with cc->mult, given the max "adj" 52 s64 adj; in mock_phc_adjfine() local 54 adj = (s64)scaled_ppm << MOCK_PHC_FADJ_SHIFT; in mock_phc_adjfine() 55 adj = div_s64(adj, MOCK_PHC_FADJ_DENOMINATOR); in mock_phc_adjfine() 59 phc->cc.mult = MOCK_PHC_CC_MULT + adj; in mock_phc_adjfine()
|
/kernel/linux/linux-5.10/drivers/ide/ |
H A D | pdc202xx_new.c | 131 u8 adj = (drive->dn & 1) ? 0x08 : 0x00; in pdcnew_set_dma_mode() local 146 set_indexed_reg(hwif, 0x10 + adj, in pdcnew_set_dma_mode() 148 set_indexed_reg(hwif, 0x11 + adj, in pdcnew_set_dma_mode() 150 set_indexed_reg(hwif, 0x12 + adj, in pdcnew_set_dma_mode() 153 set_indexed_reg(hwif, 0x0e + adj, in pdcnew_set_dma_mode() 155 set_indexed_reg(hwif, 0x0f + adj, in pdcnew_set_dma_mode() 160 u8 tmp = get_indexed_reg(hwif, 0x10 + adj); in pdcnew_set_dma_mode() 162 set_indexed_reg(hwif, 0x10 + adj, tmp & 0x7f); in pdcnew_set_dma_mode() 169 u8 adj = (drive->dn & 1) ? 0x08 : 0x00; in pdcnew_set_pio_mode() local 173 set_indexed_reg(hwif, 0x0c + adj, pio_timing in pdcnew_set_pio_mode() [all...] |
/kernel/linux/linux-5.10/drivers/gpu/drm/armada/ |
H A D | armada_crtc.c | 200 const struct drm_display_mode *mode, struct drm_display_mode *adj) in armada_drm_crtc_mode_fixup() 210 drm_mode_set_crtcinfo(adj, CRTC_INTERLACE_HALVE_V); in armada_drm_crtc_mode_fixup() 216 if (armada_drm_crtc_mode_valid(crtc, adj) != MODE_OK) in armada_drm_crtc_mode_fixup() 220 ret = dcrtc->variant->compute_clock(dcrtc, adj, NULL); in armada_drm_crtc_mode_fixup() 332 struct drm_display_mode *adj = &crtc->state->adjusted_mode; in armada_drm_crtc_mode_set_nofb() local 338 bool interlaced = !!(adj->flags & DRM_MODE_FLAG_INTERLACE); in armada_drm_crtc_mode_set_nofb() 341 rm = adj->crtc_hsync_start - adj->crtc_hdisplay; in armada_drm_crtc_mode_set_nofb() 342 lm = adj->crtc_htotal - adj in armada_drm_crtc_mode_set_nofb() 199 armada_drm_crtc_mode_fixup(struct drm_crtc *crtc, const struct drm_display_mode *mode, struct drm_display_mode *adj) armada_drm_crtc_mode_fixup() argument [all...] |
/kernel/linux/linux-6.6/drivers/gpu/drm/armada/ |
H A D | armada_crtc.c | 199 const struct drm_display_mode *mode, struct drm_display_mode *adj) in armada_drm_crtc_mode_fixup() 209 drm_mode_set_crtcinfo(adj, CRTC_INTERLACE_HALVE_V); in armada_drm_crtc_mode_fixup() 215 if (armada_drm_crtc_mode_valid(crtc, adj) != MODE_OK) in armada_drm_crtc_mode_fixup() 219 ret = dcrtc->variant->compute_clock(dcrtc, adj, NULL); in armada_drm_crtc_mode_fixup() 331 struct drm_display_mode *adj = &crtc->state->adjusted_mode; in armada_drm_crtc_mode_set_nofb() local 337 bool interlaced = !!(adj->flags & DRM_MODE_FLAG_INTERLACE); in armada_drm_crtc_mode_set_nofb() 340 rm = adj->crtc_hsync_start - adj->crtc_hdisplay; in armada_drm_crtc_mode_set_nofb() 341 lm = adj->crtc_htotal - adj in armada_drm_crtc_mode_set_nofb() 198 armada_drm_crtc_mode_fixup(struct drm_crtc *crtc, const struct drm_display_mode *mode, struct drm_display_mode *adj) armada_drm_crtc_mode_fixup() argument [all...] |
/kernel/linux/linux-5.10/drivers/net/ethernet/mscc/ |
H A D | ocelot_ptp.c | 127 u64 adj = 0; in ocelot_ptp_adjfine() local 139 adj = PSEC_PER_SEC << 16; in ocelot_ptp_adjfine() 140 do_div(adj, scaled_ppm); in ocelot_ptp_adjfine() 141 do_div(adj, 1000); in ocelot_ptp_adjfine() 144 if (adj >= (1L << 30)) { in ocelot_ptp_adjfine() 146 do_div(adj, 1000); in ocelot_ptp_adjfine() 150 if (adj >= (1L << 30)) in ocelot_ptp_adjfine() 153 ocelot_write(ocelot, unit | adj, PTP_CLK_CFG_ADJ_FREQ); in ocelot_ptp_adjfine()
|
/kernel/linux/linux-5.10/drivers/net/ethernet/marvell/octeontx2/af/ |
H A D | ptp.c | 107 u64 adj; in ptp_adjfine() local 134 adj = comp * ppb; in ptp_adjfine() 135 adj = div_u64(adj, 1000000000ull); in ptp_adjfine() 136 comp = neg_adj ? comp - adj : comp + adj; in ptp_adjfine()
|
/kernel/linux/linux-5.10/arch/sh/boards/mach-dreamcast/ |
H A D | rtc.c | 65 u32 adj = secs + TWENTY_YEARS; in aica_rtc_settimeofday() local 68 __raw_writel((adj & 0xffff0000) >> 16, AICA_RTC_SECS_H); in aica_rtc_settimeofday() 69 __raw_writel((adj & 0xffff), AICA_RTC_SECS_L); in aica_rtc_settimeofday()
|