Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm/broadcom Fix to show counters of "bcm2836 pic" ...
details: https://anonhg.NetBSD.org/src/rev/7a1926295e9f
branches: trunk
changeset: 840186:7a1926295e9f
user: ryo <ryo%NetBSD.org@localhost>
date: Wed Mar 27 05:47:50 2019 +0000
description:
Fix to show counters of "bcm2836 pic" by "intrctl list" correctly.
diffstat:
sys/arch/arm/broadcom/bcm2835_intr.c | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
diffs (33 lines):
diff -r 2ec72500de5f -r 7a1926295e9f sys/arch/arm/broadcom/bcm2835_intr.c
--- a/sys/arch/arm/broadcom/bcm2835_intr.c Wed Mar 27 04:50:30 2019 +0000
+++ b/sys/arch/arm/broadcom/bcm2835_intr.c Wed Mar 27 05:47:50 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: bcm2835_intr.c,v 1.19 2019/03/01 14:53:12 skrll Exp $ */
+/* $NetBSD: bcm2835_intr.c,v 1.20 2019/03/27 05:47:50 ryo Exp $ */
/*-
* Copyright (c) 2012, 2015 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: bcm2835_intr.c,v 1.19 2019/03/01 14:53:12 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bcm2835_intr.c,v 1.20 2019/03/27 05:47:50 ryo Exp $");
#define _INTR_PRIVATE
@@ -673,6 +673,14 @@
#if defined(MULTIPROCESSOR)
pic->pic_cpus = ci->ci_kcpuset;
+
+ /*
+ * Append "#n" to avoid duplication of .pic_name[]
+ * It should be a unique id for intr_get_source()
+ */
+ char suffix[sizeof("#00000")];
+ snprintf(suffix, sizeof(suffix), "#%lu", cpuid);
+ strlcat(pic->pic_name, suffix, sizeof(pic->pic_name));
#endif
pic_add(pic, BCM2836_INT_BASECPUN(cpuid));
Home |
Main Index |
Thread Index |
Old Index