Unverified Commit 9a207532 authored by Antonio Niño Díaz's avatar Antonio Niño Díaz Committed by GitHub
Browse files

Merge pull request #1726 from antonio-nino-diaz-arm/an/includes

Sanitise includes across codebase
parents 3f99f7e4 8e7b27a4
......@@ -30,11 +30,12 @@
/* For the compiler ... */
#include <arch_helpers.h>
#include <assert.h>
#include <cdefs.h>
#include <stddef.h>
#include <arch_helpers.h>
#define __pubsub_section(event) __section("__pubsub_" #event)
/*
......
......@@ -4,7 +4,7 @@
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <pubsub.h>
#include <lib/el3_runtime/pubsub.h>
/*
* This file defines a list of pubsub events, declared using
......
......@@ -7,11 +7,13 @@
#ifndef AMU_H
#define AMU_H
#include <cassert.h>
#include <platform_def.h>
#include <stdbool.h>
#include <stdint.h>
#include <utils_def.h>
#include <platform_def.h>
#include <lib/cassert.h>
#include <lib/utils_def.h>
/* All group 0 counters */
#define AMU_GROUP0_COUNTERS_MASK U(0xf)
......
......@@ -71,7 +71,8 @@
#ifndef __ASSEMBLY__
#include <assert.h>
#include <ras_arch.h>
#include <lib/extensions/ras_arch.h>
struct err_record_info;
......
......@@ -184,7 +184,7 @@
#include <arch_helpers.h>
#include <assert.h>
#include <context.h>
#include <mmio.h>
#include <lib/mmio.h>
#include <stdint.h>
/*
......
......@@ -8,9 +8,11 @@
#define ASSERT_H
#include <cdefs.h>
#include <debug.h>
#include <platform_def.h>
#include <common/debug.h>
#ifndef PLAT_LOG_LEVEL_ASSERT
#define PLAT_LOG_LEVEL_ASSERT LOG_LEVEL
#endif
......
......@@ -7,9 +7,10 @@
#ifndef OBJECT_POOL_H
#define OBJECT_POOL_H
#include <debug.h>
#include <stdlib.h>
#include <utils_def.h>
#include <common/debug.h>
#include <lib/utils_def.h>
/*
* Pool of statically allocated objects.
......
......@@ -3,10 +3,11 @@
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef OPTEE_UTILS_H
#define OPTEE_UTILS_H
#include <bl_common.h>
#include <common/bl_common.h>
int parse_optee_header(entry_point_info_t *header_ep,
image_info_t *pager_image_info,
......
......@@ -7,9 +7,9 @@
#ifndef PMF_H
#define PMF_H
#include <cassert.h>
#include <pmf_helpers.h>
#include <utils_def.h>
#include <lib/cassert.h>
#include <lib/pmf/pmf_helpers.h>
#include <lib/utils_def.h>
/*
* Constants used for/by PMF services.
......
......@@ -7,13 +7,14 @@
#ifndef PMF_HELPERS_H
#define PMF_HELPERS_H
#include <arch_helpers.h>
#include <assert.h>
#include <bl_common.h>
#include <platform.h>
#include <stddef.h>
#include <stdint.h>
#include <arch_helpers.h>
#include <common/bl_common.h>
#include <plat/common/platform.h>
/*
* Prototype for PMF service functions.
*/
......
......@@ -7,11 +7,12 @@
#ifndef PSCI_H
#define PSCI_H
#include <bakery_lock.h>
#include <bl_common.h>
#include <platform_def.h> /* for PLAT_NUM_PWR_DOMAINS */
#include <psci_lib.h> /* To maintain compatibility for SPDs */
#include <utils_def.h>
#include <common/bl_common.h>
#include <lib/bakery_lock.h>
#include <lib/psci/psci_lib.h> /* To maintain compatibility for SPDs */
#include <lib/utils_def.h>
/*******************************************************************************
* Number of power domains whose state this PSCI implementation can track
......
......@@ -7,9 +7,10 @@
#ifndef PSCI_LIB_H
#define PSCI_LIB_H
#include <ep_info.h>
#include <common/ep_info.h>
#ifndef __ASSEMBLY__
#include <cdefs.h>
#include <stdint.h>
......
......@@ -7,7 +7,7 @@
#ifndef RUNTIME_INSTR_H
#define RUNTIME_INSTR_H
#include <utils_def.h>
#include <lib/utils_def.h>
#define RT_INSTR_ENTER_PSCI U(0)
#define RT_INSTR_EXIT_PSCI U(1)
......
......@@ -7,7 +7,7 @@
#ifndef SMCCC_H
#define SMCCC_H
#include <utils_def.h>
#include <lib/utils_def.h>
#define SMCCC_VERSION_MAJOR_SHIFT U(16)
#define SMCCC_VERSION_MAJOR_MASK U(0x7FFF)
......@@ -21,10 +21,10 @@
#if SMCCC_MAJOR_VERSION == 1
# define SMCCC_MINOR_VERSION U(1)
# include <smccc_v1.h>
# include <lib/smccc_v1.h>
#elif SMCCC_MAJOR_VERSION == 2
# define SMCCC_MINOR_VERSION U(0)
# include <smccc_v2.h>
# include <lib/smccc_v2.h>
#else
# error "Unsupported version of SMCCC."
#endif
......@@ -35,9 +35,10 @@
#ifndef __ASSEMBLY__
#include <cassert.h>
#include <stdint.h>
#include <lib/cassert.h>
#define is_caller_non_secure(_f) (((_f) & SMC_FROM_NON_SECURE) != U(0))
#define is_caller_secure(_f) (!is_caller_non_secure(_f))
......
......@@ -13,6 +13,7 @@
*/
#if !(defined(__LINKER__) || defined(__ASSEMBLY__))
#include <stddef.h>
#include <stdint.h>
typedef struct mem_region {
......
......@@ -8,8 +8,8 @@
#define XLAT_TABLES_AARCH32_H
#include <arch.h>
#include <utils_def.h>
#include <xlat_tables_defs.h>
#include <lib/utils_def.h>
#include <lib/xlat_tables/xlat_tables_defs.h>
#if !defined(PAGE_SIZE)
#error "PAGE_SIZE is not defined."
......
......@@ -8,8 +8,8 @@
#define XLAT_TABLES_AARCH64_H
#include <arch.h>
#include <utils_def.h>
#include <xlat_tables_defs.h>
#include <lib/utils_def.h>
#include <lib/xlat_tables/xlat_tables_defs.h>
#if !defined(PAGE_SIZE)
#error "PAGE_SIZE is not defined."
......
......@@ -7,12 +7,13 @@
#ifndef XLAT_TABLES_H
#define XLAT_TABLES_H
#include <xlat_tables_defs.h>
#include <lib/xlat_tables/xlat_tables_defs.h>
#ifndef __ASSEMBLY__
#include <stddef.h>
#include <stdint.h>
#include <xlat_mmu_helpers.h>
#include <lib/xlat_tables/xlat_mmu_helpers.h>
/* Helper macro to define entries for mmap_region_t. It creates
* identity mappings for each region.
......
......@@ -5,7 +5,7 @@
*/
#if XLAT_TABLES_LIB_V2
#include <xlat_tables_v2.h>
#include <lib/xlat_tables/xlat_tables_v2.h>
#else
#include <xlat_tables.h>
#include <lib/xlat_tables/xlat_tables.h>
#endif
......@@ -8,8 +8,8 @@
#define XLAT_TABLES_DEFS_H
#include <arch.h>
#include <utils_def.h>
#include <xlat_mmu_helpers.h>
#include <lib/utils_def.h>
#include <lib/xlat_tables/xlat_mmu_helpers.h>
/* Miscellaneous MMU related constants */
#define NUM_2MB_IN_GB (U(1) << 9)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment