From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2B683C43140 for ; Thu, 21 Jun 2018 00:39:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D96F620693 for ; Thu, 21 Jun 2018 00:39:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D96F620693 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.crashing.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754373AbeFUAjU (ORCPT ); Wed, 20 Jun 2018 20:39:20 -0400 Received: from gate.crashing.org ([63.228.1.57]:38967 "EHLO gate.crashing.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754251AbeFUAjS (ORCPT ); Wed, 20 Jun 2018 20:39:18 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id w5L0clXJ010219; Wed, 20 Jun 2018 19:38:48 -0500 Message-ID: Subject: Re: [PATCH] arch: powerpc: pci-common: fix wrong return value check on phd_id From: Benjamin Herrenschmidt To: Michael Ellerman , Daniel Walker , "Guilherme G. Piccoli" Cc: Andrew Morton , xe-kernel@external.cisco.com, linux-kernel@vger.kernel.org, Paul Mackerras , linuxppc-dev@lists.ozlabs.org, Mauro Rodrigues , linux-pci@vger.kernel.org Date: Thu, 21 Jun 2018 10:38:46 +1000 In-Reply-To: <87in6dvv89.fsf@concordia.ellerman.id.au> References: <20180618165706.42679-1-danielwa@cisco.com> <6d321d8a-432d-d41d-cc08-144764d644b2@cisco.com> <87in6dvv89.fsf@concordia.ellerman.id.au> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.2 (3.28.2-1.fc28) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2018-06-21 at 10:28 +1000, Michael Ellerman wrote: > > That's true, though I think yours is the first report we've had of > problems. > > The old behaviour relied on device tree ordering in nearly all cases, so > you basically get whatever order your firmware happened to flatten the > device tree in. > > That tends to be consistent on a single system or with a single firmware > version, but it's not stable in general. If your firmware changes, or > you kexec then the ordering can change. > > So I'd definitely prefer we didn't go back to that behaviour, because > it's basically "random order". > > If there's anything you can do on your end to cope with the ne I think the numbering change has to be coped with. However: The main issue I see is that it somewhat hard wires that "reg" is a 64-bit property with the "interesting" bits in the bottom, and that "interesting" part somewhat happens to fit in 16-bits. It would have been better to get the full address out of reg (using the appropriate size specified in the parent #address-cells) and hash it. Cheers, Ben.