diff options
author | Julius Werner <jwerner@chromium.org> | 2019-07-09 13:49:11 -0700 |
---|---|---|
committer | Julius Werner <jwerner@chromium.org> | 2019-08-01 13:14:12 -0700 |
commit | d5dfdeb65ff5b7f24dded201d2945c7b74565ce8 (patch) | |
tree | c6f6607a5bab02c7497689e043db50fad88158f8 /include/lib | |
parent | f61469e532c05bfe0de06620e8762db18414a357 (diff) |
Replace __ASSEMBLY__ with compiler-builtin __ASSEMBLER__
NOTE: __ASSEMBLY__ macro is now deprecated in favor of __ASSEMBLER__.
All common C compilers predefine a macro called __ASSEMBLER__ when
preprocessing a .S file. There is no reason for TF-A to define it's own
__ASSEMBLY__ macro for this purpose instead. To unify code with the
export headers (which use __ASSEMBLER__ to avoid one extra dependency),
let's deprecate __ASSEMBLY__ and switch the code base over to the
predefined standard.
Change-Id: Id7d0ec8cf330195da80499c68562b65cb5ab7417
Signed-off-by: Julius Werner <jwerner@chromium.org>
Diffstat (limited to 'include/lib')
25 files changed, 47 insertions, 47 deletions
diff --git a/include/lib/bakery_lock.h b/include/lib/bakery_lock.h index a2f540c6..1fece01a 100644 --- a/include/lib/bakery_lock.h +++ b/include/lib/bakery_lock.h @@ -11,7 +11,7 @@ #define BAKERY_LOCK_MAX_CPUS PLATFORM_CORE_COUNT -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__ #include <cdefs.h> #include <stdbool.h> #include <stdint.h> @@ -101,5 +101,5 @@ void bakery_lock_release(bakery_lock_t *bakery); #define DECLARE_BAKERY_LOCK(_name) extern bakery_lock_t _name -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* BAKERY_LOCK_H */ diff --git a/include/lib/cpus/aarch32/cortex_a9.h b/include/lib/cpus/aarch32/cortex_a9.h index 1fb0a923..a8c978a8 100644 --- a/include/lib/cpus/aarch32/cortex_a9.h +++ b/include/lib/cpus/aarch32/cortex_a9.h @@ -25,7 +25,7 @@ ******************************************************************************/ #define PCR p15, 0, c15, c0, 0 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__ #include <arch_helpers.h> DEFINE_COPROCR_RW_FUNCS(pcr, PCR) #endif diff --git a/include/lib/cpus/aarch64/cortex_a75.h b/include/lib/cpus/aarch64/cortex_a75.h index 204bfdd4..e5ca1ba3 100644 --- a/include/lib/cpus/aarch64/cortex_a75.h +++ b/include/lib/cpus/aarch64/cortex_a75.h @@ -41,7 +41,7 @@ #define CORTEX_A75_AMU_GROUP0_MASK U(0x7) #define CORTEX_A75_AMU_GROUP1_MASK (U(0) << 3) -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__ #include <stdint.h> uint64_t cortex_a75_amu_cnt_read(int idx); @@ -50,6 +50,6 @@ unsigned int cortex_a75_amu_read_cpuamcntenset_el0(void); unsigned int cortex_a75_amu_read_cpuamcntenclr_el0(void); void cortex_a75_amu_write_cpuamcntenset_el0(unsigned int mask); void cortex_a75_amu_write_cpuamcntenclr_el0(unsigned int mask); -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* CORTEX_A75_H */ diff --git a/include/lib/cpus/aarch64/cpuamu.h b/include/lib/cpus/aarch64/cpuamu.h index 921abdbd..463f890f 100644 --- a/include/lib/cpus/aarch64/cpuamu.h +++ b/include/lib/cpus/aarch64/cpuamu.h @@ -29,7 +29,7 @@ #define CPUAMEVTYPER3_EL0 S3_3_C15_C10_3 #define CPUAMEVTYPER4_EL0 S3_3_C15_C10_4 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__ #include <stdint.h> uint64_t cpuamu_cnt_read(unsigned int idx); @@ -43,6 +43,6 @@ int midr_match(unsigned int cpu_midr); void cpuamu_context_save(unsigned int nr_counters); void cpuamu_context_restore(unsigned int nr_counters); -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* CPUAMU_H */ diff --git a/include/lib/cpus/aarch64/denver.h b/include/lib/cpus/aarch64/denver.h index 81c076a1..02657a0f 100644 --- a/include/lib/cpus/aarch64/denver.h +++ b/include/lib/cpus/aarch64/denver.h @@ -34,11 +34,11 @@ #define DENVER_CPU_PMSTATE_C7 U(0x7) #define DENVER_CPU_PMSTATE_MASK U(0xF) -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__ /* Disable Dynamic Code Optimisation */ void denver_disable_dco(void); -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* DENVER_H */ diff --git a/include/lib/cpus/errata_report.h b/include/lib/cpus/errata_report.h index 17b2c30f..7cac77eb 100644 --- a/include/lib/cpus/errata_report.h +++ b/include/lib/cpus/errata_report.h @@ -7,7 +7,7 @@ #ifndef ERRATA_REPORT_H #define ERRATA_REPORT_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__ #include <arch.h> #include <arch_helpers.h> @@ -23,7 +23,7 @@ static inline void print_errata_status(void) {} void errata_print_msg(unsigned int status, const char *cpu, const char *id); int errata_needs_reporting(spinlock_t *lock, uint32_t *reported); -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ /* Errata status */ #define ERRATA_NOT_APPLIES 0 diff --git a/include/lib/el3_runtime/aarch32/context.h b/include/lib/el3_runtime/aarch32/context.h index 86ff53a6..c5567c97 100644 --- a/include/lib/el3_runtime/aarch32/context.h +++ b/include/lib/el3_runtime/aarch32/context.h @@ -24,7 +24,7 @@ #define CTX_NS_SCTLR U(0x1C) #define CTX_REGS_END U(0x20) -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__ #include <stdint.h> @@ -65,6 +65,6 @@ typedef struct cpu_context { CASSERT(CTX_REGS_OFFSET == __builtin_offsetof(cpu_context_t, regs_ctx), \ assert_core_context_regs_offset_mismatch); -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* CONTEXT_H */ diff --git a/include/lib/el3_runtime/aarch64/context.h b/include/lib/el3_runtime/aarch64/context.h index 5bd0de42..a76a59b7 100644 --- a/include/lib/el3_runtime/aarch64/context.h +++ b/include/lib/el3_runtime/aarch64/context.h @@ -207,7 +207,7 @@ #define CTX_PAUTH_REGS_END U(0) #endif /* CTX_INCLUDE_PAUTH_REGS */ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__ #include <stdint.h> @@ -384,6 +384,6 @@ void fpregs_context_save(fp_regs_t *regs); void fpregs_context_restore(fp_regs_t *regs); #endif -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* CONTEXT_H */ diff --git a/include/lib/el3_runtime/cpu_data.h b/include/lib/el3_runtime/cpu_data.h index 9e1d7f16..66c47ab7 100644 --- a/include/lib/el3_runtime/cpu_data.h +++ b/include/lib/el3_runtime/cpu_data.h @@ -49,7 +49,7 @@ #define CPU_DATA_PMF_TS0_IDX 0 #endif -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__ #include <arch_helpers.h> #include <lib/cassert.h> @@ -161,5 +161,5 @@ void init_cpu_ops(void); sizeof(((cpu_data_t *)0)->_m)) -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* CPU_DATA_H */ diff --git a/include/lib/extensions/ras.h b/include/lib/extensions/ras.h index 98daab60..4fc8f04b 100644 --- a/include/lib/extensions/ras.h +++ b/include/lib/extensions/ras.h @@ -68,7 +68,7 @@ .num_intrs = ARRAY_SIZE(_array), \ } -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__ #include <assert.h> @@ -196,6 +196,6 @@ int ras_ea_handler(unsigned int ea_reason, uint64_t syndrome, void *cookie, void *handle, uint64_t flags); void ras_init(void); -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* RAS_H */ diff --git a/include/lib/extensions/ras_arch.h b/include/lib/extensions/ras_arch.h index e9375a35..0c98c4a0 100644 --- a/include/lib/extensions/ras_arch.h +++ b/include/lib/extensions/ras_arch.h @@ -178,7 +178,7 @@ /* I/DFSC code for synchronous external abort */ #define SYNC_EA_FSC 0x10 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__ #include <arch.h> #include <arch_helpers.h> @@ -256,6 +256,6 @@ static inline void ser_sys_select_record(unsigned int idx) /* Library functions to probe Standard Error Record */ int ser_probe_memmap(uintptr_t base, unsigned int size_num_k, int *probe_data); int ser_probe_sysreg(unsigned int idx_start, unsigned int num_idx, int *probe_data); -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* RAS_ARCH_H */ diff --git a/include/lib/libc/aarch64/setjmp_.h b/include/lib/libc/aarch64/setjmp_.h index 174b3eb1..f880a17b 100644 --- a/include/lib/libc/aarch64/setjmp_.h +++ b/include/lib/libc/aarch64/setjmp_.h @@ -18,13 +18,13 @@ #define JMP_SIZE (JMP_CTX_END >> 3) -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__ #include <cdefs.h> /* Jump buffer hosting x18 - x30 and sp_el0 registers */ typedef uint64_t jmp_buf[JMP_SIZE] __aligned(16); -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* SETJMP__H */ diff --git a/include/lib/libc/setjmp.h b/include/lib/libc/setjmp.h index 5661201a..be8e2c01 100644 --- a/include/lib/libc/setjmp.h +++ b/include/lib/libc/setjmp.h @@ -9,12 +9,12 @@ #include <setjmp_.h> -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__ #include <cdefs.h> int setjmp(jmp_buf env); __dead2 void longjmp(jmp_buf env, int val); -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* SETJMP_H */ diff --git a/include/lib/libfdt/fdt.h b/include/lib/libfdt/fdt.h index 74961f90..ef7c86b6 100644 --- a/include/lib/libfdt/fdt.h +++ b/include/lib/libfdt/fdt.h @@ -52,7 +52,7 @@ * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__ struct fdt_header { fdt32_t magic; /* magic word FDT_MAGIC */ @@ -90,7 +90,7 @@ struct fdt_property { char data[0]; }; -#endif /* !__ASSEMBLY */ +#endif /* !__ASSEMBLER__ */ #define FDT_MAGIC 0xd00dfeed /* 4: version, 4: total size */ #define FDT_TAGSIZE sizeof(fdt32_t) diff --git a/include/lib/psci/psci.h b/include/lib/psci/psci.h index fe279d4f..04e5e3d7 100644 --- a/include/lib/psci/psci.h +++ b/include/lib/psci/psci.h @@ -166,7 +166,7 @@ #define PSCI_RESET2_TYPE_ARCH (U(0) << PSCI_RESET2_TYPE_VENDOR_SHIFT) #define PSCI_RESET2_SYSTEM_WARM_RESET (PSCI_RESET2_TYPE_ARCH | U(0)) -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__ #include <stdint.h> @@ -348,6 +348,6 @@ int psci_features(unsigned int psci_fid); void __dead2 psci_power_down_wfi(void); void psci_arch_setup(void); -#endif /*__ASSEMBLY__*/ +#endif /*__ASSEMBLER__*/ #endif /* PSCI_H */ diff --git a/include/lib/psci/psci_lib.h b/include/lib/psci/psci_lib.h index 53d7711b..76c1a8dc 100644 --- a/include/lib/psci/psci_lib.h +++ b/include/lib/psci/psci_lib.h @@ -9,7 +9,7 @@ #include <common/ep_info.h> -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__ #include <cdefs.h> #include <stdint.h> @@ -89,6 +89,6 @@ void psci_warmboot_entrypoint(void); void psci_register_spd_pm_hook(const spd_pm_ops_t *pm); void psci_prepare_next_non_secure_ctx( entry_point_info_t *next_image_info); -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* PSCI_LIB_H */ diff --git a/include/lib/runtime_instr.h b/include/lib/runtime_instr.h index f5a3f138..303f27e5 100644 --- a/include/lib/runtime_instr.h +++ b/include/lib/runtime_instr.h @@ -17,9 +17,9 @@ #define RT_INSTR_EXIT_CFLUSH U(5) #define RT_INSTR_TOTAL_IDS U(6) -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__ PMF_DECLARE_CAPTURE_TIMESTAMP(rt_instr_svc) PMF_DECLARE_GET_TIMESTAMP(rt_instr_svc) -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* RUNTIME_INSTR_H */ diff --git a/include/lib/smccc.h b/include/lib/smccc.h index 94c39d2a..76e60231 100644 --- a/include/lib/smccc.h +++ b/include/lib/smccc.h @@ -87,7 +87,7 @@ #define SMC_FROM_SECURE (U(0) << 0) #define SMC_FROM_NON_SECURE (U(1) << 0) -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__ #include <stdint.h> @@ -155,5 +155,5 @@ static inline uint32_t smc_uuid_word(uint8_t b0, uint8_t b1, uint8_t b2, uint8_t smc_uuid_word((_uuid).node[2], (_uuid).node[3], \ (_uuid).node[4], (_uuid).node[5])) -#endif /*__ASSEMBLY__*/ +#endif /*__ASSEMBLER__*/ #endif /* SMCCC_H */ diff --git a/include/lib/spinlock.h b/include/lib/spinlock.h index fcd36e85..0bf3ee06 100644 --- a/include/lib/spinlock.h +++ b/include/lib/spinlock.h @@ -7,7 +7,7 @@ #ifndef SPINLOCK_H #define SPINLOCK_H -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__ #include <stdint.h> diff --git a/include/lib/utils.h b/include/lib/utils.h index 67484540..cdb125cf 100644 --- a/include/lib/utils.h +++ b/include/lib/utils.h @@ -11,7 +11,7 @@ * C code should be put in this part of the header to avoid breaking ASM files * or linker scripts including it. */ -#if !(defined(__LINKER__) || defined(__ASSEMBLY__)) +#if !(defined(__LINKER__) || defined(__ASSEMBLER__)) #include <stddef.h> #include <stdint.h> @@ -91,6 +91,6 @@ static inline u_register_t load_addr_## _name(void) \ /* Helper to invoke the function defined by DEFINE_LOAD_SYM_ADDR() */ #define LOAD_ADDR_OF(_name) (typeof(_name) *) load_addr_## _name() -#endif /* !(defined(__LINKER__) || defined(__ASSEMBLY__)) */ +#endif /* !(defined(__LINKER__) || defined(__ASSEMBLER__)) */ #endif /* UTILS_H */ diff --git a/include/lib/utils_def.h b/include/lib/utils_def.h index 41f71e84..7098bace 100644 --- a/include/lib/utils_def.h +++ b/include/lib/utils_def.h @@ -32,7 +32,7 @@ * position @h. For example * GENMASK_64(39, 21) gives us the 64bit vector 0x000000ffffe00000. */ -#if defined(__LINKER__) || defined(__ASSEMBLY__) +#if defined(__LINKER__) || defined(__ASSEMBLER__) #define GENMASK_32(h, l) \ (((0xFFFFFFFF) << (l)) & (0xFFFFFFFF >> (32 - 1 - (h)))) diff --git a/include/lib/xlat_tables/xlat_mmu_helpers.h b/include/lib/xlat_tables/xlat_mmu_helpers.h index 85effcaa..efe0dd5e 100644 --- a/include/lib/xlat_tables/xlat_mmu_helpers.h +++ b/include/lib/xlat_tables/xlat_mmu_helpers.h @@ -50,7 +50,7 @@ #define MMU_CFG_TTBR0 2 #define MMU_CFG_PARAM_MAX 3 -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__ #include <stdbool.h> #include <stdint.h> @@ -86,6 +86,6 @@ void enable_mmu_direct_el3(unsigned int flags); bool xlat_arch_is_granule_size_supported(size_t size); size_t xlat_arch_get_max_supported_granule_size(void); -#endif /* __ASSEMBLY__ */ +#endif /* __ASSEMBLER__ */ #endif /* XLAT_MMU_HELPERS_H */ diff --git a/include/lib/xlat_tables/xlat_tables.h b/include/lib/xlat_tables/xlat_tables.h index 9e2543fb..082bb5e4 100644 --- a/include/lib/xlat_tables/xlat_tables.h +++ b/include/lib/xlat_tables/xlat_tables.h @@ -9,7 +9,7 @@ #include <lib/xlat_tables/xlat_tables_defs.h> -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__ #include <stddef.h> #include <stdint.h> @@ -88,5 +88,5 @@ void mmap_add_region(unsigned long long base_pa, uintptr_t base_va, size_t size, unsigned int attr); void mmap_add(const mmap_region_t *mm); -#endif /*__ASSEMBLY__*/ +#endif /*__ASSEMBLER__*/ #endif /* XLAT_TABLES_H */ diff --git a/include/lib/xlat_tables/xlat_tables_v2.h b/include/lib/xlat_tables/xlat_tables_v2.h index 55514268..0e099987 100644 --- a/include/lib/xlat_tables/xlat_tables_v2.h +++ b/include/lib/xlat_tables/xlat_tables_v2.h @@ -10,7 +10,7 @@ #include <lib/xlat_tables/xlat_tables_defs.h> #include <lib/xlat_tables/xlat_tables_v2_helpers.h> -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__ #include <stddef.h> #include <stdint.h> @@ -364,5 +364,5 @@ int xlat_get_mem_attributes_ctx(const xlat_ctx_t *ctx, uintptr_t base_va, uint32_t *attr); int xlat_get_mem_attributes(uintptr_t base_va, uint32_t *attr); -#endif /*__ASSEMBLY__*/ +#endif /*__ASSEMBLER__*/ #endif /* XLAT_TABLES_V2_H */ diff --git a/include/lib/xlat_tables/xlat_tables_v2_helpers.h b/include/lib/xlat_tables/xlat_tables_v2_helpers.h index 6a1be325..b17b71a8 100644 --- a/include/lib/xlat_tables/xlat_tables_v2_helpers.h +++ b/include/lib/xlat_tables/xlat_tables_v2_helpers.h @@ -16,7 +16,7 @@ #error "Do not include this header file directly. Include xlat_tables_v2.h instead." #endif -#ifndef __ASSEMBLY__ +#ifndef __ASSEMBLER__ #include <stdbool.h> #include <stddef.h> @@ -160,6 +160,6 @@ struct xlat_ctx { .initialized = false, \ } -#endif /*__ASSEMBLY__*/ +#endif /*__ASSEMBLER__*/ #endif /* XLAT_TABLES_V2_HELPERS_H */ |