openvortex-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Openvortex-dev] Re: [Alsa-devel] Re: [ALSA - driver 0001138]: error


From: Alien
Subject: Re: [Openvortex-dev] Re: [Alsa-devel] Re: [ALSA - driver 0001138]: errors when installing au8820 modules
Date: Tue, 7 Jun 2005 20:02:47 +0200
User-agent: KMail/1.7.2

Op dinsdag 7 juni 2005 19:38, schreef Igor Kovalenko:
> Alien wrote:
> > Op dinsdag 7 juni 2005 19:05, schreef Igor Kovalenko:
> >>Takashi Iwai wrote:
> >>>At Tue, 7 Jun 2005 17:16:02 +0200,
> >>>
> >>>Alien wrote:
> >>>>[1  <text/plain; iso-8859-1 (quoted-printable)>]
> >>>>
> >>>>Op dinsdag 7 juni 2005 17:05, schreef Raymond:
> >>>>>The patch (diff11.diff) cause segmenation fault on my 32bit machine
> >>>>>during /etc/init.d/alsasound start
> >>>>>
> >>>>>http://savannah.nongnu.org/patch/?func=detailitem&item_id=3948
> >>>>>
> >>>>>Do anyone know why readl() and writel() behave different in i386
> >>>>>(32bits) and AMD64 (64bits) ?
> >>>>>
> >>>>>http://sourceforge.net/mailarchive/message.php?msg_id=10773530
> >>>>>
> >>>>>
> >>>>>#ifndef CONFIG_X86_64
> >>>>>
> >>>>>#define        hwread(x,y) readl((x)+((y)>>2))
> >>>>>#define        hwwrite(x,y,z) writel((z),(x)+((y)>>2))
> >>>>>
> >>>>>#else
> >>>>>
> >>>>>#define        hwread(x,y) readl((x)+(y))
> >>>>>#define        hwwrite(x,y,z) writel((z),(x)+(y))
> >>>>>
> >>>>>#endif
> >>>>
> >>>>that doesn't look good, unless the mmio is void* in 32bit and unsigned
> >>>>long* in x86_64...
> >>>>
> >>>>'unsigned long* mmio' should be preferred and together with '#define
> >>>>hwread(x,y) readl((x)+(y))' , this works for both platforms
> >>>
> >>>I guess using "unsigned long" for both architectures is broken, too.
> >>>Should be "u32" to be arch-independent.
> >>
> >>I strongly believe readl() and writel() on x86_64 does 32 bit
> >> reads/writes. (checked linux-2.6.12-rc5). Therefore reads/writes are of
> >> correct size with that patch - should be something different.
> >
> > i know that does not work!
> >
> > when i started doing this, i got segfaults because of the >>2 .
> >
> > readl and writel do long operations as evidenced by the 'l'
> >
> > i know this seems weird, but this is memory-mapped, and appearantly it's
> > memory mapped to long, anyway; when i do 'unsigned long* mmio' and i use
> > readl and writel without any bitshifts, it works...
> >
> > you may believe what you want, but i _know_ that on x86_64, i _NEED_
> > unsigned long* mmio and no bitshifting to get this to work.
> >
> > maybe the problem lies with writel and readl to begin with, maybe if you
> > wrote an int, it would work...
> >
> > AL13N
>
> OK, then let's put it this way: change to void* and removal of shifts is to
> make address operations correct. That is the address itself is at the same
> offset on all arches. Then readl/writel just do 32 bit read/write which is
> what we need. May be it is the mapping is wrong?

change to void* and removal of shifts will make it wrong on both systems, 
unless you modify all the parameters to make them use byte-offsets, will 
'allthough that would be weird' make it work _only_ on 32bit systems...

> Please check if you applied the patch correctly - I suspect you used
> different kernel version and patch may have missed some points... BTW the
> segfault (oops) report would be handy.

I never did apply the patch, i made a modification before the patch (which is 
available on the net somewhere, probably some mailing list) before the patch 
was out. the oops is also at the same place... but that all is several months 
ago. i'll make a patch to what i have now, it's more or less similar to the 
original patch.

hmm, I seem to have applied the patch after all, and made a little 
modifications...

this is a patch against some CVS version of a few weeks ago not more than 3 
weeks i think...

see if this works for you

Attachment: au88x0_12.patch
Description: Text Data

Attachment: pgpHq3R37GaJx.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]