[lkml]   [2006]   [May]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 53 of 53] ipath - add memory barrier when waiting for writes
>     ralphc> I don't have a lot to add to this other than I looked at
> ralphc> the assembly code output for -Os and -O3 and both looked
> ralphc> OK. I put the mb() in to be sure the writes were complete
> ralphc> and I found this to work by experimentation. Without it,
> ralphc> the driver fails to read the EEPROM correctly.
> Hmm, that doesn't give me a warm fuzzy feeling. Basically on x86-64
> you're adding an unneeded mfence instruction to work around
> miscompilation?
> Is i2c_wait_for_writes miscompiled without the mb() with -Os? What
> does the bad assembly look like?
> - R.

We had a power failure here so I'm not able to reproduce the
assembly code at the moment. What I remember from looking
at the code is that the code for ipath_read_kreg32() was
present in i2c_wait_for_writes() when compiled -Os so
it didn't look like a compiler bug. I probably could put the
mb() at the end of i2c_gpio_set() if that makes you more
comfortable. The mb() is definitely needed though.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2006-05-16 01:27    [W:0.088 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site