Skip to content

Commit

Permalink
sparc64: Enable sun4v dma ops to use IOMMU v2 APIs
Browse files Browse the repository at this point in the history
Add Hypervisor IOMMU v2 APIs pci_iotsb_map(), pci_iotsb_demap() and
enable sun4v dma ops to use IOMMU v2 API for all PCIe devices with
64bit DMA mask.

Signed-off-by: Tushar Dave <[email protected]>
Reviewed-by: chris hyser <[email protected]>
Acked-by: Sowmini Varadhan <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
tndave authored and davem330 committed Nov 18, 2016
1 parent 5116ab4 commit f08978b
Show file tree
Hide file tree
Showing 4 changed files with 211 additions and 58 deletions.
6 changes: 6 additions & 0 deletions arch/sparc/include/asm/hypervisor.h
Original file line number Diff line number Diff line change
Expand Up @@ -2377,6 +2377,12 @@ unsigned long sun4v_vintr_set_target(unsigned long dev_handle,
* iotsb_index Zero-based IOTTE number within an IOTSB.
*/

/* The index_count argument consists of two fields:
* bits 63:48 #iottes and bits 47:0 iotsb_index
*/
#define HV_PCI_IOTSB_INDEX_COUNT(__iottes, __iotsb_index) \
(((u64)(__iottes) << 48UL) | ((u64)(__iotsb_index)))

/* pci_iotsb_conf()
* TRAP: HV_FAST_TRAP
* FUNCTION: HV_FAST_PCI_IOTSB_CONF
Expand Down
Loading

0 comments on commit f08978b

Please sign in to comment.