public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: David Wang <davidwang@zhaoxin.com>
Cc: oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
	Thomas Gleixner <tglx@linutronix.de>
Subject: arch/x86/kernel/cpu/intel.c:673:34: warning: variable 'l2' set but not used
Date: Thu, 8 Feb 2024 00:11:36 +0800	[thread overview]
Message-ID: <202402080007.mX2pYVVF-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   6d280f4d760e3bcb4a8df302afebf085b65ec982
commit: 807e9bc8e2fe6b4907f9f77fd073f7ef5073af29 x86/CPU: Move cpu_detect_cache_sizes() into init_intel_cacheinfo()
date:   6 years ago
config: x86_64-randconfig-x051-20230705 (https://download.01.org/0day-ci/archive/20240208/202402080007.mX2pYVVF-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240208/202402080007.mX2pYVVF-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/202402080007.mX2pYVVF-lkp@intel.com/

All warnings (new ones prefixed by >>):

   arch/x86/kernel/cpu/intel.c: In function 'init_intel':
>> arch/x86/kernel/cpu/intel.c:673:34: warning: variable 'l2' set but not used [-Wunused-but-set-variable]
     673 |                 unsigned int l1, l2;
         |                                  ^~
   arch/x86/kernel/cpu/intel.o: warning: objtool: init_intel_misc_features()+0x1d7: sibling call from callable instruction with modified stack frame
   arch/x86/kernel/cpu/intel.o: warning: objtool: init_intel_energy_perf()+0x9b: sibling call from callable instruction with modified stack frame
   arch/x86/kernel/cpu/intel.o: warning: objtool: detect_tme()+0x150: sibling call from callable instruction with modified stack frame
   arch/x86/kernel/cpu/intel.o: warning: objtool: early_init_intel()+0x583: sibling call from callable instruction with modified stack frame


vim +/l2 +673 arch/x86/kernel/cpu/intel.c

   635	
   636	static void init_intel(struct cpuinfo_x86 *c)
   637	{
   638		early_init_intel(c);
   639	
   640		intel_workarounds(c);
   641	
   642		/*
   643		 * Detect the extended topology information if available. This
   644		 * will reinitialise the initial_apicid which will be used
   645		 * in init_intel_cacheinfo()
   646		 */
   647		detect_extended_topology(c);
   648	
   649		if (!cpu_has(c, X86_FEATURE_XTOPOLOGY)) {
   650			/*
   651			 * let's use the legacy cpuid vector 0x1 and 0x4 for topology
   652			 * detection.
   653			 */
   654			c->x86_max_cores = detect_num_cpu_cores(c);
   655	#ifdef CONFIG_X86_32
   656			detect_ht(c);
   657	#endif
   658		}
   659	
   660		init_intel_cacheinfo(c);
   661	
   662		if (c->cpuid_level > 9) {
   663			unsigned eax = cpuid_eax(10);
   664			/* Check for version and the number of counters */
   665			if ((eax & 0xff) && (((eax>>8) & 0xff) > 1))
   666				set_cpu_cap(c, X86_FEATURE_ARCH_PERFMON);
   667		}
   668	
   669		if (cpu_has(c, X86_FEATURE_XMM2))
   670			set_cpu_cap(c, X86_FEATURE_LFENCE_RDTSC);
   671	
   672		if (boot_cpu_has(X86_FEATURE_DS)) {
 > 673			unsigned int l1, l2;
   674	
   675			rdmsr(MSR_IA32_MISC_ENABLE, l1, l2);
   676			if (!(l1 & (1<<11)))
   677				set_cpu_cap(c, X86_FEATURE_BTS);
   678			if (!(l1 & (1<<12)))
   679				set_cpu_cap(c, X86_FEATURE_PEBS);
   680		}
   681	
   682		if (c->x86 == 6 && boot_cpu_has(X86_FEATURE_CLFLUSH) &&
   683		    (c->x86_model == 29 || c->x86_model == 46 || c->x86_model == 47))
   684			set_cpu_bug(c, X86_BUG_CLFLUSH_MONITOR);
   685	
   686		if (c->x86 == 6 && boot_cpu_has(X86_FEATURE_MWAIT) &&
   687			((c->x86_model == INTEL_FAM6_ATOM_GOLDMONT)))
   688			set_cpu_bug(c, X86_BUG_MONITOR);
   689	

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

                 reply	other threads:[~2024-02-07 16:12 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202402080007.mX2pYVVF-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=davidwang@zhaoxin.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=tglx@linutronix.de \
    /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