public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
* [mark:perf/overflow 1/3] drivers/perf/apple_m1_cpu_pmu.c:385:18: warning: unused variable 'regs'
@ 2023-12-06  4:13 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-12-06  4:13 UTC (permalink / raw)
  To: Mark Rutland; +Cc: llvm, oe-kbuild-all

Hi Mark,

FYI, the error/warning was bisected to this commit, please ignore it if it's irrelevant.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/mark/linux.git perf/overflow
head:   f3b357f85dad79444f2d0c645833fb947de1e88d
commit: 80783e59015586b6cb6b3211b0753822929e6969 [1/3] arm_pmu: centralise event overflow handling
config: arm64-randconfig-002-20231206 (https://download.01.org/0day-ci/archive/20231206/202312061231.KUbaq7xt-lkp@intel.com/config)
compiler: clang version 15.0.7 (https://github.com/llvm/llvm-project.git 8dfdcc7b7bf66834a761bd8de445840ef68e4d1a)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231206/202312061231.KUbaq7xt-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/202312061231.KUbaq7xt-lkp@intel.com/

All warnings (new ones prefixed by >>):

>> drivers/perf/apple_m1_cpu_pmu.c:385:18: warning: unused variable 'regs' [-Wunused-variable]
           struct pt_regs *regs = get_irq_regs();
                           ^
   1 warning generated.


vim +/regs +385 drivers/perf/apple_m1_cpu_pmu.c

   381	
   382	static irqreturn_t m1_pmu_handle_irq(struct arm_pmu *cpu_pmu)
   383	{
   384		struct pmu_hw_events *cpuc = this_cpu_ptr(cpu_pmu->hw_events);
 > 385		struct pt_regs *regs = get_irq_regs();
   386		u64 overflow, state;
   387		int idx;
   388	
   389		overflow = read_sysreg_s(SYS_IMP_APL_PMSR_EL1);
   390		if (!overflow) {
   391			/* Spurious interrupt? */
   392			state = read_sysreg_s(SYS_IMP_APL_PMCR0_EL1);
   393			state &= ~PMCR0_IACT;
   394			write_sysreg_s(state, SYS_IMP_APL_PMCR0_EL1);
   395			isb();
   396			return IRQ_NONE;
   397		}
   398	
   399		cpu_pmu->stop(cpu_pmu);
   400	
   401		for (idx = 0; idx < cpu_pmu->num_events; idx++) {
   402			struct perf_event *event = cpuc->events[idx];
   403	
   404			if (!event)
   405				continue;
   406	
   407			armpmu_event_overflow(event);
   408		}
   409	
   410		cpu_pmu->start(cpu_pmu);
   411	
   412		return IRQ_HANDLED;
   413	}
   414	

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-12-06  4:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-06  4:13 [mark:perf/overflow 1/3] drivers/perf/apple_m1_cpu_pmu.c:385:18: warning: unused variable 'regs' kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox