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

Fix endianess bugs.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

+25
+25
include/asm-mips/vga.h
··· 6 6 #ifndef _ASM_VGA_H 7 7 #define _ASM_VGA_H 8 8 9 + #include <asm/byteorder.h> 10 + 9 11 /* 10 12 * On the PC, we can just recalculate addresses and then 11 13 * access the videoram directly without any black magic. ··· 17 15 18 16 #define vga_readb(x) (*(x)) 19 17 #define vga_writeb(x,y) (*(y) = (x)) 18 + 19 + #define VT_BUF_HAVE_RW 20 + /* 21 + * These are only needed for supporting VGA or MDA text mode, which use little 22 + * endian byte ordering. 23 + * In other cases, we can optimize by using native byte ordering and 24 + * <linux/vt_buffer.h> has already done the right job for us. 25 + */ 26 + 27 + static inline void scr_writew(u16 val, volatile u16 *addr) 28 + { 29 + *addr = cpu_to_le16(val); 30 + } 31 + 32 + static inline u16 scr_readw(volatile const u16 *addr) 33 + { 34 + return le16_to_cpu(*addr); 35 + } 36 + 37 + #define scr_memcpyw(d, s, c) memcpy(d, s, c) 38 + #define scr_memmovew(d, s, c) memmove(d, s, c) 39 + #define VT_BUF_HAVE_MEMCPYW 40 + #define VT_BUF_HAVE_MEMMOVEW 20 41 21 42 #endif /* _ASM_VGA_H */