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 C600AC433EF for ; Mon, 11 Oct 2021 06:09:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 94F9460EE7 for ; Mon, 11 Oct 2021 06:09:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233943AbhJKGLD (ORCPT ); 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-Google-Smtp-Source: ABdhPJzokqOl1FjpKWa7hPmI46vA3MbqNwtIHx5QkXa4cBkJuMWag11qBpJwNxvearH05lPT0JSjYqMCvI8xjMjduAg= 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-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-arm-msm@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 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 1879DC433EF for ; Mon, 11 Oct 2021 06:09:09 +0000 (UTC) Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (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 AD74460F21 for ; Mon, 11 Oct 2021 06:09:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org AD74460F21 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arndb.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.linux-foundation.org Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 7CE38402BD; Mon, 11 Oct 2021 06:09:08 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id lNmUsXJFdkun; Mon, 11 Oct 2021 06:09:07 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by smtp4.osuosl.org (Postfix) with ESMTPS id 760674039B; Mon, 11 Oct 2021 06:09:07 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 5044BC000F; Mon, 11 Oct 2021 06:09:07 +0000 (UTC) Received: from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133]) by lists.linuxfoundation.org (Postfix) with ESMTP id C61E6C000D for ; Mon, 11 Oct 2021 06:09:06 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 9980240260 for ; Mon, 11 Oct 2021 06:09:06 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id P-LUkuFxqaqf for ; Mon, 11 Oct 2021 06:09:05 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0 Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.130]) by smtp2.osuosl.org (Postfix) with ESMTPS id 4901440124 for ; Mon, 11 Oct 2021 06:09:04 +0000 (UTC) Received: from mail-wr1-f48.google.com ([209.85.221.48]) by mrelayeu.kundenserver.de (mreue009 [213.165.67.97]) with ESMTPSA (Nemesis) id 1N5mOZ-1moD250NND-017Ee9 for ; Mon, 11 Oct 2021 08:09:02 +0200 Received: by mail-wr1-f48.google.com with SMTP id m22so52466632wrb.0 for ; Sun, 10 Oct 2021 23:09:01 -0700 (PDT) X-Gm-Message-State: AOAM532ddKzcs8MC7daBY9fZAj0F6jIHcj0EDPYqjQ1uIsVTQ/UbbKsv O07MNNu2YaRIAmC5BdXK5SQJ8Qx+qnAIKU/Q5/E= X-Google-Smtp-Source: ABdhPJzokqOl1FjpKWa7hPmI46vA3MbqNwtIHx5QkXa4cBkJuMWag11qBpJwNxvearH05lPT0JSjYqMCvI8xjMjduAg= 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 X-Provags-ID: V03:K1:fUwOIA55gbGXKFLp/RO+P1UCYggaIL+79zAfrEsajDvStofh31i yy0OKpDMoljJhjKJh0OQDktjUoAlp8esOaeQmv07OqsOyXbH9Bxpl2v7WpqNLwyAxuSANhd G8pRIllWMSMSV0sH5mPVLLYLPZLFnO9DFzqeegpYJtHtwQc1h2kFDZ3+5aIke0kJqrKRZ0e gB/2qWcTQocYENBGKMxvQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:IGl4LElLYx4=:Vwgb69WdXDIiuaSQ1G4Z9i M6wfe1Renh20h9TLziuotx9SPr2U5wtLQWiaQ0fZrgOj4Dyn1vF3LwrweeVUoynGLHHag7ZrU n3VdiodVNwSuXGSXPKzCXuOFp02u7R9nLwvDupxFIPVfGoY73O4q+BvW3mOr6Qb1mMmXKGNIz tyxwclcLToeRLypJILpV8XO6eCvOM88otmpea8kEaR924GKCpkwqmll3KQVVPX6ZP3cj9xpiD eRp560uGU+K7FS54akdkh6WtRRBqsdzsmo7Yj9NhcjrkoPfpemw/E9X3Thm2waWLMOac3yqUJ ctQ48Ao5p+RUYewfTl3Z7MlahI+GNVrzKDy1sdyP3Caz6KJMUWTOR9TNCp7+aFU/2C5lGPo1w lhTjCun9AKomuPVvbbFHr3rWOWle06aHQejfQnQISNG/uwqFT6V3CClY6qrnApDe43K+SzvlM nG9cqhPus57Kq9xDm1PB5S53C5gUnD6KucEeEIAU4MYo1B7Cx3TTzXwD9pIxwpf+iuJVKQwqh VQ8oTnPNiPEeijNnI3BSz6uiLof0m2WnDn1gD8+d/gW1PoyLiva7xBDmedEJGGuBr/9YX0IKi fo/Y4eFh8J2jl5yaUv17UhxZNIET4q+EsV0bVuy+k+O2b1SU7XR3XyTkW3X90orwAx4SW0b7x uO/yHb6+bCVrlD14V2zHEsKBdTNMUYxJdp2wkk0dBLMQvPLyxzt7ztNKzDSDC1x1a1JvT/J68 grQ3EPgv7ZGK7Uq93a9Dy/uXDsX5AqcHLUgt/lBuZe3IW4aZFCi/hr+mcseUY3vxpipqUGzOB whUA1iHaJMFPddv8lkFwRIBdpihfbWdXFmyICJuA0H+FP6D325cBoZqOQNR7lJJ8hXiVDP+Rg FbhAcL6PJ67wJ9ySVkHQ== Cc: Arnd Bergmann , Will Deacon , Daniel Lezcano , Linux Kernel Mailing List , "open list:IOMMU DRIVERS" , Andy Gross , Linux ARM , linux-arm-msm , Thierry Reding , Robin Murphy , Kalle Valo X-BeenThere: iommu@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Development issues for Linux IOMMU support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: iommu-bounces@lists.linux-foundation.org Sender: "iommu" 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 _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu 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 007EAC433F5 for ; Mon, 11 Oct 2021 06:11:50 +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 C262C60E98 for ; Mon, 11 Oct 2021 06:11:49 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org C262C60E98 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arndb.de 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=ssenfOVlECbblZxLjISHht0UWCkaN+fcwpS3V3sGoY4=; b=RufFsEmZmKhen+ pS1+vuI738qQU0va+Nkqv+e35GkrXJEI7tBiduZl3P2zy/1MNQiiJWcrfqSp1WWJZc5x00Oyrs/WC /MKp/xf4qKTnEcCs2Vnl/ksU5kW1QQ4io2jYDD89K93qfqjm96nwn1liSyCiZruLm3PEXDW5ahPSa pLyj5yLwPMMjoWftXgWoc45JPymHt2ttddduS02wqFW3JiI0GF1FFEeq5g6tgqqHzGwASkYbaNYgw MZXJKBZvl9/oun2GDVePS1aaYqjbdANDNEN18Dlgxw+eMYP8pJW7p3ml2pF8ldK7upaM696XE21Fj fzxwymOmb2O6fyz5uKbQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mZoUl-007tlj-Hr; Mon, 11 Oct 2021 06:09:07 +0000 Received: from mout.kundenserver.de ([217.72.192.75]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mZoUi-007tl5-0R for linux-arm-kernel@lists.infradead.org; Mon, 11 Oct 2021 06:09:05 +0000 Received: from mail-wr1-f43.google.com ([209.85.221.43]) by mrelayeu.kundenserver.de (mreue107 [213.165.67.113]) with ESMTPSA (Nemesis) id 1N4Q8u-1mizJD3ZlG-011QSY for ; Mon, 11 Oct 2021 08:09:01 +0200 Received: by mail-wr1-f43.google.com with SMTP id t2so52334953wrb.8 for ; Sun, 10 Oct 2021 23:09:01 -0700 (PDT) X-Gm-Message-State: AOAM530zJovjmijMVnF26glMBiPpbh5unRkotOfpMOKdWQMJEBq33/dU SGx68ISTbZ3bf6cjubzwSTUVi+sDHCBRl/5jzT8= X-Google-Smtp-Source: ABdhPJzokqOl1FjpKWa7hPmI46vA3MbqNwtIHx5QkXa4cBkJuMWag11qBpJwNxvearH05lPT0JSjYqMCvI8xjMjduAg= 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 X-Provags-ID: V03:K1:e6AYWiQ31p5FJOzk7PU1OQPtHS+y8sdnj61oUODtOpLwYMquJrX R2ybWu99bUBbAWPxag3FPLNF9Yhj7bOxlVuXf30DPLgt/Os5LQOoyZ/udcu5kQSWS3JyWcV Xhy/QtNjHaRJJnpuq0rVp+ADAy0QD4vpA+S5EhsmZQfxanJXrwrYsVgr5cKduzxweckn+EI Q+txgmw5qmoKSTJ8JtcpA== X-UI-Out-Filterresults: notjunk:1;V03:K0:DR7msHlOaDE=:JjetUkUikxkvcpdUfw4jbR gt1K54/C7X5n7rfBsY/0Vu62reicvnHxw0F5KFBvFojZwgic9iCXGx4b2goUpCYa0ya6uZYZi NGU8G3RFTauQp5SerL8KKrxOtkg4TwuY8lVRaqaAD+nitmoXRlAkoZUy1++hSya9GjfGHkdVc 0vZ3kN5RpjF5yxEfqTiPrjKNNld4hnuT60Q7GAcCuC+NDICparBrBOZn61UyoK4mtq6OdHJtG e2kJiigvAwAUbIDOc1FC/ea1+uF+jnQA2zkcn/xPTWBb16etW44aooRHwfMA2PlaVWyI1EZeY mAd7IwVbVzOWpVS4uf2Q3IeLDx/M4+e/63WrQnw5lfyXW5dPetKOVRZLI3vhlk9Vf30YRqStb 3zPEqVkFuZmh44H3AAjTL6NEAwC38/6WzKmyQ1caTDPJSlUsjF0TLdybsqEXayOLS8r7aMjve c1pzF3Y2fY61u2N0x5Hqwey2GsuiKm+MgXhAEaVN5RkmU11DJkWEIq3mKWgHwClLfI4/QRSav 28jtB9KJl7xB3Y+wtPgAxNLJOfbRYzSAmh5mB1cfi//fUFzAtAN0J5iXjW2s2bHWlqFF4Ml8c HKrTVfGpev0YHIyyfkhssKdjdeMFogfR2PbP+K4bu6GOBfW5NIt0sCvZAoAXEyArjwL83K1fV wEO8A8qx7q7FBgZvzauRlt95ZoXwSdhXz0Q/tpzqUsp5wKA4k983l+EwB7eLCFajwsrEVMqOS NbUWTXFqDYq3sf2l59pKeD+lo832SWIQXF+hrLPWbCiDWnT3pJJe4qaHj/dpBuC8aqqaH5TyB 3vOVQbgoDigLEwCbmPHvFBpM5+dKMLkZS9ClrywVmb3JhfEwcDdnXcsMPiTNVWT1VcZ6i9oy4 MwvLiKXDlIsTqfzg9vog== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211010_230904_364678_D6E463BB X-CRM114-Status: GOOD ( 14.49 ) 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, 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 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel