x86/irq: Build correct vector mapping for multiple MSI interrupts
x86/irq: Build correct vector mapping for multiple MSI interrupts

Alex Deucher, Mark Rustad and Alexander Holler reported a regression
with the latest v4.2-rc4 kernel, which breaks some SATA controllers.
With multi-MSI capable SATA controllers, only the first port works,
all other ports time out when executing SATA commands.

This happens because the first argument to assign_irq_vector_policy()
is always the base linux irq number of the multi MSI interrupt block,
so all subsequent vector assignments operate on the base linux irq
number, so all MSI irqs are handled as the first irq number. Therefor
the other MSI irqs of a device are never set up correctly and never
fire.

Add the loop iterator to the base irq number so all vectors are
assigned correctly.

Fixes: b5dc8e6c21e7 "x86/irq: Use hierarchical irqdomain to manage CPU interrupt vectors"
Reported-and-tested-by: Alex Deucher <bf84f557a1e54fd62cd73c6847f7d9df60e9fbef@gmail.com>
Reported-and-tested-by: Mark Rustad <420ab9db8acaad7f0b675a6bac03bcda5d176510@gmail.com>
Reported-and-tested-by: Alexander Holler <e50e5dcba9de73060be56c8db9158b6ae1eed0d9@ahsoftware.de>
Signed-off-by: Jiang Liu <68ee766e574f18b34b683085865827393efe88bd@linux.intel.com>
Cc: Tony Luck <e7984595ec0368ff920a7b3521dc7093683f6f26@intel.com>
Link: http://lkml.kernel.org/r/1439911228-9880-1-git-send-email-68ee766e574f18b34b683085865827393efe88bd@linux.intel.com
Signed-off-by: Thomas Gleixner <00e4cf8f46a57000a44449bf9dd8cbbcc209fd2a@linutronix.de>

KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs