From: Hans de Goede <hansg@kernel.org>
To: David Airlie <airlied@linux.ie>
Cc: Hans de Goede <hansg@kernel.org>, Lukas Wunner <lukas@wunner.de>,
Andi Kleen <ak@linux.intel.com>,
dri-devel@lists.freedesktop.org
Subject: [PATCH 3/3] agp/amd64: Remove support for probing unlisted PCI devices
Date: Mon, 7 Jul 2025 19:37:10 +0200 [thread overview]
Message-ID: <20250707173710.313701-4-hansg@kernel.org> (raw)
In-Reply-To: <20250707173710.313701-1-hansg@kernel.org>
AMD64 boards with AGP support are so old that the agp_amd64_pci_table
should be complete and there is no need to probe unlisted PCI devices,
so lets completely remove support for probing unlisted PCI devices.
Suggested-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Hans de Goede <hansg@kernel.org>
---
drivers/char/agp/Kconfig | 3 +--
drivers/char/agp/agp.h | 1 -
drivers/char/agp/amd64-agp.c | 41 +-----------------------------------
drivers/char/agp/backend.c | 4 ----
4 files changed, 2 insertions(+), 47 deletions(-)
diff --git a/drivers/char/agp/Kconfig b/drivers/char/agp/Kconfig
index c47eb7bf06d4..752b18901613 100644
--- a/drivers/char/agp/Kconfig
+++ b/drivers/char/agp/Kconfig
@@ -63,8 +63,7 @@ config AGP_AMD64
This option gives you AGP support for the GLX component of
X using the on-CPU northbridge of the AMD Athlon64/Opteron CPUs.
You still need an external AGP bridge like the AMD 8151, VIA
- K8T400M, SiS755. It may also support other AGP bridges when loaded
- with agp_try_unsupported=1.
+ K8T400M, SiS755.
config AGP_INTEL
tristate "Intel 440LX/BX/GX, I8xx and E7x05 chipset support"
diff --git a/drivers/char/agp/agp.h b/drivers/char/agp/agp.h
index 67d7be800a7c..9fbe100c8f5e 100644
--- a/drivers/char/agp/agp.h
+++ b/drivers/char/agp/agp.h
@@ -237,7 +237,6 @@ void agp3_generic_cleanup(void);
extern const struct aper_size_info_16 agp3_generic_sizes[];
extern int agp_off;
-extern int agp_try_unsupported_boot;
long compat_agp_ioctl(struct file *file, unsigned int cmd, unsigned long arg);
diff --git a/drivers/char/agp/amd64-agp.c b/drivers/char/agp/amd64-agp.c
index f883c06b538a..e63827724bb1 100644
--- a/drivers/char/agp/amd64-agp.c
+++ b/drivers/char/agp/amd64-agp.c
@@ -34,7 +34,6 @@
#define ULI_X86_64_ENU_SCR_REG 0x54
static struct resource *aperture_resource;
-static bool agp_try_unsupported __initdata;
static int agp_bridges_found;
static void amd64_tlbflush(struct agp_memory *temp)
@@ -734,47 +733,10 @@ static struct pci_driver agp_amd64_pci_driver = {
/* Not static due to IOMMU code calling it early. */
int __init agp_amd64_init(void)
{
- struct pci_dev *pdev = NULL;
- int err = 0;
-
if (agp_off)
return -EINVAL;
- err = pci_register_driver(&agp_amd64_pci_driver);
- if (err < 0)
- return err;
-
- if (agp_bridges_found == 0) {
- if (!agp_try_unsupported && !agp_try_unsupported_boot) {
- printk(KERN_INFO PFX "No supported AGP bridge found.\n");
-#ifdef MODULE
- printk(KERN_INFO PFX "You can try agp_try_unsupported=1\n");
-#else
- printk(KERN_INFO PFX "You can boot with agp=try_unsupported\n");
-#endif
- pci_unregister_driver(&agp_amd64_pci_driver);
- return -ENODEV;
- }
-
- /* First check that we have at least one AMD64 NB */
- if (!amd_nb_num()) {
- pci_unregister_driver(&agp_amd64_pci_driver);
- return -ENODEV;
- }
-
- /* Look for any AGP bridge */
- for_each_pci_dev(pdev)
- if (pci_find_capability(pdev, PCI_CAP_ID_AGP))
- pci_add_dynid(&agp_amd64_pci_driver,
- pdev->vendor, pdev->device,
- pdev->subsystem_vendor,
- pdev->subsystem_device, 0, 0, 0);
- if (agp_bridges_found == 0) {
- pci_unregister_driver(&agp_amd64_pci_driver);
- err = -ENODEV;
- }
- }
- return err;
+ return pci_register_driver(&agp_amd64_pci_driver);
}
static int __init agp_amd64_mod_init(void)
@@ -801,6 +763,5 @@ module_init(agp_amd64_mod_init);
module_exit(agp_amd64_cleanup);
MODULE_AUTHOR("Dave Jones, Andi Kleen");
-module_param(agp_try_unsupported, bool, 0);
MODULE_DESCRIPTION("GART driver for the AMD Opteron/Athlon64 on-CPU northbridge");
MODULE_LICENSE("GPL");
diff --git a/drivers/char/agp/backend.c b/drivers/char/agp/backend.c
index 1776afd3ee07..ca9c3472d4b7 100644
--- a/drivers/char/agp/backend.c
+++ b/drivers/char/agp/backend.c
@@ -319,9 +319,7 @@ void agp_remove_bridge(struct agp_bridge_data *bridge)
EXPORT_SYMBOL_GPL(agp_remove_bridge);
int agp_off;
-int agp_try_unsupported_boot;
EXPORT_SYMBOL(agp_off);
-EXPORT_SYMBOL(agp_try_unsupported_boot);
static int __init agp_init(void)
{
@@ -340,8 +338,6 @@ static __init int agp_setup(char *s)
{
if (!strcmp(s,"off"))
agp_off = 1;
- if (!strcmp(s,"try_unsupported"))
- agp_try_unsupported_boot = 1;
return 1;
}
__setup("agp=", agp_setup);
--
2.49.0
next prev parent reply other threads:[~2025-07-07 17:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-07 17:37 [PATCH 0/3] agp/amd64: Remove support for probing unlisted PCI devices Hans de Goede
2025-07-07 17:37 ` [PATCH 1/3] agp/amd64: Check AGP Capability before binding to unsupported devices Hans de Goede
2025-07-07 17:37 ` [PATCH 2/3] agp/amd64: Change agp_try_unsupported default to 0 Hans de Goede
2025-07-07 17:37 ` Hans de Goede [this message]
2025-07-07 18:00 ` [PATCH 3/3] agp/amd64: Remove support for probing unlisted PCI devices Lukas Wunner
2025-07-07 18:12 ` [PATCH 0/3] " Andi Kleen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250707173710.313701-4-hansg@kernel.org \
--to=hansg@kernel.org \
--cc=airlied@linux.ie \
--cc=ak@linux.intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=lukas@wunner.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.