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. 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=-6.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,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 D9C24C47096 for ; Thu, 3 Jun 2021 15:47:01 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A6EE3613B8 for ; Thu, 3 Jun 2021 15:47:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A6EE3613B8 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=quicinc.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date: Message-ID:From:References:CC:To:Subject:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=BFpjk2CLUPCYTCx8ALoiM1cUly4mLOlVIZCEgdS5Xck=; b=1gYgRTMB5cx/lqF9AC4ti7ogeU CaG/+8TpTdK020oZbivpAs9BPooyCDUkWYV6hv0wWhvE8TWKgRSNfJns6Qb39GjXqP0/IhMbJdwQy shSsw1oGoGyDpwtAz5GcEQbixsvGj9IwKMKwkwtZSCIlEPULu9EdRvjwbWLsjfIq59NjX1yjfja3+ Aeq8ggnRHGlrI/yF9RFz4qlizS7L0mfjFoczezTR7gVhxFWWakhUoElW1vknqur5+MG9vc7TM0I9N xYXdE/DeAIxDrHyD3CEyZlnf/0w6vz64EJ5HnrTMdtL3r0IH2NhAf4In79xhAZYUyvlEvaI05Ruz1 dbyQS0DA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1lopWk-009PDU-Re; Thu, 03 Jun 2021 15:44:59 +0000 Received: from alexa-out.qualcomm.com ([129.46.98.28]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1lopWd-009PCx-Rs for linux-arm-kernel@lists.infradead.org; Thu, 03 Jun 2021 15:44:55 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1622735092; x=1654271092; h=subject:to:cc:references:from:message-id:date: mime-version:in-reply-to:content-transfer-encoding; bh=cQXeI1iupQ/U08vQCtzUC6FpXzaVzXNRxKeUoPflw3o=; b=I9cxu02q7UV7ey+SbnB2uNFNB3ElS+o1nonRZxR1D37vaq7sfvr3Lsav EhpxuYTarRFRBOOMUtHwmDWBIgpSZvI9IlXxbAfC8tVyTBUe+L2fgZGXd t2SVLDGxU33x8BDpxsrYqcySXS7UL1hixhJjVJqWNfcQH34CzkeKMEmQF 8=; 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-Language: en-US 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) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210603_084451_991791_13072277 X-CRM114-Status: GOOD ( 12.34 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel