瀏覽代碼

msm: eva: Give EVA IRQ thread realtime priority

To ensure consistent EVA feature performance.

Change-Id: I8068984bb677b7eef388b114efc36520be9f8d76
Signed-off-by: George Shen <[email protected]>
George Shen 2 年之前
父節點
當前提交
df291cad83
共有 3 個文件被更改,包括 9 次插入17 次删除
  1. 2 0
      msm/eva/cvp_core_hfi.h
  2. 4 14
      msm/eva/cvp_hfi.c
  3. 3 3
      msm/eva/vm/cvp_vm_main.c

+ 2 - 0
msm/eva/cvp_core_hfi.h

@@ -1,6 +1,7 @@
 /* SPDX-License-Identifier: GPL-2.0-only */
 /*
  * Copyright (c) 2018-2021, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
  */
 
 #ifndef __H_CVP_CORE_HFI_H__
@@ -280,6 +281,7 @@ struct iris_hfi_device {
 };
 
 irqreturn_t cvp_hfi_isr(int irq, void *dev);
+irqreturn_t iris_hfi_core_work_handler(int irq, void *data);
 irqreturn_t iris_hfi_isr_wd(int irq, void *dev);
 void cvp_iris_hfi_delete_device(void *device);
 

+ 4 - 14
msm/eva/cvp_hfi.c

@@ -3456,7 +3456,7 @@ exit:
 	return packet_count;
 }
 
-static void iris_hfi_core_work_handler(struct work_struct *work)
+irqreturn_t iris_hfi_core_work_handler(int irq, void *data)
 {
 	struct msm_cvp_core *core;
 	struct iris_hfi_device *device;
@@ -3468,11 +3468,9 @@ static void iris_hfi_core_work_handler(struct work_struct *work)
 	if (core)
 		device = core->device->hfi_device_data;
 	else
-		return;
+		return IRQ_HANDLED;
 
 	mutex_lock(&device->lock);
-
-
 	if (!__core_in_valid_state(device)) {
 		if (warning_on) {
 			dprintk(CVP_WARN, "%s Core not in init state\n",
@@ -3531,21 +3529,13 @@ err_no_work:
 	if (!(intr_status & CVP_WRAPPER_INTR_STATUS_A2HWD_BMSK))
 		enable_irq(device->cvp_hal_data->irq);
 
-	/*
-	 * XXX: Don't add any code beyond here.  Reacquiring locks after release
-	 * it above doesn't guarantee the atomicity that we're aiming for.
-	 */
+	return IRQ_HANDLED;
 }
 
-static DECLARE_WORK(iris_hfi_work, iris_hfi_core_work_handler);
-
 irqreturn_t cvp_hfi_isr(int irq, void *dev)
 {
-	struct iris_hfi_device *device = dev;
-
 	disable_irq_nosync(irq);
-	queue_work(device->cvp_workq, &iris_hfi_work);
-	return IRQ_HANDLED;
+	return IRQ_WAKE_THREAD;
 }
 
 static void iris_hfi_wd_work_handler(struct work_struct *work)

+ 3 - 3
msm/eva/vm/cvp_vm_main.c

@@ -1,6 +1,6 @@
 /* SPDX-License-Identifier: GPL-2.0-only
  *
- * Copyright (c) 2022, Qualcomm Innovation Center, Inc. All rights reserved.
+ * Copyright (c) 2022-2023, Qualcomm Innovation Center, Inc. All rights reserved.
  */
 #include <asm/memory.h>
 #include <linux/coresight-stm.h>
@@ -153,8 +153,8 @@ static int msm_cvp_vm_init_reg_and_irq(struct iris_hfi_device *device,
 	}
 
 	device->cvp_hal_data = hal;
-	rc = request_irq(res->irq, cvp_hfi_isr, IRQF_TRIGGER_HIGH,
-			"msm_cvp", device);
+	rc = request_threaded_irq(res->irq, cvp_hfi_isr, iris_hfi_core_work_handler,
+			IRQF_TRIGGER_HIGH, "msm_cvp", device);
 	if (unlikely(rc)) {
 		dprintk(CVP_ERR, "%s: request_irq failed rc: %d\n", __func__, rc);
 		goto error_irq_fail;