.. | .. |
---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-only */ |
---|
1 | 2 | /* |
---|
2 | 3 | * arch/arm/include/asm/domain.h |
---|
3 | 4 | * |
---|
4 | 5 | * 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. |
---|
9 | 6 | */ |
---|
10 | 7 | #ifndef __ASM_PROC_DOMAIN_H |
---|
11 | 8 | #define __ASM_PROC_DOMAIN_H |
---|
.. | .. |
---|
85 | 82 | #ifndef __ASSEMBLY__ |
---|
86 | 83 | |
---|
87 | 84 | #ifdef CONFIG_CPU_CP15_MMU |
---|
88 | | -static inline unsigned int get_domain(void) |
---|
| 85 | +static __always_inline unsigned int get_domain(void) |
---|
89 | 86 | { |
---|
90 | 87 | unsigned int domain; |
---|
91 | 88 | |
---|
.. | .. |
---|
97 | 94 | return domain; |
---|
98 | 95 | } |
---|
99 | 96 | |
---|
100 | | -static inline void set_domain(unsigned val) |
---|
| 97 | +static __always_inline void set_domain(unsigned int val) |
---|
101 | 98 | { |
---|
102 | 99 | asm volatile( |
---|
103 | 100 | "mcr p15, 0, %0, c3, c0 @ set domain" |
---|
.. | .. |
---|
105 | 102 | isb(); |
---|
106 | 103 | } |
---|
107 | 104 | #else |
---|
108 | | -static inline unsigned int get_domain(void) |
---|
| 105 | +static __always_inline unsigned int get_domain(void) |
---|
109 | 106 | { |
---|
110 | 107 | return 0; |
---|
111 | 108 | } |
---|
112 | 109 | |
---|
113 | | -static inline void set_domain(unsigned val) |
---|
| 110 | +static __always_inline void set_domain(unsigned int val) |
---|
114 | 111 | { |
---|
115 | 112 | } |
---|
116 | 113 | #endif |
---|
.. | .. |
---|
133 | 130 | * instructions (inline assembly) |
---|
134 | 131 | */ |
---|
135 | 132 | #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 |
---|
137 | 135 | #else |
---|
138 | | -#define TUSER(instr) #instr |
---|
| 136 | +#define TUSER(instr) TUSERCOND(instr, ) |
---|
| 137 | +#define TUSERCOND(instr, cond) #instr #cond |
---|
139 | 138 | #endif |
---|
140 | 139 | |
---|
141 | 140 | #else /* __ASSEMBLY__ */ |
---|