Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Aug 2002 15:47:10 -0700 (PDT)
From:      Peter Wemm <peter@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 16610 for review
Message-ID:  <200208262247.g7QMlAGb039120@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://people.freebsd.org/~peter/p4db/chv.cgi?CH=16610

Change 16610 by peter@peter_mckinley on 2002/08/26 15:46:44

	revert some crud

Affected files ...

.. //depot/projects/ia64/sys/ia64/ia64/interrupt.c#11 edit
.. //depot/projects/ia64/sys/ia64/ia64/sapic.c#11 edit

Differences ...

==== //depot/projects/ia64/sys/ia64/ia64/interrupt.c#11 (text+ko) ====

@@ -50,7 +50,6 @@
 #include <sys/lock.h>
 #include <sys/mutex.h>
 #include <sys/smp.h>
-#include <sys/cons.h>
 
 #include <machine/clock.h>
 #include <machine/cpu.h>
@@ -88,8 +87,6 @@
 
 
 static u_int schedclk2;
-time_t lts;
-u_int64_t lv;
 
 void
 interrupt(u_int64_t vector, struct trapframe *framep)
@@ -151,20 +148,8 @@
 		CTR1(KTR_SMP, "IPI_TEST, cpuid=%d", PCPU_GET(cpuid));
 		mp_ipi_test++;
 #endif
-	} else {
-#if 0
-if (1 || vector < 48) {
-if (lts != time_second || lv != vector) {
-	printf(">I%ld<", vector - 32);
-	lts = time_second;
-	lv = vector;
-}
-} else {
-cnputc('I');
-}
-#endif
+	} else
 		ia64_dispatch_intr(framep, vector);
-	}
 
  out:
 	atomic_subtract_int(&td->td_intr_nesting_level, 1);
@@ -210,11 +195,10 @@
 }
 SYSINIT(ithds_init, SI_SUB_INTR, SI_ORDER_SECOND, ithds_init, NULL);
 
-
 void
 ia64_add_sapic(struct sapic *sa)
 {
-	printf("SAPIC %d is %p, %d-%d\n", ia64_sapic_count, sa, sa->sa_base, sa->sa_limit);
+
 	ia64_sapics[ia64_sapic_count++] = sa;
 }
 
@@ -226,8 +210,7 @@
 	irq = vector - IA64_HARDWARE_IRQ_BASE;
 	for (i = 0; i < ia64_sapic_count; i++) {
 		struct sapic *sa = ia64_sapics[i];
-		if (irq >= sa->sa_base && irq <= sa->sa_limit) {
-/* printf("ia64_enable: vector %d -> hw int %d apic %d input %d\n", vector, irq, i, irq - sa->sa_base); */
+		if (irq >= sa->sa_base && irq <= sa->sa_limit)
 			sapic_enable(sa, irq - sa->sa_base, vector,
 				     (irq < 16
 				      ? SAPIC_TRIGGER_EDGE
@@ -235,46 +218,10 @@
 				     (irq < 16
 				      ? SAPIC_POLARITY_HIGH
 				      : SAPIC_POLARITY_LOW));
-		}
 	}
 }
 
-#if 0
-#if 0
-long fakecnt;
 static void
-fakeihand(void *junk)
-{
-	printf(">FAKE %d<", (int)(uintptr_t)junk);
-}
-#endif
-static void
-ithds_init2(void *dummy)
-{
-#if 0
-	void *cookie;
-	void *arg;
-#endif
-	int i;
-
-	printf("SETTING UP FAKE INTERRUPTS\n");
-	for (i = 16; i < 128; i++) {
-#if 0
-		if (ia64_intrs[i + IA64_HARDWARE_IRQ_BASE])
-			continue;
-		arg = (void *)(uintptr_t)i;
-		ia64_setup_intr("fake", i + IA64_HARDWARE_IRQ_BASE, fakeihand, arg, INTR_TYPE_TTY, &cookie, &fakecnt);
-#else
-		ia64_enable(i + IA64_HARDWARE_IRQ_BASE);
-#endif
-	}
-	printf("SETTING UP DONE\n");
-
-}
-SYSINIT(ithds_init2, SI_SUB_PSEUDO, SI_ORDER_ANY, ithds_init2, NULL);
-#endif
-
-static void
 ia64_send_eoi(int vector)
 {
 	int irq, i;
@@ -312,7 +259,6 @@
 		if (i == NULL)
 			return ENOMEM;
 		i->cntp = cntp;
-/* printf("ia64_setup_intr: creating ithread for vector %d\n", vector); */
 		errcode = ithread_create(&i->ithd, vector, 0, 0,
 					 ia64_send_eoi, "intr:");
 		if (errcode) {
@@ -325,14 +271,12 @@
 		mtx_unlock_spin(&ia64_intrs_lock);
 	}
 
-/* printf("ia64_setup_intr: add handler for vector %d\n", vector); */
 	/* Second, add this handler. */
 	errcode = ithread_add_handler(i->ithd, name, handler, arg,
 	    ithread_priority(flags), flags, cookiep);
 	if (errcode)
 		return errcode;
 
-/* printf("ia64_setup_intr: enable vector %d\n", vector); */
 	ia64_enable(vector);
 	return 0;
 }
@@ -352,15 +296,12 @@
 	struct intrhand *ih;
 	int error;
 
-
 	/*
 	 * Find the interrupt thread for this vector.
 	 */
 	i = ia64_intrs[vector];
-	if (i == NULL) {
-printf(">>STRAY IRQ VECTOR %ld (IRQ %ld)<<\n", vector, vector - 32);
+	if (i == NULL)
 		return;			/* no ithread for this vector */
-	}
 
 	ithd = i->ithd;
 	KASSERT(ithd != NULL, ("interrupt vector without a thread"));
@@ -369,10 +310,8 @@
 	 * As an optimization, if an ithread has no handlers, don't
 	 * schedule it to run.
 	 */
-	if (TAILQ_EMPTY(&ithd->it_handlers)) {
-printf(">>STRAY HANDLER VECTOR %ld (IRQ %ld)<<\n", vector, vector - 32);
+	if (TAILQ_EMPTY(&ithd->it_handlers))
 		return;
-}
 
 	if (i->cntp)
 		atomic_add_long(i->cntp, 1);

==== //depot/projects/ia64/sys/ia64/ia64/sapic.c#11 (text+ko) ====

@@ -102,7 +102,6 @@
 	u_int32_t *p = (u_int32_t *) rte;
 	register_t c;
 
-/* printf("sapic_write_rte: input %d low 0x%08x high 0x%08x\n", which, p[0], p[1]); */
 	c = intr_disable();
 	sapic_write(sa, SAPIC_RTE_BASE + 2*which, p[0]);
 	sapic_write(sa, SAPIC_RTE_BASE + 2*which + 1, p[1]);
@@ -138,11 +137,9 @@
 	struct sapic_rte rte;
 	u_int64_t lid = ia64_get_lid();
 
-/* printf("sapic_enable: input %d vector %d mylid 0x%lx\n", input, vector, lid); */
 	bzero(&rte, sizeof(rte));
 	rte.rte_destination_id = (lid >> 24) & 255;
 	rte.rte_destination_eid = (lid >> 16) & 255;
-/* printf("sapic_enable: dest_id 0x%x dest_eid 0x%x\n", rte.rte_destination_id, rte.rte_destination_eid); */
 	rte.rte_trigger_mode = trigger_mode;
 	rte.rte_polarity = polarity;
 	rte.rte_delivery_mode = SAPIC_DELMODE_FIXED;

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe p4-projects" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200208262247.g7QMlAGb039120>