Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 2 Nov 2023 18:47:41 GMT
From:      Mark Johnston <markj@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 2b084923824e - main - amd64: Remove PMAP_INLINE
Message-ID:  <202311021847.3A2IlfxH044554@gitrepo.freebsd.org>

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

URL: https://cgit.FreeBSD.org/src/commit/?id=2b084923824e0d5133fe5aff580b4e562fe7dd19

commit 2b084923824e0d5133fe5aff580b4e562fe7dd19
Author:     Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2023-11-02 18:30:10 +0000
Commit:     Mark Johnston <markj@FreeBSD.org>
CommitDate: 2023-11-02 18:30:10 +0000

    amd64: Remove PMAP_INLINE
    
    With clang it expands to "inline"; clang in practice may inline
    externally visible functions even without the hint.  So just remove the
    hints and let the compiler decide.
    
    No functional change intended.  pmap.o is identical before and after
    this patch.
    
    Reviewed by:    alc
    MFC after:      1 week
    Differential Revision:  https://reviews.freebsd.org/D42446
---
 sys/amd64/amd64/pmap.c | 18 ++++--------------
 1 file changed, 4 insertions(+), 14 deletions(-)

diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c
index cc463832babf..3b009385aaab 100644
--- a/sys/amd64/amd64/pmap.c
+++ b/sys/amd64/amd64/pmap.c
@@ -338,16 +338,6 @@ safe_to_clear_referenced(pmap_t pmap, pt_entry_t pte)
 		return (FALSE);
 }
 
-#if !defined(DIAGNOSTIC)
-#ifdef __GNUC_GNU_INLINE__
-#define PMAP_INLINE	__attribute__((__gnu_inline__)) inline
-#else
-#define PMAP_INLINE	extern inline
-#endif
-#else
-#define PMAP_INLINE
-#endif
-
 #ifdef PV_STATS
 #define PV_STAT(x)	do { x ; } while (0)
 #else
@@ -1560,7 +1550,7 @@ pt_entry_t vtoptem __read_mostly = ((1ul << (NPTEPGSHIFT + NPDEPGSHIFT +
     NPDPEPGSHIFT + NPML4EPGSHIFT)) - 1) << 3;
 vm_offset_t PTmap __read_mostly = (vm_offset_t)P4Tmap;
 
-PMAP_INLINE pt_entry_t *
+pt_entry_t *
 vtopte(vm_offset_t va)
 {
 	KASSERT(va >= VM_MAXUSER_ADDRESS, ("vtopte on a uva/gpa 0x%0lx", va));
@@ -3623,7 +3613,7 @@ pmap_invalidate_all(pmap_t pmap)
 	}
 }
 
-PMAP_INLINE void
+void
 pmap_invalidate_cache(void)
 {
 
@@ -3980,7 +3970,7 @@ pmap_kextract(vm_offset_t va)
  * Add a wired page to the kva.
  * Note: not SMP coherent.
  */
-PMAP_INLINE void 
+void
 pmap_kenter(vm_offset_t va, vm_paddr_t pa)
 {
 	pt_entry_t *pte;
@@ -4006,7 +3996,7 @@ pmap_kenter_attr(vm_offset_t va, vm_paddr_t pa, int mode)
  * Remove a page from the kernel pagetables.
  * Note: not SMP coherent.
  */
-PMAP_INLINE void
+void
 pmap_kremove(vm_offset_t va)
 {
 	pt_entry_t *pte;



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