From 95099d4622f8cb224d94e314c7a8e0df60b13f87 Mon Sep 17 00:00:00 2001
From: hc <hc@nodka.com>
Date: Sat, 09 Dec 2023 08:38:01 +0000
Subject: [PATCH] enable docker ppp

---
 kernel/drivers/soc/rockchip/rockchip_debug.c |   42 +++++++++++++++++++++++-------------------
 1 files changed, 23 insertions(+), 19 deletions(-)

diff --git a/kernel/drivers/soc/rockchip/rockchip_debug.c b/kernel/drivers/soc/rockchip/rockchip_debug.c
index 97002bc..60edc6a 100644
--- a/kernel/drivers/soc/rockchip/rockchip_debug.c
+++ b/kernel/drivers/soc/rockchip/rockchip_debug.c
@@ -59,7 +59,7 @@
 #include <linux/irq.h>
 #include <linux/delay.h>
 
-#include "../../staging/android/fiq_debugger/fiq_debugger_priv.h"
+#include "fiq_debugger/fiq_debugger_priv.h"
 #include "rockchip_debug.h"
 
 #define EDPCSR_LO			0x0a0
@@ -425,7 +425,7 @@
 	struct irq_desc *desc;
 
 	if (i > nr_irqs)
-		return -EINVAL;
+		return -1;
 
 	/* print header and calculate the width of the first column */
 	if (i == 0) {
@@ -439,15 +439,15 @@
 	}
 
 	desc = irq_to_desc(i);
-	if (!desc)
-		return -EINVAL;
+	if (!desc || (desc->status_use_accessors & IRQ_HIDDEN))
+		goto outsparse;
 
 	if (desc->kstat_irqs)
 		for_each_possible_cpu(j)
 			any_count |= *per_cpu_ptr(desc->kstat_irqs, j);
 
-	if ((!desc->action || (desc->action && desc->action == &chained_action)) && !any_count)
-		return -EINVAL;
+	if ((!desc->action) && !any_count)
+		goto outsparse;
 
 	buf += sprintf(buf, "%*d: ", prec, i);
 	for_each_possible_cpu(j)
@@ -463,7 +463,7 @@
 		buf += sprintf(buf, " %8s", "None");
 	}
 	if (desc->irq_data.domain)
-		buf += sprintf(buf, " %*d", prec, (int) desc->irq_data.hwirq);
+		buf += sprintf(buf, " %*lu", prec, desc->irq_data.hwirq);
 	else
 		buf += sprintf(buf, " %*s", prec, "");
 #ifdef CONFIG_GENERIC_IRQ_SHOW_LEVEL
@@ -481,6 +481,8 @@
 
 	sprintf(buf, "\n");
 	return 0;
+outsparse:
+	return -1;
 }
 
 static void rockchip_panic_notify_dump_irqs(void)
@@ -569,14 +571,15 @@
 		return -ENODEV;
 
 	atomic_notifier_chain_register(&panic_notifier_list,
-					&rockchip_panic_nb);
+				       &rockchip_panic_nb);
+	if (IS_ENABLED(CONFIG_NO_GKI)) {
+		if (IS_ENABLED(CONFIG_HARDLOCKUP_DETECTOR))
+			atomic_notifier_chain_register(&hardlock_notifier_list,
+						       &rockchip_panic_nb);
 
-	if (IS_ENABLED(CONFIG_HARDLOCKUP_DETECTOR))
-		atomic_notifier_chain_register(&hardlock_notifier_list,
-						&rockchip_panic_nb);
-
-	atomic_notifier_chain_register(&rcu_stall_notifier_list,
-					&rockchip_panic_nb);
+		atomic_notifier_chain_register(&rcu_stall_notifier_list,
+					       &rockchip_panic_nb);
+	}
 
 	return 0;
 }
@@ -588,13 +591,14 @@
 
 	atomic_notifier_chain_unregister(&panic_notifier_list,
 					 &rockchip_panic_nb);
+	if (IS_ENABLED(CONFIG_NO_GKI)) {
+		if (IS_ENABLED(CONFIG_HARDLOCKUP_DETECTOR))
+			atomic_notifier_chain_unregister(&hardlock_notifier_list,
+							 &rockchip_panic_nb);
 
-	if (IS_ENABLED(CONFIG_HARDLOCKUP_DETECTOR))
-		atomic_notifier_chain_unregister(&hardlock_notifier_list,
+		atomic_notifier_chain_unregister(&rcu_stall_notifier_list,
 						 &rockchip_panic_nb);
-
-	atomic_notifier_chain_unregister(&rcu_stall_notifier_list,
-					 &rockchip_panic_nb);
+	}
 
 	while (rockchip_cpu_debug[i])
 		iounmap(rockchip_cpu_debug[i++]);

--
Gitblit v1.6.2