[ammarfaizi2-block:crng/random/jd/not-zero-entropy 7/11] arch/arm/include/asm/timex.h:19:22: error: implicit declaration of function 'read_current_timer' is invalid in C99
From: kernel test robot
Date: Fri Apr 08 2022 - 21:58:01 EST
tree: https://github.com/ammarfaizi2/linux-block crng/random/jd/not-zero-entropy
head: ac7d8411f0216fe77e48592ed0ff2ccbd599d0de
commit: 5cde0b2eaaf94891163f14984697361fe51849e6 [7/11] arm: use sched_clock() for random_get_entropy() instead of zero
config: arm-randconfig-c002-20220408 (https://download.01.org/0day-ci/archive/20220409/202204090940.51vg3sZ7-lkp@xxxxxxxxx/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project c29a51b3a257908aebc01cd7c4655665db317d66)
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/ammarfaizi2/linux-block/commit/5cde0b2eaaf94891163f14984697361fe51849e6
git remote add ammarfaizi2-block https://github.com/ammarfaizi2/linux-block
git fetch --no-tags ammarfaizi2-block crng/random/jd/not-zero-entropy
git checkout 5cde0b2eaaf94891163f14984697361fe51849e6
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm prepare
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>
All errors (new ones prefixed by >>):
In file included from arch/arm/kernel/asm-offsets.c:11:
In file included from include/linux/sched.h:15:
In file included from include/linux/sem.h:5:
In file included from include/uapi/linux/sem.h:5:
In file included from include/linux/ipc.h:7:
In file included from include/linux/rhashtable-types.h:15:
In file included from include/linux/workqueue.h:9:
In file included from include/linux/timer.h:6:
In file included from include/linux/ktime.h:24:
In file included from include/linux/time.h:60:
In file included from include/linux/time32.h:13:
In file included from include/linux/timex.h:66:
>> arch/arm/include/asm/timex.h:19:22: error: implicit declaration of function 'read_current_timer' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
unsigned long ret = get_cycles();
^
arch/arm/include/asm/timex.h:15:37: note: expanded from macro 'get_cycles'
#define get_cycles() ({ cycles_t c; read_current_timer(&c) ? 0 : c; })
^
In file included from arch/arm/kernel/asm-offsets.c:11:
In file included from include/linux/sched.h:15:
In file included from include/linux/sem.h:5:
In file included from include/uapi/linux/sem.h:5:
In file included from include/linux/ipc.h:7:
In file included from include/linux/rhashtable-types.h:15:
In file included from include/linux/workqueue.h:9:
In file included from include/linux/timer.h:6:
In file included from include/linux/ktime.h:24:
In file included from include/linux/time.h:60:
In file included from include/linux/time32.h:13:
include/linux/timex.h:53:2: error: unterminated conditional directive
#ifndef _LINUX_TIMEX_H
^
In file included from arch/arm/kernel/asm-offsets.c:11:
In file included from include/linux/sched.h:15:
In file included from include/linux/sem.h:5:
In file included from include/uapi/linux/sem.h:5:
In file included from include/linux/ipc.h:7:
In file included from include/linux/rhashtable-types.h:15:
In file included from include/linux/workqueue.h:9:
In file included from include/linux/timer.h:6:
In file included from include/linux/ktime.h:25:
In file included from include/linux/jiffies.h:11:
include/linux/timex.h:53:2: error: unterminated conditional directive
#ifndef _LINUX_TIMEX_H
^
In file included from arch/arm/kernel/asm-offsets.c:12:
In file included from include/linux/mm.h:700:
In file included from include/linux/huge_mm.h:8:
In file included from include/linux/fs.h:33:
In file included from include/linux/percpu-rwsem.h:7:
In file included from include/linux/rcuwait.h:6:
In file included from include/linux/sched/signal.h:6:
include/linux/signal.h:97:11: warning: array index 3 is past the end of the array (which contains 2 elements) [-Warray-bounds]
return (set->sig[3] | set->sig[2] |
^ ~
arch/arm/include/asm/signal.h:17:2: note: array 'sig' declared here
unsigned long sig[_NSIG_WORDS];
^
In file included from arch/arm/kernel/asm-offsets.c:12:
In file included from include/linux/mm.h:700:
In file included from include/linux/huge_mm.h:8:
In file included from include/linux/fs.h:33:
In file included from include/linux/percpu-rwsem.h:7:
In file included from include/linux/rcuwait.h:6:
In file included from include/linux/sched/signal.h:6:
include/linux/signal.h:97:25: warning: array index 2 is past the end of the array (which contains 2 elements) [-Warray-bounds]
return (set->sig[3] | set->sig[2] |
^ ~
arch/arm/include/asm/signal.h:17:2: note: array 'sig' declared here
unsigned long sig[_NSIG_WORDS];
^
In file included from arch/arm/kernel/asm-offsets.c:12:
In file included from include/linux/mm.h:700:
In file included from include/linux/huge_mm.h:8:
In file included from include/linux/fs.h:33:
In file included from include/linux/percpu-rwsem.h:7:
In file included from include/linux/rcuwait.h:6:
In file included from include/linux/sched/signal.h:6:
include/linux/signal.h:113:11: warning: array index 3 is past the end of the array (which contains 2 elements) [-Warray-bounds]
return (set1->sig[3] == set2->sig[3]) &&
^ ~
arch/arm/include/asm/signal.h:17:2: note: array 'sig' declared here
unsigned long sig[_NSIG_WORDS];
^
In file included from arch/arm/kernel/asm-offsets.c:12:
In file included from include/linux/mm.h:700:
In file included from include/linux/huge_mm.h:8:
In file included from include/linux/fs.h:33:
In file included from include/linux/percpu-rwsem.h:7:
In file included from include/linux/rcuwait.h:6:
In file included from include/linux/sched/signal.h:6:
include/linux/signal.h:113:27: warning: array index 3 is past the end of the array (which contains 2 elements) [-Warray-bounds]
return (set1->sig[3] == set2->sig[3]) &&
^ ~
arch/arm/include/asm/signal.h:17:2: note: array 'sig' declared here
unsigned long sig[_NSIG_WORDS];
^
In file included from arch/arm/kernel/asm-offsets.c:12:
In file included from include/linux/mm.h:700:
In file included from include/linux/huge_mm.h:8:
In file included from include/linux/fs.h:33:
In file included from include/linux/percpu-rwsem.h:7:
In file included from include/linux/rcuwait.h:6:
In file included from include/linux/sched/signal.h:6:
include/linux/signal.h:114:5: warning: array index 2 is past the end of the array (which contains 2 elements) [-Warray-bounds]
(set1->sig[2] == set2->sig[2]) &&
^ ~
arch/arm/include/asm/signal.h:17:2: note: array 'sig' declared here
unsigned long sig[_NSIG_WORDS];
^
In file included from arch/arm/kernel/asm-offsets.c:12:
In file included from include/linux/mm.h:700:
In file included from include/linux/huge_mm.h:8:
vim +/read_current_timer +19 arch/arm/include/asm/timex.h
16
17 static inline unsigned long random_get_entropy(void)
18 {
> 19 unsigned long ret = get_cycles();
20 if (ret)
21 return ret;
22 return sched_clock();
23 }
24 #define random_get_entropy random_get_entropy
25
--
0-DAY CI Kernel Test Service
https://01.org/lkp