linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Yuri Tikhonov <yur@emcraft.com>
Cc: linuxppc-dev@ozlabs.org, Detlev Zundel <dzu@denx.de>,
	Wolfgang Denk <wd@denx.de>, Ilya Yanok <yanok@emcraft.com>
Subject: Re: Re[4]: [PATCH] katmai.dts: extend DMA ranges; add dma/sysace nodes
Date: Thu, 27 Nov 2008 11:42:39 +1100	[thread overview]
Message-ID: <1227746559.7356.1.camel@pasglop> (raw)
In-Reply-To: <1351427808.20081127032633@emcraft.com>


>  I've implemented (2) (the code is below), and it works. But, 
> admittedly, this (working) looks strange to me because of the 
> following:
>  To be able to use 64-bit PCI mapping on PPC32 I had to replace the
> 'unsigned long' type of pci_dram_offset with 'resource_size_t', which 
> on ppc440spe is 'u64'. So, in dma_alloc_coherent() I put the 64-bit 
> value into the 'dma_addr_t' handle. I use 2.6.27 kernel for testing, 
> which has sizeof(dma_addr_t) == sizeof(u32). Thus, 
> dma_alloc_coherent() cuts the upper 32 bits of PCI address, and returns 
> only low 32-bit part of PCI address to its caller. And, regardless of 
> this fact, the PCI device does operate somehow (this is the PCI-E LSI 
> disk controller served by the drivers/message/fusion/mptbase.c + 
> mptsas.c drivers).
> 
>  I've verified that ppc440spe PCI-E bridge's BARs (PECFGn_BAR0L,H) are 
> configured with the new, 1TB, address value:

Strange... when I look at pci4xx_parse_dma_ranges() I see it
specifically avoiding PCI addresses above 4G ... That needs fixing.

To implement that trick you definitely need to make dma_addr_t 64 bits.

Cheers,
Ben.

  reply	other threads:[~2008-11-27  0:42 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-13  8:49 [PATCH] katmai.dts: extend DMA ranges; add dma/sysace nodes Yuri Tikhonov
2008-11-13  9:25 ` Benjamin Herrenschmidt
2008-11-14  4:45   ` Re[2]: " Yuri Tikhonov
2008-11-14  5:41     ` Benjamin Herrenschmidt
     [not found]       ` <1767195957.20081127032002@emcraft.com>
2008-11-27  0:26         ` Re[4]: " Yuri Tikhonov
2008-11-27  0:42           ` Benjamin Herrenschmidt [this message]
2008-11-27  0:59             ` Re[6]: " Yuri Tikhonov
2008-11-27  4:07               ` Benjamin Herrenschmidt
2008-11-13 11:45 ` Josh Boyer
2008-11-14  5:00   ` Grant Likely
2008-11-14  5:27     ` Re[2]: " Yuri Tikhonov
2008-11-14  5:30       ` Grant Likely
2008-11-14  5:21   ` Yuri Tikhonov

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=1227746559.7356.1.camel@pasglop \
    --to=benh@kernel.crashing.org \
    --cc=dzu@denx.de \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=wd@denx.de \
    --cc=yanok@emcraft.com \
    --cc=yur@emcraft.com \
    /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).