hc
2024-02-20 102a0743326a03cd1a1202ceda21e175b7d3575c
kernel/arch/x86/boot/tty.c
....@@ -1,11 +1,9 @@
1
+// SPDX-License-Identifier: GPL-2.0-only
12 /* -*- linux-c -*- ------------------------------------------------------- *
23 *
34 * Copyright (C) 1991, 1992 Linus Torvalds
45 * Copyright 2007 rPath, Inc. - All Rights Reserved
56 * Copyright 2009 Intel Corporation; author H. Peter Anvin
6
- *
7
- * This file is part of the Linux kernel, and is made available under
8
- * the terms of the GNU General Public License version 2.
97 *
108 * ----------------------------------------------------------------------- */
119
....@@ -27,7 +25,7 @@
2725 * error during initialization.
2826 */
2927
30
-static void __attribute__((section(".inittext"))) serial_putchar(int ch)
28
+static void __section(".inittext") serial_putchar(int ch)
3129 {
3230 unsigned timeout = 0xffff;
3331
....@@ -37,7 +35,7 @@
3735 outb(ch, early_serial_base + TXR);
3836 }
3937
40
-static void __attribute__((section(".inittext"))) bios_putchar(int ch)
38
+static void __section(".inittext") bios_putchar(int ch)
4139 {
4240 struct biosregs ireg;
4341
....@@ -49,7 +47,7 @@
4947 intcall(0x10, &ireg, NULL);
5048 }
5149
52
-void __attribute__((section(".inittext"))) putchar(int ch)
50
+void __section(".inittext") putchar(int ch)
5351 {
5452 if (ch == '\n')
5553 putchar('\r'); /* \n -> \r\n */
....@@ -60,7 +58,7 @@
6058 serial_putchar(ch);
6159 }
6260
63
-void __attribute__((section(".inittext"))) puts(const char *str)
61
+void __section(".inittext") puts(const char *str)
6462 {
6563 while (*str)
6664 putchar(*str++);