Commit 22df63a2 authored by Joerg Roedel's avatar Joerg Roedel
Browse files

Merge branches 'apple/dart', 'arm/smmu/updates', 'arm/smmu/bindings',...

Merge branches 'apple/dart', 'arm/smmu/updates', 'arm/smmu/bindings', 'rockchip', 's390', 'core', 'intel/vt-d' and 'amd/amd-vi' into next
Loading
+2 −1
Original line number Diff line number Diff line
@@ -90,6 +90,7 @@ properties:
          - enum:
              - qcom,qcm2290-smmu-500
              - qcom,qcs615-smmu-500
              - qcom,qcs8300-smmu-500
              - qcom,sa8255p-smmu-500
              - qcom,sa8775p-smmu-500
              - qcom,sar2130p-smmu-500
@@ -397,6 +398,7 @@ allOf:
        compatible:
          contains:
            enum:
              - qcom,qcs8300-smmu-500
              - qcom,sa8775p-smmu-500
              - qcom,sc7280-smmu-500
              - qcom,sc8280xp-smmu-500
@@ -581,7 +583,6 @@ allOf:
              - cavium,smmu-v2
              - marvell,ap806-smmu-500
              - nvidia,smmu-500
              - qcom,qcs8300-smmu-500
              - qcom,qdu1000-smmu-500
              - qcom,sa8255p-smmu-500
              - qcom,sc7180-smmu-500
+1 −0
Original line number Diff line number Diff line
@@ -22,6 +22,7 @@ properties:
          - enum:
              - qcom,msm8916-iommu
              - qcom,msm8917-iommu
              - qcom,msm8937-iommu
              - qcom,msm8953-iommu
          - const: qcom,msm-iommu-v1
      - items:
+3 −1
Original line number Diff line number Diff line
@@ -144,7 +144,7 @@ struct zpci_dev {
	u8		util_str_avail	: 1;
	u8		irqs_registered	: 1;
	u8		tid_avail	: 1;
	u8		reserved	: 1;
	u8		rtr_avail	: 1; /* Relaxed translation allowed */
	unsigned int	devfn;		/* DEVFN part of the RID*/

	u8 pfip[CLP_PFIP_NR_SEGMENTS];	/* pci function internal path */
@@ -217,6 +217,7 @@ extern struct airq_iv *zpci_aif_sbv;
struct zpci_dev *zpci_create_device(u32 fid, u32 fh, enum zpci_state state);
int zpci_add_device(struct zpci_dev *zdev);
int zpci_enable_device(struct zpci_dev *);
int zpci_reenable_device(struct zpci_dev *zdev);
int zpci_disable_device(struct zpci_dev *);
int zpci_scan_configured_device(struct zpci_dev *zdev, u32 fh);
int zpci_deconfigure_device(struct zpci_dev *zdev);
@@ -245,6 +246,7 @@ void update_uid_checking(bool new);
/* IOMMU Interface */
int zpci_init_iommu(struct zpci_dev *zdev);
void zpci_destroy_iommu(struct zpci_dev *zdev);
int zpci_iommu_register_ioat(struct zpci_dev *zdev, u8 *status);

#ifdef CONFIG_PCI
static inline bool zpci_use_mio(struct zpci_dev *zdev)
+3 −1
Original line number Diff line number Diff line
@@ -156,7 +156,9 @@ struct clp_rsp_query_pci_grp {
	u16			:  4;
	u16 noi			: 12;	/* number of interrupts */
	u8 version;
	u8			:  6;
	u8			:  2;
	u8 rtr			:  1;	/* Relaxed translation requirement */
	u8			:  3;
	u8 frame		:  1;
	u8 refresh		:  1;	/* TLB refresh mode */
	u16			:  3;
+2 −15
Original line number Diff line number Diff line
@@ -433,7 +433,6 @@ static void kvm_s390_pci_dev_release(struct zpci_dev *zdev)
static int kvm_s390_pci_register_kvm(void *opaque, struct kvm *kvm)
{
	struct zpci_dev *zdev = opaque;
	u8 status;
	int rc;

	if (!zdev)
@@ -480,13 +479,7 @@ static int kvm_s390_pci_register_kvm(void *opaque, struct kvm *kvm)
	 */
	zdev->gisa = (u32)virt_to_phys(&kvm->arch.sie_page2->gisa);

	rc = zpci_enable_device(zdev);
	if (rc)
		goto clear_gisa;

	/* Re-register the IOMMU that was already created */
	rc = zpci_register_ioat(zdev, 0, zdev->start_dma, zdev->end_dma,
				virt_to_phys(zdev->dma_table), &status);
	rc = zpci_reenable_device(zdev);
	if (rc)
		goto clear_gisa;

@@ -516,7 +509,6 @@ static void kvm_s390_pci_unregister_kvm(void *opaque)
{
	struct zpci_dev *zdev = opaque;
	struct kvm *kvm;
	u8 status;

	if (!zdev)
		return;
@@ -550,12 +542,7 @@ static void kvm_s390_pci_unregister_kvm(void *opaque)
			goto out;
	}

	if (zpci_enable_device(zdev))
		goto out;

	/* Re-register the IOMMU that was already created */
	zpci_register_ioat(zdev, 0, zdev->start_dma, zdev->end_dma,
			   virt_to_phys(zdev->dma_table), &status);
	zpci_reenable_device(zdev);

out:
	spin_lock(&kvm->arch.kzdev_list_lock);
Loading