Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/sparc/dev Set the interrupt target to the current C...



details:   https://anonhg.NetBSD.org/src/rev/9d1a7788eb2c
branches:  trunk
changeset: 542160:9d1a7788eb2c
user:      pk <pk%NetBSD.org@localhost>
date:      Wed Jan 22 22:00:39 2003 +0000

description:
Set the interrupt target to the current CPU when directly accessing
the chip for console I/O.

diffstat:

 sys/arch/sparc/dev/zs.c |  11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)

diffs (50 lines):

diff -r 5c0fbd45cdc4 -r 9d1a7788eb2c sys/arch/sparc/dev/zs.c
--- a/sys/arch/sparc/dev/zs.c   Wed Jan 22 21:58:28 2003 +0000
+++ b/sys/arch/sparc/dev/zs.c   Wed Jan 22 22:00:39 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: zs.c,v 1.95 2003/01/01 02:20:47 thorpej Exp $  */
+/*     $NetBSD: zs.c,v 1.96 2003/01/22 22:00:39 pk Exp $       */
 
 /*-
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -851,8 +851,12 @@
 {
        struct zschan *zc = arg;
        int s, c, rr0;
+       u_int omid;
 
+       /* Temporarily direct interrupts at ourselves */
        s = splhigh();
+       omid = setitr(cpuinfo.mid);
+
        /* Wait for a character to arrive. */
        do {
                rr0 = zc->zc_csr;
@@ -861,6 +865,7 @@
 
        c = zc->zc_data;
        ZS_DELAY();
+       setitr(omid);
        splx(s);
 
        /*
@@ -880,8 +885,11 @@
 {
        struct zschan *zc = arg;
        int s, rr0;
+       u_int omid;
 
+       /* Temporarily direct interrupts at ourselves */
        s = splhigh();
+       omid = setitr(cpuinfo.mid);
 
        /* Wait for transmitter to become ready. */
        do {
@@ -901,6 +909,7 @@
        zc->zc_data = c;
        delay(2);
 
+       setitr(omid);
        splx(s);
 }
 



Home | Main Index | Thread Index | Old Index