This allows the interrupt controller driver only need a small change to create a map for the page the device will write to raise an interrupt.
o Split-out GAS macroses to a separate header iommu_gas.h
o Add iommu_msi.h
Differential D26705
Manage MSI iommu pages br on Oct 7 2020, 2:18 PM. Authored by Tags None Referenced Files
Subscribers
Details
This allows the interrupt controller driver only need a small change to create a map for the page the device will write to raise an interrupt. o Split-out GAS macroses to a separate header iommu_gas.h
Diff Detail
Event TimelineComment Actions Convention for var.h is not suitable for your case IMO. We have signal.h and signalvar.h, where signal.h is usable by userspace and signalvar.h is for kernel private stuff. Can you provide some enumeration of stuff you want to keep in iommu.h, and an explanation of why ? Comment Actions I'm not insisting on this, Andrew wanted to include iommu.h from subr_intr.c, but he does not want to include pci_reg.h and pci_var.h as dependencies for iommu.h, so a split requested. There are a few new prototypes needed from iommu.h to manage MSI iommu pages: See for details https://reviews.freebsd.org/D24618 Comment Actions So would adding a header iommu_msi.h with just msi-related prototypes enough ? I suspect that x86/msi.c can also get rid of iommu.h then. Comment Actions I'd like to use some of the iommu functions in device code, e.g. non-pci devices on arm64 can be behind an iommu. I'd prefer to not have to teach these devices about PCI just to configure the iommu. Comment Actions It works but not sure what to do with typedef iommu_haddr_t ? I put it to sys/types.h since it is needed by iommu_msi.h and iommu.h
Comment Actions I am curious. There is no arch restriction on the value of MSI base address ? System can map MSI page anywhere, and just programming the correct address into MSI address register would make it work ? This is very non-x86ish.
Comment Actions No restrictions. MSI address could be anywhere
|