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:
parent
e639e0d27c
commit
721b44ba5f
@ -534,6 +534,7 @@ pmap_invlpg(pmap_t pmap, vm_offset_t va)
|
|||||||
}
|
}
|
||||||
#endif /* sys/pcpu.h && machine/cpufunc.h */
|
#endif /* sys/pcpu.h && machine/cpufunc.h */
|
||||||
|
|
||||||
|
#if defined(_SYS_PCPU_H_)
|
||||||
/* Return pcid for the pmap pmap on current cpu */
|
/* Return pcid for the pmap pmap on current cpu */
|
||||||
static __inline uint32_t
|
static __inline uint32_t
|
||||||
pmap_get_pcid(pmap_t pmap)
|
pmap_get_pcid(pmap_t pmap)
|
||||||
@ -544,6 +545,7 @@ pmap_get_pcid(pmap_t pmap)
|
|||||||
pcidp = zpcpu_get(pmap->pm_pcidp);
|
pcidp = zpcpu_get(pmap->pm_pcidp);
|
||||||
return (pcidp->pm_pcid);
|
return (pcidp->pm_pcid);
|
||||||
}
|
}
|
||||||
|
#endif /* sys/pcpu.h */
|
||||||
|
|
||||||
#endif /* _KERNEL */
|
#endif /* _KERNEL */
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user