lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20221208104503.0ee41406@canb.auug.org.au>
Date:   Thu, 8 Dec 2022 10:45:03 +1100
From:   Stephen Rothwell <sfr@...b.auug.org.au>
To:     Joerg Roedel <joro@...tes.org>,
        Ulf Hansson <ulf.hansson@...aro.org>
Cc:     Joerg Roedel <jroedel@...e.de>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Linux Next Mailing List <linux-next@...r.kernel.org>,
        Lu Baolu <baolu.lu@...ux.intel.com>,
        Thierry Reding <treding@...dia.com>
Subject: linux-next: manual merge of the iommu tree with the mmc tree

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 */

Content of type "application/pgp-signature" skipped

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ