Hi, On 2017/06/03 12:17, Michael van Elst wrote: > [email protected] (Kengo NAKAHARA) writes: > >> Currently(after cryptosoft.c:r1.44), software encryption driver >> (swcrypto0) is initialized twice, that is, swcr_init() is called >> below two call paths. >> (1) swcrypto_attach() >> <= called from module initialization >> (2) swcryptoattach() >> <= called from autoconf(9) initialization > >> Hmm, compare with pseudo interfaces like gif(4), It seems the >> swcryptoattach() should do nothing. > > > In this case, yes. > > Modules have their own module info data structures compiled by the > linker, for a builtin module their modcmd function is called in > module_init_class(). > > pseudo devices have no bus attachment, their attach routines are > compiled by config(1) and called in config_finalize() after all > builtin modules have been initialized. > > A run-time loaded module gets its modcmd function called much > later in module_load(). // snip
Thank you for detailed explanation! I will be careful about that, when I modify a similar code. Thanks, -- ////////////////////////////////////////////////////////////////////// Internet Initiative Japan Inc. Device Engineering Section, IoT Platform Development Department, Network Division, Technology Unit Kengo NAKAHARA <[email protected]>
