blob: 947c905bd0ba0e830f517f09fa90b2cb452d39c9 [file] [log] [blame]
David Cunadoce88eee2017-10-20 11:30:57 +01001/*
Jayanth Dodderi Chidanandd62c6812023-03-07 10:43:19 +00002 * Copyright (c) 2017-2023, Arm Limited and Contributors. All rights reserved.
David Cunadoce88eee2017-10-20 11:30:57 +01003 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
Antonio Nino Diaz033b4bb2018-10-25 16:52:26 +01007#ifndef SVE_H
8#define SVE_H
David Cunadoce88eee2017-10-20 11:30:57 +01009
Max Shvetsovc4502772021-03-22 11:59:37 +000010#include <context.h>
Antonio Nino Diaz033b4bb2018-10-25 16:52:26 +010011
Jayanth Dodderi Chidanandd62c6812023-03-07 10:43:19 +000012#if (ENABLE_SME_FOR_NS || ENABLE_SVE_FOR_NS)
Boyan Karatotev6468d4a2023-02-16 15:12:45 +000013void sve_init_el2_unused(void);
Elizabeth Ho4fc00d22023-07-18 14:10:25 +010014void sve_enable_per_world(per_world_context_t *per_world_ctx);
15void sve_disable_per_world(per_world_context_t *per_world_ctx);
Jayanth Dodderi Chidanandd62c6812023-03-07 10:43:19 +000016#else
Elizabeth Ho4fc00d22023-07-18 14:10:25 +010017static inline void sve_init_el2_unused(void)
Jayanth Dodderi Chidanandd62c6812023-03-07 10:43:19 +000018{
19}
Elizabeth Ho4fc00d22023-07-18 14:10:25 +010020static inline void sve_enable_per_world(per_world_context_t *per_world_ctx)
Boyan Karatotev6468d4a2023-02-16 15:12:45 +000021{
22}
Elizabeth Ho4fc00d22023-07-18 14:10:25 +010023static inline void sve_disable_per_world(per_world_context_t *per_world_ctx)
Jayanth Dodderi Chidanandd62c6812023-03-07 10:43:19 +000024{
25}
26#endif /* ( ENABLE_SME_FOR_NS | ENABLE_SVE_FOR_NS ) */
David Cunadoce88eee2017-10-20 11:30:57 +010027
Antonio Nino Diaz033b4bb2018-10-25 16:52:26 +010028#endif /* SVE_H */