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=-5.7 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no 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 B9B9FC47082 for ; Thu, 3 Jun 2021 15:44:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9E75C61208 for ; Thu, 3 Jun 2021 15:44:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229844AbhFCPqe (ORCPT ); Thu, 3 Jun 2021 11:46:34 -0400 Received: from alexa-out.qualcomm.com ([129.46.98.28]:4016 "EHLO alexa-out.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229809AbhFCPqd (ORCPT ); Thu, 3 Jun 2021 11:46:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1622735089; x=1654271089; h=subject:to:cc:references:from:message-id:date: mime-version:in-reply-to:content-transfer-encoding; bh=cQXeI1iupQ/U08vQCtzUC6FpXzaVzXNRxKeUoPflw3o=; b=dWLYgMOQk80dQ4/i8vhYiiav5CVQWMB213bBTFHl5P45Y0qTCII5Q86h lR69ue4BpGlXYyLl6g5pDVH/GiLPA9fdStZsn+46E0I5xqgLa/XQ2w/7T 4IqsRtWQ8GcmJAB7wr6rvhNAOu1PU2fANmQxrzn50PpGLjxJdAcBJ40Mw 0=; Received: from ironmsg09-lv.qualcomm.com ([10.47.202.153]) by alexa-out.qualcomm.com with ESMTP; 03 Jun 2021 08:44:49 -0700 X-QCInternal: smtphost Received: from nalasexr03e.na.qualcomm.com ([10.49.195.114]) by ironmsg09-lv.qualcomm.com with ESMTP/TLS/AES256-SHA; 03 Jun 2021 08:44:48 -0700 Received: from [10.38.241.122] (10.80.80.8) by nalasexr03e.na.qualcomm.com (10.49.195.114) with Microsoft SMTP Server (TLS) id 15.0.1497.18; Thu, 3 Jun 2021 08:44:47 -0700 Subject: Re: Arm64 double PCI ECAM reservations in acpi_resource_consumer() To: Lorenzo Pieralisi CC: Bjorn Helgaas , Catalin Marinas , Will Deacon , linux-arm , Linux PCI References: <3a1165b6-033f-33af-fe1f-33a1be4b500a@quicinc.com> <20210603141641.GA17284@lpieralisi> From: Qian Cai Message-ID: Date: Thu, 3 Jun 2021 11:44:45 -0400 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 MIME-Version: 1.0 In-Reply-To: <20210603141641.GA17284@lpieralisi> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanexm03d.na.qualcomm.com (10.85.0.91) To nalasexr03e.na.qualcomm.com (10.49.195.114) Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org On 6/3/2021 10:16 AM, Lorenzo Pieralisi wrote: > This is not the "reservation". AFAICS acpi_resource_consumer() checks > whether the ECAM region is part of _a_ given ACPI device _CRS in the > namespace, it does not "reserve" anything. > > IIUC the issue here is that we request the ECAM region in > pci_ecam_create() and later the code in: Okay, I was confused by the code. I thought once acpi_resource_consumer() returned something, it is "reserved". adev = acpi_resource_consumer(&cfgres); if (adev) dev_info(dev, "ECAM area %pR reserved by %s\n", &cfgres, dev_name(&adev->dev)); else dev_warn(dev, FW_BUG "ECAM area %pR not reserved in ACPI namespace\n", &cfgres); > > drivers/pnp/system.c > > tries to request the ECAM region (that lives in the PNP0C02 _CRS) and > fails (see reserve_range() and request_mem_region()). > > As the comment in reserve_range() goes, this is harmless, not sure > whether there is anything to do about it. Actually, the comment said it is "usually harmless", so it is a tricky for an average Joe to figure out if one case falls into the "usual" bracket or not at the first place.