Do you have a read barrier in the IRQ?<div><br></div><div>See &quot;<span style="white-space:pre-wrap">SMP BARRIER PAIRING&quot; in:</span></div><div><span style="white-space:pre-wrap"><br></span></div><div><a href="http://www.kernel.org/doc/Documentation/memory-barriers.txt">http://www.kernel.org/doc/Documentation/memory-barriers.txt</a></div>

<div><br></div><div>-- Wink</div><div><br><div class="gmail_quote">On Wed, Apr 11, 2012 at 4:59 AM, Christopher Harvey <span dir="ltr">&lt;<a href="mailto:chris@basementcode.com">chris@basementcode.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On 10.04.2012 19:58, Wink Saville wrote:<br>
&gt; Sounds to me like there needs to be a flush of the processor cache<br>
&gt; by using memory barriers.<br>
<br>
</div>I used a wmb(); right after I set the value I wanted.<br>
<div class="im"><br>
&gt; I&#39;m guessing that the IRQ is taken on a different thread and possibly<br>
&gt; a different processor and the value needs to be flushed. You might<br>
&gt; try having devid be an atomic_t and then use atomic_set<br>
&gt; and atomic_read so that the &quot;proper&quot; memory barriers are used.<br>
<br>
</div>should I use atomic ops instead of a wmb?<br>
The interrupt can&#39;t happen until the value is assigned completely in<br>
one thread. I&#39;m sure.<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
_______________________________________________<br>
Kernelnewbies mailing list<br>
<a href="mailto:Kernelnewbies@kernelnewbies.org">Kernelnewbies@kernelnewbies.org</a><br>
<a href="http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies" target="_blank">http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies</a><br>
</div></div></blockquote></div><br></div>