Content-Type: multipart/mixed; boundary="===============1156409356877656048==" MIME-Version: 1.0 From: kernel test robot To: kbuild-all@lists.01.org Subject: Re: [PATCH v5] powerpc/pseries: read the lpar name from the firmware Date: Mon, 10 Jan 2022 21:33:00 +0800 Message-ID: <202201102154.a95OQEPr-lkp@intel.com> In-Reply-To: <20220106161339.74656-1-ldufour@linux.ibm.com> List-Id: --===============1156409356877656048== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Hi Laurent, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on powerpc/next] [also build test WARNING on linux/master linus/master v5.16 next-20220110] [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/Laurent-Dufour/powerpc-pse= ries-read-the-lpar-name-from-the-firmware/20220107-001503 base: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git n= ext config: powerpc64-randconfig-r026-20220106 (https://download.01.org/0day-ci= /archive/20220110/202201102154.a95OQEPr-lkp(a)intel.com/config) compiler: powerpc64-linux-gcc (GCC) 11.2.0 reproduce (this is a W=3D1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/= make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # https://github.com/0day-ci/linux/commit/5cf0dea6e919e93ff3088f87a= cd40e84608a6861 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review Laurent-Dufour/powerpc-pseries-rea= d-the-lpar-name-from-the-firmware/20220107-001503 git checkout 5cf0dea6e919e93ff3088f87acd40e84608a6861 # save the config file to linux build tree mkdir build_dir COMPILER_INSTALL_PATH=3D$HOME/0day COMPILER=3Dgcc-11.2.0 make.cross= O=3Dbuild_dir ARCH=3Dpowerpc SHELL=3D/bin/bash arch/powerpc/platforms/pser= ies/ If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All warnings (new ones prefixed by >>): arch/powerpc/platforms/pseries/lparcfg.c:257: warning: Function paramete= r or member 'm' not described in 'parse_mpp_data' arch/powerpc/platforms/pseries/lparcfg.c:295: warning: Function paramete= r or member 'm' not described in 'parse_mpp_x_data' arch/powerpc/platforms/pseries/lparcfg.c:334: warning: Function paramete= r or member 'm' not described in 'read_RTAS_lpar_name' >> arch/powerpc/platforms/pseries/lparcfg.c:334: warning: expecting prototy= pe for Read the lpar name using the RTAS ibm,get-system(). Prototype was fo= r read_RTAS_lpar_name() instead >> arch/powerpc/platforms/pseries/lparcfg.c:378: warning: This comment star= ts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guid= e/kernel-doc.rst * Read the LPAR name from the Device Tree. arch/powerpc/platforms/pseries/lparcfg.c:678: warning: Function paramete= r or member 'entitlement' not described in 'update_mpp' arch/powerpc/platforms/pseries/lparcfg.c:678: warning: Function paramete= r or member 'weight' not described in 'update_mpp' vim +334 arch/powerpc/platforms/pseries/lparcfg.c 323 = 324 /** 325 * Read the lpar name using the RTAS ibm,get-system-parameter call. 326 * 327 * The name read through this call is updated if changes are made by= the end 328 * user on the hypervisor side. 329 * 330 * Some hypervisor (like Qemu) may not provide this value. In that c= ase, a non 331 * null value is returned. 332 */ 333 static int read_RTAS_lpar_name(struct seq_file *m) > 334 { 335 int rc, len, token; 336 union { 337 char raw_buffer[GET_SYS_PARM_BUF_SIZE]; 338 struct { 339 __be16 len; 340 char name[GET_SYS_PARM_BUF_SIZE-2]; 341 }; 342 } *local_buffer; 343 = 344 token =3D rtas_token("ibm,get-system-parameter"); 345 if (token =3D=3D RTAS_UNKNOWN_SERVICE) 346 return -EINVAL; 347 = 348 local_buffer =3D kmalloc(sizeof(*local_buffer), GFP_KERNEL); 349 if (!local_buffer) 350 return -ENOMEM; 351 = 352 do { 353 spin_lock(&rtas_data_buf_lock); 354 memset(rtas_data_buf, 0, sizeof(*local_buffer)); 355 rc =3D rtas_call(token, 3, 1, NULL, SPLPAR_LPAR_NAME_TOKEN, 356 __pa(rtas_data_buf), sizeof(*local_buffer)); 357 if (!rc) 358 memcpy(local_buffer->raw_buffer, rtas_data_buf, 359 sizeof(local_buffer->raw_buffer)); 360 spin_unlock(&rtas_data_buf_lock); 361 } while (rtas_busy_delay(rc)); 362 = 363 if (!rc) { 364 /* Force end of string */ 365 len =3D min((int) be16_to_cpu(local_buffer->len), 366 (int) sizeof(local_buffer->name)-1); 367 local_buffer->name[len] =3D '\0'; 368 = 369 seq_printf(m, "partition_name=3D%s\n", local_buffer->name); 370 } else 371 rc =3D -ENODATA; 372 = 373 kfree(local_buffer); 374 return rc; 375 } 376 = 377 /** > 378 * Read the LPAR name from the Device Tree. 379 * 380 * The value read in the DT is not updated if the end-user is touchi= ng the LPAR 381 * name on the hypervisor side. 382 */ 383 static int read_DT_lpar_name(struct seq_file *m) 384 { 385 struct device_node *rootdn; 386 const char *name; 387 = 388 rootdn =3D of_find_node_by_path("/"); 389 if (!rootdn) 390 return -ENOENT; 391 = 392 name =3D of_get_property(rootdn, "ibm,partition-name", NULL); 393 if (!name) 394 return -ENOENT; 395 = 396 seq_printf(m, "partition_name=3D%s\n", name); 397 return 0; 398 } 399 = --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org --===============1156409356877656048==--