<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/arch/powerpc/kernel/eeh_pe.c, branch linux-4.14.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.14.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.14.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2019-12-01T08:13:18Z</updated>
<entry>
<title>powerpc/eeh: Fix use of EEH_PE_KEEP on wrong field</title>
<updated>2019-12-01T08:13:18Z</updated>
<author>
<name>Sam Bobroff</name>
</author>
<published>2018-09-12T01:23:22Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=484278a79fa5824c902a94a6bc18a8046ea9b952'/>
<id>urn:sha1:484278a79fa5824c902a94a6bc18a8046ea9b952</id>
<content type='text'>
[ Upstream commit 473af09b56dc4be68e4af33220ceca6be67aa60d ]

eeh_add_to_parent_pe() sometimes removes the EEH_PE_KEEP flag, but it
incorrectly removes it from pe-&gt;type, instead of pe-&gt;state.

However, rather than clearing it from the correct field, remove it.
Inspection of the code shows that it can't ever have had any effect
(even if it had been cleared from the correct field), because the
field is never tested after it is cleared by the statement in
question.

The clear statement was added by commit 807a827d4e74 ("powerpc/eeh:
Keep PE during hotplug"), but it didn't explain why it was necessary.

Signed-off-by: Sam Bobroff &lt;sbobroff@linux.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>powerpc/eeh: Fix enabling bridge MMIO windows</title>
<updated>2018-04-24T07:36:37Z</updated>
<author>
<name>Michael Neuling</name>
</author>
<published>2018-04-11T03:37:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=49a52f7d9274da3f32d7c3b51843fa44fffd2e55'/>
<id>urn:sha1:49a52f7d9274da3f32d7c3b51843fa44fffd2e55</id>
<content type='text'>
commit 13a83eac373c49c0a081cbcd137e79210fe78acd upstream.

On boot we save the configuration space of PCIe bridges. We do this so
when we get an EEH event and everything gets reset that we can restore
them.

Unfortunately we save this state before we've enabled the MMIO space
on the bridges. Hence if we have to reset the bridge when we come back
MMIO is not enabled and we end up taking an PE freeze when the driver
starts accessing again.

This patch forces the memory/MMIO and bus mastering on when restoring
bridges on EEH. Ideally we'd do this correctly by saving the
configuration space writes later, but that will have to come later in
a larger EEH rewrite. For now we have this simple fix.

The original bug can be triggered on a boston machine by doing:
  echo 0x8000000000000000 &gt; /sys/kernel/debug/powerpc/PCI0001/err_injct_outbound
On boston, this PHB has a PCIe switch on it.  Without this patch,
you'll see two EEH events, 1 expected and 1 the failure we are fixing
here. The second EEH event causes the anything under the PHB to
disappear (i.e. the i40e eth).

With this patch, only 1 EEH event occurs and devices properly recover.

Fixes: 652defed4875 ("powerpc/eeh: Check PCIe link after reset")
Cc: stable@vger.kernel.org # v3.11+
Reported-by: Pridhiviraj Paidipeddi &lt;ppaidipe@linux.vnet.ibm.com&gt;
Signed-off-by: Michael Neuling &lt;mikey@neuling.org&gt;
Acked-by: Russell Currey &lt;ruscur@russell.cc&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>powerpc/eeh: Remove unnecessary config_addr from eeh_dev</title>
<updated>2017-08-31T04:26:09Z</updated>
<author>
<name>Alexey Kardashevskiy</name>
</author>
<published>2017-08-29T07:34:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=405b33a76d26e426276c088b38dc7efba7538ff2'/>
<id>urn:sha1:405b33a76d26e426276c088b38dc7efba7538ff2</id>
<content type='text'>
The eeh_dev struct hold a config space address of an associated node
and the very same address is also stored in the pci_dn struct which
is always present during the eeh_dev lifetime.

This uses bus:devfn directly from pci_dn instead of cached and packed
config_addr.

Since config_addr is made from device's bus:dev.fn, there is no point
in keeping it in the debugfs either so remove that too.

Signed-off-by: Alexey Kardashevskiy &lt;aik@ozlabs.ru&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</content>
</entry>
<entry>
<title>powerpc/eeh: Remove unnecessary pointer to phb from eeh_dev</title>
<updated>2017-08-31T04:26:09Z</updated>
<author>
<name>Alexey Kardashevskiy</name>
</author>
<published>2017-08-29T07:34:01Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=69672bd7489f8a995e9cb89655dc1dcee555dadb'/>
<id>urn:sha1:69672bd7489f8a995e9cb89655dc1dcee555dadb</id>
<content type='text'>
The eeh_dev struct already holds a pointer to pci_dn which it does not
exist without and pci_dn itself holds the very same pointer so just
use it.

Signed-off-by: Alexey Kardashevskiy &lt;aik@ozlabs.ru&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</content>
</entry>
<entry>
<title>powerpc/eeh: Reduce to one the number of places where edev is allocated</title>
<updated>2017-08-31T04:26:08Z</updated>
<author>
<name>Alexey Kardashevskiy</name>
</author>
<published>2017-08-29T07:34:00Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8bae6a23198defc5576e4c6f1f97822883d705ae'/>
<id>urn:sha1:8bae6a23198defc5576e4c6f1f97822883d705ae</id>
<content type='text'>
arch/powerpc/kernel/eeh_dev.c:57 is the only legit place where edev
is allocated; other 2 places allocate it on stack and in the heap for
a very short period of time to use eeh_pe_get() as takes edev.

This changes eeh_pe_get() to receive required parameters explicitly.

This removes unnecessary temporary allocation of edev.

This uses the "pe_no" name instead of the "pe_config_addr" name as
it actually is a PE number and not a config space address as it seemed.

Signed-off-by: Alexey Kardashevskiy &lt;aik@ozlabs.ru&gt;
Reviewed-by: Andrew Donnellan &lt;andrew.donnellan@au1.ibm.com&gt;
Acked-by: Russell Currey &lt;ruscur@russell.cc&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</content>
</entry>
<entry>
<title>powerpc/pci: Always print PHB and PE numbers as hexadecimal</title>
<updated>2016-11-22T00:57:07Z</updated>
<author>
<name>Russell Currey</name>
</author>
<published>2016-11-16T03:02:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1f52f1761456c919814c995710153a8f878353df'/>
<id>urn:sha1:1f52f1761456c919814c995710153a8f878353df</id>
<content type='text'>
PHB, PE (and by association MVE) numbers are printed as a mix of decimal
and hexadecimal throughout the kernel.  This can be misleading, so make
them all hexadecimal.

Standardising on hex instead of dec because:

 - PHB numbers are presented in hex in sysfs/debugfs (and lspci, etc)
 - PE numbers are presented as hex in sysfs and parsed in hex in debugfs

The only place I think this could cause confusing are the messages during
boot, i.e.

	pci 000a:01     : [PE# 000] Secondary bus 1 associated with PE#0

which can be a quick way to check PE numbers.  pe_level_printk() will
only print two characters instead of three, so the above would be

	pci 000a:01     : [PE# 00] Secondary bus 1 associated with PE#0

which gives a hint it's in hex.

Signed-off-by: Russell Currey &lt;ruscur@russell.cc&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</content>
</entry>
<entry>
<title>powerpc/eeh: Export eeh_pe_state_mark()</title>
<updated>2016-09-29T04:51:04Z</updated>
<author>
<name>Gavin Shan</name>
</author>
<published>2016-09-28T04:34:55Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e0056b0a1206a423b5cfb67d79e4e85e1243f413'/>
<id>urn:sha1:e0056b0a1206a423b5cfb67d79e4e85e1243f413</id>
<content type='text'>
This exports eeh_pe_state_mark(). It will be used to mark the surprise
hot removed PE as isolated to avoid unexpected EEH error reporting in
surprise remove path.

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 misleading indentation</title>
<updated>2016-04-26T23:19:37Z</updated>
<author>
<name>Andrew Donnellan</name>
</author>
<published>2016-04-26T05:02:50Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2d5217840ff1d0cf0f88201a922ab35bd083f7fb'/>
<id>urn:sha1:2d5217840ff1d0cf0f88201a922ab35bd083f7fb</id>
<content type='text'>
Found by smatch.

Signed-off-by: Andrew Donnellan &lt;andrew.donnellan@au1.ibm.com&gt;
Acked-by: Russell Currey &lt;ruscur@russell.cc&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</content>
</entry>
<entry>
<title>powerpc/eeh: Create PE for VFs</title>
<updated>2016-03-08T22:58:19Z</updated>
<author>
<name>Wei Yang</name>
</author>
<published>2016-03-03T23:53:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c29fa27d26e3189009ba42786f0c0dce14a90940'/>
<id>urn:sha1:c29fa27d26e3189009ba42786f0c0dce14a90940</id>
<content type='text'>
This creates PEs for VFs in the weak function pcibios_bus_add_device().
Those PEs for VFs are identified with newly introduced flag EEH_PE_VF
so that we treat them differently during EEH recovery.

Signed-off-by: Wei Yang &lt;weiyang@linux.vnet.ibm.com&gt;
Acked-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: Reworked eeh_pe_bus_get()</title>
<updated>2016-03-08T22:57:46Z</updated>
<author>
<name>Gavin Shan</name>
</author>
<published>2016-02-09T04:50:23Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=4eb0799ff93b54dd40c0c5bb06f60f1eb015635b'/>
<id>urn:sha1:4eb0799ff93b54dd40c0c5bb06f60f1eb015635b</id>
<content type='text'>
The original implementation is ugly: unnecessary if statements and
"out" tag. This reworks the function to avoid above weaknesses. No
functional changes introduced.

Signed-off-by: Gavin Shan &lt;gwshan@linux.vnet.ibm.com&gt;
Reviewed-by: Andrew Donnellan &lt;andrew.donnellan@au1.ibm.com&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
</content>
</entry>
</feed>
