linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: "Deepak Pandian" <peerlessdeepaks@gmail.com>
To: "Benjamin Herrenschmidt" <benh@kernel.crashing.org>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: PCI Resource allocation
Date: Fri, 5 Dec 2008 09:10:10 +0530	[thread overview]
Message-ID: <cbaa36330812041940p603659f4q6afe38fca928c831@mail.gmail.com> (raw)
In-Reply-To: <1228431244.10722.4.camel@pasglop>

Hi Ben,

On Fri, Dec 5, 2008 at 4:24 AM, Benjamin Herrenschmidt
<benh@kernel.crashing.org> wrote:
> On Fri, 2008-12-05 at 00:06 +0530, Deepak Pandian wrote:
>> Hi,
>>
>> In ppc4xx_pci i see the pci size to be declared as
>>  u32 lah, lal, pciah, pcial, sa;
>
> I think the 4xx code is pretty much ok at this stage no ?

Nope. I dont think so . sa is declared as u32 which overrules pci
region width > 4GB.
Further while setting up the outbound mapping ,

          if (!is_power_of_2(sa) || sa < 0x100000 ||
                            sa > 0xffffffffu) {
                        printk(KERN_WARNING "%s: Resource out of range\n",
                               port->node->full_name);
                        continue;
                }
the code marks regions with width > 4 GB as out of range.


>> Also at many other places I see the pci region is not capable of
>> handling resources > 4GB. I am planning to work on this arch specific
>> code to make it handle pci resource of width greater than 4 GB.
>
> Which "many other places" ?

In 4xx the OMR registers are programmed to handle only a maximum of 4 GB.
 I am in process of understanding how pci resources are allocated in
core kernel. But as far as i digged I could see
pci_read_bases,pci_alloc_bus_resource needs fixing.

>> But before that i wanted to clarify whether the core kernel will be
>> able to handle pci regions with width greater than  4GB.
>
> There's at least one place in the generic PCI code, in
> pci_read_bridge_bases(), that needs fixing in a similar way as we
> already fixed __pci_read_base(), ie by testing the resource_size_t size
> rather than whether the platform is 64-bit.
>

Thanks Ben. Luckily I have a  device which seeks more than 4 GB , so I
will try to fix it


-- 
With Regards,
Deepak Pandian
"Time is precious,One day we will find that we have less than what we
think" -RandyPausch
www.peerlessdeepak.wordpress.com

  parent reply	other threads:[~2008-12-05  3:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-04 18:36 PCI Resource allocation Deepak Pandian
2008-12-04 22:54 ` Benjamin Herrenschmidt
2008-12-05  0:12   ` Flores, Raul
2008-12-07 23:00     ` Benjamin Herrenschmidt
2008-12-05  3:40   ` Deepak Pandian [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-12-09 14:53 PCI Resource Allocation John Traill
2000-10-04  6:53 PCI resource allocation Michael Thompson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cbaa36330812041940p603659f4q6afe38fca928c831@mail.gmail.com \
    --to=peerlessdeepaks@gmail.com \
    --cc=benh@kernel.crashing.org \
    --cc=linuxppc-dev@ozlabs.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).