Skip to content

Commit

Permalink
iommu/io-pgtable: Add a domain attribute for pagetable configuration
Browse files Browse the repository at this point in the history
Add a new iommu domain attribute DOMAIN_ATTR_IO_PGTABLE_CFG
for pagetable configuration which initially will be used to
set quirks like for system cache aka last level cache to be
used by client drivers like GPU to set right attributes for
caching the hardware pagetables into the system cache and
later can be extended to include other page table configuration
data.

Signed-off-by: Sai Prakash Ranjan <saiprakash.ranjan@codeaurora.org>
Link: https://lore.kernel.org/r/9190aa16f378fc0a7f8e57b2b9f60b033e7eeb4f.1606287059.git.saiprakash.ranjan@codeaurora.org
Signed-off-by: Will Deacon <will@kernel.org>
  • Loading branch information
Sai Prakash Ranjan authored and Will Deacon committed Nov 25, 2020
1 parent 3650b22 commit a7656ec
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions include/linux/io-pgtable.h
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,10 @@ struct io_pgtable {

#define io_pgtable_ops_to_pgtable(x) container_of((x), struct io_pgtable, ops)

struct io_pgtable_domain_attr {
unsigned long quirks;
};

static inline void io_pgtable_tlb_flush_all(struct io_pgtable *iop)
{
iop->cfg.tlb->tlb_flush_all(iop->cookie);
Expand Down
1 change: 1 addition & 0 deletions include/linux/iommu.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ enum iommu_attr {
DOMAIN_ATTR_FSL_PAMUV1,
DOMAIN_ATTR_NESTING, /* two stages of translation */
DOMAIN_ATTR_DMA_USE_FLUSH_QUEUE,
DOMAIN_ATTR_IO_PGTABLE_CFG,
DOMAIN_ATTR_MAX,
};

Expand Down

0 comments on commit a7656ec

Please sign in to comment.