From owner-cvs-src@FreeBSD.ORG Fri Apr 11 16:35:52 2008 Return-Path: Delivered-To: cvs-src@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 66854106566C; Fri, 11 Apr 2008 16:35:52 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from smtpoutm.mac.com (smtpoutm.mac.com [17.148.16.82]) by mx1.freebsd.org (Postfix) with ESMTP id 3EA7B8FC2A; Fri, 11 Apr 2008 16:35:52 +0000 (UTC) (envelope-from xcllnt@mac.com) Received: from mac.com (asmtp006-s [10.150.69.69]) by smtpoutm.mac.com (Xserve/smtpout019/MantshX 4.0) with ESMTP id m3BGZpqc009283; Fri, 11 Apr 2008 09:35:52 -0700 (PDT) Received: from macbook-pro.jnpr.net (natint3.juniper.net [66.129.224.36]) (authenticated bits=0) by mac.com (Xserve/asmtp006/MantshX 4.0) with ESMTP id m3BGZn6V025723 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Fri, 11 Apr 2008 09:35:49 -0700 (PDT) Message-Id: <6A40DB30-85A5-4A79-B744-729AA7F656D9@mac.com> From: Marcel Moolenaar To: Jeff Roberson In-Reply-To: <20080410235123.K43186@desktop> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v919.2) Date: Fri, 11 Apr 2008 09:35:48 -0700 References: <200804110326.m3B3QfjL095474@repoman.freebsd.org> <20080410190028.U43186@desktop> <9B8DD956-E197-4540-A7F3-367B1E277456@mac.com> <20080410235123.K43186@desktop> X-Mailer: Apple Mail (2.919.2) Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/amd64/amd64 intr_machdep.c src/sys/arm/arm intr.c src/sys/i386/i386 intr_machdep.c src/sys/ia64/ia64 interrupt.c src/sys/kern kern_cpuset.c kern_intr.c src/sys/powerpc/powerpc intr_machdep.c src/sys/sparc64/sparc64 ... X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Apr 2008 16:35:52 -0000 On Apr 11, 2008, at 2:51 AM, Jeff Roberson wrote: > > On Thu, 10 Apr 2008, Marcel Moolenaar wrote: > >> >> On Apr 10, 2008, at 10:01 PM, Jeff Roberson wrote: >>> On Thu, 10 Apr 2008, Marcel Moolenaar wrote: >>>> On Apr 10, 2008, at 8:26 PM, Jeff Roberson wrote: >>>>> jeff 2008-04-11 03:26:41 UTC >>>>> FreeBSD src repository >>>>> Modified files: >>>>> sys/amd64/amd64 intr_machdep.c >>>>> sys/arm/arm intr.c >>>>> sys/i386/i386 intr_machdep.c >>>>> sys/ia64/ia64 interrupt.c >>>>> sys/kern kern_cpuset.c kern_intr.c >>>>> sys/powerpc/powerpc intr_machdep.c >>>>> sys/sparc64/sparc64 intr_machdep.c >>>>> sys/sun4v/sun4v intr_machdep.c >>>>> sys/sys cpuset.h interrupt.h >>>>> Log: >>>>> - Add the interrupt vector number to intr_event_create so MI >>>>> code can >>>>> lookup hard interrupt events by number. Ignore the irq# for >>>>> soft intrs. >>>> JFYI: vectors are not the same as hard interrupt numbers. >>>> On ia64 they imply priority, which means that vector >>>> numbers should be selected for their priority and not >>>> have a 1-to-1 mapping with IRQ number. >>>> On powerpc they mean absolutely nothing other than being >>>> an index into an array. >>>> It's better to use IRQs and not vectors to lookup int. >>>> events by number. >>> I think I mixed my terminology in the commit. I meant for all >>> architectures to pass in the number that would appear in vmstat - >>> i. Can you verify that this is what I did for powerpc and ia64? >> >> powerpc correctly uses irq. >> ia64 incorrectly uses vector. >> >> Would you mind changing ia64 to use irq as well? > > Index: ia64/ia64/interrupt.c > =================================================================== > RCS file: /home/ncvs/src/sys/ia64/ia64/interrupt.c,v > retrieving revision 1.66 > diff -r1.66 interrupt.c > 343c343 > < 0, vector, ia64_intr_mask, ia64_intr_unmask, > ia64_intr_eoi, > --- >> 0, irq, ia64_intr_mask, ia64_intr_unmask, > ia64_intr_eoi, > > Does that look right? Yup. It does. Everything matches that way: ohci0: mem 0x80023000-0x80023fff irq 16 at device 1.0 on pci0 ohci0 pnpinfo vendor=0x1033 device=0x0035 subvendor=0x1033 subdevice=0x0035 class=0x0c0310 at slot=1 function=0 Interrupt request lines: 16 #015 0 0 ohci0 0 0 ohci1 0 0 ehci0 0 0 #019 0 0 Looking up interrupt events for ohci0 would then also use 16 and not 48 (i.e. the vector number). FYI, -- Marcel Moolenaar xcllnt@mac.com