]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/pnv/pci: Fix incorrect PE reservation attempt on some 64-bit BARs
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Fri, 8 Jul 2016 05:55:43 +0000 (15:55 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 9 Aug 2016 09:51:47 +0000 (19:51 +1000)
commit1af165f499d0115c7c6d2de13576e00257393bb9
treee75a9e3cebf119ca9987b05a0e5396044c27cd1c
parentd6bb47bdfe15edd6bf15a2afcdb8f5d089fdb0bd
powerpc/pnv/pci: Fix incorrect PE reservation attempt on some 64-bit BARs

The generic allocation code may sometimes decide to assign a prefetchable
64-bit BAR to the M32 window. In fact it may also decide to allocate
a 64-bit non-prefetchable BAR to the M64 one ! So using the resource
flags as a test to decide which window was used for PE allocation is
just wrong and leads to insane PE numbers.

Instead, compare the addresses to figure it out.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
[mpe: Rename the function as agreed by Ben & Gavin]
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/platforms/powernv/pci-ioda.c