From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754028AbbIGI7t (ORCPT ); Mon, 7 Sep 2015 04:59:49 -0400 Received: from ozlabs.org ([103.22.144.67]:52168 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752543AbbIGI7q (ORCPT ); Mon, 7 Sep 2015 04:59:46 -0400 Message-ID: <1441616383.8979.4.camel@ellerman.id.au> Subject: Re: [PATCH v4 3/4] powerpc: PCI: Fix lookup of linux,pci-probe-only property From: Michael Ellerman To: Marc Zyngier Cc: Benjamin Herrenschmidt , Paul Mackerras , Will Deacon , Bjorn Helgaas , Suravee Suthikulpanit , Lorenzo Pieralisi , Grant Likely , Rob Herring , Alexander Graf , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, linux-pci@vger.kernel.org, devicetree@vger.kernel.org, Anton Blanchard Date: Mon, 07 Sep 2015 18:59:43 +1000 In-Reply-To: <1441385411-7624-4-git-send-email-marc.zyngier@arm.com> References: <1441385411-7624-1-git-send-email-marc.zyngier@arm.com> <1441385411-7624-4-git-send-email-marc.zyngier@arm.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.12.11-0ubuntu3 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2015-09-04 at 17:50 +0100, Marc Zyngier wrote: > When find_and_init_phbs() looks for the probe-only property, it seems > to trust the firmware to be correctly written, and assumes that there > is a parameter to the property. > > It is conceivable that the firmware could not be that perfect, and it > could expose this property naked (at least one arm64 platform seems to > exhibit this exact behaviour). The setup code the ends up making > a decision based on whatever the property pointer points to, which > is likely to be junk. > > Instead, switch to the common of_pci.c implementation that doesn't > suffer from this problem and ignore the property if the firmware > couldn't make up its mind. > > Signed-off-by: Marc Zyngier > --- > arch/powerpc/platforms/pseries/setup.c | 14 ++------------ Thanks. I can't find any powerpc machine that is currently using this, or much info on what ever did use it, so I think it's pretty low impact, and the change looks sane. Acked-by: Michael Ellerman cheers