lkml.org 
[lkml]   [2008]   [Oct]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Looks broken to me: x86, cyrix: debug
On Sat, Oct 11, 2008 at 10:58:58PM +0200, Ingo Molnar wrote:
>
> * Maciej W. Rozycki <macro@linux-mips.org> wrote:
>
> > On Sat, 11 Oct 2008, Alan Cox wrote:
> >
> > > > +#define getCx86_old(reg) ({ outb((reg), 0x22); inb(0x23); })
> > >
> > > Doesn't expand to any kind of returned value.
> >
> > Well, actually it returns the value of the inb() expression -- cf the
> > semantics of compound statements. The rest looks suspicious indeed.
>
> indeed it's broken - will sort it out. It's all about breakage that has
> been in this code since v2.6.20, see c6744955d0. Will likely revert the
> whole thing.

In fact the whole commit looks buggy to me as it simply reintroduces the
old bug at several places. The correct way of accessing the registers is
precisely through the inline functions and never through a macro due to
the ordering problem.

Willy



\
 
 \ /
  Last update: 2008-10-12 00:51    [W:0.041 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site