From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lucas Kannebley Tavares Subject: Re: [PATCHv3 1/2] ppc64: perform proper max_bus_speed detection Date: Wed, 17 Apr 2013 09:38:40 -0300 Message-ID: <516E97D0.5090708@linux.vnet.ibm.com> References: <1365685994-32603-1-git-send-email-lucaskt@linux.vnet.ibm.com> <1365685994-32603-2-git-send-email-lucaskt@linux.vnet.ibm.com> <20130415050001.GA21147@concordia> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20130415050001.GA21147@concordia> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linuxppc-dev-bounces+glppe-linuxppc-embedded-2=m.gmane.org@lists.ozlabs.org Sender: "Linuxppc-dev" To: Michael Ellerman Cc: David Airlie , Brian King , dri-devel@lists.freedesktop.org, Kleber Sacilotto de Souza , Alex Deucher , Jerome Glisse , Thadeu Lima de Souza Cascardo , Bjorn Helgaas , linuxppc-dev@lists.ozlabs.org List-Id: dri-devel@lists.freedesktop.org On 04/15/2013 02:00 AM, Michael Ellerman wrote: > On Thu, Apr 11, 2013 at 10:13:13AM -0300, Lucas Kannebley Tavares wrote: >> On pseries machines the detection for max_bus_speed should be done >> through an OpenFirmware property. This patch adds a function to perform this >> detection and a hook to perform dynamic adding of the function only for >> pseries. > > The crucial detail you didn't mention is that pcibios_root_bridge_prepare() > already exists as a weak function in the PCI code and is called from > pci_create_root_bus(). Adding this comment. > >> diff --git a/arch/powerpc/platforms/pseries/setup.c b/arch/powerpc/platforms/pseries/setup.c >> index 8bcc9ca..15796b5 100644 >> --- a/arch/powerpc/platforms/pseries/setup.c >> +++ b/arch/powerpc/platforms/pseries/setup.c >> @@ -430,6 +430,8 @@ static void pSeries_machine_kexec(struct kimage *image) >> } >> #endif >> >> +int pseries_root_bridge_prepare(struct pci_host_bridge *bridge); >> + > > Don't do that, put it in a header where it belongs. > And done as well. > cheers > -- Lucas Kannebley Tavares Software Engineer IBM Linux Technology Center