]> www.infradead.org Git - users/jedix/linux-maple.git/commit
arch/sparc: Fix indexing msi_msiqid_table and msi_irq_table
authorBabu Moger <babu.moger@oracle.com>
Fri, 13 Jan 2017 17:49:23 +0000 (09:49 -0800)
committerChuck Anderson <chuck.anderson@oracle.com>
Thu, 9 Mar 2017 03:30:08 +0000 (19:30 -0800)
commitc37090dc6dd8440b9700f648e42968b5540efc2a
tree4354ca017f287d96f76738aab435281838999082
parent7a2b299839bf71185f6350add9cd7536849af06e
arch/sparc: Fix indexing msi_msiqid_table and msi_irq_table

Orabug: 25391918

Couple of indexing fixes.
1. Fix indexing pbm->msi_msiqid_table. It is initialized
   based off of pbm->msi_first(not pbm->msiq_first as previously done).
   Here is how it is initialized(Look at in sparc64_setup_msi_irq)
   pbm->msi_msiqid_table[msi - pbm->msi_first] = msiqid;

2. In set_related_affinity, we dont need to subtract msi_first as
   the loop is indexed from 0 to size of the table.

(cherry picked from uek2 commit 57d31847c9f2011314de8ea98c06616f91c5dbb8)

Signed-off-by: Babu Moger <babu.moger@oracle.com>
Tested-by: Dmitry Klochkov <dmitry.klochkov@oracle.com>
Signed-off-by: Allen Pais <allen.pais@oracle.com>
arch/sparc/kernel/pci_msi.c