All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] hwrng: cn10k - Enable compile testing
@ 2022-04-21  9:56 Herbert Xu
  2022-04-22  2:40 ` kernel test robot
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Herbert Xu @ 2022-04-21  9:56 UTC (permalink / raw)
  To: Linux Crypto Mailing List

This patch enables COMPILE_TEST for cn10k.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

diff --git a/drivers/char/hw_random/Kconfig b/drivers/char/hw_random/Kconfig
index dad084c0ecee..faf0116fa9de 100644
--- a/drivers/char/hw_random/Kconfig
+++ b/drivers/char/hw_random/Kconfig
@@ -540,7 +540,7 @@ config HW_RANDOM_ARM_SMCCC_TRNG
 
 config HW_RANDOM_CN10K
        tristate "Marvell CN10K Random Number Generator support"
-       depends on HW_RANDOM && PCI && ARM64
+       depends on HW_RANDOM && PCI && (ARM64 || COMPILE_TEST)
        default HW_RANDOM
        help
 	 This driver provides support for the True Random Number
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

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

* Re: [PATCH] hwrng: cn10k - Enable compile testing
  2022-04-21  9:56 [PATCH] hwrng: cn10k - Enable compile testing Herbert Xu
@ 2022-04-22  2:40 ` kernel test robot
  2022-04-27  3:14 ` kernel test robot
  2022-04-29  5:37 ` [v2 PATCH] " Herbert Xu
  2 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2022-04-22  2:40 UTC (permalink / raw)
  To: Herbert Xu, Linux Crypto Mailing List; +Cc: llvm, kbuild-all

Hi Herbert,

I love your patch! Yet something to improve:

[auto build test ERROR on char-misc/char-misc-testing]
[also build test ERROR on herbert-cryptodev-2.6/master v5.18-rc3 next-20220421]
[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/intel-lab-lkp/linux/commits/Herbert-Xu/hwrng-cn10k-Enable-compile-testing/20220421-181432
base:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git c50c29a806113614098efd8da9fd7b48d605ba45
config: arm-randconfig-r023-20220421 (https://download.01.org/0day-ci/archive/20220422/202204221037.taeIlED5-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 5bd87350a5ae429baf8f373cb226a57b62f87280)
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
        # install arm cross compiling tool for clang build
        # apt-get install binutils-arm-linux-gnueabi
        # https://github.com/intel-lab-lkp/linux/commit/c804fd47b3fa542852a8cbd9c76ded8a43d32a90
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Herbert-Xu/hwrng-cn10k-Enable-compile-testing/20220421-181432
        git checkout c804fd47b3fa542852a8cbd9c76ded8a43d32a90
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash drivers/char/hw_random/

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

>> drivers/char/hw_random/cn10k-rng.c:55:11: error: call to undeclared function 'readq'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
           status = readq(rng->reg_base + RNM_PF_EBG_HEALTH);
                    ^
   drivers/char/hw_random/cn10k-rng.c:71:11: error: call to undeclared function 'readq'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
           *value = readq(rng->reg_base + RNM_PF_RANDOM);
                    ^
   2 errors generated.


vim +/readq +55 drivers/char/hw_random/cn10k-rng.c

38e9791a020904 Sunil Goutham 2021-12-14  45  
38e9791a020904 Sunil Goutham 2021-12-14  46  static int check_rng_health(struct cn10k_rng *rng)
38e9791a020904 Sunil Goutham 2021-12-14  47  {
38e9791a020904 Sunil Goutham 2021-12-14  48  	u64 status;
38e9791a020904 Sunil Goutham 2021-12-14  49  	int err;
38e9791a020904 Sunil Goutham 2021-12-14  50  
38e9791a020904 Sunil Goutham 2021-12-14  51  	/* Skip checking health */
38e9791a020904 Sunil Goutham 2021-12-14  52  	if (!rng->reg_base)
38e9791a020904 Sunil Goutham 2021-12-14  53  		return 0;
38e9791a020904 Sunil Goutham 2021-12-14  54  
38e9791a020904 Sunil Goutham 2021-12-14 @55  	status = readq(rng->reg_base + RNM_PF_EBG_HEALTH);
38e9791a020904 Sunil Goutham 2021-12-14  56  	if (status & BIT_ULL(20)) {
38e9791a020904 Sunil Goutham 2021-12-14  57  		err = reset_rng_health_state(rng);
38e9791a020904 Sunil Goutham 2021-12-14  58  		if (err) {
38e9791a020904 Sunil Goutham 2021-12-14  59  			dev_err(&rng->pdev->dev, "HWRNG: Health test failed (status=%llx)\n",
38e9791a020904 Sunil Goutham 2021-12-14  60  					status);
38e9791a020904 Sunil Goutham 2021-12-14  61  			dev_err(&rng->pdev->dev, "HWRNG: error during reset\n");
38e9791a020904 Sunil Goutham 2021-12-14  62  		}
38e9791a020904 Sunil Goutham 2021-12-14  63  	}
38e9791a020904 Sunil Goutham 2021-12-14  64  	return 0;
38e9791a020904 Sunil Goutham 2021-12-14  65  }
38e9791a020904 Sunil Goutham 2021-12-14  66  

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

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

* Re: [PATCH] hwrng: cn10k - Enable compile testing
  2022-04-21  9:56 [PATCH] hwrng: cn10k - Enable compile testing Herbert Xu
  2022-04-22  2:40 ` kernel test robot
@ 2022-04-27  3:14 ` kernel test robot
  2022-04-29  5:37 ` [v2 PATCH] " Herbert Xu
  2 siblings, 0 replies; 4+ messages in thread
From: kernel test robot @ 2022-04-27  3:14 UTC (permalink / raw)
  To: Herbert Xu, Linux Crypto Mailing List; +Cc: kbuild-all

Hi Herbert,

I love your patch! Yet something to improve:

[auto build test ERROR on char-misc/char-misc-testing]
[also build test ERROR on herbert-cryptodev-2.6/master v5.18-rc4 next-20220426]
[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/intel-lab-lkp/linux/commits/Herbert-Xu/hwrng-cn10k-Enable-compile-testing/20220421-181432
base:   https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git c50c29a806113614098efd8da9fd7b48d605ba45
config: arc-allyesconfig (https://download.01.org/0day-ci/archive/20220427/202204271119.5APX0rdl-lkp@intel.com/config)
compiler: arceb-elf-gcc (GCC) 11.2.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
        # https://github.com/intel-lab-lkp/linux/commit/c804fd47b3fa542852a8cbd9c76ded8a43d32a90
        git remote add linux-review https://github.com/intel-lab-lkp/linux
        git fetch --no-tags linux-review Herbert-Xu/hwrng-cn10k-Enable-compile-testing/20220421-181432
        git checkout c804fd47b3fa542852a8cbd9c76ded8a43d32a90
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross W=1 O=build_dir ARCH=arc SHELL=/bin/bash

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   drivers/char/hw_random/cn10k-rng.c: In function 'check_rng_health':
>> drivers/char/hw_random/cn10k-rng.c:55:18: error: implicit declaration of function 'readq'; did you mean 'readb'? [-Werror=implicit-function-declaration]
      55 |         status = readq(rng->reg_base + RNM_PF_EBG_HEALTH);
         |                  ^~~~~
         |                  readb
   cc1: some warnings being treated as errors


vim +55 drivers/char/hw_random/cn10k-rng.c

38e9791a0209041 Sunil Goutham 2021-12-14  45  
38e9791a0209041 Sunil Goutham 2021-12-14  46  static int check_rng_health(struct cn10k_rng *rng)
38e9791a0209041 Sunil Goutham 2021-12-14  47  {
38e9791a0209041 Sunil Goutham 2021-12-14  48  	u64 status;
38e9791a0209041 Sunil Goutham 2021-12-14  49  	int err;
38e9791a0209041 Sunil Goutham 2021-12-14  50  
38e9791a0209041 Sunil Goutham 2021-12-14  51  	/* Skip checking health */
38e9791a0209041 Sunil Goutham 2021-12-14  52  	if (!rng->reg_base)
38e9791a0209041 Sunil Goutham 2021-12-14  53  		return 0;
38e9791a0209041 Sunil Goutham 2021-12-14  54  
38e9791a0209041 Sunil Goutham 2021-12-14 @55  	status = readq(rng->reg_base + RNM_PF_EBG_HEALTH);
38e9791a0209041 Sunil Goutham 2021-12-14  56  	if (status & BIT_ULL(20)) {
38e9791a0209041 Sunil Goutham 2021-12-14  57  		err = reset_rng_health_state(rng);
38e9791a0209041 Sunil Goutham 2021-12-14  58  		if (err) {
38e9791a0209041 Sunil Goutham 2021-12-14  59  			dev_err(&rng->pdev->dev, "HWRNG: Health test failed (status=%llx)\n",
38e9791a0209041 Sunil Goutham 2021-12-14  60  					status);
38e9791a0209041 Sunil Goutham 2021-12-14  61  			dev_err(&rng->pdev->dev, "HWRNG: error during reset\n");
38e9791a0209041 Sunil Goutham 2021-12-14  62  		}
38e9791a0209041 Sunil Goutham 2021-12-14  63  	}
38e9791a0209041 Sunil Goutham 2021-12-14  64  	return 0;
38e9791a0209041 Sunil Goutham 2021-12-14  65  }
38e9791a0209041 Sunil Goutham 2021-12-14  66  

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

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

* [v2 PATCH] hwrng: cn10k - Enable compile testing
  2022-04-21  9:56 [PATCH] hwrng: cn10k - Enable compile testing Herbert Xu
  2022-04-22  2:40 ` kernel test robot
  2022-04-27  3:14 ` kernel test robot
@ 2022-04-29  5:37 ` Herbert Xu
  2 siblings, 0 replies; 4+ messages in thread
From: Herbert Xu @ 2022-04-29  5:37 UTC (permalink / raw)
  To: Linux Crypto Mailing List

This patch enables COMPILE_TEST for cn10k.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

diff --git a/drivers/char/hw_random/Kconfig b/drivers/char/hw_random/Kconfig
index dad084c0ecee..02d0223d6e06 100644
--- a/drivers/char/hw_random/Kconfig
+++ b/drivers/char/hw_random/Kconfig
@@ -540,7 +540,7 @@ config HW_RANDOM_ARM_SMCCC_TRNG
 
 config HW_RANDOM_CN10K
        tristate "Marvell CN10K Random Number Generator support"
-       depends on HW_RANDOM && PCI && ARM64
+       depends on HW_RANDOM && PCI && (ARM64 || (64BIT && COMPILE_TEST))
        default HW_RANDOM
        help
 	 This driver provides support for the True Random Number
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

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

end of thread, other threads:[~2022-04-29  5:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-21  9:56 [PATCH] hwrng: cn10k - Enable compile testing Herbert Xu
2022-04-22  2:40 ` kernel test robot
2022-04-27  3:14 ` kernel test robot
2022-04-29  5:37 ` [v2 PATCH] " Herbert Xu

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.