On 09/07/2016 22:39, Alexander Gordeev wrote: > > > We could drop the wrappers, and require unit tests to use barriers > > > explicitly, when needed. I'm OK with that, because I think I mostly > > > forget that we have them in the wrappers and use them explicitly > > > anyway... I'll need to double check all the uses though. > > > > According to my findings read*/write* io accessors are used on > > ioremap-ed areas in lib/arm/io.c and lib/virtio-mmio.c at the moment. > > > > Even if read*/write* wrappers are stripped of SMP barriers, > > removing compiler barriers from them would be a bad idea AFAICT. I agree (though ACCESS_ONCE-style volatile access will do). > > So if we need compiler barriers in read*/write* then why not > > just leave SMP barriers there? Fair enough, I'm applying the rest of the series. Paolo > Andrew, Paolo, > > I am paraphrasing myself. So read*/write* are used extensively > by lib/virtio-mmio.c to access memory mapped registers. AFAICT > we do want serialize accesses to devices and need barriers for > that. The same applies to lib/pci-testdev.c when/if it accepted. > -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html