All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joel Soete <soete.joel@scarlet.be>
To: Grant Grundler <grundler@parisc-linux.org>
Cc: parisc-linux <parisc-linux@parisc-linux.org>
Subject: [parisc-linux] Re: CCIO dma io_command and related io_tlb format questions.
Date: Fri, 20 Oct 2006 17:18:28 +0000	[thread overview]
Message-ID: <453904E4.60608@scarlet.be> (raw)
In-Reply-To: <20061020155059.GB23094@colo.lackof.org>



Grant Grundler wrote:
> On Fri, Oct 20, 2006 at 12:04:47PM +0000, Joel Soete wrote:
>> mmm offhand wasn't there limits in ccio page size like in ia64 sba comments:
>>> /*
>>> ** The zx1 IOC supports 4/8/16/64KB page sizes (see TCNFG register)
> 
> I don't remember.
> ia64 sba is the 3rd generation IO controller.
> U2 (ccio) is the first generation.
> Sorry, I'm not interested in comparing them.
> 
no pb,

>>> Uhm....sounds reasonable to me. All I know is I believe the existing
>>> code use of chain_id is correct.
>>>
>> Just come back here shortly: the computed values with my hw config (256Mb 
>> and 2 ccio) are
>>> Found U2 at 0xfff88000
>>> ccio_ioc_init() hpa 0x00008000 mem 256Mb IOV 128Mb (27 bits)
>>>  base 10740000
>>> ccio_ioc_init() res_size 0x1000
>>>  chainid_shift 0x13
>>>  chainid_mask 0x7f80000
> 
> This looks correct.
> 
>>> Found U2 at 0xfff8a000
>>> ccio_ioc_init() hpa 0x0000a000 mem 256Mb IOV 128Mb (27 bits)
>>>  base 10780000
>>> ccio_ioc_init() res_size 0x1000
>>>  chainid_shift 0x13
>>>  chainid_mask 0x7f80000
>> otoh, applying this other formula [io_chain_id_mask = (~(CHAINID_SIZE -1)); 
>> with CHAINID_SIZE = (1UL << ioc->chainid_shift)], I got:
>>>  chainid_mask 0xfff80000
> 
> This second chainid_mask is 13 bits wide.
mmm sorry how do you compute this wide value?

> Remember that the mask can only be 8 bits wide for ccio.
> 

Btw I just discover an interesting comment in rope.h
> /*
> ** IOC supports 4/8/16/64KB page sizes (see TCNFG register)
> ** It's safer (avoid memory corruption) to keep DMA page mappings
> ** equivalently sized to VM PAGE_SIZE.
> **
[snip]
> **
> ** PAGE_SIZE could be greater than IOVP_SIZE. But not the inverse.
> */

and specialy:
 > ** It's safer (avoid memory corruption) to keep DMA page mappings
 > ** equivalently sized to VM PAGE_SIZE.

which was related to the original question I didn't reach to explain better.

So even if I don't understand why, we have to limits the number of iotlb entries to 256 (without doc I just accept it).
but in term to 'avoid memory corruption' why don't we limit the iova_space_size to 256 * IOVP_SIZE?

Many thanks,
	Joel
_______________________________________________
parisc-linux mailing list
parisc-linux@lists.parisc-linux.org
http://lists.parisc-linux.org/mailman/listinfo/parisc-linux

  parent reply	other threads:[~2006-10-20 17:18 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-11  8:48 [parisc-linux] Re: CCIO dma io_command and related io_tlb format questions Joel Soete
2006-10-12  1:04 ` Grant Grundler
2006-10-12  3:27   ` James Bottomley
     [not found]   ` <4538BB5F.5040703@scarlet.be>
2006-10-20 15:50     ` Grant Grundler
2006-10-20 16:31       ` Grant Grundler
2006-10-20 17:18       ` Joel Soete [this message]
2006-10-21  6:19         ` Grant Grundler
2006-10-21 17:17           ` Joel Soete
2006-10-23  4:34             ` Grant Grundler
     [not found] <J7AHPO$ED967CCDD9E203D6968EA2045C11A08A@scarlet.be>
     [not found] ` <45351637.4070604@computer.org>
2006-10-17 19:07   ` Kyle McMartin
     [not found] <J788XR$E1A2FE043CF88207AEC13412E82258F2@scarlet.be>
2006-10-16 14:37 ` Michael S. Zick
2006-10-17  5:59 ` Grant Grundler
     [not found] <J70JNP$255156D3B4F90827118C5EFE40FD3ABF@scarlet.be>
2006-10-12 19:55 ` Grant Grundler
2006-10-13 10:56   ` Joel Soete
2006-10-13 16:44     ` Grant Grundler
     [not found]       ` <4530DF1F.5060601@scarlet.be>
2006-10-14 14:11         ` Matthew Wilcox
2006-10-14 16:40           ` Michael S. Zick
2006-10-14 23:35           ` Joel Soete
2006-10-15  3:28             ` Grant Grundler
  -- strict thread matches above, loose matches on Subject: below --
2006-10-09  9:41 [parisc-linux] " Joel Soete
2006-10-10 22:08 ` [parisc-linux] " Grant Grundler

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=453904E4.60608@scarlet.be \
    --to=soete.joel@scarlet.be \
    --cc=grundler@parisc-linux.org \
    --cc=parisc-linux@parisc-linux.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.