irqreturn_t
rtc_timer_interrupt(int irq, void *dev)
{ int cpu = smp_processor_id(); struct clock_event_device *ce = &per_cpu(cpu_ce, cpu);
/* Don't run the hook for UNUSED or SHUTDOWN. */ if (likely(clockevent_state_periodic(ce)))
ce->event_handler(ce);
if (test_irq_work_pending()) {
clear_irq_work_pending();
irq_work_run();
}
return IRQ_HANDLED;
}
staticint
rtc_ce_set_next_event(unsignedlong evt, struct clock_event_device *ce)
{ /* This hook is for oneshot mode, which we don't support. */ return -EINVAL;
}
staticvoid __init
init_rtc_clockevent(void)
{ int cpu = smp_processor_id(); struct clock_event_device *ce = &per_cpu(cpu_ce, cpu);
staticint qemu_ce_shutdown(struct clock_event_device *ce)
{ /* The mode member of CE is updated for us in generic code.
Just make sure that the event is disabled. */
qemu_set_alarm_abs(0); return0;
}
/* Validate a computed cycle counter result against the known bounds for thegivenprocessorcore.There'stoomuchbrokennessinthewayof timinghardwareforanyonemethodtoworkeverywhere.:-(
Return 0 if the result cannot be trusted, otherwise return the argument. */
/* The Linux interpretation of the CMOS clock register contents: WhentheUpdate-In-Progress(UIP)flaggoesfrom1to0,the RTCregistersshowthesecondwhichhaspreciselyjuststarted.
Let's hope other operating systems interpret the RTC the same way. */
staticunsignedlong __init
rpcc_after_update_in_progress(void)
{ do { } while (!(CMOS_READ(RTC_FREQ_SELECT) & RTC_UIP)); do { } while (CMOS_READ(RTC_FREQ_SELECT) & RTC_UIP);
cycle_freq = hwrpb->cycle_freq; if (est_cycle_freq) { /* If the given value is within 250 PPM of what we calculated,
accept it. Otherwise, use what we found. */
tolerance = cycle_freq / 4000;
diff = cycle_freq - est_cycle_freq; if (diff < 0)
diff = -diff; if ((unsignedlong)diff > tolerance) {
cycle_freq = est_cycle_freq;
printk("HWRPB cycle frequency bogus. " "Estimated %lu Hz\n", cycle_freq);
} else {
est_cycle_freq = 0;
}
} elseif (! validate_cc_value (cycle_freq)) {
printk("HWRPB cycle frequency bogus, " "and unable to estimate a proper value!\n");
}
/* See above for restrictions on using clocksource_rpcc. */ #ifndef CONFIG_ALPHA_WTINT if (hwrpb->nr_processors == 1)
clocksource_register_hz(&clocksource_rpcc, cycle_freq); #endif
/* Startup the timer source. */
alpha_mv.init_rtc();
init_rtc_clockevent();
}
/* Initialize the clock_event_device for secondary cpus. */ #ifdef CONFIG_SMP void __init
init_clockevent(void)
{ if (alpha_using_qemu)
init_qemu_clockevent(); else
init_rtc_clockevent();
} #endif
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.9 Sekunden
(vorverarbeitet am 2026-06-10)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.