Home
last modified time | relevance | path

Searched refs:zdev (Results 1 – 23 of 23) sorted by relevance

/openbmc/linux/arch/s390/pci/
H A Dpci.c72 struct zpci_dev *tmp, *zdev = NULL; in get_zdev_by_fid() local
77 zdev = tmp; in get_zdev_by_fid()
78 zpci_zdev_get(zdev); in get_zdev_by_fid()
83 return zdev; in get_zdev_by_fid()
88 struct zpci_dev *tmp, *zdev; in zpci_remove_reserved_devices() local
93 list_for_each_entry_safe(zdev, tmp, &zpci_list, entry) { in zpci_remove_reserved_devices()
94 if (zdev->state == ZPCI_FN_STATE_STANDBY && in zpci_remove_reserved_devices()
95 !clp_get_state(zdev->fid, &state) && in zpci_remove_reserved_devices()
97 list_move_tail(&zdev->entry, &remove); in zpci_remove_reserved_devices()
101 list_for_each_entry_safe(zdev, tmp, &remove, entry) in zpci_remove_reserved_devices()
[all …]
H A Dpci_dma.c24 static int zpci_refresh_global(struct zpci_dev *zdev) in zpci_refresh_global() argument
26 return zpci_refresh_trans((u64) zdev->fh << 32, zdev->start_dma, in zpci_refresh_global()
27 zdev->iommu_pages * PAGE_SIZE); in zpci_refresh_global()
159 static int __dma_update_trans(struct zpci_dev *zdev, phys_addr_t pa, in __dma_update_trans() argument
170 if (!zdev->dma_table) in __dma_update_trans()
174 entry = dma_walk_cpu_trans(zdev->dma_table, dma_addr, in __dma_update_trans()
191 entry = dma_walk_cpu_trans(zdev->dma_table, dma_addr, in __dma_update_trans()
201 static int __dma_purge_tlb(struct zpci_dev *zdev, dma_addr_t dma_addr, in __dma_purge_tlb() argument
215 if (!zdev->tlb_refresh) in __dma_purge_tlb()
222 ret = zpci_refresh_trans((u64) zdev->fh << 32, dma_addr, in __dma_purge_tlb()
[all …]
H A Dpci_bus.c42 static int zpci_bus_prepare_device(struct zpci_dev *zdev) in zpci_bus_prepare_device() argument
46 if (!zdev_enabled(zdev)) { in zpci_bus_prepare_device()
47 rc = zpci_enable_device(zdev); in zpci_bus_prepare_device()
50 rc = zpci_dma_init_device(zdev); in zpci_bus_prepare_device()
52 zpci_disable_device(zdev); in zpci_bus_prepare_device()
57 if (!zdev->has_resources) { in zpci_bus_prepare_device()
58 zpci_setup_bus_resources(zdev); in zpci_bus_prepare_device()
60 if (zdev->bars[i].res) in zpci_bus_prepare_device()
61 pci_bus_add_resource(zdev->zbus->bus, zdev->bars[i].res, 0); in zpci_bus_prepare_device()
75 int zpci_bus_scan_device(struct zpci_dev *zdev) in zpci_bus_scan_device() argument
[all …]
H A Dpci_debug.c72 struct zpci_dev *zdev = m->private; in pci_sw_counter_show() local
73 atomic64_t *counter = &zdev->allocated_pages; in pci_sw_counter_show()
83 struct zpci_dev *zdev = m->private; in pci_perf_show() local
85 if (!zdev) in pci_perf_show()
88 mutex_lock(&zdev->lock); in pci_perf_show()
89 if (!zdev->fmb) { in pci_perf_show()
90 mutex_unlock(&zdev->lock); in pci_perf_show()
96 seq_printf(m, "Update interval: %u ms\n", zdev->fmb_update); in pci_perf_show()
97 seq_printf(m, "Samples: %u\n", zdev->fmb->samples); in pci_perf_show()
98 seq_printf(m, "Last update TOD: %Lx\n", zdev->fmb->last_update); in pci_perf_show()
[all …]
H A Dpci_irq.c33 static int zpci_set_airq(struct zpci_dev *zdev) in zpci_set_airq() argument
35 u64 req = ZPCI_CREATE_REQ(zdev->fh, 0, ZPCI_MOD_FC_REG_INT); in zpci_set_airq()
41 fib.fmt0.noi = airq_iv_end(zdev->aibv); in zpci_set_airq()
42 fib.fmt0.aibv = virt_to_phys(zdev->aibv->vector); in zpci_set_airq()
44 fib.fmt0.aisb = virt_to_phys(zpci_sbv->vector) + (zdev->aisb / 64) * 8; in zpci_set_airq()
45 fib.fmt0.aisbo = zdev->aisb & 63; in zpci_set_airq()
46 fib.gd = zdev->gisa; in zpci_set_airq()
52 static int zpci_clear_airq(struct zpci_dev *zdev) in zpci_clear_airq() argument
54 u64 req = ZPCI_CREATE_REQ(zdev->fh, 0, ZPCI_MOD_FC_DEREG_INT); in zpci_clear_airq()
58 fib.gd = zdev->gisa; in zpci_clear_airq()
[all …]
H A Dpci_event.c62 static bool is_passed_through(struct zpci_dev *zdev) in is_passed_through() argument
64 return zdev->s390_domain; in is_passed_through()
98 struct zpci_dev *zdev = to_zpci(pdev); in zpci_event_do_error_state_clear() local
102 rc = zpci_reset_load_store_blocked(zdev); in zpci_event_do_error_state_clear()
122 rc = zpci_clear_error_state(zdev); in zpci_event_do_error_state_clear()
253 struct zpci_dev *zdev = get_zdev_by_fid(ccdf->fid); in __zpci_event_error() local
262 if (zdev) { in __zpci_event_error()
263 zpci_update_fh(zdev, ccdf->fh); in __zpci_event_error()
264 if (zdev->zbus->bus) in __zpci_event_error()
265 pdev = pci_get_slot(zdev->zbus->bus, zdev->devfn); in __zpci_event_error()
[all …]
H A Dpci_clp.c100 static void clp_store_query_pci_fngrp(struct zpci_dev *zdev, in clp_store_query_pci_fngrp() argument
103 zdev->tlb_refresh = response->refresh; in clp_store_query_pci_fngrp()
104 zdev->dma_mask = response->dasm; in clp_store_query_pci_fngrp()
105 zdev->msi_addr = response->msia; in clp_store_query_pci_fngrp()
106 zdev->max_msi = response->noi; in clp_store_query_pci_fngrp()
107 zdev->fmb_update = response->mui; in clp_store_query_pci_fngrp()
108 zdev->version = response->version; in clp_store_query_pci_fngrp()
109 zdev->maxstbl = response->maxstbl; in clp_store_query_pci_fngrp()
110 zdev->dtsm = response->dtsm; in clp_store_query_pci_fngrp()
114 zdev->max_bus_speed = PCIE_SPEED_5_0GT; in clp_store_query_pci_fngrp()
[all …]
H A Dpci_sysfs.c24 struct zpci_dev *zdev = to_zpci(to_pci_dev(dev)); \
26 return sprintf(buf, fmt, zdev->member); \
46 struct zpci_dev *zdev = to_zpci(to_pci_dev(dev)); in mio_enabled_show() local
48 return sprintf(buf, zpci_use_mio(zdev) ? "1\n" : "0\n"); in mio_enabled_show()
57 struct zpci_dev *zdev = to_zpci(pdev); in recover_store() local
85 if (zdev->dma_table) { in recover_store()
86 ret = zpci_dma_exit_device(zdev); in recover_store()
91 if (zdev_enabled(zdev)) { in recover_store()
92 ret = zpci_disable_device(zdev); in recover_store()
105 ret = zpci_enable_device(zdev); in recover_store()
[all …]
H A Dpci_bus.h10 int zpci_bus_device_register(struct zpci_dev *zdev, struct pci_ops *ops);
11 void zpci_bus_device_unregister(struct zpci_dev *zdev);
16 int zpci_bus_scan_device(struct zpci_dev *zdev);
17 void zpci_bus_remove_device(struct zpci_dev *zdev, bool set_error);
20 static inline void zpci_zdev_put(struct zpci_dev *zdev) in zpci_zdev_put() argument
22 if (zdev) in zpci_zdev_put()
23 kref_put(&zdev->kref, zpci_release_device); in zpci_zdev_put()
26 static inline void zpci_zdev_get(struct zpci_dev *zdev) in zpci_zdev_get() argument
28 kref_get(&zdev->kref); in zpci_zdev_get()
33 int zpci_setup_bus_resources(struct zpci_dev *zdev);
H A Dpci_iov.c66 struct zpci_dev *zdev; in zpci_iov_setup_virtfn() local
82 zdev = zbus->function[i]; in zpci_iov_setup_virtfn()
83 if (zdev && zdev->is_physfn) { in zpci_iov_setup_virtfn()
84 pdev = pci_get_slot(zbus->bus, zdev->devfn); in zpci_iov_setup_virtfn()
/openbmc/linux/arch/s390/kvm/
H A Dpci.c159 static int kvm_zpci_set_airq(struct zpci_dev *zdev) in kvm_zpci_set_airq() argument
161 u64 req = ZPCI_CREATE_REQ(zdev->fh, 0, ZPCI_MOD_FC_REG_INT); in kvm_zpci_set_airq()
165 fib.fmt0.isc = zdev->kzdev->fib.fmt0.isc; in kvm_zpci_set_airq()
167 fib.fmt0.noi = airq_iv_end(zdev->aibv); in kvm_zpci_set_airq()
168 fib.fmt0.aibv = virt_to_phys(zdev->aibv->vector); in kvm_zpci_set_airq()
170 fib.fmt0.aisb = virt_to_phys(aift->sbv->vector + (zdev->aisb / 64) * 8); in kvm_zpci_set_airq()
171 fib.fmt0.aisbo = zdev->aisb & 63; in kvm_zpci_set_airq()
172 fib.gd = zdev->gisa; in kvm_zpci_set_airq()
178 static int kvm_zpci_clear_airq(struct zpci_dev *zdev) in kvm_zpci_clear_airq() argument
180 u64 req = ZPCI_CREATE_REQ(zdev->fh, 0, ZPCI_MOD_FC_DEREG_INT); in kvm_zpci_clear_airq()
[all …]
H A Dpci.h21 struct zpci_dev *zdev; member
/openbmc/linux/drivers/vfio/pci/
H A Dvfio_pci_zdev.c23 static int zpci_base_cap(struct zpci_dev *zdev, struct vfio_info_cap *caps) in zpci_base_cap() argument
28 .start_dma = zdev->start_dma, in zpci_base_cap()
29 .end_dma = zdev->end_dma, in zpci_base_cap()
30 .pchid = zdev->pchid, in zpci_base_cap()
31 .vfn = zdev->vfn, in zpci_base_cap()
32 .fmb_length = zdev->fmb_length, in zpci_base_cap()
33 .pft = zdev->pft, in zpci_base_cap()
34 .gid = zdev->pfgid, in zpci_base_cap()
35 .fh = zdev->fh in zpci_base_cap()
44 static int zpci_group_cap(struct zpci_dev *zdev, struct vfio_info_cap *caps) in zpci_group_cap() argument
[all …]
/openbmc/linux/drivers/iommu/
H A Ds390-iommu.c87 static void __s390_iommu_detach_device(struct zpci_dev *zdev) in __s390_iommu_detach_device() argument
89 struct s390_domain *s390_domain = zdev->s390_domain; in __s390_iommu_detach_device()
96 list_del_rcu(&zdev->iommu_list); in __s390_iommu_detach_device()
99 zpci_unregister_ioat(zdev, 0); in __s390_iommu_detach_device()
100 zdev->s390_domain = NULL; in __s390_iommu_detach_device()
101 zdev->dma_table = NULL; in __s390_iommu_detach_device()
108 struct zpci_dev *zdev = to_zpci_dev(dev); in s390_iommu_attach_device() local
113 if (!zdev) in s390_iommu_attach_device()
116 if (WARN_ON(domain->geometry.aperture_start > zdev->end_dma || in s390_iommu_attach_device()
117 domain->geometry.aperture_end < zdev->start_dma)) in s390_iommu_attach_device()
[all …]
/openbmc/linux/drivers/pci/hotplug/
H A Ds390_pci_hpc.c25 struct zpci_dev *zdev = container_of(hotplug_slot, struct zpci_dev, in enable_slot() local
29 if (zdev->state != ZPCI_FN_STATE_STANDBY) in enable_slot()
32 rc = sclp_pci_configure(zdev->fid); in enable_slot()
33 zpci_dbg(3, "conf fid:%x, rc:%d\n", zdev->fid, rc); in enable_slot()
36 zdev->state = ZPCI_FN_STATE_CONFIGURED; in enable_slot()
38 return zpci_scan_configured_device(zdev, zdev->fh); in enable_slot()
43 struct zpci_dev *zdev = container_of(hotplug_slot, struct zpci_dev, in disable_slot() local
47 if (zdev->state != ZPCI_FN_STATE_CONFIGURED) in disable_slot()
50 pdev = pci_get_slot(zdev->zbus->bus, zdev->devfn); in disable_slot()
57 return zpci_deconfigure_device(zdev); in disable_slot()
[all …]
/openbmc/linux/drivers/dma/xilinx/
H A Dzynqmp_dma.c216 struct zynqmp_dma_device *zdev; member
878 devm_free_irq(chan->zdev->dev, chan->irq, chan); in zynqmp_dma_chan_remove()
890 static int zynqmp_dma_chan_probe(struct zynqmp_dma_device *zdev, in zynqmp_dma_chan_probe() argument
897 chan = devm_kzalloc(zdev->dev, sizeof(*chan), GFP_KERNEL); in zynqmp_dma_chan_probe()
900 chan->dev = zdev->dev; in zynqmp_dma_chan_probe()
901 chan->zdev = zdev; in zynqmp_dma_chan_probe()
918 dev_err(zdev->dev, "invalid bus-width value"); in zynqmp_dma_chan_probe()
923 zdev->chan = chan; in zynqmp_dma_chan_probe()
932 chan->common.device = &zdev->common; in zynqmp_dma_chan_probe()
933 list_add_tail(&chan->common.device_node, &zdev->common.channels); in zynqmp_dma_chan_probe()
[all …]
/openbmc/linux/arch/s390/include/asm/
H A Dpci.h199 static inline bool zdev_enabled(struct zpci_dev *zdev) in zdev_enabled() argument
201 return (zdev->fh & (1UL << 31)) ? true : false; in zdev_enabled()
218 int zpci_scan_configured_device(struct zpci_dev *zdev, u32 fh);
219 int zpci_deconfigure_device(struct zpci_dev *zdev);
220 void zpci_device_reserved(struct zpci_dev *zdev);
221 bool zpci_is_device_configured(struct zpci_dev *zdev);
223 int zpci_hot_reset_device(struct zpci_dev *zdev);
227 void zpci_update_fh(struct zpci_dev *zdev, u32 fh);
232 int clp_query_pci_fn(struct zpci_dev *zdev);
233 int clp_enable_fh(struct zpci_dev *zdev, u32 *fh, u8 nr_dma_as);
[all …]
/openbmc/linux/drivers/net/ethernet/8390/
H A Dxsurf100.c239 static int xsurf100_probe(struct zorro_dev *zdev, in xsurf100_probe() argument
247 DEFINE_RES_MEM(zdev->resource.start + XS100_8390_BASE, in xsurf100_probe()
262 if (!request_mem_region(zdev->resource.start, 0x100, zdev->name)) { in xsurf100_probe()
263 dev_err(&zdev->dev, "cannot reserve X-Surf 100 control registers\n"); in xsurf100_probe()
267 if (!request_mem_region(zdev->resource.start + in xsurf100_probe()
271 dev_err(&zdev->dev, "cannot reserve 32-bit area\n"); in xsurf100_probe()
286 ax88796_data.base_regs = ioremap(zdev->resource.start, 0x100); in xsurf100_probe()
290 dev_err(&zdev->dev, "Cannot ioremap area %pR (registers)\n", in xsurf100_probe()
291 &zdev->resource); in xsurf100_probe()
297 ax88796_data.data_area = ioremap(zdev->resource.start + in xsurf100_probe()
[all …]
/openbmc/linux/arch/s390/net/
H A Dpnet.c57 struct zpci_dev *zdev = to_zpci(to_pci_dev(dev)); in pnet_ids_by_device() local
59 memcpy(pnetids, zdev->util_str, sizeof(zdev->util_str)); in pnet_ids_by_device()
60 EBCASC(pnetids, sizeof(zdev->util_str)); in pnet_ids_by_device()
/openbmc/linux/drivers/s390/net/
H A Dism.h204 struct zpci_dev *zdev = to_zpci(ism->pdev); in __ism_read_cmd() local
205 u64 req = ZPCI_CREATE_REQ(zdev->fh, 2, 8); in __ism_read_cmd()
218 struct zpci_dev *zdev = to_zpci(ism->pdev); in __ism_write_cmd() local
219 u64 req = ZPCI_CREATE_REQ(zdev->fh, 2, len); in __ism_write_cmd()
228 struct zpci_dev *zdev = to_zpci(ism->pdev); in __ism_move() local
229 u64 req = ZPCI_CREATE_REQ(zdev->fh, 0, size); in __ism_move()
/openbmc/linux/net/smc/
H A Dsmc_core.h536 struct zpci_dev *zdev; in smc_set_pci_values() local
538 zdev = to_zpci(pci_dev); in smc_set_pci_values()
539 smc_dev->pci_fid = zdev->fid; in smc_set_pci_values()
540 smc_dev->pci_pchid = zdev->pchid; in smc_set_pci_values()
/openbmc/linux/drivers/s390/crypto/
H A Dzcrypt_card.c159 struct zcrypt_card *zdev = in zcrypt_card_release() local
161 zcrypt_card_free(zdev); in zcrypt_card_release()
/openbmc/linux/drivers/video/fbdev/
H A Dcirrusfb.c1948 struct zorro_dev *zdev = to_zorro_dev(info->device); in cirrusfb_zorro_unmap() local
1955 zorro_release_device(zdev); in cirrusfb_zorro_unmap()