[PATCH v2 09/44] powerpc/64s/pseries: machine check convert to use common event code
kbuild test robot
lkp at intel.com
Thu Aug 8 15:01:53 AEST 2019
Hi Nicholas,
I love your patch! Yet something to improve:
[auto build test ERROR on linus/master]
[cannot apply to v5.3-rc3 next-20190807]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Nicholas-Piggin/powerpc-64s-exception-cleanup-and-macrofiy/20190802-222211
config: powerpc-defconfig (attached as .config)
compiler: powerpc64-linux-gcc (GCC) 7.4.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=7.4.0 make.cross ARCH=powerpc
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp at intel.com>
All errors (new ones prefixed by >>):
arch/powerpc/platforms/pseries/ras.c: In function 'mce_handle_error':
>> arch/powerpc/platforms/pseries/ras.c:563:28: error: this statement may fall through [-Werror=implicit-fallthrough=]
mce_err.u.ue_error_type = MCE_UE_ERROR_IFETCH;
~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
arch/powerpc/platforms/pseries/ras.c:564:3: note: here
case MC_ERROR_UE_PAGE_TABLE_WALK_IFETCH:
^~~~
arch/powerpc/platforms/pseries/ras.c:565:28: error: this statement may fall through [-Werror=implicit-fallthrough=]
mce_err.u.ue_error_type = MCE_UE_ERROR_PAGE_TABLE_WALK_IFETCH;
~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/platforms/pseries/ras.c:566:3: note: here
case MC_ERROR_UE_LOAD_STORE:
^~~~
arch/powerpc/platforms/pseries/ras.c:567:28: error: this statement may fall through [-Werror=implicit-fallthrough=]
mce_err.u.ue_error_type = MCE_UE_ERROR_LOAD_STORE;
~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/platforms/pseries/ras.c:568:3: note: here
case MC_ERROR_UE_PAGE_TABLE_WALK_LOAD_STORE:
^~~~
arch/powerpc/platforms/pseries/ras.c:569:28: error: this statement may fall through [-Werror=implicit-fallthrough=]
mce_err.u.ue_error_type = MCE_UE_ERROR_PAGE_TABLE_WALK_LOAD_STORE;
~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/platforms/pseries/ras.c:570:3: note: here
case MC_ERROR_UE_INDETERMINATE:
^~~~
cc1: all warnings being treated as errors
vim +563 arch/powerpc/platforms/pseries/ras.c
496
497
498 static int mce_handle_error(struct pt_regs *regs, struct rtas_error_log *errp)
499 {
500 struct mce_error_info mce_err = { 0 };
501 unsigned long eaddr = 0, paddr = 0;
502 struct pseries_errorlog *pseries_log;
503 struct pseries_mc_errorlog *mce_log;
504 int disposition = rtas_error_disposition(errp);
505 int initiator = rtas_error_initiator(errp);
506 int severity = rtas_error_severity(errp);
507 u8 error_type, err_sub_type;
508
509 if (initiator == RTAS_INITIATOR_UNKNOWN)
510 mce_err.initiator = MCE_INITIATOR_UNKNOWN;
511 else if (initiator == RTAS_INITIATOR_CPU)
512 mce_err.initiator = MCE_INITIATOR_CPU;
513 else if (initiator == RTAS_INITIATOR_PCI)
514 mce_err.initiator = MCE_INITIATOR_PCI;
515 else if (initiator == RTAS_INITIATOR_ISA)
516 mce_err.initiator = MCE_INITIATOR_ISA;
517 else if (initiator == RTAS_INITIATOR_MEMORY)
518 mce_err.initiator = MCE_INITIATOR_MEMORY;
519 else if (initiator == RTAS_INITIATOR_POWERMGM)
520 mce_err.initiator = MCE_INITIATOR_POWERMGM;
521 else
522 mce_err.initiator = MCE_INITIATOR_UNKNOWN;
523
524 if (severity == RTAS_SEVERITY_NO_ERROR)
525 mce_err.severity = MCE_SEV_NO_ERROR;
526 else if (severity == RTAS_SEVERITY_EVENT)
527 mce_err.severity = MCE_SEV_WARNING;
528 else if (severity == RTAS_SEVERITY_WARNING)
529 mce_err.severity = MCE_SEV_WARNING;
530 else if (severity == RTAS_SEVERITY_ERROR_SYNC)
531 mce_err.severity = MCE_SEV_SEVERE;
532 else if (severity == RTAS_SEVERITY_ERROR)
533 mce_err.severity = MCE_SEV_SEVERE;
534 else if (severity == RTAS_SEVERITY_FATAL)
535 mce_err.severity = MCE_SEV_FATAL;
536 else
537 mce_err.severity = MCE_SEV_FATAL;
538
539 if (severity <= RTAS_SEVERITY_ERROR_SYNC)
540 mce_err.sync_error = true;
541 else
542 mce_err.sync_error = false;
543
544 mce_err.error_type = MCE_ERROR_TYPE_UNKNOWN;
545 mce_err.error_class = MCE_ECLASS_UNKNOWN;
546
547 if (!rtas_error_extended(errp))
548 goto out;
549
550 pseries_log = get_pseries_errorlog(errp, PSERIES_ELOG_SECT_ID_MCE);
551 if (pseries_log == NULL)
552 goto out;
553
554 mce_log = (struct pseries_mc_errorlog *)pseries_log->data;
555 error_type = mce_log->error_type;
556 err_sub_type = rtas_mc_error_sub_type(mce_log);
557
558 switch (mce_log->error_type) {
559 case MC_ERROR_TYPE_UE:
560 mce_err.error_type = MCE_ERROR_TYPE_UE;
561 switch (err_sub_type) {
562 case MC_ERROR_UE_IFETCH:
> 563 mce_err.u.ue_error_type = MCE_UE_ERROR_IFETCH;
564 case MC_ERROR_UE_PAGE_TABLE_WALK_IFETCH:
565 mce_err.u.ue_error_type = MCE_UE_ERROR_PAGE_TABLE_WALK_IFETCH;
566 case MC_ERROR_UE_LOAD_STORE:
567 mce_err.u.ue_error_type = MCE_UE_ERROR_LOAD_STORE;
568 case MC_ERROR_UE_PAGE_TABLE_WALK_LOAD_STORE:
569 mce_err.u.ue_error_type = MCE_UE_ERROR_PAGE_TABLE_WALK_LOAD_STORE;
570 case MC_ERROR_UE_INDETERMINATE:
571 default:
572 mce_err.u.ue_error_type = MCE_UE_ERROR_INDETERMINATE;
573 break;
574 }
575 if (mce_log->sub_err_type & UE_EFFECTIVE_ADDR_PROVIDED)
576 eaddr = be64_to_cpu(mce_log->effective_address);
577
578 if (mce_log->sub_err_type & UE_LOGICAL_ADDR_PROVIDED) {
579 paddr = be64_to_cpu(mce_log->logical_address);
580 } else if (mce_log->sub_err_type & UE_EFFECTIVE_ADDR_PROVIDED) {
581 unsigned long pfn;
582
583 pfn = addr_to_pfn(regs, eaddr);
584 if (pfn != ULONG_MAX)
585 paddr = pfn << PAGE_SHIFT;
586 }
587
588
589 break;
590 case MC_ERROR_TYPE_SLB:
591 mce_err.error_type = MCE_ERROR_TYPE_SLB;
592 switch (err_sub_type) {
593 case MC_ERROR_SLB_PARITY:
594 mce_err.u.slb_error_type = MCE_SLB_ERROR_PARITY;
595 break;
596 case MC_ERROR_SLB_MULTIHIT:
597 mce_err.u.slb_error_type = MCE_SLB_ERROR_MULTIHIT;
598 break;
599 case MC_ERROR_SLB_INDETERMINATE:
600 default:
601 mce_err.u.slb_error_type = MCE_SLB_ERROR_INDETERMINATE;
602 break;
603 }
604 if (mce_log->sub_err_type & 0x80)
605 eaddr = be64_to_cpu(mce_log->effective_address);
606 break;
607 case MC_ERROR_TYPE_ERAT:
608 mce_err.error_type = MCE_ERROR_TYPE_ERAT;
609 switch (err_sub_type) {
610 case MC_ERROR_ERAT_PARITY:
611 mce_err.u.erat_error_type = MCE_ERAT_ERROR_PARITY;
612 break;
613 case MC_ERROR_ERAT_MULTIHIT:
614 mce_err.u.erat_error_type = MCE_ERAT_ERROR_MULTIHIT;
615 break;
616 case MC_ERROR_ERAT_INDETERMINATE:
617 default:
618 mce_err.u.erat_error_type = MCE_ERAT_ERROR_INDETERMINATE;
619 break;
620 }
621 if (mce_log->sub_err_type & 0x80)
622 eaddr = be64_to_cpu(mce_log->effective_address);
623 break;
624 case MC_ERROR_TYPE_TLB:
625 mce_err.error_type = MCE_ERROR_TYPE_TLB;
626 switch (err_sub_type) {
627 case MC_ERROR_TLB_PARITY:
628 mce_err.u.tlb_error_type = MCE_TLB_ERROR_PARITY;
629 break;
630 case MC_ERROR_TLB_MULTIHIT:
631 mce_err.u.tlb_error_type = MCE_TLB_ERROR_MULTIHIT;
632 break;
633 case MC_ERROR_TLB_INDETERMINATE:
634 default:
635 mce_err.u.tlb_error_type = MCE_TLB_ERROR_INDETERMINATE;
636 break;
637 }
638 if (mce_log->sub_err_type & 0x80)
639 eaddr = be64_to_cpu(mce_log->effective_address);
640 break;
641 case MC_ERROR_TYPE_D_CACHE:
642 mce_err.error_type = MCE_ERROR_TYPE_DCACHE;
643 break;
644 case MC_ERROR_TYPE_I_CACHE:
645 mce_err.error_type = MCE_ERROR_TYPE_DCACHE;
646 break;
647 case MC_ERROR_TYPE_UNKNOWN:
648 default:
649 mce_err.error_type = MCE_ERROR_TYPE_UNKNOWN;
650 break;
651 }
652
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 25337 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20190808/56dd332a/attachment-0001.gz>
More information about the Linuxppc-dev
mailing list