linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] powerpc/fsl-pci: Choose PCI host bridge with alias pci0 as the primary
@ 2022-08-20 12:33 Pali Rohár
  2022-10-09 11:08 ` Pali Rohár
  2022-12-08 12:39 ` Michael Ellerman
  0 siblings, 2 replies; 5+ messages in thread
From: Pali Rohár @ 2022-08-20 12:33 UTC (permalink / raw)
  To: Michael Ellerman, Benjamin Herrenschmidt, Paul Mackerras
  Cc: linuxppc-dev, linux-kernel

If there's no PCI host bridge with ISA then check for PCI host bridge with
alias "pci0" (first PCI host bridge) and if it exists then choose it as the
primary PCI host bridge.

This makes choice of primary PCI host bridge more stable across boots and
updates as the last fallback candidate for primary PCI host bridge (if
there is no choice) is selected arbitrary.

Signed-off-by: Pali Rohár <pali@kernel.org>
---
 arch/powerpc/sysdev/fsl_pci.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/arch/powerpc/sysdev/fsl_pci.c b/arch/powerpc/sysdev/fsl_pci.c
index 1011cfea2e32..e4b703943dd3 100644
--- a/arch/powerpc/sysdev/fsl_pci.c
+++ b/arch/powerpc/sysdev/fsl_pci.c
@@ -1125,6 +1125,19 @@ void __init fsl_pci_assign_primary(void)
 			return;
 	}
 
+	/*
+	 * If there's no PCI host bridge with ISA then check for
+	 * PCI host bridge with alias "pci0" (first PCI host bridge).
+	 */
+	np = of_find_node_by_path("pci0");
+	if (np && of_match_node(pci_ids, np) && of_device_is_available(np)) {
+		fsl_pci_primary = np;
+		of_node_put(np);
+		return;
+	}
+	if (np)
+		of_node_put(np);
+
 	/*
 	 * If there's no PCI host bridge with ISA, arbitrarily
 	 * designate one as primary.  This can go away once
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] powerpc/fsl-pci: Choose PCI host bridge with alias pci0 as the primary
  2022-08-20 12:33 [PATCH] powerpc/fsl-pci: Choose PCI host bridge with alias pci0 as the primary Pali Rohár
@ 2022-10-09 11:08 ` Pali Rohár
  2022-11-01 22:19   ` Pali Rohár
  2022-12-08 12:39 ` Michael Ellerman
  1 sibling, 1 reply; 5+ messages in thread
From: Pali Rohár @ 2022-10-09 11:08 UTC (permalink / raw)
  To: Michael Ellerman, Benjamin Herrenschmidt, Paul Mackerras
  Cc: linuxppc-dev, linux-kernel

Hello! Any opinion on this patch?

On Saturday 20 August 2022 14:33:27 Pali Rohár wrote:
> If there's no PCI host bridge with ISA then check for PCI host bridge with
> alias "pci0" (first PCI host bridge) and if it exists then choose it as the
> primary PCI host bridge.
> 
> This makes choice of primary PCI host bridge more stable across boots and
> updates as the last fallback candidate for primary PCI host bridge (if
> there is no choice) is selected arbitrary.
> 
> Signed-off-by: Pali Rohár <pali@kernel.org>
> ---
>  arch/powerpc/sysdev/fsl_pci.c | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
> 
> diff --git a/arch/powerpc/sysdev/fsl_pci.c b/arch/powerpc/sysdev/fsl_pci.c
> index 1011cfea2e32..e4b703943dd3 100644
> --- a/arch/powerpc/sysdev/fsl_pci.c
> +++ b/arch/powerpc/sysdev/fsl_pci.c
> @@ -1125,6 +1125,19 @@ void __init fsl_pci_assign_primary(void)
>  			return;
>  	}
>  
> +	/*
> +	 * If there's no PCI host bridge with ISA then check for
> +	 * PCI host bridge with alias "pci0" (first PCI host bridge).
> +	 */
> +	np = of_find_node_by_path("pci0");
> +	if (np && of_match_node(pci_ids, np) && of_device_is_available(np)) {
> +		fsl_pci_primary = np;
> +		of_node_put(np);
> +		return;
> +	}
> +	if (np)
> +		of_node_put(np);
> +
>  	/*
>  	 * If there's no PCI host bridge with ISA, arbitrarily
>  	 * designate one as primary.  This can go away once
> -- 
> 2.20.1
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] powerpc/fsl-pci: Choose PCI host bridge with alias pci0 as the primary
  2022-10-09 11:08 ` Pali Rohár
@ 2022-11-01 22:19   ` Pali Rohár
  2022-11-26 16:23     ` Pali Rohár
  0 siblings, 1 reply; 5+ messages in thread
From: Pali Rohár @ 2022-11-01 22:19 UTC (permalink / raw)
  To: Michael Ellerman, Benjamin Herrenschmidt, Paul Mackerras
  Cc: linuxppc-dev, linux-kernel

Hello! I would like to remind this patch.

On Sunday 09 October 2022 13:08:08 Pali Rohár wrote:
> Hello! Any opinion on this patch?
> 
> On Saturday 20 August 2022 14:33:27 Pali Rohár wrote:
> > If there's no PCI host bridge with ISA then check for PCI host bridge with
> > alias "pci0" (first PCI host bridge) and if it exists then choose it as the
> > primary PCI host bridge.
> > 
> > This makes choice of primary PCI host bridge more stable across boots and
> > updates as the last fallback candidate for primary PCI host bridge (if
> > there is no choice) is selected arbitrary.
> > 
> > Signed-off-by: Pali Rohár <pali@kernel.org>
> > ---
> >  arch/powerpc/sysdev/fsl_pci.c | 13 +++++++++++++
> >  1 file changed, 13 insertions(+)
> > 
> > diff --git a/arch/powerpc/sysdev/fsl_pci.c b/arch/powerpc/sysdev/fsl_pci.c
> > index 1011cfea2e32..e4b703943dd3 100644
> > --- a/arch/powerpc/sysdev/fsl_pci.c
> > +++ b/arch/powerpc/sysdev/fsl_pci.c
> > @@ -1125,6 +1125,19 @@ void __init fsl_pci_assign_primary(void)
> >  			return;
> >  	}
> >  
> > +	/*
> > +	 * If there's no PCI host bridge with ISA then check for
> > +	 * PCI host bridge with alias "pci0" (first PCI host bridge).
> > +	 */
> > +	np = of_find_node_by_path("pci0");
> > +	if (np && of_match_node(pci_ids, np) && of_device_is_available(np)) {
> > +		fsl_pci_primary = np;
> > +		of_node_put(np);
> > +		return;
> > +	}
> > +	if (np)
> > +		of_node_put(np);
> > +
> >  	/*
> >  	 * If there's no PCI host bridge with ISA, arbitrarily
> >  	 * designate one as primary.  This can go away once
> > -- 
> > 2.20.1
> > 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] powerpc/fsl-pci: Choose PCI host bridge with alias pci0 as the primary
  2022-11-01 22:19   ` Pali Rohár
@ 2022-11-26 16:23     ` Pali Rohár
  0 siblings, 0 replies; 5+ messages in thread
From: Pali Rohár @ 2022-11-26 16:23 UTC (permalink / raw)
  To: Michael Ellerman, Benjamin Herrenschmidt, Paul Mackerras
  Cc: linuxppc-dev, linux-kernel

PING?

On Tuesday 01 November 2022 23:19:09 Pali Rohár wrote:
> Hello! I would like to remind this patch.
> 
> On Sunday 09 October 2022 13:08:08 Pali Rohár wrote:
> > Hello! Any opinion on this patch?
> > 
> > On Saturday 20 August 2022 14:33:27 Pali Rohár wrote:
> > > If there's no PCI host bridge with ISA then check for PCI host bridge with
> > > alias "pci0" (first PCI host bridge) and if it exists then choose it as the
> > > primary PCI host bridge.
> > > 
> > > This makes choice of primary PCI host bridge more stable across boots and
> > > updates as the last fallback candidate for primary PCI host bridge (if
> > > there is no choice) is selected arbitrary.
> > > 
> > > Signed-off-by: Pali Rohár <pali@kernel.org>
> > > ---
> > >  arch/powerpc/sysdev/fsl_pci.c | 13 +++++++++++++
> > >  1 file changed, 13 insertions(+)
> > > 
> > > diff --git a/arch/powerpc/sysdev/fsl_pci.c b/arch/powerpc/sysdev/fsl_pci.c
> > > index 1011cfea2e32..e4b703943dd3 100644
> > > --- a/arch/powerpc/sysdev/fsl_pci.c
> > > +++ b/arch/powerpc/sysdev/fsl_pci.c
> > > @@ -1125,6 +1125,19 @@ void __init fsl_pci_assign_primary(void)
> > >  			return;
> > >  	}
> > >  
> > > +	/*
> > > +	 * If there's no PCI host bridge with ISA then check for
> > > +	 * PCI host bridge with alias "pci0" (first PCI host bridge).
> > > +	 */
> > > +	np = of_find_node_by_path("pci0");
> > > +	if (np && of_match_node(pci_ids, np) && of_device_is_available(np)) {
> > > +		fsl_pci_primary = np;
> > > +		of_node_put(np);
> > > +		return;
> > > +	}
> > > +	if (np)
> > > +		of_node_put(np);
> > > +
> > >  	/*
> > >  	 * If there's no PCI host bridge with ISA, arbitrarily
> > >  	 * designate one as primary.  This can go away once
> > > -- 
> > > 2.20.1
> > > 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] powerpc/fsl-pci: Choose PCI host bridge with alias pci0 as the primary
  2022-08-20 12:33 [PATCH] powerpc/fsl-pci: Choose PCI host bridge with alias pci0 as the primary Pali Rohár
  2022-10-09 11:08 ` Pali Rohár
@ 2022-12-08 12:39 ` Michael Ellerman
  1 sibling, 0 replies; 5+ messages in thread
From: Michael Ellerman @ 2022-12-08 12:39 UTC (permalink / raw)
  To: Benjamin Herrenschmidt, Michael Ellerman, Paul Mackerras,
	Pali Rohár
  Cc: linuxppc-dev, linux-kernel

On Sat, 20 Aug 2022 14:33:27 +0200, Pali Rohár wrote:
> If there's no PCI host bridge with ISA then check for PCI host bridge with
> alias "pci0" (first PCI host bridge) and if it exists then choose it as the
> primary PCI host bridge.
> 
> This makes choice of primary PCI host bridge more stable across boots and
> updates as the last fallback candidate for primary PCI host bridge (if
> there is no choice) is selected arbitrary.
> 
> [...]

Applied to powerpc/next.

[1/1] powerpc/fsl-pci: Choose PCI host bridge with alias pci0 as the primary
      https://git.kernel.org/powerpc/c/e082e99f6f87f5204b2531d5a3db7bbd929d23b1

cheers

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-12-08 13:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-20 12:33 [PATCH] powerpc/fsl-pci: Choose PCI host bridge with alias pci0 as the primary Pali Rohár
2022-10-09 11:08 ` Pali Rohár
2022-11-01 22:19   ` Pali Rohár
2022-11-26 16:23     ` Pali Rohár
2022-12-08 12:39 ` Michael Ellerman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).