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 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6173AC433F5 for ; Mon, 11 Oct 2021 09:12:08 +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 214B06056B for ; Mon, 11 Oct 2021 09:12:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 214B06056B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=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:Cc:To:Subject:Message-ID:Date:From: In-Reply-To:References:MIME-Version:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=IJ9Be12kkwDCb5LmYZcEFpFNmQMKkTqWydyGrmcVPEM=; b=pWS1XGmUAmyVJX ZTVehcUrpW0SxMdSabD86ZtMm+6esB+gCnN8B2gZVHKxVx1QvQRhSp1HgpaQ0FkuSOnmp8jvfAOWP p+VY9x9u7tr+dDYRmWhdaZ28Nd/pZeLgiJi7CS/lYxh8/9DRF1Jtj82tPTj0HwFuZmonXnBc6Uqdu CAxc/EdCMVY69eXZ3+n0HY29XJm6D6b2Y8mTjIxpootMUkcH/r4FhqADJiw1MihYJ+P1Gqhr49fEJ z3EiDE+453nxEFukUHNa5y9z9o5zrSnpKv5MqtqwO9lIDJVepU8qQOCCwdOI3aVGdaTGc8uC4T+FM 8sy34fL3AG/dydwGqOLw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mZrJQ-008TxR-SX; Mon, 11 Oct 2021 09:09:37 +0000 Received: from mail-qk1-x72c.google.com ([2607:f8b0:4864:20::72c]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mZrJN-008Twz-Bk for linux-arm-kernel@lists.infradead.org; Mon, 11 Oct 2021 09:09:34 +0000 Received: by mail-qk1-x72c.google.com with SMTP id 77so14673119qkh.6 for ; Mon, 11 Oct 2021 02:09:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=mmIaLKrbsPcdQfNFBZqmZSPhrHWq8Kaob/N8FHo8Fls=; b=bngqbi74I3OBcqTY+RIZ8kWeuOyHiNmThFK5GldqFngvi3XfTkB/kMa4N7aEWxGf4C kmh669p4sU54vplIHzevZ6ejfSTv8hQ21EVKnM3Jwjd1juoNN9ok18sOGEGqKGm5O9aH yhIP76S1l/RUi3QUGSxRbqeKPvS+o6qroqohq5p8ltaBoa+yfGFdtK5ZE3EMpU4WKzMe CJMphtVwLtgfuCENg9doUy6BDJckfpz3LduUs/nX7anoP4IElpegKccrPUZlfiuoxQCR waBzIhbVBdiKwgqZ5Bw+t2UKyjagxdCSTYIJcAMPGNUOLWOYTDu/jgsdMw45ow121n44 6s+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=mmIaLKrbsPcdQfNFBZqmZSPhrHWq8Kaob/N8FHo8Fls=; b=jVRHB7yIs90P5NgWUCsR3TrDDusNEROLGcGZb3h0uHDznwB6pXnXFw7718P+rKweiZ Rc6BZnpQ2drCdekYIpXaYjkTe4qqLwzqGxSmQeTeXG+WFsz5vvS5Bn3quqEKasaZloD+ 703SB92oVnEQVuB6ox1WIJpuaoiLg2Z6G109lu0N9HqXg4w10eWzbXTC2SVBNAcJXPCu M+2p84Fwvo4ZSLuRq/jRwYCnOcDdJHMQuKGx4ld074uYKGIUlOWGrobu2vVYXj1QqL6r hO+LY2Klb6rnQ1LD0nxviybQ6x2DLXk8BRM+jVJlY4/C8dz7DjTzs3qpgO3B8APtMqHD r1aA== X-Gm-Message-State: AOAM5309vAWw8PW7KamnymSCcrK5hutwYk8qsyYBqVsHzNi/KHUJho4J R2WdbcSyYCjMT1mmsRJlwGJMyeP4kruFHk5ohObpZA== X-Google-Smtp-Source: ABdhPJzCAxoh0kT9ewt0cklMxy0VT0v9K2ZuPa0Z4w1Vsd8VSQc2Y+VzTMDaIihHeM05/lPiH0fVvh6FpbA5nCRCiuM= X-Received: by 2002:a37:bac6:: with SMTP id k189mr13621788qkf.186.1633943372114; Mon, 11 Oct 2021 02:09:32 -0700 (PDT) MIME-Version: 1.0 References: <20211010023350.978638-1-dmitry.baryshkov@linaro.org> In-Reply-To: From: Dmitry Baryshkov Date: Mon, 11 Oct 2021 12:09:21 +0300 Message-ID: Subject: Re: [PATCH] iommu: fix ARM_SMMU vs QCOM_SCM compilation To: Arnd Bergmann Cc: Bjorn Andersson , Joerg Roedel , Will Deacon , Robin Murphy , Kalle Valo , Thierry Reding , Andy Gross , linux-arm-msm , "open list:IOMMU DRIVERS" , Linux Kernel Mailing List , Linux ARM , Daniel Lezcano X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211011_020933_453241_E85E3F00 X-CRM114-Status: GOOD ( 19.59 ) 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 Mon, 11 Oct 2021 at 09:09, Arnd Bergmann wrote: > > On Mon, Oct 11, 2021 at 6:11 AM Dmitry Baryshkov > wrote: > > On Sun, 10 Oct 2021 at 20:42, Arnd Bergmann wrote: > > > > The patch seems correct, but it becomes overcomplicated. What about: > > - restoring QCOM_SCM stubs > > The stubs are what has led to the previous bugs in this area to often > go unnoticed for too long, as illustrated by your suggestion > > > - making ARM_SMMU select QCOM_SCM if ARM_SMMU_QCOM > > I assume you meant "select QCOM_SCM if ARCH_QCOM", > after we stop using ARM_SMMU_QCOM? > > > This would have almost the same result as with your patch, but without > > extra ARM_SMMU_QCOM Kconfig symbol. > > The "almost" is the problem: consider the case of > > CONFIG_ARM=y > CONFIG_COMPILE_TEST=y > CONFIG_ARCH_QCOM=n > CONFIG_ARM_SMMU=y > CONFIG_DRM_MSM=m > CONFIG_QCOM_SCM=m (selected by DRM_MSM) > > The stubs here lead to ARM_SMMU linking against the QCOM_SCM > driver from built-in code, which fails because QCOM_SCM itself > is a loadable module. I see. The idealist in me wishes to change my suggestion to 'select QCOM_SCM if ARCH_QCOM || COMPILE_TEST' but I have the subtle feeling that this also might fail somehow. > > We can move the "select QCOM_SCM" in the ARM_SMMU_QCOM > symbol if we make that a tristate though, if you want to separate it > a little more. This would complicate things a bit, as we would no longer be able to use 'arm-smmu-$(CONFIG_ARM_SMMU_QCOM) +=' construct. -- With best wishes Dmitry _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel