Re: Resource assignment oddities

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, May 4, 2013 at 10:34 PM, Benjamin Herrenschmidt
<benh@xxxxxxxxxxxxxxxxxxx> wrote:
> On Sat, 2013-05-04 at 22:18 -0700, Yinghai Lu wrote:
>> we intend to assign unassigned resources in two try,
>> first one will try to allocate must_have and optional ones the same
>> time.
>>
>> if it fails to do that, will only allocate must_have again.
>>
>> now optional one only include SRIOV related.
>
> Hrm... ok. We'll eventually need some kind of hook here for power as
> the way we deal with SR-IOV will have to be somewhat "special", but
> I'll explain that some other time.
>
> Anything shows up from my log about what you think might be the cause
> of those assignment failures ?

Yes, there is something wrong

pci 0001:01:00.0: BAR 8: can't assign mem (size 0x800000)

as bridge only can support 32bit mmio non-pref.

There is one bug for arch other than x86, but it should not be related.

in pci_bus_alloc_resource()

|        /* don't allocate too high if the pref mem doesn't support 64bit*/
|        if (!(res->flags & IORESOURCE_MEM_64))
|                max = PCIBIOS_MAX_MEM_32;

we should call pcibios_resource_to_bus ... to make
sure that actual bus addr is still 32bit

But i'm confused, Did you happen to define your own
    PCIBIOS_MAX_MEM_32 ?
as default one should be -1 other than x86.

Thanks

Yinghai
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux