OpenCloudOS-Kernel/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
..
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
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 char: agp: Change return type to vm_fault_t 2018-07-10 13:48:11 +10:00
amd-k7-agp.c agp: use semicolons rather than commas to separate statements 2020-09-28 06:06:52 +10:00
amd64-agp.c x86/amd_nb: Unexport amd_cache_northbridges() 2022-04-05 19:22:27 +02: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 treewide: kmalloc() -> kmalloc_array() 2018-06-12 16:19:22 -07:00
compat_ioctl.h agp: kill agp_flush_chipset and corresponding ioctl 2010-11-23 20:14:45 +00:00
efficeon-agp.c agp: efficeon: no need to set PG_reserved on GATT tables 2019-03-05 21:07:18 -08:00
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 treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
i460-agp.c Drivers: char: remove __dev* attributes. 2013-01-03 15:57:15 -08:00
intel-agp.c agp: intel: constify pci_device_id. 2017-08-04 16:59:46 +10:00
intel-agp.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
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
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 treewide: Add SPDX license identifier for more missed files 2019-05-21 10:50:45 +02:00
via-agp.c drm-misc-next for v5.18: 2022-02-01 19:02:41 +10:00