Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp1367134pxb; Mon, 11 Oct 2021 04:37:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy84ARxAnzCN5ytdZR/FzTxRJrDch9ps9v9qeEc1BZaxoL4e089ALpjb43VK6ot/3FzMrJT X-Received: by 2002:a17:906:f6cd:: with SMTP id jo13mr24525785ejb.563.1633952279571; Mon, 11 Oct 2021 04:37:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633952279; cv=none; d=google.com; s=arc-20160816; b=etrHP4IAQdIZuq9g3hOmz8kT8BxAE/hzOAs/RNfv9pMcIW0gVrw59sPwY1PSez0qbS LPGiDI4IptSup/e1jxwZRrLA2DtWW7BbNkar1MqZrUuArQZ99BjyorwzJU2f9WOFJopo scfCbxXYM59ZcWggvMGG0wDxjh9wxIjpWaBVU4g5qCKbKg2FneC72juc3PZloanvG5sr AvG6qd4wzZEAi03BhGheFngLKoPfU7qqAAZu/kF+a6MXBH9AjnwDu5uxSF9zL/ePx1I5 DUbq5qEDYVOMaqSrl35JHLy4PsLujsEht7dgvH/6a+QluD7/qMS2IdzRCoHeQJftExiK CGLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version; bh=txCSY5EkRsdp1sFhmUAkcBj35T/b/xKZjSrN1SSKyZo=; b=Pcelm0eaDE2+ViheBfAf1bntTswN/Hfkxx/ho8HkHYt1L04E6BhAi67vEvWkS4gVXv mOmUSuLt5v/NEavc1YLRlPLUZA4gq+qOT2g3MW8b/g+5F/HoFGxqPOm8BOoYhcS1U290 qq3e4IyBdg+Yx5JLG1Lb8LXOlWfkssyUP2ODJGbcCM0quMdq1/Ya2H3EkQzt1HlSqAXK K14wJIKPy0WwsfjjLyVDVUqv9ZYQb1u/6k/J7QpZAaP/PvxsuHa50AH+HKVaR/DlNK5Z JLix0+sx2gX3PUil9NKYfRzS7CahNwH21xf0eOu2D6CVn/+7RKvlxZlzvuWBPlj5bZO7 vl5g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r21si8731394edb.376.2021.10.11.04.37.35; Mon, 11 Oct 2021 04:37:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233981AbhJKGLD (ORCPT + 99 others); Mon, 11 Oct 2021 02:11:03 -0400 Received: from mout.kundenserver.de ([212.227.126.134]:54963 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233802AbhJKGLC (ORCPT ); Mon, 11 Oct 2021 02:11:02 -0400 Received: from mail-wr1-f50.google.com ([209.85.221.50]) by mrelayeu.kundenserver.de (mreue011 [213.165.67.97]) with ESMTPSA (Nemesis) id 1MJVY8-1mKM0T3AHQ-00Jt7C; Mon, 11 Oct 2021 08:09:01 +0200 Received: by mail-wr1-f50.google.com with SMTP id r10so52365117wra.12; Sun, 10 Oct 2021 23:09:01 -0700 (PDT) X-Gm-Message-State: AOAM532lz6m3N6wq5WHFxRi0kS3Pf8DZqAzJ+NMmuNsycz5kBkXRMSJP sZyxKZO7Fr+Xw/hm8fe/yrQUrsZfw9WLgyr3Bjg= X-Received: by 2002:a05:600c:1548:: with SMTP id f8mr6604283wmg.35.1633932541412; Sun, 10 Oct 2021 23:09:01 -0700 (PDT) MIME-Version: 1.0 References: <20211010023350.978638-1-dmitry.baryshkov@linaro.org> In-Reply-To: From: Arnd Bergmann Date: Mon, 11 Oct 2021 08:08:44 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] iommu: fix ARM_SMMU vs QCOM_SCM compilation To: Dmitry Baryshkov Cc: Arnd Bergmann , 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 Content-Type: text/plain; charset="UTF-8" X-Provags-ID: V03:K1:k+HcbtuOTQpaVMTxJPM3+h+Of3AscCILByFUfjZe8V5Ish9HFzm zAHAi1G5NcqyLCyWORR4QmMEgvgvxk43ANxwFHVBjsmFWIbVrcC5g8H7k/3d0U75sf9NRX8 Pu4u7C55QYC3a8MYqQ3lKnR2RDuYIR7Hs/Z8q8zwY6I8fOEUBYBqUXHvOat//U7csEQC3/9 IV88+vmsKVPYYZ8GSipCQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:RznMQPZqWBg=:mbLYd1e0vkH/3H6mM6vpcR wXTo5qdMg3zcExQ2H0RC226AW62psyQW/R6kvDFmBiecSRGHHe/23ImFQOgXA/hDJpklAbbpy MiaPHKrtgBT0FqWc6xgXYGI47zURXKrM3lfxWJml/hJpF/IDC3hcbypzrJhAeaWTryYQI1Q7F AMPxil4CqTGqLkLz1/zC2szPo1qmFACY+glJzOW2jLlCl+t6ESaJtf2SpCTqa3tOWeWKsE7eT RvMzZ9/SjJSrupp8BYAncBuM67ceAFXjrs/qBLxWSu39z4Gfnis7hdH5O5ILrazqszNTRmKYt JLZHNMpsNITzdbyuHBVixsnb2ZK0/58BH8jFxwRZ3vJZOgPmyAzjlBmrgloHOEkG8FXY9fs+N ItKQ6k3ZxFwZHMqv/UNUhQf4PDXvMJUys7TPofMZWsJHLfZ8wQDlNWxbZ50ETa/a1rR9A64FD ovhDpea4Zg/zHK7lfs7tmZq5N08w09GzX3hTdwzVzJRpR6cLKfg0TC0qjvHmJmBVJUNbUyBDw tf9w9X238WTIRFiPw7bEvW+NrX/0mq5q3ibSxell4r2eaWqZhpo30TiYj5Ku77yAwVQQEyA1V cvllKK+lLzDqRp8ljRj39Pr394e1TiPwz8IAxs7uDcFNWFtcU/wjs67CfrNkAzYC5Qpm5QtVP lt1O5/t/gG3N9znj+79ec1VaQV79DIzRYbRDPEC87CvymomGruAij71reLYqbCXpWClJuqn4Z iTm2p0fLcGIA5GB5X96mszwqUuU46I/jrzqkBg== Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. 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. Arnd