<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/arch/powerpc/include/asm/eeh.h, branch linux-4.1.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.1.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.1.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2016-03-04T15:25:46Z</updated>
<entry>
<title>powerpc/eeh: Fix build error caused by pci_dn</title>
<updated>2016-03-04T15:25:46Z</updated>
<author>
<name>Gavin Shan</name>
</author>
<published>2016-03-01T05:02:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=35cc814663e4f3515fb6bae8a3b5c188aa2b6f89'/>
<id>urn:sha1:35cc814663e4f3515fb6bae8a3b5c188aa2b6f89</id>
<content type='text'>
eeh.h could be included when we have following condition. Then we
run into build error as below: (CONFIG_PPC64 &amp;&amp; !CONFIG_EEH) ||
(!CONFIG_PPC64 &amp;&amp; !CONFIG_EEH)

In file included from arch/powerpc/kernel/of_platform.c:30:0:
./arch/powerpc/include/asm/eeh.h:344:48: error: ‘struct pci_dn’ \
declared inside parameter list [-Werror]
    :
In file included from arch/powerpc/mm/hash_utils_64.c:49:0:
./arch/powerpc/include/asm/eeh.h:344:48: error: ‘struct pci_dn’ \
declared inside parameter list [-Werror]

This fixes the issue by replacing those empty inline functions
with macro so that we don't rely on @pci_dn when CONFIG_EEH is
disabled.

Cc: stable@vger.kernel.org # v4.1+
Fixes: ff57b45 ("powerpc/eeh: Do probe on pci_dn")
Reported-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Signed-off-by: Gavin Shan &lt;gwshan@linux.vnet.ibm.com&gt;
Signed-off-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
</content>
</entry>
<entry>
<title>powerpc/eeh: Fix stale cached primary bus</title>
<updated>2016-03-04T15:25:43Z</updated>
<author>
<name>Gavin Shan</name>
</author>
<published>2016-02-09T04:50:21Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=712394523149ed77377fcc9a264ac35245bd16a3'/>
<id>urn:sha1:712394523149ed77377fcc9a264ac35245bd16a3</id>
<content type='text'>
[ Upstream commit 05ba75f848647135f063199dc0e9f40fee769724 ]

When PE is created, its primary bus is cached to pe-&gt;bus. At later
point, the cached primary bus is returned from eeh_pe_bus_get().
However, we could get stale cached primary bus and run into kernel
crash in one case: full hotplug as part of fenced PHB error recovery
releases all PCI busses under the PHB at unplugging time and recreate
them at plugging time. pe-&gt;bus is still dereferencing the PCI bus
that was released.

This adds another PE flag (EEH_PE_PRI_BUS) to represent the validity
of pe-&gt;bus. pe-&gt;bus is updated when its first child EEH device is
online and the flag is set. Before unplugging in full hotplug for
error recovery, the flag is cleared.

Fixes: 8cdb2833 ("powerpc/eeh: Trace PCI bus from PE")
Cc: stable@vger.kernel.org #v3.11+
Reported-by: Andrew Donnellan &lt;andrew.donnellan@au1.ibm.com&gt;
Reported-by: Pradipta Ghosh &lt;pradghos@in.ibm.com&gt;
Signed-off-by: Gavin Shan &lt;gwshan@linux.vnet.ibm.com&gt;
Tested-by: Andrew Donnellan &lt;andrew.donnellan@au1.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Signed-off-by: Sasha Levin &lt;sasha.levin@oracle.com&gt;
</content>
</entry>
<entry>
<title>powerpc/eeh: Remove device_node dependency</title>
<updated>2015-03-24T02:15:53Z</updated>
<author>
<name>Gavin Shan</name>
</author>
<published>2015-03-17T05:15:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c6406d8fbb014bebdfb5bf3c244548958aec7379'/>
<id>urn:sha1:c6406d8fbb014bebdfb5bf3c244548958aec7379</id>
<content type='text'>
The patch removes struct eeh_dev::dn and the corresponding helper
functions: eeh_dev_to_of_node() and of_node_to_eeh_dev(). Instead,
eeh_dev_to_pdn() and pdn_to_eeh_dev() should be used to get the
pdn, which might contain device_node on PowerNV platform.

Signed-off-by: Gavin Shan &lt;gwshan@linux.vnet.ibm.com&gt;
Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
</content>
</entry>
<entry>
<title>powerpc/eeh: Replace device_node with pci_dn in eeh_ops</title>
<updated>2015-03-24T02:15:52Z</updated>
<author>
<name>Gavin Shan</name>
</author>
<published>2015-03-17T05:15:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0bd785873c6a6c9bd50d2ae19862f69ee5759fb9'/>
<id>urn:sha1:0bd785873c6a6c9bd50d2ae19862f69ee5759fb9</id>
<content type='text'>
There are 3 EEH operations whose arguments contain device_node:
read_config(), write_config() and restore_config(). The patch
replaces device_node with pci_dn.

Signed-off-by: Gavin Shan &lt;gwshan@linux.vnet.ibm.com&gt;
Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
</content>
</entry>
<entry>
<title>powerpc/eeh: Do probe on pci_dn</title>
<updated>2015-03-24T02:15:52Z</updated>
<author>
<name>Gavin Shan</name>
</author>
<published>2015-03-17T05:15:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ff57b454ddb938d98d48d8df356357000fedc88c'/>
<id>urn:sha1:ff57b454ddb938d98d48d8df356357000fedc88c</id>
<content type='text'>
Originally, EEH core probes on device_node or pci_dev to populate
EEH devices and PEs, which conflicts with the fact: SRIOV VFs are
usually enabled and created by PF's driver and they don't have the
corresponding device_nodes. Instead, SRIOV VFs have dynamically
created pci_dn, which can be used for EEH probe.

The patch reworks EEH probe for PowerNV and pSeries platforms to
do probing based on pci_dn, instead of pci_dev or device_node any
more.

Signed-off-by: Gavin Shan &lt;gwshan@linux.vnet.ibm.com&gt;
Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
</content>
</entry>
<entry>
<title>powerpc/eeh: Create eeh_dev from pci_dn instead of device_node</title>
<updated>2015-03-24T02:15:51Z</updated>
<author>
<name>Gavin Shan</name>
</author>
<published>2015-03-17T05:15:05Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e8e9b34cef237d4d6fdc0d350cd8a95d1adb9ee9'/>
<id>urn:sha1:e8e9b34cef237d4d6fdc0d350cd8a95d1adb9ee9</id>
<content type='text'>
The patch adds function traverse_pci_dn(), which is similar to
traverse_pci_devices() except it takes pci_dn, not device_node
as parameter. The pci_dev.c has been reworked to create eeh_dev
from pci_dn, instead of device_node.

Signed-off-by: Gavin Shan &lt;gwshan@linux.vnet.ibm.com&gt;
Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
</content>
</entry>
<entry>
<title>powerpc/eeh: Allow to set maximal frozen times</title>
<updated>2015-01-23T03:02:54Z</updated>
<author>
<name>Gavin Shan</name>
</author>
<published>2014-12-11T03:28:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1b28f170d99170a1fdd22818a9610a73196b391d'/>
<id>urn:sha1:1b28f170d99170a1fdd22818a9610a73196b391d</id>
<content type='text'>
When PE's frozen count hits maximal allowed frozen times, which is
5 currently, it will be forced to be offline permanently. Once the
PE is removed permanently, rebooting machine is required to bring
the PE back. It's not convienent when testing EEH functionality.

The patch exports the maximal allowed frozen times through debugfs
entry (/sys/kernel/debug/powerpc/eeh_max_freezes).

Requested-by: Ryan Grimm &lt;grimm@linux.vnet.ibm.com&gt;
Signed-off-by: Gavin Shan &lt;gwshan@linux.vnet.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</content>
</entry>
<entry>
<title>powerpc/eeh: Introduce flag EEH_PE_REMOVED</title>
<updated>2015-01-23T03:02:53Z</updated>
<author>
<name>Gavin Shan</name>
</author>
<published>2014-12-11T03:28:55Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=432227e9077eec13b3caf3aec6087f94a2f4327f'/>
<id>urn:sha1:432227e9077eec13b3caf3aec6087f94a2f4327f</id>
<content type='text'>
The conditions that one specific PE's frozen count exceeds the maximal
allowed times (EEH_MAX_ALLOWED_FREEZES) and it's in isolated or recovery
state indicate the PE was removed permanently implicitly. The patch
introduces flag EEH_PE_REMOVED to indicate that explicitly so that we
don't depend on the fixed maximal allowed times, which can be varied as
we do in subsequent patch.

Flag EEH_PE_REMOVED is expected to be marked for the PE whose frozen
count exceeds the maximal allowed times, or just failed from recovery.

Requested-by: Ryan Grimm &lt;grimm@linux.vnet.ibm.com&gt;
Signed-off-by: Gavin Shan &lt;gwshan@linux.vnet.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</content>
</entry>
<entry>
<title>powerpc/eeh: Fix missed PE#0 on P7IOC</title>
<updated>2015-01-23T03:02:52Z</updated>
<author>
<name>Gavin Shan</name>
</author>
<published>2014-11-24T22:27:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2aa5cf9e48f2f39cc255f8e29964df3ff9ca017b'/>
<id>urn:sha1:2aa5cf9e48f2f39cc255f8e29964df3ff9ca017b</id>
<content type='text'>
PE#0 should be regarded as valid for P7IOC, while it's invalid for
PHB3. The patch adds flag EEH_VALID_PE_ZERO to differentiate those
two cases. Without the patch, we possibly see frozen PE#0 state is
cleared without EEH recovery taken on P7IOC as following kernel logs
indicate:

[root@ltcfbl8eb ~]# dmesg
       :
pci 0000:00     : [PE# 000] Secondary bus 0 associated with PE#0
pci 0000:01     : [PE# 001] Secondary bus 1 associated with PE#1
pci 0001:00     : [PE# 000] Secondary bus 0 associated with PE#0
pci 0001:01     : [PE# 001] Secondary bus 1 associated with PE#1
pci 0002:00     : [PE# 000] Secondary bus 0 associated with PE#0
pci 0002:01     : [PE# 001] Secondary bus 1 associated with PE#1
pci 0003:00     : [PE# 000] Secondary bus 0 associated with PE#0
pci 0003:01     : [PE# 001] Secondary bus 1 associated with PE#1
pci 0003:20     : [PE# 002] Secondary bus 32..63 associated with PE#2
       :
EEH: Clear non-existing PHB#3-PE#0
EEH: PHB location: U78AE.001.WZS00M9-P1-002

Signed-off-by: Gavin Shan &lt;gwshan@linux.vnet.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</content>
</entry>
<entry>
<title>powerpc/eeh: Dump PHB diag-data early</title>
<updated>2014-12-02T00:03:26Z</updated>
<author>
<name>Gavin Shan</name>
</author>
<published>2014-11-22T10:58:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a450e8f55a57d049ac3afe218f06567e12d6b4f5'/>
<id>urn:sha1:a450e8f55a57d049ac3afe218f06567e12d6b4f5</id>
<content type='text'>
On PowerNV platform, PHB diag-data is dumped after stopping device
drivers. In case of recursive EEH errors, the kernel is usually
crashed before dumping PHB diag-data for the second EEH error. It's
hard to locate the root cause of the second EEH error without PHB
diag-data.

The patch adds one more EEH option "eeh=early_log", which helps
dumping PHB diag-data immediately once frozen PE is detected, in
order to get the PHB diag-data for the second EEH error.

Signed-off-by: Gavin Shan &lt;gwshan@linux.vnet.ibm.com&gt;
Signed-off-by: Benjamin Herrenschmidt &lt;benh@kernel.crashing.org&gt;
</content>
</entry>
</feed>
