mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-03 07:38:10 +00:00
iommu/fsl: Add the window permission flag as a parameter to iommu_window_enable API.
Each iommu window can have access permissions associated with it. Extended the window_enable API to incorporate window access permissions. In case of PAMU each window can have its specific set of permissions. Signed-off-by: Varun Sethi <Varun.Sethi@freescale.com> Signed-off-by: Joerg Roedel <joro@8bytes.org>
This commit is contained in:
parent
bb5547acfc
commit
80f97f0f73
2 changed files with 7 additions and 5 deletions
|
@ -853,12 +853,13 @@ EXPORT_SYMBOL_GPL(iommu_unmap);
|
||||||
|
|
||||||
|
|
||||||
int iommu_domain_window_enable(struct iommu_domain *domain, u32 wnd_nr,
|
int iommu_domain_window_enable(struct iommu_domain *domain, u32 wnd_nr,
|
||||||
phys_addr_t paddr, u64 size)
|
phys_addr_t paddr, u64 size, int prot)
|
||||||
{
|
{
|
||||||
if (unlikely(domain->ops->domain_window_enable == NULL))
|
if (unlikely(domain->ops->domain_window_enable == NULL))
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
|
|
||||||
return domain->ops->domain_window_enable(domain, wnd_nr, paddr, size);
|
return domain->ops->domain_window_enable(domain, wnd_nr, paddr, size,
|
||||||
|
prot);
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(iommu_domain_window_enable);
|
EXPORT_SYMBOL_GPL(iommu_domain_window_enable);
|
||||||
|
|
||||||
|
|
|
@ -104,7 +104,7 @@ struct iommu_ops {
|
||||||
|
|
||||||
/* Window handling functions */
|
/* Window handling functions */
|
||||||
int (*domain_window_enable)(struct iommu_domain *domain, u32 wnd_nr,
|
int (*domain_window_enable)(struct iommu_domain *domain, u32 wnd_nr,
|
||||||
phys_addr_t paddr, u64 size);
|
phys_addr_t paddr, u64 size, int prot);
|
||||||
void (*domain_window_disable)(struct iommu_domain *domain, u32 wnd_nr);
|
void (*domain_window_disable)(struct iommu_domain *domain, u32 wnd_nr);
|
||||||
/* Set the numer of window per domain */
|
/* Set the numer of window per domain */
|
||||||
int (*domain_set_windows)(struct iommu_domain *domain, u32 w_count);
|
int (*domain_set_windows)(struct iommu_domain *domain, u32 w_count);
|
||||||
|
@ -169,7 +169,8 @@ extern int iommu_domain_set_attr(struct iommu_domain *domain, enum iommu_attr,
|
||||||
|
|
||||||
/* Window handling function prototypes */
|
/* Window handling function prototypes */
|
||||||
extern int iommu_domain_window_enable(struct iommu_domain *domain, u32 wnd_nr,
|
extern int iommu_domain_window_enable(struct iommu_domain *domain, u32 wnd_nr,
|
||||||
phys_addr_t offset, u64 size);
|
phys_addr_t offset, u64 size,
|
||||||
|
int prot);
|
||||||
extern void iommu_domain_window_disable(struct iommu_domain *domain, u32 wnd_nr);
|
extern void iommu_domain_window_disable(struct iommu_domain *domain, u32 wnd_nr);
|
||||||
/**
|
/**
|
||||||
* report_iommu_fault() - report about an IOMMU fault to the IOMMU framework
|
* report_iommu_fault() - report about an IOMMU fault to the IOMMU framework
|
||||||
|
@ -255,7 +256,7 @@ static inline int iommu_unmap(struct iommu_domain *domain, unsigned long iova,
|
||||||
|
|
||||||
static inline int iommu_domain_window_enable(struct iommu_domain *domain,
|
static inline int iommu_domain_window_enable(struct iommu_domain *domain,
|
||||||
u32 wnd_nr, phys_addr_t paddr,
|
u32 wnd_nr, phys_addr_t paddr,
|
||||||
u64 size)
|
u64 size, int prot)
|
||||||
{
|
{
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue