Date: Tue, 28 Nov 2023 13:38:34 GMT From: Roger Pau =?utf-8?Q?Monn=C3=A9?= <royger@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 54a0b7203c30 - main - xen/apic: remove passing trapframe as argument Message-ID: <202311281338.3ASDcYjd025324@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by royger: URL: https://cgit.FreeBSD.org/src/commit/?id=54a0b7203c30bfa5134ffc21f01c2e106f15e842 commit 54a0b7203c30bfa5134ffc21f01c2e106f15e842 Author: Elliott Mitchell <ehem+freebsd@m5p.com> AuthorDate: 2021-10-08 21:43:26 +0000 Commit: Roger Pau Monné <royger@FreeBSD.org> CommitDate: 2023-11-28 12:22:30 +0000 xen/apic: remove passing trapframe as argument While otherwise a handy potential approach, getting the trapframe via the argument isn't documented and isn't supposed to be used. While ipi_bitmap_handler() and ipi_swi_handler() need to be passed the trapframe as their arguments, the Xen functions can retrieve it from curthread->td_intr_frame, which is the proper way. Reviewed by: royger --- sys/x86/xen/xen_apic.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/sys/x86/xen/xen_apic.c b/sys/x86/xen/xen_apic.c index db2358bffa81..4f2b03879227 100644 --- a/sys/x86/xen/xen_apic.c +++ b/sys/x86/xen/xen_apic.c @@ -216,10 +216,8 @@ xen_pv_lapic_ipi_vectored(u_int vector, int dest) static int xen_ipi_bitmap_handler(void *arg) { - struct trapframe *frame; - frame = arg; - ipi_bitmap_handler(*frame); + ipi_bitmap_handler(*curthread->td_intr_frame); return (FILTER_HANDLED); } @@ -297,9 +295,8 @@ xen_cpususpend_handler(void *arg) static int xen_ipi_swi_handler(void *arg) { - struct trapframe *frame = arg; - ipi_swi_handler(*frame); + ipi_swi_handler(*curthread->td_intr_frame); return (FILTER_HANDLED); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202311281338.3ASDcYjd025324>