[lkml]   [2012]   [Jan]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 09/13] PCI: Probe safe range that we can use for unassigned bridge.
On Mon, Jan 30, 2012 at 7:59 AM, Bjorn Helgaas <> wrote:
> On Fri, Jan 27, 2012 at 6:49 PM, Yinghai Lu <> wrote:
>> Try to allocate from parent bus busn_res. if can not find any big enough, will try
>> to extend parent bus top. even the extending is through allocating, after allocating
>> will pad the range to parent buses top.
>> When extending happens, We will record the parent_res, so could use it as stopper
>> for really extend/shrink top later.
> I think what this does is "find the largest available area in 'res'."
> That *sounds* sort of useful (and like something that could go
> somewhere more generic than drivers/pci/probe.c), but there's no
> locking, so we don't have any assurance that the area we find will
> *remain* available.

two usages:
1. init booting : should be safe, that is sequential scanning
2. hotplug: we should have overall lock somewhere for it?

> Since the caller should deal with failure anyway (if the largest
> available area is no longer available by the time it gets around to
> allocating it), it seems like it'd be better to fold this into the
> caller somehow.

>> +               if (ret == 0) {
>> +                       /* release busn_res */
> Comments like this that repeat exactly what the next line of code does
> without adding any useful information are unnecessary and distracting.

ok, will remove them.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2012-01-30 19:53    [W:0.057 / U:5.728 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site