From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Becky Bruce <bgill@freescale.com>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: Reorg of 32-bit dma code
Date: Thu, 07 Feb 2008 12:26:34 +1100 [thread overview]
Message-ID: <1202347594.7079.107.camel@pasglop> (raw)
In-Reply-To: <Pine.LNX.4.64.0802061802310.1616@monty.am.freescale.net>
On Wed, 2008-02-06 at 18:32 -0600, Becky Bruce wrote:
>
> I've been looking at converting 32-bit powerpc's DMA code over to the
> 64-bit method, where there is a dma_ops structure inside archdata
> that tells us which operations a device should use for DMA. I'll be
> needing this shortly because I need to implement swiotlb to deal with
> PCI and large amounts of RAM on 32-bit systems that support 36-bit
> physical addressing. (Yes, I know. Fun for me. Woohoo.)
>
> Anyway, I have an initial booting first pass, and wanted to get some
> feedback. What I've done at this point is to make dma_64 common to both
> architectures (will rename it when I send a real patch...). The
> dma_direct_* functions have been changed to work on both 32/64, and the
> old dma_* functionality in dma-mapping.h has been removed. For now, to
> avoid whacking on every 32-bit platform, the get_dma_ops() function has
> been changed to return &dma_direct_ops if the device pointer exists but
> the dma_ops field is NULL. I'm not sure if this needs to be ifdef'd for
> 64-bit?
I'd prefer so yes.
> I've copied a bit of code over from pci_64.c into pci_common.c - some of
> it isn't in use yet but will be once I start doing actual setup in the
> platform code. pcibios_setup_new_device() becomes common as well.
Cool !
> I've
> also temporarily hacked the 32-bit code to set archdata.dma_data to
> PCI_DRAM_OFFSET, so we can eliminate the use of virt_to_bus() and instead
> use the 64-bit method, which gets rid of some ugly ifdefs in the dma code.
Ok.
> That's really about it - the preliminary patch is below - clearly it will
> need some cleanup, but I wanted to post early and often. Any feedback or
> suggestions on cleaning this up are greatly appreciated.
I'll have a look asap, thanks for doing this !
Ben.
next prev parent reply other threads:[~2008-02-07 1:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-07 0:32 Reorg of 32-bit dma code Becky Bruce
2008-02-07 1:26 ` Benjamin Herrenschmidt [this message]
2008-02-07 2:39 ` Kumar Gala
2008-02-07 2:45 ` Benjamin Herrenschmidt
2008-02-07 2:45 ` Becky Bruce
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=1202347594.7079.107.camel@pasglop \
--to=benh@kernel.crashing.org \
--cc=bgill@freescale.com \
--cc=linuxppc-dev@ozlabs.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).