From: kernel test robot <lkp@intel.com>
To: Balbir Singh <sblbir@amazon.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org,
x86@kernel.org, Thomas Gleixner <tglx@linutronix.de>
Subject: [tip:x86/pti 4/5] arch/x86/mm/tlb.c:319:6: warning: variable 'cpu' set but not used
Date: Sat, 16 Jan 2021 11:21:39 +0800 [thread overview]
Message-ID: <202101161129.TiX15hOi-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 2077 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86/pti
head: 767d46ab566dd489733666efe48732d523c8c332
commit: b6724f118d44606fddde391ba7527526b3cad211 [4/5] prctl: Hook L1D flushing in via prctl
config: i386-randconfig-r026-20210115 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
# https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/commit/?id=b6724f118d44606fddde391ba7527526b3cad211
git remote add tip https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git
git fetch --no-tags tip x86/pti
git checkout b6724f118d44606fddde391ba7527526b3cad211
# save the attached .config to linux build tree
make W=1 ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
arch/x86/mm/tlb.c: In function 'enable_l1d_flush_for_task':
>> arch/x86/mm/tlb.c:319:6: warning: variable 'cpu' set but not used [-Wunused-but-set-variable]
319 | int cpu, ret = 0, i;
| ^~~
vim +/cpu +319 arch/x86/mm/tlb.c
316
317 int enable_l1d_flush_for_task(struct task_struct *tsk)
318 {
> 319 int cpu, ret = 0, i;
320
321 /*
322 * Do not enable L1D_FLUSH_OUT if
323 * b. The CPU is not affected by the L1TF bug
324 * c. The CPU does not have L1D FLUSH feature support
325 * c. The task's affinity is on cores with SMT on.
326 */
327
328 if (!boot_cpu_has_bug(X86_BUG_L1TF) ||
329 !static_cpu_has(X86_FEATURE_FLUSH_L1D))
330 return -EINVAL;
331
332 cpu = get_cpu();
333
334 for_each_cpu(i, &tsk->cpus_mask) {
335 if (cpu_data(i).smt_active == true) {
336 put_cpu();
337 return -EINVAL;
338 }
339 }
340
341 set_ti_thread_flag(&tsk->thread_info, TIF_SPEC_L1D_FLUSH);
342 put_cpu();
343 return ret;
344 }
345
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 34874 bytes --]
next reply other threads:[~2021-01-16 3:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-16 3:21 kernel test robot [this message]
2021-01-20 10:37 ` [tip:x86/pti 4/5] arch/x86/mm/tlb.c:319:6: warning: variable 'cpu' set but not used Singh, Balbir
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=202101161129.TiX15hOi-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=sblbir@amazon.com \
--cc=tglx@linutronix.de \
--cc=x86@kernel.org \
/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