pit 58 arch/m68k/bvme6000/config.c volatile PitRegsPtr pit = (PitRegsPtr)BVME_PIT_BASE; pit 66 arch/m68k/bvme6000/config.c pit->pcddr |= 0x10; /* WDOG enable */ pit 88 arch/m68k/bvme6000/config.c volatile PitRegsPtr pit = (PitRegsPtr)BVME_PIT_BASE; pit 117 arch/m68k/bvme6000/config.c pit->pgcr = 0x00; /* Unidirectional 8 bit, no handshake for now */ pit 118 arch/m68k/bvme6000/config.c pit->psrr = 0x18; /* PIACK and PIRQ functions enabled */ pit 119 arch/m68k/bvme6000/config.c pit->pacr = 0x00; /* Sub Mode 00, H2 i/p, no DMA */ pit 120 arch/m68k/bvme6000/config.c pit->padr = 0x00; /* Just to be tidy! */ pit 121 arch/m68k/bvme6000/config.c pit->paddr = 0x00; /* All inputs for now (safest) */ pit 122 arch/m68k/bvme6000/config.c pit->pbcr = 0x80; /* Sub Mode 1x, H4 i/p, no DMA */ pit 123 arch/m68k/bvme6000/config.c pit->pbdr = 0xbc | (*config_reg_ptr & BVME_CONFIG_SW1 ? 0 : 0x40); pit 125 arch/m68k/bvme6000/config.c pit->pbddr = 0xf3; /* Mostly outputs */ pit 126 arch/m68k/bvme6000/config.c pit->pcdr = 0x01; /* PA transceiver disabled */ pit 127 arch/m68k/bvme6000/config.c pit->pcddr = 0x03; /* WDOG disable */ pit 238 arch/m68k/bvme6000/config.c volatile PitRegsPtr pit = (PitRegsPtr)BVME_PIT_BASE; pit 251 arch/m68k/bvme6000/config.c t1op = pit->pcdr & 0x04; pit 256 arch/m68k/bvme6000/config.c t1op != (pit->pcdr & 0x04) || pit 54 arch/x86/kvm/i8254.c static void pit_set_gate(struct kvm_pit *pit, int channel, u32 val) pit 56 arch/x86/kvm/i8254.c struct kvm_kpit_channel_state *c = &pit->pit_state.channels[channel]; pit 77 arch/x86/kvm/i8254.c static int pit_get_gate(struct kvm_pit *pit, int channel) pit 79 arch/x86/kvm/i8254.c return pit->pit_state.channels[channel].gate; pit 82 arch/x86/kvm/i8254.c static s64 __kpit_elapsed(struct kvm_pit *pit) pit 86 arch/x86/kvm/i8254.c struct kvm_kpit_state *ps = &pit->pit_state; pit 106 arch/x86/kvm/i8254.c static s64 kpit_elapsed(struct kvm_pit *pit, struct kvm_kpit_channel_state *c, pit 110 arch/x86/kvm/i8254.c return __kpit_elapsed(pit); pit 115 arch/x86/kvm/i8254.c static int pit_get_count(struct kvm_pit *pit, int channel) pit 117 arch/x86/kvm/i8254.c struct kvm_kpit_channel_state *c = &pit->pit_state.channels[channel]; pit 121 arch/x86/kvm/i8254.c t = kpit_elapsed(pit, c, channel); pit 142 arch/x86/kvm/i8254.c static int pit_get_out(struct kvm_pit *pit, int channel) pit 144 arch/x86/kvm/i8254.c struct kvm_kpit_channel_state *c = &pit->pit_state.channels[channel]; pit 148 arch/x86/kvm/i8254.c t = kpit_elapsed(pit, c, channel); pit 174 arch/x86/kvm/i8254.c static void pit_latch_count(struct kvm_pit *pit, int channel) pit 176 arch/x86/kvm/i8254.c struct kvm_kpit_channel_state *c = &pit->pit_state.channels[channel]; pit 179 arch/x86/kvm/i8254.c c->latched_count = pit_get_count(pit, channel); pit 184 arch/x86/kvm/i8254.c static void pit_latch_status(struct kvm_pit *pit, int channel) pit 186 arch/x86/kvm/i8254.c struct kvm_kpit_channel_state *c = &pit->pit_state.channels[channel]; pit 190 arch/x86/kvm/i8254.c c->status = ((pit_get_out(pit, channel) << 7) | pit 207 arch/x86/kvm/i8254.c struct kvm_pit *pit = pit_state_to_pit(ps); pit 215 arch/x86/kvm/i8254.c kthread_queue_work(pit->worker, &pit->expired); pit 220 arch/x86/kvm/i8254.c struct kvm_pit *pit = vcpu->kvm->arch.vpit; pit 223 arch/x86/kvm/i8254.c if (!kvm_vcpu_is_bsp(vcpu) || !pit) pit 226 arch/x86/kvm/i8254.c timer = &pit->pit_state.timer; pit 227 arch/x86/kvm/i8254.c mutex_lock(&pit->pit_state.lock); pit 230 arch/x86/kvm/i8254.c mutex_unlock(&pit->pit_state.lock); pit 233 arch/x86/kvm/i8254.c static void destroy_pit_timer(struct kvm_pit *pit) pit 235 arch/x86/kvm/i8254.c hrtimer_cancel(&pit->pit_state.timer); pit 236 arch/x86/kvm/i8254.c kthread_flush_work(&pit->expired); pit 241 arch/x86/kvm/i8254.c struct kvm_pit *pit = container_of(work, struct kvm_pit, expired); pit 242 arch/x86/kvm/i8254.c struct kvm *kvm = pit->kvm; pit 245 arch/x86/kvm/i8254.c struct kvm_kpit_state *ps = &pit->pit_state; pit 250 arch/x86/kvm/i8254.c kvm_set_irq(kvm, pit->irq_source_id, 0, 1, false); pit 251 arch/x86/kvm/i8254.c kvm_set_irq(kvm, pit->irq_source_id, 0, 0, false); pit 284 arch/x86/kvm/i8254.c static inline void kvm_pit_reset_reinject(struct kvm_pit *pit) pit 286 arch/x86/kvm/i8254.c atomic_set(&pit->pit_state.pending, 0); pit 287 arch/x86/kvm/i8254.c atomic_set(&pit->pit_state.irq_ack, 1); pit 290 arch/x86/kvm/i8254.c void kvm_pit_set_reinject(struct kvm_pit *pit, bool reinject) pit 292 arch/x86/kvm/i8254.c struct kvm_kpit_state *ps = &pit->pit_state; pit 293 arch/x86/kvm/i8254.c struct kvm *kvm = pit->kvm; pit 300 arch/x86/kvm/i8254.c kvm_pit_reset_reinject(pit); pit 302 arch/x86/kvm/i8254.c kvm_register_irq_mask_notifier(kvm, 0, &pit->mask_notifier); pit 305 arch/x86/kvm/i8254.c kvm_unregister_irq_mask_notifier(kvm, 0, &pit->mask_notifier); pit 311 arch/x86/kvm/i8254.c static void create_pit_timer(struct kvm_pit *pit, u32 val, int is_period) pit 313 arch/x86/kvm/i8254.c struct kvm_kpit_state *ps = &pit->pit_state; pit 314 arch/x86/kvm/i8254.c struct kvm *kvm = pit->kvm; pit 327 arch/x86/kvm/i8254.c kthread_flush_work(&pit->expired); pit 331 arch/x86/kvm/i8254.c kvm_pit_reset_reinject(pit); pit 354 arch/x86/kvm/i8254.c static void pit_load_count(struct kvm_pit *pit, int channel, u32 val) pit 356 arch/x86/kvm/i8254.c struct kvm_kpit_state *ps = &pit->pit_state; pit 381 arch/x86/kvm/i8254.c create_pit_timer(pit, val, 0); pit 385 arch/x86/kvm/i8254.c create_pit_timer(pit, val, 1); pit 388 arch/x86/kvm/i8254.c destroy_pit_timer(pit); pit 392 arch/x86/kvm/i8254.c void kvm_pit_load_count(struct kvm_pit *pit, int channel, u32 val, pit 397 arch/x86/kvm/i8254.c WARN_ON_ONCE(!mutex_is_locked(&pit->pit_state.lock)); pit 402 arch/x86/kvm/i8254.c saved_mode = pit->pit_state.channels[0].mode; pit 403 arch/x86/kvm/i8254.c pit->pit_state.channels[0].mode = 0xff; /* disable timer */ pit 404 arch/x86/kvm/i8254.c pit_load_count(pit, channel, val); pit 405 arch/x86/kvm/i8254.c pit->pit_state.channels[0].mode = saved_mode; pit 407 arch/x86/kvm/i8254.c pit_load_count(pit, channel, val); pit 431 arch/x86/kvm/i8254.c struct kvm_pit *pit = dev_to_pit(this); pit 432 arch/x86/kvm/i8254.c struct kvm_kpit_state *pit_state = &pit->pit_state; pit 456 arch/x86/kvm/i8254.c pit_latch_count(pit, channel); pit 458 arch/x86/kvm/i8254.c pit_latch_status(pit, channel); pit 466 arch/x86/kvm/i8254.c pit_latch_count(pit, channel); pit 483 arch/x86/kvm/i8254.c pit_load_count(pit, addr, val); pit 486 arch/x86/kvm/i8254.c pit_load_count(pit, addr, val << 8); pit 493 arch/x86/kvm/i8254.c pit_load_count(pit, addr, s->write_latch | (val << 8)); pit 507 arch/x86/kvm/i8254.c struct kvm_pit *pit = dev_to_pit(this); pit 508 arch/x86/kvm/i8254.c struct kvm_kpit_state *pit_state = &pit->pit_state; pit 545 arch/x86/kvm/i8254.c count = pit_get_count(pit, addr); pit 549 arch/x86/kvm/i8254.c count = pit_get_count(pit, addr); pit 553 arch/x86/kvm/i8254.c count = pit_get_count(pit, addr); pit 558 arch/x86/kvm/i8254.c count = pit_get_count(pit, addr); pit 577 arch/x86/kvm/i8254.c struct kvm_pit *pit = speaker_to_pit(this); pit 578 arch/x86/kvm/i8254.c struct kvm_kpit_state *pit_state = &pit->pit_state; pit 585 arch/x86/kvm/i8254.c pit_set_gate(pit, 2, val & 1); pit 594 arch/x86/kvm/i8254.c struct kvm_pit *pit = speaker_to_pit(this); pit 595 arch/x86/kvm/i8254.c struct kvm_kpit_state *pit_state = &pit->pit_state; pit 605 arch/x86/kvm/i8254.c ret = ((pit_state->speaker_data_on << 1) | pit_get_gate(pit, 2) | pit 606 arch/x86/kvm/i8254.c (pit_get_out(pit, 2) << 5) | (refresh_clock << 4)); pit 614 arch/x86/kvm/i8254.c static void kvm_pit_reset(struct kvm_pit *pit) pit 619 arch/x86/kvm/i8254.c pit->pit_state.flags = 0; pit 621 arch/x86/kvm/i8254.c c = &pit->pit_state.channels[i]; pit 624 arch/x86/kvm/i8254.c pit_load_count(pit, i, 0); pit 627 arch/x86/kvm/i8254.c kvm_pit_reset_reinject(pit); pit 632 arch/x86/kvm/i8254.c struct kvm_pit *pit = container_of(kimn, struct kvm_pit, mask_notifier); pit 635 arch/x86/kvm/i8254.c kvm_pit_reset_reinject(pit); pit 650 arch/x86/kvm/i8254.c struct kvm_pit *pit; pit 656 arch/x86/kvm/i8254.c pit = kzalloc(sizeof(struct kvm_pit), GFP_KERNEL_ACCOUNT); pit 657 arch/x86/kvm/i8254.c if (!pit) pit 660 arch/x86/kvm/i8254.c pit->irq_source_id = kvm_request_irq_source_id(kvm); pit 661 arch/x86/kvm/i8254.c if (pit->irq_source_id < 0) pit 664 arch/x86/kvm/i8254.c mutex_init(&pit->pit_state.lock); pit 670 arch/x86/kvm/i8254.c pit->worker = kthread_create_worker(0, "kvm-pit/%d", pid_nr); pit 671 arch/x86/kvm/i8254.c if (IS_ERR(pit->worker)) pit 674 arch/x86/kvm/i8254.c kthread_init_work(&pit->expired, pit_do_work); pit 676 arch/x86/kvm/i8254.c pit->kvm = kvm; pit 678 arch/x86/kvm/i8254.c pit_state = &pit->pit_state; pit 684 arch/x86/kvm/i8254.c pit->mask_notifier.func = pit_mask_notifer; pit 686 arch/x86/kvm/i8254.c kvm_pit_reset(pit); pit 688 arch/x86/kvm/i8254.c kvm_pit_set_reinject(pit, true); pit 691 arch/x86/kvm/i8254.c kvm_iodevice_init(&pit->dev, &pit_dev_ops); pit 693 arch/x86/kvm/i8254.c KVM_PIT_MEM_LENGTH, &pit->dev); pit 698 arch/x86/kvm/i8254.c kvm_iodevice_init(&pit->speaker_dev, &speaker_dev_ops); pit 701 arch/x86/kvm/i8254.c &pit->speaker_dev); pit 707 arch/x86/kvm/i8254.c return pit; pit 710 arch/x86/kvm/i8254.c kvm_io_bus_unregister_dev(kvm, KVM_PIO_BUS, &pit->dev); pit 713 arch/x86/kvm/i8254.c kvm_pit_set_reinject(pit, false); pit 714 arch/x86/kvm/i8254.c kthread_destroy_worker(pit->worker); pit 716 arch/x86/kvm/i8254.c kvm_free_irq_source_id(kvm, pit->irq_source_id); pit 718 arch/x86/kvm/i8254.c kfree(pit); pit 724 arch/x86/kvm/i8254.c struct kvm_pit *pit = kvm->arch.vpit; pit 726 arch/x86/kvm/i8254.c if (pit) { pit 728 arch/x86/kvm/i8254.c kvm_io_bus_unregister_dev(kvm, KVM_PIO_BUS, &pit->dev); pit 729 arch/x86/kvm/i8254.c kvm_io_bus_unregister_dev(kvm, KVM_PIO_BUS, &pit->speaker_dev); pit 731 arch/x86/kvm/i8254.c kvm_pit_set_reinject(pit, false); pit 732 arch/x86/kvm/i8254.c hrtimer_cancel(&pit->pit_state.timer); pit 733 arch/x86/kvm/i8254.c kthread_destroy_worker(pit->worker); pit 734 arch/x86/kvm/i8254.c kvm_free_irq_source_id(kvm, pit->irq_source_id); pit 735 arch/x86/kvm/i8254.c kfree(pit); pit 62 arch/x86/kvm/i8254.h void kvm_pit_load_count(struct kvm_pit *pit, int channel, u32 val, pit 64 arch/x86/kvm/i8254.h void kvm_pit_set_reinject(struct kvm_pit *pit, bool reinject); pit 4665 arch/x86/kvm/x86.c struct kvm_pit *pit = kvm->arch.vpit; pit 4667 arch/x86/kvm/x86.c mutex_lock(&pit->pit_state.lock); pit 4668 arch/x86/kvm/x86.c memcpy(&pit->pit_state.channels, ps, sizeof(*ps)); pit 4670 arch/x86/kvm/x86.c kvm_pit_load_count(pit, i, ps->channels[i].count, 0); pit 4671 arch/x86/kvm/x86.c mutex_unlock(&pit->pit_state.lock); pit 4691 arch/x86/kvm/x86.c struct kvm_pit *pit = kvm->arch.vpit; pit 4693 arch/x86/kvm/x86.c mutex_lock(&pit->pit_state.lock); pit 4694 arch/x86/kvm/x86.c prev_legacy = pit->pit_state.flags & KVM_PIT_FLAGS_HPET_LEGACY; pit 4698 arch/x86/kvm/x86.c memcpy(&pit->pit_state.channels, &ps->channels, pit 4699 arch/x86/kvm/x86.c sizeof(pit->pit_state.channels)); pit 4700 arch/x86/kvm/x86.c pit->pit_state.flags = ps->flags; pit 4702 arch/x86/kvm/x86.c kvm_pit_load_count(pit, i, pit->pit_state.channels[i].count, pit 4704 arch/x86/kvm/x86.c mutex_unlock(&pit->pit_state.lock); pit 4711 arch/x86/kvm/x86.c struct kvm_pit *pit = kvm->arch.vpit; pit 4713 arch/x86/kvm/x86.c if (!pit) pit 4720 arch/x86/kvm/x86.c mutex_lock(&pit->pit_state.lock); pit 4721 arch/x86/kvm/x86.c kvm_pit_set_reinject(pit, control->pit_reinject); pit 4722 arch/x86/kvm/x86.c mutex_unlock(&pit->pit_state.lock); pit 65 drivers/clocksource/jcore-pit.c static int jcore_pit_disable(struct jcore_pit *pit) pit 67 drivers/clocksource/jcore-pit.c writel(0, pit->base + REG_PITEN); pit 71 drivers/clocksource/jcore-pit.c static int jcore_pit_set(unsigned long delta, struct jcore_pit *pit) pit 73 drivers/clocksource/jcore-pit.c jcore_pit_disable(pit); pit 74 drivers/clocksource/jcore-pit.c writel(delta, pit->base + REG_THROT); pit 75 drivers/clocksource/jcore-pit.c writel(pit->enable_val, pit->base + REG_PITEN); pit 81 drivers/clocksource/jcore-pit.c struct jcore_pit *pit = container_of(ced, struct jcore_pit, ced); pit 83 drivers/clocksource/jcore-pit.c return jcore_pit_disable(pit); pit 88 drivers/clocksource/jcore-pit.c struct jcore_pit *pit = container_of(ced, struct jcore_pit, ced); pit 90 drivers/clocksource/jcore-pit.c return jcore_pit_disable(pit); pit 95 drivers/clocksource/jcore-pit.c struct jcore_pit *pit = container_of(ced, struct jcore_pit, ced); pit 97 drivers/clocksource/jcore-pit.c return jcore_pit_set(pit->periodic_delta, pit); pit 103 drivers/clocksource/jcore-pit.c struct jcore_pit *pit = container_of(ced, struct jcore_pit, ced); pit 105 drivers/clocksource/jcore-pit.c return jcore_pit_set(delta, pit); pit 110 drivers/clocksource/jcore-pit.c struct jcore_pit *pit = this_cpu_ptr(jcore_pit_percpu); pit 115 drivers/clocksource/jcore-pit.c buspd = readl(pit->base + REG_BUSPD); pit 117 drivers/clocksource/jcore-pit.c pit->periodic_delta = DIV_ROUND_CLOSEST(NSEC_PER_SEC, HZ * buspd); pit 119 drivers/clocksource/jcore-pit.c clockevents_config_and_register(&pit->ced, freq, 1, ULONG_MAX); pit 126 drivers/clocksource/jcore-pit.c struct jcore_pit *pit = this_cpu_ptr(dev_id); pit 128 drivers/clocksource/jcore-pit.c if (clockevent_state_oneshot(&pit->ced)) pit 129 drivers/clocksource/jcore-pit.c jcore_pit_disable(pit); pit 131 drivers/clocksource/jcore-pit.c pit->ced.event_handler(&pit->ced); pit 219 drivers/clocksource/jcore-pit.c struct jcore_pit *pit = per_cpu_ptr(jcore_pit_percpu, cpu); pit 221 drivers/clocksource/jcore-pit.c pit->base = of_iomap(node, cpu); pit 222 drivers/clocksource/jcore-pit.c if (!pit->base) { pit 227 drivers/clocksource/jcore-pit.c pit->ced.name = "jcore_pit"; pit 228 drivers/clocksource/jcore-pit.c pit->ced.features = CLOCK_EVT_FEAT_PERIODIC pit 231 drivers/clocksource/jcore-pit.c pit->ced.cpumask = cpumask_of(cpu); pit 232 drivers/clocksource/jcore-pit.c pit->ced.rating = 400; pit 233 drivers/clocksource/jcore-pit.c pit->ced.irq = pit_irq; pit 234 drivers/clocksource/jcore-pit.c pit->ced.set_state_shutdown = jcore_pit_set_state_shutdown; pit 235 drivers/clocksource/jcore-pit.c pit->ced.set_state_periodic = jcore_pit_set_state_periodic; pit 236 drivers/clocksource/jcore-pit.c pit->ced.set_state_oneshot = jcore_pit_set_state_oneshot; pit 237 drivers/clocksource/jcore-pit.c pit->ced.set_next_event = jcore_pit_set_next_event; pit 239 drivers/clocksource/jcore-pit.c pit->enable_val = enable_val;