designated initializers.
I have not built every extant kernel so I have probably broken at
least one build; however I've also found and fixed some wrong
cdevsw/bdevsw entries so even if so I think we come out ahead.
from 'void *' to the actual type 'struct coredump_iostate *'.
In most of the code the contents of the structure are still unknown.
This just stops the wrong type of pointer being passed to the 'void *'
parameter.
I hope I've found everything, amd64 GENERIC and i386 GENERIC & ALL compile.
Instead, use SH4_EMODE_CACHE_FLUSH() or SH4_CACHE_FLUSH() macro to
invalidate cache before initializing CCR.
This seems to suppress random file system corruption on wd(4) at acardide(4)
(which uses bus-master DMA and calls many cache flush ops) during pkgsrc
packages builds on landisk.
so that modules work, on config files that did not set it explicitly. All
the files now use the standard logic, except the ones that set KERN_AS=obj
and Makefile.usermode which sets KERN_AS=library.
http://www.nerv.org/~ryo/netbsd/netbsd/?q=id:20080316T191753Z.1654448ada03ce3c4668f3fe472796d0b771e147
- revert RUN_P1 -> PAD_P1_SWITCH changes where RUN_P1 is
actually required (all icache CCIA ops still need RUN_P2)
- sh4_dcache_wbinv_all() and sh4_dcache_wbinv_range_index()
(which manipulate CCDA arrays) are no longer have RUN_P2 so
we can't call them directly from sh4_icache_sync_all() and
sh4_icache_sync_range_index() funcitons; use function pointers
(which have appropriate addresses) instead for 7750 and 7750S
the TLS pointer, therefore wrecking the pthread environement.
Some ports had _UC_TLSBASE flag or equivalent (_UC_UNIQUE on alpha)
that controlled whether setcontext() would change the TLS pointer.
This change let libpthread override setcontext() with its own version
that unsets _UC_TLSBASE, enabling safe usage of setcontext() with
-lpthread.
We also have the following required changes here:
- rename alpha's _UC_UNIQUE into _UC_TLSBASE
- add _UC_TLSBASE definition in header file for all ports
(powerpc, sh3, sparc and sparc64 lack the implementation for now)
- introduce a libc stub that can be overriden for setcontext()
- modify MD libcs swapcontext() implementations so that they use the
setcontext() libc stub instead of doing a plain system call.
While we are there:
- document various MD _UC_* flags in header file
- add libc and libpthread tests for swapcontext() behavior
(hopefully helpful to spot MD problems introduced with this change)
Future work:
- Deciding whether kernel support or _UC_TLSBASE should be added for
powerpc, sh3, sparc and sparc64 is left to portmasters
sparc64
Approved by core@
assertion failure (and thus a crash in DIAGNOSTIC kernels). Independently
discovered by YAMAMOTO Takashi and Joel Sing.
To avoid this, introduce a cpu_mcontext_validate() function and move all
sanity checks from cpu_setmcontext() there. Also untangle the netbsd32
compat mess slightly and add a cpu_mcontext32_validate() cousin there.
Add an exhaustive atf test case, based partly on code from Joel Sing.
Should finally fix the remaining open part of PR kern/43903.