linux-pci.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Richard Yang <weiyang@linux.vnet.ibm.com>
To: Yinghai Lu <yinghai@kernel.org>
Cc: Richard Yang <weiyang@linux.vnet.ibm.com>,
	linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: One problem in reassign pci bus number?
Date: Tue, 5 Jun 2012 14:26:03 +0800	[thread overview]
Message-ID: <20120605062603.GA21952@richard> (raw)
In-Reply-To: <CAE9FiQWw=dMBajvGQy_1KoPbGa1wvER5U81oULbkXCjBzQDRpQ@mail.gmail.com>

On Mon, Jun 04, 2012 at 04:36:33PM -0700, Yinghai Lu wrote:
>On Mon, Jun 4, 2012 at 6:34 AM, Richard Yang <weiyang@linux.vnet.ibm.com> wrote:
>> On Tue, May 29, 2012 at 10:14:51AM -0700, Yinghai Lu wrote:
>>>On Tue, May 29, 2012 at 4:59 AM, Richard Yang
>>><weiyang@linux.vnet.ibm.com> wrote:
>>>>
>>>> I think about this issue again, this behavior of kernel will bring some
>>>> unconvenience to the user.
>>>>
>>>> Do you think the kernel could handle this situation?
>>>
>>>in this extreme case, you may need user to do some comprise.
>>>
>>>We should always try to use setting from BIOS if it is sane.
>>>
>>>Yinghai
>> Yinghai
>>
>>                    +-------+
>>                    |       | root bridge(0,255)
>>                    +---+---+
>>                        |          Bus 0
>>       -----+-----------+------------------------------+--
>>            |                                          |
>>            |                                          |
>>            |                                          |
>>       +----+----+                               +-----+-----+
>>       |         |  B1(1,15)                     |           |B2(32,35)
>>       +----+----+                               +-----+-----+
>>            |  Bus 1                                   |    Bus 32
>>       -----+-----------------------             -----------
>>                             |
>>                        +----+----+
>>                        |         | B3
>>                        +---------+
>>
>> I reread the current code, v3.4, in linus tree,
>> git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
>> And I come up with another condition which will have a problem when
>> kernel is not given the parameter, pci=assign-busses.
>>
>> Same condition as previous:
>> -------------------------------------------------------------------------------
>> B1 and B2 works fine with the BIOS and get the bus number assigned.
>> B3 is not probed by BIOS.
>>
>> Difference between the previous example:
>> -------------------------------------------------------------------------------
>> In this case, B2 is assigned bus range (32, 35), which has a gap between
>> B1 number range (1, 15).
>>
>> When kernel meets B3 in second pass, B3 will be assigned with bus number
>> 16. Well, this time the bus number 16 doesn't overlap with bus number of
>> B2.
>>
>> But, the pci_fixup_parent_subordinate_busnr() will not work since the
>> pci=assign-buses is not passed to kernel.
>>
>> So B1's bus window is still (1,15) not (1,16).
>>
>> BTW, is this also a extrem case?
>
>that should be handled by busn_alloc branch.
>
>kernel will try to probe in [1,15] at first, and could extend B1 range
>to [1, 31] if needed.
Hmm... when do you think this branch will be merged to the mainstream?
>
>Thanks
>
>Yinghai

-- 
Richard Yang
Help you, Help me


  reply	other threads:[~2012-06-05  6:26 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20120410090306.GA7056@richard>
2012-04-22 15:52 ` One problem in reassign pci bus number? Richard Yang
2012-04-23 19:46   ` Don Dutile
2012-04-23 20:19     ` Yinghai Lu
2012-04-23 21:09       ` Don Dutile
2012-04-23 22:07         ` Yinghai Lu
2012-04-25  2:56           ` Don Dutile
2012-04-23 22:22         ` Yinghai Lu
2012-04-25  2:59           ` Don Dutile
2012-04-24  7:29     ` Richard Yang
2012-05-14  1:55     ` Richard Yang
2012-05-14  5:40       ` Yinghai Lu
2012-05-14  6:46         ` Richard Yang
2012-05-15 17:32           ` Yinghai Lu
2012-05-16  1:18             ` Richard Yang
2012-05-16  2:11               ` Yinghai Lu
2012-05-29 11:59                 ` Richard Yang
2012-05-29 17:14                   ` Yinghai Lu
2012-06-04 13:34                     ` Richard Yang
2012-06-04 23:36                       ` Yinghai Lu
2012-06-05  6:26                         ` Richard Yang [this message]
2012-06-05 18:01                           ` Yinghai Lu
2012-04-23 20:13   ` Yinghai Lu
2012-04-24 14:56     ` Wei Yang
2012-04-25  9:47     ` Wei Yang
2012-04-25 16:28       ` Yinghai Lu
2012-05-03  6:54         ` Richard Yang
2012-05-03  8:33           ` Yinghai Lu
2012-05-04  2:47             ` Richard Yang
2012-05-04  3:15               ` Yinghai Lu
2012-05-04  4:52                 ` Richard Yang
2012-05-04 17:37                   ` Yinghai Lu
2012-05-06 15:17                     ` Richard Yang
2012-05-06 16:35                       ` Yinghai Lu
2012-05-06 16:36                         ` Yinghai Lu
2012-05-07  1:17                           ` Richard Yang
2012-05-07  2:04                             ` Yinghai Lu
2012-05-08  2:46                               ` Richard Yang
2012-05-08  3:42                                 ` Yinghai Lu
2012-05-10  3:35                                   ` Richard Yang
2012-05-10  5:42                                     ` Yinghai Lu
2012-05-11  1:23                                       ` Richard Yang

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=20120605062603.GA21952@richard \
    --to=weiyang@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=yinghai@kernel.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).