diff options
author | Laurentiu Tudor <laurentiu.tudor@nxp.com> | 2017-07-19 14:42:28 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-07-30 18:23:27 +0300 |
commit | 507deb25db624c97c3296d03f2367a0f87caab04 (patch) | |
tree | c670ce4c473e60109f7b894aefa3ff463708ab6d | |
parent | 30d266464035f5d2fd1bf2f17ea965ce61ba5c95 (diff) | |
download | linux-507deb25db624c97c3296d03f2367a0f87caab04.tar.xz |
staging: fsl-mc: fix compilation with non-generic msi domain ops
The bus driver relies on generic msi domain ops.
Fix compilation for architectures that don't provide it (e.g. x86_64).
Signed-off-by: Laurentiu Tudor <laurentiu.tudor@nxp.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/fsl-mc/bus/fsl-mc-msi.c | 4 | ||||
-rw-r--r-- | drivers/staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/drivers/staging/fsl-mc/bus/fsl-mc-msi.c b/drivers/staging/fsl-mc/bus/fsl-mc-msi.c index 629329444316..038da4d1ebd0 100644 --- a/drivers/staging/fsl-mc/bus/fsl-mc-msi.c +++ b/drivers/staging/fsl-mc/bus/fsl-mc-msi.c @@ -17,6 +17,7 @@ #include <linux/msi.h> #include "fsl-mc-private.h" +#ifdef GENERIC_MSI_DOMAIN_OPS /* * Generate a unique ID identifying the interrupt (only used within the MSI * irqdomain. Combine the icid with the interrupt index. @@ -38,6 +39,9 @@ static void fsl_mc_msi_set_desc(msi_alloc_info_t *arg, arg->hwirq = fsl_mc_domain_calc_hwirq(to_fsl_mc_device(desc->dev), desc); } +#else +#define fsl_mc_msi_set_desc NULL +#endif static void fsl_mc_msi_update_dom_ops(struct msi_domain_info *info) { diff --git a/drivers/staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c b/drivers/staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c index 9cd2183239f5..123e4af58408 100644 --- a/drivers/staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c +++ b/drivers/staging/fsl-mc/bus/irq-gic-v3-its-fsl-mc-msi.c @@ -45,7 +45,9 @@ static int its_fsl_mc_msi_prepare(struct irq_domain *msi_domain, * NOTE: This device id corresponds to the IOMMU stream ID * associated with the DPRC object (ICID). */ +#ifdef GENERIC_MSI_DOMAIN_OPS info->scratchpad[0].ul = mc_bus_dev->icid; +#endif msi_info = msi_get_domain_info(msi_domain->parent); return msi_info->ops->msi_prepare(msi_domain->parent, dev, nvec, info); } |