[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH v1 1/2] drivers/ehci-dbgp: remove use of run_in_exception_handle()
From: Denis Mukhin <dmukhin@xxxxxxxx> Polling is relevant for early boot only where facilities requiring run_in_exception_handler() are not used (e.g. 'd' keyhandler). Rework ehci_dbgp_poll() by droppping use of run_in_exception_handler(). The ground work for run_in_exception_handler() removal was done under XSA-453: https://xenbits.xen.org/xsa/advisory-453.html Suggested-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> Signed-off-by: Denis Mukhin <dmukhin@xxxxxxxx> --- xen/drivers/char/ehci-dbgp.c | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/xen/drivers/char/ehci-dbgp.c b/xen/drivers/char/ehci-dbgp.c index a5c79f56fcf4..ab70e53195eb 100644 --- a/xen/drivers/char/ehci-dbgp.c +++ b/xen/drivers/char/ehci-dbgp.c @@ -1245,17 +1245,13 @@ static int cf_check ehci_dbgp_getc(struct serial_port *port, char *pc) return 1; } -/* Safe: ehci_dbgp_poll() runs as timer handler, so not reentrant. */ -static struct serial_port *poll_port; - -static void cf_check _ehci_dbgp_poll(const struct cpu_user_regs *regs) +static void cf_check ehci_dbgp_poll(void *data) { - struct serial_port *port = poll_port; + struct serial_port *port = data; struct ehci_dbgp *dbgp = port->uart; unsigned long flags; unsigned int timeout = MICROSECS(DBGP_CHECK_INTERVAL); bool empty = false; - const struct cpu_user_regs *old_regs; if ( !dbgp->ehci_debug ) return; @@ -1271,17 +1267,12 @@ static void cf_check _ehci_dbgp_poll(const struct cpu_user_regs *regs) spin_unlock_irqrestore(&port->tx_lock, flags); } - /* Mimic interrupt context. */ - old_regs = set_irq_regs(regs); - if ( dbgp->in.chunk ) serial_rx_interrupt(port); if ( empty ) serial_tx_interrupt(port); - set_irq_regs(old_regs); - if ( spin_trylock_irqsave(&port->tx_lock, flags) ) { if ( dbgp->state == dbgp_idle && !dbgp->in.chunk && @@ -1298,12 +1289,6 @@ static void cf_check _ehci_dbgp_poll(const struct cpu_user_regs *regs) set_timer(&dbgp->timer, NOW() + timeout); } -static void cf_check ehci_dbgp_poll(void *data) -{ - poll_port = data; - run_in_exception_handler(_ehci_dbgp_poll); -} - static bool ehci_dbgp_setup_preirq(struct ehci_dbgp *dbgp) { if ( !ehci_dbgp_setup(dbgp) ) -- 2.34.1
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |