public inbox for linux-next@vger.kernel.org 
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb•auug.org.au>
To: Joerg Roedel <joro@8bytes•org>, Ulf Hansson <ulf.hansson@linaro•org>
Cc: Joerg Roedel <jroedel@suse•de>,
	Linux Kernel Mailing List <linux-kernel@vger•kernel.org>,
	Linux Next Mailing List <linux-next@vger•kernel.org>,
	Lu Baolu <baolu.lu@linux•intel.com>,
	Thierry Reding <treding@nvidia•com>
Subject: linux-next: manual merge of the iommu tree with the mmc tree
Date: Thu, 8 Dec 2022 10:45:03 +1100	[thread overview]
Message-ID: <20221208104503.0ee41406@canb.auug.org.au> (raw)

[-- Attachment #1: Type: text/plain, Size: 2328 bytes --]

Hi all,

Today's linux-next merge of the iommu tree got a conflict in:

  include/linux/iommu.h

between commit:

  493c9b68d1d8 ("iommu/tegra: Add tegra_dev_iommu_get_stream_id() helper")

from the mmc tree and commit:

  be51b1d6bbff ("iommu/sva: Refactoring iommu_sva_bind/unbind_device()")

from the iommu tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

-- 
Cheers,
Stephen Rothwell

diff --cc include/linux/iommu.h
index 6f53ad74fa0d,68d7d304cdb7..000000000000
--- a/include/linux/iommu.h
+++ b/include/linux/iommu.h
@@@ -1103,25 -1143,26 +1147,47 @@@ static inline void iommu_dma_compose_ms
  
  #endif	/* CONFIG_IOMMU_DMA */
  
 +/*
 + * Newer generations of Tegra SoCs require devices' stream IDs to be directly programmed into
 + * some registers. These are always paired with a Tegra SMMU or ARM SMMU, for which the contents
 + * of the struct iommu_fwspec are known. Use this helper to formalize access to these internals.
 + */
 +#define TEGRA_STREAM_ID_BYPASS 0x7f
 +
 +static inline bool tegra_dev_iommu_get_stream_id(struct device *dev, u32 *stream_id)
 +{
 +#ifdef CONFIG_IOMMU_API
 +	struct iommu_fwspec *fwspec = dev_iommu_fwspec_get(dev);
 +
 +	if (fwspec && fwspec->num_ids == 1) {
 +		*stream_id = fwspec->ids[0] & 0xffff;
 +		return true;
 +	}
 +#endif
 +
 +	return false;
 +}
 +
+ #ifdef CONFIG_IOMMU_SVA
+ struct iommu_sva *iommu_sva_bind_device(struct device *dev,
+ 					struct mm_struct *mm);
+ void iommu_sva_unbind_device(struct iommu_sva *handle);
+ u32 iommu_sva_get_pasid(struct iommu_sva *handle);
+ #else
+ static inline struct iommu_sva *
+ iommu_sva_bind_device(struct device *dev, struct mm_struct *mm)
+ {
+ 	return NULL;
+ }
+ 
+ static inline void iommu_sva_unbind_device(struct iommu_sva *handle)
+ {
+ }
+ 
+ static inline u32 iommu_sva_get_pasid(struct iommu_sva *handle)
+ {
+ 	return IOMMU_PASID_INVALID;
+ }
+ #endif /* CONFIG_IOMMU_SVA */
+ 
  #endif /* __LINUX_IOMMU_H */

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

                 reply	other threads:[~2022-12-07 23:45 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20221208104503.0ee41406@canb.auug.org.au \
    --to=sfr@canb$(echo .)auug.org.au \
    --cc=baolu.lu@linux$(echo .)intel.com \
    --cc=joro@8bytes$(echo .)org \
    --cc=jroedel@suse$(echo .)de \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=linux-next@vger$(echo .)kernel.org \
    --cc=treding@nvidia$(echo .)com \
    --cc=ulf.hansson@linaro$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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