[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20090917093636.01db2a74@jbarnes-g45>
Date: Thu, 17 Sep 2009 09:36:36 -0700
From: Jesse Barnes <jesse.barnes@...el.com>
To: Yinghai Lu <yinghai@...nel.org>
Cc: Ingo Molnar <mingo@...e.hu>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Ivan Kokshaysky <ink@...assic.park.msu.ru>,
Matthew Wilcox <matthew@....cx>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] pci: overwite pci bridge res regs to get big range
On Sun, 13 Sep 2009 15:57:10 -0700
Yinghai Lu <yinghai@...nel.org> wrote:
> Signed-off-by: Yinghai Lu <yinghai@...nel.org>
>
> ---
> drivers/pci/setup-bus.c | 13 +++++++++++--
> 1 file changed, 11 insertions(+), 2 deletions(-)
>
> Index: linux-2.6/drivers/pci/setup-bus.c
> ===================================================================
> --- linux-2.6.orig/drivers/pci/setup-bus.c
> +++ linux-2.6/drivers/pci/setup-bus.c
> @@ -299,8 +299,17 @@ static struct resource *find_free_bus_re
> r = bus->resource[i];
> if (r == &ioport_resource || r == &iomem_resource)
> continue;
> - if (r && (r->flags & type_mask) == type
> && !r->parent)
> - return r;
> + if (r && (r->flags & type_mask) == type) {
> + if (!r->parent)
> + return r;
> + /*
> + * if there is no child under that, we
> should release
> + * and use it. don't need to reset it,
> pbus_size_* will
> + * set it again
> + */
> + if (!r->child && !release_resource(r))
> + return r;
> + }
> }
> return NULL;
> }
This does seem like a good way of getting some extra bus space... We
should have all the child resources of a given bus by this point so it
seems like it would be safe.
You ok with this Linus?
Thanks,
--
Jesse Barnes, Intel Open Source Technology Center
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists