linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Dan Malek <dan@embeddedalley.com>
Cc: linuxppc-dev <linuxppc-dev@ozlabs.org>,
	Paul Mackerras <paulus@samba.org>
Subject: Re: [PATCH 2/5] [POWERPC] 8xx: generic 8xx code arch/powerpc port
Date: Mon, 20 Nov 2006 11:24:24 +0100	[thread overview]
Message-ID: <20061120102424.GB12002@lst.de> (raw)
In-Reply-To: <DB42A6F7-2B5E-4A22-8AA8-0F2C3BDEFC99@embeddedalley.com>

On Fri, Nov 17, 2006 at 08:24:16PM -0500, Dan Malek wrote:
> On Nov 17, 2006, at 3:00 AM, Christoph Hellwig wrote:
> 
> >this is used by arch/ppc/fec.c to set mapping uncachable, which
> >seems rather odd to me.
> 
> I thought arch/ppc/fec.c is dead in favor of the
> "generic" version in the drivers/net directory?

Sorry, I actually meant drivers/net/fec.c.

> We use the va_to_pte() functions to find
> the mappings to create "coherent" cache areas
> by changing the cache attributes of the vmalloc()
> space.  We can't use virt_to_phys() or similar
> associated functions because they simply do the
> kernel virtual arithmetic and don't return the
> proper PTEs for for changing these attributes.

Yes, I noticed that in the second round of actually
looking at all the users.

> >it might make sense to move the implementation to fec.c.
> 
> I don't know what version of fec.c you are looking
> at, but it should use the dma_alloc_coherent() functions
> and be stashing both the physical and virtual addresses.
> I made this change long ago and I hope it hasn't
> been lost.
> 
> The coherent dma functions will in turn use
> the va_to_pte() (or associated functions) mentioned
> above.

drivers/net/fec.c in current linus tree doesn't use the dma
api at all, and there is no dma api implementation that
uses va_to_pte().  The only users of va_to_pte() in current
Linus tree are drivers/net/fec.c:fec_uncachable() in the #else
block of a large #ifdef / #ifelse spagethhi sections and va_to_phys in
arch/ppc/mm/fault.c under CONFIG_8xx, which is unused.

  reply	other threads:[~2006-11-20 10:24 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20061114012504.17455.13833.stgit@localhost.localdomain>
2006-11-14  1:28 ` [PATCH 1/5] [POWERPC] 8xx: platform-specific mmu updates Vitaly Bordug
2006-11-14  1:28 ` [PATCH 2/5] [POWERPC] 8xx: generic 8xx code arch/powerpc port Vitaly Bordug
2006-11-15 18:23   ` Christoph Hellwig
2006-11-15 23:36     ` Vitaly Bordug
2006-11-16 22:48     ` Benjamin Herrenschmidt
2006-11-17  6:49       ` Christoph Hellwig
2006-11-17  8:00   ` Christoph Hellwig
2006-11-18  1:24     ` Dan Malek
2006-11-20 10:24       ` Christoph Hellwig [this message]
2006-11-21  0:26         ` Dan Malek
2006-11-14  1:28 ` [PATCH 3/5] [POWERPC] 8xx: platform-related changes to the fsl_soc.c Vitaly Bordug
2006-11-14  2:21   ` Benjamin Herrenschmidt
2006-11-14 12:48     ` Vitaly Bordug
2006-11-14  1:28 ` [PATCH 4/5] [POWERPC] 8xx: powerpc port of core CPM, CPM PIC, etc Vitaly Bordug
2006-11-14  2:44   ` Benjamin Herrenschmidt
2006-11-14  1:28 ` [PATCH 5/5] [POWERPC] 8xx: Add mpc885ads support and common mpc8xx Vitaly Bordug
2006-11-14  2:47   ` Benjamin Herrenschmidt

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=20061120102424.GB12002@lst.de \
    --to=hch@lst.de \
    --cc=dan@embeddedalley.com \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=paulus@samba.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).