~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/linux/vt_buffer.h

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /include/linux/vt_buffer.h (Version linux-6.12-rc7) and /include/linux/vt_buffer.h (Version linux-5.12.19)


  1 /* SPDX-License-Identifier: GPL-2.0 */              1 /* SPDX-License-Identifier: GPL-2.0 */
  2 /*                                                  2 /*
  3  *      include/linux/vt_buffer.h -- Access to      3  *      include/linux/vt_buffer.h -- Access to VT screen buffer
  4  *                                                  4  *
  5  *      (c) 1998 Martin Mares <mj@ucw.cz>           5  *      (c) 1998 Martin Mares <mj@ucw.cz>
  6  *                                                  6  *
  7  *      This is a set of macros and functions       7  *      This is a set of macros and functions which are used in the
  8  *      console driver and related code to acc      8  *      console driver and related code to access the screen buffer.
  9  *      In most cases the console works with s      9  *      In most cases the console works with simple in-memory buffer,
 10  *      but when handling hardware text mode c     10  *      but when handling hardware text mode consoles, we store
 11  *      the foreground console directly in vid     11  *      the foreground console directly in video memory.
 12  */                                                12  */
 13                                                    13 
 14 #ifndef _LINUX_VT_BUFFER_H_                        14 #ifndef _LINUX_VT_BUFFER_H_
 15 #define _LINUX_VT_BUFFER_H_                        15 #define _LINUX_VT_BUFFER_H_
 16                                                    16 
 17 #include <linux/string.h>                          17 #include <linux/string.h>
 18                                                    18 
 19 #if IS_ENABLED(CONFIG_VGA_CONSOLE) || IS_ENABL !!  19 #if defined(CONFIG_VGA_CONSOLE) || defined(CONFIG_MDA_CONSOLE)
 20 #include <asm/vga.h>                               20 #include <asm/vga.h>
 21 #endif                                             21 #endif
 22                                                    22 
 23 #ifndef VT_BUF_HAVE_RW                             23 #ifndef VT_BUF_HAVE_RW
 24 #define scr_writew(val, addr) (*(addr) = (val)     24 #define scr_writew(val, addr) (*(addr) = (val))
 25 #define scr_readw(addr) (*(addr))                  25 #define scr_readw(addr) (*(addr))
 26 #endif                                             26 #endif
 27                                                    27 
 28 #ifndef VT_BUF_HAVE_MEMSETW                        28 #ifndef VT_BUF_HAVE_MEMSETW
 29 static inline void scr_memsetw(u16 *s, u16 c,      29 static inline void scr_memsetw(u16 *s, u16 c, unsigned int count)
 30 {                                                  30 {
 31 #ifdef VT_BUF_HAVE_RW                              31 #ifdef VT_BUF_HAVE_RW
 32         count /= 2;                                32         count /= 2;
 33         while (count--)                            33         while (count--)
 34                 scr_writew(c, s++);                34                 scr_writew(c, s++);
 35 #else                                              35 #else
 36         memset16(s, c, count / 2);                 36         memset16(s, c, count / 2);
 37 #endif                                             37 #endif
 38 }                                                  38 }
 39 #endif                                             39 #endif
 40                                                    40 
 41 #ifndef VT_BUF_HAVE_MEMCPYW                        41 #ifndef VT_BUF_HAVE_MEMCPYW
 42 static inline void scr_memcpyw(u16 *d, const u     42 static inline void scr_memcpyw(u16 *d, const u16 *s, unsigned int count)
 43 {                                                  43 {
 44 #ifdef VT_BUF_HAVE_RW                              44 #ifdef VT_BUF_HAVE_RW
 45         count /= 2;                                45         count /= 2;
 46         while (count--)                            46         while (count--)
 47                 scr_writew(scr_readw(s++), d++     47                 scr_writew(scr_readw(s++), d++);
 48 #else                                              48 #else
 49         memcpy(d, s, count);                       49         memcpy(d, s, count);
 50 #endif                                             50 #endif
 51 }                                                  51 }
 52 #endif                                             52 #endif
 53                                                    53 
 54 #ifndef VT_BUF_HAVE_MEMMOVEW                       54 #ifndef VT_BUF_HAVE_MEMMOVEW
 55 static inline void scr_memmovew(u16 *d, const      55 static inline void scr_memmovew(u16 *d, const u16 *s, unsigned int count)
 56 {                                                  56 {
 57 #ifdef VT_BUF_HAVE_RW                              57 #ifdef VT_BUF_HAVE_RW
 58         if (d < s)                                 58         if (d < s)
 59                 scr_memcpyw(d, s, count);          59                 scr_memcpyw(d, s, count);
 60         else {                                     60         else {
 61                 count /= 2;                        61                 count /= 2;
 62                 d += count;                        62                 d += count;
 63                 s += count;                        63                 s += count;
 64                 while (count--)                    64                 while (count--)
 65                         scr_writew(scr_readw(-     65                         scr_writew(scr_readw(--s), --d);
 66         }                                          66         }
 67 #else                                              67 #else
 68         memmove(d, s, count);                      68         memmove(d, s, count);
 69 #endif                                             69 #endif
 70 }                                                  70 }
 71 #endif                                             71 #endif
 72                                                    72 
 73 #endif                                             73 #endif
 74                                                    74 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php