Linux PARISC architecture development
 help / color / mirror / Atom feed
* [parisc-linux] Re: CCIO dma io_command and related io_tlb format questions.
@ 2006-10-11  8:48 Joel Soete
  2006-10-12  1:04 ` Grant Grundler
  0 siblings, 1 reply; 20+ messages in thread
From: Joel Soete @ 2006-10-11  8:48 UTC (permalink / raw)
  To: grundler; +Cc: parisc-linux

> On Mon, Oct 09, 2006 at 11:41:11AM +0200, Joel Soete wrote:
> > Hello Grant,
> > 
> > I back port the sba sg list manager in ccio-dma on my d380 (not enoug=
h time to
> > test c110).
> ...
> 
> Sounds like you have some debugging to do still...
(why I mentioned progress and failures ;-) )

> I'll try to
> answer the questions below.
> 
> > That said, there are no public doc of this IO stuff
> 
> There is none for CCIO. And I no longer have access to those
> documents (deleted them from my laptop/workstations).
too bad ;_(

> You'd need access to U2/Uturn ERS via OSDL.
> 
Any links (I looking for in http://ftp.parisc-linux.org/docs/chips and mo=
re
google search but no success?)

> 
> > and so I didn't change those 2 hunks:
> > [snip]
> > static CCIO_INLINE void
> > ccio_clear_io_tlb(struct ioc *ioc, dma_addr_t iovp, size_t byte_cnt)
> ...
> > ccio_ioc_init(struct ioc *ioc)
> ...
> > About which cames to me 2 questions:
> >    1/ what is supposed to contain an io_tlb entry:
> 
> You want to know the layout of the "ioc_command" register.
> It is a combination of iovp and command.
> 
> 
> >       a io (page size) address as seems to say the value
> >      ("CMD_TLB_PURGE | iovp") in ccio_clear_io_tlb()
> 
> Offhand I'm not sure of the exact split but guess it's
> lower 12 bits for command and upper 20 bits for IO Virtual Page
> as used in ccio_clear_io_tlb().
> 
mmm could it be the pb: the computed chainid_shift on my d380 is 19 (deci=
mal)?

btw what's about the IOV page size used by sba (IOVP_SIZE i.e. PAGE_SIZE =
till
now?)

The question for ccio is: why using chainid_shift (by set io_chain_id_mas=
k)
different then IOVP_SHIFT, as ,as far as I understand, we manage only
IPVP_SIZE page? (imho couls be what means "FIXME: Can we change byte_cnt =
to
pages_mappged" of ccio_mark_invalid?)

btw what is correct for you in this setup:
WRITE_U32(CCIO_CHAINID_MASK << ioc->chainid_shift,
&ioc->ioc_regs->io_chain_id_mask);

the name variable seems to said it should contains the mask correcponding=
 to
the chainid_shift i.e. imho:
let say CHAINID_SIZE =3D (1UL << ioc->chainid_shift) and so
&ioc->ioc_regs->io_chain_id_mask =3D (~(CHAINID_SIZE -1))



> >       or a memory page size should be splited in
> >       severall tlb entries per ioc->chainid_shift?
> 
> ccio_ioc_init is just clearing the entire IO TLB.
> We know there are only "1<<CCIO_CHAINID_SHIFT" IO TLB entries.
> See comments above where CCIO_CHAINID_SHIFT is defined.
> ccio_clear_io_tlb() is just purging all of them.
> 
ok.

Ah btw there wasn't any 'flush purges' action o do with ccio like in sba =
or
only to be managed with fdc/sync?

> >    2/ what is supposed to contain the ccio io_command register, I mea=
n that
> >       I don't understand what seems to me to be different io_command
> >       contents for CMD_TLB_DIRECT_WRITE or CMD_TLB_PURGE?
> 
> Generally we only need to use CMD_TLB_PURGE to avoid use of stale entri=
es.
no pb to understand it.

> You shouldn't need to change the uses of CMD_TLB_DIRECT_WRITE.
> 
but here it's a bit confusing: we are at the kernel startup and just init=
 the
ccio so afaik nothing yet in ccio tlb or at least we don't know what it
contains and we are writing this CMD_TLB_DIRECT_WRITE for this iov page
address (i << chainid_shift) for i =3D 1 to 256 (the 256 Uturn tlb entrie=
s).

That said (without doc), I wouldn't touch to this loop.

> > If you still have (or access to) this internal doc, it would be great=
 if you
> > could find some time to explain me those stuff.
> 
> Sorry - I don't.
> 
No pb, that already helpfull.

May be a last q.

in your code comment you spoke about spa_shift but I didn't find it anywh=
ere
else (neither in the code nor in iodc doc), any idea which symbol is rela=
ted to?

> Hope that helps,

Yes, thanks a lot,
   Joel
> grant
> 
> =0A=0A----------=0AClub Scarlet : Tout le monde gagne! Si vous devenez =
aujourd'hui Scarlet One grace a un client existant de Scarlet, vous recev=
ez tous les deux un cadeau d'une valeur de 50 euros! Surfez vite sur http=
://www.clubscarlet.be

_______________________________________________
parisc-linux mailing list
parisc-linux@lists.parisc-linux.org
http://lists.parisc-linux.org/mailman/listinfo/parisc-linux

^ permalink raw reply	[flat|nested] 20+ messages in thread
[parent not found: <J7AHPO$ED967CCDD9E203D6968EA2045C11A08A@scarlet.be>]
[parent not found: <J788XR$E1A2FE043CF88207AEC13412E82258F2@scarlet.be>]
[parent not found: <J70JNP$255156D3B4F90827118C5EFE40FD3ABF@scarlet.be>]
* [parisc-linux] CCIO dma io_command and related io_tlb format questions.
@ 2006-10-09  9:41 Joel Soete
  2006-10-10 22:08 ` [parisc-linux] " Grant Grundler
  0 siblings, 1 reply; 20+ messages in thread
From: Joel Soete @ 2006-10-09  9:41 UTC (permalink / raw)
  To: parisc-linux

Hello Grant,

I back port the sba sg list manager in ccio-dma on my d380 (not enough ti=
me to
test c110).

On one hand, it seems to improve a bit ncr53c720 behaviour: tar/rm loop t=
est
run longer (at least 2h in place of 5/10 min)

Otoh no change (may be even worse) for ncr53c710 and break secondary nic =
(the
setup of this card make panicing the system?)

That said, there are no public doc of this IO stuff and so I didn't chang=
e
those 2 hunks:
[snip]
static CCIO_INLINE void
ccio_clear_io_tlb(struct ioc *ioc, dma_addr_t iovp, size_t byte_cnt)
{
        u32 chain_size =3D 1 << ioc->chainid_shift;

        iovp &=3D IOVP_MASK;      /* clear offset bits, just want pagenum=
 */
        byte_cnt +=3D chain_size;

        while(byte_cnt > chain_size) {
                WRITE_U32(CMD_TLB_PURGE | iovp, &ioc->ioc_regs->io_comman=
d);   
                iovp +=3D chain_size;
                byte_cnt -=3D chain_size;
        }
}

[snip]

static void
ccio_ioc_init(struct ioc *ioc)
{
[snip]

        /*
        ** Initialize all I/O TLB entries to 0 (Valid bit off).
        */
        WRITE_U32(0, &ioc->ioc_regs->io_tlb_entry_m);
        WRITE_U32(0, &ioc->ioc_regs->io_tlb_entry_l);

        for(i =3D 1 << CCIO_CHAINID_SHIFT; i ; i--) {
                WRITE_U32((CMD_TLB_DIRECT_WRITE | (i << ioc->chainid_shif=
t)),
                          &ioc->ioc_regs->io_command);
        } 
}
...

About which cames to me 2 questions:
   1/ what is supposed to contain an io_tlb entry: a io (page size) addre=
ss
      as seems to say the value ("CMD_TLB_PURGE | iovp")
      in ccio_clear_io_tlb() or a memory page size should be splited in
      severall tlb entries per ioc->chainid_shift?

   2/ what is supposed to contain the ccio io_command register, I mean th=
at 
      I don't understand what seems to me to be different io_command
      contents for CMD_TLB_DIRECT_WRITE or CMD_TLB_PURGE?

If you still have (or access to) this internal doc, it would be great if =
you
could find some time to explain me those stuff.

TIA,
    Joel
=0A=0A----------=0AClub Scarlet : Tout le monde gagne! Si vous devenez au=
jourd'hui Scarlet One grace a un client existant de Scarlet, vous recevez=
 tous les deux un cadeau d'une valeur de 50 euros! Surfez vite sur http:/=
/www.clubscarlet.be

_______________________________________________
parisc-linux mailing list
parisc-linux@lists.parisc-linux.org
http://lists.parisc-linux.org/mailman/listinfo/parisc-linux

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2006-10-23  4:34 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox