git: 61ccede8cf6c - main - xen: purge no longer used hypervisor functions
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 14 Apr 2023 14:00:50 UTC
The branch main has been updated by royger: URL: https://cgit.FreeBSD.org/src/commit/?id=61ccede8cf6cc1442ce531fe28c25fd000263fb5 commit 61ccede8cf6cc1442ce531fe28c25fd000263fb5 Author: Elliott Mitchell <ehem+freebsd@m5p.com> AuthorDate: 2022-03-07 23:23:23 +0000 Commit: Roger Pau Monné <royger@FreeBSD.org> CommitDate: 2023-04-14 13:58:47 +0000 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 <contrib/xen/hvm/dm_op.h> #include <machine/xen/hypercall.h> -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__ */