Benjamin Herrenschmidt <b...@kernel.crashing.org> writes: > We have all sort of variants of MMIO accessors for the real mode > instructions. This creates a clean set of accessors based on > Linux normal naming conventions, replacing all occurrences of > the old ones in the tree. > > I have purposefully removed the "out/in" variants in favor of > only including __raw variants. Any code using these is already > pretty much hand tuned to operate in a very specific environment. > I've fixed up the 2 users (only one of them actually needed > a barrier in the first place).
> diff --git a/arch/powerpc/include/asm/io.h b/arch/powerpc/include/asm/io.h > index 5ed2924..45c136a 100644 > --- a/arch/powerpc/include/asm/io.h > +++ b/arch/powerpc/include/asm/io.h > @@ -417,15 +372,64 @@ static inline void __raw_writeq(unsigned long v, > volatile void __iomem *addr) > } > > /* > - * Real mode version of the above. stdcix is only supposed to be used > - * in hypervisor real mode as per the architecture spec. > + * Real mode versions of the above. Those instructions are only supposed > + * to be used in hypervisor real mode as per the architecture spec. > */ > +static inline void __raw_rm_writeb(u8 val, volatile void __iomem *paddr) > +{ > + __asm__ __volatile__("stbcix %0,0,%1" > + : : "r" (val), "r" (paddr) : "memory"); > +} I've never liked the "rm" naming. It makes me think rm -rf. Can we just call them real_mode_writeb() and so on? Or add more leading underscores to your taste. cheers