From nobody@FreeBSD.org  Fri Jul  7 04:42:01 2006
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 833C016A4DF
	for <freebsd-gnats-submit@FreeBSD.org>; Fri,  7 Jul 2006 04:42:01 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [216.136.204.117])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 203F543D53
	for <freebsd-gnats-submit@FreeBSD.org>; Fri,  7 Jul 2006 04:42:00 +0000 (GMT)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.13.1/8.13.1) with ESMTP id k674fxBE073371
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 7 Jul 2006 04:41:59 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.13.1/8.13.1/Submit) id k674fxaY073367;
	Fri, 7 Jul 2006 04:41:59 GMT
	(envelope-from nobody)
Message-Id: <200607070441.k674fxaY073367@www.freebsd.org>
Date: Fri, 7 Jul 2006 04:41:59 GMT
From: Javier Villavicencio <javier_v@ciudad.com.ar>
To: freebsd-gnats-submit@FreeBSD.org
Subject: INTRCNT_COUNT in i386/intr_machdep.h (may be) wrongly defined
X-Send-Pr-Version: www-2.3

>Number:         99870
>Category:       kern
>Synopsis:       INTRCNT_COUNT in {amd64,i386}/include/intr_machdep.h wrongly defined
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    jhb
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jul 07 04:50:14 GMT 2006
>Closed-Date:    Fri Nov 16 20:45:27 UTC 2007
>Last-Modified:  Fri Nov 16 20:45:27 UTC 2007
>Originator:     Javier Villavicencio
>Release:        6.1-RELEASE
>Organization:
>Environment:
>Description:
Web viewable at:
http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/i386/include/intr_machdep.h?rev=1.7.2.3&content-type=text/x-cvsweb-markup

By my interpretation of the following comments before the definition:

/*
 * - 1 ??? dummy counter.
 * - 2 counters for each I/O interrupt.
 * - 1 counter for each CPU for lapic timer.
 * - 7 counters for each CPU for IPI counters for SMP.
 */
#ifdef SMP
#define	INTRCNT_COUNT	(1 + NUM_IO_INTS * 2 + 1)
#else
#define	INTRCNT_COUNT	(1 + NUM_IO_INTS * 2 + (1 + 7) * MAXCPU)
#endif

It seems that the #ifdef should be an #ifndef.
>How-To-Repeat:
Look at the code? The GENERIC kernel compiles and works fine, I've found
this just looking for some "custom" environment (that's why no uname -a is
provided)
>Fix:
-#ifdef SMP
+#ifndef SMP
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-i386 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Fri Jul 7 04:55:31 UTC 2006 
Responsible-Changed-Why:  
Reclassify. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=99870 
Responsible-Changed-From-To: freebsd-i386->freebsd-bugs 
Responsible-Changed-By: jkim 
Responsible-Changed-When: Fri Jul 7 19:33:22 UTC 2006 
Responsible-Changed-Why:  
Reclassify, again.  The same problem exists on amd64, too. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=99870 
State-Changed-From-To: open->patched 
State-Changed-By: jhb 
State-Changed-When: Tue Oct 10 19:26:56 UTC 2006 
State-Changed-Why:  
Doh, fixed.  Will MFC in a few days. 


Responsible-Changed-From-To: freebsd-bugs->jhb 
Responsible-Changed-By: jhb 
Responsible-Changed-When: Tue Oct 10 19:26:56 UTC 2006 
Responsible-Changed-Why:  
Doh, fixed.  Will MFC in a few days. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=99870 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: kern/99870: commit references a PR
Date: Tue, 10 Oct 2006 19:26:57 +0000 (UTC)

 jhb         2006-10-10 19:26:35 UTC
 
   FreeBSD src repository
 
   Modified files:
     sys/amd64/include    intr_machdep.h 
     sys/i386/include     intr_machdep.h 
   Log:
   Oops, fix sign bug in #ifdef for value of INTRCNT_COUNT.
   
   PR:             kern/99870
   Submitted by:   jkim
   MFC after:      3 days
   
   Revision  Changes    Path
   1.10      +2 -2      src/sys/amd64/include/intr_machdep.h
   1.12      +2 -2      src/sys/i386/include/intr_machdep.h
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: patched->closed 
State-Changed-By: kmacy 
State-Changed-When: Fri Nov 16 20:45:10 UTC 2007 
State-Changed-Why:  

Fixed. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=99870 
>Unformatted:
