diff options
author | Antonio Nino Diaz <antonio.ninodiaz@arm.com> | 2018-12-14 00:18:21 +0000 |
---|---|---|
committer | Antonio Nino Diaz <antonio.ninodiaz@arm.com> | 2019-01-04 10:43:17 +0000 |
commit | 09d40e0e08283a249e7dce0e106c07c5141f9b7e (patch) | |
tree | 46e7af7b5be2738948b359b2a07078e4cf1bbec1 /bl32/tsp | |
parent | f5478dedf9e096d9539362b38ceb096b940ba3e2 (diff) |
Sanitise includes across codebase
Enforce full include path for includes. Deprecate old paths.
The following folders inside include/lib have been left unchanged:
- include/lib/cpus/${ARCH}
- include/lib/el3_runtime/${ARCH}
The reason for this change is that having a global namespace for
includes isn't a good idea. It defeats one of the advantages of having
folders and it introduces problems that are sometimes subtle (because
you may not know the header you are actually including if there are two
of them).
For example, this patch had to be created because two headers were
called the same way: e0ea0928d5b7 ("Fix gpio includes of mt8173 platform
to avoid collision."). More recently, this patch has had similar
problems: 46f9b2c3a282 ("drivers: add tzc380 support").
This problem was introduced in commit 4ecca33988b9 ("Move include and
source files to logical locations"). At that time, there weren't too
many headers so it wasn't a real issue. However, time has shown that
this creates problems.
Platforms that want to preserve the way they include headers may add the
removed paths to PLAT_INCLUDES, but this is discouraged.
Change-Id: I39dc53ed98f9e297a5966e723d1936d6ccf2fc8f
Signed-off-by: Antonio Nino Diaz <antonio.ninodiaz@arm.com>
Diffstat (limited to 'bl32/tsp')
-rw-r--r-- | bl32/tsp/aarch64/tsp_entrypoint.S | 5 | ||||
-rw-r--r-- | bl32/tsp/aarch64/tsp_exceptions.S | 5 | ||||
-rw-r--r-- | bl32/tsp/aarch64/tsp_request.S | 2 | ||||
-rw-r--r-- | bl32/tsp/tsp.ld.S | 2 | ||||
-rw-r--r-- | bl32/tsp/tsp_interrupt.c | 11 | ||||
-rw-r--r-- | bl32/tsp/tsp_main.c | 14 | ||||
-rw-r--r-- | bl32/tsp/tsp_private.h | 9 | ||||
-rw-r--r-- | bl32/tsp/tsp_timer.c | 7 |
8 files changed, 32 insertions, 23 deletions
diff --git a/bl32/tsp/aarch64/tsp_entrypoint.S b/bl32/tsp/aarch64/tsp_entrypoint.S index 5d9da857..48f6981b 100644 --- a/bl32/tsp/aarch64/tsp_entrypoint.S +++ b/bl32/tsp/aarch64/tsp_entrypoint.S @@ -6,8 +6,9 @@ #include <arch.h> #include <asm_macros.S> -#include <tsp.h> -#include <xlat_tables_defs.h> +#include <bl32/tsp/tsp.h> +#include <lib/xlat_tables/xlat_tables_defs.h> + #include "../tsp_private.h" diff --git a/bl32/tsp/aarch64/tsp_exceptions.S b/bl32/tsp/aarch64/tsp_exceptions.S index 48e358a3..ad4b6488 100644 --- a/bl32/tsp/aarch64/tsp_exceptions.S +++ b/bl32/tsp/aarch64/tsp_exceptions.S @@ -6,9 +6,8 @@ #include <arch.h> #include <asm_macros.S> -#include <bl_common.h> -#include <tsp.h> - +#include <bl32/tsp/tsp.h> +#include <common/bl_common.h> /* ---------------------------------------------------- * The caller-saved registers x0-x18 and LR are saved diff --git a/bl32/tsp/aarch64/tsp_request.S b/bl32/tsp/aarch64/tsp_request.S index 2261f87f..5ad16da6 100644 --- a/bl32/tsp/aarch64/tsp_request.S +++ b/bl32/tsp/aarch64/tsp_request.S @@ -5,7 +5,7 @@ */ #include <asm_macros.S> -#include <tsp.h> +#include <bl32/tsp/tsp.h> .globl tsp_get_magic diff --git a/bl32/tsp/tsp.ld.S b/bl32/tsp/tsp.ld.S index 97b12ce1..e9a1df16 100644 --- a/bl32/tsp/tsp.ld.S +++ b/bl32/tsp/tsp.ld.S @@ -4,8 +4,8 @@ * SPDX-License-Identifier: BSD-3-Clause */ +#include <lib/xlat_tables/xlat_tables_defs.h> #include <platform_def.h> -#include <xlat_tables_defs.h> OUTPUT_FORMAT(PLATFORM_LINKER_FORMAT) OUTPUT_ARCH(PLATFORM_LINKER_ARCH) diff --git a/bl32/tsp/tsp_interrupt.c b/bl32/tsp/tsp_interrupt.c index f5013381..4e500b3c 100644 --- a/bl32/tsp/tsp_interrupt.c +++ b/bl32/tsp/tsp_interrupt.c @@ -4,12 +4,15 @@ * SPDX-License-Identifier: BSD-3-Clause */ -#include <arch_helpers.h> #include <assert.h> -#include <debug.h> -#include <platform.h> + #include <platform_def.h> -#include <tsp.h> + +#include <arch_helpers.h> +#include <bl32/tsp/tsp.h> +#include <common/debug.h> +#include <plat/common/platform.h> + #include "tsp_private.h" /******************************************************************************* diff --git a/bl32/tsp/tsp_main.c b/bl32/tsp/tsp_main.c index e41b51eb..24efa618 100644 --- a/bl32/tsp/tsp_main.c +++ b/bl32/tsp/tsp_main.c @@ -4,14 +4,16 @@ * SPDX-License-Identifier: BSD-3-Clause */ -#include <arch_helpers.h> -#include <bl_common.h> -#include <debug.h> -#include <platform.h> #include <platform_def.h> + +#include <arch_helpers.h> +#include <bl32/tsp/tsp.h> +#include <common/bl_common.h> +#include <common/debug.h> +#include <lib/spinlock.h> +#include <plat/common/platform.h> #include <platform_tsp.h> -#include <spinlock.h> -#include <tsp.h> + #include "tsp_private.h" diff --git a/bl32/tsp/tsp_private.h b/bl32/tsp/tsp_private.h index b697fa49..e39f2916 100644 --- a/bl32/tsp/tsp_private.h +++ b/bl32/tsp/tsp_private.h @@ -22,12 +22,13 @@ #ifndef __ASSEMBLY__ -#include <cassert.h> -#include <platform_def.h> /* For CACHE_WRITEBACK_GRANULE */ -#include <spinlock.h> #include <stdint.h> -#include <tsp.h> +#include <platform_def.h> /* For CACHE_WRITEBACK_GRANULE */ + +#include <bl32/tsp/tsp.h> +#include <lib/cassert.h> +#include <lib/spinlock.h> typedef struct work_statistics { /* Number of s-el1 interrupts on this cpu */ diff --git a/bl32/tsp/tsp_timer.c b/bl32/tsp/tsp_timer.c index ebe7f0d3..35928634 100644 --- a/bl32/tsp/tsp_timer.c +++ b/bl32/tsp/tsp_timer.c @@ -3,9 +3,12 @@ * * SPDX-License-Identifier: BSD-3-Clause */ -#include <arch_helpers.h> + #include <assert.h> -#include <platform.h> + +#include <arch_helpers.h> +#include <plat/common/platform.h> + #include "tsp_private.h" /******************************************************************************* |