Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp909895rwi; Thu, 13 Oct 2022 06:51:47 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4Bn0SUdUV+EXTB+L+nv4fyy+Cxl0JScylSrynVVFjSATVO8Dc/0U6z0BDqrJHURY6FirMf X-Received: by 2002:a05:6402:278a:b0:45c:a74b:b425 with SMTP id b10-20020a056402278a00b0045ca74bb425mr8147780ede.17.1665669107157; Thu, 13 Oct 2022 06:51:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665669107; cv=none; d=google.com; s=arc-20160816; b=fC8+dTdo78kF2j8nRWqhHGxSpWwAm4dyQf5J+rsZwRQipQquPbKN8yCWJlxsitMPTF sabK8LDeRIt+1wzEBfPe0Sr/WDahA2RUwyCd0GusvDXJtidjxb7oH68l43T5VRKlLymE DAol9X8Qn0m6W506vnalDKkncJWgtdrJYC3WP/tds+qFcV0k7/Jq4wbLueZ29Ym0Od17 4/0pqgJZRO6nX/xFKuTxYwuK7AwpMRK7uhS3ioq9+Y1XJyL+1eVMLZPxiyj2PixRmAF3 351S+WQnRWlyX+9wtUryWGe7NuKN6uBiaEeX+S/pMzceA5/ItTl85eJRTgJHJfQy4wlz 9w2w== 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:dkim-signature; bh=O81+P58FUqUzFvyhgNRSmI+OPkunmpM/swl0Z9C3YBg=; b=DsUT49MQWv53BrcphZZWneP4sTxfMQgswvQh9cf5kCEobiM1Qlok/Zc6CK4Eyp+1vP fS2ULpGs92CkAxaJi6hWC16dveImOYgWD4CSakLua90nAPEF2Dmh31mTli6JGDYKDVLj fC5LFsS7OyDgYCF5/Y/Ck3gUIvTrEIyv1H79QrIvBdR8HHOnbgQy3XIxxqoFK5qMJufH yLRKq9nUBvHd8D4bTbhcg6TMgX7m/Ao2CBS2jWClwI7NdwhG6SdTZ8UbITY536jcdpSD C/kUQfy+ywJGQ0FqU/rd4zrwnadsKKezySkp2SCUEo95EreshqB5CVBHjk3+rNxOm5ZQ MY3A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ioli8x3y; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id xg11-20020a170907320b00b00782ee6b819bsi19547859ejb.909.2022.10.13.06.51.21; Thu, 13 Oct 2022 06:51:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ioli8x3y; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S229991AbiJMNoE (ORCPT + 99 others); Thu, 13 Oct 2022 09:44:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41282 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229989AbiJMNoC (ORCPT ); Thu, 13 Oct 2022 09:44:02 -0400 Received: from mail-pl1-x634.google.com (mail-pl1-x634.google.com [IPv6:2607:f8b0:4864:20::634]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 58323108DFE for ; Thu, 13 Oct 2022 06:43:56 -0700 (PDT) Received: by mail-pl1-x634.google.com with SMTP id l4so1835997plb.8 for ; Thu, 13 Oct 2022 06:43:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=O81+P58FUqUzFvyhgNRSmI+OPkunmpM/swl0Z9C3YBg=; b=ioli8x3yHwDJN+q9To8poYslymiA7VxYi3Vcv85dQquOoUzOU/2j0K+Kf2Xm4ZZtNR 8D6d8etpktGLMcSegOxQ44t05jwy4RhL4K99PLeSJpPLfdkHrIf9LD6351WljHQnGt0C MFhidHsfCw0XJue8oOiAO1lu1DLfkCyKZP1fY/yVSJGCOH6lHoTbZ0REtbExaDkOXotk 8cGVtPC/Ezmyv76OCZUKrUSk9u6URw5Souuv0wjyM8Sfbqiz0YANIlD7tFRizm4pbCdL 2Fzb70j48sC4xtdTi8rOIuniTFGudO7T6CZkoZsht9vosfI1Wfxuxm42VrBHx7SKQlEa 5gtw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=O81+P58FUqUzFvyhgNRSmI+OPkunmpM/swl0Z9C3YBg=; b=rp+LNMkPg9PKeyUtV9tP+8GbRrnkhS6mgh7YNVbG+JpIX+d9JRNHh8i1tw03bI+2a6 fcc3jNwa7YVFapZyswVXlzt3NdoR/7PH0Tra3h4m1DqAp/ZWZ8Bsq4fyqWtRko5aMnpE M3lOh70tkmiHA2Q3/eODm0/pRrY23YBfL5uxXwUM7yZew3bbcZSgZWoReFg51qrQhM5N 2+ntfJUNOiPuS30vBVfgfLysujcrwVC44uHS1tHCQbMPib31gSVq6fv/jk2/O5Ou3Eel MV9pjdxQk8OfUxwjH6afdf2sIzfxS3bU7XKaan60HJxCBKH7dX1kRQTNXg7nnGTHooWy bcMg== X-Gm-Message-State: ACrzQf3E2cDF+pMYo2HURu8fsiwu+h6NcjUBwZfOb/w7HeJwwAakffOb MRoBtcWTHZZIQdrEtcE7KNhBkq6lWgITjbgeOUUnEQ== X-Received: by 2002:a17:90a:7b8c:b0:20b:1f3b:f6fd with SMTP id z12-20020a17090a7b8c00b0020b1f3bf6fdmr11160768pjc.202.1665668635466; Thu, 13 Oct 2022 06:43:55 -0700 (PDT) MIME-Version: 1.0 References: <20221006130622.22900-1-pshete@nvidia.com> <20221006130622.22900-2-pshete@nvidia.com> In-Reply-To: From: Ulf Hansson Date: Thu, 13 Oct 2022 15:43:18 +0200 Message-ID: Subject: Re: [PATCH v7 2/4] mmc: sdhci-tegra: Add support to program MC stream ID To: Prathamesh Shete Cc: "adrian.hunter@intel.com" , "thierry.reding@gmail.com" , Jonathan Hunter , "p.zabel@pengutronix.de" , "linux-mmc@vger.kernel.org" , "linux-tegra@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Aniruddha Tvs Rao , Suresh Mangipudi , Krishna Yarlagadda Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 13 Oct 2022 at 08:33, Prathamesh Shete wrote: > > Hi Ulf, > > >> In that case, perhaps we can add a "depends on IOMMU_API" in the Kconfig > >> instead? Or is the tegra driver used on platforms where IOMMU_API could be > >> unset? > Yes it can/will work with IOMMU disabled so its not recommended to add a "depends on" condition in Kconfig. Alright, in that case it looks to me that there are two other options to move forward. 1) Add proper definitions of the struct iommu_fwspec in include/linux/iommu.h even when CONFIG_IOMMU_API is unset. In a way it seems a bit silly to me, to have the iommu stubs around, unless those can be used for cases like this, right!? 2) Move the code within the "ifdef CONFIG_IOMMU_API" sections into separate functions - and add stubs for these functions too. In this way the functions can be called, independently of whether CONFIG_IOMMU_API is set/unse, which would make the code in drivers/mmc/host/sdhci-tegra.c cleaner and thus easier to maintain. > > Thanks > Prathamesh > > > -----Original Message----- > > From: Ulf Hansson > > Sent: Tuesday, October 11, 2022 6:04 PM > > To: Prathamesh Shete > > Cc: adrian.hunter@intel.com; thierry.reding@gmail.com; Jonathan Hunter > > ; p.zabel@pengutronix.de; linux- > > mmc@vger.kernel.org; linux-tegra@vger.kernel.org; linux- > > kernel@vger.kernel.org; Aniruddha Tvs Rao ; Suresh > > Mangipudi ; Krishna Yarlagadda > > > > Subject: Re: [PATCH v7 2/4] mmc: sdhci-tegra: Add support to program MC > > stream ID > > > > External email: Use caution opening links or attachments > > > > > > On Tue, 11 Oct 2022 at 13:44, Prathamesh Shete wrote: > > > > > > Hi Ulf > > > > > > The initial patches were without the #ifdef. #ifdef is being added as per review > > comments and kernel robot errors. > > > Following error was detected by kernel robot > > > >> > > > All errors (new ones prefixed by >>): > > > > > > drivers/mmc/host/sdhci-tegra.c: In function 'sdhci_tegra_probe': > > > >> drivers/mmc/host/sdhci-tegra.c:1794:54: error: 'struct iommu_fwspec' has > > no member named 'ids' > > > 1794 | tegra_host->streamid = fwspec->ids[0] & 0xffff; > > > | ^~ > > > > > > > > > vim +1794 drivers/mmc/host/sdhci-tegra.c > > > >> > > > Adrian also pointed out this issue so to address these issues #ifdef > > > was added > > > > I see! > > > > In that case, perhaps we can add a "depends on IOMMU_API" in the Kconfig > > instead? Or is the tegra driver used on platforms where IOMMU_API could be > > unset? > > > > [...] Kind regards Uffe