Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 313126 Details for
Bug 457467
Patches for Quad PPC970 PowerStation
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
OF parsing of 64 bit PCI addresses
linux-2.6-of-pci-parsing.patch (text/plain), 5.59 KB, created by
Josh Boyer
on 2008-07-31 19:17:42 UTC
(
hide
)
Description:
OF parsing of 64 bit PCI addresses
Filename:
MIME Type:
Creator:
Josh Boyer
Created:
2008-07-31 19:17:42 UTC
Size:
5.59 KB
patch
obsolete
>From linuxppc-dev-bounces+jwboyer=gmail.com@ozlabs.org Wed Jul 16 22:53:43 2008 >Delivered-To: jwboyer@gmail.com >Received: by 10.142.47.19 with SMTP id u19cs101487wfu; Wed, 16 Jul 2008 > 22:53:43 -0700 (PDT) >Received: by 10.142.187.8 with SMTP id k8mr441746wff.226.1216274022965; > Wed, 16 Jul 2008 22:53:42 -0700 (PDT) >Return-Path: <linuxppc-dev-bounces+jwboyer=gmail.com@ozlabs.org> >Received: from ozlabs.org (ozlabs.org [203.10.76.45]) by mx.google.com with > ESMTP id 22si9452024wfg.13.2008.07.16.22.53.41; Wed, 16 Jul 2008 22:53:42 > -0700 (PDT) >Received-SPF: pass (google.com: best guess record for domain of > linuxppc-dev-bounces+jwboyer=gmail.com@ozlabs.org designates 203.10.76.45 > as permitted sender) client-ip=203.10.76.45; >Authentication-Results: mx.google.com; spf=pass (google.com: best guess > record for domain of linuxppc-dev-bounces+jwboyer=gmail.com@ozlabs.org > designates 203.10.76.45 as permitted sender) > smtp.mail=linuxppc-dev-bounces+jwboyer=gmail.com@ozlabs.org >Received: from ozlabs.org (localhost [127.0.0.1]) by ozlabs.org (Postfix) > with ESMTP id EFC54DDF72 for <jwboyer@gmail.com>; Thu, 17 Jul 2008 15:53:39 > +1000 (EST) >X-Original-To: linuxppc-dev@ozlabs.org >Delivered-To: linuxppc-dev@ozlabs.org >Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) (using > TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not > present a certificate) by ozlabs.org (Postfix) with ESMTPS id 755C5DDDFA > for <linuxppc-dev@ozlabs.org>; Thu, 17 Jul 2008 15:53:37 +1000 (EST) >Received: from [127.0.0.1] (localhost.localdomain [127.0.0.1]) by > gate.crashing.org (8.14.1/8.13.8) with ESMTP id m6H5rV1u006048; Thu, 17 Jul > 2008 00:53:32 -0500 >Subject: powerpc: Fix OF parsing of 64 bits PCI addresses >From: Benjamin Herrenschmidt <benh@kernel.crashing.org> >To: linuxppc-dev list <linuxppc-dev@ozlabs.org> >Date: Thu, 17 Jul 2008 15:53:31 +1000 >Message-Id: <1216274011.7740.293.camel@pasglop> >Mime-Version: 1.0 >X-Mailer: Evolution 2.22.2 >X-BeenThere: linuxppc-dev@ozlabs.org >X-Mailman-Version: 2.1.10 >Precedence: list >Reply-To: benh@kernel.crashing.org >List-Id: Linux on PowerPC Developers Mail List <linuxppc-dev.ozlabs.org> >List-Unsubscribe: <https://ozlabs.org/mailman/options/linuxppc-dev>, > <mailto:linuxppc-dev-request@ozlabs.org?subject=unsubscribe> >List-Archive: <http://ozlabs.org/pipermail/linuxppc-dev> >List-Post: <mailto:linuxppc-dev@ozlabs.org> >List-Help: <mailto:linuxppc-dev-request@ozlabs.org?subject=help> >List-Subscribe: <https://ozlabs.org/mailman/listinfo/linuxppc-dev>, > <mailto:linuxppc-dev-request@ozlabs.org?subject=subscribe> >Content-Type: text/plain; charset="us-ascii" >Sender: linuxppc-dev-bounces+jwboyer=gmail.com@ozlabs.org >Errors-To: linuxppc-dev-bounces+jwboyer=gmail.com@ozlabs.org >X-Evolution-Source: imap://jwboyer%40gmail.com@imap.gmail.com/ >Content-Transfer-Encoding: 8bit > >The OF parsing code for PCI addresses isn't always treating properly >the address space indication 0b11 (ie. 0x3) as meaning 64 bits >memory space. > >This means that it fails to parse addresses for PCI BARs that have >this encoding set by the firmware, which happens on some SLOF >versions and breaks offb palette handling on Powerstation. > >Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> >--- > >Index: linux-work/arch/powerpc/kernel/pci-common.c >=================================================================== >--- linux-work.orig/arch/powerpc/kernel/pci-common.c 2008-07-17 15:09:11.000000000 +1000 >+++ linux-work/arch/powerpc/kernel/pci-common.c 2008-07-17 15:09:22.000000000 +1000 >@@ -598,6 +598,7 @@ void __devinit pci_process_bridge_OF_ran > res->start = pci_addr; > break; > case 2: /* PCI Memory space */ >+ case 3: /* PCI 64 bits Memory space */ > printk(KERN_INFO > " MEM 0x%016llx..0x%016llx -> 0x%016llx %s\n", > cpu_addr, cpu_addr + size - 1, pci_addr, >Index: linux-work/arch/powerpc/kernel/prom_parse.c >=================================================================== >--- linux-work.orig/arch/powerpc/kernel/prom_parse.c 2008-07-17 15:06:43.000000000 +1000 >+++ linux-work/arch/powerpc/kernel/prom_parse.c 2008-07-17 15:08:16.000000000 +1000 >@@ -128,12 +128,35 @@ static void of_bus_pci_count_cells(struc > *sizec = 2; > } > >+static unsigned int of_bus_pci_get_flags(const u32 *addr) >+{ >+ unsigned int flags = 0; >+ u32 w = addr[0]; >+ >+ switch((w >> 24) & 0x03) { >+ case 0x01: >+ flags |= IORESOURCE_IO; >+ break; >+ case 0x02: /* 32 bits */ >+ case 0x03: /* 64 bits */ >+ flags |= IORESOURCE_MEM; >+ break; >+ } >+ if (w & 0x40000000) >+ flags |= IORESOURCE_PREFETCH; >+ return flags; >+} >+ > static u64 of_bus_pci_map(u32 *addr, const u32 *range, int na, int ns, int pna) > { > u64 cp, s, da; >+ unsigned int af, rf; >+ >+ af = of_bus_pci_get_flags(addr); >+ rf = of_bus_pci_get_flags(range); > > /* Check address type match */ >- if ((addr[0] ^ range[0]) & 0x03000000) >+ if ((af ^ rf) & (IORESOURCE_MEM | IORESOURCE_IO)) > return OF_BAD_ADDR; > > /* Read address values, skipping high cell */ >@@ -153,25 +176,6 @@ static int of_bus_pci_translate(u32 *add > return of_bus_default_translate(addr + 1, offset, na - 1); > } > >-static unsigned int of_bus_pci_get_flags(const u32 *addr) >-{ >- unsigned int flags = 0; >- u32 w = addr[0]; >- >- switch((w >> 24) & 0x03) { >- case 0x01: >- flags |= IORESOURCE_IO; >- break; >- case 0x02: /* 32 bits */ >- case 0x03: /* 64 bits */ >- flags |= IORESOURCE_MEM; >- break; >- } >- if (w & 0x40000000) >- flags |= IORESOURCE_PREFETCH; >- return flags; >-} >- > const u32 *of_get_pci_address(struct device_node *dev, int bar_no, u64 *size, > unsigned int *flags) > { > > >_______________________________________________ >Linuxppc-dev mailing list >Linuxppc-dev@ozlabs.org >https://ozlabs.org/mailman/listinfo/linuxppc-dev
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 457467
:
313125
| 313126