drm, iommu: Change type of pasid to u32
PASID is defined as a few different types in iommu including "int", "u32", and "unsigned int". To be consistent and to match with uapi definitions, define PASID and its variations (e.g. max PASID) as "u32". "u32" is also shorter and a little more explicit than "unsigned int". No PASID type change in uapi although it defines PASID as __u64 in some places. Suggested-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Fenghua Yu <fenghua.yu@intel.com> Signed-off-by: Borislav Petkov <bp@suse.de> Reviewed-by: Tony Luck <tony.luck@intel.com> Reviewed-by: Lu Baolu <baolu.lu@linux.intel.com> Acked-by: Felix Kuehling <Felix.Kuehling@amd.com> Acked-by: Joerg Roedel <jroedel@suse.de> Link: https://lkml.kernel.org/r/1600187413-163670-2-git-send-email-fenghua.yu@intel.com
This commit is contained in:

committed by
Borislav Petkov

parent
856deb866d
commit
c7b6bac9c7
@@ -76,7 +76,7 @@ extern void amd_iommu_free_device(struct pci_dev *pdev);
|
||||
*
|
||||
* The function returns 0 on success or a negative value on error.
|
||||
*/
|
||||
extern int amd_iommu_bind_pasid(struct pci_dev *pdev, int pasid,
|
||||
extern int amd_iommu_bind_pasid(struct pci_dev *pdev, u32 pasid,
|
||||
struct task_struct *task);
|
||||
|
||||
/**
|
||||
@@ -88,7 +88,7 @@ extern int amd_iommu_bind_pasid(struct pci_dev *pdev, int pasid,
|
||||
* When this function returns the device is no longer using the PASID
|
||||
* and the PASID is no longer bound to its task.
|
||||
*/
|
||||
extern void amd_iommu_unbind_pasid(struct pci_dev *pdev, int pasid);
|
||||
extern void amd_iommu_unbind_pasid(struct pci_dev *pdev, u32 pasid);
|
||||
|
||||
/**
|
||||
* amd_iommu_set_invalid_ppr_cb() - Register a call-back for failed
|
||||
@@ -114,7 +114,7 @@ extern void amd_iommu_unbind_pasid(struct pci_dev *pdev, int pasid);
|
||||
#define AMD_IOMMU_INV_PRI_RSP_FAIL 2
|
||||
|
||||
typedef int (*amd_iommu_invalid_ppr_cb)(struct pci_dev *pdev,
|
||||
int pasid,
|
||||
u32 pasid,
|
||||
unsigned long address,
|
||||
u16);
|
||||
|
||||
@@ -166,7 +166,7 @@ extern int amd_iommu_device_info(struct pci_dev *pdev,
|
||||
* @cb: The call-back function
|
||||
*/
|
||||
|
||||
typedef void (*amd_iommu_invalidate_ctx)(struct pci_dev *pdev, int pasid);
|
||||
typedef void (*amd_iommu_invalidate_ctx)(struct pci_dev *pdev, u32 pasid);
|
||||
|
||||
extern int amd_iommu_set_invalidate_ctx_cb(struct pci_dev *pdev,
|
||||
amd_iommu_invalidate_ctx cb);
|
||||
|
Reference in New Issue
Block a user