Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 9 Feb 2024 18:44:26 GMT
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 03719c651430 - main - pcib: Make various bus methods private to pci_pci.c
Message-ID:  <202402091844.419IiQM5054872@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by jhb:

URL: https://cgit.FreeBSD.org/src/commit/?id=03719c651430d46cd8aa95aead02a7f0c43dcb04

commit 03719c651430d46cd8aa95aead02a7f0c43dcb04
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2024-02-09 18:27:45 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2024-02-09 18:27:45 +0000

    pcib: Make various bus methods private to pci_pci.c
    
    These functions are not used by pcib subclasses so do not need to
    be exposed in pcib_private.h.
    
    Reviewed by:    imp
    Differential Revision:  https://reviews.freebsd.org/D43688
---
 sys/dev/pci/pci_pci.c      | 18 +++++++++++++-----
 sys/dev/pci/pcib_private.h | 10 ----------
 2 files changed, 13 insertions(+), 15 deletions(-)

diff --git a/sys/dev/pci/pci_pci.c b/sys/dev/pci/pci_pci.c
index 6ef04251cd74..2659e64f364d 100644
--- a/sys/dev/pci/pci_pci.c
+++ b/sys/dev/pci/pci_pci.c
@@ -60,6 +60,15 @@
 static int		pcib_probe(device_t dev);
 static int		pcib_suspend(device_t dev);
 static int		pcib_resume(device_t dev);
+
+static bus_child_present_t	pcib_child_present;
+static bus_alloc_resource_t	pcib_alloc_resource;
+#ifdef NEW_PCIB
+static bus_adjust_resource_t	pcib_adjust_resource;
+static bus_release_resource_t	pcib_release_resource;
+#endif
+static int		pcib_reset_child(device_t dev, device_t child, int flags);
+
 static int		pcib_power_for_sleep(device_t pcib, device_t dev,
 			    int *pstate);
 static int		pcib_ari_get_id(device_t pcib, device_t dev,
@@ -81,7 +90,6 @@ static void		pcib_pcie_dll_timeout(void *arg, int pending);
 #endif
 static int		pcib_request_feature_default(device_t pcib, device_t dev,
 			    enum pci_feature feature);
-static int		pcib_reset_child(device_t dev, device_t child, int flags);
 
 static device_method_t pcib_methods[] = {
     /* Device interface */
@@ -2269,7 +2277,7 @@ updatewin:
  * We have to trap resource allocation requests and ensure that the bridge
  * is set up to, or capable of handling them.
  */
-struct resource *
+static struct resource *
 pcib_alloc_resource(device_t dev, device_t child, int type, int *rid,
     rman_res_t start, rman_res_t end, rman_res_t count, u_int flags)
 {
@@ -2358,7 +2366,7 @@ pcib_alloc_resource(device_t dev, device_t child, int type, int *rid,
 	return (r);
 }
 
-int
+static int
 pcib_adjust_resource(device_t bus, device_t child, int type, struct resource *r,
     rman_res_t start, rman_res_t end)
 {
@@ -2426,7 +2434,7 @@ pcib_adjust_resource(device_t bus, device_t child, int type, struct resource *r,
 	return (rman_adjust_resource(r, start, end));
 }
 
-int
+static int
 pcib_release_resource(device_t dev, device_t child, int type, int rid,
     struct resource *r)
 {
@@ -2449,7 +2457,7 @@ pcib_release_resource(device_t dev, device_t child, int type, int rid,
  * We have to trap resource allocation requests and ensure that the bridge
  * is set up to, or capable of handling them.
  */
-struct resource *
+static struct resource *
 pcib_alloc_resource(device_t dev, device_t child, int type, int *rid,
     rman_res_t start, rman_res_t end, rman_res_t count, u_int flags)
 {
diff --git a/sys/dev/pci/pcib_private.h b/sys/dev/pci/pcib_private.h
index d8a354c0e498..bc0b48d9f031 100644
--- a/sys/dev/pci/pcib_private.h
+++ b/sys/dev/pci/pcib_private.h
@@ -178,19 +178,9 @@ void		pcib_bridge_init(device_t dev);
 #ifdef NEW_PCIB
 const char	*pcib_child_name(device_t child);
 #endif
-int		pcib_child_present(device_t dev, device_t child);
 int		pcib_detach(device_t dev);
 int		pcib_read_ivar(device_t dev, device_t child, int which, uintptr_t *result);
 int		pcib_write_ivar(device_t dev, device_t child, int which, uintptr_t value);
-struct resource *pcib_alloc_resource(device_t dev, device_t child, int type, int *rid, 
-					    rman_res_t start, rman_res_t end,
-					    rman_res_t count, u_int flags);
-#ifdef NEW_PCIB
-int		pcib_adjust_resource(device_t bus, device_t child, int type,
-    struct resource *r, rman_res_t start, rman_res_t end);
-int		pcib_release_resource(device_t dev, device_t child, int type, int rid,
-    struct resource *r);
-#endif
 int		pcib_maxslots(device_t dev);
 int		pcib_maxfuncs(device_t dev);
 int		pcib_route_interrupt(device_t pcib, device_t dev, int pin);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202402091844.419IiQM5054872>