Home
last modified time | relevance | path

Searched refs:iommu (Results 1 – 25 of 218) sorted by relevance

123456789

/Linux-v4.19/arch/sparc/kernel/
Diommu.c52 struct iommu *iommu = container_of(iommu_map_table, struct iommu, tbl); in iommu_flushall() local
53 if (iommu->iommu_flushinv) { in iommu_flushall()
54 iommu_write(iommu->iommu_flushinv, ~(u64)0); in iommu_flushall()
59 tag = iommu->iommu_tags; in iommu_flushall()
66 (void) iommu_read(iommu->write_complete_reg); in iommu_flushall()
80 #define IOPTE_IS_DUMMY(iommu, iopte) \ argument
81 ((iopte_val(*iopte) & IOPTE_PAGE) == (iommu)->dummy_page_pa)
83 static inline void iopte_make_dummy(struct iommu *iommu, iopte_t *iopte) in iopte_make_dummy() argument
88 val |= iommu->dummy_page_pa; in iopte_make_dummy()
93 int iommu_table_init(struct iommu *iommu, int tsbsize, in iommu_table_init() argument
[all …]
Diommu-common.c19 static inline bool need_flush(struct iommu_map_table *iommu) in need_flush() argument
21 return ((iommu->flags & IOMMU_NEED_FLUSH) != 0); in need_flush()
24 static inline void set_flush(struct iommu_map_table *iommu) in set_flush() argument
26 iommu->flags |= IOMMU_NEED_FLUSH; in set_flush()
29 static inline void clear_flush(struct iommu_map_table *iommu) in clear_flush() argument
31 iommu->flags &= ~IOMMU_NEED_FLUSH; in clear_flush()
52 void iommu_tbl_pool_init(struct iommu_map_table *iommu, in iommu_tbl_pool_init() argument
60 struct iommu_pool *p = &(iommu->large_pool); in iommu_tbl_pool_init()
64 iommu->nr_pools = IOMMU_NR_POOLS; in iommu_tbl_pool_init()
66 iommu->nr_pools = npools; in iommu_tbl_pool_init()
[all …]
Dsbus.c61 struct iommu *iommu = dev->archdata.iommu; in sbus_set_sbus64() local
76 cfg_reg = iommu->write_complete_reg; in sbus_set_sbus64()
211 struct iommu *iommu = op->dev.archdata.iommu; in sbus_build_irq() local
212 unsigned long reg_base = iommu->write_complete_reg - 0x2000UL; in sbus_build_irq()
273 struct iommu *iommu = op->dev.archdata.iommu; in sysio_ue_handler() local
274 unsigned long reg_base = iommu->write_complete_reg - 0x2000UL; in sysio_ue_handler()
347 struct iommu *iommu = op->dev.archdata.iommu; in sysio_ce_handler() local
348 unsigned long reg_base = iommu->write_complete_reg - 0x2000UL; in sysio_ce_handler()
426 struct iommu *iommu = op->dev.archdata.iommu; in sysio_sbus_error_handler() local
431 reg_base = iommu->write_complete_reg - 0x2000UL; in sysio_sbus_error_handler()
[all …]
Dpci_sun4v.c112 iotsb_num = pbm->iommu->atu->iotsb->iotsb_num; in iommu_batch_flush()
181 struct iommu *iommu; in dma_4v_alloc_coherent() local
207 iommu = dev->archdata.iommu; in dma_4v_alloc_coherent()
208 atu = iommu->atu; in dma_4v_alloc_coherent()
212 tbl = &iommu->tbl; in dma_4v_alloc_coherent()
323 struct iommu *iommu; in dma_4v_free_coherent() local
331 iommu = dev->archdata.iommu; in dma_4v_free_coherent()
333 atu = iommu->atu; in dma_4v_free_coherent()
337 tbl = &iommu->tbl; in dma_4v_free_coherent()
356 struct iommu *iommu; in dma_4v_map_page() local
[all …]
Dpsycho_common.c207 struct iommu *iommu = pbm->iommu; in psycho_check_iommu_error() local
210 spin_lock_irqsave(&iommu->lock, flags); in psycho_check_iommu_error()
211 control = upa_readq(iommu->iommu_control); in psycho_check_iommu_error()
216 upa_writeq(control, iommu->iommu_control); in psycho_check_iommu_error()
246 spin_unlock_irqrestore(&iommu->lock, flags); in psycho_check_iommu_error()
403 struct iommu *iommu = pbm->iommu; in psycho_iommu_init() local
407 iommu->iommu_control = pbm->controller_regs + PSYCHO_IOMMU_CONTROL; in psycho_iommu_init()
408 iommu->iommu_tsbbase = pbm->controller_regs + PSYCHO_IOMMU_TSBBASE; in psycho_iommu_init()
409 iommu->iommu_flush = pbm->controller_regs + PSYCHO_IOMMU_FLUSH; in psycho_iommu_init()
410 iommu->iommu_tags = pbm->controller_regs + PSYCHO_IOMMU_TAG; in psycho_iommu_init()
[all …]
/Linux-v4.19/drivers/iommu/
Damd_iommu_init.c271 bool translation_pre_enabled(struct amd_iommu *iommu) in translation_pre_enabled() argument
273 return (iommu->flags & AMD_IOMMU_FLAG_TRANS_PRE_ENABLED); in translation_pre_enabled()
277 static void clear_translation_pre_enabled(struct amd_iommu *iommu) in clear_translation_pre_enabled() argument
279 iommu->flags &= ~AMD_IOMMU_FLAG_TRANS_PRE_ENABLED; in clear_translation_pre_enabled()
282 static void init_translation_status(struct amd_iommu *iommu) in init_translation_status() argument
286 ctrl = readq(iommu->mmio_base + MMIO_CONTROL_OFFSET); in init_translation_status()
288 iommu->flags |= AMD_IOMMU_FLAG_TRANS_PRE_ENABLED; in init_translation_status()
312 static u32 iommu_read_l1(struct amd_iommu *iommu, u16 l1, u8 address) in iommu_read_l1() argument
316 pci_write_config_dword(iommu->dev, 0xf8, (address | l1 << 16)); in iommu_read_l1()
317 pci_read_config_dword(iommu->dev, 0xfc, &val); in iommu_read_l1()
[all …]
Drockchip-iommu.c104 struct iommu_device iommu; member
112 struct rk_iommu *iommu; member
282 static void rk_iommu_command(struct rk_iommu *iommu, u32 command) in rk_iommu_command() argument
286 for (i = 0; i < iommu->num_mmu; i++) in rk_iommu_command()
287 writel(command, iommu->bases[i] + RK_MMU_COMMAND); in rk_iommu_command()
294 static void rk_iommu_zap_lines(struct rk_iommu *iommu, dma_addr_t iova_start, in rk_iommu_zap_lines() argument
303 for (i = 0; i < iommu->num_mmu; i++) { in rk_iommu_zap_lines()
307 rk_iommu_write(iommu->bases[i], RK_MMU_ZAP_ONE_LINE, iova); in rk_iommu_zap_lines()
311 static bool rk_iommu_is_stall_active(struct rk_iommu *iommu) in rk_iommu_is_stall_active() argument
316 for (i = 0; i < iommu->num_mmu; i++) in rk_iommu_is_stall_active()
[all …]
Dintel_irq_remapping.c32 struct intel_iommu *iommu; member
39 struct intel_iommu *iommu; member
46 struct intel_iommu *iommu; member
82 static void iommu_disable_irq_remapping(struct intel_iommu *iommu);
85 static bool ir_pre_enabled(struct intel_iommu *iommu) in ir_pre_enabled() argument
87 return (iommu->flags & VTD_FLAG_IRQ_REMAP_PRE_ENABLED); in ir_pre_enabled()
90 static void clear_ir_pre_enabled(struct intel_iommu *iommu) in clear_ir_pre_enabled() argument
92 iommu->flags &= ~VTD_FLAG_IRQ_REMAP_PRE_ENABLED; in clear_ir_pre_enabled()
95 static void init_ir_status(struct intel_iommu *iommu) in init_ir_status() argument
99 gsts = readl(iommu->reg + DMAR_GSTS_REG); in init_ir_status()
[all …]
Dmsm_iommu.c66 static int __enable_clocks(struct msm_iommu_dev *iommu) in __enable_clocks() argument
70 ret = clk_enable(iommu->pclk); in __enable_clocks()
74 if (iommu->clk) { in __enable_clocks()
75 ret = clk_enable(iommu->clk); in __enable_clocks()
77 clk_disable(iommu->pclk); in __enable_clocks()
83 static void __disable_clocks(struct msm_iommu_dev *iommu) in __disable_clocks() argument
85 if (iommu->clk) in __disable_clocks()
86 clk_disable(iommu->clk); in __disable_clocks()
87 clk_disable(iommu->pclk); in __disable_clocks()
132 struct msm_iommu_dev *iommu = NULL; in __flush_iotlb() local
[all …]
Ddmar.c75 static void free_iommu(struct intel_iommu *iommu);
442 if (dmaru->iommu) in dmar_free_drhd()
443 free_iommu(dmaru->iommu); in dmar_free_drhd()
481 drhd->iommu->node = node; in dmar_parse_one_rhsa()
910 x86_init.iommu.iommu_init = intel_iommu_init; in detect_intel_iommu()
922 static void unmap_iommu(struct intel_iommu *iommu) in unmap_iommu() argument
924 iounmap(iommu->reg); in unmap_iommu()
925 release_mem_region(iommu->reg_phys, iommu->reg_size); in unmap_iommu()
936 static int map_iommu(struct intel_iommu *iommu, u64 phys_addr) in map_iommu() argument
940 iommu->reg_phys = phys_addr; in map_iommu()
[all …]
Dintel-iommu.c415 static void domain_context_clear(struct intel_iommu *iommu,
418 struct intel_iommu *iommu);
459 #define ecs_enabled(iommu) (intel_iommu_ecs && ecap_ecs(iommu->ecap) && \ argument
460 (intel_iommu_pasid28 || !ecap_broken_pasid(iommu->ecap)))
463 #define pasid_enabled(iommu) (ecs_enabled(iommu) && \ argument
464 (ecap_pasid(iommu->ecap) || ecap_broken_pasid(iommu->ecap)))
496 static bool translation_pre_enabled(struct intel_iommu *iommu) in translation_pre_enabled() argument
498 return (iommu->flags & VTD_FLAG_TRANS_PRE_ENABLED); in translation_pre_enabled()
501 static void clear_translation_pre_enabled(struct intel_iommu *iommu) in clear_translation_pre_enabled() argument
503 iommu->flags &= ~VTD_FLAG_TRANS_PRE_ENABLED; in clear_translation_pre_enabled()
[all …]
Diommu-sysfs.c57 int iommu_device_sysfs_add(struct iommu_device *iommu, in iommu_device_sysfs_add() argument
65 iommu->dev = kzalloc(sizeof(*iommu->dev), GFP_KERNEL); in iommu_device_sysfs_add()
66 if (!iommu->dev) in iommu_device_sysfs_add()
69 device_initialize(iommu->dev); in iommu_device_sysfs_add()
71 iommu->dev->class = &iommu_class; in iommu_device_sysfs_add()
72 iommu->dev->parent = parent; in iommu_device_sysfs_add()
73 iommu->dev->groups = groups; in iommu_device_sysfs_add()
76 ret = kobject_set_name_vargs(&iommu->dev->kobj, fmt, vargs); in iommu_device_sysfs_add()
81 ret = device_add(iommu->dev); in iommu_device_sysfs_add()
85 dev_set_drvdata(iommu->dev, iommu); in iommu_device_sysfs_add()
[all …]
Dintel-svm.c42 int intel_svm_init(struct intel_iommu *iommu) in intel_svm_init() argument
48 !cap_fl1gp_support(iommu->cap)) in intel_svm_init()
52 !cap_5lp_support(iommu->cap)) in intel_svm_init()
56 iommu->pasid_max = 2 << ecap_pss(iommu->ecap); in intel_svm_init()
63 if (iommu->pasid_max > 0x20000) in intel_svm_init()
64 iommu->pasid_max = 0x20000; in intel_svm_init()
66 order = get_order(sizeof(struct pasid_entry) * iommu->pasid_max); in intel_svm_init()
67 if (ecap_dis(iommu->ecap)) { in intel_svm_init()
72 iommu->pasid_state_table = page_address(pages); in intel_svm_init()
75 iommu->name); in intel_svm_init()
[all …]
Damd_iommu.c307 struct amd_iommu *iommu = amd_iommu_rlookup_table[devid]; in find_dev_data() local
316 if (translation_pre_enabled(iommu)) in find_dev_data()
325 return dev->archdata.iommu; in get_dev_data()
423 struct amd_iommu *iommu; in iommu_init_device() local
426 if (dev->archdata.iommu) in iommu_init_device()
433 iommu = amd_iommu_rlookup_table[devid]; in iommu_init_device()
442 struct amd_iommu *iommu; in iommu_init_device() local
444 iommu = amd_iommu_rlookup_table[dev_data->devid]; in iommu_init_device()
445 dev_data->iommu_v2 = iommu->is_iommu_v2; in iommu_init_device()
448 dev->archdata.iommu = dev_data; in iommu_init_device()
[all …]
DMakefile2 obj-$(CONFIG_IOMMU_API) += iommu.o
3 obj-$(CONFIG_IOMMU_API) += iommu-traces.o
4 obj-$(CONFIG_IOMMU_API) += iommu-sysfs.o
5 obj-$(CONFIG_IOMMU_DEBUGFS) += iommu-debugfs.o
6 obj-$(CONFIG_IOMMU_DMA) += dma-iommu.o
19 obj-$(CONFIG_INTEL_IOMMU) += intel-iommu.o intel-pasid.o
25 obj-$(CONFIG_OMAP_IOMMU) += omap-iommu.o
26 obj-$(CONFIG_OMAP_IOMMU_DEBUG) += omap-iommu-debug.o
27 obj-$(CONFIG_ROCKCHIP_IOMMU) += rockchip-iommu.o
30 obj-$(CONFIG_EXYNOS_IOMMU) += exynos-iommu.o
[all …]
Damd_iommu_proto.h30 extern void amd_iommu_reset_cmd_buffer(struct amd_iommu *iommu);
37 void amd_iommu_debugfs_setup(struct amd_iommu *iommu);
39 static inline void amd_iommu_debugfs_setup(struct amd_iommu *iommu) {} in amd_iommu_debugfs_setup() argument
67 extern int amd_iommu_create_irq_domain(struct amd_iommu *iommu);
69 static inline int amd_iommu_create_irq_domain(struct amd_iommu *iommu) in amd_iommu_create_irq_domain() argument
88 static inline bool iommu_feature(struct amd_iommu *iommu, u64 f) in iommu_feature() argument
90 if (!(iommu->cap & (1 << IOMMU_CAP_EFR))) in iommu_feature()
93 return !!(iommu->features & f); in iommu_feature()
106 extern bool translation_pre_enabled(struct amd_iommu *iommu);
/Linux-v4.19/drivers/gpu/drm/msm/
Dmsm_iommu.c30 struct msm_iommu *iommu = arg; in msm_fault_handler() local
31 if (iommu->base.handler) in msm_fault_handler()
32 return iommu->base.handler(iommu->base.arg, iova, flags); in msm_fault_handler()
40 struct msm_iommu *iommu = to_msm_iommu(mmu); in msm_iommu_attach() local
44 ret = iommu_attach_device(iommu->domain, mmu->dev); in msm_iommu_attach()
53 struct msm_iommu *iommu = to_msm_iommu(mmu); in msm_iommu_detach() local
56 iommu_detach_device(iommu->domain, mmu->dev); in msm_iommu_detach()
63 struct msm_iommu *iommu = to_msm_iommu(mmu); in msm_iommu_map() local
67 ret = iommu_map_sg(iommu->domain, iova, sgt->sgl, sgt->nents, prot); in msm_iommu_map()
77 struct msm_iommu *iommu = to_msm_iommu(mmu); in msm_iommu_unmap() local
[all …]
/Linux-v4.19/Documentation/devicetree/bindings/media/
Dmediatek-vcodec.txt20 argument, see Documentation/devicetree/bindings/iommu/mediatek,iommu.txt
43 iommus = <&iommu M4U_PORT_HW_VDEC_MC_EXT>,
44 <&iommu M4U_PORT_HW_VDEC_PP_EXT>,
45 <&iommu M4U_PORT_HW_VDEC_AVC_MV_EXT>,
46 <&iommu M4U_PORT_HW_VDEC_PRED_RD_EXT>,
47 <&iommu M4U_PORT_HW_VDEC_PRED_WR_EXT>,
48 <&iommu M4U_PORT_HW_VDEC_UFO_EXT>,
49 <&iommu M4U_PORT_HW_VDEC_VLD_EXT>,
50 <&iommu M4U_PORT_HW_VDEC_VLD2_EXT>;
79 iommus = <&iommu M4U_PORT_VENC_RCPU>,
[all …]
/Linux-v4.19/Documentation/devicetree/bindings/pci/
Dpci-iommu.txt26 Documentation/devicetree/bindings/iommu/iommu.txt.
35 - iommu-map: Maps a Requester ID to an IOMMU and associated IOMMU specifier
39 (rid-base,iommu,iommu-base,length).
42 the listed IOMMU, with the IOMMU specifier (r - rid-base + iommu-base).
44 - iommu-map-mask: A mask to be applied to each Requester ID prior to being
45 mapped to an IOMMU specifier per the iommu-map property.
55 iommu: iommu@a {
57 compatible = "vendor,some-iommu";
58 #iommu-cells = <1>;
70 iommu-map = <0x0 &iommu 0x0 0x10000>;
[all …]
/Linux-v4.19/arch/sparc/mm/
Diommu.c59 struct iommu_struct *iommu; in sbus_iommu_init() local
66 iommu = kmalloc(sizeof(struct iommu_struct), GFP_KERNEL); in sbus_iommu_init()
67 if (!iommu) { in sbus_iommu_init()
72 iommu->regs = of_ioremap(&op->resource[0], 0, PAGE_SIZE * 3, in sbus_iommu_init()
74 if (!iommu->regs) { in sbus_iommu_init()
79 control = sbus_readl(&iommu->regs->control); in sbus_iommu_init()
84 sbus_writel(control, &iommu->regs->control); in sbus_iommu_init()
86 iommu_invalidate(iommu->regs); in sbus_iommu_init()
87 iommu->start = IOMMU_START; in sbus_iommu_init()
88 iommu->end = 0xffffffff; in sbus_iommu_init()
[all …]
/Linux-v4.19/drivers/vfio/
Dvfio_iommu_type1.c113 #define IS_IOMMU_CAP_DOMAIN_IN_CONTAINER(iommu) \ argument
114 (!list_empty(&iommu->domain_list))
123 static struct vfio_dma *vfio_find_dma(struct vfio_iommu *iommu, in vfio_find_dma() argument
126 struct rb_node *node = iommu->dma_list.rb_node; in vfio_find_dma()
142 static void vfio_link_dma(struct vfio_iommu *iommu, struct vfio_dma *new) in vfio_link_dma() argument
144 struct rb_node **link = &iommu->dma_list.rb_node, *parent = NULL; in vfio_link_dma()
158 rb_insert_color(&new->node, &iommu->dma_list); in vfio_link_dma()
161 static void vfio_unlink_dma(struct vfio_iommu *iommu, struct vfio_dma *old) in vfio_unlink_dma() argument
163 rb_erase(&old->node, &iommu->dma_list); in vfio_unlink_dma()
545 struct vfio_iommu *iommu = iommu_data; in vfio_iommu_type1_pin_pages() local
[all …]
/Linux-v4.19/Documentation/devicetree/bindings/iommu/
Dqcom,iommu.txt12 "qcom,msm8916-iommu"
14 Followed by "qcom,msm-iommu-v1".
27 - #iommu-cells : Must be 1. Index identifies the context-bank #.
29 - ranges : Base address and size of the iommu context banks.
31 - qcom,iommu-secure-id : secure-id.
37 - "qcom,msm-iommu-v1-ns" : non-secure context bank
38 - "qcom,msm-iommu-v1-sec" : secure context bank
39 - reg : Base address and size of context bank within the iommu
45 be only specified if the iommu requires configuration
47 secure lines. (Ie. if the iommu contains secure
[all …]
Dti,omap-iommu.txt5 "ti,omap2-iommu" for OMAP2/OMAP3 IOMMU instances
6 "ti,omap4-iommu" for OMAP4/OMAP5 IOMMU instances
7 "ti,dra7-dsp-iommu" for DRA7xx DSP IOMMU instances
8 "ti,dra7-iommu" for DRA7xx IOMMU instances
12 - #iommu-cells : Should be 0. OMAP IOMMUs are all "single-master" devices,
16 Documentation/devicetree/bindings/iommu/iommu.txt
21 - ti,iommu-bus-err-back : Indicates the IOMMU instance supports throwing
34 #iommu-cells = <0>;
35 compatible = "ti,omap2-iommu";
44 compatible = "ti,dra7-dsp-iommu";
[all …]
/Linux-v4.19/arch/powerpc/platforms/cell/
Diommu.c115 struct cbe_iommu *iommu; member
142 static void invalidate_tce_cache(struct cbe_iommu *iommu, unsigned long *pte, in invalidate_tce_cache() argument
149 reg = iommu->xlate_regs + IOC_IOPT_CacheInvd; in invalidate_tce_cache()
206 invalidate_tce_cache(window->iommu, io_pte, npages); in tce_build_cell()
229 __pa(window->iommu->pad_page) | in tce_free_cell()
240 invalidate_tce_cache(window->iommu, io_pte, npages); in tce_free_cell()
246 struct cbe_iommu *iommu = data; in ioc_interrupt() local
248 stat = in_be64(iommu->xlate_regs + IOC_IO_ExcpStat); in ioc_interrupt()
264 out_be64(iommu->xlate_regs + IOC_IO_ExcpStat, stat); in ioc_interrupt()
309 static void cell_iommu_setup_stab(struct cbe_iommu *iommu, in cell_iommu_setup_stab() argument
[all …]
/Linux-v4.19/Documentation/ABI/testing/
Dsysfs-class-iommu-intel-iommu1 What: /sys/class/iommu/<iommu>/intel-iommu/address
8 intel-iommu with a DMAR DRHD table entry.
10 What: /sys/class/iommu/<iommu>/intel-iommu/cap
18 What: /sys/class/iommu/<iommu>/intel-iommu/ecap
26 What: /sys/class/iommu/<iommu>/intel-iommu/version

123456789