[rfc] where to put cpuid_t ?

John Baldwin jhb at FreeBSD.org
Tue Jul 29 17:52:02 UTC 2014


On Jul 24, 2014, at 12:03 AM, Adrian Chadd <adrian at freebsd.org> wrote:

> Hi!
> 
> I've been chipping away at a cpuid_t in a local branch for a while and
> I think I have the very basics working well enough.
> 
> However, the most annoying thing that's crept up is the most bikeshed
> topic of them all - where should it live.
> 
> I'd like to avoid having to include sys/pcpu.h or sys/_cpuset.h just
> for the id type - it seems a bit overkill.
> 
> So - suggestions? Otherwise I'm going to leave it in sys/pcpu.h and
> just polluate appropriately.
> 
> I'd like to try and get cpuid_t and a handful of KBI-changing things
> into -HEAD before 11 is branched so we at least have a hope of trying
> to support > 128 CPUs out of the box in the immediate future and > 253
> CPUs in the later future.

__cpuid_t should be in <sys/_types.h> and cpuid_t should be in <sys/types.h>.

This is how the old cpumask_t worked (though it allowed __cpumask_t to be MD
whereas I think you can probably make __cpuid_t MI).

-- 
John Baldwin








More information about the freebsd-arch mailing list