public inbox for llvm@lists.linux.dev
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Rob Herring <robh@kernel.org>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	linux-crypto@vger.kernel.org,
	Herbert Xu <herbert@gondor.apana.org.au>
Subject: [herbert-cryptodev-2.6:master 83/83] drivers/char/hw_random/xgene-rng.c:110:2: error: call to undeclared function 'writel'; ISO C99 and later do not support implicit function declarations
Date: Fri, 4 Aug 2023 20:14:10 +0800	[thread overview]
Message-ID: <202308042049.8R2tNRoo-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master
head:   1ce1cd8208ad6060e4fcf6e09068c8954687c127
commit: 1ce1cd8208ad6060e4fcf6e09068c8954687c127 [83/83] hwrng: Enable COMPILE_TEST for more drivers
config: s390-randconfig-r015-20230801 (https://download.01.org/0day-ci/archive/20230804/202308042049.8R2tNRoo-lkp@intel.com/config)
compiler: clang version 17.0.0 (https://github.com/llvm/llvm-project.git 4a5ac14ee968ff0ad5d2cc1ffa0299048db4c88a)
reproduce: (https://download.01.org/0day-ci/archive/20230804/202308042049.8R2tNRoo-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202308042049.8R2tNRoo-lkp@intel.com/

All errors (new ones prefixed by >>):

>> drivers/char/hw_random/xgene-rng.c:110:2: error: call to undeclared function 'writel'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     110 |         writel(fro_val, ctx->csr_base + RNG_FRODETUNE);
         |         ^
>> drivers/char/hw_random/xgene-rng.c:120:8: error: call to undeclared function 'readl'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     120 |         val = readl(ctx->csr_base + RNG_INTR_STS_ACK);
         |               ^
   drivers/char/hw_random/xgene-rng.c:196:2: error: call to undeclared function 'writel'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     196 |         writel(val, ctx->csr_base + RNG_INTR_STS_ACK);
         |         ^
   drivers/char/hw_random/xgene-rng.c:215:9: error: call to undeclared function 'readl'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     215 |                 val = readl(ctx->csr_base + RNG_INTR_STS_ACK);
         |                       ^
   drivers/char/hw_random/xgene-rng.c:230:13: error: call to undeclared function 'readl'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     230 |                 data[i] = readl(ctx->csr_base + RNG_INOUT_0 + i * 4);
         |                           ^
   drivers/char/hw_random/xgene-rng.c:233:2: error: call to undeclared function 'writel'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     233 |         writel(READY_MASK, ctx->csr_base + RNG_INTR_STS_ACK);
         |         ^
   drivers/char/hw_random/xgene-rng.c:242:2: error: call to undeclared function 'writel'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     242 |         writel(0x00000000, ctx->csr_base + RNG_CONTROL);
         |         ^
   drivers/char/hw_random/xgene-rng.c:280:18: error: call to undeclared function 'readl'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
     280 |         ctx->revision = readl(ctx->csr_base + RNG_EIP_REV);
         |                         ^
   8 errors generated.


vim +/writel +110 drivers/char/hw_random/xgene-rng.c

a91ae4eba9f9977 Feng Kan 2014-08-22  104  
a91ae4eba9f9977 Feng Kan 2014-08-22  105  /*
a91ae4eba9f9977 Feng Kan 2014-08-22  106   * Initialize or reinit free running oscillators (FROs)
a91ae4eba9f9977 Feng Kan 2014-08-22  107   */
a91ae4eba9f9977 Feng Kan 2014-08-22  108  static void xgene_rng_init_fro(struct xgene_rng_dev *ctx, u32 fro_val)
a91ae4eba9f9977 Feng Kan 2014-08-22  109  {
a91ae4eba9f9977 Feng Kan 2014-08-22 @110  	writel(fro_val, ctx->csr_base + RNG_FRODETUNE);
a91ae4eba9f9977 Feng Kan 2014-08-22  111  	writel(0x00000000, ctx->csr_base + RNG_ALARMMASK);
a91ae4eba9f9977 Feng Kan 2014-08-22  112  	writel(0x00000000, ctx->csr_base + RNG_ALARMSTOP);
a91ae4eba9f9977 Feng Kan 2014-08-22  113  	writel(0xFFFFFFFF, ctx->csr_base + RNG_FROENABLE);
a91ae4eba9f9977 Feng Kan 2014-08-22  114  }
a91ae4eba9f9977 Feng Kan 2014-08-22  115  
a91ae4eba9f9977 Feng Kan 2014-08-22  116  static void xgene_rng_chk_overflow(struct xgene_rng_dev *ctx)
a91ae4eba9f9977 Feng Kan 2014-08-22  117  {
a91ae4eba9f9977 Feng Kan 2014-08-22  118  	u32 val;
a91ae4eba9f9977 Feng Kan 2014-08-22  119  
a91ae4eba9f9977 Feng Kan 2014-08-22 @120  	val = readl(ctx->csr_base + RNG_INTR_STS_ACK);
a91ae4eba9f9977 Feng Kan 2014-08-22  121  	if (val & MONOBIT_FAIL_MASK)
a91ae4eba9f9977 Feng Kan 2014-08-22  122  		/*
a91ae4eba9f9977 Feng Kan 2014-08-22  123  		 * LFSR detected an out-of-bounds number of 1s after
a91ae4eba9f9977 Feng Kan 2014-08-22  124  		 * checking 20,000 bits (test T1 as specified in the
a91ae4eba9f9977 Feng Kan 2014-08-22  125  		 * AIS-31 standard)
a91ae4eba9f9977 Feng Kan 2014-08-22  126  		 */
a91ae4eba9f9977 Feng Kan 2014-08-22  127  		dev_err(ctx->dev, "test monobit failure error 0x%08X\n", val);
a91ae4eba9f9977 Feng Kan 2014-08-22  128  	if (val & POKER_FAIL_MASK)
a91ae4eba9f9977 Feng Kan 2014-08-22  129  		/*
a91ae4eba9f9977 Feng Kan 2014-08-22  130  		 * LFSR detected an out-of-bounds value in at least one
a91ae4eba9f9977 Feng Kan 2014-08-22  131  		 * of the 16 poker_count_X counters or an out of bounds sum
a91ae4eba9f9977 Feng Kan 2014-08-22  132  		 * of squares value after checking 20,000 bits (test T2 as
a91ae4eba9f9977 Feng Kan 2014-08-22  133  		 * specified in the AIS-31 standard)
a91ae4eba9f9977 Feng Kan 2014-08-22  134  		 */
a91ae4eba9f9977 Feng Kan 2014-08-22  135  		dev_err(ctx->dev, "test poker failure error 0x%08X\n", val);
a91ae4eba9f9977 Feng Kan 2014-08-22  136  	if (val & LONG_RUN_FAIL_MASK)
a91ae4eba9f9977 Feng Kan 2014-08-22  137  		/*
a91ae4eba9f9977 Feng Kan 2014-08-22  138  		 * LFSR detected a sequence of 34 identical bits
a91ae4eba9f9977 Feng Kan 2014-08-22  139  		 * (test T4 as specified in the AIS-31 standard)
a91ae4eba9f9977 Feng Kan 2014-08-22  140  		 */
a91ae4eba9f9977 Feng Kan 2014-08-22  141  		dev_err(ctx->dev, "test long run failure error 0x%08X\n", val);
a91ae4eba9f9977 Feng Kan 2014-08-22  142  	if (val & RUN_FAIL_MASK)
a91ae4eba9f9977 Feng Kan 2014-08-22  143  		/*
a91ae4eba9f9977 Feng Kan 2014-08-22  144  		 * LFSR detected an outof-bounds value for at least one
a91ae4eba9f9977 Feng Kan 2014-08-22  145  		 * of the running counters after checking 20,000 bits
a91ae4eba9f9977 Feng Kan 2014-08-22  146  		 * (test T3 as specified in the AIS-31 standard)
a91ae4eba9f9977 Feng Kan 2014-08-22  147  		 */
a91ae4eba9f9977 Feng Kan 2014-08-22  148  		dev_err(ctx->dev, "test run failure error 0x%08X\n", val);
a91ae4eba9f9977 Feng Kan 2014-08-22  149  	if (val & NOISE_FAIL_MASK)
a91ae4eba9f9977 Feng Kan 2014-08-22  150  		/* LFSR detected a sequence of 48 identical bits */
a91ae4eba9f9977 Feng Kan 2014-08-22  151  		dev_err(ctx->dev, "noise failure error 0x%08X\n", val);
a91ae4eba9f9977 Feng Kan 2014-08-22  152  	if (val & STUCK_OUT_MASK)
a91ae4eba9f9977 Feng Kan 2014-08-22  153  		/*
a91ae4eba9f9977 Feng Kan 2014-08-22  154  		 * Detected output data registers generated same value twice
a91ae4eba9f9977 Feng Kan 2014-08-22  155  		 * in a row
a91ae4eba9f9977 Feng Kan 2014-08-22  156  		 */
a91ae4eba9f9977 Feng Kan 2014-08-22  157  		dev_err(ctx->dev, "stuck out failure error 0x%08X\n", val);
a91ae4eba9f9977 Feng Kan 2014-08-22  158  
a91ae4eba9f9977 Feng Kan 2014-08-22  159  	if (val & SHUTDOWN_OFLO_MASK) {
a91ae4eba9f9977 Feng Kan 2014-08-22  160  		u32 frostopped;
a91ae4eba9f9977 Feng Kan 2014-08-22  161  
a91ae4eba9f9977 Feng Kan 2014-08-22  162  		/* FROs shut down after a second error event. Try recover. */
a91ae4eba9f9977 Feng Kan 2014-08-22  163  		if (++ctx->failure_cnt == 1) {
a91ae4eba9f9977 Feng Kan 2014-08-22  164  			/* 1st time, just recover */
a91ae4eba9f9977 Feng Kan 2014-08-22  165  			ctx->failure_ts = jiffies;
a91ae4eba9f9977 Feng Kan 2014-08-22  166  			frostopped = readl(ctx->csr_base + RNG_ALARMSTOP);
a91ae4eba9f9977 Feng Kan 2014-08-22  167  			xgene_rng_init_fro(ctx, frostopped);
a91ae4eba9f9977 Feng Kan 2014-08-22  168  
a91ae4eba9f9977 Feng Kan 2014-08-22  169  			/*
a91ae4eba9f9977 Feng Kan 2014-08-22  170  			 * We must start a timer to clear out this error
a91ae4eba9f9977 Feng Kan 2014-08-22  171  			 * in case the system timer wrap around
a91ae4eba9f9977 Feng Kan 2014-08-22  172  			 */
a91ae4eba9f9977 Feng Kan 2014-08-22  173  			xgene_rng_start_timer(ctx);
a91ae4eba9f9977 Feng Kan 2014-08-22  174  		} else {
a91ae4eba9f9977 Feng Kan 2014-08-22  175  			/* 2nd time failure in lesser than 1 minute? */
a91ae4eba9f9977 Feng Kan 2014-08-22  176  			if (time_after(ctx->failure_ts + 60 * HZ, jiffies)) {
a91ae4eba9f9977 Feng Kan 2014-08-22  177  				dev_err(ctx->dev,
a91ae4eba9f9977 Feng Kan 2014-08-22  178  					"FRO shutdown failure error 0x%08X\n",
a91ae4eba9f9977 Feng Kan 2014-08-22  179  					val);
a91ae4eba9f9977 Feng Kan 2014-08-22  180  			} else {
a91ae4eba9f9977 Feng Kan 2014-08-22  181  				/* 2nd time failure after 1 minutes, recover */
a91ae4eba9f9977 Feng Kan 2014-08-22  182  				ctx->failure_ts = jiffies;
a91ae4eba9f9977 Feng Kan 2014-08-22  183  				ctx->failure_cnt = 1;
a91ae4eba9f9977 Feng Kan 2014-08-22  184  				/*
a91ae4eba9f9977 Feng Kan 2014-08-22  185  				 * We must start a timer to clear out this
a91ae4eba9f9977 Feng Kan 2014-08-22  186  				 * error in case the system timer wrap
a91ae4eba9f9977 Feng Kan 2014-08-22  187  				 * around
a91ae4eba9f9977 Feng Kan 2014-08-22  188  				 */
a91ae4eba9f9977 Feng Kan 2014-08-22  189  				xgene_rng_start_timer(ctx);
a91ae4eba9f9977 Feng Kan 2014-08-22  190  			}
a91ae4eba9f9977 Feng Kan 2014-08-22  191  			frostopped = readl(ctx->csr_base + RNG_ALARMSTOP);
a91ae4eba9f9977 Feng Kan 2014-08-22  192  			xgene_rng_init_fro(ctx, frostopped);
a91ae4eba9f9977 Feng Kan 2014-08-22  193  		}
a91ae4eba9f9977 Feng Kan 2014-08-22  194  	}
a91ae4eba9f9977 Feng Kan 2014-08-22  195  	/* Clear them all */
a91ae4eba9f9977 Feng Kan 2014-08-22  196  	writel(val, ctx->csr_base + RNG_INTR_STS_ACK);
a91ae4eba9f9977 Feng Kan 2014-08-22  197  }
a91ae4eba9f9977 Feng Kan 2014-08-22  198  

:::::: The code at line 110 was first introduced by commit
:::::: a91ae4eba9f9977863b57f2ac61e2e8e780375a8 hwrng: xgene - add support for APM X-Gene SoC RNG support

:::::: TO: Feng Kan <fkan@apm.com>
:::::: CC: Herbert Xu <herbert@gondor.apana.org.au>

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

             reply	other threads:[~2023-08-04 12:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-04 12:14 kernel test robot [this message]
2023-08-04 14:26 ` [herbert-cryptodev-2.6:master 83/83] drivers/char/hw_random/xgene-rng.c:110:2: error: call to undeclared function 'writel'; ISO C99 and later do not support implicit function declarations Rob Herring

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202308042049.8R2tNRoo-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=robh@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox