[CAUTION: External Email]Apologies for the late reply.
On Mon, Feb 28, 2022 at 09:41:54PM +0530, Naveen Krishna Chatradhi wrote:
From: Muralidhara M K <muralimk@xxxxxxx>
amd_cache_northbridges() is called from init_amd_nbs(), during
fs_initcall() and need not be called explicitly. Kernel components
can directly call amd_nb_num() to get the initialized number of
north bridges.
unexport amd_cache_northbridges(), update dependent modules to
call amd_nb_num() instead. While at it, simplify the while checks
in amd_cache_northbridges().
What I am missing in this commit message is why is it ok to do that?
AFAIR, previously, amd_cache_northbridges() wasn't an initcall so the
module or builtin - which came first - was forcing the NB caching
through the explicit call to amd_cache_northbridges().
fs_inicall() does that now unconditionally so the question is, why can
the module init functions assume that the northbridges have been cached
already and can simply get the NB number?
Thx.
--
Regards/Gruss,
Boris.
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpeople.kernel.org%2Ftglx%2Fnotes-about-netiquette%3Awq&data=04%7C01%7CNaveenKrishna.Chatradhi%40amd.com%7Cf178536c5a264e5bd9ca08da06a98c6f%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637829622545040298%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=iRnHksY7p4nd4pALbDNp11Y7%2FSMAou9X0XrV%2FC7K8Xk%3D&reserved=0