Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp2739270ybt; Tue, 16 Jun 2020 13:55:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz2fYOtJ06YVdCxZhTsPipaMK+zc4i7tul1VRWX10i3BQzeT5/wS/SI3bS+zLijqSF4VChQ X-Received: by 2002:a50:e08c:: with SMTP id f12mr4293505edl.233.1592340917941; Tue, 16 Jun 2020 13:55:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592340917; cv=none; d=google.com; s=arc-20160816; b=rU+/bHM69RxgDIDKrVfo+Oph96GpT4L5O2jWz3mc4JDkgyrf7mZIS18npCl/fvCI9d GvahL/RbdmqubdG2Rc42ZS5o9WKXr91iaXF/5NRwdd2xUijbG1IMJ25MxjmZUj8K0Rtm pZFE27GKaronA0/vKLosYreg5sRa6c+hD8nXt5ygHJXCIRPXtfua90z1QADZCkyHNLmj Hoqi2zGbEraLtFMEx7MWK7RWGEvJ0PfzTs9QaugzIgPIedbmKr45Xuvc/iyjOjcwXC7S u7wq3d1/+1ZVFJ7CqxPRZs/5S/RAT7aMhJGH3kxWqf0py/qvCHkyw929S1Mathl3NPjg +/NQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=1mDaBoAYNlImmGKdCyzs30Ab2CK6GaNdKX0Jt8lvk4Q=; b=U2BbIeLF9OG1OHX6xyXvs7mgPqHH3yxXaa/yQbtH1FoncD2YimtVD/6WEw3tfOnV1Q dy2rMMOEZPscCfOICCk5wqsvQPZHgltjyF5QHwEBgb+uEvU+mu42c8g2PTHXa2LnyrlU kHanYEkujJhzSORozoFX1LXOBks4LbdTGdtYqzViHeXSJNfvJJXby9E5f/aDsOHvXgmL scQOqLKBQNQ5KJ9+vaIsFLDy/7mLzd4pNU907BtzQorgesAenm7mN/iaeRtPetAFwIDW kb6WG8T4gm3yb5WK6OZf66boEPJYdvVFnhPFtcvbM0XrZHFaldMaUnxW8qfEC6+2Smdm 577A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NlfyTdXc; 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=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id la9si10814824ejb.581.2020.06.16.13.54.55; Tue, 16 Jun 2020 13:55:17 -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=@linaro.org header.s=google header.b=NlfyTdXc; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728317AbgFPUwu (ORCPT + 99 others); Tue, 16 Jun 2020 16:52:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37536 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726804AbgFPUwq (ORCPT ); Tue, 16 Jun 2020 16:52:46 -0400 Received: from mail-ot1-x341.google.com (mail-ot1-x341.google.com [IPv6:2607:f8b0:4864:20::341]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E692AC06174E for ; Tue, 16 Jun 2020 13:52:45 -0700 (PDT) Received: by mail-ot1-x341.google.com with SMTP id n5so6441716otj.1 for ; Tue, 16 Jun 2020 13:52:45 -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=1mDaBoAYNlImmGKdCyzs30Ab2CK6GaNdKX0Jt8lvk4Q=; b=NlfyTdXcuRk+bHqUw+iSQlY+Yp1tZiUjSeOcpP040ruHIUtzEyafQn2O0GlSn7gYeL 7zHVQjG9C9jWGTbTF3esb4X57Pwk4YUnUyCBcQkM53dx293ZwGNIXK+ItM/IYIuYFfwi Tgh+QD873HT3EHOdSG6ryAhurDSG7jATKMwanI5nOGb4ckZpJDg+8gUZ5AtbgIsACytK za71wGu8CC+u6oCoxiGLOUpgt5E91RAOhdv90F6y9lE1VYMGnZ34mU6D9A5ODCBpMhl/ +wSeCnpZeuB4NhP2YYyHpXgVNoZi6FdoAdKqdqF8ZOxCxXiNu5ob8xDBytu9hCeMnQ9o qU+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=1mDaBoAYNlImmGKdCyzs30Ab2CK6GaNdKX0Jt8lvk4Q=; b=EyDVZ5hUY6XNVQAJsrqc6mtvk8nFLUQKk9lCiABFQ//Pb+Vl3TdaiHeiWptO77SXsH FPwTaMDZCly+AMJGJNABd+CgzfKd0knYTMLJpVs8OUYVcZk6wO4+XFeN7mzc/Oy00KI5 iIvVDt3gV4g4Tw0n8eOft1UDcjBFDpLn4R66cS0wmTD5WTiCsujHlC7BHGmOYXtPyPDA MOruPu+ulnQiuNRWWtVSRf7ufaJ9s1y4CMj599ihosh6Ci42+SDqrrBRMsqmMJRoIuw0 nCCtFJZ5yXrbGN2XK3UmxeZV2U3oMEGgmjxLk/AQnXmNaps1KCkp3b6sRZiQZaYIsrnT Hzrg== X-Gm-Message-State: AOAM532dB6Aw7OKpWUzPwM/E8nQ1f9jX2XjFypML+iBzlhUNMOu7eDwk eo1O2LCl0IgGMjl/ezH1h/gYdC5J+C1UOEeV/ppVgWfKjJo= X-Received: by 2002:a9d:1296:: with SMTP id g22mr4304025otg.102.1592340765193; Tue, 16 Jun 2020 13:52:45 -0700 (PDT) MIME-Version: 1.0 References: <20200616061338.109499-1-john.stultz@linaro.org> <20200616061338.109499-6-john.stultz@linaro.org> <0be86735238a0f8b0c25934e2ed39eee@kernel.org> In-Reply-To: <0be86735238a0f8b0c25934e2ed39eee@kernel.org> From: John Stultz Date: Tue, 16 Jun 2020 13:52:32 -0700 Message-ID: Subject: Re: [RFC][PATCH 5/5] firmware: QCOM_SCM: Allow qcom_scm driver to be loadable as a permenent module To: Marc Zyngier Cc: 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, Will Deacon Content-Type: text/plain; charset="UTF-8" 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 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? thanks -john