hc
2024-10-22 8ac6c7a54ed1b98d142dce24b11c6de6a1e239a5
kernel/arch/arm/include/asm/domain.h
....@@ -1,11 +1,8 @@
1
+/* SPDX-License-Identifier: GPL-2.0-only */
12 /*
23 * arch/arm/include/asm/domain.h
34 *
45 * Copyright (C) 1999 Russell King.
5
- *
6
- * This program is free software; you can redistribute it and/or modify
7
- * it under the terms of the GNU General Public License version 2 as
8
- * published by the Free Software Foundation.
96 */
107 #ifndef __ASM_PROC_DOMAIN_H
118 #define __ASM_PROC_DOMAIN_H
....@@ -85,7 +82,7 @@
8582 #ifndef __ASSEMBLY__
8683
8784 #ifdef CONFIG_CPU_CP15_MMU
88
-static inline unsigned int get_domain(void)
85
+static __always_inline unsigned int get_domain(void)
8986 {
9087 unsigned int domain;
9188
....@@ -97,7 +94,7 @@
9794 return domain;
9895 }
9996
100
-static inline void set_domain(unsigned val)
97
+static __always_inline void set_domain(unsigned int val)
10198 {
10299 asm volatile(
103100 "mcr p15, 0, %0, c3, c0 @ set domain"
....@@ -105,12 +102,12 @@
105102 isb();
106103 }
107104 #else
108
-static inline unsigned int get_domain(void)
105
+static __always_inline unsigned int get_domain(void)
109106 {
110107 return 0;
111108 }
112109
113
-static inline void set_domain(unsigned val)
110
+static __always_inline void set_domain(unsigned int val)
114111 {
115112 }
116113 #endif
....@@ -133,9 +130,11 @@
133130 * instructions (inline assembly)
134131 */
135132 #ifdef CONFIG_CPU_USE_DOMAINS
136
-#define TUSER(instr) #instr "t"
133
+#define TUSER(instr) TUSERCOND(instr, )
134
+#define TUSERCOND(instr, cond) #instr "t" #cond
137135 #else
138
-#define TUSER(instr) #instr
136
+#define TUSER(instr) TUSERCOND(instr, )
137
+#define TUSERCOND(instr, cond) #instr #cond
139138 #endif
140139
141140 #else /* __ASSEMBLY__ */