linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Jia Hongtao-B38951 <B38951@freescale.com>
To: Kumar Gala <galak@kernel.crashing.org>,
	Li Yang-R58472 <r58472@freescale.com>
Cc: Wood Scott-B07421 <B07421@freescale.com>,
	"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>,
	Li Yang-R58472 <r58472@freescale.com>
Subject: RE: [PATCH V3 1/5] powerpc/fsl-pci: Unify pci/pcie initialization code
Date: Wed, 1 Aug 2012 02:24:51 +0000	[thread overview]
Message-ID: <412C8208B4A0464FA894C5F0C278CD5D01A2B327@039-SN1MPN1-002.039d.mgd.msft.net> (raw)
In-Reply-To: <0080192C-3C13-40DA-BE8A-4FCE67F79E04@kernel.crashing.org>



> -----Original Message-----
> From: Kumar Gala [mailto:galak@kernel.crashing.org]
> Sent: Tuesday, July 31, 2012 9:38 PM
> To: Li Yang-R58472
> Cc: Jia Hongtao-B38951; Wood Scott-B07421; linuxppc-dev@lists.ozlabs.org;
> Li Yang-R58472
> Subject: Re: [PATCH V3 1/5] powerpc/fsl-pci: Unify pci/pcie
> initialization code
>=20
>=20
> On Jul 31, 2012, at 2:21 AM, Li Yang wrote:
>=20
> > On Mon, Jul 30, 2012 at 10:46 PM, Kumar Gala <galak@kernel.crashing.org=
>
> wrote:
> >>
> >> On Jul 30, 2012, at 3:26 AM, Jia Hongtao-B38951 wrote:
> >>
> >>>
> >>>
> >>>> -----Original Message-----
> >>>> From: Kumar Gala [mailto:galak@kernel.crashing.org]
> >>>> Sent: Saturday, July 28, 2012 5:17 AM
> >>>> To: Wood Scott-B07421
> >>>> Cc: Jia Hongtao-B38951; linuxppc-dev@lists.ozlabs.org; Wood Scott-
> B07421;
> >>>> Li Yang-R58472
> >>>> Subject: Re: [PATCH V3 1/5] powerpc/fsl-pci: Unify pci/pcie
> >>>> initialization code
> >>>>
> >>>>
> >>>> On Jul 27, 2012, at 3:24 PM, Scott Wood wrote:
> >>>>
> >>>>> On 07/27/2012 05:10 AM, Jia Hongtao-B38951 wrote:
> >>>>>> Hi kumar,
> >>>>>>
> >>>>>> I know "duplicate code from pci_process_bridge_OF_ranges()" is
> >>>>>> hard to accept but "refactor the code to have a shared function"
> >>>>>> is knotty. Actually this is the reason I didn't do the refactor.
> >>>>>
> >>>>> Maybe we should keep doing the init early?  We could still have a
> >>>>> platform device for the PM stuff, but some init would be done
> before
> >>>> probe.
> >>>>>
> >>>>> Another possibility is to try to handle swiotlb init later --
> possibly
> >>>>> by reserving memory for it if the platform indicates it's a
> possibility
> >>>>> that it will be needed, then freeing the memory if it's not needed.
> >>>>>
> >>>>> -Scott
> >>>>
> >>>> I think the first option seems reasonable.  Can we leave
> fsl_pci_init()
> >>>> as we now have it and just have the platform driver deal with PM
> restore
> >>>> via calling setup_pci_atmu() [probably need to update setup_pci_atmu
> to
> >>>> handle restore case, but seems like minor changes]
> >>>>
> >>>> - k
> >>>>
> >>>
> >>>
> >>> I think the second option is better if it's hard to decouple swiotlb
> >>> determination from pci init. I believe the better architecture that
> >>> PCI init in probe function of platform driver will bring us
> considerable
> >>> advantage. I really like to keep the completion of pci controller
> >>> platform driver not only for PM support but also for pci init.
> >>>
> >>> -Hongtao.
> >>>
> >>
> >> Shifting of swiotlb init has a lot more issues.  Why do we need to do
> the PCI init in probe?
> >
> > The ordering issues are introduced by swiotlb.  And the ideal way is
> > to solve the problem within swiotlb instead of changing PCI to
> > workaround it.  Take the implementation of x86 as reference it's
> > possible to be addressed bu allocating first and free later approach.
> >
> > It is common sense that the initialization of a device is in the probe
> > function of the driver of the device.  And the change will provide
> > better unification of PCI controller code.  The PCI controller is
> > generic enough not to be taken care of at the platform area.
> >
> > Leo
>=20
> Than lets look at going with that approach.. Be careful with impact on
> other users of swiotlb on PPC, I believe one 44x board uses swiotlb.
>=20
> - k

I will be careful with this approach.
I have already noticed 44x. Thank you all the same.

-Hongtao.

  reply	other threads:[~2012-08-01  2:25 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-26 12:30 [PATCH V3 1/5] powerpc/fsl-pci: Unify pci/pcie initialization code Jia Hongtao
2012-07-26 12:30 ` [PATCH V3 2/5] powerpc/fsl-pci: Determine primary bus by looking for ISA node Jia Hongtao
2012-07-26 18:21   ` Kumar Gala
2012-07-27  2:16     ` Jia Hongtao-B38951
2012-07-27  2:56     ` Jia Hongtao-B38951
2012-07-26 12:30 ` [PATCH V3 3/5] powerpc/mpc85xx: convert to unified PCI init Jia Hongtao
2012-07-26 17:46   ` Kumar Gala
2012-07-26 17:47   ` Kumar Gala
2012-07-26 12:30 ` [PATCH V3 4/5] powerpc/fsl-pci: Add pci inbound/outbound PM support Jia Hongtao
2012-07-26 12:30 ` [PATCH V3 5/5] Edac/85xx: Register mpc85xx_pci_err_driver by fsl_pci_driver Jia Hongtao
2012-07-26 17:52 ` [PATCH V3 1/5] powerpc/fsl-pci: Unify pci/pcie initialization code Kumar Gala
2012-07-27 10:10   ` Jia Hongtao-B38951
2012-07-27 20:24     ` Scott Wood
2012-07-27 21:17       ` Kumar Gala
2012-07-30  8:26         ` Jia Hongtao-B38951
2012-07-30 14:46           ` Kumar Gala
2012-07-31  6:36             ` Jia Hongtao-B38951
2012-07-31  7:21             ` Li Yang
2012-07-31 13:37               ` Kumar Gala
2012-08-01  2:24                 ` Jia Hongtao-B38951 [this message]
2012-07-26 18:14 ` Kumar Gala
2012-07-27  8:35   ` Jia Hongtao-B38951
2012-07-27 12:47     ` Kumar Gala
2012-07-30  8:07       ` Jia Hongtao-B38951
2012-07-30 14:46         ` Kumar Gala
2012-07-31  2:22           ` Jia Hongtao-B38951
2012-08-01 17:42   ` Joakim Tjernlund

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=412C8208B4A0464FA894C5F0C278CD5D01A2B327@039-SN1MPN1-002.039d.mgd.msft.net \
    --to=b38951@freescale.com \
    --cc=B07421@freescale.com \
    --cc=galak@kernel.crashing.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=r58472@freescale.com \
    /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 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).