diff options
author | Antonio Nino Diaz <antonio.ninodiaz@arm.com> | 2018-07-18 11:57:21 +0100 |
---|---|---|
committer | Antonio Nino Diaz <antonio.ninodiaz@arm.com> | 2018-07-20 13:27:31 +0100 |
commit | 97373c33b70725daf58e4491831537392c0d5239 (patch) | |
tree | 9a72bc5da7c6145a5cc89674dd102e3e7beb161e /lib/psci/psci_on.c | |
parent | f00119de5760d5ed876c17884654da14b877386d (diff) |
PSCI: Replace macros by static inline functions
Fix MISRA C-2012 Directive 4.9 and Rule 21.1 defects.
Change-Id: I96c216317d38741ee632d2640cd7b36e6723d5c2
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
Diffstat (limited to 'lib/psci/psci_on.c')
-rw-r--r-- | lib/psci/psci_on.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/lib/psci/psci_on.c b/lib/psci/psci_on.c index 53b044ec..325346e2 100644 --- a/lib/psci/psci_on.c +++ b/lib/psci/psci_on.c @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2017, ARM Limited and Contributors. All rights reserved. + * Copyright (c) 2013-2018, ARM Limited and Contributors. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ @@ -15,6 +15,19 @@ #include <stddef.h> #include "psci_private.h" +/* + * Helper functions for the CPU level spinlocks + */ +static inline void psci_spin_lock_cpu(int idx) +{ + spin_lock(&psci_cpu_pd_nodes[idx].cpu_lock); +} + +static inline void psci_spin_unlock_cpu(int idx) +{ + spin_unlock(&psci_cpu_pd_nodes[idx].cpu_lock); +} + /******************************************************************************* * This function checks whether a cpu which has been requested to be turned on * is OFF to begin with. |