Module Name:    src
Committed By:   mrg
Date:           Thu May 12 05:43:06 UTC 2011

Modified Files:
        src/sys/arch/sparc64/sparc64: clock.c

Log Message:
first steps towards fujitsu SPARC64 support:

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


To generate a diff of this commit:
cvs rdiff -u -r1.102 -r1.103 src/sys/arch/sparc64/sparc64/clock.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/sparc64/sparc64/clock.c
diff -u src/sys/arch/sparc64/sparc64/clock.c:1.102 src/sys/arch/sparc64/sparc64/clock.c:1.103
--- src/sys/arch/sparc64/sparc64/clock.c:1.102	Sat Mar 12 11:42:57 2011
+++ src/sys/arch/sparc64/sparc64/clock.c	Thu May 12 05:43:06 2011
@@ -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);

Reply via email to