From: kernel test robot <lkp@intel.com>
To: Alexey Kardashevskiy <aik@ozlabs.ru>, linuxppc-dev@lists.ozlabs.org
Cc: Alexey Kardashevskiy <aik@ozlabs.ru>,
clang-built-linux@googlegroups.com, kbuild-all@lists.01.org,
Nicholas Piggin <npiggin@gmail.com>
Subject: Re: [PATCH kernel] powerpc/kuap: Restore AMR after replaying soft interrupts
Date: Thu, 3 Dec 2020 02:08:12 +0800 [thread overview]
Message-ID: <202012030221.piDGNOKp-lkp@intel.com> (raw)
In-Reply-To: <20201202010952.7157-1-aik@ozlabs.ru>
[-- Attachment #1: Type: text/plain, Size: 12052 bytes --]
Hi Alexey,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on powerpc/next]
[also build test ERROR on linus/master v5.10-rc6 next-20201201]
[cannot apply to scottwood/next]
[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/0day-ci/linux/commits/Alexey-Kardashevskiy/powerpc-kuap-Restore-AMR-after-replaying-soft-interrupts/20201202-094132
base: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next
config: powerpc64-randconfig-r024-20201202 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 2671fccf0381769276ca8246ec0499adcb9b0355)
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 powerpc64 cross compiling tool for clang build
# apt-get install binutils-powerpc64-linux-gnu
# https://github.com/0day-ci/linux/commit/6b38a9b10a8384beeaa820e1c935cc4cabdb951e
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Alexey-Kardashevskiy/powerpc-kuap-Restore-AMR-after-replaying-soft-interrupts/20201202-094132
git checkout 6b38a9b10a8384beeaa820e1c935cc4cabdb951e
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc64
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 >>):
In file included from arch/powerpc/kernel/irq.c:31:
In file included from include/linux/kernel_stat.h:9:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:604:
arch/powerpc/include/asm/io-defs.h:45:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insw, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:100:1: note: expanded from here
__do_insw
^
arch/powerpc/include/asm/io.h:542:56: note: expanded from macro '__do_insw'
#define __do_insw(p, b, n) readsw((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from arch/powerpc/kernel/irq.c:31:
In file included from include/linux/kernel_stat.h:9:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:604:
arch/powerpc/include/asm/io-defs.h:47:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(insl, (unsigned long p, void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:102:1: note: expanded from here
__do_insl
^
arch/powerpc/include/asm/io.h:543:56: note: expanded from macro '__do_insl'
#define __do_insl(p, b, n) readsl((PCI_IO_ADDR)_IO_BASE+(p), (b), (n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from arch/powerpc/kernel/irq.c:31:
In file included from include/linux/kernel_stat.h:9:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:604:
arch/powerpc/include/asm/io-defs.h:49:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsb, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:104:1: note: expanded from here
__do_outsb
^
arch/powerpc/include/asm/io.h:544:58: note: expanded from macro '__do_outsb'
#define __do_outsb(p, b, n) writesb((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from arch/powerpc/kernel/irq.c:31:
In file included from include/linux/kernel_stat.h:9:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:604:
arch/powerpc/include/asm/io-defs.h:51:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsw, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:106:1: note: expanded from here
__do_outsw
^
arch/powerpc/include/asm/io.h:545:58: note: expanded from macro '__do_outsw'
#define __do_outsw(p, b, n) writesw((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
In file included from arch/powerpc/kernel/irq.c:31:
In file included from include/linux/kernel_stat.h:9:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:10:
In file included from arch/powerpc/include/asm/hardirq.h:6:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/powerpc/include/asm/io.h:604:
arch/powerpc/include/asm/io-defs.h:53:1: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
DEF_PCI_AC_NORET(outsl, (unsigned long p, const void *b, unsigned long c),
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/include/asm/io.h:601:3: note: expanded from macro 'DEF_PCI_AC_NORET'
__do_##name al; \
^~~~~~~~~~~~~~
<scratch space>:108:1: note: expanded from here
__do_outsl
^
arch/powerpc/include/asm/io.h:546:58: note: expanded from macro '__do_outsl'
#define __do_outsl(p, b, n) writesl((PCI_IO_ADDR)_IO_BASE+(p),(b),(n))
~~~~~~~~~~~~~~~~~~~~~^
>> arch/powerpc/kernel/irq.c:224:29: error: implicit declaration of function 'get_kuap' [-Werror,-Wimplicit-function-declaration]
unsigned long kuap_state = get_kuap();
^
>> arch/powerpc/kernel/irq.c:313:2: error: implicit declaration of function 'set_kuap' [-Werror,-Wimplicit-function-declaration]
set_kuap(kuap_state);
^
arch/powerpc/kernel/irq.c:313:2: note: did you mean 'get_kuap'?
arch/powerpc/kernel/irq.c:224:29: note: 'get_kuap' declared here
unsigned long kuap_state = get_kuap();
^
12 warnings and 2 errors generated.
vim +/get_kuap +224 arch/powerpc/kernel/irq.c
214
215 void replay_soft_interrupts(void)
216 {
217 /*
218 * We use local_paca rather than get_paca() to avoid all
219 * the debug_smp_processor_id() business in this low level
220 * function
221 */
222 unsigned char happened = local_paca->irq_happened;
223 struct pt_regs regs;
> 224 unsigned long kuap_state = get_kuap();
225
226 ppc_save_regs(®s);
227 regs.softe = IRQS_ENABLED;
228
229 again:
230 if (IS_ENABLED(CONFIG_PPC_IRQ_SOFT_MASK_DEBUG))
231 WARN_ON_ONCE(mfmsr() & MSR_EE);
232
233 if (happened & PACA_IRQ_HARD_DIS) {
234 /*
235 * We may have missed a decrementer interrupt if hard disabled.
236 * Check the decrementer register in case we had a rollover
237 * while hard disabled.
238 */
239 if (!(happened & PACA_IRQ_DEC)) {
240 if (decrementer_check_overflow())
241 happened |= PACA_IRQ_DEC;
242 }
243 }
244
245 /*
246 * Force the delivery of pending soft-disabled interrupts on PS3.
247 * Any HV call will have this side effect.
248 */
249 if (firmware_has_feature(FW_FEATURE_PS3_LV1)) {
250 u64 tmp, tmp2;
251 lv1_get_version_info(&tmp, &tmp2);
252 }
253
254 /*
255 * Check if an hypervisor Maintenance interrupt happened.
256 * This is a higher priority interrupt than the others, so
257 * replay it first.
258 */
259 if (IS_ENABLED(CONFIG_PPC_BOOK3S) && (happened & PACA_IRQ_HMI)) {
260 local_paca->irq_happened &= ~PACA_IRQ_HMI;
261 regs.trap = 0xe60;
262 handle_hmi_exception(®s);
263 if (!(local_paca->irq_happened & PACA_IRQ_HARD_DIS))
264 hard_irq_disable();
265 }
266
267 if (happened & PACA_IRQ_DEC) {
268 local_paca->irq_happened &= ~PACA_IRQ_DEC;
269 regs.trap = 0x900;
270 timer_interrupt(®s);
271 if (!(local_paca->irq_happened & PACA_IRQ_HARD_DIS))
272 hard_irq_disable();
273 }
274
275 if (happened & PACA_IRQ_EE) {
276 local_paca->irq_happened &= ~PACA_IRQ_EE;
277 regs.trap = 0x500;
278 do_IRQ(®s);
279 if (!(local_paca->irq_happened & PACA_IRQ_HARD_DIS))
280 hard_irq_disable();
281 }
282
283 if (IS_ENABLED(CONFIG_PPC_DOORBELL) && (happened & PACA_IRQ_DBELL)) {
284 local_paca->irq_happened &= ~PACA_IRQ_DBELL;
285 if (IS_ENABLED(CONFIG_PPC_BOOK3E))
286 regs.trap = 0x280;
287 else
288 regs.trap = 0xa00;
289 doorbell_exception(®s);
290 if (!(local_paca->irq_happened & PACA_IRQ_HARD_DIS))
291 hard_irq_disable();
292 }
293
294 /* Book3E does not support soft-masking PMI interrupts */
295 if (IS_ENABLED(CONFIG_PPC_BOOK3S) && (happened & PACA_IRQ_PMI)) {
296 local_paca->irq_happened &= ~PACA_IRQ_PMI;
297 regs.trap = 0xf00;
298 performance_monitor_exception(®s);
299 if (!(local_paca->irq_happened & PACA_IRQ_HARD_DIS))
300 hard_irq_disable();
301 }
302
303 happened = local_paca->irq_happened;
304 if (happened & ~PACA_IRQ_HARD_DIS) {
305 /*
306 * We are responding to the next interrupt, so interrupt-off
307 * latencies should be reset here.
308 */
309 trace_hardirqs_on();
310 trace_hardirqs_off();
311 goto again;
312 }
> 313 set_kuap(kuap_state);
314 }
315
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 23722 bytes --]
next prev parent reply other threads:[~2020-12-02 18:11 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-02 1:09 [PATCH kernel] powerpc/kuap: Restore AMR after replaying soft interrupts Alexey Kardashevskiy
2020-12-02 18:08 ` kernel test robot [this message]
-- strict thread matches above, loose matches on Subject: below --
2021-02-02 9:15 Alexey Kardashevskiy
2021-02-03 8:45 ` Michal Suchánek
2021-02-12 0:19 ` Michael Ellerman
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=202012030221.piDGNOKp-lkp@intel.com \
--to=lkp@intel.com \
--cc=aik@ozlabs.ru \
--cc=clang-built-linux@googlegroups.com \
--cc=kbuild-all@lists.01.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=npiggin@gmail.com \
/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;
as well as URLs for NNTP newsgroup(s).