Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp1395489imm; Wed, 20 Jun 2018 17:40:19 -0700 (PDT) X-Google-Smtp-Source: ADUXVKK44HMDEsp6mn6kITp8698dLTAMxRPB0xA0wkfSTgEjORLYfFIDVI6C1obx+b3ctPs3ms96 X-Received: by 2002:a63:6dc3:: with SMTP id i186-v6mr20970134pgc.316.1529541619813; Wed, 20 Jun 2018 17:40:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529541619; cv=none; d=google.com; s=arc-20160816; b=Bl2P4DBhB5woIW5Wxd3B0rm4F5BQMZZeZ+q+2JvTXinHVTVlU6iaxOmvjPNRE7bx2l m0NuYV22F9/4zdlUoXPoZ9JN+DT8BPJ3Sf+qWCEYYyYwvG73CmdZOw8lyoEkkgyyoyDx F23hVzF/7vC2NqfJf/04i+E2mbSCSd7me6NJMRlykghh995qn/fSd4RFsYOc838uSksp y9Ejh4LjXHYpGxZj0xVwoUef6gDZr9U92tvV39xAPblyV36VyD/8XDqPxNmuCNVQz1pn Sw976Bm+apHY19pSADofgoCe0uFH7LYcZwdooxgZzvRGUSIQL70be/CUWkAIVQmN/cyx 1DNA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:date:cc:to:from:subject:message-id :arc-authentication-results; bh=FKIKr+dcI+dXDKnZLxlsgU8J6qOMw1+IqxEelGVWJ78=; b=amJ082PbcyBUY1fja+S2shQS9WWX8DYS5x+7jXGCO+qFnKXoanjdDrik1Kr3tPoYR+ H5tXMJKFwJPyVg1PS4AhW1Nqz4LmoUrCm2daAFCF0PNTRVh5RaNrCl2APQe05LxTThGA k3UJf2u9TTFyq7Uc7FvBpn9Ke2imlB6ioDs13DAPImDdlOwTERDOYZPzNh9PM+JAntbq XUkE65VegWaJT3sXTLLwNpnfgiLE/wvPRiAbmAyHhmr3wcaVkARRVRlCenap/y/qLKmU PxP2rL2K1pDaP4zXaQEPkeiz86LxOoQrGp73gogQPTdUi9+hLvg9sd4opteDqnzq6Jr1 6/6A== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t10-v6si3413291plh.306.2018.06.20.17.40.05; Wed, 20 Jun 2018 17:40:19 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754362AbeFUAjU (ORCPT + 99 others); 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.