Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/arm/cortex Revert the KERNHIST for now it causes pr...
details: https://anonhg.NetBSD.org/src/rev/f4f061219813
branches: trunk
changeset: 354762:f4f061219813
user: skrll <skrll%NetBSD.org@localhost>
date: Wed Jun 28 20:46:35 2017 +0000
description:
Revert the KERNHIST for now it causes problems
diffstat:
sys/arch/arm/cortex/gic.c | 63 ++++------------------------------------------
1 files changed, 6 insertions(+), 57 deletions(-)
diffs (166 lines):
diff -r bc7f2b4ff72b -r f4f061219813 sys/arch/arm/cortex/gic.c
--- a/sys/arch/arm/cortex/gic.c Wed Jun 28 14:39:33 2017 +0000
+++ b/sys/arch/arm/cortex/gic.c Wed Jun 28 20:46:35 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: gic.c,v 1.28 2017/06/22 08:10:29 skrll Exp $ */
+/* $NetBSD: gic.c,v 1.29 2017/06/28 20:46:35 skrll Exp $ */
/*-
* Copyright (c) 2012 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -29,22 +29,19 @@
*/
#include "opt_ddb.h"
-#include "opt_kernhist.h"
#include "opt_multiprocessor.h"
#define _INTR_PRIVATE
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: gic.c,v 1.28 2017/06/22 08:10:29 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gic.c,v 1.29 2017/06/28 20:46:35 skrll Exp $");
#include <sys/param.h>
#include <sys/bus.h>
-#include <sys/cpu.h>
#include <sys/device.h>
#include <sys/evcnt.h>
#include <sys/intr.h>
-#include <sys/kernhist.h>
-#include <sys/once.h>
+#include <sys/cpu.h>
#include <sys/proc.h>
#include <arm/armreg.h>
@@ -74,16 +71,6 @@
static void armgic_ipi_send(struct pic_softc *, const kcpuset_t *, u_long);
#endif
-#ifdef KERNHIST
-static int armgichist_init(void);
-
-#ifndef ARMGICHIST_SIZE
-#define ARMGICHIST_SIZE 200
-#endif
-
-KERNHIST_DEFINE(armgichist);
-#endif
-
static const struct pic_ops armgic_picops = {
.pic_unblock_irqs = armgic_unblock_irqs,
.pic_block_irqs = armgic_block_irqs,
@@ -251,27 +238,12 @@
}
#endif
-
-#ifdef KERNHIST
-int
-armgichist_init(void)
+void
+armgic_irq_handler(void *tf)
{
-
- KERNHIST_INIT(armgichist, ARMGICHIST_SIZE);
-
- return 0;
-}
-#endif
-
-void
-armgic_irq_handler(void *arg)
-{
- KERNHIST_FUNC(__func__); KERNHIST_CALLED(armgichist);
struct cpu_info * const ci = curcpu();
struct armgic_softc * const sc = &armgic_softc;
const int old_ipl = ci->ci_cpl;
- struct trapframe * const tf = arg;
-
#ifdef DIAGNOSTIC
const int old_mtx_count = ci->ci_mtx_count;
const int old_l_biglocks = ci->ci_curlwp->l_biglocks;
@@ -285,14 +257,10 @@
KASSERTMSG(old_ipl != IPL_HIGH, "old_ipl %d pmr %#x hppir %#x",
old_ipl, gicc_read(sc, GICC_PMR), gicc_read(sc, GICC_HPPIR));
- KERNHIST_LOG(armgichist, "old_ipl %d pmr %u hppir %u", old_ipl,
- gicc_read(sc, GICC_PMR), gicc_read(sc, GICC_HPPIR), 0);
-
for (;;) {
uint32_t iar = gicc_read(sc, GICC_IAR);
uint32_t irq = __SHIFTOUT(iar, GICC_IAR_IRQ);
- KERNHIST_LOG(armgichist, "iar %#x (irq %d)", iar, irq, 0, 0);
if (irq == GICC_IAR_IRQ_SPURIOUS ||
irq == GICC_IAR_IRQ_SSPURIOUS) {
iar = gicc_read(sc, GICC_IAR);
@@ -321,9 +289,6 @@
* However, if are just raising ipl, we can just update ci_cpl.
*/
const int ipl = is->is_ipl;
-
- KERNHIST_LOG(armgichist, "ipl %d vs ci_cpl %d pmr %#x", ipl,
- ci->ci_cpl, gicc_read(sc, GICC_PMR), 0);
if (__predict_false(ipl < ci->ci_cpl)) {
pic_do_pending_ints(I32_bit, ipl, tf);
KASSERT(ci->ci_cpl == ipl);
@@ -350,18 +315,14 @@
*/
KASSERT(old_ipl != IPL_HIGH);
pic_do_pending_ints(I32_bit, old_ipl, tf);
- KASSERTMSG(ci->ci_cpl == old_ipl, "ci_cpl %d old_ipl %d", ci->ci_cpl,
- old_ipl);
+ KASSERTMSG(ci->ci_cpl == old_ipl, "ci_cpl %d old_ipl %d", ci->ci_cpl, old_ipl);
KASSERT(old_mtx_count == ci->ci_mtx_count);
KASSERT(old_l_biglocks == ci->ci_curlwp->l_biglocks);
-
- KERNHIST_LOG(armgichist, "... done", 0, 0, 0, 0);
}
void
armgic_establish_irq(struct pic_softc *pic, struct intrsource *is)
{
- KERNHIST_FUNC(__func__); KERNHIST_CALLED(armgichist);
struct armgic_softc * const sc = PICTOSOFTC(pic);
const size_t group = is->is_irq / 32;
const u_int irq = is->is_irq & 31;
@@ -409,9 +370,6 @@
}
if (new_cfg != cfg) {
gicd_write(sc, cfg_reg, new_cfg);
-
- KERNHIST_LOG(armgichist, "irq %u: cfg changed from %#x "
- "to %#x", is->is_irq, cfg, new_cfg, 0);
}
#ifdef MULTIPROCESSOR
} else {
@@ -509,7 +467,6 @@
void
armgic_ipi_send(struct pic_softc *pic, const kcpuset_t *kcp, u_long ipi)
{
- KERNHIST_FUNC(__func__); KERNHIST_CALLED(armgichist);
struct armgic_softc * const sc = PICTOSOFTC(pic);
#if 0
@@ -532,7 +489,6 @@
}
gicd_write(sc, GICD_SGIR, sgir);
- KERNHIST_LOG(armgichist, "... done (%#x)", sgir, 0, 0, 0);
}
#endif
@@ -554,13 +510,6 @@
{
struct armgic_softc * const sc = &armgic_softc;
struct mpcore_attach_args * const mpcaa = aux;
-#ifdef KERNHIST
- static ONCE_DECL(armgic_once);
-
- RUN_ONCE(&armgic_once, armgichist_init);
-#endif
-
- KERNHIST_FUNC(__func__); KERNHIST_CALLED(armgichist);
sc->sc_dev = self;
self->dv_private = sc;
Home |
Main Index |
Thread Index |
Old Index