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 X-Spam-Level: X-Spam-Status: No, score=-3.5 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 05CF7C433E1 for ; Fri, 10 Jul 2020 03:29:02 +0000 (UTC) Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (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 BFA6B2065C for ; Fri, 10 Jul 2020 03:29:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="Y/MA9imF" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BFA6B2065C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=iommu-bounces@lists.linux-foundation.org Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 855382077C; Fri, 10 Jul 2020 03:29:01 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id IBWv5E8Y02Bi; Fri, 10 Jul 2020 03:29:00 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by silver.osuosl.org (Postfix) with ESMTP id 51E09204C7; Fri, 10 Jul 2020 03:29:00 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 402A5C077B; Fri, 10 Jul 2020 03:29:00 +0000 (UTC) Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by lists.linuxfoundation.org (Postfix) with ESMTP id 12D9FC016F for ; Fri, 10 Jul 2020 03:28:59 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id EF6A3897D9 for ; Fri, 10 Jul 2020 03:28:58 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id sFRHf-IziWyg for ; Fri, 10 Jul 2020 03:28:57 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-oi1-f196.google.com (mail-oi1-f196.google.com [209.85.167.196]) by hemlock.osuosl.org (Postfix) with ESMTPS id A621A8938A for ; Fri, 10 Jul 2020 03:28:57 +0000 (UTC) Received: by mail-oi1-f196.google.com with SMTP id k4so3703617oik.2 for ; Thu, 09 Jul 2020 20:28:57 -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=PKws9rr7OljHAXLs0SNBqV8l/zDxM95hYUjoVUcsLMw=; b=Y/MA9imFJwm2h1+DgPUYOn0x1e5bQqgU07Gi2iGRG/lwfvQkyoG/FtwR5qsp3do0Y3 yCR5Hps1LDqH/0O708Hck+CXWJXUW/Pm/dgq7jjaEfghm7v5/mSEHmBFS3fX0QNPYolf ubTdX550xKgLib4fyaBylbbUUSzyb38aG7zeVQdB5pSqjHMt+rsLG5JV2DsxNMdt1pvt KRMZPYM+vQpClcwdCxiSCTuFyS0F8maJbP2n3RriwfznlTAeWSdn7geAldubl/lrUFC4 me4dbcPDXLovepdNDGbrDCJ6PBJlAkPvR4QYNjXe2765EUymJkyyqOT78m+cxQYEziei SOYA== 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=PKws9rr7OljHAXLs0SNBqV8l/zDxM95hYUjoVUcsLMw=; b=ib6qtkZbX1hh3So1j3ljmgVjPA6cLUOSgj0rNIrbilxin/e6QLfCMMG//+Fc9w/dHa 94uvVxh4/vsX+fy6zcOQfsJXqHU/IN0F5UNMWLYZTIWCBAnNR0xLzCXSk6LYOuIaJCcq r7O+PdZQ80gKX8Qm6U5ce6wSz1+Kr391RBxby5lDF7iHqIYk6SMsIFJYwF2OL3oOtW9N jBbB/d2wyDJM6ps6zvBl3kIZ3y7CYB6FeRcg9JiZ4TxvrqqMZMYRlQzY7PiPVji+GsWW 0T2w0UoEF6lQFiAI7Y4ivFwcbrG5C+LfE9jLdbh1cMYRe7hYM8SjDixOx1vd34tebiQp SsYw== X-Gm-Message-State: AOAM533Z3YA/hrWjzNbnwpV8NpLcSQyMmMg/iSa5aJVQzYx0Dc6E1YUd 3s0AaWHSZmMBbF9onklT43rQiWPmL6zMp11TIVMk6A== X-Google-Smtp-Source: ABdhPJwBCYPfCvq2KTarh+AoVyZD+95RmFXiFFqX0zZedcK0ojnQcCI1atRrtNfjUyY3XSL9F1IRdjivxmmz1/tlsLo= X-Received: by 2002:aca:b5c3:: with SMTP id e186mr2796817oif.10.1594351736777; Thu, 09 Jul 2020 20:28:56 -0700 (PDT) MIME-Version: 1.0 References: <20200625001039.56174-1-john.stultz@linaro.org> <20200625001039.56174-6-john.stultz@linaro.org> <20200702141825.GA16941@willie-the-truck> In-Reply-To: <20200702141825.GA16941@willie-the-truck> From: John Stultz Date: Thu, 9 Jul 2020 20:28:45 -0700 Message-ID: Subject: Re: [PATCH v2 5/5] firmware: QCOM_SCM: Allow qcom_scm driver to be loadable as a permenent module To: Will Deacon Cc: Maulik Shah , Jason Cooper , Saravana Kannan , Marc Zyngier , lkml , Lina Iyer , linux-gpio@vger.kernel.org, iommu@lists.linux-foundation.org, Andy Gross , Greg Kroah-Hartman , Thomas Gleixner , Linus Walleij , linux-arm-msm , Todd Kjos 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 Thu, Jul 2, 2020 at 7:18 AM Will Deacon wrote: > On Thu, Jun 25, 2020 at 12:10:39AM +0000, 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 > > select IOMMU_API > > select IOMMU_IO_PGTABLE_LPAE > > select ARM_DMA_USE_IOMMU if ARM > > This looks like a giant hack. Is there another way to handle this? Sorry for the slow response here. So, I agree the syntax looks strange (requiring a comment obviously isn't a good sign), but it's a fairly common way to ensure drivers don't get built in if they optionally depend on another driver that can be built as a module. See "RFKILL || !RFKILL", "EXTCON || !EXTCON", or "USB_GADGET || !USB_GADGET" in various Kconfig files. I'm open to using a different method, and in a different thread you suggested using something like symbol_get(). I need to look into it more, but that approach looks even more messy and prone to runtime failures. Blocking the unwanted case at build time seems a bit cleaner to me, even if the syntax is odd. thanks -john _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu