git: b61c6451631f - stable/13 - pcib: Make various bus methods private to pci_pci.c

From: John Baldwin <jhb_at_FreeBSD.org>
Date: Mon, 08 Apr 2024 20:25:49 UTC
The branch stable/13 has been updated by jhb:

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

commit b61c6451631ff2341e1f29a6eedee107319b44fe
Author:     John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2024-02-09 18:27:45 +0000
Commit:     John Baldwin <jhb@FreeBSD.org>
CommitDate: 2024-04-08 17:52:54 +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
    
    (cherry picked from commit 03719c651430d46cd8aa95aead02a7f0c43dcb04)
---
 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 dccc1dabb59b..9e90cccdf083 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 */
@@ -2272,7 +2280,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)
 {
@@ -2361,7 +2369,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)
 {
@@ -2429,7 +2437,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)
 {
@@ -2452,7 +2460,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 cf689026a033..d4c66407d739 100644
--- a/sys/dev/pci/pcib_private.h
+++ b/sys/dev/pci/pcib_private.h
@@ -174,19 +174,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);