From: David Gibson <david@gibson.dropbear.id.au>
To: Tom Rini <trini@kernel.crashing.org>
Cc: Eugene Surovegin <ebs@innocent.com>,
Dan Malek <dan@embeddededge.com>,
linuxppc-embedded@lists.linuxppc.org
Subject: Re: [PATCH] pci_alloc_consistent in an interrupt context
Date: Fri, 14 Jun 2002 13:58:03 +1000 [thread overview]
Message-ID: <20020614035803.GJ26146@zax> (raw)
In-Reply-To: <20020614021523.GG13541@opus.bloom.county>
On Thu, Jun 13, 2002 at 07:15:23PM -0700, Tom Rini wrote:
>
> On Fri, Jun 14, 2002 at 12:06:40PM +1000, David Gibson wrote:
> > On Thu, Jun 13, 2002 at 06:57:45PM -0700, Eugene Surovegin wrote:
> > >
> > > At 06:33 PM 6/13/2002, David Gibson wrote:
> > > >On Thu, Jun 13, 2002 at 06:25:11PM -0700, Eugene Surovegin wrote:
> > > >>
> > > >> At 05:24 PM 6/13/2002, David Gibson wrote:
> > > >> >That's right. But I think the patch below is a better fix for the
> > > >> >problem. It makes consistent_alloc()/consistent_free() just do the
> > > >> >right thing for both cache coherent and cache non-coherent processors,
> > > >> >so we can get rid of the ifdef in pci_alloc_consistent() and
> > > >> >pci_free_consistent().
> > > >>
> > > >> So, kmalloc will allocate non-cacheable memory?
> > > >>
> > > >> I seriously doubt it (actually I've just tested it:).
> > > >
> > > >No, but on cache coherent processors we don't need non-cacheable
> > > >memory. That's the whole point. Likewise with __get_free_pages()
> > > >which is what pci_alloc_consistent() uses on cache-coherent processors
> > > >now.
> > >
> > > OK, I got it :)
> > >
> > > One problem though, kmalloc allocated memory will not be necessarily
> > > properly aligned
> > > as required by DMA-mappings.txt
> > >
> > > Some PCI drivers may break because of this.
> >
> > Ah, yes, indeed. How about this:
>
> One last thing, did you mean to keep consistent_free as kfree() still
> and not free_pages() ?
No I didn't. Working on a fixed version - just running into some
other technical hitches.
--
David Gibson | For every complex problem there is a
david@gibson.dropbear.id.au | solution which is simple, neat and
| wrong. -- H.L. Mencken
http://www.ozlabs.org/people/dgibson
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
next prev parent reply other threads:[~2002-06-14 3:58 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-06-13 19:28 [PATCH] pci_alloc_consistent in an interrupt context Eugene Surovegin
2002-06-13 20:58 ` Tom Rini
2002-06-13 21:47 ` Dan Malek
2002-06-13 21:56 ` Tom Rini
2002-06-14 0:24 ` David Gibson
2002-06-14 0:38 ` Tom Rini
2002-06-14 0:45 ` David Gibson
2002-06-14 0:51 ` Tom Rini
2002-06-14 5:14 ` David Gibson
2002-06-14 14:59 ` Tom Rini
2002-06-15 6:40 ` David Gibson
2002-06-14 1:25 ` Eugene Surovegin
2002-06-14 1:33 ` David Gibson
2002-06-14 1:57 ` Eugene Surovegin
2002-06-14 2:06 ` David Gibson
2002-06-14 2:15 ` Tom Rini
2002-06-14 3:58 ` David Gibson [this message]
2002-06-14 4:42 ` Tom Rini
2002-06-14 2:08 ` Dan Malek
2002-06-14 1:57 ` Dan Malek
2002-06-13 22:23 ` Eugene Surovegin
2002-06-13 23:34 ` Paul Mackerras
2002-06-14 2:17 ` Dan Malek
2002-06-14 2:29 ` Eugene Surovegin
2002-06-13 23:37 ` Paul Mackerras
2002-06-14 2:15 ` Dan Malek
2002-06-14 2:21 ` Eugene Surovegin
2002-06-13 23:07 ` [PATCH] pci_alloc_consistent in an interrupt context, part 2 Eugene Surovegin
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=20020614035803.GJ26146@zax \
--to=david@gibson.dropbear.id.au \
--cc=dan@embeddededge.com \
--cc=ebs@innocent.com \
--cc=linuxppc-embedded@lists.linuxppc.org \
--cc=trini@kernel.crashing.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).