tsc
CFATTACH_DECL_NEW(tsc, 0, tscmatch, tscattach, NULL, NULL);
tsc->tsc_clk = fdtbus_clock_get_index(faa->faa_phandle, 0);
tsc->tsc_rst = fdtbus_reset_get(faa->faa_phandle, "serial");
if (tsc->tsc_clk == NULL) {
sc->sc_frequency = clk_get_rate(tsc->tsc_clk);
tsc->tsc_ih = fdtbus_intr_establish_xname(faa->faa_phandle, 0,
if (tsc->tsc_ih == NULL) {
struct tegra_com_softc * const tsc = device_private(self);
struct com_softc * const sc = &tsc->tsc_sc;
bus_space_unmap(tsc->sc_iot, tsc->sc_idxh, 1);
bus_space_unmap(tsc->sc_iot, tsc->sc_dath, 1);
struct tsrtc_softc *tsc = device_private(self);
struct mc146818_softc *sc = &tsc->sc_mc;
tsc->sc_iot = aa->ta_iot;
if (bus_space_map(tsc->sc_iot, TS7XXX_IO8_HWBASE + TS7XXX_RTCIDX,
1, 0, &tsc->sc_idxh))
if (bus_space_map(tsc->sc_iot, TS7XXX_IO8_HWBASE + TS7XXX_RTCDAT,
1, 0, &tsc->sc_dath))
struct tsrtc_softc tsrtc, *tsc;
tsc = &tsrtc;
sc = &tsc->sc_mc;
tsc->sc_iot = aa->ta_iot;
if (bus_space_map(tsc->sc_iot, TS7XXX_IO8_HWBASE + TS7XXX_RTCIDX, 1, 0,
&tsc->sc_idxh))
if (bus_space_map(tsc->sc_iot, TS7XXX_IO8_HWBASE + TS7XXX_RTCDAT, 1, 0,
&tsc->sc_dath))
uint64_t disc, ret, tsc;
tsc = cpu_counter();
"a" (tsc), "r" (scale));
uint64_t tsc;
tsc = tsc_dummy_cacheline;
tsc += rdtsc();
(void)atomic_swap_64(&tsc_sync_val, tsc);
uint64_t raw_systime_ns, tsc_timestamp, tsc, delta_tsc, delta_ns;
tsc = rdtsc();
if (__predict_false(tsc < tsc_timestamp)) {
tsc_to_system_mul, tsc_shift, /*delta_ns*/0, tsc,
tsc, tsc_timestamp, tsc_timestamp - tsc);
delta_tsc = tsc - tsc_timestamp;
tsc_to_system_mul, tsc_shift, delta_ns, tsc,
tsc_to_system_mul, tsc_shift, delta_ns, tsc,
tsc_to_system_mul, tsc_shift, delta_ns, tsc,
raw_systime_ns, tsc_timestamp, tsc, tsc_to_system_mul,
uint64_t tsc_start, last_tsc, tsc;
tsc = rdtsc();
if (__predict_false(tsc < last_tsc))
if (xen_tsc_to_ns_delta(tsc - tsc_start,
last_tsc = tsc;
dm_target_snapshot_config_t *tsc;
tsc = kmem_alloc(sizeof(*tsc), KM_SLEEP);
tsc->tsc_persistent_dev = 0;
tsc->tsc_persistent_dev = 1;
kmem_free(tsc, sizeof(*tsc));
tsc->tsc_chunk_size = atoi64(argv[3]);
tsc->tsc_snap_dev = dmp_snap;
tsc->tsc_cow_dev = dmp_cow;
table_en->target_config = tsc;
dm_target_snapshot_config_t *tsc;
tsc = target_config;
for (i = tsc->tsc_chunk_size; i != 0; i /= 10)
if (tsc->tsc_persistent_dev)
cow_len = strlen(tsc->tsc_cow_dev->name);
prm_len = strlen(tsc->tsc_snap_dev->name) + cow_len + count + 5;
printf("%s %s %s %" PRIu64 "\n", tsc->tsc_snap_dev->name,
tsc->tsc_cow_dev->name, tsc->tsc_persistent_dev ? "p" : "n",
tsc->tsc_chunk_size);
snprintf(params, prm_len, "%s %s %s %" PRIu64, tsc->tsc_snap_dev->name,
tsc->tsc_persistent_dev ? tsc->tsc_cow_dev->name : "",
tsc->tsc_persistent_dev ? "p" : "n",
tsc->tsc_chunk_size);
dm_target_snapshot_config_t *tsc = table_en->target_config;
dm_pdev_decr(tsc->tsc_snap_dev);
if (tsc->tsc_persistent_dev)
dm_pdev_decr(tsc->tsc_cow_dev);
kmem_free(tsc, sizeof(*tsc));
dm_target_stripe_fini(dm_target_stripe_config_t *tsc)
if (tsc == NULL)
while ((tlc = TAILQ_FIRST(&tsc->stripe_devs)) != NULL) {
TAILQ_REMOVE(&tsc->stripe_devs, tlc, entries);
kmem_free(tsc, sizeof(*tsc));
dm_target_stripe_config_t *tsc;
tsc = kmem_alloc(sizeof(*tsc), KM_SLEEP);
TAILQ_INIT(&tsc->stripe_devs);
tsc->stripe_chunksize = atoi64(argv[1]);
tsc->stripe_num = (uint8_t) atoi64(argv[0]);
strpc = DM_STRIPE_DEV_OFFSET + (tsc->stripe_num * 2);
dm_target_stripe_fini(tsc);
TAILQ_INSERT_TAIL(&tsc->stripe_devs, tlc, entries);
table_en->target_config = tsc;
dm_target_stripe_config_t *tsc;
tsc = target_config;
ret = snprintf(ptr, len, "%d ", tsc->stripe_num);
TAILQ_FOREACH(tlc, &tsc->stripe_devs, entries) {
dm_target_stripe_config_t *tsc;
tsc = target_config;
tsc->stripe_num, tsc->stripe_chunksize);
TAILQ_FOREACH(tlc, &tsc->stripe_devs, entries) {
dm_target_stripe_config_t *tsc;
tsc = table_en->target_config;
if (tsc == NULL)
stripe = blkno / tsc->stripe_chunksize;
stripe_off = blkno % tsc->stripe_chunksize;
stripe_devnr = stripe % tsc->stripe_num;
stripe_blknr = stripe / tsc->stripe_num;
stripe_rest = tsc->stripe_chunksize - stripe_off;
nestbuf->b_blkno = stripe_blknr * tsc->stripe_chunksize + stripe_off;
tlc = TAILQ_FIRST(&tsc->stripe_devs);
dm_target_stripe_config_t *tsc;
tsc = table_en->target_config;
TAILQ_FOREACH(tlc, &tsc->stripe_devs, entries) {
dm_target_stripe_config_t *tsc;
tsc = table_en->target_config;
if (tsc != NULL) {
TAILQ_FOREACH(tlc, &tsc->stripe_devs, entries) {
struct tlphy_softc *tsc = device_private(self);
struct mii_softc *sc = &tsc->sc_mii;
tsc->sc_tlphycap = tlsc->tl_product->tp_tlphymedia;
if ((tsc->sc_tlphycap & TLPHY_MEDIA_NO_10_T) == 0) {
if (tsc->sc_tlphycap) {
if (tsc->sc_tlphycap & TLPHY_MEDIA_10_2) {
} else if (tsc->sc_tlphycap & TLPHY_MEDIA_10_5) {
struct tlphy_softc *tsc = (struct tlphy_softc *)sc;
if ((sc->mii_flags & MIIF_DOINGAUTO) == 0 && tsc->sc_need_acomp)
tlphy_acomp(tsc);
(void) tlphy_auto(tsc);
tlphy_auto(tsc);
struct tlphy_softc *tsc = (struct tlphy_softc *)sc;
if (tsc->sc_tlphycap & TLPHY_MEDIA_10_2)
else if (tsc->sc_tlphycap & TLPHY_MEDIA_10_5)
tlphy_auto(struct tlphy_softc *tsc)
struct mii_softc *sc = &tsc->sc_mii;
tsc->sc_need_acomp = 1;
tlphy_acomp(tsc);
tlphy_acomp(struct tlphy_softc *tsc)
struct mii_softc *sc = &tsc->sc_mii;
tsc->sc_need_acomp = 0;
uint64_t tsc;
struct slhci_tcu_softc *tsc = device_private(self);
struct slhci_softc *sc = &tsc->sc;