From 7e641c6e5d96230ef404da18fa1113193eefdb79 Mon Sep 17 00:00:00 2001 From: linyx10 Date: Tue, 23 Feb 2021 19:27:37 +0800 Subject: [PATCH] Reorganize files to meet compilation mechanism on enabled GKI products. On enable GKI products, there will use Qcom latest dlkm compile file (device/qcom/common/dlkm/AndroidKernelModule.mk) to build kernel driver module, and it requires all files of the current target driver module to be in the same hierarchy path. Otherwise, when compile this module, a file will can not find other local header files that under the different hierarchy path. Change-Id: I09cfc7bd4539fb3ba8d654b240493d8a11066bee Signed-off-by: linyx10 Reviewed-on: https://gerrit.mot.com/1884805 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Reviewed-by: Binsheng Que Reviewed-by: Zhenxin Xi Submit-Approved: Jira Key --- drivers/gud/MobiCoreDriver/admin.c | 4 ++-- drivers/gud/MobiCoreDriver/client.c | 4 ++-- drivers/gud/MobiCoreDriver/client.h | 2 +- drivers/gud/MobiCoreDriver/clientlib.c | 6 +++--- drivers/gud/MobiCoreDriver/fastcall.c | 2 +- drivers/gud/MobiCoreDriver/{mci => }/gptci.h | 0 drivers/gud/MobiCoreDriver/iwp.c | 16 ++++++++-------- drivers/gud/MobiCoreDriver/iwp.h | 2 +- drivers/gud/MobiCoreDriver/main.c | 4 ++-- .../gud/MobiCoreDriver/{public => }/mc_admin.h | 0 .../MobiCoreDriver/{public => }/mc_linux_api.h | 0 .../gud/MobiCoreDriver/{public => }/mc_user.h | 0 drivers/gud/MobiCoreDriver/{mci => }/mcifc.h | 0 drivers/gud/MobiCoreDriver/{mci => }/mciiwp.h | 2 +- drivers/gud/MobiCoreDriver/{mci => }/mcimcp.h | 2 +- drivers/gud/MobiCoreDriver/{mci => }/mcinq.h | 0 drivers/gud/MobiCoreDriver/{mci => }/mcitime.h | 0 .../gud/MobiCoreDriver/{mci => }/mcloadformat.h | 0 drivers/gud/MobiCoreDriver/mcp.c | 14 +++++++------- drivers/gud/MobiCoreDriver/mcp.h | 2 +- drivers/gud/MobiCoreDriver/mmu.c | 4 ++-- .../{public => }/mobicore_driver_api.h | 0 drivers/gud/MobiCoreDriver/nq.c | 14 +++++++------- drivers/gud/MobiCoreDriver/session.c | 6 +++--- .../{public/GP => }/tee_client_api.h | 0 .../{public/GP => }/tee_client_api_imp.h | 0 .../{public/GP => }/tee_client_error.h | 0 .../{public/GP => }/tee_client_types.h | 0 drivers/gud/MobiCoreDriver/teeclientapi.c | 6 +++--- drivers/gud/MobiCoreDriver/user.c | 2 +- drivers/gud/MobiCoreDriver/xen_common.h | 6 +++--- drivers/gud/MobiCoreDriver/xen_fe.c | 2 +- 32 files changed, 50 insertions(+), 50 deletions(-) rename drivers/gud/MobiCoreDriver/{mci => }/gptci.h (100%) rename drivers/gud/MobiCoreDriver/{public => }/mc_admin.h (100%) rename drivers/gud/MobiCoreDriver/{public => }/mc_linux_api.h (100%) rename drivers/gud/MobiCoreDriver/{public => }/mc_user.h (100%) rename drivers/gud/MobiCoreDriver/{mci => }/mcifc.h (100%) rename drivers/gud/MobiCoreDriver/{mci => }/mciiwp.h (97%) rename drivers/gud/MobiCoreDriver/{mci => }/mcimcp.h (99%) rename drivers/gud/MobiCoreDriver/{mci => }/mcinq.h (100%) rename drivers/gud/MobiCoreDriver/{mci => }/mcitime.h (100%) rename drivers/gud/MobiCoreDriver/{mci => }/mcloadformat.h (100%) rename drivers/gud/MobiCoreDriver/{public => }/mobicore_driver_api.h (100%) rename drivers/gud/MobiCoreDriver/{public/GP => }/tee_client_api.h (100%) rename drivers/gud/MobiCoreDriver/{public/GP => }/tee_client_api_imp.h (100%) rename drivers/gud/MobiCoreDriver/{public/GP => }/tee_client_error.h (100%) rename drivers/gud/MobiCoreDriver/{public/GP => }/tee_client_types.h (100%) diff --git a/drivers/gud/MobiCoreDriver/admin.c b/drivers/gud/MobiCoreDriver/admin.c index 70ed4a1ffd72..9a4813d7f363 100644 --- a/drivers/gud/MobiCoreDriver/admin.c +++ b/drivers/gud/MobiCoreDriver/admin.c @@ -32,8 +32,8 @@ #endif #include -#include "public/mc_user.h" -#include "public/mc_admin.h" +#include "mc_user.h" +#include "mc_admin.h" #include "main.h" #include "mmu.h" /* For load_check and load_token */ diff --git a/drivers/gud/MobiCoreDriver/client.c b/drivers/gud/MobiCoreDriver/client.c index cfdf577adc95..73d168c2df82 100644 --- a/drivers/gud/MobiCoreDriver/client.c +++ b/drivers/gud/MobiCoreDriver/client.c @@ -26,8 +26,8 @@ #include /* sockfd_lookup */ #include /* fput */ -#include "public/mc_user.h" -#include "public/mc_admin.h" +#include "mc_user.h" +#include "mc_admin.h" #include "main.h" #include "mmu.h" diff --git a/drivers/gud/MobiCoreDriver/client.h b/drivers/gud/MobiCoreDriver/client.h index 1762157bf07f..8928f4a9e850 100644 --- a/drivers/gud/MobiCoreDriver/client.h +++ b/drivers/gud/MobiCoreDriver/client.h @@ -19,7 +19,7 @@ #include #include /* TASK_COMM_LEN */ -#include "public/mc_user.h" /* many types */ +#include "mc_user.h" /* many types */ struct tee_client; struct mcp_open_info; diff --git a/drivers/gud/MobiCoreDriver/clientlib.c b/drivers/gud/MobiCoreDriver/clientlib.c index c3b62e426506..a1254bdf2a42 100644 --- a/drivers/gud/MobiCoreDriver/clientlib.c +++ b/drivers/gud/MobiCoreDriver/clientlib.c @@ -20,9 +20,9 @@ #include #include -#include "public/mc_user.h" -#include "public/mc_admin.h" -#include "public/mobicore_driver_api.h" +#include "mc_user.h" +#include "mc_admin.h" +#include "mobicore_driver_api.h" #include "main.h" #include "client.h" diff --git a/drivers/gud/MobiCoreDriver/fastcall.c b/drivers/gud/MobiCoreDriver/fastcall.c index 6d91f9c378e3..ef0cd98acb81 100644 --- a/drivers/gud/MobiCoreDriver/fastcall.c +++ b/drivers/gud/MobiCoreDriver/fastcall.c @@ -21,7 +21,7 @@ #include /* local_clock */ #endif -#include "mci/mcifc.h" +#include "mcifc.h" #include "platform.h" /* MC_SMC_FASTCALL */ #include "main.h" diff --git a/drivers/gud/MobiCoreDriver/mci/gptci.h b/drivers/gud/MobiCoreDriver/gptci.h similarity index 100% rename from drivers/gud/MobiCoreDriver/mci/gptci.h rename to drivers/gud/MobiCoreDriver/gptci.h diff --git a/drivers/gud/MobiCoreDriver/iwp.c b/drivers/gud/MobiCoreDriver/iwp.c index 557bca5d4ebb..1284bc804a89 100644 --- a/drivers/gud/MobiCoreDriver/iwp.c +++ b/drivers/gud/MobiCoreDriver/iwp.c @@ -33,15 +33,15 @@ #include /* local_clock */ #endif -#include "public/GP/tee_client_api.h" /* GP error codes/origins FIXME move */ -#include "public/mc_user.h" -#include "public/mc_admin.h" +#include "tee_client_api.h" /* GP error codes/origins FIXME move */ +#include "mc_user.h" +#include "mc_admin.h" -#include "mci/mcimcp.h" -#include "mci/mcifc.h" -#include "mci/mcinq.h" /* SID_MCP */ -#include "mci/mcitime.h" /* struct mcp_time */ -#include "mci/mciiwp.h" +#include "mcimcp.h" +#include "mcifc.h" +#include "mcinq.h" /* SID_MCP */ +#include "mcitime.h" /* struct mcp_time */ +#include "mciiwp.h" #include "main.h" #include "admin.h" /* tee_object* for 'blob' */ diff --git a/drivers/gud/MobiCoreDriver/iwp.h b/drivers/gud/MobiCoreDriver/iwp.h index 52296af271ce..8dff2c591571 100644 --- a/drivers/gud/MobiCoreDriver/iwp.h +++ b/drivers/gud/MobiCoreDriver/iwp.h @@ -16,7 +16,7 @@ #ifndef _MC_IWP_H_ #define _MC_IWP_H_ -#include "mci/mcloadformat.h" /* struct identity */ +#include "mcloadformat.h" /* struct identity */ #include "nq.h" #include "mcp.h" /* mcp_buffer_map FIXME move to nq? */ diff --git a/drivers/gud/MobiCoreDriver/main.c b/drivers/gud/MobiCoreDriver/main.c index 8161bb86698e..1846ece25477 100644 --- a/drivers/gud/MobiCoreDriver/main.c +++ b/drivers/gud/MobiCoreDriver/main.c @@ -23,8 +23,8 @@ #include #include -#include "public/mc_user.h" -#include "public/mc_admin.h" /* MC_ADMIN_DEVNODE */ +#include "mc_user.h" +#include "mc_admin.h" /* MC_ADMIN_DEVNODE */ #include "platform.h" /* MC_PM_RUNTIME */ #include "main.h" diff --git a/drivers/gud/MobiCoreDriver/public/mc_admin.h b/drivers/gud/MobiCoreDriver/mc_admin.h similarity index 100% rename from drivers/gud/MobiCoreDriver/public/mc_admin.h rename to drivers/gud/MobiCoreDriver/mc_admin.h diff --git a/drivers/gud/MobiCoreDriver/public/mc_linux_api.h b/drivers/gud/MobiCoreDriver/mc_linux_api.h similarity index 100% rename from drivers/gud/MobiCoreDriver/public/mc_linux_api.h rename to drivers/gud/MobiCoreDriver/mc_linux_api.h diff --git a/drivers/gud/MobiCoreDriver/public/mc_user.h b/drivers/gud/MobiCoreDriver/mc_user.h similarity index 100% rename from drivers/gud/MobiCoreDriver/public/mc_user.h rename to drivers/gud/MobiCoreDriver/mc_user.h diff --git a/drivers/gud/MobiCoreDriver/mci/mcifc.h b/drivers/gud/MobiCoreDriver/mcifc.h similarity index 100% rename from drivers/gud/MobiCoreDriver/mci/mcifc.h rename to drivers/gud/MobiCoreDriver/mcifc.h diff --git a/drivers/gud/MobiCoreDriver/mci/mciiwp.h b/drivers/gud/MobiCoreDriver/mciiwp.h similarity index 97% rename from drivers/gud/MobiCoreDriver/mci/mciiwp.h rename to drivers/gud/MobiCoreDriver/mciiwp.h index 4c1ac2ff673a..5a3ff3bf0e10 100644 --- a/drivers/gud/MobiCoreDriver/mci/mciiwp.h +++ b/drivers/gud/MobiCoreDriver/mciiwp.h @@ -16,7 +16,7 @@ #ifndef MCIIWP_H_ #define MCIIWP_H_ -#include "public/GP/tee_client_types.h" /* teec_uuid FIXME it's all mixed up! */ +#include "tee_client_types.h" /* teec_uuid FIXME it's all mixed up! */ /** Session ID for notifications for the Dragon CA-to-TA communication protocol * diff --git a/drivers/gud/MobiCoreDriver/mci/mcimcp.h b/drivers/gud/MobiCoreDriver/mcimcp.h similarity index 99% rename from drivers/gud/MobiCoreDriver/mci/mcimcp.h rename to drivers/gud/MobiCoreDriver/mcimcp.h index a441826d2aad..992dcc4a7c4e 100644 --- a/drivers/gud/MobiCoreDriver/mci/mcimcp.h +++ b/drivers/gud/MobiCoreDriver/mcimcp.h @@ -16,7 +16,7 @@ #ifndef MCP_H_ #define MCP_H_ -#include "mci/mcloadformat.h" +#include "mcloadformat.h" /** Indicates a response */ #define FLAG_RESPONSE BIT(31) diff --git a/drivers/gud/MobiCoreDriver/mci/mcinq.h b/drivers/gud/MobiCoreDriver/mcinq.h similarity index 100% rename from drivers/gud/MobiCoreDriver/mci/mcinq.h rename to drivers/gud/MobiCoreDriver/mcinq.h diff --git a/drivers/gud/MobiCoreDriver/mci/mcitime.h b/drivers/gud/MobiCoreDriver/mcitime.h similarity index 100% rename from drivers/gud/MobiCoreDriver/mci/mcitime.h rename to drivers/gud/MobiCoreDriver/mcitime.h diff --git a/drivers/gud/MobiCoreDriver/mci/mcloadformat.h b/drivers/gud/MobiCoreDriver/mcloadformat.h similarity index 100% rename from drivers/gud/MobiCoreDriver/mci/mcloadformat.h rename to drivers/gud/MobiCoreDriver/mcloadformat.h diff --git a/drivers/gud/MobiCoreDriver/mcp.c b/drivers/gud/MobiCoreDriver/mcp.c index 0e83b6c375ff..54659293ba36 100644 --- a/drivers/gud/MobiCoreDriver/mcp.c +++ b/drivers/gud/MobiCoreDriver/mcp.c @@ -33,14 +33,14 @@ #include /* local_clock */ #endif -#include "public/mc_user.h" -#include "public/mc_admin.h" +#include "mc_user.h" +#include "mc_admin.h" -#include "mci/mcimcp.h" -#include "mci/mcifc.h" -#include "mci/mcinq.h" /* SID_MCP */ -#include "mci/mcitime.h" /* struct mcp_time */ -#include "mci/mciiwp.h" +#include "mcimcp.h" +#include "mcifc.h" +#include "mcinq.h" /* SID_MCP */ +#include "mcitime.h" /* struct mcp_time */ +#include "mciiwp.h" #include "main.h" #include "admin.h" /* tee_object* for 'blob' */ diff --git a/drivers/gud/MobiCoreDriver/mcp.h b/drivers/gud/MobiCoreDriver/mcp.h index 7d6b354c8774..895b329097c8 100644 --- a/drivers/gud/MobiCoreDriver/mcp.h +++ b/drivers/gud/MobiCoreDriver/mcp.h @@ -16,7 +16,7 @@ #ifndef _MC_MCP_H_ #define _MC_MCP_H_ -#include "mci/mcloadformat.h" /* struct identity */ +#include "mcloadformat.h" /* struct identity */ #include "nq.h" struct tee_mmu; diff --git a/drivers/gud/MobiCoreDriver/mmu.c b/drivers/gud/MobiCoreDriver/mmu.c index 14eb3188e42b..9b52c7ed4972 100644 --- a/drivers/gud/MobiCoreDriver/mmu.c +++ b/drivers/gud/MobiCoreDriver/mmu.c @@ -40,9 +40,9 @@ #include #endif -#include "public/mc_user.h" +#include "mc_user.h" -#include "mci/mcimcp.h" +#include "mcimcp.h" #include "main.h" #include "mcp.h" /* mcp_buffer_map */ diff --git a/drivers/gud/MobiCoreDriver/public/mobicore_driver_api.h b/drivers/gud/MobiCoreDriver/mobicore_driver_api.h similarity index 100% rename from drivers/gud/MobiCoreDriver/public/mobicore_driver_api.h rename to drivers/gud/MobiCoreDriver/mobicore_driver_api.h diff --git a/drivers/gud/MobiCoreDriver/nq.c b/drivers/gud/MobiCoreDriver/nq.c index e9b024ae2ab5..fa5706a02838 100644 --- a/drivers/gud/MobiCoreDriver/nq.c +++ b/drivers/gud/MobiCoreDriver/nq.c @@ -29,14 +29,14 @@ #include "platform.h" /* CPU-related information */ -#include "public/mc_user.h" -#include "public/mc_linux_api.h" +#include "mc_user.h" +#include "mc_linux_api.h" -#include "mci/mcifc.h" -#include "mci/mciiwp.h" -#include "mci/mcimcp.h" -#include "mci/mcinq.h" -#include "mci/mcitime.h" /* struct mcp_time */ +#include "mcifc.h" +#include "mciiwp.h" +#include "mcimcp.h" +#include "mcinq.h" +#include "mcitime.h" /* struct mcp_time */ #include "main.h" #include "clock.h" diff --git a/drivers/gud/MobiCoreDriver/session.c b/drivers/gud/MobiCoreDriver/session.c index 03c73c96d52e..262e787ad1c7 100644 --- a/drivers/gud/MobiCoreDriver/session.c +++ b/drivers/gud/MobiCoreDriver/session.c @@ -33,8 +33,8 @@ #include /* put_task_struct */ #endif -#include "public/mc_user.h" -#include "public/mc_admin.h" +#include "mc_user.h" +#include "mc_admin.h" #if KERNEL_VERSION(3, 5, 0) <= LINUX_VERSION_CODE #include @@ -74,7 +74,7 @@ static inline bool gid_lt(kgid_t left, kgid_t right) #include "mcp.h" #include "client.h" /* *cbuf* */ #include "session.h" -#include "mci/mcimcp.h" /* WSM_INVALID */ +#include "mcimcp.h" /* WSM_INVALID */ #define SHA1_HASH_SIZE 20 diff --git a/drivers/gud/MobiCoreDriver/public/GP/tee_client_api.h b/drivers/gud/MobiCoreDriver/tee_client_api.h similarity index 100% rename from drivers/gud/MobiCoreDriver/public/GP/tee_client_api.h rename to drivers/gud/MobiCoreDriver/tee_client_api.h diff --git a/drivers/gud/MobiCoreDriver/public/GP/tee_client_api_imp.h b/drivers/gud/MobiCoreDriver/tee_client_api_imp.h similarity index 100% rename from drivers/gud/MobiCoreDriver/public/GP/tee_client_api_imp.h rename to drivers/gud/MobiCoreDriver/tee_client_api_imp.h diff --git a/drivers/gud/MobiCoreDriver/public/GP/tee_client_error.h b/drivers/gud/MobiCoreDriver/tee_client_error.h similarity index 100% rename from drivers/gud/MobiCoreDriver/public/GP/tee_client_error.h rename to drivers/gud/MobiCoreDriver/tee_client_error.h diff --git a/drivers/gud/MobiCoreDriver/public/GP/tee_client_types.h b/drivers/gud/MobiCoreDriver/tee_client_types.h similarity index 100% rename from drivers/gud/MobiCoreDriver/public/GP/tee_client_types.h rename to drivers/gud/MobiCoreDriver/tee_client_types.h diff --git a/drivers/gud/MobiCoreDriver/teeclientapi.c b/drivers/gud/MobiCoreDriver/teeclientapi.c index ca973786de83..f12ecce399b0 100644 --- a/drivers/gud/MobiCoreDriver/teeclientapi.c +++ b/drivers/gud/MobiCoreDriver/teeclientapi.c @@ -18,11 +18,11 @@ #include #include -#include "public/GP/tee_client_api.h" -#include "public/mc_user.h" +#include "tee_client_api.h" +#include "mc_user.h" #include "main.h" -#include "mci/mcinq.h" /* TA termination codes */ +#include "mcinq.h" /* TA termination codes */ #include "client.h" /* Macros */ diff --git a/drivers/gud/MobiCoreDriver/user.c b/drivers/gud/MobiCoreDriver/user.c index 7b5befcffd38..8b50853cce23 100644 --- a/drivers/gud/MobiCoreDriver/user.c +++ b/drivers/gud/MobiCoreDriver/user.c @@ -20,7 +20,7 @@ #include /* struct vm_area_struct */ #include -#include "public/mc_user.h" +#include "mc_user.h" #include "main.h" #include "user.h" diff --git a/drivers/gud/MobiCoreDriver/xen_common.h b/drivers/gud/MobiCoreDriver/xen_common.h index e34374b1a22a..215c264eaa54 100644 --- a/drivers/gud/MobiCoreDriver/xen_common.h +++ b/drivers/gud/MobiCoreDriver/xen_common.h @@ -23,9 +23,9 @@ #include #include -#include "public/mc_user.h" /* many types */ -#include "mci/mciiwp.h" -#include "mci/mcimcp.h" +#include "mc_user.h" /* many types */ +#include "mciiwp.h" +#include "mcimcp.h" #include "mmu.h" /* PMD/PTE max entries */ #include "client.h" /* For BE to treat other VMs as clients */ diff --git a/drivers/gud/MobiCoreDriver/xen_fe.c b/drivers/gud/MobiCoreDriver/xen_fe.c index 8f2fb1b04f36..f60a345a2d64 100644 --- a/drivers/gud/MobiCoreDriver/xen_fe.c +++ b/drivers/gud/MobiCoreDriver/xen_fe.c @@ -15,7 +15,7 @@ #include -#include "mci/mciiwp.h" /* struct interworld_session */ +#include "mciiwp.h" /* struct interworld_session */ #include "main.h"