From owner-p4-projects Mon Aug 26 15:47:27 2002 Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 14B6D37B401; Mon, 26 Aug 2002 15:47:12 -0700 (PDT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 99C3C37B400 for ; Mon, 26 Aug 2002 15:47:11 -0700 (PDT) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 43CB743E4A for ; Mon, 26 Aug 2002 15:47:11 -0700 (PDT) (envelope-from peter@freebsd.org) Received: from freefall.freebsd.org (perforce@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.4/8.12.4) with ESMTP id g7QMlBJU039123 for ; Mon, 26 Aug 2002 15:47:11 -0700 (PDT) (envelope-from peter@freebsd.org) Received: (from perforce@localhost) by freefall.freebsd.org (8.12.4/8.12.4/Submit) id g7QMlAGb039120 for perforce@freebsd.org; Mon, 26 Aug 2002 15:47:10 -0700 (PDT) Date: Mon, 26 Aug 2002 15:47:10 -0700 (PDT) Message-Id: <200208262247.g7QMlAGb039120@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: perforce set sender to peter@freebsd.org using -f From: Peter Wemm Subject: PERFORCE change 16610 for review To: Perforce Change Reviews Sender: owner-p4-projects@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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 #include #include -#include #include #include @@ -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