mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [tip:x86/cleanups 7/11] arch/x86/kernel/cpu/aperfmperf.c:502:6: warning: no previous prototype for 'arch_scale_freq_tick'
@ 2022-04-30 17:51 kernel test robot
  2022-05-02  7:27 ` [tip: x86/cleanups] x86/aperfperf: Make it correct on 32bit and UP kernels tip-bot2 for Thomas Gleixner
  0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2022-04-30 17:51 UTC (permalink / raw)
  To: Thomas Gleixner; +Cc: kbuild-all, linux-kernel, x86, Rafael J. Wysocki

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86/cleanups
head:   fb4c77c21aba03677f283acda3cae748ef866abf
commit: bb6e89df9028b2fab0ce6ac71cd9ef25b6ada32d [7/11] x86/aperfmperf: Make parts of the frequency invariance code unconditional
config: i386-tinyconfig (https://download.01.org/0day-ci/archive/20220501/202205010106.06xRBR2C-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.2.0-20) 11.2.0
reproduce (this is a W=1 build):
        # https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/commit/?id=bb6e89df9028b2fab0ce6ac71cd9ef25b6ada32d
        git remote add tip https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git
        git fetch --no-tags tip x86/cleanups
        git checkout bb6e89df9028b2fab0ce6ac71cd9ef25b6ada32d
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash arch/x86/kernel/cpu/

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/kernel/cpu/aperfmperf.c:502:6: warning: no previous prototype for 'arch_scale_freq_tick' [-Wmissing-prototypes]
     502 | void arch_scale_freq_tick(void)
         |      ^~~~~~~~~~~~~~~~~~~~


vim +/arch_scale_freq_tick +502 arch/x86/kernel/cpu/aperfmperf.c

73a5fa7d51366a Thomas Gleixner 2022-04-15  501  
73a5fa7d51366a Thomas Gleixner 2022-04-15 @502  void arch_scale_freq_tick(void)
73a5fa7d51366a Thomas Gleixner 2022-04-15  503  {
73a5fa7d51366a Thomas Gleixner 2022-04-15  504  	struct aperfmperf *s = this_cpu_ptr(&cpu_samples);
73a5fa7d51366a Thomas Gleixner 2022-04-15  505  	u64 acnt, mcnt, aperf, mperf;
73a5fa7d51366a Thomas Gleixner 2022-04-15  506  
bb6e89df9028b2 Thomas Gleixner 2022-04-15  507  	if (!cpu_feature_enabled(X86_FEATURE_APERFMPERF))
73a5fa7d51366a Thomas Gleixner 2022-04-15  508  		return;
73a5fa7d51366a Thomas Gleixner 2022-04-15  509  
73a5fa7d51366a Thomas Gleixner 2022-04-15  510  	rdmsrl(MSR_IA32_APERF, aperf);
73a5fa7d51366a Thomas Gleixner 2022-04-15  511  	rdmsrl(MSR_IA32_MPERF, mperf);
73a5fa7d51366a Thomas Gleixner 2022-04-15  512  	acnt = aperf - s->aperf;
73a5fa7d51366a Thomas Gleixner 2022-04-15  513  	mcnt = mperf - s->mperf;
73a5fa7d51366a Thomas Gleixner 2022-04-15  514  
73a5fa7d51366a Thomas Gleixner 2022-04-15  515  	s->aperf = aperf;
73a5fa7d51366a Thomas Gleixner 2022-04-15  516  	s->mperf = mperf;
73a5fa7d51366a Thomas Gleixner 2022-04-15  517  
73a5fa7d51366a Thomas Gleixner 2022-04-15  518  	scale_freq_tick(acnt, mcnt);
73a5fa7d51366a Thomas Gleixner 2022-04-15  519  }
bb6e89df9028b2 Thomas Gleixner 2022-04-15  520  

:::::: The code at line 502 was first introduced by commit
:::::: 73a5fa7d51366a549a9f2e3ee875ae51aa0b5580 x86/aperfmperf: Restructure arch_scale_freq_tick()

:::::: TO: Thomas Gleixner <tglx@linutronix.de>
:::::: CC: Thomas Gleixner <tglx@linutronix.de>

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [tip: x86/cleanups] x86/aperfperf: Make it correct on 32bit and UP kernels
  2022-04-30 17:51 [tip:x86/cleanups 7/11] arch/x86/kernel/cpu/aperfmperf.c:502:6: warning: no previous prototype for 'arch_scale_freq_tick' kernel test robot
@ 2022-05-02  7:27 ` tip-bot2 for Thomas Gleixner
  0 siblings, 0 replies; 2+ messages in thread
From: tip-bot2 for Thomas Gleixner @ 2022-05-02  7:27 UTC (permalink / raw)
  To: linux-tip-commits; +Cc: kernel test robot, Thomas Gleixner, x86, linux-kernel

The following commit has been merged into the x86/cleanups branch of tip:

Commit-ID:     1ff2fb982c52ed6c3478adc944441d6ea065d8fb
Gitweb:        https://git.kernel.org/tip/1ff2fb982c52ed6c3478adc944441d6ea065d8fb
Author:        Thomas Gleixner <tglx@linutronix.de>
AuthorDate:    Mon, 02 May 2022 09:01:55 +02:00
Committer:     Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Mon, 02 May 2022 09:19:05 +02:00

x86/aperfperf: Make it correct on 32bit and UP kernels

The utilization of arch_scale_freq_tick() for CPU frequency readouts is
incomplete as it failed to move the function prototype and the define
out of the CONFIG_SMP && CONFIG_X86_64 #ifdef.

Make them unconditionally available.

Fixes: bb6e89df9028 ("x86/aperfmperf: Make parts of the frequency invariance code unconditional")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/lkml/202205010106.06xRBR2C-lkp@intel.com
---
 arch/x86/include/asm/topology.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/arch/x86/include/asm/topology.h b/arch/x86/include/asm/topology.h
index 1b2553d..458c891 100644
--- a/arch/x86/include/asm/topology.h
+++ b/arch/x86/include/asm/topology.h
@@ -212,9 +212,6 @@ static inline long arch_scale_freq_capacity(int cpu)
 }
 #define arch_scale_freq_capacity arch_scale_freq_capacity
 
-extern void arch_scale_freq_tick(void);
-#define arch_scale_freq_tick arch_scale_freq_tick
-
 extern void arch_set_max_freq_ratio(bool turbo_disabled);
 extern void freq_invariance_set_perf_ratio(u64 ratio, bool turbo_disabled);
 #else
@@ -222,6 +219,9 @@ static inline void arch_set_max_freq_ratio(bool turbo_disabled) { }
 static inline void freq_invariance_set_perf_ratio(u64 ratio, bool turbo_disabled) { }
 #endif
 
+extern void arch_scale_freq_tick(void);
+#define arch_scale_freq_tick arch_scale_freq_tick
+
 #ifdef CONFIG_ACPI_CPPC_LIB
 void init_freq_invariance_cppc(void);
 #define arch_init_invariance_cppc init_freq_invariance_cppc

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-05-02  7:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-30 17:51 [tip:x86/cleanups 7/11] arch/x86/kernel/cpu/aperfmperf.c:502:6: warning: no previous prototype for 'arch_scale_freq_tick' kernel test robot
2022-05-02  7:27 ` [tip: x86/cleanups] x86/aperfperf: Make it correct on 32bit and UP kernels tip-bot2 for Thomas Gleixner

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

all inboxes | Powered by JetHome®