git: c880f12f5ac6 - main - xen/intr: correct misuses of Xen handle pointer type
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 28 Nov 2023 13:38:33 UTC
The branch main has been updated by royger:
URL: https://cgit.FreeBSD.org/src/commit/?id=c880f12f5ac6b1fe8b188e08862e8da829533fdb
commit c880f12f5ac6b1fe8b188e08862e8da829533fdb
Author: Elliott Mitchell <ehem+freebsd@m5p.com>
AuthorDate: 2022-07-23 22:30:45 +0000
Commit: Roger Pau Monné <royger@FreeBSD.org>
CommitDate: 2023-11-28 11:51:19 +0000
xen/intr: correct misuses of Xen handle pointer type
Fix a few spots where handle pointers were incorrectly used. Luckily
these appear rarely triggered given how long they've been lurking.
Fixes: 76acc41fb7c7 ("Implement vector callback for PVHVM and unify event channel implementations")
Fixes: 9f40021f288c ("Introduce a new, HVM compatible, paravirtualized timer driver for Xen.")
MFC after: 2 weeks
Reviewed by: royger
---
sys/dev/xen/bus/xen_intr.c | 4 ++--
sys/dev/xen/timer/xen_timer.c | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/sys/dev/xen/bus/xen_intr.c b/sys/dev/xen/bus/xen_intr.c
index db166a625610..b70b0fa835b6 100644
--- a/sys/dev/xen/bus/xen_intr.c
+++ b/sys/dev/xen/bus/xen_intr.c
@@ -866,7 +866,7 @@ xen_intr_bind_virq(device_t dev, u_int virq, u_int cpu,
if (error != 0) {
evtchn_close_t close = { .port = bind_virq.port };
- xen_intr_unbind(*port_handlep);
+ xen_intr_unbind(port_handlep);
if (HYPERVISOR_event_channel_op(EVTCHNOP_close, &close))
panic("EVTCHNOP_close failed");
return (error);
@@ -923,7 +923,7 @@ xen_intr_alloc_and_bind_ipi(u_int cpu, driver_filter_t filter,
if (error != 0) {
evtchn_close_t close = { .port = bind_ipi.port };
- xen_intr_unbind(*port_handlep);
+ xen_intr_unbind(port_handlep);
if (HYPERVISOR_event_channel_op(EVTCHNOP_close, &close))
panic("EVTCHNOP_close failed");
return (error);
diff --git a/sys/dev/xen/timer/xen_timer.c b/sys/dev/xen/timer/xen_timer.c
index 93cab090c596..f42ed5fd2525 100644
--- a/sys/dev/xen/timer/xen_timer.c
+++ b/sys/dev/xen/timer/xen_timer.c
@@ -84,7 +84,7 @@
struct xentimer_pcpu_data {
uint64_t timer;
uint64_t last_processed;
- void *irq_handle;
+ xen_intr_handle_t irq_handle;
};
DPCPU_DEFINE(struct xentimer_pcpu_data, xentimer_pcpu);