linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* arch/x86/kernel/cpu/mce/amd.c:552:6: warning: no previous prototype for 'disable_err_thresholding'
@ 2022-03-30  8:45 kernel test robot
  2022-03-30 12:21 ` Borislav Petkov
  0 siblings, 1 reply; 3+ messages in thread
From: kernel test robot @ 2022-03-30  8:45 UTC (permalink / raw)
  To: Shirish S; +Cc: kbuild-all, linux-kernel, Borislav Petkov

Hi Shirish,

FYI, the error/warning still remains.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   965181d7ef7e1a863477536dc328c23a7ebc8a1d
commit: 30aa3d26edb0f3d7992757287eec0ca588a5c259 x86/MCE/AMD: Carve out the MC4_MISC thresholding quirk
date:   3 years, 2 months ago
config: x86_64-defconfig (https://download.01.org/0day-ci/archive/20220330/202203301632.RmI9R5aU-lkp@intel.com/config)
compiler: gcc-9 (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
reproduce (this is a W=1 build):
        # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=30aa3d26edb0f3d7992757287eec0ca588a5c259
        git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
        git fetch --no-tags linus master
        git checkout 30aa3d26edb0f3d7992757287eec0ca588a5c259
        # save the config file to linux build tree
        mkdir build_dir
        make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash arch/x86/kernel/cpu/mce/ drivers/gpu/drm/i915/

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/mce/amd.c:552:6: warning: no previous prototype for 'disable_err_thresholding' [-Wmissing-prototypes]
     552 | void disable_err_thresholding(struct cpuinfo_x86 *c)
         |      ^~~~~~~~~~~~~~~~~~~~~~~~


vim +/disable_err_thresholding +552 arch/x86/kernel/cpu/mce/amd.c

   547	
   548	/*
   549	 * Turn off MC4_MISC thresholding banks on all family 0x15 models since
   550	 * they're not supported there.
   551	 */
 > 552	void disable_err_thresholding(struct cpuinfo_x86 *c)
   553	{
   554		int i;
   555		u64 hwcr;
   556		bool need_toggle;
   557		u32 msrs[] = {
   558			0x00000413, /* MC4_MISC0 */
   559			0xc0000408, /* MC4_MISC1 */
   560		};
   561	
   562		if (c->x86 != 0x15)
   563			return;
   564	
   565		rdmsrl(MSR_K7_HWCR, hwcr);
   566	
   567		/* McStatusWrEn has to be set */
   568		need_toggle = !(hwcr & BIT(18));
   569	
   570		if (need_toggle)
   571			wrmsrl(MSR_K7_HWCR, hwcr | BIT(18));
   572	
   573		/* Clear CntP bit safely */
   574		for (i = 0; i < ARRAY_SIZE(msrs); i++)
   575			msr_clear_bit(msrs[i], 62);
   576	
   577		/* restore old settings */
   578		if (need_toggle)
   579			wrmsrl(MSR_K7_HWCR, hwcr);
   580	}
   581	

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

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

* Re: arch/x86/kernel/cpu/mce/amd.c:552:6: warning: no previous prototype for 'disable_err_thresholding'
  2022-03-30  8:45 arch/x86/kernel/cpu/mce/amd.c:552:6: warning: no previous prototype for 'disable_err_thresholding' kernel test robot
@ 2022-03-30 12:21 ` Borislav Petkov
  2022-03-31 12:48   ` [kbuild-all] " Chen, Rong A
  0 siblings, 1 reply; 3+ messages in thread
From: Borislav Petkov @ 2022-03-30 12:21 UTC (permalink / raw)
  To: kernel test robot; +Cc: Shirish S, kbuild-all, linux-kernel

On Wed, Mar 30, 2022 at 04:45:25PM +0800, kernel test robot wrote:
> Hi Shirish,
> 
> FYI, the error/warning still remains.
> 
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head:   965181d7ef7e1a863477536dc328c23a7ebc8a1d
> commit: 30aa3d26edb0f3d7992757287eec0ca588a5c259 x86/MCE/AMD: Carve out the MC4_MISC thresholding quirk
> date:   3 years, 2 months ago
> config: x86_64-defconfig (https://download.01.org/0day-ci/archive/20220330/202203301632.RmI9R5aU-lkp@intel.com/config)
> compiler: gcc-9 (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
> reproduce (this is a W=1 build):
>         # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=30aa3d26edb0f3d7992757287eec0ca588a5c259
>         git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
>         git fetch --no-tags linus master
>         git checkout 30aa3d26edb0f3d7992757287eec0ca588a5c259
>         # save the config file to linux build tree
>         mkdir build_dir
>         make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash arch/x86/kernel/cpu/mce/ drivers/gpu/drm/i915/
> 
> 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/mce/amd.c:552:6: warning: no previous prototype for 'disable_err_thresholding' [-Wmissing-prototypes]
>      552 | void disable_err_thresholding(struct cpuinfo_x86 *c)
>          |      ^~~~~~~~~~~~~~~~~~~~~~~~

I can't trigger this with gcc-9 (Debian 9.3.0-22) 9.3.0 on that commit
with your .config.

Please drop this.

-- 
Regards/Gruss,
    Boris.

SUSE Software Solutions Germany GmbH, GF: Ivo Totev, HRB 36809, AG Nürnberg

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

* Re: [kbuild-all] Re: arch/x86/kernel/cpu/mce/amd.c:552:6: warning: no previous prototype for 'disable_err_thresholding'
  2022-03-30 12:21 ` Borislav Petkov
@ 2022-03-31 12:48   ` Chen, Rong A
  0 siblings, 0 replies; 3+ messages in thread
From: Chen, Rong A @ 2022-03-31 12:48 UTC (permalink / raw)
  To: Borislav Petkov, kernel test robot; +Cc: Shirish S, kbuild-all, linux-kernel



On 3/30/2022 8:21 PM, Borislav Petkov wrote:
> On Wed, Mar 30, 2022 at 04:45:25PM +0800, kernel test robot wrote:
>> Hi Shirish,
>>
>> FYI, the error/warning still remains.
>>
>> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
>> head:   965181d7ef7e1a863477536dc328c23a7ebc8a1d
>> commit: 30aa3d26edb0f3d7992757287eec0ca588a5c259 x86/MCE/AMD: Carve out the MC4_MISC thresholding quirk
>> date:   3 years, 2 months ago
>> config: x86_64-defconfig (https://download.01.org/0day-ci/archive/20220330/202203301632.RmI9R5aU-lkp@intel.com/config)
>> compiler: gcc-9 (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0
>> reproduce (this is a W=1 build):
>>          # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=30aa3d26edb0f3d7992757287eec0ca588a5c259
>>          git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
>>          git fetch --no-tags linus master
>>          git checkout 30aa3d26edb0f3d7992757287eec0ca588a5c259
>>          # save the config file to linux build tree
>>          mkdir build_dir
>>          make W=1 O=build_dir ARCH=x86_64 SHELL=/bin/bash arch/x86/kernel/cpu/mce/ drivers/gpu/drm/i915/
>>
>> 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/mce/amd.c:552:6: warning: no previous prototype for 'disable_err_thresholding' [-Wmissing-prototypes]
>>       552 | void disable_err_thresholding(struct cpuinfo_x86 *c)
>>           |      ^~~~~~~~~~~~~~~~~~~~~~~~
> 
> I can't trigger this with gcc-9 (Debian 9.3.0-22) 9.3.0 on that commit
> with your .config.
> 
> Please drop this.
> 

Hi Boris,

Sorry about it, something goes wrong, we'll add it to the ignore list.

Best Regards,
Rong Chen

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

end of thread, other threads:[~2022-03-31 12:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-30  8:45 arch/x86/kernel/cpu/mce/amd.c:552:6: warning: no previous prototype for 'disable_err_thresholding' kernel test robot
2022-03-30 12:21 ` Borislav Petkov
2022-03-31 12:48   ` [kbuild-all] " Chen, Rong A

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).