Move dump_avail extern declaration and inlines into new header vm/vm_dumpset.h.
This fixes default gcc build for mips.
kib on Oct 11 2020, 7:44 PM.Authored by
This seems to remedy the initial problem. I then ran into a 'function with a non-void return type does not return a value' in @mjg's work and applied this diff because it looks like the switch is supposed to cover it:
diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c index 0880ed26b28..e425dd85468 100644 --- a/sys/kern/vfs_cache.c +++ b/sys/kern/vfs_cache.c @@ -4242,6 +4242,8 @@ cache_fplookup_impl(struct vnode *dvp, struct cache_fpl *fpl) cache_fpl_cleanup_cnp(cnp); return (error); } + + __assert_unreachable(); } /*
I then ran into this, which seems to make little sense:
/usr/src/sys/amd64/amd64/exception.S: Assembler messages: /usr/src/sys/amd64/amd64/exception.S:613: Error: found 'U', expected: ')' /usr/src/sys/amd64/amd64/exception.S:613: Error: junk `UL)' after expression /usr/src/sys/amd64/amd64/exception.S:1268: Error: found 'U', expected: ')' /usr/src/sys/amd64/amd64/exception.S:1268: Error: junk `UL)' after expression --- exception.o ---
Is this a gcc build?
gcc is notorious for the following problem: explicitly handing all enum cases one by one without any form of catch-all results in a warning that something is not handled. They have a bug report somewhere about this but they don't fix the problem.
The particular instance you see here is one of several, you did not see more because of the support.S compilation failure.
I don't know what's the best way to address this, given __address_unreachable semantics it is worrisome the compiler will assume the not mentioned cases now got handling. I would argue the thing to do is to disable the enumeration warn to begin with.
Look at assym.inc for PMAP_UCR3_NOMASK and UCR3_LOAD_MASK. Or better, pre-process exception.S and look at the preprocessed asm.
If someone is to do anything serious with gcc I suggest the following:
The bug report I mentioned: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87950
Thanks for fixing this. Grepping around, I believe vm_dumpset.h should also be included in:
For vm_phys.c dump_avail is locally defined, I am not sure declaration is useful. It would provide some consistency checking indeed but contamination with unneeded symbols is probably worse than this minor improvement.
Other files you listed are not used during tinderbox builds. I added the header following your notes.