tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: x86 MD MSI/MSI-X implementation
Date: Thu, 09 Apr 2015 19:44:47 +0900
From: Kengo NAKAHARA <k-nakahara%iij.ad.jp@localhost>
I implement x86 MD MSI/MSI-X support code. Here is the patch:
http://www.netbsd.org/~knakahara/md-msi-msix/x86-md-msi-msix.patch
The file pci_msi_machdep.c appears to be missing from this patch.
Also, I don't see where intr_distribute is implemented -- is that part
of a separate patch?
Furthermore, here is the usage example of if_wm:
http://www.netbsd.org/~knakahara/md-msi-msix/if_wm-msi-msix.patch
It seems to me that it should not be the driver's job to distribute
interrupts across CPUs. Instead, intuitively, it feels like
(a) the driver should just establish handlers for all its interrupts,
(b) the kernel should choose a default distribution across CPUs, and
(c) the operator should be able to change it with intrctl(8).
Why is there a separate pci_intr_setattr function? Why not pass
PCI_INTR_MPSAFE to the relevant pci_*_establish function?
Minor nit: It looks like the MSI case of wm(4) uses pci_msix_establish
instead of pci_msi_establish. Is it important to use the same
pci_intr_handle_t type for INTx, MSI, and MSI-X interrupt handles?
Using a different type would catch that mistake.
Home |
Main Index |
Thread Index |
Old Index