From owner-freebsd-current@FreeBSD.ORG Fri Dec 7 19:26:47 2007 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 05F4D16A420 for ; Fri, 7 Dec 2007 19:26:47 +0000 (UTC) (envelope-from erikt@midgard.homeip.net) Received: from ch-smtp01.sth.basefarm.net (ch-smtp01.sth.basefarm.net [80.76.149.212]) by mx1.freebsd.org (Postfix) with ESMTP id 88B3513C461 for ; Fri, 7 Dec 2007 19:26:46 +0000 (UTC) (envelope-from erikt@midgard.homeip.net) Received: from c83-253-25-183.bredband.comhem.se ([83.253.25.183]:57978 helo=falcon.midgard.homeip.net) by ch-smtp01.sth.basefarm.net with esmtp (Exim 4.68) (envelope-from ) id 1J0iqT-0003Z7-59 for freebsd-current@freebsd.org; Fri, 07 Dec 2007 20:26:45 +0100 Received: (qmail 67827 invoked from network); 7 Dec 2007 20:26:42 +0100 Received: from owl.midgard.homeip.net (10.1.5.7) by falcon.midgard.homeip.net with ESMTP; 7 Dec 2007 20:26:42 +0100 Received: (qmail 65175 invoked by uid 1001); 7 Dec 2007 20:26:42 +0100 Date: Fri, 7 Dec 2007 20:26:42 +0100 From: Erik Trulsson To: Nikolay Pavlov Message-ID: <20071207192642.GA65135@owl.midgard.homeip.net> Mail-Followup-To: Nikolay Pavlov , freebsd-current@freebsd.org References: <200712072114.01360.qpadla@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200712072114.01360.qpadla@gmail.com> User-Agent: Mutt/1.5.16 (2007-06-09) X-Originating-IP: 83.253.25.183 X-Scan-Result: No virus found in message 1J0iqT-0003Z7-59. X-Scan-Signature: ch-smtp01.sth.basefarm.net 1J0iqT-0003Z7-59 c8aa68770bae3f4a4347c127027ed541 Cc: freebsd-current@freebsd.org Subject: Re: Strange IRQ number X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Dec 2007 19:26:47 -0000 On Fri, Dec 07, 2007 at 09:13:57PM +0200, Nikolay Pavlov wrote: > I see some strange IRQ number for my em0 card on BETA4: > root@cassini:~# vmstat -i > interrupt total rate > irq1: atkbd0 6 0 > irq6: fdc0 1 0 > irq14: ata0 184947 16 > irq15: ata1 184946 16 > cpu0: timer 22110598 1999 > irq256: em0 6945039 628 > ^^^^^^^^^^^^^^^^ > cpu1: timer 22110396 1999 > Total 51535933 4661 > > On 6.2 it was shared with uhci. Now all uhci controllers gone from the > vmstat but not from the system: 'vmstat -i' only shows those interrupts that have generated at least one interrupt. Use 'vmstat -ia' to see all the interrupts (I suspect that you will find the uhci* devices there.) > > root@cassini:~# usbdevs > addr 1: UHCI root hub, Intel > addr 1: UHCI root hub, Intel > addr 1: UHCI root hub, Intel > addr 1: UHCI root hub, Intel > addr 1: EHCI root hub, Intel > > root@cassini:~# dmesg | grep em0 > em0: port > 0x4000-0x401f mem 0xd0100000-0xd011ffff irq 16 at device 0.0 on pci6 > em0: Using MSI interrupt ^^^^^^^^^^^^^^^^^^^^^^ This is the magic information. On 7.x MSI/MSI-X interrupts are enabled by default (which is not the case on 6.x). MSI/MSI-X is a new interrupt delivery mechanism that can be used by all PCI-E devices (although not all device drivers in FreeBSD take advantage of this yet) and some PCI-X devices, that essentially assigns a separate interrupt for each device - thus no need for sharing interrupts. > em0: Ethernet address: 00:30:48:91:c0:90 > em0: [FILTER] > > The entire system work ok. As expected. What you see is simply the em0 NIC (apparently a PCI-E device) using MSI instead of the old interrupt method. FreeBSD assigns such devices a "virtual" interrupt number starting at 256. Short version: It is not a bug, it is a feature. :-) -- Erik Trulsson ertr1013@student.uu.se