2016-08-15 10:35:54 +01:00
|
|
|
/*
|
2019-11-07 11:09:24 +00:00
|
|
|
* Copyright (c) 2019, Arm Limited. All rights reserved.
|
2016-08-15 10:35:54 +01:00
|
|
|
*
|
2017-05-03 09:38:09 +01:00
|
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
2016-08-15 10:35:54 +01:00
|
|
|
*/
|
|
|
|
|
2018-11-08 10:20:19 +00:00
|
|
|
#ifndef PMF_ASM_MACROS_S
|
|
|
|
#define PMF_ASM_MACROS_S
|
2016-08-15 10:35:54 +01:00
|
|
|
|
|
|
|
#define PMF_TS_SIZE 8
|
|
|
|
|
|
|
|
/*
|
2016-09-08 11:51:49 +01:00
|
|
|
* This macro calculates the address of the per-cpu timestamp
|
|
|
|
* for the given service name and local timestamp id.
|
2019-11-07 11:09:24 +00:00
|
|
|
* Clobbers: r0 - r4
|
2016-08-15 10:35:54 +01:00
|
|
|
*/
|
2018-10-04 09:55:23 +01:00
|
|
|
.macro pmf_calc_timestamp_addr _name, _tid
|
2019-11-07 11:09:24 +00:00
|
|
|
mov r4, lr
|
2016-08-15 10:35:54 +01:00
|
|
|
bl plat_my_core_pos
|
2019-11-07 11:09:24 +00:00
|
|
|
mov lr, r4
|
|
|
|
ldr r1, =__PERCPU_TIMESTAMP_SIZE__
|
|
|
|
mov r2, #(\_tid * PMF_TS_SIZE)
|
|
|
|
mla r0, r0, r1, r2
|
|
|
|
ldr r1, =pmf_ts_mem_\_name
|
|
|
|
add r0, r0, r1
|
2016-08-15 10:35:54 +01:00
|
|
|
.endm
|
|
|
|
|
2018-11-08 10:20:19 +00:00
|
|
|
#endif /* PMF_ASM_MACROS_S */
|