mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 15:27:29 +00:00
powerpc: Fix MSI support on U4 bridge PCIe slot
On machines using the Apple U4 bridge (AKA IBM CPC945) PCIe interface such as the latest generation G5 machines x16 slot or the x16 slot of the PowerStation, MSIs are currently broken (and will oops when enabling). This fixes the oops and implements proper support for those. Instead of using the PCIe <-> HT bridge conversion, on such slots we need to use a bunch of magic registers in the bridge as the MSI target, encoding the interrupt number in the low bits of the address itself Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
This commit is contained in:
parent
bb7f20b1c6
commit
7a96c6b22e
2 changed files with 49 additions and 8 deletions
|
@ -39,7 +39,12 @@ static int mpic_msi_reserve_u3_hwirqs(struct mpic *mpic)
|
|||
|
||||
pr_debug("mpic: found U3, guessing msi allocator setup\n");
|
||||
|
||||
/* Reserve source numbers we know are reserved in the HW */
|
||||
/* Reserve source numbers we know are reserved in the HW.
|
||||
*
|
||||
* This is a bit of a mix of U3 and U4 reserves but that's going
|
||||
* to work fine, we have plenty enugh numbers left so let's just
|
||||
* mark anything we don't like reserved.
|
||||
*/
|
||||
for (i = 0; i < 8; i++)
|
||||
msi_bitmap_reserve_hwirq(&mpic->msi_bitmap, i);
|
||||
|
||||
|
@ -49,6 +54,10 @@ static int mpic_msi_reserve_u3_hwirqs(struct mpic *mpic)
|
|||
for (i = 100; i < 105; i++)
|
||||
msi_bitmap_reserve_hwirq(&mpic->msi_bitmap, i);
|
||||
|
||||
for (i = 124; i < mpic->irq_count; i++)
|
||||
msi_bitmap_reserve_hwirq(&mpic->msi_bitmap, i);
|
||||
|
||||
|
||||
np = NULL;
|
||||
while ((np = of_find_all_nodes(np))) {
|
||||
pr_debug("mpic: mapping hwirqs for %s\n", np->full_name);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue