All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kristoffer Glembo <kristoffer@gaisler.com>
To: sparclinux@vger.kernel.org
Subject: Re: [PATCH 2/2] Added leon3_dma_ops and LEON specific mmu_inval_dma_area
Date: Tue, 12 Jan 2010 10:35:59 +0000	[thread overview]
Message-ID: <4B4C508F.1090609@gaisler.com> (raw)
In-Reply-To: <1257172092-25026-2-git-send-email-kristoffer@gaisler.com>

Hi,

David Miller wrote:
> 
> Looking at this code, I can't see how virt_to_page() works right
> now at all :-)
> 
> mem_map[] is offset by pfn_base
> 
> This is why __va() and __pa() account for it.
> 
> Can you see if your machine boots with the patch at the end of this
> email applied?  Others can feel free to test this too :-)
> 
> Really, if pfn_base/phys_base are non-zero, it's quite amazing how a
> sparc32 machine could sucessfully boot with the code as-is.
> 
> Looking more deeply, I guess it could work if you use CONFIG_SLUB.
> 
> Or, you use CONFIG_SLAB and SLABs are never destroyed and SLAB
> growing never fails (kmem_freepages() uses virt_to_page()).
> 

I was using CONFIG_SLAB without noticing any problems.

But I'm a bit confused. Doesn't this patch generate the exact same code?
Now __pa will add in phys_base but pfn_to_page(__pa()>>PAGE_SHIFT)
will remove it by subtracting ARCH_PFN_OFFSET.


> And I'm guessing that's why using virt_to_page() in the DMA mapping
> implementation failed for you Kristoffer, it would be the only common
> path it would be used on sparc32.
> 

For me it still fails if I'm not adding phys_base in page_to_phys.


Thanks,
Kristoffer

  parent reply	other threads:[~2010-01-12 10:35 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-02 14:28 [PATCH 2/2] Added leon3_dma_ops and LEON specific mmu_inval_dma_area Kristoffer Glembo
2009-11-03 22:45 ` [PATCH 2/2] Added leon3_dma_ops and LEON specific Julian Calaby
2009-11-04 13:39 ` David Miller
2009-11-04 15:50 ` [PATCH 2/2] Added leon3_dma_ops and LEON specific mmu_inval_dma_area Kristoffer Glembo
2009-11-04 16:36 ` [PATCH 2/2] Added leon3_dma_ops and LEON specific David Miller
2009-11-06  9:59 ` [PATCH 2/2] Added leon3_dma_ops and LEON specific mmu_inval_dma_area Kristoffer Glembo
2009-11-06 10:08 ` [PATCH 2/2] Added leon3_dma_ops and LEON specific David Miller
2009-11-16  9:45 ` [PATCH 2/2] Added leon3_dma_ops and LEON specific mmu_inval_dma_area Kristoffer Glembo
2009-11-16  9:51 ` Kristoffer Glembo
2009-11-16 10:55 ` [PATCH 2/2] Added leon3_dma_ops and LEON specific David Miller
2009-11-16 11:03 ` David Miller
2009-11-16 11:06 ` [PATCH 2/2] Added leon3_dma_ops and LEON specific mmu_inval_dma_area Kristoffer Glembo
2009-11-16 11:21 ` [PATCH 2/2] Added leon3_dma_ops and LEON specific David Miller
2009-11-18  8:45 ` [PATCH 2/2] Added leon3_dma_ops and LEON specific mmu_inval_dma_area Kristoffer Glembo
2009-11-18  9:32 ` [PATCH 2/2] Added leon3_dma_ops and LEON specific David Miller
2009-11-23 12:31 ` [PATCH 2/2] Added leon3_dma_ops and LEON specific mmu_inval_dma_area Kristoffer Glembo
2009-12-14  4:36 ` [PATCH 2/2] Added leon3_dma_ops and LEON specific David Miller
2009-12-14  7:57 ` [PATCH 2/2] Added leon3_dma_ops and LEON specific mmu_inval_dma_area Kristoffer Glembo
2010-01-12  7:40 ` [PATCH 2/2] Added leon3_dma_ops and LEON specific David Miller
2010-01-12 10:35 ` Kristoffer Glembo [this message]
2010-01-12 10:45 ` David Miller
2010-01-14 10:43 ` David Miller
2010-01-14 11:05 ` [PATCH 2/2] Added leon3_dma_ops and LEON specific mmu_inval_dma_area Kristoffer Glembo
2010-01-14 11:12 ` [PATCH 2/2] Added leon3_dma_ops and LEON specific David Miller

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=4B4C508F.1090609@gaisler.com \
    --to=kristoffer@gaisler.com \
    --cc=sparclinux@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.