Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp2276884ybt; Fri, 3 Jul 2020 05:24:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxmVWFLxHygNIAHwJSEvUWi5O7Ksijx0kgIaI2uhjqzlsm4sSEWdttUurP304ArrGaEFvmB X-Received: by 2002:a17:906:5fc4:: with SMTP id k4mr31750537ejv.94.1593779063622; Fri, 03 Jul 2020 05:24:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593779063; cv=none; d=google.com; s=arc-20160816; b=QX178rW+bf8JQw1iwJkzHOZwTLsZBBrozWO8U7I+PB/lJfDAR/u3ojhPOXQL1ZGW1s nlypUQUUXkmu7sYs/RKGqlhV8xKktcESAYrr/Ww+3+POsZVEE/GEhp51yWeUWMxlhwJR s6FeNSI/OeAbWHnGUJ374lwPPjtHzSsMBDk15tYnMBQFuA0RHu0QobtHzhceJ8amkTiD dAUlNnQh5QU89enhJXz3yvlqIv7/vk5kU5iNuYB7OcKE6uUqhPlA/vTc2N3hmlhteXfs GnBXq5jAbhLdi1rqYtEtVUuZPYxjpolWoS8CpnbNUnHTXW2KpTIaYBSRfz+2I044Ko5j xaxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=oJDHa1rqbS58Z3Oeab7Kuq7UfRG7wO5op02cz26abnw=; b=XbOxQW4GGh2UjgVG22YWBTBiRzc5pSnJ2JlKY37mtOyD5Q6c8ScGH0arYSHzlCXuvz zTWsgAp9+QYI3U7zTejJfJCWFLKNzALD+SXnvJSKsVmRXGZqVpb5VGiCTX6BQRailj4p qs0jUR8myFRWJTugukKgWakJ/Ze7mtvzuTcRjz365qHUIjIAbQtKDZZaleKegp6uzR/W EfvGZ7r0TQjVvGdHcJ22uas9H19cSR0rMLRRYheS7ZsYDGAZwh5EjYsnaP1tV1DDqNwQ reJ6SPYsdWAg46tV3NnW1fqKNVPWTWSXufse3e0AgZEWTD74Vx2bEAjIdrpSZpFacTJs Klvw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=WHs4GUDV; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n7si6592390edo.512.2020.07.03.05.23.59; Fri, 03 Jul 2020 05:24:23 -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; dkim=pass header.i=@kernel.org header.s=default header.b=WHs4GUDV; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726108AbgGCMXu (ORCPT + 99 others); Fri, 3 Jul 2020 08:23:50 -0400 Received: from mail.kernel.org ([198.145.29.99]:34470 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725984AbgGCMXu (ORCPT ); Fri, 3 Jul 2020 08:23:50 -0400 Received: from willie-the-truck (236.31.169.217.in-addr.arpa [217.169.31.236]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 3873A20826; Fri, 3 Jul 2020 12:23:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1593779029; bh=vd4djFKYd31yL3oupRmWE2lyv4ORZWuNlPzVgna7t2M=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=WHs4GUDV2uRZU81RtdyMa3DLQpqpW5ngrnYAQ1k44tF5fi8qTpHzmkCTSxkOaQfsU ntwU/A6Q0tZmFwA2MHJT/daqj1pZj6k2/Gzr7OZ4f0ZTXz1sxwbv7GuoFKbK7+n9lU 9INFciuKTMlV0H2WvUhE6AI4h2hCgkVbDcetQZXk= Date: Fri, 3 Jul 2020 13:23:44 +0100 From: Will Deacon To: John Stultz Cc: Marc Zyngier , lkml , Andy Gross , Bjorn Andersson , Joerg Roedel , Thomas Gleixner , Jason Cooper , Linus Walleij , Lina Iyer , Saravana Kannan , Todd Kjos , Greg Kroah-Hartman , linux-arm-msm , iommu@lists.linux-foundation.org, linux-gpio@vger.kernel.org Subject: Re: [RFC][PATCH 5/5] firmware: QCOM_SCM: Allow qcom_scm driver to be loadable as a permenent module Message-ID: <20200703122343.GB18652@willie-the-truck> References: <20200616061338.109499-1-john.stultz@linaro.org> <20200616061338.109499-6-john.stultz@linaro.org> <0be86735238a0f8b0c25934e2ed39eee@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 16, 2020 at 01:52:32PM -0700, John Stultz wrote: > On Tue, Jun 16, 2020 at 12:55 AM Marc Zyngier wrote: > > On 2020-06-16 07:13, John Stultz wrote: > > > diff --git a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig > > > index b510f67dfa49..714893535dd2 100644 > > > --- a/drivers/iommu/Kconfig > > > +++ b/drivers/iommu/Kconfig > > > @@ -381,6 +381,7 @@ config SPAPR_TCE_IOMMU > > > config ARM_SMMU > > > tristate "ARM Ltd. System MMU (SMMU) Support" > > > depends on (ARM64 || ARM || (COMPILE_TEST && !GENERIC_ATOMIC64)) && > > > MMU > > > + depends on QCOM_SCM || !QCOM_SCM #if QCOM_SCM=m this can't be =y > > > > This looks a bit ugly. Could you explain why we need this at the SMMU > > level? I'd have expected the dependency to flow the other way around... > > Yea, so the arm-smmu-qcom.c file calls directly into the qcom-scm code > via qcom_scm_qsmmu500_wait_safe_toggle() > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/iommu/arm-smmu-qcom.c?h=v5.8-rc1#n44 > > So if ARM_SMMU=y and QCOM_SCM=m we get: > drivers/iommu/arm-smmu-qcom.o: In function `qcom_smmu500_reset': > arm-smmu-qcom.c:(.text+0xb4): undefined reference to > `qcom_scm_qsmmu500_wait_safe_toggle' > > Do you have a suggestion for an alternative approach? Can you use symbol_get() or something like that? How are module dependencies handled by other drivers? Will