Lines Matching refs:nb_sb

1589 					    unsigned long mb_id, uint64_t *nb_sb)  in virtio_mem_sbm_unplug_any_sb_raw()  argument
1595 while (*nb_sb) { in virtio_mem_sbm_unplug_any_sb_raw()
1604 while (count < *nb_sb && sb_id > 0 && in virtio_mem_sbm_unplug_any_sb_raw()
1613 *nb_sb -= count; in virtio_mem_sbm_unplug_any_sb_raw()
1629 uint64_t nb_sb = vm->sbm.sbs_per_mb; in virtio_mem_sbm_unplug_mb() local
1631 return virtio_mem_sbm_unplug_any_sb_raw(vm, mb_id, &nb_sb); in virtio_mem_sbm_unplug_mb()
1667 unsigned long mb_id, uint64_t *nb_sb) in virtio_mem_sbm_plug_and_add_mb() argument
1669 const int count = min_t(int, *nb_sb, vm->sbm.sbs_per_mb); in virtio_mem_sbm_plug_and_add_mb()
1705 *nb_sb -= count; in virtio_mem_sbm_plug_and_add_mb()
1718 unsigned long mb_id, uint64_t *nb_sb) in virtio_mem_sbm_plug_any_sb() argument
1725 if (WARN_ON_ONCE(!*nb_sb)) in virtio_mem_sbm_plug_any_sb()
1728 while (*nb_sb) { in virtio_mem_sbm_plug_any_sb()
1733 while (count < *nb_sb && in virtio_mem_sbm_plug_any_sb()
1741 *nb_sb -= count; in virtio_mem_sbm_plug_any_sb()
1765 uint64_t nb_sb = diff / vm->sbm.sb_size; in virtio_mem_sbm_plug_request() local
1769 if (!nb_sb) in virtio_mem_sbm_plug_request()
1777 rc = virtio_mem_sbm_plug_any_sb(vm, mb_id, &nb_sb); in virtio_mem_sbm_plug_request()
1778 if (rc || !nb_sb) in virtio_mem_sbm_plug_request()
1795 rc = virtio_mem_sbm_plug_and_add_mb(vm, mb_id, &nb_sb); in virtio_mem_sbm_plug_request()
1796 if (rc || !nb_sb) in virtio_mem_sbm_plug_request()
1802 while (nb_sb) { in virtio_mem_sbm_plug_request()
1809 rc = virtio_mem_sbm_plug_and_add_mb(vm, mb_id, &nb_sb); in virtio_mem_sbm_plug_request()
1938 uint64_t *nb_sb) in virtio_mem_sbm_unplug_any_sb_offline() argument
1942 rc = virtio_mem_sbm_unplug_any_sb_raw(vm, mb_id, nb_sb); in virtio_mem_sbm_unplug_any_sb_offline()
2024 uint64_t *nb_sb) in virtio_mem_sbm_unplug_any_sb_online() argument
2029 if (*nb_sb >= vm->sbm.sbs_per_mb && in virtio_mem_sbm_unplug_any_sb_online()
2034 *nb_sb -= vm->sbm.sbs_per_mb; in virtio_mem_sbm_unplug_any_sb_online()
2041 for (sb_id = vm->sbm.sbs_per_mb - 1; sb_id >= 0 && *nb_sb; sb_id--) { in virtio_mem_sbm_unplug_any_sb_online()
2054 *nb_sb -= 1; in virtio_mem_sbm_unplug_any_sb_online()
2079 uint64_t *nb_sb) in virtio_mem_sbm_unplug_any_sb() argument
2088 return virtio_mem_sbm_unplug_any_sb_online(vm, mb_id, nb_sb); in virtio_mem_sbm_unplug_any_sb()
2091 return virtio_mem_sbm_unplug_any_sb_offline(vm, mb_id, nb_sb); in virtio_mem_sbm_unplug_any_sb()
2106 uint64_t nb_sb = diff / vm->sbm.sb_size; in virtio_mem_sbm_unplug_request() local
2110 if (!nb_sb) in virtio_mem_sbm_unplug_request()
2129 rc = virtio_mem_sbm_unplug_any_sb(vm, mb_id, &nb_sb); in virtio_mem_sbm_unplug_request()
2130 if (rc || !nb_sb) in virtio_mem_sbm_unplug_request()
2143 return nb_sb ? -EBUSY : 0; in virtio_mem_sbm_unplug_request()