Lines Matching full:time
23 #include <linux/time-internal.h>
53 panic("time-travel: time goes backwards %lld -> %lld\n", in time_travel_set_time()
74 printk(KERN_INFO "time-travel: received broadcast 0x%llx\n", bc_message); in _time_travel_print_bc_msg()
138 msg->time & UM_TIMETRAVEL_START_ACK_ID); in time_travel_handle_message()
147 panic("time-travel external link is broken\n"); in time_travel_handle_message()
149 panic("invalid time-travel message - %d bytes\n", ret); in time_travel_handle_message()
153 WARN_ONCE(1, "time-travel: unexpected message %lld\n", in time_travel_handle_message()
159 time_travel_set_time(msg->time); in time_travel_handle_message()
173 _time_travel_ext_free_until = msg->time; in time_travel_handle_message()
176 bc_message = msg->time; in time_travel_handle_message()
185 static u64 time_travel_ext_req(u32 op, u64 time) in time_travel_ext_req() argument
191 .time = time, in time_travel_ext_req()
205 * current time (for UM_TIMETRAVEL_GET) and getting another in time_travel_ext_req()
206 * ACK without a time would confuse us a lot! in time_travel_ext_req()
225 panic("time-travel: ACK message has different seqno! op=%d, seq=%d != %d time=%lld\n", in time_travel_ext_req()
226 msg.op, msg.seq, mseq, msg.time); in time_travel_ext_req()
229 time_travel_set_time(msg.time); in time_travel_ext_req()
233 return msg.time; in time_travel_ext_req()
253 static void time_travel_ext_update_request(unsigned long long time) in time_travel_ext_update_request() argument
258 /* asked for exactly this time previously */ in time_travel_ext_update_request()
260 time == time_travel_ext_prev_request) in time_travel_ext_update_request()
271 time < (*time_travel_ext_free_until - time_travel_shm_offset)) in time_travel_ext_update_request()
274 time_travel_ext_prev_request = time; in time_travel_ext_update_request()
285 time += time_travel_shm_offset; in time_travel_ext_update_request()
286 time_travel_shm_client->req_time = time; in time_travel_ext_update_request()
287 if (time < time_travel_shm->free_until) in time_travel_ext_update_request()
288 time_travel_shm->free_until = time; in time_travel_ext_update_request()
293 time_travel_ext_req(UM_TIMETRAVEL_REQUEST, time); in time_travel_ext_update_request()
302 panic("time-travel: setting time while not running\n"); in __time_travel_propagate_time()
317 static bool time_travel_ext_request(unsigned long long time) in time_travel_ext_request() argument
328 time < (*time_travel_ext_free_until - time_travel_shm_offset)) in time_travel_ext_request()
331 time_travel_ext_update_request(time); in time_travel_ext_request()
389 unsigned long long time) in __time_travel_add_event() argument
399 e->time = time; in __time_travel_add_event()
404 * Add the new entry before one with higher time, in __time_travel_add_event()
410 if ((tmp->time > e->time) || in __time_travel_add_event()
411 (tmp->time == e->time && tmp->onstack && e->onstack)) { in __time_travel_add_event()
422 time_travel_ext_update_request(tmp->time); in __time_travel_add_event()
423 time_travel_next_event = tmp->time; in __time_travel_add_event()
428 unsigned long long time) in time_travel_add_event() argument
433 __time_travel_add_event(e, time); in time_travel_add_event()
530 __time_travel_update_time(e->time, idle); in time_travel_update_time()
535 BUG_ON(time_travel_time != e->time); in time_travel_update_time()
541 panic("On-stack event dequeued outside of the stack! time=%lld, event time=%lld, event=%pS\n", in time_travel_update_time()
542 time_travel_time, e->time, e); in time_travel_update_time()
549 time_travel_ext_update_request(e->time); in time_travel_update_time()
560 * Disable interrupts before calculating the new time so in time_travel_update_time_rel()
562 * a bad time e.g. after we read time_travel_time but in time_travel_update_time_rel()
563 * before we've completed updating the time. in time_travel_update_time_rel()
589 * same time (again) to run the interrupt... in time_travel_add_irq_event()
623 os_timer_one_shot(time_travel_timer_event.time - next); in time_travel_sleep()
659 panic("time-travel: invalid external ID in string '%s'\n", in time_travel_connect_external()
669 panic("time-travel: failed to connect to external socket %s\n", in time_travel_connect_external()
689 /* controller gave us the *current* time, so adjust by that */ in time_travel_set_start()
732 extern u64 time_travel_ext_req(u32 op, u64 time);
735 #define time_travel_add_event(e, time) do { } while (0) argument
746 * In basic time-travel mode we still get real interrupts in timer_handler()
747 * (signals) but since we don't read time from the OS, we in timer_handler()
748 * must update the simulated time here to the expiry when in timer_handler()
855 * stuck in loops that expect time to move more than the in timer_read()
939 timer_clockevent.name = "time-travel-timer-infcpu"; in setup_time_travel()
940 timer_clocksource.name = "time-travel-clock"; in setup_time_travel()
946 timer_clockevent.name = "time-travel-timer-external"; in setup_time_travel()
947 timer_clocksource.name = "time-travel-clock-external"; in setup_time_travel()
953 timer_clockevent.name = "time-travel-timer"; in setup_time_travel()
954 timer_clocksource.name = "time-travel-clock"; in setup_time_travel()
961 __setup("time-travel", setup_time_travel);
963 "time-travel\n"
964 "This option just enables basic time travel mode, in which the clock/timers\n"
966 "waiting for real time to elapse. However, instance CPU speed is limited by\n"
970 "time-travel=inf-cpu\n"
971 "This enables time travel mode with infinite processing power, in which there\n"
977 "time-travel=ext:[ID:]/path/to/socket\n"
978 "This enables time travel mode similar to =inf-cpu, except the system will\n"
980 "have more than one system simultaneously be on simulated time. The virtio\n"
997 __setup("time-travel-start=", setup_time_travel_start);
999 "time-travel-start=<nanoseconds>\n"
1001 "the host's wall clock at the time of UML boot.\n");
1021 pr_info("um: time: sent broadcast message: 0x%llx\n", bc_message); in bc_store()
1032 bc_time_kobject = kobject_create_and_add("um-ext-time", kernel_kobj); in um_bc_start()