> -----Original Message----- > From: Greg KH [mailto:[email protected]] > Sent: Thursday, March 31, 2016 5:01 PM > To: KY Srinivasan <[email protected]> > Cc: [email protected]; [email protected]; > [email protected]; [email protected]; [email protected]; > [email protected] > Subject: Re: [PATCH 2/7] Drivers: hv: vmbus: Use READ_ONCE() to read > variables that are volatile > > On Wed, Mar 23, 2016 at 05:53:52PM -0700, K. Y. Srinivasan wrote: > > Use the READ_ONCE macro to access variabes that can change > asynchronously. > > Why? What is this "fixing"?
This is to prevent the compiler optimizations and moving the code. This is the recommended mechanism for reading volatile variables. Regards, K. Y > > thanks, > > greg k-h _______________________________________________ devel mailing list [email protected] http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
