Date: Tue, 12 Feb 2019 16:56:10 +0000 (UTC) From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r344053 - stable/11/sys/i386/include Message-ID: <201902121656.x1CGuAc5041816@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: kib Date: Tue Feb 12 16:56:10 2019 New Revision: 344053 URL: https://svnweb.freebsd.org/changeset/base/344053 Log: Fix PAE modules build on i386. Reimplement PAE version of pte_load() by copying/pasting the atomic_load_acq_64_i586() into it definition. pmap_kextract() is defined as inline and uses pte_load() in its body, so the pte_load() should be available when pmap.h is included. On stable/11, the atomic inlines are not exposed to modules. This is a direct commit to stable/11. Reported by: dim Sponsored by: The FreeBSD Foundation Modified: stable/11/sys/i386/include/pmap.h Modified: stable/11/sys/i386/include/pmap.h ============================================================================== --- stable/11/sys/i386/include/pmap.h Tue Feb 12 14:03:39 2019 (r344052) +++ stable/11/sys/i386/include/pmap.h Tue Feb 12 16:56:10 2019 (r344053) @@ -241,7 +241,20 @@ extern pt_entry_t *KPTmap; #define pte_load_store(ptep, pte) atomic_swap_64_i586(ptep, pte) #define pte_load_clear(ptep) atomic_swap_64_i586(ptep, 0) #define pte_store(ptep, pte) atomic_store_rel_64_i586(ptep, pte) -#define pte_load(ptep) atomic_load_acq_64_i586(ptep) +static __inline uint64_t +pte_load(pt_entry_t *p) +{ + uint64_t res; + + __asm __volatile( + " movl %%ebx,%%eax ; " + " movl %%ecx,%%edx ; " + " lock; cmpxchg8b %1" + : "=&A" (res), /* 0 */ + "+m" (*p) /* 1 */ + : : "memory", "cc"); + return (res); +} extern pt_entry_t pg_nx;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201902121656.x1CGuAc5041816>