diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-21 21:55:10 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-21 21:55:10 -0400 |
commit | 5375871d432ae9fc581014ac117b96aaee3cd0c7 (patch) | |
tree | be98e8255b0f927fb920fb532a598b93fa140dbe /arch/powerpc/platforms/pseries/eeh_event.c | |
parent | b57cb7231b2ce52d3dda14a7b417ae125fb2eb97 (diff) | |
parent | dfbc2d75c1bd47c3186fa91f1655ea2f3825b0ec (diff) |
Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
Pull powerpc merge from Benjamin Herrenschmidt:
"Here's the powerpc batch for this merge window. It is going to be a
bit more nasty than usual as in touching things outside of
arch/powerpc mostly due to the big iSeriesectomy :-) We finally got
rid of the bugger (legacy iSeries support) which was a PITA to
maintain and that nobody really used anymore.
Here are some of the highlights:
- Legacy iSeries is gone. Thanks Stephen ! There's still some bits
and pieces remaining if you do a grep -ir series arch/powerpc but
they are harmless and will be removed in the next few weeks
hopefully.
- The 'fadump' functionality (Firmware Assisted Dump) replaces the
previous (equivalent) "pHyp assisted dump"... it's a rewrite of a
mechanism to get the hypervisor to do crash dumps on pSeries, the
new implementation hopefully being much more reliable. Thanks
Mahesh Salgaonkar.
- The "EEH" code (pSeries PCI error handling & recovery) got a big
spring cleaning, motivated by the need to be able to implement a
new backend for it on top of some new different type of firwmare.
The work isn't complete yet, but a good chunk of the cleanups is
there. Note that this adds a field to struct device_node which is
not very nice and which Grant objects to. I will have a patch soon
that moves that to a powerpc private data structure (hopefully
before rc1) and we'll improve things further later on (hopefully
getting rid of the need for that pointer completely). Thanks Gavin
Shan.
- I dug into our exception & interrupt handling code to improve the
way we do lazy interrupt handling (and make it work properly with
"edge" triggered interrupt sources), and while at it found & fixed
a wagon of issues in those areas, including adding support for page
fault retry & fatal signals on page faults.
- Your usual random batch of small fixes & updates, including a bunch
of new embedded boards, both Freescale and APM based ones, etc..."
I fixed up some conflicts with the generalized irq-domain changes from
Grant Likely, hopefully correctly.
* 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (141 commits)
powerpc/ps3: Do not adjust the wrapper load address
powerpc: Remove the rest of the legacy iSeries include files
powerpc: Remove the remaining CONFIG_PPC_ISERIES pieces
init: Remove CONFIG_PPC_ISERIES
powerpc: Remove FW_FEATURE ISERIES from arch code
tty/hvc_vio: FW_FEATURE_ISERIES is no longer selectable
powerpc/spufs: Fix double unlocks
powerpc/5200: convert mpc5200 to use of_platform_populate()
powerpc/mpc5200: add options to mpc5200_defconfig
powerpc/mpc52xx: add a4m072 board support
powerpc/mpc5200: update mpc5200_defconfig to fit for charon board
Documentation/powerpc/mpc52xx.txt: Checkpatch cleanup
powerpc/44x: Add additional device support for APM821xx SoC and Bluestone board
powerpc/44x: Add support PCI-E for APM821xx SoC and Bluestone board
MAINTAINERS: Update PowerPC 4xx tree
powerpc/44x: The bug fixed support for APM821xx SoC and Bluestone board
powerpc: document the FSL MPIC message register binding
powerpc: add support for MPIC message register API
powerpc/fsl: Added aliased MSIIR register address to MSI node in dts
powerpc/85xx: mpc8548cds - add 36-bit dts
...
Diffstat (limited to 'arch/powerpc/platforms/pseries/eeh_event.c')
-rw-r--r-- | arch/powerpc/platforms/pseries/eeh_event.c | 55 |
1 files changed, 28 insertions, 27 deletions
diff --git a/arch/powerpc/platforms/pseries/eeh_event.c b/arch/powerpc/platforms/pseries/eeh_event.c index d2383cfb6dfd..4a4752565856 100644 --- a/arch/powerpc/platforms/pseries/eeh_event.c +++ b/arch/powerpc/platforms/pseries/eeh_event.c | |||
@@ -1,6 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * eeh_event.c | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify | 2 | * This program is free software; you can redistribute it and/or modify |
5 | * it under the terms of the GNU General Public License as published by | 3 | * it under the terms of the GNU General Public License as published by |
6 | * the Free Software Foundation; either version 2 of the License, or | 4 | * the Free Software Foundation; either version 2 of the License, or |
@@ -46,7 +44,7 @@ DECLARE_WORK(eeh_event_wq, eeh_thread_launcher); | |||
46 | DEFINE_MUTEX(eeh_event_mutex); | 44 | DEFINE_MUTEX(eeh_event_mutex); |
47 | 45 | ||
48 | /** | 46 | /** |
49 | * eeh_event_handler - dispatch EEH events. | 47 | * eeh_event_handler - Dispatch EEH events. |
50 | * @dummy - unused | 48 | * @dummy - unused |
51 | * | 49 | * |
52 | * The detection of a frozen slot can occur inside an interrupt, | 50 | * The detection of a frozen slot can occur inside an interrupt, |
@@ -58,10 +56,10 @@ DEFINE_MUTEX(eeh_event_mutex); | |||
58 | static int eeh_event_handler(void * dummy) | 56 | static int eeh_event_handler(void * dummy) |
59 | { | 57 | { |
60 | unsigned long flags; | 58 | unsigned long flags; |
61 | struct eeh_event *event; | 59 | struct eeh_event *event; |
62 | struct pci_dn *pdn; | 60 | struct eeh_dev *edev; |
63 | 61 | ||
64 | daemonize ("eehd"); | 62 | daemonize("eehd"); |
65 | set_current_state(TASK_INTERRUPTIBLE); | 63 | set_current_state(TASK_INTERRUPTIBLE); |
66 | 64 | ||
67 | spin_lock_irqsave(&eeh_eventlist_lock, flags); | 65 | spin_lock_irqsave(&eeh_eventlist_lock, flags); |
@@ -79,31 +77,37 @@ static int eeh_event_handler(void * dummy) | |||
79 | 77 | ||
80 | /* Serialize processing of EEH events */ | 78 | /* Serialize processing of EEH events */ |
81 | mutex_lock(&eeh_event_mutex); | 79 | mutex_lock(&eeh_event_mutex); |
82 | eeh_mark_slot(event->dn, EEH_MODE_RECOVERING); | 80 | edev = event->edev; |
81 | eeh_mark_slot(eeh_dev_to_of_node(edev), EEH_MODE_RECOVERING); | ||
83 | 82 | ||
84 | printk(KERN_INFO "EEH: Detected PCI bus error on device %s\n", | 83 | printk(KERN_INFO "EEH: Detected PCI bus error on device %s\n", |
85 | eeh_pci_name(event->dev)); | 84 | eeh_pci_name(edev->pdev)); |
85 | |||
86 | edev = handle_eeh_events(event); | ||
86 | 87 | ||
87 | pdn = handle_eeh_events(event); | 88 | eeh_clear_slot(eeh_dev_to_of_node(edev), EEH_MODE_RECOVERING); |
89 | pci_dev_put(edev->pdev); | ||
88 | 90 | ||
89 | eeh_clear_slot(event->dn, EEH_MODE_RECOVERING); | ||
90 | pci_dev_put(event->dev); | ||
91 | kfree(event); | 91 | kfree(event); |
92 | mutex_unlock(&eeh_event_mutex); | 92 | mutex_unlock(&eeh_event_mutex); |
93 | 93 | ||
94 | /* If there are no new errors after an hour, clear the counter. */ | 94 | /* If there are no new errors after an hour, clear the counter. */ |
95 | if (pdn && pdn->eeh_freeze_count>0) { | 95 | if (edev && edev->freeze_count>0) { |
96 | msleep_interruptible (3600*1000); | 96 | msleep_interruptible(3600*1000); |
97 | if (pdn->eeh_freeze_count>0) | 97 | if (edev->freeze_count>0) |
98 | pdn->eeh_freeze_count--; | 98 | edev->freeze_count--; |
99 | |||
99 | } | 100 | } |
100 | 101 | ||
101 | return 0; | 102 | return 0; |
102 | } | 103 | } |
103 | 104 | ||
104 | /** | 105 | /** |
105 | * eeh_thread_launcher | 106 | * eeh_thread_launcher - Start kernel thread to handle EEH events |
106 | * @dummy - unused | 107 | * @dummy - unused |
108 | * | ||
109 | * This routine is called to start the kernel thread for processing | ||
110 | * EEH event. | ||
107 | */ | 111 | */ |
108 | static void eeh_thread_launcher(struct work_struct *dummy) | 112 | static void eeh_thread_launcher(struct work_struct *dummy) |
109 | { | 113 | { |
@@ -112,18 +116,18 @@ static void eeh_thread_launcher(struct work_struct *dummy) | |||
112 | } | 116 | } |
113 | 117 | ||
114 | /** | 118 | /** |
115 | * eeh_send_failure_event - generate a PCI error event | 119 | * eeh_send_failure_event - Generate a PCI error event |
116 | * @dev pci device | 120 | * @edev: EEH device |
117 | * | 121 | * |
118 | * This routine can be called within an interrupt context; | 122 | * This routine can be called within an interrupt context; |
119 | * the actual event will be delivered in a normal context | 123 | * the actual event will be delivered in a normal context |
120 | * (from a workqueue). | 124 | * (from a workqueue). |
121 | */ | 125 | */ |
122 | int eeh_send_failure_event (struct device_node *dn, | 126 | int eeh_send_failure_event(struct eeh_dev *edev) |
123 | struct pci_dev *dev) | ||
124 | { | 127 | { |
125 | unsigned long flags; | 128 | unsigned long flags; |
126 | struct eeh_event *event; | 129 | struct eeh_event *event; |
130 | struct device_node *dn = eeh_dev_to_of_node(edev); | ||
127 | const char *location; | 131 | const char *location; |
128 | 132 | ||
129 | if (!mem_init_done) { | 133 | if (!mem_init_done) { |
@@ -135,15 +139,14 @@ int eeh_send_failure_event (struct device_node *dn, | |||
135 | } | 139 | } |
136 | event = kmalloc(sizeof(*event), GFP_ATOMIC); | 140 | event = kmalloc(sizeof(*event), GFP_ATOMIC); |
137 | if (event == NULL) { | 141 | if (event == NULL) { |
138 | printk (KERN_ERR "EEH: out of memory, event not handled\n"); | 142 | printk(KERN_ERR "EEH: out of memory, event not handled\n"); |
139 | return 1; | 143 | return 1; |
140 | } | 144 | } |
141 | 145 | ||
142 | if (dev) | 146 | if (edev->pdev) |
143 | pci_dev_get(dev); | 147 | pci_dev_get(edev->pdev); |
144 | 148 | ||
145 | event->dn = dn; | 149 | event->edev = edev; |
146 | event->dev = dev; | ||
147 | 150 | ||
148 | /* We may or may not be called in an interrupt context */ | 151 | /* We may or may not be called in an interrupt context */ |
149 | spin_lock_irqsave(&eeh_eventlist_lock, flags); | 152 | spin_lock_irqsave(&eeh_eventlist_lock, flags); |
@@ -154,5 +157,3 @@ int eeh_send_failure_event (struct device_node *dn, | |||
154 | 157 | ||
155 | return 0; | 158 | return 0; |
156 | } | 159 | } |
157 | |||
158 | /********************** END OF FILE ******************************/ | ||