Switch AARCH32/AARCH64 to __aarch64__

NOTE: AARCH32/AARCH64 macros are now deprecated in favor of __aarch64__.

All common C compilers pre-define the same macros to signal which
architecture the code is being compiled for: __arm__ for AArch32 (or
earlier versions) and __aarch64__ for AArch64. There's no need for TF-A
to define its own custom macros for this. In order to unify code with
the export headers (which use __aarch64__ to avoid another dependency),
let's deprecate the AARCH32 and AARCH64 macros and switch the code base
over to the pre-defined standard macro. (Since it is somewhat
unintuitive that __arm__ only means AArch32, let's standardize on only
using __aarch64__.)

NOTE: This change is based on below TFA commit
https://github.com/ARM-software/arm-trusted-firmware/commit/402b3cf8766fe2cb4ae462f7ee7761d08a1ba56c

Signed-off-by: Deepika Bhavnani <deepika.bhavnani@arm.com>
Change-Id: If2c3dbaeb01d4a9d8cfd95d906e5eaf4ae94417f
diff --git a/include/common/test_helpers.h b/include/common/test_helpers.h
index 205d203..a90fd71 100644
--- a/include/common/test_helpers.h
+++ b/include/common/test_helpers.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018-2019, Arm Limited. All rights reserved.
+ * Copyright (c) 2018-2020, Arm Limited. All rights reserved.
  *
  * SPDX-License-Identifier: BSD-3-Clause
  */
@@ -26,7 +26,7 @@
 
 typedef test_result_t (*test_function_arg_t)(void *arg);
 
-#ifdef AARCH32
+#ifndef __aarch64__
 #define SKIP_TEST_IF_AARCH32()							\
 	do {									\
 		tftf_testcase_printf("Test not supported on aarch32\n");	\
diff --git a/include/drivers/arm/gic_v3.h b/include/drivers/arm/gic_v3.h
index 1b028b6..0346a23 100644
--- a/include/drivers/arm/gic_v3.h
+++ b/include/drivers/arm/gic_v3.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, Arm Limited. All rights reserved.
+ * Copyright (c) 2018-2020, Arm Limited. All rights reserved.
  *
  * SPDX-License-Identifier: BSD-3-Clause
  */
@@ -71,7 +71,7 @@
 #define SGI1R_AFF_MASK			0xff
 #define SGI1R_AFF1_SHIFT		16ULL
 #define SGI1R_AFF2_SHIFT		32ULL
-#ifndef AARCH32
+#ifdef __aarch64__
 #define SGI1R_AFF3_SHIFT		48ULL
 #endif
 #define SGI1R_INTID_MASK		0xf
diff --git a/include/lib/utils_def.h b/include/lib/utils_def.h
index 02963ac..78d4131 100644
--- a/include/lib/utils_def.h
+++ b/include/lib/utils_def.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2016-2018, ARM Limited and Contributors. All rights reserved.
+ * Copyright (c) 2016-2020, ARM Limited and Contributors. All rights reserved.
  *
  * SPDX-License-Identifier: BSD-3-Clause
  */
@@ -19,7 +19,7 @@
 #define BIT_32(nr)			(U(1) << (nr))
 #define BIT_64(nr)			(ULL(1) << (nr))
 
-#ifdef AARCH32
+#ifndef __aarch64__
 #define BIT				BIT_32
 #else
 #define BIT				BIT_64
@@ -44,7 +44,7 @@
 	(((~UINT64_C(0)) << (l)) & (~UINT64_C(0) >> (64 - 1 - (h))))
 #endif
 
-#ifdef AARCH32
+#ifndef __aarch64__
 #define GENMASK				GENMASK_32
 #else
 #define GENMASK				GENMASK_64
@@ -130,7 +130,7 @@
 #endif
 
 /* Register size of the current architecture. */
-#ifdef AARCH32
+#ifndef __aarch64__
 #define REGSZ		U(4)
 #else
 #define REGSZ		U(8)
diff --git a/include/lib/xlat_tables/xlat_mmu_helpers.h b/include/lib/xlat_tables/xlat_mmu_helpers.h
index 85effca..15ab2ef 100644
--- a/include/lib/xlat_tables/xlat_mmu_helpers.h
+++ b/include/lib/xlat_tables/xlat_mmu_helpers.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014-2018, ARM Limited and Contributors. All rights reserved.
+ * Copyright (c) 2014-2020, ARM Limited and Contributors. All rights reserved.
  *
  * SPDX-License-Identifier: BSD-3-Clause
  */
@@ -65,7 +65,7 @@
 		   const uint64_t *base_table, unsigned long long max_pa,
 		   uintptr_t max_va, int xlat_regime);
 
-#ifdef AARCH32
+#ifndef __aarch64__
 /* AArch32 specific translation table API */
 void enable_mmu_svc_mon(unsigned int flags);
 void enable_mmu_hyp(unsigned int flags);
@@ -81,7 +81,7 @@
 void enable_mmu_direct_el1(unsigned int flags);
 void enable_mmu_direct_el2(unsigned int flags);
 void enable_mmu_direct_el3(unsigned int flags);
-#endif /* AARCH32 */
+#endif /* !__aarch64__ */
 
 bool xlat_arch_is_granule_size_supported(size_t size);
 size_t xlat_arch_get_max_supported_granule_size(void);
diff --git a/include/lib/xlat_tables/xlat_tables_arch.h b/include/lib/xlat_tables/xlat_tables_arch.h
index 7237534..c8f29e4 100644
--- a/include/lib/xlat_tables/xlat_tables_arch.h
+++ b/include/lib/xlat_tables/xlat_tables_arch.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017-2018, ARM Limited and Contributors. All rights reserved.
+ * Copyright (c) 2017-2020, ARM Limited and Contributors. All rights reserved.
  *
  * SPDX-License-Identifier: BSD-3-Clause
  */
@@ -7,7 +7,7 @@
 #ifndef XLAT_TABLES_ARCH_H
 #define XLAT_TABLES_ARCH_H
 
-#ifdef AARCH32
+#ifndef __aarch64__
 #include "aarch32/xlat_tables_aarch32.h"
 #else
 #include "aarch64/xlat_tables_aarch64.h"
diff --git a/include/runtime_services/pmf.h b/include/runtime_services/pmf.h
index 55828e2..d2ed412 100644
--- a/include/runtime_services/pmf.h
+++ b/include/runtime_services/pmf.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, Arm Limited. All rights reserved.
+ * Copyright (c) 2018-2020, Arm Limited. All rights reserved.
  *
  * SPDX-License-Identifier: BSD-3-Clause
  */
@@ -27,7 +27,7 @@
 /*
  * Defines for PMF SMC function ids.
  */
-#ifdef AARCH32
+#ifndef __aarch64__
 #define PMF_SMC_GET_TIMESTAMP	0x82000010
 #else
 #define PMF_SMC_GET_TIMESTAMP	0xC2000010
diff --git a/include/runtime_services/psci.h b/include/runtime_services/psci.h
index 1ecfc63..f93ee40 100644
--- a/include/runtime_services/psci.h
+++ b/include/runtime_services/psci.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018, Arm Limited. All rights reserved.
+ * Copyright (c) 2018-2020, Arm Limited. All rights reserved.
  *
  * SPDX-License-Identifier: BSD-3-Clause
  */
@@ -67,7 +67,7 @@
 /*
  * Architecture-specific SMC function IDs
  */
-#ifndef AARCH32
+#ifdef __aarch64__
 #define SMC_PSCI_CPU_SUSPEND		SMC_PSCI_CPU_SUSPEND_AARCH64
 #define SMC_PSCI_CPU_ON			SMC_PSCI_CPU_ON_AARCH64
 #define SMC_PSCI_AFFINITY_INFO		SMC_PSCI_AFFINITY_INFO_AARCH64