lkml.org 
[lkml]   [2008]   [May]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: MMIO and gcc re-ordering issue


On Tue, 27 May 2008, Linus Torvalds wrote:
>
> Here's a UNTESTED patch for x86 that may or may not compile and work, and
> which serializes (on a compiler level) the IO accesses against regular
> memory accesses.

Ok, so it at least boots on x86-32. Thus probably on x86-64 too (since the
code is now shared). I didn't look at whether it generates much bigger
code due to the potential extra serialization, but some of the code
generation I looked at looked fine.

IOW, it doesn't at least create any _obviously_ worse code, and it should
be arguably safer than assuming the compiler does volatile accesses the
way we want it to.

Linus


\
 
 \ /
  Last update: 2008-05-27 19:35    [W:0.090 / U:4.152 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site