linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Grant Likely <grant.likely@secretlab.ca>
To: Ira Snyder <iws@ovro.caltech.edu>
Cc: Arnd Bergmann <arnd@arndb.de>,
	Jan-Bernd Themann <THEMANN@de.ibm.com>,
	netdev@vger.kernel.org, Rusty Russell <rusty@rustcorp.com.au>,
	linux-kernel@vger.kernel.org, linuxppc-dev@ozlabs.org
Subject: Re: [RFC v2] virtio: add virtio-over-PCI driver
Date: Tue, 21 Apr 2009 00:09:43 -0600	[thread overview]
Message-ID: <fa686aa40904202309m1ce37e9dse38725e49c395852@mail.gmail.com> (raw)
In-Reply-To: <20090226214919.GA19959@ovro.caltech.edu>

On Thu, Feb 26, 2009 at 3:49 PM, Ira Snyder <iws@ovro.caltech.edu> wrote:
> On Thu, Feb 26, 2009 at 09:37:14PM +0100, Arnd Bergmann wrote:
>> If the registers for setting up this window don't logically fit
>> into the same device as the one you already use, the cleanest
>> solution would be to have another device just for this and then
>> make a function call into that driver to set up the window.
>
> The registers are part of the board control registers. They don't fit at
> all in the message unit. Doing this in the bootloader seems like a
> logical place, but that would require any testers to flash a new U-Boot
> image into their mpc8349emds boards.

Alternately, the board platform code (arch/powerpc/platforms/83xx) is
an ideal place for 'fixups'.  ie. to setup things that the firmware
really should be do, but doesn't.

>> > Now, I wouldn't need to access these registers at all if the bootloade=
r
>> > could handle it. I just don't know if it is possible to have Linux not
>> > use some memory that the bootloader allocated, other than with the
>> > mem=3DXXX trick, which I'm sure wouldn't be acceptable. I've just used
>> > regular RAM so this is portable to my custom board (mpc8349emds based)
>> > and a regular mpc8349emds. I didn't want to change anything board
>> > specific.
>> >
>> > I would love to have the bootloader allocate (or reserve somewhere in
>> > the memory map) 16K of RAM, and not be required to allocate it with
>> > dma_alloc_coherent(). It would save me plenty of headaches.
>>
>> I believe you can do that through the "memory" devices in the
>> device tree, by leaving out a small part of the description of
>> main memory, at putting it into the "reg" property of your own
>> device.
>>
>
> I'll explore this option. I didn't even know you could do this. =A0Is a
> driver that requires the trick acceptable for mainline inclusion? Just
> like setting up the 16K PCI window, this is very platform specific.

Yup.  You wouldn't even need to write any code to do this.  Just
reduce the memory node's RAM size listed in the .dts file by 16k and
add a 16K region to the reg property for the messaging region.

Speaking of which, the device tree changes should be adding 2 nodes; 1
node to describe the messaging unit, and 1 node to describe the virtio
instance.  The messaging unit is a general purpose piece of hardware,
so it is not appropriate to write a usage-specific device driver that
binds against it.  I'm kind of working on this right now, so I'll show
you what I mean in patch form when I actually get things running.

g.

--=20
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.

  parent reply	other threads:[~2009-04-21  6:09 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-24  0:00 [RFC v2] virtio: add virtio-over-PCI driver Ira Snyder
2009-02-26 16:15 ` Arnd Bergmann
2009-02-26 16:53   ` Geert Uytterhoeven
2009-02-26 20:25     ` Ira Snyder
2009-02-26 20:01   ` Ira Snyder
2009-02-26 20:37     ` Arnd Bergmann
2009-02-26 21:49       ` Ira Snyder
2009-02-26 22:34         ` Arnd Bergmann
2009-02-26 23:17           ` Ira Snyder
2009-02-26 23:44             ` Arnd Bergmann
2009-04-21  6:09         ` Grant Likely [this message]
2009-04-14 20:28 ` Grant Likely
2009-04-14 21:23   ` David Hawkins
2009-04-14 21:45     ` Grant Likely
2009-04-14 21:52       ` David Hawkins
2009-04-14 22:16         ` Grant Likely
2009-04-14 22:27           ` David Hawkins
2009-04-14 21:53   ` Ira Snyder
2009-06-11 14:22     ` Grant Likely
2009-06-11 15:10       ` Ira Snyder
  -- strict thread matches above, loose matches on Subject: below --
2011-05-06 12:00 Kushwaha Prabhakar-B32579
2011-05-06 16:06 ` Ira W. Snyder
2011-05-07  5:59   ` Kushwaha Prabhakar-B32579

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=fa686aa40904202309m1ce37e9dse38725e49c395852@mail.gmail.com \
    --to=grant.likely@secretlab.ca \
    --cc=THEMANN@de.ibm.com \
    --cc=arnd@arndb.de \
    --cc=iws@ovro.caltech.edu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=netdev@vger.kernel.org \
    --cc=rusty@rustcorp.com.au \
    /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).