[mingo-tip:sched/headers 2200/2340] arch/mips/loongson32/common/irq.c:28:9: error: implicit declaration of function '__raw_writel'

From: kernel test robot
Date: Wed Feb 23 2022 - 17:00:56 EST


tree: git://git.kernel.org/pub/scm/linux/kernel/git/mingo/tip.git sched/headers
head: 97c5eeb4de3ad324ed2a4656b46465299cfd010a
commit: 3828a1a70a61b6a815d092a41ce8bc2af2eb3d92 [2200/2340] headers/deps: irq: Optimize <linux/interrupt.h> dependencies
config: mips-randconfig-r011-20220223 (https://download.01.org/0day-ci/archive/20220224/202202240535.jwayYeB6-lkp@xxxxxxxxx/config)
compiler: mipsel-linux-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://git.kernel.org/pub/scm/linux/kernel/git/mingo/tip.git/commit/?id=3828a1a70a61b6a815d092a41ce8bc2af2eb3d92
git remote add mingo-tip git://git.kernel.org/pub/scm/linux/kernel/git/mingo/tip.git
git fetch --no-tags mingo-tip sched/headers
git checkout 3828a1a70a61b6a815d092a41ce8bc2af2eb3d92
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=mips SHELL=/bin/bash arch/mips/loongson32/common/ lib/

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

All errors (new ones prefixed by >>):

arch/mips/loongson32/common/irq.c: In function 'ls1x_irq_ack':
>> arch/mips/loongson32/common/irq.c:28:9: error: implicit declaration of function '__raw_writel' [-Werror=implicit-function-declaration]
28 | __raw_writel(__raw_readl(LS1X_INTC_INTCLR(n))
| ^~~~~~~~~~~~
>> arch/mips/loongson32/common/irq.c:28:22: error: implicit declaration of function '__raw_readl'; did you mean '__raw_emt'? [-Werror=implicit-function-declaration]
28 | __raw_writel(__raw_readl(LS1X_INTC_INTCLR(n))
| ^~~~~~~~~~~
| __raw_emt
arch/mips/loongson32/common/irq.c: At top level:
arch/mips/loongson32/common/irq.c:152:20: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'ls1x_irq_init'
152 | static void __init ls1x_irq_init(int base)
| ^~~~~~~~~~~~~
arch/mips/loongson32/common/irq.c:187:13: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'arch_init_irq'
187 | void __init arch_init_irq(void)
| ^~~~~~~~~~~~~
arch/mips/loongson32/common/irq.c:106:24: warning: 'ls1x_irq_chip' defined but not used [-Wunused-variable]
106 | static struct irq_chip ls1x_irq_chip = {
| ^~~~~~~~~~~~~
cc1: some warnings being treated as errors


vim +/__raw_writel +28 arch/mips/loongson32/common/irq.c

ca585cf9fb818b arch/mips/loongson1/common/irq.c Kelvin Cheung 2012-07-25 22
ca585cf9fb818b arch/mips/loongson1/common/irq.c Kelvin Cheung 2012-07-25 23 static void ls1x_irq_ack(struct irq_data *d)
ca585cf9fb818b arch/mips/loongson1/common/irq.c Kelvin Cheung 2012-07-25 24 {
ca585cf9fb818b arch/mips/loongson1/common/irq.c Kelvin Cheung 2012-07-25 25 unsigned int bit = (d->irq - LS1X_IRQ_BASE) & 0x1f;
ca585cf9fb818b arch/mips/loongson1/common/irq.c Kelvin Cheung 2012-07-25 26 unsigned int n = (d->irq - LS1X_IRQ_BASE) >> 5;
ca585cf9fb818b arch/mips/loongson1/common/irq.c Kelvin Cheung 2012-07-25 27
ca585cf9fb818b arch/mips/loongson1/common/irq.c Kelvin Cheung 2012-07-25 @28 __raw_writel(__raw_readl(LS1X_INTC_INTCLR(n))
ca585cf9fb818b arch/mips/loongson1/common/irq.c Kelvin Cheung 2012-07-25 29 | (1 << bit), LS1X_INTC_INTCLR(n));
ca585cf9fb818b arch/mips/loongson1/common/irq.c Kelvin Cheung 2012-07-25 30 }
ca585cf9fb818b arch/mips/loongson1/common/irq.c Kelvin Cheung 2012-07-25 31

:::::: The code at line 28 was first introduced by commit
:::::: ca585cf9fb818bfcfcac6968c2b242dcd0693b08 MIPS: Loongson 1B: Add board support

:::::: TO: Kelvin Cheung <keguang.zhang@xxxxxxxxx>
:::::: CC: Ralf Baechle <ralf@xxxxxxxxxxxxxx>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx