All other architectures can be detected by some name for excluding
files. Add options appropriate to flag x86 machines.
Details
- Reviewers
kevans
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 47927 Build 44814: arc lint + arc unit
Event Timeline
Updating per @kevans91 on IRC. I would prefer to have !x86, but !i386 !amd64 is good enough.
sys/conf/options.amd64 | ||
---|---|---|
5 | This X86 option here and in options.i386 won't work, and I don't think we want to hack config(8) to make it work. See config[0]'s option generation logic; it sets:
This would need some extra logic to fake an X86 option for amd64 || i386 so that the positive sense of x86 in files* predicates works, and I'm not sure if it's worth it without more examples of !i386 !amd64 cropping up. [0] https://cgit.freebsd.org/src/tree/usr.sbin/config/mkoptions.c#n65 |
I'm not sure that I like it at all.
arm has armv6 and armv7 as a historical accident because we supported armv4 and armv5. It's currently useless there:
cddl/compat/opensolaris/kern/opensolaris_atomic.c: optional !armv7 !armv6 zfs | !armv7 !armv6 dtrace compile-with "${CDDL_C}"
one of armv6 or armv7 will be defined, so this line is never used.
../sys/conf/files.arm:dev/hwpmc/hwpmc_armv7.c optional hwpmc armv6 ../sys/conf/files.arm:dev/hwpmc/hwpmc_armv7.c optional hwpmc armv7
So these should be spelled optional hwpmc
../sys/conf/files.arm:libkern/arm/ffs.S optional !armv7 !armv6 ../sys/conf/files.arm:libkern/ffsl.c optional !armv7 !armv6 ../sys/conf/files.arm:libkern/ffsll.c optional !armv7 !armv6 ../sys/conf/files.arm:libkern/fls.c optional !armv7 !armv6 ../sys/conf/files.arm:libkern/flsl.c optional !armv7 !armv6 ../sys/conf/files.arm:libkern/flsll.c optional !armv7 !armv6
These all should just be deleted. I plan on doing that later today.
arm64 is unused.
powerpc it's used because we have 32-bit and 64-bit support in one kernel tree (which is unique in the tree). But there it's over used to mark drivers that are 64-bit only (and it doesn't tag the ones that would work on powerpc64le correctly). Most of the 'marking' ones should just be deleted and those drivers shouldn't be in GENERIC, just GENERIC64. Once you remove the 'abusers' in the list, there's very few that are required... Not sure it's worth a good scrubbing though.
It's unused on riscv.
So I'm quite cold to this proposal, even after reading on IRC where it would be used on those platforms w/o intrng... IMHO, those things should be marked as !intrng and we have an option for that instead rather than doing this. For other options, like 'new_pcib' we just toss this in the DEFAULTS file and key off of that.
This isn't a veto, but this is a strong word of warning that you are doing it wrong, imho