platform-msi: Allow creation of a MSI-based stacked irq domain
authorMarc Zyngier <marc.zyngier@arm.com>
Mon, 23 Nov 2015 08:26:07 +0000 (08:26 +0000)
committerMarc Zyngier <marc.zyngier@arm.com>
Wed, 16 Dec 2015 15:29:44 +0000 (15:29 +0000)
commit552c494a7666c7fe490f179db1f52239a41fe734
tree816a72e91dfe110f585fb5aeba604713a0b46d52
parent2145ac9310b60c1c11294b7bea10fe154009be1d
platform-msi: Allow creation of a MSI-based stacked irq domain

We almost have all the needed bits requiredable to create a irq domain
on top of a MSI domain.

For this, we enable a few things:
- the virq is stored in the msi_desc
- device, msi_alloc_info and domain-specific data
  are stored in the platform_priv_data structure
- we introduce a new API for platform-msi:

  /* Create a MSI-based domain */
  struct irq_domain *
  platform_msi_create_device_domain(struct device *dev,
                                    unsigned int nvec,
                                    irq_write_msi_msg_t write_msi_msg,
                                    const struct irq_domain_ops *ops,
                                    void *host_data);

  /* Allocate MSIs in an MSI domain */
  int platform_msi_domain_alloc(struct irq_domain *domain,
unsigned int virq,
unsigned int nr_irqs);

  /* Free MSIs from an MSI domain */
  void platform_msi_domain_free(struct irq_domain *domain,
unsigned int virq,
unsigned int nvec);

  /* Obtain the host data passed to platform_msi_create_device_domain */
  void *platform_msi_get_host_data(struct irq_domain *domain);

platform_msi_create_device_domain() is a hybrid of irqdomain creation
and interrupt allocation, creating a domain backed by the MSIs associated
to a device. IRQs can then be allocated in that domain using
platform_msi_domain_alloc().

This now allows a wired irq to MSI bridge to be created.

Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
drivers/base/platform-msi.c
include/linux/msi.h
This page took 0.026008 seconds and 5 git commands to generate.