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=-15.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 23365C433E0 for ; Thu, 25 Mar 2021 17:09:06 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 00B68619E4 for ; Thu, 25 Mar 2021 17:09:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229944AbhCYRIc (ORCPT ); Thu, 25 Mar 2021 13:08:32 -0400 Received: from foss.arm.com ([217.140.110.172]:54280 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229869AbhCYRH7 (ORCPT ); Thu, 25 Mar 2021 13:07:59 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id AE02F143D; Thu, 25 Mar 2021 10:07:58 -0700 (PDT) Received: from [10.57.50.37] (unknown [10.57.50.37]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id AC1BF3F718; Thu, 25 Mar 2021 10:07:57 -0700 (PDT) Subject: Re: [PATCH] iommu/arm-smmu-qcom: create qcom_smmu_impl for ACPI boot To: Bjorn Andersson , Will Deacon Cc: Shawn Guo , lorenzo.pieralisi@arm.com, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org References: <20210301074021.20059-1-shawn.guo@linaro.org> <20210325145914.GC15172@willie-the-truck> <20210325170256.GA904837@yoga> From: Robin Murphy Message-ID: Date: Thu, 25 Mar 2021 17:07:52 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; rv:78.0) Gecko/20100101 Thunderbird/78.8.1 MIME-Version: 1.0 In-Reply-To: <20210325170256.GA904837@yoga> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org On 2021-03-25 17:02, Bjorn Andersson wrote: > On Thu 25 Mar 09:59 CDT 2021, Will Deacon wrote: > >> [+ Lorenzo] >> >> On Mon, Mar 01, 2021 at 03:40:21PM +0800, Shawn Guo wrote: >>> Though qcom_adreno_smmu_impl is not used by ACPI boot right now, >>> qcom_smmu_impl is already required at least to boot up Lenovo Flex 5G >>> laptop. Let's check asl_compiler_id in IORT header to ensure we are >>> running a QCOM SMMU and create qcom_smmu_impl for it. >>> >>> !np is used to check ACPI boot, because fwnode of SMMU device is >>> a static allocation and thus has_acpi_companion() doesn't work here. >>> >>> Signed-off-by: Shawn Guo >>> --- >>> drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c | 33 ++++++++++++++++++++++ >>> 1 file changed, 33 insertions(+) >> >> I don't know what a "asl_compiler_id" is, but it doesn't sound like it >> has an awful lot to do with the SMMU. >> > > I would prefer that we somehow relate this to the particular board, > rather than all Qualcomm-related ACPI tables. E.g. by relying on the > SMMU devices having a _HID of QCOM0409. > > Shawn, any reason for this wouldn't be possible? To do something broadly similar to identify HiSilicon's SMMU PMCG implementation, we use acpi_match_platform_list() - could we do the same for this? Robin. >> Lorenzo -- any idea what we should be doing here instead? Probably not >> using ACPI? >> > > The 8cx (aka sc8180x) platform comes with Qualcomm's usual SMMU > stream-mapping quirks and this is one of the patches needed to bring > enough ACPI support to run the Debian installer that Shawn has been > working on. After the installer we currently only boot this using DT - > which already enables the quirk. > > Regards, > Bjorn >