All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeff Garzik <jeff@garzik.org>
To: David Brownell <david-b@pacbell.net>
Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>,
	Linux Kernel list <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Greg KH <greg@kroah.com>
Subject: Re: [patch 2.6.24-rc1] resource_len() utility function
Date: Wed, 24 Oct 2007 23:46:23 -0400	[thread overview]
Message-ID: <4720118F.5050906@garzik.org> (raw)
In-Reply-To: <200710241947.15129.david-b@pacbell.net>

David Brownell wrote:
> On Wednesday 24 October 2007, Jeff Garzik wrote:
>> With regards to resource reservation...  IMO we should mimic struct 
>> pci_dev and add struct resource[] to struct device.
> 
> One minor difficulty:  PCI has a limit on the number of BARs,
> but other busses don't.  It'd be better as a "struct resource *".
> 
> 
>> Just like we have pci_request_regions(), we should also be able to 
>> easily to a dev_request_regions().  the implementation should be very 
>> close to pci_request_region() and pci_release_region().
> 
> Wouldn't it be nicer to have PCI use those dev_*() calls?
> Ideally pci_request_region() wraps dev_request_region()...

Absolutely...


>> Then a dev_iomap() analogue to pci_iomap() should be pretty 
>> straightforward to create.
> 
> Another minor nit:  addressing the various resource types.
> The platform bus code has multiple lookup schemes. 
> 
> Calls like resource_iomap() might be more flexible, so that
> lookup schemes can stay flexible.

I figured that, in the absence of a true, defined BAR concept, the 
struct device version would simply index into the discussed array of 
struct resource.  That means any ordering or layout of resources should 
work, presuming (the usual case) that both driver and platform agree on 
the resource layout.

	Jeff




  reply	other threads:[~2007-10-25  3:47 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-25  1:20 [patch 2.6.24-rc1] resource_len() utility function David Brownell
2007-10-25  1:44 ` Alan Cox
2007-10-25  2:08   ` Jeff Garzik
2007-10-25  2:47     ` David Brownell
2007-10-25  3:46       ` Jeff Garzik [this message]
2007-10-25  4:38         ` David Brownell
2007-10-25 12:29           ` Alan Cox
2007-10-25 16:31             ` David Brownell
2007-10-25  2:39   ` David Brownell

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=4720118F.5050906@garzik.org \
    --to=jeff@garzik.org \
    --cc=akpm@linux-foundation.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=david-b@pacbell.net \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.