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
This commit is contained in:
Bjoern A. Zeeb 2023-05-12 11:14:54 +00:00
parent e639e0d27c
commit 721b44ba5f

View File

@ -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 */