From 721b44ba5f3fb711af5797eae6345295721e13dd Mon Sep 17 00:00:00 2001 From: "Bjoern A. Zeeb" Date: Fri, 12 May 2023 11:14:54 +0000 Subject: [PATCH] amd64: pmap.h put a guard around a pcpu.h function pmap_get_pcid() calls zpcpu_get() which is defined in pcpu.h. It is unclear why we do not include that header but like right above the change add another guard around pmap_get_pcid(). This allows some LinuxKPI headers to compile again. Suggested by: markj MFC after: 10 days --- sys/amd64/include/pmap.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/amd64/include/pmap.h b/sys/amd64/include/pmap.h index cf41855a7c59..b61edf475b4b 100644 --- a/sys/amd64/include/pmap.h +++ b/sys/amd64/include/pmap.h @@ -534,6 +534,7 @@ pmap_invlpg(pmap_t pmap, vm_offset_t va) } #endif /* sys/pcpu.h && machine/cpufunc.h */ +#if defined(_SYS_PCPU_H_) /* Return pcid for the pmap pmap on current cpu */ static __inline uint32_t pmap_get_pcid(pmap_t pmap) @@ -544,6 +545,7 @@ pmap_get_pcid(pmap_t pmap) pcidp = zpcpu_get(pmap->pm_pcidp); return (pcidp->pm_pcid); } +#endif /* sys/pcpu.h */ #endif /* _KERNEL */