Andrew Thoelke | 5e91007 | 2014-06-02 11:40:35 +0100 | [diff] [blame] | 1 | /* |
Boyan Karatotev | d43b2ea | 2025-03-18 10:31:22 +0000 | [diff] [blame] | 2 | * Copyright (c) 2014-2025, Arm Limited and Contributors. All rights reserved. |
Andrew Thoelke | 5e91007 | 2014-06-02 11:40:35 +0100 | [diff] [blame] | 3 | * |
dp-arm | 82cb2c1 | 2017-05-03 09:38:09 +0100 | [diff] [blame] | 4 | * SPDX-License-Identifier: BSD-3-Clause |
Andrew Thoelke | 5e91007 | 2014-06-02 11:40:35 +0100 | [diff] [blame] | 5 | */ |
| 6 | |
Andrew Thoelke | 5e91007 | 2014-06-02 11:40:35 +0100 | [diff] [blame] | 7 | #include <platform_def.h> |
| 8 | |
Antonio Nino Diaz | 09d40e0 | 2018-12-14 00:18:21 +0000 | [diff] [blame] | 9 | #include <lib/cassert.h> |
| 10 | #include <lib/el3_runtime/cpu_data.h> |
Boyan Karatotev | d43b2ea | 2025-03-18 10:31:22 +0000 | [diff] [blame] | 11 | #include <plat/common/platform.h> |
Antonio Nino Diaz | 09d40e0 | 2018-12-14 00:18:21 +0000 | [diff] [blame] | 12 | |
Andrew Thoelke | 5e91007 | 2014-06-02 11:40:35 +0100 | [diff] [blame] | 13 | /* The per_cpu_ptr_cache_t space allocation */ |
| 14 | cpu_data_t percpu_data[PLATFORM_CORE_COUNT]; |
Boyan Karatotev | d43b2ea | 2025-03-18 10:31:22 +0000 | [diff] [blame] | 15 | |
| 16 | #ifndef __aarch64__ |
| 17 | cpu_data_t *_cpu_data(void) |
| 18 | { |
| 19 | return _cpu_data_by_index(plat_my_core_pos()); |
| 20 | } |
| 21 | #endif |