]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/pseries: Round up MSI-X requests
authorAnton Blanchard <anton@samba.org>
Mon, 4 Jun 2012 16:47:03 +0000 (16:47 +0000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Fri, 7 Sep 2012 00:45:31 +0000 (10:45 +1000)
commit64ffa2bb4a45beec82e8c78cf226fc1a8bdc6ccd
tree3c580a585976bac22f248f2f74a7c3c34b6f4536
parent9c8d6f40e6c7b2c98cef095aed68a667dd8364e8
powerpc/pseries: Round up MSI-X requests

The pseries firmware currently refuses any non power of two MSI-X
request. Unfortunately most network drivers end up asking for that
because they want a power of two for RX queues and one or two extra
for everything else.

This patch rounds up the firmware request to the next power of two
if the quota allows it. If this fails we fall back to using the
original request size.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/platforms/pseries/msi.c