[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAE9FiQUY037o7YMfx9NHX9KBx3Tz+MpOjvNvaQ8ex7t5X3zK7g@mail.gmail.com>
Date: Fri, 11 Mar 2016 14:21:26 -0800
From: Yinghai Lu <yinghai@...nel.org>
To: Bjorn Helgaas <helgaas@...nel.org>
Cc: Bjorn Helgaas <bhelgaas@...gle.com>,
David Miller <davem@...emloft.net>,
Benjamin Herrenschmidt <benh@...nel.crashing.org>,
Wei Yang <weiyang@...ux.vnet.ibm.com>, TJ <linux@....tj>,
Yijing Wang <wangyijing@...wei.com>,
Khalid Aziz <khalid.aziz@...cle.com>,
"linux-pci@...r.kernel.org" <linux-pci@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v10 07/59] PCI: Ignore BAR for ALi M1533 PCI-ISA bridge
On Thu, Mar 10, 2016 at 9:54 AM, Bjorn Helgaas <helgaas@...nel.org> wrote:
> On Wed, Feb 24, 2016 at 06:11:58PM -0800, Yinghai Lu wrote:
>> Meelis reported strange conflicts on sparc v210:
>> pci 0001:00:07.0: can't claim BAR 2 [mem 0x7ff00000000-0x7ff000fffff]: address conflict with 0001:00:07.0 [mem 0x7ff00000000-0x7ff000fffff]
>> pci 0001:00:06.0: can't claim BAR 0 [io 0x7fe01000000-0x7fe0100000f]: address conflict with 0001:00:07.0 [io 0x7fe01000000-0x7fe0100ffff]
>> pci 0001:00:0d.0: can't claim BAR 0 [io 0x7fe01000900-0x7fe01000907]: address conflict with 0001:00:07.0 [io 0x7fe01000000-0x7fe0100ffff]
>> pci 0001:00:0d.0: can't claim BAR 1 [io 0x7fe01000918-0x7fe0100091f]: address conflict with 0001:00:07.0 [io 0x7fe01000000-0x7fe0100ffff]
>> pci 0001:00:0d.0: can't claim BAR 2 [io 0x7fe01000910-0x7fe01000917]: address conflict with 0001:00:07.0 [io 0x7fe01000000-0x7fe0100ffff]
>> pci 0001:00:0d.0: can't claim BAR 3 [io 0x7fe01000908-0x7fe0100090f]: address conflict with 0001:00:07.0 [io 0x7fe01000000-0x7fe0100ffff]
>> pci 0001:00:0d.0: can't claim BAR 4 [io 0x7fe01000920-0x7fe0100092f]: address conflict with 0001:00:07.0 [io 0x7fe01000000-0x7fe0100ffff]
>> PCI: /pci@1e,600000 can't claim Video RAM area [mem 0x7ff000a0000-0x7ff000bffff]: address conflict with 0001:00:07.0 [mem 0x7ff00000000-0x7ff000fffff]
>> PCI: /pci@1e,600000 can't claim System ROM [mem 0x7ff000f0000-0x7ff000fffff]: address conflict with 0001:00:07.0 [mem 0x7ff00000000-0x7ff000fffff]
>> PCI: /pci@1e,600000 can't claim Video ROM [mem 0x7ff000c0000-0x7ff000c7fff]: address conflict with 0001:00:07.0 [mem 0x7ff00000000-0x7ff000fffff]
>>
>> we have
>> pci_bus 0001:00: root bus resource [io 0x7fe01000000-0x7fe01ffffff] (bus address [0x0000-0xffffff])
>> pci_bus 0001:00: root bus resource [mem 0x7ff00000000-0x7ffffffffff] (bus address [0x00000000-0xffffffff])
>>
>> so pci bus address in the bars for 0001:00:07.0 has all 0s.
>>
>> 0001:00:07.0 ISA bridge: ULi Electronics Inc. M1533/M1535/M1543 PCI to ISA Bridge [Aladdin IV/V/V+]
>> Region 0: [virtual] I/O ports at 0000 [size=64K]
>> Region 1: Memory at <unassigned> (32-bit, non-prefetchable) [size=1M]
>> Region 2: Memory at <unassigned> (32-bit, non-prefetchable) [size=1M]
>> 00: b9 10 33 15 0f 00 10 02 00 00 01 06 00 00 00 00
>> 10: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>> 20: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
>> 30: 00 00 00 00 a0 00 00 00 00 00 00 00 00 00 00 00
>>
>> According to http://www.versalogic.com/Support/Downloads/pdf/ali1543.pdf
>> page 28: The indices before 40h are read-only.
>> and we have all 0 from 0x10-0x2f, according to lspci.
>> So those BAR do not work as regular BAR, just clean flags, and ignore them all
>> the way include claim and sizing and alloc etc.
>
> A BAR that is read-only zeroes is perfectly legal (PCI spec r3.0, sec
> 6.2.5.1) and __pci_read_base() handles it correctly.
>
> Maybe you're using something other than __pci_read_base() and the problem
> is there?
>
> The following dmesg logs show the [10b9:1533] device handled
> correctly, with no implemented BARs:
>
> https://bugs.freedesktop.org/attachment.cgi?id=118855
> http://d11mgdpsdcgrvc.cloudfront.net/dmesg.txt
> http://www.hivmr.com/db/sasj1xfk98zsz9amfmpp1mdkzfk3pjk3
ok, then those resource info should come from OF instead of __pci_read_base().
will drop this patch.
Thanks
Yinghai
Powered by blists - more mailing lists