Linux Tegra architecture development
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Ashish Mhetre <amhetre@nvidia.com>,
	krzysztof.kozlowski@linaro.org, thierry.reding@gmail.com,
	jonathanh@nvidia.com, dmitry.osipenko@collabora.com
Cc: oe-kbuild-all@lists.linux.dev, linux-tegra@vger.kernel.org,
	linux-kernel@vger.kernel.org, Ashish Mhetre <amhetre@nvidia.com>
Subject: Re: [PATCH 1/2] memory: tegra: Add SID override programming for MC clients
Date: Tue, 7 Nov 2023 17:16:14 +0800	[thread overview]
Message-ID: <202311071607.IzbwSn2f-lkp@intel.com> (raw)
In-Reply-To: <20231107052824.29418-1-amhetre@nvidia.com>

Hi Ashish,

kernel test robot noticed the following build warnings:

[auto build test WARNING on tegra/for-next]
[also build test WARNING on linus/master v6.6 next-20231107]
[cannot apply to tegra-drm/drm/tegra/for-next]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    https://github.com/intel-lab-lkp/linux/commits/Ashish-Mhetre/memory-tegra-Skip-SID-programming-if-SID-registers-aren-t-set/20231107-133149
base:   https://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux.git for-next
patch link:    https://lore.kernel.org/r/20231107052824.29418-1-amhetre%40nvidia.com
patch subject: [PATCH 1/2] memory: tegra: Add SID override programming for MC clients
config: arm64-defconfig (https://download.01.org/0day-ci/archive/20231107/202311071607.IzbwSn2f-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231107/202311071607.IzbwSn2f-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202311071607.IzbwSn2f-lkp@intel.com/

All warnings (new ones prefixed by >>):

   drivers/memory/tegra/tegra186.c: In function 'tegra186_mc_resume':
   drivers/memory/tegra/tegra186.c:78:17: error: implicit declaration of function 'tegra186_mc_client_sid_override' [-Werror=implicit-function-declaration]
      78 |                 tegra186_mc_client_sid_override(mc, client, client->sid);
         |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/memory/tegra/tegra186.c: At top level:
>> drivers/memory/tegra/tegra186.c:85:13: warning: conflicting types for 'tegra186_mc_client_sid_override'; have 'void(struct tegra_mc *, const struct tegra_mc_client *, unsigned int)'
      85 | static void tegra186_mc_client_sid_override(struct tegra_mc *mc,
         |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/memory/tegra/tegra186.c:85:13: error: static declaration of 'tegra186_mc_client_sid_override' follows non-static declaration
   drivers/memory/tegra/tegra186.c:78:17: note: previous implicit declaration of 'tegra186_mc_client_sid_override' with type 'void(struct tegra_mc *, const struct tegra_mc_client *, unsigned int)'
      78 |                 tegra186_mc_client_sid_override(mc, client, client->sid);
         |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors


vim +85 drivers/memory/tegra/tegra186.c

7355c7b9ae0d45 Thierry Reding 2021-06-02   70  
142620fbbbbba0 Ashish Mhetre  2023-11-07   71  static int tegra186_mc_resume(struct tegra_mc *mc)
142620fbbbbba0 Ashish Mhetre  2023-11-07   72  {
142620fbbbbba0 Ashish Mhetre  2023-11-07   73  	unsigned int i;
142620fbbbbba0 Ashish Mhetre  2023-11-07   74  
142620fbbbbba0 Ashish Mhetre  2023-11-07   75  	for (i = 0; i < mc->soc->num_clients; i++) {
142620fbbbbba0 Ashish Mhetre  2023-11-07   76  		const struct tegra_mc_client *client = &mc->soc->clients[i];
142620fbbbbba0 Ashish Mhetre  2023-11-07   77  
142620fbbbbba0 Ashish Mhetre  2023-11-07  @78  		tegra186_mc_client_sid_override(mc, client, client->sid);
142620fbbbbba0 Ashish Mhetre  2023-11-07   79  	}
142620fbbbbba0 Ashish Mhetre  2023-11-07   80  
142620fbbbbba0 Ashish Mhetre  2023-11-07   81  	return 0;
142620fbbbbba0 Ashish Mhetre  2023-11-07   82  }
142620fbbbbba0 Ashish Mhetre  2023-11-07   83  
eaf89f1cd38cf7 Arnd Bergmann  2021-07-22   84  #if IS_ENABLED(CONFIG_IOMMU_API)
393d66fd2cacba Thierry Reding 2021-06-03  @85  static void tegra186_mc_client_sid_override(struct tegra_mc *mc,
393d66fd2cacba Thierry Reding 2021-06-03   86  					    const struct tegra_mc_client *client,
393d66fd2cacba Thierry Reding 2021-06-03   87  					    unsigned int sid)
393d66fd2cacba Thierry Reding 2021-06-03   88  {
393d66fd2cacba Thierry Reding 2021-06-03   89  	u32 value, old;
393d66fd2cacba Thierry Reding 2021-06-03   90  
393d66fd2cacba Thierry Reding 2021-06-03   91  	value = readl(mc->regs + client->regs.sid.security);
393d66fd2cacba Thierry Reding 2021-06-03   92  	if ((value & MC_SID_STREAMID_SECURITY_OVERRIDE) == 0) {
393d66fd2cacba Thierry Reding 2021-06-03   93  		/*
393d66fd2cacba Thierry Reding 2021-06-03   94  		 * If the secure firmware has locked this down the override
393d66fd2cacba Thierry Reding 2021-06-03   95  		 * for this memory client, there's nothing we can do here.
393d66fd2cacba Thierry Reding 2021-06-03   96  		 */
393d66fd2cacba Thierry Reding 2021-06-03   97  		if (value & MC_SID_STREAMID_SECURITY_WRITE_ACCESS_DISABLED)
393d66fd2cacba Thierry Reding 2021-06-03   98  			return;
393d66fd2cacba Thierry Reding 2021-06-03   99  
393d66fd2cacba Thierry Reding 2021-06-03  100  		/*
393d66fd2cacba Thierry Reding 2021-06-03  101  		 * Otherwise, try to set the override itself. Typically the
393d66fd2cacba Thierry Reding 2021-06-03  102  		 * secure firmware will never have set this configuration.
393d66fd2cacba Thierry Reding 2021-06-03  103  		 * Instead, it will either have disabled write access to
393d66fd2cacba Thierry Reding 2021-06-03  104  		 * this field, or it will already have set an explicit
393d66fd2cacba Thierry Reding 2021-06-03  105  		 * override itself.
393d66fd2cacba Thierry Reding 2021-06-03  106  		 */
393d66fd2cacba Thierry Reding 2021-06-03  107  		WARN_ON((value & MC_SID_STREAMID_SECURITY_OVERRIDE) == 0);
393d66fd2cacba Thierry Reding 2021-06-03  108  
393d66fd2cacba Thierry Reding 2021-06-03  109  		value |= MC_SID_STREAMID_SECURITY_OVERRIDE;
393d66fd2cacba Thierry Reding 2021-06-03  110  		writel(value, mc->regs + client->regs.sid.security);
393d66fd2cacba Thierry Reding 2021-06-03  111  	}
393d66fd2cacba Thierry Reding 2021-06-03  112  
393d66fd2cacba Thierry Reding 2021-06-03  113  	value = readl(mc->regs + client->regs.sid.override);
393d66fd2cacba Thierry Reding 2021-06-03  114  	old = value & MC_SID_STREAMID_OVERRIDE_MASK;
393d66fd2cacba Thierry Reding 2021-06-03  115  
393d66fd2cacba Thierry Reding 2021-06-03  116  	if (old != sid) {
393d66fd2cacba Thierry Reding 2021-06-03  117  		dev_dbg(mc->dev, "overriding SID %x for %s with %x\n", old,
393d66fd2cacba Thierry Reding 2021-06-03  118  			client->name, sid);
393d66fd2cacba Thierry Reding 2021-06-03  119  		writel(sid, mc->regs + client->regs.sid.override);
393d66fd2cacba Thierry Reding 2021-06-03  120  	}
393d66fd2cacba Thierry Reding 2021-06-03  121  }
eaf89f1cd38cf7 Arnd Bergmann  2021-07-22  122  #endif
393d66fd2cacba Thierry Reding 2021-06-03  123  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

  parent reply	other threads:[~2023-11-07  9:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-07  5:28 [PATCH 1/2] memory: tegra: Add SID override programming for MC clients Ashish Mhetre
2023-11-07  5:28 ` [PATCH 2/2] memory: tegra: Skip SID programming if SID registers aren't set Ashish Mhetre
2023-11-07  9:16 ` kernel test robot [this message]
2023-11-07 11:40   ` [PATCH 1/2] memory: tegra: Add SID override programming for MC clients Ashish Mhetre
2023-11-07 11:42     ` Krzysztof Kozlowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202311071607.IzbwSn2f-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=amhetre@nvidia.com \
    --cc=dmitry.osipenko@collabora.com \
    --cc=jonathanh@nvidia.com \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=thierry.reding@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox