|
8 | 8 | #include <linux/randomize_kstack.h> |
9 | 9 | #include <linux/syscalls.h> |
10 | 10 |
|
11 | | -#include <asm/daifflags.h> |
12 | 11 | #include <asm/debug-monitors.h> |
13 | 12 | #include <asm/exception.h> |
14 | 13 | #include <asm/fpsimd.h> |
@@ -101,8 +100,6 @@ static void el0_svc_common(struct pt_regs *regs, int scno, int sc_nr, |
101 | 100 | * (Similarly for HVC and SMC elsewhere.) |
102 | 101 | */ |
103 | 102 |
|
104 | | - local_daif_restore(DAIF_PROCCTX); |
105 | | - |
106 | 103 | if (flags & _TIF_MTE_ASYNC_FAULT) { |
107 | 104 | /* |
108 | 105 | * Process the asynchronous tag check fault before the actual |
@@ -153,38 +150,8 @@ static void el0_svc_common(struct pt_regs *regs, int scno, int sc_nr, |
153 | 150 | syscall_trace_exit(regs); |
154 | 151 | } |
155 | 152 |
|
156 | | -/* |
157 | | - * As per the ABI exit SME streaming mode and clear the SVE state not |
158 | | - * shared with FPSIMD on syscall entry. |
159 | | - */ |
160 | | -static inline void fp_user_discard(void) |
161 | | -{ |
162 | | - /* |
163 | | - * If SME is active then exit streaming mode. If ZA is active |
164 | | - * then flush the SVE registers but leave userspace access to |
165 | | - * both SVE and SME enabled, otherwise disable SME for the |
166 | | - * task and fall through to disabling SVE too. This means |
167 | | - * that after a syscall we never have any streaming mode |
168 | | - * register state to track, if this changes the KVM code will |
169 | | - * need updating. |
170 | | - */ |
171 | | - if (system_supports_sme()) |
172 | | - sme_smstop_sm(); |
173 | | - |
174 | | - if (!system_supports_sve()) |
175 | | - return; |
176 | | - |
177 | | - if (test_thread_flag(TIF_SVE)) { |
178 | | - unsigned int sve_vq_minus_one; |
179 | | - |
180 | | - sve_vq_minus_one = sve_vq_from_vl(task_get_sve_vl(current)) - 1; |
181 | | - sve_flush_live(true, sve_vq_minus_one); |
182 | | - } |
183 | | -} |
184 | | - |
185 | 153 | void do_el0_svc(struct pt_regs *regs) |
186 | 154 | { |
187 | | - fp_user_discard(); |
188 | 155 | el0_svc_common(regs, regs->regs[8], __NR_syscalls, sys_call_table); |
189 | 156 | } |
190 | 157 |
|
|
0 commit comments