From: "Kartoz, Michael F" <michael.f.kartoz@intel.com>
To: linux-hotplug@vger.kernel.org
Subject: need to assign IRQs for PCI and cPCI
Date: Thu, 26 Apr 2001 00:14:14 +0000 [thread overview]
Message-ID: <marc-linux-hotplug-98824411320588@msgid-missing> (raw)
In-Reply-To: <marc-linux-hotplug-98824477421734@msgid-missing>
How do I assign IRQs for inserted PCI boards?
I have been writing a very rough version of a hotplug system driver as a
module. I am specifically looking at how to get Linux 2.4.3 with the
hotplug package to assign resources (I/O, memory, IRQs) to the appropriate
places in the new board's PCI config space and in the kernel prior to
calling pci_insert_device. I seem to have gotten the I/O and memory regions
as well as some of the other registers such as cache line size initialized
(although I'm not sure whether bridges are being handled properly or not).
However, I could not find any way of assigning the IRQs. It seems that the
routines that exist for assigning the IRQs are only available during initial
boot. Specifically, one routine that seems to be necessary (if using
IOAPIC) is IO_APIC_get_PCI_irq_vector which provides the IRQ for use by the
driver instead of the one in config space when APICs are being used.
Does anyone know how I should go about doing this? Am I going about this
the wrong way? Is anyone else doing this same kind of work?
The basic flow of an insert in my hotplug system driver is:
1) Create and zero out new dev structure for device that was inserted.
2) Fill in the bus, sysdata, devfn, device, vendor, dma_mask and hdr_type
elements of dev.
3) Fill in cache line size in PCI config space.
4) Call pci_setup_device.
5) Call pci_assign_resource for each of the first six resource structures in
dev.
6) Set PCI command register in PCI config space.
7) Call IO_APIC_get_PCI_irq_vector to fill in IRQ element of dev (I hacked
the kernel to make this symbol visible to my module)
8) Call pci_insert_device.
- Mike Kartoz
_______________________________________________
Linux-hotplug-devel mailing list http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
http://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel
next prev parent reply other threads:[~2001-04-26 0:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-04-25 23:26 need to assign IRQs for PCI and cPCI Greg KH
2001-04-26 0:14 ` Kartoz, Michael F [this message]
2001-04-27 18:58 ` Chris Brand
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=marc-linux-hotplug-98824411320588@msgid-missing \
--to=michael.f.kartoz@intel.com \
--cc=linux-hotplug@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).