Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

powerpc: Add real mode cache inhibited IO accessors

These accessors allow us to do cache inhibited accesses when in real
mode. They should only be used in real mode.

Signed-off-by: Michael Ellerman <michael@ellerman.id.au>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>

authored by

Michael Ellerman and committed by
Benjamin Herrenschmidt
0150a3dd fb48dc22

+16
+16
arch/powerpc/include/asm/io.h
··· 191 191 192 192 #endif /* __BIG_ENDIAN */ 193 193 194 + /* 195 + * Cache inhibitied accessors for use in real mode, you don't want to use these 196 + * unless you know what you're doing. 197 + * 198 + * NB. These use the cpu byte ordering. 199 + */ 200 + DEF_MMIO_OUT_X(out_rm8, 8, stbcix); 201 + DEF_MMIO_OUT_X(out_rm16, 16, sthcix); 202 + DEF_MMIO_OUT_X(out_rm32, 32, stwcix); 203 + DEF_MMIO_IN_X(in_rm8, 8, lbzcix); 204 + DEF_MMIO_IN_X(in_rm16, 16, lhzcix); 205 + DEF_MMIO_IN_X(in_rm32, 32, lwzcix); 206 + 194 207 #ifdef __powerpc64__ 208 + 209 + DEF_MMIO_OUT_X(out_rm64, 64, stdcix); 210 + DEF_MMIO_IN_X(in_rm64, 64, ldcix); 195 211 196 212 #ifdef __BIG_ENDIAN__ 197 213 DEF_MMIO_OUT_D(out_be64, 64, std);