[CAUTION: External Email]Creating a pci_device_id list for GPUs will be needed.
On Thu, Nov 04, 2021 at 06:48:29PM +0530, Chatradhi, Naveen Krishna wrote:
I know, this is confusion. we will try to give a meaning for definitionWell, not that - you will need to keep adding PCI device IDs for the
here.
future GPUs supporting this stuff.
How about, defining a new structWell, how does having a single struct help make things easier?
+struct system_topology {
+ const struct pci_device_id *misc_ids;
+ const struct pci_device_id *link_ids;
+ const struct pci_device_id *root_ids;
+ u16 roots_per_misc;
+ u16 misc_count;
+ u16 root_count;
+};
IOW, if you use accessors to get the information you need, it doesn't
really matter what the underlying organization of the data is. And if
it helps to keep 'em separate because stuff is simple altogether, then,
they should be separate.
So, before you ask "How about", think of answering the question "Why
should it be done this way? What are the advantages?"
Yes, fs_initcall come before module_init (which inturn is device_init level 6). We can replace the amd_cache_northbridges() call in amd64_edac_init() with if(amd_nb_num() < 0).
This way, creating appropriate number MCs under EDAC and existing exportedWhy does that matter?
APIs can remain the same.
Also, have you verified in what order the init_amd_nbs() fs initcall and
amd64_edac_init() get executed?
I'm going to venture a pretty sure guess that the initcall runs first
and that amd_cache_northbridges() call in amd64_edac_init() is probably
not even needed anymore...
Thx.
--
Regards/Gruss,
Boris.
https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpeople.kernel.org%2Ftglx%2Fnotes-about-netiquette&data=04%7C01%7CNaveenKrishna.Chatradhi%40amd.com%7C45b6d75b206849ab022808d9a2bc7d4f%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637719752712242190%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=WW26EMOnu%2FBazap9njmnQIvY9hVSZxVpNol4uptGcec%3D&reserved=0