Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/sparc64/sparc64 first steps towards fujitsu SPARC64...



details:   https://anonhg.NetBSD.org/src/rev/fff713126e0c
branches:  trunk
changeset: 764924:fff713126e0c
user:      mrg <mrg%NetBSD.org@localhost>
date:      Thu May 12 05:43:06 2011 +0000

description:
first steps towards fujitsu SPARC64 support:

- use INTVEC() for the interrupt number, avoids overflow in the (normally)
  11 bit interrupt number (from openbsd)

diffstat:

 sys/arch/sparc64/sparc64/clock.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (36 lines):

diff -r c7b7e93c8af1 -r fff713126e0c sys/arch/sparc64/sparc64/clock.c
--- a/sys/arch/sparc64/sparc64/clock.c  Thu May 12 05:42:42 2011 +0000
+++ b/sys/arch/sparc64/sparc64/clock.c  Thu May 12 05:43:06 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: clock.c,v 1.102 2011/03/12 11:42:57 nakayama Exp $ */
+/*     $NetBSD: clock.c,v 1.103 2011/05/12 05:43:06 mrg Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -55,7 +55,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.102 2011/03/12 11:42:57 nakayama Exp $");
+__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.103 2011/05/12 05:43:06 mrg Exp $");
 
 #include "opt_multiprocessor.h"
 
@@ -234,7 +234,7 @@
             (CPU_UPAID << INTMAP_TID_SHIFT));
 
        /* Install the appropriate interrupt vector here */
-       level10.ih_number = ma->ma_interrupts[0];
+       level10.ih_number = INTVEC(ma->ma_interrupts[0]);
        level10.ih_clr = &timerreg_4u.t_clrintr[0];
        intr_establish(PIL_CLOCK, true, &level10);
        printf(" irq vectors %lx", (u_long)level10.ih_number);
@@ -242,7 +242,7 @@
        /*
         * On SMP kernel, don't establish interrupt to use it as timecounter.
         */
-       level14.ih_number = ma->ma_interrupts[1];
+       level14.ih_number = INTVEC(ma->ma_interrupts[1]);
        level14.ih_clr = &timerreg_4u.t_clrintr[1];
        intr_establish(PIL_STATCLOCK, true, &level14);
        printf(" and %lx", (u_long)level14.ih_number);



Home | Main Index | Thread Index | Old Index