summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorMitchel Humpherys <mitchelh@codeaurora.org>2015-07-30 13:41:12 -0700
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-22 11:13:46 -0700
commit52c8720e5cf479aae5dc8d0ac7d2c4afd261e446 (patch)
tree34c9c2b8b9c185a556a243bb1a6659584ae7a0e5 /include/linux
parent3c60944373c71f82fdf234d3220720b781b4c67a (diff)
iommu/io-pgtable: Delegate page table memory management to drivers
Some IOMMU drivers (like arm-smmu) need to perform fixups to page table memory when it's allocated and freed. Some callbacks were added for this purpose ({prepare,unprepare}_pgtable) that are called from the io-pgtable code after each allocation and before each free. However, this approach is prone to bugs where new calls to allocate/free are added without corresponding calls to the fixup callbacks. Furthermore, allocation and free is often done from atomic context, so if the driver needs to do non-atomic fixups during free they are out of luck since the memory will be freed back to the system by the time control is turned back over to the driver. Adding yet another callback for non-atomic fixups would start to get tedious, and would only increase the chance of missing callbacks as new allocations/frees are added. Instead, fix this by allowing all page table memory allocation and free to be delegated entirely to the driver. Fall back to {alloc,free}_pages_exact by default if the driver doesn't need any special handling of page table memory. Change-Id: I0361bb81e25ff5ad4ef93a45330a35af47bc6013 Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions