Subject: Re: [PATCH v3] powerpc/pseries: Avoid using addr_to_pfn in realmode

From: kernel test robot <[email-masked]>
Date: Mon, 20 Jul 2020 20:49:18 +0800

Hi Ganesh,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on powerpc/next]
[also build test WARNING on v5.8-rc6 next-20200720]
[cannot apply to mpe/next scottwood/next]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Ganesh-Goudar/powerpc-pseries-Avoid-using-addr_to_pfn-in-realmode/20200720-160622
base:   https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next
config: powerpc-allyesconfig (attached as .config)
compiler: powerpc64-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=powerpc 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <[email-masked]>

All warnings (new ones prefixed by >>):

   arch/powerpc/platforms/pseries/ras.c:125:12: warning: no previous prototype for 'init_ras_hotplug_IRQ' [-Wmissing-prototypes]
     125 | int __init init_ras_hotplug_IRQ(void)
         |            ^~~~~~~~~~~~~~~~~~~~
   arch/powerpc/platforms/pseries/ras.c: In function 'ras_epow_interrupt':
   arch/powerpc/platforms/pseries/ras.c:319:6: warning: variable 'status' set but not used [-Wunused-but-set-variable]
     319 |  int status;
         |      ^~~~~~
   arch/powerpc/platforms/pseries/ras.c: In function 'mce_handle_error':
>> arch/powerpc/platforms/pseries/ras.c:723:17: warning: variable 'err_sub_type' set but not used [-Wunused-but-set-variable]
     723 |  u8 error_type, err_sub_type;
         |                 ^~~~~~~~~~~~

vim +/err_sub_type +723 arch/powerpc/platforms/pseries/ras.c

   717	
   718	static int mce_handle_error(struct pt_regs *regs, struct rtas_error_log *errp)
   719	{
   720		struct pseries_errorlog *pseries_log;
   721		struct pseries_mc_errorlog *mce_log = NULL;
   722		int disposition = rtas_error_disposition(errp);
 > 723		u8 error_type, err_sub_type;
   724	
   725		if (!rtas_error_extended(errp))
   726			goto out;
   727	
   728		pseries_log = get_pseries_errorlog(errp, PSERIES_ELOG_SECT_ID_MCE);
   729		if (!pseries_log)
   730			goto out;
   731	
   732		mce_log = (struct pseries_mc_errorlog *)pseries_log->data;
   733		error_type = mce_log->error_type;
   734		err_sub_type = rtas_mc_error_sub_type(mce_log);
   735	
   736		disposition = mce_handle_err_realmode(disposition, error_type);
   737	
   738		/*
   739		 * Enable translation as we will be accessing per-cpu variables
   740		 * in save_mce_event() which may fall outside RMO region, also
   741		 * leave it enabled because subsequently we will be queuing work
   742		 * to workqueues where again per-cpu variables accessed, besides
   743		 * fwnmi_release_errinfo() crashes when called in realmode on
   744		 * pseries.
   745		 * Note: All the realmode handling like flushing SLB entries for
   746		 *       SLB multihit is done by now.
   747		 */
   748	out:
   749		mtmsr(mfmsr() | MSR_IR | MSR_DR);
   750		disposition = mce_handle_err_virtmode(regs, errp, mce_log,
   751						      disposition);
   752		return disposition;
   753	}
   754	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email-masked]