Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 8 Jun 2021 13:37:57 GMT
From:      Mark Johnston <markj@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 0a41a2899eb2 - stable/12 - i386: Make setidt_disp a size_t instead of uintptr_t
Message-ID:  <202106081337.158DbvXT074770@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/12 has been updated by markj:

URL: https://cgit.FreeBSD.org/src/commit/?id=0a41a2899eb226d34996b2470cf239d670ff186e

commit 0a41a2899eb226d34996b2470cf239d670ff186e
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2021-06-01 14:28:57 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2021-06-08 13:37:48 +0000

    i386: Make setidt_disp a size_t instead of uintptr_t
    
    setidt_disp is the offset of the ISR trampoline relative to the address
    of the routines in exception.s, so uintptr_t is not quite right.
    
    Also remove a bogus declaration I added in commit 18f55c67f7, it is not
    required after all.
    
    Reported by:    jrtc27
    Reviewed by:    jrtc27, kib
    Sponsored by:   The FreeBSD Foundation
    
    (cherry picked from commit cbe59a6475b6c36fac4073bcfc328099fc873420)
---
 sys/i386/i386/machdep.c   | 2 +-
 sys/i386/include/md_var.h | 2 +-
 sys/x86/x86/local_apic.c  | 4 ----
 3 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/sys/i386/i386/machdep.c b/sys/i386/i386/machdep.c
index 4ef37861b151..1aed12f422bc 100644
--- a/sys/i386/i386/machdep.c
+++ b/sys/i386/i386/machdep.c
@@ -1527,7 +1527,7 @@ static struct soft_segment_descriptor ldt_segs[] = {
 	.ssd_gran = 1		},
 };
 
-uintptr_t setidt_disp;
+size_t setidt_disp;
 
 void
 setidt(int idx, inthand_t *func, int typ, int dpl, int selec)
diff --git a/sys/i386/include/md_var.h b/sys/i386/include/md_var.h
index 53e1861c8fff..0f0177012f3a 100644
--- a/sys/i386/include/md_var.h
+++ b/sys/i386/include/md_var.h
@@ -49,7 +49,7 @@ extern	int	sz_lcall_tramp;
 #endif
 extern	uint32_t *vm_page_dump;
 extern  vm_offset_t proc0kstack;
-extern	uintptr_t setidt_disp;
+extern	size_t setidt_disp;
 
 struct	segment_descriptor;
 union savefpu;
diff --git a/sys/x86/x86/local_apic.c b/sys/x86/x86/local_apic.c
index a34cfbb8b1c9..759c1ae8625a 100644
--- a/sys/x86/x86/local_apic.c
+++ b/sys/x86/x86/local_apic.c
@@ -2113,10 +2113,6 @@ native_lapic_ipi_vectored(u_int vector, int dest)
 
 #endif /* SMP */
 
-#ifdef __i386__
-extern uintptr_t setidt_disp;
-#endif
-
 /*
  * Since the IDT is shared by all CPUs the IPI slot update needs to be globally
  * visible.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202106081337.158DbvXT074770>