viodev 135 arch/powerpc/include/asm/vio.h extern void vio_cmo_set_dev_desired(struct vio_dev *viodev, size_t desired); viodev 67 arch/powerpc/platforms/pseries/vio.c struct vio_dev *viodev; viodev 142 arch/powerpc/platforms/pseries/vio.c static inline int vio_cmo_alloc(struct vio_dev *viodev, size_t size) viodev 152 arch/powerpc/platforms/pseries/vio.c if (viodev->cmo.entitled > viodev->cmo.allocated) viodev 153 arch/powerpc/platforms/pseries/vio.c reserve_free = viodev->cmo.entitled - viodev->cmo.allocated; viodev 164 arch/powerpc/platforms/pseries/vio.c viodev->cmo.allocated += size; viodev 186 arch/powerpc/platforms/pseries/vio.c static inline void vio_cmo_dealloc(struct vio_dev *viodev, size_t size) viodev 199 arch/powerpc/platforms/pseries/vio.c if (viodev->cmo.allocated > viodev->cmo.entitled) { viodev 200 arch/powerpc/platforms/pseries/vio.c excess_freed = min(reserve_freed, (viodev->cmo.allocated - viodev 201 arch/powerpc/platforms/pseries/vio.c viodev->cmo.entitled)); viodev 206 arch/powerpc/platforms/pseries/vio.c viodev->cmo.allocated -= (reserve_freed + excess_freed); viodev 232 arch/powerpc/platforms/pseries/vio.c tmp = min3(spare_needed, reserve_freed, (viodev->cmo.entitled - VIO_CMO_MIN_ENT)); viodev 235 arch/powerpc/platforms/pseries/vio.c viodev->cmo.entitled -= tmp; viodev 277 arch/powerpc/platforms/pseries/vio.c struct vio_dev *viodev; viodev 316 arch/powerpc/platforms/pseries/vio.c viodev = dev_ent->viodev; viodev 317 arch/powerpc/platforms/pseries/vio.c if ((viodev->cmo.entitled > viodev->cmo.allocated) && viodev 318 arch/powerpc/platforms/pseries/vio.c (viodev->cmo.entitled > VIO_CMO_MIN_ENT)) viodev 319 arch/powerpc/platforms/pseries/vio.c avail += viodev->cmo.entitled - viodev 320 arch/powerpc/platforms/pseries/vio.c max_t(size_t, viodev->cmo.allocated, viodev 341 arch/powerpc/platforms/pseries/vio.c viodev = dev_ent->viodev; viodev 343 arch/powerpc/platforms/pseries/vio.c if ((viodev->cmo.entitled > viodev->cmo.allocated) && viodev 344 arch/powerpc/platforms/pseries/vio.c (viodev->cmo.entitled > VIO_CMO_MIN_ENT)) viodev 345 arch/powerpc/platforms/pseries/vio.c tmp = viodev->cmo.entitled - viodev 346 arch/powerpc/platforms/pseries/vio.c max_t(size_t, viodev->cmo.allocated, viodev 348 arch/powerpc/platforms/pseries/vio.c viodev->cmo.entitled -= min(tmp, delta); viodev 386 arch/powerpc/platforms/pseries/vio.c struct vio_dev *viodev; viodev 409 arch/powerpc/platforms/pseries/vio.c viodev = dev_ent->viodev; viodev 411 arch/powerpc/platforms/pseries/vio.c viodev->cmo.entitled = VIO_CMO_MIN_ENT; viodev 412 arch/powerpc/platforms/pseries/vio.c cmo->desired += (viodev->cmo.desired - VIO_CMO_MIN_ENT); viodev 413 arch/powerpc/platforms/pseries/vio.c avail -= max_t(size_t, viodev->cmo.allocated, VIO_CMO_MIN_ENT); viodev 425 arch/powerpc/platforms/pseries/vio.c viodev = dev_ent->viodev; viodev 427 arch/powerpc/platforms/pseries/vio.c if (viodev->cmo.desired <= level) { viodev 438 arch/powerpc/platforms/pseries/vio.c chunk = min(chunk, (viodev->cmo.desired - viodev 439 arch/powerpc/platforms/pseries/vio.c viodev->cmo.entitled)); viodev 440 arch/powerpc/platforms/pseries/vio.c viodev->cmo.entitled += chunk; viodev 447 arch/powerpc/platforms/pseries/vio.c need = max(viodev->cmo.allocated, viodev->cmo.entitled)- viodev 448 arch/powerpc/platforms/pseries/vio.c max(viodev->cmo.allocated, level); viodev 463 arch/powerpc/platforms/pseries/vio.c viodev = dev_ent->viodev; viodev 465 arch/powerpc/platforms/pseries/vio.c if (viodev->cmo.entitled) viodev 466 arch/powerpc/platforms/pseries/vio.c cmo->reserve.size += (viodev->cmo.entitled - viodev 469 arch/powerpc/platforms/pseries/vio.c if (viodev->cmo.allocated > viodev->cmo.entitled) viodev 470 arch/powerpc/platforms/pseries/vio.c need += viodev->cmo.allocated - viodev->cmo.entitled; viodev 483 arch/powerpc/platforms/pseries/vio.c struct vio_dev *viodev = to_vio_dev(dev); viodev 486 arch/powerpc/platforms/pseries/vio.c if (vio_cmo_alloc(viodev, roundup(size, PAGE_SIZE))) { viodev 487 arch/powerpc/platforms/pseries/vio.c atomic_inc(&viodev->cmo.allocs_failed); viodev 495 arch/powerpc/platforms/pseries/vio.c vio_cmo_dealloc(viodev, roundup(size, PAGE_SIZE)); viodev 496 arch/powerpc/platforms/pseries/vio.c atomic_inc(&viodev->cmo.allocs_failed); viodev 506 arch/powerpc/platforms/pseries/vio.c struct vio_dev *viodev = to_vio_dev(dev); viodev 509 arch/powerpc/platforms/pseries/vio.c vio_cmo_dealloc(viodev, roundup(size, PAGE_SIZE)); viodev 517 arch/powerpc/platforms/pseries/vio.c struct vio_dev *viodev = to_vio_dev(dev); viodev 521 arch/powerpc/platforms/pseries/vio.c if (vio_cmo_alloc(viodev, roundup(size, IOMMU_PAGE_SIZE(tbl)))) viodev 530 arch/powerpc/platforms/pseries/vio.c vio_cmo_dealloc(viodev, roundup(size, IOMMU_PAGE_SIZE(tbl))); viodev 532 arch/powerpc/platforms/pseries/vio.c atomic_inc(&viodev->cmo.allocs_failed); viodev 541 arch/powerpc/platforms/pseries/vio.c struct vio_dev *viodev = to_vio_dev(dev); viodev 545 arch/powerpc/platforms/pseries/vio.c vio_cmo_dealloc(viodev, roundup(size, IOMMU_PAGE_SIZE(tbl))); viodev 552 arch/powerpc/platforms/pseries/vio.c struct vio_dev *viodev = to_vio_dev(dev); viodev 561 arch/powerpc/platforms/pseries/vio.c if (vio_cmo_alloc(viodev, alloc_size)) viodev 571 arch/powerpc/platforms/pseries/vio.c vio_cmo_dealloc(viodev, alloc_size); viodev 575 arch/powerpc/platforms/pseries/vio.c vio_cmo_dealloc(viodev, alloc_size); viodev 577 arch/powerpc/platforms/pseries/vio.c atomic_inc(&viodev->cmo.allocs_failed); viodev 586 arch/powerpc/platforms/pseries/vio.c struct vio_dev *viodev = to_vio_dev(dev); viodev 596 arch/powerpc/platforms/pseries/vio.c vio_cmo_dealloc(viodev, alloc_size); viodev 622 arch/powerpc/platforms/pseries/vio.c void vio_cmo_set_dev_desired(struct vio_dev *viodev, size_t desired) viodev 641 arch/powerpc/platforms/pseries/vio.c if (viodev == dev_ent->viodev) { viodev 651 arch/powerpc/platforms/pseries/vio.c if (desired >= viodev->cmo.desired) { viodev 653 arch/powerpc/platforms/pseries/vio.c vio_cmo.desired += desired - viodev->cmo.desired; viodev 654 arch/powerpc/platforms/pseries/vio.c viodev->cmo.desired = desired; viodev 657 arch/powerpc/platforms/pseries/vio.c vio_cmo.desired -= viodev->cmo.desired - desired; viodev 658 arch/powerpc/platforms/pseries/vio.c viodev->cmo.desired = desired; viodev 663 arch/powerpc/platforms/pseries/vio.c if (viodev->cmo.entitled > desired) { viodev 664 arch/powerpc/platforms/pseries/vio.c vio_cmo.reserve.size -= viodev->cmo.entitled - desired; viodev 665 arch/powerpc/platforms/pseries/vio.c vio_cmo.excess.size += viodev->cmo.entitled - desired; viodev 671 arch/powerpc/platforms/pseries/vio.c if (viodev->cmo.allocated < viodev->cmo.entitled) viodev 672 arch/powerpc/platforms/pseries/vio.c vio_cmo.excess.free += viodev->cmo.entitled - viodev 673 arch/powerpc/platforms/pseries/vio.c max(viodev->cmo.allocated, desired); viodev 674 arch/powerpc/platforms/pseries/vio.c viodev->cmo.entitled = desired; viodev 695 arch/powerpc/platforms/pseries/vio.c static int vio_cmo_bus_probe(struct vio_dev *viodev) viodev 698 arch/powerpc/platforms/pseries/vio.c struct device *dev = &viodev->dev; viodev 708 arch/powerpc/platforms/pseries/vio.c switch (viodev->family) { viodev 710 arch/powerpc/platforms/pseries/vio.c if (of_get_property(viodev->dev.of_node, viodev 718 arch/powerpc/platforms/pseries/vio.c dev_warn(dev, "unknown device family: %d\n", viodev->family); viodev 732 arch/powerpc/platforms/pseries/vio.c viodev->cmo.desired = viodev 733 arch/powerpc/platforms/pseries/vio.c IOMMU_PAGE_ALIGN(viodrv->get_desired_dma(viodev), tbl); viodev 734 arch/powerpc/platforms/pseries/vio.c if (viodev->cmo.desired < VIO_CMO_MIN_ENT) viodev 735 arch/powerpc/platforms/pseries/vio.c viodev->cmo.desired = VIO_CMO_MIN_ENT; viodev 743 arch/powerpc/platforms/pseries/vio.c dev_ent->viodev = viodev; viodev 747 arch/powerpc/platforms/pseries/vio.c viodev->cmo.desired = 0; viodev 762 arch/powerpc/platforms/pseries/vio.c vio_cmo.desired += (viodev->cmo.desired - viodev 788 arch/powerpc/platforms/pseries/vio.c vio_cmo.desired += viodev->cmo.desired; viodev 804 arch/powerpc/platforms/pseries/vio.c static void vio_cmo_bus_remove(struct vio_dev *viodev) viodev 811 arch/powerpc/platforms/pseries/vio.c if (viodev->cmo.allocated) { viodev 812 arch/powerpc/platforms/pseries/vio.c dev_err(&viodev->dev, "%s: device had %lu bytes of IO " viodev 814 arch/powerpc/platforms/pseries/vio.c __func__, viodev->cmo.allocated); viodev 823 arch/powerpc/platforms/pseries/vio.c if (viodev == dev_ent->viodev) { viodev 834 arch/powerpc/platforms/pseries/vio.c if (viodev->cmo.entitled) { viodev 840 arch/powerpc/platforms/pseries/vio.c vio_cmo.desired -= (viodev->cmo.desired - VIO_CMO_MIN_ENT); viodev 847 arch/powerpc/platforms/pseries/vio.c viodev->cmo.entitled -= VIO_CMO_MIN_ENT; viodev 850 arch/powerpc/platforms/pseries/vio.c if (viodev->cmo.entitled && (vio_cmo.spare < VIO_CMO_MIN_ENT)) { viodev 851 arch/powerpc/platforms/pseries/vio.c tmp = min(viodev->cmo.entitled, (VIO_CMO_MIN_ENT - viodev 854 arch/powerpc/platforms/pseries/vio.c viodev->cmo.entitled -= tmp; viodev 858 arch/powerpc/platforms/pseries/vio.c vio_cmo.excess.size += viodev->cmo.entitled; viodev 859 arch/powerpc/platforms/pseries/vio.c vio_cmo.excess.free += viodev->cmo.entitled; viodev 860 arch/powerpc/platforms/pseries/vio.c vio_cmo.reserve.size -= viodev->cmo.entitled; viodev 867 arch/powerpc/platforms/pseries/vio.c viodev->cmo.entitled = VIO_CMO_MIN_ENT; viodev 868 arch/powerpc/platforms/pseries/vio.c viodev->cmo.desired = VIO_CMO_MIN_ENT; viodev 869 arch/powerpc/platforms/pseries/vio.c atomic_set(&viodev->cmo.allocs_failed, 0); viodev 875 arch/powerpc/platforms/pseries/vio.c static void vio_cmo_set_dma_ops(struct vio_dev *viodev) viodev 877 arch/powerpc/platforms/pseries/vio.c set_dma_ops(&viodev->dev, &vio_dma_mapping_ops); viodev 943 arch/powerpc/platforms/pseries/vio.c struct vio_dev *viodev = to_vio_dev(dev); viodev 944 arch/powerpc/platforms/pseries/vio.c return sprintf(buf, "%d\n", atomic_read(&viodev->cmo.allocs_failed)); viodev 950 arch/powerpc/platforms/pseries/vio.c struct vio_dev *viodev = to_vio_dev(dev); viodev 951 arch/powerpc/platforms/pseries/vio.c atomic_set(&viodev->cmo.allocs_failed, 0); viodev 958 arch/powerpc/platforms/pseries/vio.c struct vio_dev *viodev = to_vio_dev(dev); viodev 966 arch/powerpc/platforms/pseries/vio.c vio_cmo_set_dev_desired(viodev, new_desired); viodev 1066 arch/powerpc/platforms/pseries/vio.c void vio_cmo_set_dev_desired(struct vio_dev *viodev, size_t desired) {} viodev 1067 arch/powerpc/platforms/pseries/vio.c static int vio_cmo_bus_probe(struct vio_dev *viodev) { return 0; } viodev 1068 arch/powerpc/platforms/pseries/vio.c static void vio_cmo_bus_remove(struct vio_dev *viodev) {} viodev 1069 arch/powerpc/platforms/pseries/vio.c static void vio_cmo_set_dma_ops(struct vio_dev *viodev) {} viodev 1231 arch/powerpc/platforms/pseries/vio.c struct vio_dev *viodev = to_vio_dev(dev); viodev 1239 arch/powerpc/platforms/pseries/vio.c id = vio_match_device(viodrv->id_table, viodev); viodev 1241 arch/powerpc/platforms/pseries/vio.c memset(&viodev->cmo, 0, sizeof(viodev->cmo)); viodev 1243 arch/powerpc/platforms/pseries/vio.c error = vio_cmo_bus_probe(viodev); viodev 1247 arch/powerpc/platforms/pseries/vio.c error = viodrv->probe(viodev, id); viodev 1249 arch/powerpc/platforms/pseries/vio.c vio_cmo_bus_remove(viodev); viodev 1258 arch/powerpc/platforms/pseries/vio.c struct vio_dev *viodev = to_vio_dev(dev); viodev 1270 arch/powerpc/platforms/pseries/vio.c ret = viodrv->remove(viodev); viodev 1273 arch/powerpc/platforms/pseries/vio.c vio_cmo_bus_remove(viodev); viodev 1331 arch/powerpc/platforms/pseries/vio.c struct vio_dev *viodev; viodev 1370 arch/powerpc/platforms/pseries/vio.c viodev = kzalloc(sizeof(struct vio_dev), GFP_KERNEL); viodev 1371 arch/powerpc/platforms/pseries/vio.c if (viodev == NULL) { viodev 1377 arch/powerpc/platforms/pseries/vio.c viodev->family = family; viodev 1378 arch/powerpc/platforms/pseries/vio.c if (viodev->family == VDEVICE) { viodev 1381 arch/powerpc/platforms/pseries/vio.c viodev->type = of_node_get_device_type(of_node); viodev 1382 arch/powerpc/platforms/pseries/vio.c if (!viodev->type) { viodev 1395 arch/powerpc/platforms/pseries/vio.c dev_set_name(&viodev->dev, "%x", unit_address); viodev 1396 arch/powerpc/platforms/pseries/vio.c viodev->irq = irq_of_parse_and_map(of_node, 0); viodev 1397 arch/powerpc/platforms/pseries/vio.c viodev->unit_address = unit_address; viodev 1404 arch/powerpc/platforms/pseries/vio.c viodev->resource_id = of_read_number(prop, 1); viodev 1406 arch/powerpc/platforms/pseries/vio.c dev_set_name(&viodev->dev, "%pOFn", of_node); viodev 1407 arch/powerpc/platforms/pseries/vio.c viodev->type = dev_name(&viodev->dev); viodev 1408 arch/powerpc/platforms/pseries/vio.c viodev->irq = 0; viodev 1411 arch/powerpc/platforms/pseries/vio.c viodev->name = of_node->name; viodev 1412 arch/powerpc/platforms/pseries/vio.c viodev->dev.of_node = of_node_get(of_node); viodev 1414 arch/powerpc/platforms/pseries/vio.c set_dev_node(&viodev->dev, of_node_to_nid(of_node)); viodev 1417 arch/powerpc/platforms/pseries/vio.c viodev->dev.parent = &vio_bus_device.dev; viodev 1418 arch/powerpc/platforms/pseries/vio.c viodev->dev.bus = &vio_bus_type; viodev 1419 arch/powerpc/platforms/pseries/vio.c viodev->dev.release = vio_dev_release; viodev 1421 arch/powerpc/platforms/pseries/vio.c if (of_get_property(viodev->dev.of_node, "ibm,my-dma-window", NULL)) { viodev 1423 arch/powerpc/platforms/pseries/vio.c vio_cmo_set_dma_ops(viodev); viodev 1425 arch/powerpc/platforms/pseries/vio.c set_dma_ops(&viodev->dev, &dma_iommu_ops); viodev 1427 arch/powerpc/platforms/pseries/vio.c set_iommu_table_base(&viodev->dev, viodev 1428 arch/powerpc/platforms/pseries/vio.c vio_build_iommu_table(viodev)); viodev 1432 arch/powerpc/platforms/pseries/vio.c viodev->dev.coherent_dma_mask = DMA_BIT_MASK(64); viodev 1433 arch/powerpc/platforms/pseries/vio.c viodev->dev.dma_mask = &viodev->dev.coherent_dma_mask; viodev 1437 arch/powerpc/platforms/pseries/vio.c if (device_register(&viodev->dev)) { viodev 1439 arch/powerpc/platforms/pseries/vio.c __func__, dev_name(&viodev->dev)); viodev 1440 arch/powerpc/platforms/pseries/vio.c put_device(&viodev->dev); viodev 1444 arch/powerpc/platforms/pseries/vio.c return viodev; viodev 1447 arch/powerpc/platforms/pseries/vio.c kfree(viodev); viodev 1573 arch/powerpc/platforms/pseries/vio.c void vio_unregister_device(struct vio_dev *viodev) viodev 1575 arch/powerpc/platforms/pseries/vio.c device_unregister(&viodev->dev); viodev 1576 arch/powerpc/platforms/pseries/vio.c if (viodev->family == VDEVICE) viodev 1577 arch/powerpc/platforms/pseries/vio.c irq_dispose_mapping(viodev->irq); viodev 145 drivers/crypto/nx/nx-842-pseries.c static unsigned long nx842_get_desired_dma(struct vio_dev *viodev) viodev 973 drivers/crypto/nx/nx-842-pseries.c static int nx842_probe(struct vio_dev *viodev, viodev 996 drivers/crypto/nx/nx-842-pseries.c dev_err(&viodev->dev, "%s: Attempt to register more than one instance of the hardware\n", __func__); viodev 1001 drivers/crypto/nx/nx-842-pseries.c dev_set_drvdata(&viodev->dev, NULL); viodev 1003 drivers/crypto/nx/nx-842-pseries.c new_devdata->vdev = viodev; viodev 1004 drivers/crypto/nx/nx-842-pseries.c new_devdata->dev = &viodev->dev; viodev 1020 drivers/crypto/nx/nx-842-pseries.c dev_err(&viodev->dev, "could not register comp alg: %d\n", ret); viodev 1025 drivers/crypto/nx/nx-842-pseries.c dev_set_drvdata(&viodev->dev, rcu_dereference(devdata)); viodev 1028 drivers/crypto/nx/nx-842-pseries.c if (sysfs_create_group(&viodev->dev.kobj, &nx842_attribute_group)) { viodev 1029 drivers/crypto/nx/nx-842-pseries.c dev_err(&viodev->dev, "could not create sysfs device attributes\n"); viodev 1045 drivers/crypto/nx/nx-842-pseries.c static int nx842_remove(struct vio_dev *viodev) viodev 1051 drivers/crypto/nx/nx-842-pseries.c sysfs_remove_group(&viodev->dev.kobj, &nx842_attribute_group); viodev 1062 drivers/crypto/nx/nx-842-pseries.c dev_set_drvdata(&viodev->dev, NULL); viodev 45 drivers/crypto/nx/nx.c struct vio_dev *viodev = nx_driver.viodev; viodev 50 drivers/crypto/nx/nx.c rc = vio_h_cop_sync(viodev, op); viodev 54 drivers/crypto/nx/nx.c dev_dbg(&viodev->dev, "vio_h_cop_sync failed: rc: %d " viodev 516 drivers/crypto/nx/nx.c return nx_check_props(&nx_driver.viodev->dev, fc, mode) ? viodev 522 drivers/crypto/nx/nx.c return nx_check_props(&nx_driver.viodev->dev, fc, mode) ? viodev 528 drivers/crypto/nx/nx.c return (slot >= 0 ? nx_check_prop(&nx_driver.viodev->dev, viodev 530 drivers/crypto/nx/nx.c nx_check_props(&nx_driver.viodev->dev, fc, mode)) ? viodev 762 drivers/crypto/nx/nx.c static int nx_probe(struct vio_dev *viodev, const struct vio_device_id *id) viodev 764 drivers/crypto/nx/nx.c dev_dbg(&viodev->dev, "driver probed: %s resource id: 0x%x\n", viodev 765 drivers/crypto/nx/nx.c viodev->name, viodev->resource_id); viodev 767 drivers/crypto/nx/nx.c if (nx_driver.viodev) { viodev 768 drivers/crypto/nx/nx.c dev_err(&viodev->dev, "%s: Attempt to register more than one " viodev 773 drivers/crypto/nx/nx.c nx_driver.viodev = viodev; viodev 775 drivers/crypto/nx/nx.c nx_of_init(&viodev->dev, &nx_driver.of); viodev 780 drivers/crypto/nx/nx.c static int nx_remove(struct vio_dev *viodev) viodev 782 drivers/crypto/nx/nx.c dev_dbg(&viodev->dev, "entering nx_remove for UA 0x%x\n", viodev 783 drivers/crypto/nx/nx.c viodev->unit_address); viodev 79 drivers/crypto/nx/nx.h struct vio_dev *viodev; viodev 1469 drivers/net/ethernet/ibm/ibmveth.c struct vio_dev *viodev = adapter->vdev; viodev 1496 drivers/net/ethernet/ibm/ibmveth.c vio_cmo_set_dev_desired(viodev, viodev 1498 drivers/net/ethernet/ibm/ibmveth.c (viodev));