* [asahilinux:gpu/rust-wip 31/408] drivers/soc/apple/rtkit-crashlog.c:130:21: error: use of undeclared identifier 'PSR_MODE_MASK'
@ 2023-01-21 15:18 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-01-21 15:18 UTC (permalink / raw)
To: Asahi Lina; +Cc: llvm, oe-kbuild-all
tree: https://github.com/AsahiLinux/linux gpu/rust-wip
head: 795db7e16a5eb642fbb1649baf22bdee9f1594c8
commit: decc95a7a22f8fa3676163d5ddaf54909ff02640 [31/408] soc: apple: rtkit: Add register dump decoding to crashlog
config: riscv-randconfig-r021-20230121 (https://download.01.org/0day-ci/archive/20230121/202301212316.LGptTQLA-lkp@intel.com/config)
compiler: clang version 16.0.0 (https://github.com/llvm/llvm-project 4196ca3278f78c6e19246e54ab0ecb364e37d66a)
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 riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
# https://github.com/AsahiLinux/linux/commit/decc95a7a22f8fa3676163d5ddaf54909ff02640
git remote add asahilinux https://github.com/AsahiLinux/linux
git fetch --no-tags asahilinux gpu/rust-wip
git checkout decc95a7a22f8fa3676163d5ddaf54909ff02640
# 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=riscv olddefconfig
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=riscv SHELL=/bin/bash drivers/soc/apple/
If you fix the issue, kindly add following tag where applicable
| Reported-by: kernel test robot <lkp@intel.com>
All errors (new ones prefixed by >>):
>> drivers/soc/apple/rtkit-crashlog.c:130:21: error: use of undeclared identifier 'PSR_MODE_MASK'
switch (regs.psr & PSR_MODE_MASK) {
^
>> drivers/soc/apple/rtkit-crashlog.c:131:8: error: use of undeclared identifier 'PSR_MODE_EL0t'
case PSR_MODE_EL0t:
^
>> drivers/soc/apple/rtkit-crashlog.c:134:8: error: use of undeclared identifier 'PSR_MODE_EL1t'
case PSR_MODE_EL1t:
^
>> drivers/soc/apple/rtkit-crashlog.c:137:8: error: use of undeclared identifier 'PSR_MODE_EL1h'
case PSR_MODE_EL1h:
^
>> drivers/soc/apple/rtkit-crashlog.c:140:8: error: use of undeclared identifier 'PSR_MODE_EL2t'
case PSR_MODE_EL2t:
^
>> drivers/soc/apple/rtkit-crashlog.c:143:8: error: use of undeclared identifier 'PSR_MODE_EL2h'
case PSR_MODE_EL2h:
^
6 errors generated.
vim +/PSR_MODE_MASK +130 drivers/soc/apple/rtkit-crashlog.c
115
116 static void apple_rtkit_crashlog_dump_regs(struct apple_rtkit *rtk, u8 *bfr,
117 size_t size)
118 {
119 struct apple_rtkit_crashlog_regs regs;
120 const char *el;
121 int i;
122
123 if (size < sizeof(regs)) {
124 dev_warn(rtk->dev, "RTKit: Regs section too small: 0x%lx", size);
125 return;
126 }
127
128 memcpy(®s, bfr, sizeof(regs));
129
> 130 switch (regs.psr & PSR_MODE_MASK) {
> 131 case PSR_MODE_EL0t:
132 el = "EL0t";
133 break;
> 134 case PSR_MODE_EL1t:
135 el = "EL1t";
136 break;
> 137 case PSR_MODE_EL1h:
138 el = "EL1h";
139 break;
> 140 case PSR_MODE_EL2t:
141 el = "EL2t";
142 break;
> 143 case PSR_MODE_EL2h:
144 el = "EL2h";
145 break;
146 default:
147 el = "unknown";
148 break;
149 }
150
151 dev_warn(rtk->dev, "RTKit: Exception dump:");
152 dev_warn(rtk->dev, " == Exception taken from %s ==", el);
153 dev_warn(rtk->dev, " PSR = 0x%llx", regs.psr);
154 dev_warn(rtk->dev, " PC = 0x%llx\n", regs.pc);
155 dev_warn(rtk->dev, " ESR = 0x%llx\n", regs.esr);
156 dev_warn(rtk->dev, " FAR = 0x%llx\n", regs.far);
157 dev_warn(rtk->dev, " SP = 0x%llx\n", regs.sp);
158 dev_warn(rtk->dev, "\n");
159
160 for (i = 0; i < 31; i += 4) {
161 if (i < 28)
162 dev_warn(rtk->dev,
163 " x%02d-x%02d = %016llx %016llx %016llx %016llx\n",
164 i, i + 3,
165 regs.regs[i], regs.regs[i + 1],
166 regs.regs[i + 2], regs.regs[i + 3]);
167 else
168 dev_warn(rtk->dev,
169 " x%02d-x%02d = %016llx %016llx %016llx\n", i, i + 3,
170 regs.regs[i], regs.regs[i + 1], regs.regs[i + 2]);
171 }
172
173 dev_warn(rtk->dev, "\n");
174 }
175
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2023-01-21 15:18 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-21 15:18 [asahilinux:gpu/rust-wip 31/408] drivers/soc/apple/rtkit-crashlog.c:130:21: error: use of undeclared identifier 'PSR_MODE_MASK' kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox