David Cunado | ce88eee | 2017-10-20 11:30:57 +0100 | [diff] [blame] | 1 | /* |
Jayanth Dodderi Chidanand | d62c681 | 2023-03-07 10:43:19 +0000 | [diff] [blame] | 2 | * Copyright (c) 2017-2023, Arm Limited and Contributors. All rights reserved. |
David Cunado | ce88eee | 2017-10-20 11:30:57 +0100 | [diff] [blame] | 3 | * |
| 4 | * SPDX-License-Identifier: BSD-3-Clause |
| 5 | */ |
| 6 | |
Antonio Nino Diaz | 033b4bb | 2018-10-25 16:52:26 +0100 | [diff] [blame] | 7 | #ifndef SVE_H |
| 8 | #define SVE_H |
David Cunado | ce88eee | 2017-10-20 11:30:57 +0100 | [diff] [blame] | 9 | |
Max Shvetsov | c450277 | 2021-03-22 11:59:37 +0000 | [diff] [blame] | 10 | #include <context.h> |
Antonio Nino Diaz | 033b4bb | 2018-10-25 16:52:26 +0100 | [diff] [blame] | 11 | |
Jayanth Dodderi Chidanand | d62c681 | 2023-03-07 10:43:19 +0000 | [diff] [blame] | 12 | #if (ENABLE_SME_FOR_NS || ENABLE_SVE_FOR_NS) |
Boyan Karatotev | 6468d4a | 2023-02-16 15:12:45 +0000 | [diff] [blame] | 13 | void sve_init_el2_unused(void); |
Elizabeth Ho | 4fc00d2 | 2023-07-18 14:10:25 +0100 | [diff] [blame] | 14 | void sve_enable_per_world(per_world_context_t *per_world_ctx); |
| 15 | void sve_disable_per_world(per_world_context_t *per_world_ctx); |
Jayanth Dodderi Chidanand | d62c681 | 2023-03-07 10:43:19 +0000 | [diff] [blame] | 16 | #else |
Elizabeth Ho | 4fc00d2 | 2023-07-18 14:10:25 +0100 | [diff] [blame] | 17 | static inline void sve_init_el2_unused(void) |
Jayanth Dodderi Chidanand | d62c681 | 2023-03-07 10:43:19 +0000 | [diff] [blame] | 18 | { |
| 19 | } |
Elizabeth Ho | 4fc00d2 | 2023-07-18 14:10:25 +0100 | [diff] [blame] | 20 | static inline void sve_enable_per_world(per_world_context_t *per_world_ctx) |
Boyan Karatotev | 6468d4a | 2023-02-16 15:12:45 +0000 | [diff] [blame] | 21 | { |
| 22 | } |
Elizabeth Ho | 4fc00d2 | 2023-07-18 14:10:25 +0100 | [diff] [blame] | 23 | static inline void sve_disable_per_world(per_world_context_t *per_world_ctx) |
Jayanth Dodderi Chidanand | d62c681 | 2023-03-07 10:43:19 +0000 | [diff] [blame] | 24 | { |
| 25 | } |
| 26 | #endif /* ( ENABLE_SME_FOR_NS | ENABLE_SVE_FOR_NS ) */ |
David Cunado | ce88eee | 2017-10-20 11:30:57 +0100 | [diff] [blame] | 27 | |
Antonio Nino Diaz | 033b4bb | 2018-10-25 16:52:26 +0100 | [diff] [blame] | 28 | #endif /* SVE_H */ |