Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

powerpc/eeh: Disable EEH on reboot

We possiblly detect EEH errors during reboot, particularly in kexec
path, but it's impossible for device drivers and EEH core to handle
or recover them properly.

The patch registers one reboot notifier for EEH and disable EEH
subsystem during reboot. That means the EEH errors is going to be
cleared by hardware reset or second kernel during early stage of
PCI probe.

Signed-off-by: Gavin Shan <shangw@linux.vnet.ibm.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>

authored by

Gavin Shan and committed by
Benjamin Herrenschmidt
66f9af83 2ec5a0ad

+22 -1
+20
arch/powerpc/kernel/eeh.c
··· 28 28 #include <linux/pci.h> 29 29 #include <linux/proc_fs.h> 30 30 #include <linux/rbtree.h> 31 + #include <linux/reboot.h> 31 32 #include <linux/seq_file.h> 32 33 #include <linux/spinlock.h> 33 34 #include <linux/export.h> ··· 748 747 return -EEXIST; 749 748 } 750 749 750 + static int eeh_reboot_notifier(struct notifier_block *nb, 751 + unsigned long action, void *unused) 752 + { 753 + eeh_set_enable(false); 754 + return NOTIFY_DONE; 755 + } 756 + 757 + static struct notifier_block eeh_reboot_nb = { 758 + .notifier_call = eeh_reboot_notifier, 759 + }; 760 + 751 761 /** 752 762 * eeh_init - EEH initialization 753 763 * ··· 789 777 */ 790 778 if (machine_is(powernv) && cnt++ <= 0) 791 779 return ret; 780 + 781 + /* Register reboot notifier */ 782 + ret = register_reboot_notifier(&eeh_reboot_nb); 783 + if (ret) { 784 + pr_warn("%s: Failed to register notifier (%d)\n", 785 + __func__, ret); 786 + return ret; 787 + } 792 788 793 789 /* call platform initialization function */ 794 790 if (!eeh_ops) {
+2 -1
arch/powerpc/platforms/powernv/eeh-ioda.c
··· 44 44 45 45 /* We simply send special EEH event */ 46 46 if ((changed_evts & OPAL_EVENT_PCI_ERROR) && 47 - (events & OPAL_EVENT_PCI_ERROR)) 47 + (events & OPAL_EVENT_PCI_ERROR) && 48 + eeh_enabled()) 48 49 eeh_send_failure_event(NULL); 49 50 50 51 return 0;