From mboxrd@z Thu Jan 1 00:00:00 1970 From: Takashi Iwai Subject: Re: Re: [ALSA - driver 0001138]: errors when installing au8820 modules Date: Tue, 07 Jun 2005 18:29:55 +0200 Message-ID: References: <42A5B7D4.50201@netvigator.com> <200506071716.05194.alien999999999@users.sourceforge.net> Mime-Version: 1.0 (generated by SEMI 1.14.5 - "Awara-Onsen") Content-Type: text/plain; charset=US-ASCII Return-path: In-Reply-To: <200506071716.05194.alien999999999@users.sourceforge.net> Sender: alsa-devel-admin@lists.sourceforge.net Errors-To: alsa-devel-admin@lists.sourceforge.net List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , List-Archive: To: Alien Cc: alsa-devel@lists.sourceforge.net, Raymond , openvortex-dev@nongnu.org List-Id: alsa-devel@alsa-project.org At Tue, 7 Jun 2005 17:16:02 +0200, Alien wrote: > > [1 ] > 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. Takashi ------------------------------------------------------- This SF.Net email is sponsored by: NEC IT Guy Games. How far can you shotput a projector? How fast can you ride your desk chair down the office luge track? If you want to score the big prize, get to know the little guy. Play to win an NEC 61" plasma display: http://www.necitguy.com/?r=20