Date: Tue, 31 Dec 2002 15:30:03 -0800 (PST) From: Marcel Moolenaar <marcel@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 22998 for review Message-ID: <200212312330.gBVNU3sh021291@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=22998 Change 22998 by marcel@marcel_nfs on 2002/12/31 15:29:57 Move the IRQ kludge from sapic.c to interrupt.c so we have the kludge in the same function we determine the trigger mode and polarity. Affected files ... .. //depot/projects/ia64/sys/ia64/ia64/interrupt.c#20 edit .. //depot/projects/ia64/sys/ia64/ia64/sapic.c#17 edit Differences ... ==== //depot/projects/ia64/sys/ia64/ia64/interrupt.c#20 (text+ko) ==== @@ -230,9 +230,18 @@ struct sapic *sa = ia64_sapics[i]; if (irq < sa->sa_base || irq > sa->sa_limit) continue; + /* + * KLUDGE: Not all interrupts higher or equal to 16 are + * active low and level sensitive. We don't know yet how + * to check for this, so we hardcode the 2 cases we have + * wrong explicitly. This kludge is specific to the HP + * rx2600... + */ sapic_enable(sa, irq - sa->sa_base, vector, - (irq < 16) ? SAPIC_TRIGGER_EDGE : SAPIC_TRIGGER_LEVEL, - (irq < 16) ? SAPIC_POLARITY_HIGH : SAPIC_POLARITY_LOW); + ((irq < 16 || vector == 66 || vector == 67) + ? SAPIC_TRIGGER_EDGE : SAPIC_TRIGGER_LEVEL), + ((irq < 16 || vector == 66 || vector == 67) + ? SAPIC_POLARITY_HIGH : SAPIC_POLARITY_LOW)); } } ==== //depot/projects/ia64/sys/ia64/ia64/sapic.c#17 (text+ko) ==== @@ -144,13 +144,8 @@ bzero(&rte, sizeof(rte)); rte.rte_destination_id = (lid >> 24) & 255; rte.rte_destination_eid = (lid >> 16) & 255; - if (vector == 66 || vector == 67 || vector == 68) { - rte.rte_trigger_mode = SAPIC_TRIGGER_EDGE; - rte.rte_polarity = SAPIC_POLARITY_HIGH; - } else { - rte.rte_trigger_mode = trigger_mode; - rte.rte_polarity = polarity; - } + rte.rte_trigger_mode = trigger_mode; + rte.rte_polarity = polarity; rte.rte_delivery_mode = SAPIC_DELMODE_LOWPRI; rte.rte_vector = vector; sapic_write_rte(sa, input, &rte); 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?200212312330.gBVNU3sh021291>