62 lines
1.8 KiB
Diff
62 lines
1.8 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: "Yan, Shaoou" <shaopu.yan@intel.com>
|
|
Date: Thu, 8 Dec 2016 05:14:48 +0000
|
|
Subject: [PATCH] trusty: Popup warning when LK timer interrupt is not as
|
|
expected
|
|
|
|
LK timer interrupt vector 0x31 should map to irq 1, if not LK timer
|
|
interrupt is not work as expected
|
|
|
|
Change-Id: I4936bf3dd1d9a21e6913d8d3c4353568eb67c2b2
|
|
Tracked-On: OAM-40751
|
|
Signed-off-by: Feng, Wang <feng.f.wang@intel.com>
|
|
Reviewed-by: Ilkka Koskinen <ilkka.koskinen@intel.com>
|
|
---
|
|
drivers/trusty/trusty-irq.c | 14 +++++++++++---
|
|
1 file changed, 11 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/drivers/trusty/trusty-irq.c b/drivers/trusty/trusty-irq.c
|
|
index 5a74d75..6c510a6 100644
|
|
--- a/drivers/trusty/trusty-irq.c
|
|
+++ b/drivers/trusty/trusty-irq.c
|
|
@@ -29,6 +29,9 @@
|
|
#include <linux/trusty/sm_err.h>
|
|
#include <linux/trusty/trusty.h>
|
|
|
|
+#define IRQ_VECTOR_OFFSET 0x30
|
|
+#define IRQ_FOR_LK_TIMER 1
|
|
+
|
|
struct trusty_irq {
|
|
struct trusty_irq_state *is;
|
|
struct hlist_node node;
|
|
@@ -223,7 +226,9 @@ irqreturn_t trusty_irq_handler(int irq, void *data)
|
|
__func__, irq, trusty_irq->irq, smp_processor_id(),
|
|
trusty_irq->enable);
|
|
|
|
- set_pending_intr_to_lk(irq+0x30);
|
|
+ WARN_ON(irq != IRQ_FOR_LK_TIMER);
|
|
+
|
|
+ set_pending_intr_to_lk(irq+IRQ_VECTOR_OFFSET);
|
|
|
|
if (trusty_irq->percpu) {
|
|
disable_percpu_irq(irq);
|
|
@@ -528,10 +533,13 @@ static int trusty_irq_init_one(struct trusty_irq_state *is,
|
|
if (irq < 0)
|
|
return irq;
|
|
dev_info(is->dev, "irq from lk = %d\n", irq);
|
|
+
|
|
+ WARN_ON(irq-IRQ_VECTOR_OFFSET != IRQ_FOR_LK_TIMER);
|
|
+
|
|
if (per_cpu)
|
|
- ret = trusty_irq_init_per_cpu_irq(is, irq-0x30);
|
|
+ ret = trusty_irq_init_per_cpu_irq(is, irq-IRQ_VECTOR_OFFSET);
|
|
else
|
|
- ret = trusty_irq_init_normal_irq(is, irq-0x30);
|
|
+ ret = trusty_irq_init_normal_irq(is, irq-IRQ_VECTOR_OFFSET);
|
|
|
|
if (ret) {
|
|
dev_warn(is->dev,
|
|
--
|
|
https://clearlinux.org
|
|
|