From 61ccede8cf6cc1442ce531fe28c25fd000263fb5 Mon Sep 17 00:00:00 2001 From: Elliott Mitchell Date: Mon, 7 Mar 2022 15:23:23 -0800 Subject: [PATCH] xen: purge no longer used hypervisor functions HYPERVISOR_poll(), HYPERVISOR_block(), and HYPERVISOR_crash() appear no longer used. Further get_system_time() appears to have disappeared at some point in the past, so HYPERVISOR_poll() was broken anyway. No functional change intended. Reviewed by: royger --- sys/xen/hypervisor.h | 44 -------------------------------------------- 1 file changed, 44 deletions(-) diff --git a/sys/xen/hypervisor.h b/sys/xen/hypervisor.h index c42956d253c2..4e79423c3a8e 100644 --- a/sys/xen/hypervisor.h +++ b/sys/xen/hypervisor.h @@ -23,8 +23,6 @@ #include #include -extern uint64_t get_system_time(int ticks); - static inline int HYPERVISOR_console_write(const char *str, int count) { @@ -43,19 +41,6 @@ HYPERVISOR_yield(void) return (rc); } -static inline int -HYPERVISOR_block( - void) -{ - int rc = HYPERVISOR_sched_op(SCHEDOP_block, NULL); - -#if CONFIG_XEN_COMPAT <= 0x030002 - if (rc == -ENOXENSYS) - rc = HYPERVISOR_sched_op_compat(SCHEDOP_block, 0); -#endif - return (rc); -} - static inline void HYPERVISOR_shutdown(unsigned int reason) { @@ -69,33 +54,4 @@ HYPERVISOR_shutdown(unsigned int reason) #endif } -static inline void -HYPERVISOR_crash(void) -{ - HYPERVISOR_shutdown(SHUTDOWN_crash); - /* NEVER REACHED */ - for (;;) ; /* eliminate noreturn error */ -} - -/* Transfer control to hypervisor until an event is detected on one */ -/* of the specified ports or the specified number of ticks elapse */ -static inline int -HYPERVISOR_poll( - evtchn_port_t *ports, unsigned int nr_ports, int ticks) -{ - int rc; - struct sched_poll sched_poll = { - .nr_ports = nr_ports, - .timeout = get_system_time(ticks) - }; - set_xen_guest_handle(sched_poll.ports, ports); - - rc = HYPERVISOR_sched_op(SCHEDOP_poll, &sched_poll); -#if CONFIG_XEN_COMPAT <= 0x030002 - if (rc == -ENOXENSYS) - rc = HYPERVISOR_sched_op_compat(SCHEDOP_yield, 0); -#endif - return (rc); -} - #endif /* __XEN_HYPERVISOR_H__ */