On Thu, Nov 24, 2016 at 09:08:02PM +0800, Peter Xu wrote: > On Thu, Nov 24, 2016 at 09:47:01AM +0100, Andrew Jones wrote: > > [...] > > > > +static inline uint64_t edu_reg_readq(struct pci_edu_dev *dev, int reg) > > > +{ > > > + return __raw_readq(edu_reg(dev, reg)); > > > +} > > > + > > > +static inline uint32_t edu_reg_readl(struct pci_edu_dev *dev, int reg) > > > +{ > > > + return __raw_readl(edu_reg(dev, reg)); > > > +} > > > + > > > +static inline void edu_reg_writeq(struct pci_edu_dev *dev, int reg, > > > + uint64_t val) > > > +{ > > > + __raw_writeq(val, edu_reg(dev, reg)); > > > +} > > > + > > > +static inline void edu_reg_writel(struct pci_edu_dev *dev, int reg, > > > + uint32_t val) > > > +{ > > > + __raw_writel(val, edu_reg(dev, reg)); > > > +} > > > > Can you refresh my memory on why we're using __raw accessors here instead > > of the __raw wrappers that include barriers and endian conversion? Hmm, > > actually it doesn't look like the EDU device specifies an endianness... > > I see that __raw wrappers (read[bwlq]) are assuming the data is little > endian, while edu device is configured as native endianess > (DEVICE_NATIVE_ENDIAN). So looks like using __raw accessors should be > the correct way? Yeah, I guess that's correct. Native endian...bleh. > > But, yes here I missed memory barriers. I have only volatile > protections (which __raw_*() provides). > > Thanks, > > -- peterx > -- > 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 -- 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