Sfoglia il codice sorgente

Add snapshot from Kailua

Added snapshot of fastrpc code on Kailua to Lanai component.

Change-Id: I50bd699ef1c502116368c383ed9dc28f675d393c
Signed-off-by: Anirudh Raghavendra <[email protected]>
Anirudh Raghavendra 2 anni fa
parent
commit
f8b3c01858
2 ha cambiato i file con 442 aggiunte e 141 eliminazioni
  1. 413 138
      dsp/adsprpc.c
  2. 29 3
      dsp/adsprpc_shared.h

File diff suppressed because it is too large
+ 413 - 138
dsp/adsprpc.c


+ 29 - 3
dsp/adsprpc_shared.h

@@ -483,6 +483,7 @@ enum dsp_map_flags {
 
 enum fastrpc_control_type {
 	FASTRPC_CONTROL_LATENCY		=	1,
+	/* Share SMMU context bank */
 	FASTRPC_CONTROL_SMMU		=	2,
 	FASTRPC_CONTROL_KALLOC		=	3,
 	FASTRPC_CONTROL_WAKELOCK	=	4,
@@ -509,6 +510,10 @@ struct fastrpc_ctrl_pm {
 	uint32_t timeout;	/* timeout(in ms) for PM to keep system awake */
 };
 
+struct fastrpc_ctrl_smmu {
+	uint32_t sharedcb;  /* Set to SMMU share context bank */
+};
+
 struct fastrpc_ioctl_control {
 	uint32_t req;
 	union {
@@ -516,6 +521,7 @@ struct fastrpc_ioctl_control {
 		struct fastrpc_ctrl_kalloc kalloc;
 		struct fastrpc_ctrl_wakelock wp;
 		struct fastrpc_ctrl_pm pm;
+		struct fastrpc_ctrl_smmu smmu;
 	};
 };
 
@@ -574,6 +580,12 @@ enum fastrpc_response_flags {
 	POLL_MODE = 5,
 };
 
+enum fastrpc_process_create_state {
+	PROCESS_CREATE_DEFAULT = 0,			/* Process is not created */
+	PROCESS_CREATE_IS_INPROGRESS = 1,	/* Process creation is in progress */
+	PROCESS_CREATE_SUCCESS = 2,			/* Process creation is successful */
+};
+
 struct smq_invoke_rspv2 {
 	uint64_t ctx;		  /* invoke caller context */
 	int retval;		  /* invoke return value */
@@ -829,6 +841,15 @@ struct fastrpc_smmu {
 	int faults;
 	int secure;
 	int coherent;
+	int sharedcb;
+	/* gen pool for QRTR */
+	struct gen_pool *frpc_genpool;
+	/* fastrpc gen pool buffer */
+	struct fastrpc_buf *frpc_genpool_buf;
+	/* fastrpc gen pool buffer fixed IOVA */
+	unsigned long genpool_iova;
+	/* fastrpc gen pool buffer size */
+	size_t genpool_size;
 };
 
 struct fastrpc_session_ctx {
@@ -865,6 +886,7 @@ struct fastrpc_channel_ctx {
 	struct mutex smd_mutex;
 	uint64_t sesscount;
 	uint64_t ssrcount;
+	int in_hib;
 	void *handle;
 	uint64_t prevssrcount;
 	int issubsystemup;
@@ -942,13 +964,15 @@ struct fastrpc_mmap {
 	int refs;
 	uintptr_t raddr;
 	int secure;
-	/* Minidump unique index */
-	int frpc_md_index;
+	bool is_persistent;			/* the map is persistenet across sessions */
+	int frpc_md_index;			/* Minidump unique index */
 	uintptr_t attr;
+	bool in_use;				/* Indicates if persistent map is in use*/
 	struct timespec64 map_start_time;
 	struct timespec64 map_end_time;
 	/* Mapping for fastrpc shell */
 	bool is_filemap;
+	char *servloc_name;			/* Indicate which daemon mapped this */
 };
 
 enum fastrpc_perfkeys {
@@ -1019,6 +1043,7 @@ struct fastrpc_file {
 	char *servloc_name;
 	int file_close;
 	int dsp_proc_init;
+	int sharedcb;
 	struct fastrpc_apps *apps;
 	struct dentry *debugfs_file;
 	struct dev_pm_qos_request *dev_pm_qos_req;
@@ -1055,7 +1080,7 @@ struct fastrpc_file {
 	/* Threads poll for specified timeout and fall back to glink wait */
 	uint32_t poll_timeout;
 	/* Flag to indicate dynamic process creation status*/
-	bool in_process_create;
+	enum fastrpc_process_create_state dsp_process_state;
 	bool is_unsigned_pd;
 	/* Flag to indicate 32 bit driver*/
 	bool is_compat;
@@ -1063,6 +1088,7 @@ struct fastrpc_file {
 	struct fastrpc_dspsignal *signal_groups[DSPSIGNAL_NUM_SIGNALS / DSPSIGNAL_GROUP_SIZE];
 	spinlock_t dspsignals_lock;
 	struct mutex signal_create_mutex;
+	struct completion shutdown;
 };
 
 union fastrpc_ioctl_param {

Some files were not shown because too many files changed in this diff