linux/drivers/char/agp
Muralidhara M K e1907d3751 x86/amd_nb: Unexport amd_cache_northbridges()
amd_cache_northbridges() is exported by amd_nb.c and is called by
amd64-agp.c and amd64_edac.c modules at module_init() time so that NB
descriptors are properly cached before those drivers can use them.

However, the init_amd_nbs() initcall already does call
amd_cache_northbridges() unconditionally and thus makes sure the NB
descriptors are enumerated.

That initcall is a fs_initcall type which is on the 5th group (starting
from 0) of initcalls that gets run in increasing numerical order by the
init code.

The module_init() call is turned into an __initcall() in the MODULE=n
case and those are device-level initcalls, i.e., group 6.

Therefore, the northbridges caching is already finished by the time
module initialization starts and thus the correct initialization order
is retained.

Unexport amd_cache_northbridges(), update dependent modules to
call amd_nb_num() instead. While at it, simplify the checks in
amd_cache_northbridges().

  [ bp: Heavily massage and *actually* explain why the change is ok. ]

Signed-off-by: Muralidhara M K <muralimk@amd.com>
Signed-off-by: Naveen Krishna Chatradhi <nchatrad@amd.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lore.kernel.org/r/20220324122729.221765-1-nchatrad@amd.com
2022-04-05 19:22:27 +02:00
..
agp.h char/agp: Disable frontend without CONFIG_DRM_LEGACY 2020-11-18 22:47:45 +01:00
ali-agp.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
alpha-agp.c
amd64-agp.c x86/amd_nb: Unexport amd_cache_northbridges() 2022-04-05 19:22:27 +02:00
amd-k7-agp.c agp: use semicolons rather than commas to separate statements 2020-09-28 06:06:52 +10:00
ati-agp.c agp/ati: Return error from ati_create_page_map() 2022-01-14 15:15:45 +01:00
backend.c agp: Documentation fixes 2022-01-14 15:12:22 +01:00
compat_ioctl.c
compat_ioctl.h
efficeon-agp.c
frontend.c agp: Include "compat_ioctl.h" where necessary 2022-01-14 15:11:42 +01:00
generic.c mm: don't include asm/pgtable.h if linux/mm.h is already included 2020-06-09 09:39:13 -07:00
hp-agp.c
i460-agp.c
intel-agp.c
intel-agp.h
intel-gtt.c agp/intel: Remove usage of the deprecated "pci-dma-compat.h" API 2022-02-25 17:19:21 +01:00
isoch.c agp: remove unused variable arqsz in agp_3_5_enable() 2020-01-03 16:08:05 +10:00
Kconfig parisc: parisc-agp requires SBA IOMMU driver 2021-04-06 11:46:39 +02:00
Makefile char/agp: Disable frontend without CONFIG_DRM_LEGACY 2020-11-18 22:47:45 +01:00
nvidia-agp.c agp/nvidia: Declare value returned by readl() as unused 2022-01-14 15:15:54 +01:00
parisc-agp.c parisc/agp: Annotate parisc agp init functions with __init 2021-11-30 21:49:33 +01:00
sis-agp.c sis-agp: convert to generic power management 2021-12-14 11:26:03 -06:00
sworks-agp.c agp/sworks: Remove unused variable 'current_size' 2022-01-14 15:15:59 +01:00
uninorth-agp.c
via-agp.c drm-misc-next for v5.18: 2022-02-01 19:02:41 +10:00