Received: by 2002:a4a:3008:0:0:0:0:0 with SMTP id q8-v6csp3592309oof; Tue, 4 Sep 2018 00:42:52 -0700 (PDT) X-Google-Smtp-Source: ANB0VdazrdrFEf/wR7psUdeFd4/0er5bmOvmMjqcklWnZBbHH5nL4kkk7GahHR7pFG4DBxJeGVsj X-Received: by 2002:a17:902:8ec8:: with SMTP id x8-v6mr32401850plo.308.1536046972448; Tue, 04 Sep 2018 00:42:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536046972; cv=none; d=google.com; s=arc-20160816; b=xEH2SJTkADjvUTVG+DYZ2hTPl/GVeXHFfm6Y4GzXyiZWSdnhogRw+Gl9JSBvF6+Lu8 gCOZS+x2S+lMnVWxky1KEDX2rGJoJqaJnJTl4UQ6Lnwr2kEFtZoEkMP6ssPW0o9m+IB0 SITuOoslcIwqgWBCBDLtQALxObhtQjmJIvCpQ1LLf6asX2lNZZKYUvQguJu++msBHNFf IUMwWZ/IPRqXXbDhbANC+7uYFT3kD8qAm9ebynn3hb3/iVYDNvO0x0IE/3cNVwbZxn9B bI3AuBBSPgKPKJroB810BGvispli329+Mdo6L1W9QVcjZHM+tL0Tx65SIen6sbKW4L8Y 3sSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:organization:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=zHzqGZzTiTPvMTPboee9Ao4nW+BSfJkQbslHSgSYuVs=; b=wqPt5Si8S76qHlELBAuveptUHKPDzii7irp9QyO3vN9iAM3YA0gfdyPcjzL2h9SGqg SmBjoHCXaa3iBREMplATQ1g4KrBtwTWrY2PeepAkXjUCHqg6l2EXGG/BW34IzJMQ3K0Y sBM5/pUkmBN7mMMue2wdkOJaB48S8GqRKoy/6ULmkNDK0qsnoOKVucCHbnfdUbVOw/G3 xOYtT+j0f7yArHY3jJTbyqATLdPthgcLpSrePZFEy2gEnvhPc7D5yQnHAJZZ0YNEBHUY nMR7G+jM823aVC7u2Ud5XmcMpeK3UrP5BP71Toh4b1QqbD87rl7T82w+Kk1PjAlWSDKm seFQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l67-v6si21299794pfl.167.2018.09.04.00.42.37; Tue, 04 Sep 2018 00:42:52 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726578AbeIDMEp (ORCPT + 99 others); Tue, 4 Sep 2018 08:04:45 -0400 Received: from cust-95-128-94-82.breedbanddelft.nl ([95.128.94.82]:41602 "EHLO cust-95-128-94-82.breedbanddelft.nl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726094AbeIDMEp (ORCPT ); Tue, 4 Sep 2018 08:04:45 -0400 Received: by abra2.bitwizard.nl (Postfix, from userid 1000) id 796F013FC78; Tue, 4 Sep 2018 09:40:51 +0200 (CEST) Date: Tue, 4 Sep 2018 09:40:51 +0200 From: Rogier Wolff To: Alan Cox Cc: linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org Subject: Re: IRQ number question. Message-ID: <20180904074051.GG11854@BitWizard.nl> References: <20180903171639.GC16262@BitWizard.nl> <20180903190903.290fff01@alans-desktop> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180903190903.290fff01@alans-desktop> Organization: BitWizard B.V. User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 03, 2018 at 07:09:03PM +0100, Alan Cox wrote: > The IRQ number in the PCI configuration space is just a label really for > legacy OS stuff. Nothing actually routes interrupts according to it (*). > If it's coming up as 14 that looks more like the BIOS mislabelled it. > Legacy PCI interrupts care about lines and pins not irq numbers. Yeah, on ISA there are lines marked IRQ3, IRQ4 and you pull on such a line and the CPU gets interrupted. On PCI there are lines marked IRQA, IRQB... IRQD and you yan one line and the CPU gets interrupted. Usually IRQA on the first slot gets wired to IRQB on the second slot and so on. This is because cards are expected to require only one IRQ, but /can/ have upto four. the IRQ register in the PCI configuration space is just an 8bit register that is required to be able to remember those 8 bits nothing else. The BIOS is expected to know which SLOTx INTy line goes where in the hardware. And then it should store the resulting interrupt number in that 8-bit register. Now when Linux knows enough about the hardware (interrupt controller) to reroute interrupts on an interrupt controller, I would have liked it to also note the result in the interrupt register in the affected card. Apparently it doesn't. Anyway. Yesterday I was: "OK, I'll have to make it into a real PCI-device-driver", and today I'm thinking: "Now I know how this comes about, I can make it nicer if I have time left", on to other stuff for the time being. Roger. -- ** R.E.Wolff@BitWizard.nl ** http://www.BitWizard.nl/ ** +31-15-2600998 ** ** Delftechpark 26 2628 XH Delft, The Netherlands. KVK: 27239233 ** *-- BitWizard writes Linux device drivers for any device you may have! --* The plan was simple, like my brother-in-law Phil. But unlike Phil, this plan just might work.