Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 112299 Details for
Bug 169622
sys-kernel/gentoo-sources-2.6.20 compatibility improvements for sparc64
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
of_device.patch.
of_device.patch (text/plain), 1.86 KB, created by
Gustavo Zacarias (RETIRED)
on 2007-03-06 15:58:38 UTC
(
hide
)
Description:
of_device.patch.
Filename:
MIME Type:
Creator:
Gustavo Zacarias (RETIRED)
Created:
2007-03-06 15:58:38 UTC
Size:
1.86 KB
patch
obsolete
>diff --git a/arch/sparc64/kernel/of_device.c b/arch/sparc64/kernel/of_device.c >index b0f3e00..ad74e5e 100644 >--- a/arch/sparc64/kernel/of_device.c >+++ b/arch/sparc64/kernel/of_device.c >@@ -708,7 +708,7 @@ static unsigned int __init pci_irq_swizzle(struct device_node *dp, > unsigned int irq) > { > struct linux_prom_pci_registers *regs; >- unsigned int devfn, slot, ret; >+ unsigned int bus, devfn, slot, ret; > > if (irq < 1 || irq > 4) > return irq; >@@ -717,10 +717,46 @@ static unsigned int __init pci_irq_swizzle(struct device_node *dp, > if (!regs) > return irq; > >+ bus = (regs->phys_hi >> 16) & 0xff; > devfn = (regs->phys_hi >> 8) & 0xff; > slot = (devfn >> 3) & 0x1f; > >- ret = ((irq - 1 + (slot & 3)) & 3) + 1; >+ if (pp->irq_trans) { >+ /* Derived from Table 8-3, U2P User's Manual. This branch >+ * is handling a PCI controller that lacks a proper set of >+ * interrupt-map and interrupt-map-mask properties. The >+ * Ultra-E450 is one example. >+ * >+ * The bit layout is BSSLL, where: >+ * B: 0 on bus A, 1 on bus B >+ * D: 2-bit slot number, derived from PCI device number as >+ * (dev - 1) for bus A, or (dev - 2) for bus B >+ * L: 2-bit line number >+ * >+ * Actually, more "portable" way to calculate the funky >+ * slot number is to subtract pbm->pci_first_slot from the >+ * device number, and that's exactly what the pre-OF >+ * sparc64 code did, but we're building this stuff generically >+ * using the OBP tree, not in the PCI controller layer. >+ */ >+ if (bus & 0x80) { >+ /* PBM-A */ >+ bus = 0x00; >+ slot = (slot - 1) << 2; >+ } else { >+ /* PBM-B */ >+ bus = 0x10; >+ slot = (slot - 2) << 2; >+ } >+ irq -= 1; >+ >+ ret = (bus | slot | irq); >+ } else { >+ /* Going through a PCI-PCI bridge that lacks a set of >+ * interrupt-map and interrupt-map-mask properties. >+ */ >+ ret = ((irq - 1 + (slot & 3)) & 3) + 1; >+ } > > return ret; > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 169622
:
112296
|
112298
| 112299