Fix MISRA rule 8.4 Part 1

Rule 8.4: A compatible declaration shall be visible when
          an object or function with external linkage is defined

Fixed for:
	make DEBUG=1 PLAT=fvp LOG_LEVEL=50 all

Change-Id: I7c2ad3f5c015411c202605851240d5347e4cc8c7
Signed-off-by: Roberto Vargas <roberto.vargas@arm.com>
diff --git a/include/lib/pmf/pmf_helpers.h b/include/lib/pmf/pmf_helpers.h
index 9984d69..829ad6c 100644
--- a/include/lib/pmf/pmf_helpers.h
+++ b/include/lib/pmf/pmf_helpers.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016, ARM Limited and Contributors. All rights reserved.
+ * Copyright (c) 2016-2018, ARM Limited and Contributors. All rights reserved.
  *
  * SPDX-License-Identifier: BSD-3-Clause
  */
@@ -45,8 +45,11 @@
 
 /*
  * Convenience macro to allocate memory for a PMF service.
+ *
+ * The extern declaration is there to satisfy MISRA C-2012 rule 8.4.
  */
 #define PMF_ALLOCATE_TIMESTAMP_MEMORY(_name, _total_id)		\
+	extern unsigned long long pmf_ts_mem_ ## _name[_total_id];	\
 	unsigned long long pmf_ts_mem_ ## _name[_total_id]	\
 	__aligned(CACHE_WRITEBACK_GRANULE)			\
 	__section("pmf_timestamp_array")			\
@@ -60,10 +63,15 @@
 
 /*
  * Convenience macros for capturing time-stamp.
+ *
+ * The extern declaration is there to satisfy MISRA C-2012 rule 8.4.
  */
 #define PMF_DEFINE_CAPTURE_TIMESTAMP(_name, _flags)			\
 	void pmf_capture_timestamp_ ## _name(				\
 			unsigned int tid,				\
+			unsigned long long ts);				\
+	void pmf_capture_timestamp_ ## _name(				\
+			unsigned int tid,				\
 			unsigned long long ts)				\
 	{								\
 		CASSERT(_flags, select_proper_config);			\
@@ -76,6 +84,9 @@
 	}								\
 	void pmf_capture_timestamp_with_cache_maint_ ## _name(		\
 			unsigned int tid,				\
+			unsigned long long ts);				\
+	void pmf_capture_timestamp_with_cache_maint_ ## _name(		\
+			unsigned int tid,				\
 			unsigned long long ts)				\
 	{								\
 		CASSERT(_flags, select_proper_config);			\
@@ -89,9 +100,13 @@
 
 /*
  * Convenience macros for retrieving time-stamp.
+ *
+ * The extern declaration is there to satisfy MISRA C-2012 rule 8.4.
  */
 #define PMF_DEFINE_GET_TIMESTAMP(_name)					\
 	unsigned long long pmf_get_timestamp_by_index_ ## _name(	\
+		unsigned int tid, unsigned int cpuid, unsigned int flags);\
+	unsigned long long pmf_get_timestamp_by_index_ ## _name(	\
 		unsigned int tid, unsigned int cpuid, unsigned int flags)\
 	{								\
 		PMF_VALIDATE_TID(_name, tid);				\
@@ -99,6 +114,8 @@
 		return __pmf_get_timestamp(base_addr, tid, cpuid, flags);\
 	}								\
 	unsigned long long pmf_get_timestamp_by_mpidr_ ## _name(	\
+		unsigned int tid, u_register_t mpidr, unsigned int flags);\
+	unsigned long long pmf_get_timestamp_by_mpidr_ ## _name(	\
 		unsigned int tid, u_register_t mpidr, unsigned int flags)\
 	{								\
 		PMF_VALIDATE_TID(_name, tid);				\