diff mbox series

[1/2] driver/char: Drop run_in_exception_handler() ifdefary

Message ID 20231215181433.1588532-2-andrew.cooper3@citrix.com (mailing list archive)
State New
Headers show
Series xen: run_in_exception_handler() cleanup | expand

Commit Message

Andrew Cooper Dec. 15, 2023, 6:14 p.m. UTC
Since commit 60a9b0715055 ("xen: introduce CONFIG_GENERIC_BUG_FRAME"), the new
common bug.h provides an implementation of run_in_exception_handler() in all
cases, making the #else here dead.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
---
CC: George Dunlap <George.Dunlap@citrix.com>
CC: Jan Beulich <JBeulich@suse.com>
CC: Stefano Stabellini <sstabellini@kernel.org>
CC: Wei Liu <wl@xen.org>
CC: Julien Grall <julien@xen.org>
CC: Federico Serafini <federico.serafini@bugseng.com>
---
 xen/drivers/char/ehci-dbgp.c | 4 ----
 xen/drivers/char/ns16550.c   | 4 ----
 2 files changed, 8 deletions(-)

Comments

Julien Grall Dec. 15, 2023, 6:20 p.m. UTC | #1
Hi Andrew,

On 15/12/2023 18:14, Andrew Cooper wrote:
> Since commit 60a9b0715055 ("xen: introduce CONFIG_GENERIC_BUG_FRAME"), the new
> common bug.h provides an implementation of run_in_exception_handler() in all
> cases, making the #else here dead.

This reminds me, I need to look at using CONFIG_GENERIC_BUG_FRAME for 
Arm. In the past, we had some issues compiling it.

> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>

Acked-by: Julien Grall <jgrall@amazon.com>

Cheers,
Stefano Stabellini Dec. 15, 2023, 9:02 p.m. UTC | #2
On Fri, 15 Dec 2023, Andrew Cooper wrote:
> Since commit 60a9b0715055 ("xen: introduce CONFIG_GENERIC_BUG_FRAME"), the new
> common bug.h provides an implementation of run_in_exception_handler() in all
> cases, making the #else here dead.
> 
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>

Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
diff mbox series

Patch

diff --git a/xen/drivers/char/ehci-dbgp.c b/xen/drivers/char/ehci-dbgp.c
index 0f5b41899ef5..bbf4e51c0263 100644
--- a/xen/drivers/char/ehci-dbgp.c
+++ b/xen/drivers/char/ehci-dbgp.c
@@ -1293,11 +1293,7 @@  static void cf_check _ehci_dbgp_poll(struct cpu_user_regs *regs)
 static void cf_check ehci_dbgp_poll(void *data)
 {
     poll_port = data;
-#ifdef run_in_exception_handler
     run_in_exception_handler(_ehci_dbgp_poll);
-#else
-    _ehci_dbgp_poll(guest_cpu_user_regs());
-#endif
 }
 
 static bool ehci_dbgp_setup_preirq(struct ehci_dbgp *dbgp)
diff --git a/xen/drivers/char/ns16550.c b/xen/drivers/char/ns16550.c
index c8a51ed66008..29691e8d3ae6 100644
--- a/xen/drivers/char/ns16550.c
+++ b/xen/drivers/char/ns16550.c
@@ -233,11 +233,7 @@  static void cf_check __ns16550_poll(struct cpu_user_regs *regs)
 static void cf_check ns16550_poll(void *data)
 {
     this_cpu(poll_port) = data;
-#ifdef run_in_exception_handler
     run_in_exception_handler(__ns16550_poll);
-#else
-    __ns16550_poll(guest_cpu_user_regs());
-#endif
 }
 
 static int cf_check ns16550_tx_ready(struct serial_port *port)