All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Pali Rohár" <pali@kernel.org>
To: "Michael Ellerman" <mpe@ellerman.id.au>,
	"Benjamin Herrenschmidt" <benh@kernel.crashing.org>,
	"Paul Mackerras" <paulus@samba.org>,
	"Christophe Leroy" <christophe.leroy@csgroup.eu>,
	"Cédric Le Goater" <clg@kaod.org>,
	"Nick Child" <nick.child@ibm.com>,
	"Bjorn Helgaas" <helgaas@kernel.org>
Cc: linuxppc-dev@lists.ozlabs.org, linux-pci@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH 3/5] powerpc/pci: Hide pci_create_OF_bus_map() for non-chrp code
Date: Wed,  6 Jul 2022 12:43:06 +0200	[thread overview]
Message-ID: <20220706104308.5390-4-pali@kernel.org> (raw)
In-Reply-To: <20220706104308.5390-1-pali@kernel.org>

Function pci_create_OF_bus_map() is used only in chrp code.
So hide it from all other platforms as it is unsed.

Signed-off-by: Pali Rohár <pali@kernel.org>
---
 arch/powerpc/include/asm/pci-bridge.h | 2 ++
 arch/powerpc/kernel/pci_32.c          | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/arch/powerpc/include/asm/pci-bridge.h b/arch/powerpc/include/asm/pci-bridge.h
index 98156932a1f5..e18c95f4e1d4 100644
--- a/arch/powerpc/include/asm/pci-bridge.h
+++ b/arch/powerpc/include/asm/pci-bridge.h
@@ -176,7 +176,9 @@ extern int pci_device_from_OF_node(struct device_node *node,
 #endif
 #ifndef CONFIG_PPC64
 
+#ifdef CONFIG_PPC_CHRP
 extern void pci_create_OF_bus_map(void);
+#endif
 
 #else	/* CONFIG_PPC64 */
 
diff --git a/arch/powerpc/kernel/pci_32.c b/arch/powerpc/kernel/pci_32.c
index df981294df29..3291af89cea4 100644
--- a/arch/powerpc/kernel/pci_32.c
+++ b/arch/powerpc/kernel/pci_32.c
@@ -194,6 +194,7 @@ int pci_device_from_OF_node(struct device_node *node, u8 *bus, u8 *devfn)
 EXPORT_SYMBOL(pci_device_from_OF_node);
 #endif
 
+#ifdef CONFIG_PPC_CHRP
 /* We create the "pci-OF-bus-map" property now so it appears in the
  * /proc device tree
  */
@@ -218,6 +219,7 @@ pci_create_OF_bus_map(void)
 		of_node_put(dn);
 	}
 }
+#endif
 
 void pcibios_setup_phb_io_space(struct pci_controller *hose)
 {
-- 
2.20.1


WARNING: multiple messages have this Message-ID (diff)
From: "Pali Rohár" <pali@kernel.org>
To: "Michael Ellerman" <mpe@ellerman.id.au>,
	"Benjamin Herrenschmidt" <benh@kernel.crashing.org>,
	"Paul Mackerras" <paulus@samba.org>,
	"Christophe Leroy" <christophe.leroy@csgroup.eu>,
	"Cédric Le Goater" <clg@kaod.org>,
	"Nick Child" <nick.child@ibm.com>,
	"Bjorn Helgaas" <helgaas@kernel.org>
Cc: linux-pci@vger.kernel.org, linuxppc-dev@lists.ozlabs.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH 3/5] powerpc/pci: Hide pci_create_OF_bus_map() for non-chrp code
Date: Wed,  6 Jul 2022 12:43:06 +0200	[thread overview]
Message-ID: <20220706104308.5390-4-pali@kernel.org> (raw)
In-Reply-To: <20220706104308.5390-1-pali@kernel.org>

Function pci_create_OF_bus_map() is used only in chrp code.
So hide it from all other platforms as it is unsed.

Signed-off-by: Pali Rohár <pali@kernel.org>
---
 arch/powerpc/include/asm/pci-bridge.h | 2 ++
 arch/powerpc/kernel/pci_32.c          | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/arch/powerpc/include/asm/pci-bridge.h b/arch/powerpc/include/asm/pci-bridge.h
index 98156932a1f5..e18c95f4e1d4 100644
--- a/arch/powerpc/include/asm/pci-bridge.h
+++ b/arch/powerpc/include/asm/pci-bridge.h
@@ -176,7 +176,9 @@ extern int pci_device_from_OF_node(struct device_node *node,
 #endif
 #ifndef CONFIG_PPC64
 
+#ifdef CONFIG_PPC_CHRP
 extern void pci_create_OF_bus_map(void);
+#endif
 
 #else	/* CONFIG_PPC64 */
 
diff --git a/arch/powerpc/kernel/pci_32.c b/arch/powerpc/kernel/pci_32.c
index df981294df29..3291af89cea4 100644
--- a/arch/powerpc/kernel/pci_32.c
+++ b/arch/powerpc/kernel/pci_32.c
@@ -194,6 +194,7 @@ int pci_device_from_OF_node(struct device_node *node, u8 *bus, u8 *devfn)
 EXPORT_SYMBOL(pci_device_from_OF_node);
 #endif
 
+#ifdef CONFIG_PPC_CHRP
 /* We create the "pci-OF-bus-map" property now so it appears in the
  * /proc device tree
  */
@@ -218,6 +219,7 @@ pci_create_OF_bus_map(void)
 		of_node_put(dn);
 	}
 }
+#endif
 
 void pcibios_setup_phb_io_space(struct pci_controller *hose)
 {
-- 
2.20.1


  parent reply	other threads:[~2022-07-06 10:43 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-06 10:43 [PATCH 0/5] powerpc/pci: Cleanup unused code and enable 256 PCI buses Pali Rohár
2022-07-06 10:43 ` Pali Rohár
2022-07-06 10:43 ` [PATCH 1/5] powerpc/pci: Hide pci_device_from_OF_node() for non-powermac code Pali Rohár
2022-07-06 10:43   ` Pali Rohár
2022-07-11 22:35   ` Bjorn Helgaas
2022-07-11 22:35     ` Bjorn Helgaas
2022-07-06 10:43 ` [PATCH 2/5] powerpc/pci: Make pcibios_make_OF_bus_map() static Pali Rohár
2022-07-06 10:43   ` Pali Rohár
2022-07-06 10:43 ` Pali Rohár [this message]
2022-07-06 10:43   ` [PATCH 3/5] powerpc/pci: Hide pci_create_OF_bus_map() for non-chrp code Pali Rohár
2022-07-06 10:43 ` [PATCH 4/5] powerpc/pci: Disable filling pci-OF-bus-map for non-chrp/powermac Pali Rohár
2022-07-06 10:43   ` Pali Rohár
2022-07-06 10:43 ` [PATCH 5/5] powerpc/pci: Add config option for using all 256 PCI buses Pali Rohár
2022-07-06 10:43   ` Pali Rohár
2022-07-21 22:21   ` Pali Rohár
2022-07-21 22:21     ` Pali Rohár
2022-07-26 11:02     ` Michael Ellerman
2022-07-26 11:02       ` Michael Ellerman
2022-07-26 11:10       ` Pali Rohár
2022-07-26 11:10         ` Pali Rohár
2022-08-17 16:42         ` Pali Rohár
2022-08-17 16:42           ` Pali Rohár
2022-07-29 13:02 ` [PATCH 0/5] powerpc/pci: Cleanup unused code and enable " Michael Ellerman

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=20220706104308.5390-4-pali@kernel.org \
    --to=pali@kernel.org \
    --cc=benh@kernel.crashing.org \
    --cc=christophe.leroy@csgroup.eu \
    --cc=clg@kaod.org \
    --cc=helgaas@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=nick.child@ibm.com \
    --cc=paulus@samba.org \
    /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.