CC: [email protected] BCC: [email protected] CC: [email protected] TO: Hans de Goede <[email protected]> CC: Andrew Morton <[email protected]> CC: Linux Memory Management List <[email protected]>
Hi Hans, First bad commit (maybe != root cause): tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master head: 3e732ebf7316ac83e8562db7e64cc68aec390a18 commit: ae62fbe299629d3b2fa61d4cf5146258c4d99fdf proc: make the proc_create[_data]() stubs static inlines date: 3 months ago :::::: branch date: 35 hours ago :::::: commit date: 3 months ago compiler: powerpc64-linux-gcc (GCC) 11.2.0 reproduce (cppcheck warning): # apt-get install cppcheck git checkout ae62fbe299629d3b2fa61d4cf5146258c4d99fdf cppcheck --quiet --enable=style,performance,portability --template=gcc FILE If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <[email protected]> cppcheck possible warnings: (new ones prefixed by >>, may not real problems) >> arch/powerpc/platforms/pseries/lpar.c:1106:54: warning: Parameter 'slot' can >> be declared with const [constParameter] static void hugepage_block_invalidate(unsigned long *slot, unsigned long *vpn, ^ vim +/slot +1106 arch/powerpc/platforms/pseries/lpar.c 1a5272866f87d7 Aneesh Kumar K.V 2013-06-20 1105 ba2dd8a26baa7e Laurent Dufour 2018-08-20 @1106 static void hugepage_block_invalidate(unsigned long *slot, unsigned long *vpn, ba2dd8a26baa7e Laurent Dufour 2018-08-20 1107 int count, int psize, int ssize) 1a5272866f87d7 Aneesh Kumar K.V 2013-06-20 1108 { 05af40e8859550 Laurent Dufour 2016-10-06 1109 unsigned long param[PLPAR_HCALL9_BUFSIZE]; ba2dd8a26baa7e Laurent Dufour 2018-08-20 1110 unsigned long shift, current_vpgb, vpgb; ba2dd8a26baa7e Laurent Dufour 2018-08-20 1111 int i, pix = 0; 1a5272866f87d7 Aneesh Kumar K.V 2013-06-20 1112 ba2dd8a26baa7e Laurent Dufour 2018-08-20 1113 shift = mmu_psize_defs[psize].shift; ba2dd8a26baa7e Laurent Dufour 2018-08-20 1114 ba2dd8a26baa7e Laurent Dufour 2018-08-20 1115 for (i = 0; i < count; i++) { ba2dd8a26baa7e Laurent Dufour 2018-08-20 1116 /* ba2dd8a26baa7e Laurent Dufour 2018-08-20 1117 * Shifting 3 bits more on the right to get a ba2dd8a26baa7e Laurent Dufour 2018-08-20 1118 * 8 pages aligned virtual addresse. ba2dd8a26baa7e Laurent Dufour 2018-08-20 1119 */ ba2dd8a26baa7e Laurent Dufour 2018-08-20 1120 vpgb = (vpn[i] >> (shift - VPN_SHIFT + 3)); ba2dd8a26baa7e Laurent Dufour 2018-08-20 1121 if (!pix || vpgb != current_vpgb) { ba2dd8a26baa7e Laurent Dufour 2018-08-20 1122 /* ba2dd8a26baa7e Laurent Dufour 2018-08-20 1123 * Need to start a new 8 pages block, flush ba2dd8a26baa7e Laurent Dufour 2018-08-20 1124 * the current one if needed. ba2dd8a26baa7e Laurent Dufour 2018-08-20 1125 */ ba2dd8a26baa7e Laurent Dufour 2018-08-20 1126 if (pix) ba2dd8a26baa7e Laurent Dufour 2018-08-20 1127 (void)call_block_remove(pix, param, true); ba2dd8a26baa7e Laurent Dufour 2018-08-20 1128 current_vpgb = vpgb; ba2dd8a26baa7e Laurent Dufour 2018-08-20 1129 param[0] = hpte_encode_avpn(vpn[i], psize, ssize); ba2dd8a26baa7e Laurent Dufour 2018-08-20 1130 pix = 1; ba2dd8a26baa7e Laurent Dufour 2018-08-20 1131 } ba2dd8a26baa7e Laurent Dufour 2018-08-20 1132 ba2dd8a26baa7e Laurent Dufour 2018-08-20 1133 param[pix++] = HBR_REQUEST | HBLKR_AVPN | slot[i]; ba2dd8a26baa7e Laurent Dufour 2018-08-20 1134 if (pix == PLPAR_HCALL9_BUFSIZE) { ba2dd8a26baa7e Laurent Dufour 2018-08-20 1135 pix = call_block_remove(pix, param, false); ba2dd8a26baa7e Laurent Dufour 2018-08-20 1136 /* ba2dd8a26baa7e Laurent Dufour 2018-08-20 1137 * pix = 0 means that all the entries were ba2dd8a26baa7e Laurent Dufour 2018-08-20 1138 * removed, we can start a new block. ba2dd8a26baa7e Laurent Dufour 2018-08-20 1139 * Otherwise, this means that there are entries ba2dd8a26baa7e Laurent Dufour 2018-08-20 1140 * to retry, and pix points to latest one, so ba2dd8a26baa7e Laurent Dufour 2018-08-20 1141 * we should increment it and try to continue ba2dd8a26baa7e Laurent Dufour 2018-08-20 1142 * the same block. ba2dd8a26baa7e Laurent Dufour 2018-08-20 1143 */ ba2dd8a26baa7e Laurent Dufour 2018-08-20 1144 if (pix) ba2dd8a26baa7e Laurent Dufour 2018-08-20 1145 pix++; ba2dd8a26baa7e Laurent Dufour 2018-08-20 1146 } ba2dd8a26baa7e Laurent Dufour 2018-08-20 1147 } ba2dd8a26baa7e Laurent Dufour 2018-08-20 1148 if (pix) ba2dd8a26baa7e Laurent Dufour 2018-08-20 1149 (void)call_block_remove(pix, param, true); ba2dd8a26baa7e Laurent Dufour 2018-08-20 1150 } ba2dd8a26baa7e Laurent Dufour 2018-08-20 1151 :::::: The code at line 1106 was first introduced by commit :::::: ba2dd8a26baa7e140555746d396e32952709c42d powerpc/pseries/mm: call H_BLOCK_REMOVE :::::: TO: Laurent Dufour <[email protected]> :::::: CC: Michael Ellerman <[email protected]> -- 0-DAY CI Kernel Test Service https://01.org/lkp _______________________________________________ kbuild mailing list -- [email protected] To unsubscribe send an email to [email protected]
