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.5 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,URIBL_BLOCKED,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 5B004C433DB for ; Fri, 29 Jan 2021 13:17:08 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (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 0C13C64DED for ; Fri, 29 Jan 2021 13:17:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0C13C64DED Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=huawei.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=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=/7VahZb/AMiJbJ3KW9UpoNhI3RnP7Lw/zA4I7jfgpF4=; b=d+r79nFE/p9ldU75TGMB6cm6h k7LKXEVdaTbFgxZxBx8qQKbV7NUltEZBlK0rXygXUp3X2HGRQcBJv/g9loxaDUFeZnSTToOUJxwtB Hjac2WEflJKEvzBp0LWaDx2VoYiCUp+pjJ4ZfYVi9ub+WtGdDJ+bEuqkNZdcvDWhe7lupmiROScqJ CZdKit057rZu8oQNWOj2dz/JdcyJX3pJVBbTcQN8y8spXR4SxbWkyxTv4A7G1YPvKxbx14TxyVsfP KOLsd8Tezdm83LY6fXo6/fkNHlK2aczNXUr7E6ZAWlZl+O/2LTEY5g7VidauOmScgyAOCmLFCFYtc 8U75bKivA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l5Tcm-0008LZ-BX; Fri, 29 Jan 2021 13:15:44 +0000 Received: from szxga05-in.huawei.com ([45.249.212.191]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1l5Tcf-0008Kk-TV for linux-arm-kernel@lists.infradead.org; Fri, 29 Jan 2021 13:15:42 +0000 Received: from DGGEMS408-HUB.china.huawei.com (unknown [172.30.72.58]) by szxga05-in.huawei.com (SkyGuard) with ESMTP id 4DRyV141BVzjFxl; Fri, 29 Jan 2021 21:14:17 +0800 (CST) Received: from [127.0.0.1] (10.174.176.220) by DGGEMS408-HUB.china.huawei.com (10.3.19.208) with Microsoft SMTP Server id 14.3.498.0; Fri, 29 Jan 2021 21:15:24 +0800 Subject: Re: [PATCH v3 0/3] perf/smmuv3: Don't reserve the PMCG register spaces To: Will Deacon References: <20210127113258.1421-1-thunder.leizhen@huawei.com> <20210128203148.GG3016@willie-the-truck> From: "Leizhen (ThunderTown)" Message-ID: Date: Fri, 29 Jan 2021 21:15:23 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.7.0 MIME-Version: 1.0 In-Reply-To: <20210128203148.GG3016@willie-the-truck> Content-Language: en-US X-Originating-IP: [10.174.176.220] X-CFilter-Loop: Reflected X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210129_081538_603166_3D453971 X-CRM114-Status: GOOD ( 16.92 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , Jean-Philippe Brucker , Joerg Roedel , linux-kernel , Shameer Kolothum , iommu , Robin Murphy , linux-arm-kernel 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 2021/1/29 4:31, Will Deacon wrote: > On Wed, Jan 27, 2021 at 07:32:55PM +0800, Zhen Lei wrote: >> v2 --> v3: >> Patch 3 is updated because https://lkml.org/lkml/2021/1/22/532 has been queued in advance. >> >> v1 --> v2: >> According to Robin Murphy's suggestion: https://lkml.org/lkml/2021/1/20/470 >> Don't reserve the PMCG register spaces, and reserve the entire SMMU register space. >> >> v1: >> Since the PMCG may implement its resigters space(4KB Page0 and 4KB Page1) >> within the SMMUv3 64KB Page0. In this case, when the SMMUv3 driver reserves the >> 64KB Page0 resource in advance, the PMCG driver try to reserve its Page0 and >> Page1 resources, a resource conflict occurs. >> >> commit 52f3fab0067d6fa ("iommu/arm-smmu-v3: Don't reserve implementation >> defined register space") reduce the resource reservation range of the SMMUv3 >> driver, it only reserves the first 0xe00 bytes in the 64KB Page0, to avoid >> the above-mentioned resource conflicts. >> >> But the SMMUv3.3 add support for ECMDQ, its registers space is also implemented >> in the SMMUv3 64KB Page0. This means we need to build two separate mappings. >> New features may be added in the future, and more independent mappings may be >> required. The simple problem is complicated because the user expects to map the >> entire SMMUv3 64KB Page0. >> >> Therefore, the proper solution is: If the PMCG register resources are located in >> the 64KB Page0 of the SMMU, the PMCG driver does not reserve the conflict resources >> when the SMMUv3 driver has reserved the conflict resources before. Instead, the PMCG >> driver only performs devm_ioremap() to ensure that it can work properly. >> >> Zhen Lei (3): >> perf/smmuv3: Don't reserve the PMCG register spaces >> perf/smmuv3: Add a MODULE_SOFTDEP() to indicate dependency on SMMU >> iommu/arm-smmu-v3: Reserving the entire SMMU register space > > I'll need Robin's ack on these. Hi, Robin: What's your opinion? In fact, I have written the patches that SMMU and PMCG whoever come first will reserve the resources, and whoever comes next does not reserve. However, the processing logic is relatively complex. > > Will > > . > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel