/qemu/scripts/coccinelle/ |
H A D | round.cocci | 1 // Use macro DIV_ROUND_UP instead of (((n) + (d) - 1) /(d)) 8 + DIV_ROUND_UP(e1,e2) 11 + DIV_ROUND_UP(e1,e2) 18 -(DIV_ROUND_UP(e1,e2)) 19 +DIV_ROUND_UP(e1,e2)
|
/qemu/include/qemu/ |
H A D | fifo32.h | 62 return DIV_ROUND_UP(fifo8_num_free(&fifo->fifo), sizeof(uint32_t)); in fifo32_num_free() 76 return DIV_ROUND_UP(fifo8_num_used(&fifo->fifo), sizeof(uint32_t)); in fifo32_num_used()
|
H A D | osdep.h | 489 #ifndef DIV_ROUND_UP 490 #define DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d)) macro
|
/qemu/target/i386/ |
H A D | arch_dump.c | 21 ((DIV_ROUND_UP((hdr_size), 4) \ 22 + DIV_ROUND_UP((name_size), 4) \ 23 + DIV_ROUND_UP((desc_size), 4)) * 4) 352 note_size = (DIV_ROUND_UP(note_head_size, 4) + DIV_ROUND_UP(name_size, 4) + in cpu_write_qemu_note() 353 DIV_ROUND_UP(descsz, 4)) * 4; in cpu_write_qemu_note()
|
/qemu/block/ |
H A D | parallels.c | 219 s->used_bmap_size = DIV_ROUND_UP(payload_bytes, s->cluster_size); in parallels_fill_used_bitmap() 264 to_allocate = DIV_ROUND_UP(sector_num + *pnum, s->tracks) - idx; in allocate_clusters() 390 unsigned long size = DIV_ROUND_UP(s->header_size, s->bat_dirty_block); in parallels_co_flush_to_os() 634 min_off = DIV_ROUND_UP(bat_entry_off(s->bat_size), BDRV_SECTOR_SIZE); in parallels_test_data_off() 757 count = DIV_ROUND_UP(size - res->image_end_offset, s->cluster_size); in parallels_check_leak() 1054 bat_entries = DIV_ROUND_UP(total_size, cl_size); in parallels_co_create() 1055 bat_sectors = DIV_ROUND_UP(bat_entry_off(bat_entries), cl_size); in parallels_co_create() 1067 header.nb_sectors = cpu_to_le64(DIV_ROUND_UP(total_size, BDRV_SECTOR_SIZE)); in parallels_co_create() 1361 bitmap_new(DIV_ROUND_UP(s->header_size, s->bat_dirty_block)); in parallels_open()
|
H A D | mirror.c | 150 uint64_t self_end_chunk = DIV_ROUND_UP(offset + bytes, s->granularity); in mirror_wait_on_conflicts() 161 uint64_t op_nb_chunks = DIV_ROUND_UP(op->offset + op->bytes, in mirror_wait_on_conflicts() 216 nb_chunks = DIV_ROUND_UP(op->bytes, s->granularity); in mirror_iteration_done() 375 nb_chunks = DIV_ROUND_UP(op->bytes, s->granularity); in mirror_co_read() 622 nb_chunks -= DIV_ROUND_UP(io_bytes, s->granularity); in mirror_iteration() 991 length = DIV_ROUND_UP(s->bdev_length, s->granularity); in mirror_run() 1454 uint64_t end_chunk = DIV_ROUND_UP(offset + bytes, s->granularity); in active_write_prepare() 1493 uint64_t end_chunk = DIV_ROUND_UP(op->offset + op->bytes, in active_write_settle()
|
H A D | blkdebug.c | 701 DIV_ROUND_UP(offset, align) == in blkdebug_co_pwrite_zeroes() 702 DIV_ROUND_UP(offset + bytes, align)); in blkdebug_co_pwrite_zeroes() 731 DIV_ROUND_UP(offset, align) == in blkdebug_co_pdiscard() 732 DIV_ROUND_UP(offset + bytes, align)); in blkdebug_co_pdiscard()
|
H A D | qed-check.c | 241 DIV_ROUND_UP(s->header.image_size, s->header.cluster_size); in qed_check()
|
H A D | qcow2-bitmap.c | 154 int64_t num_bits = DIV_ROUND_UP(len, granularity); in get_bitmap_bytes_needed() 156 return DIV_ROUND_UP(num_bits, 8); in get_bitmap_bytes_needed() 1310 assert(DIV_ROUND_UP(bm_size, limit) == tb_size); in store_bitmap_data() 1795 uint64_t bmclusters = DIV_ROUND_UP(bmbytes, cluster_size); in qcow2_get_persistent_dirty_bitmap_size()
|
/qemu/dump/ |
H A D | dump.c | 50 ((DIV_ROUND_UP((hdr_size), 4) + \ 51 DIV_ROUND_UP((name_size), 4) + \ 52 DIV_ROUND_UP((desc_size), 4)) * 4) 981 sub_hdr_size = DIV_ROUND_UP(sub_hdr_size, block_size); in create_header32() 986 bitmap_blocks = DIV_ROUND_UP(s->len_dump_bitmap, block_size) * 2; in create_header32() 1027 (DIV_ROUND_UP(hsize, 4) + DIV_ROUND_UP(name_size, 4)) * 4; in create_header32() 1092 sub_hdr_size = DIV_ROUND_UP(sub_hdr_size, block_size); in create_header64() 1097 bitmap_blocks = DIV_ROUND_UP(s->len_dump_bitmap, block_size) * 2; in create_header64() 1138 (DIV_ROUND_UP(hsize, 4) + DIV_ROUND_UP(name_size, 4)) * 4; in create_header64() 1920 tmp = DIV_ROUND_UP(DIV_ROUND_UP(s->max_mapnr, CHAR_BIT), in dump_init()
|
/qemu/hw/pci-bridge/ |
H A D | cxl_upstream.c | 152 DIV_ROUND_UP(sizeof(CDATReq), sizeof(uint32_t))) { in cxl_doe_cdat_rsp() 165 .length = DIV_ROUND_UP((sizeof(rsp) + len), sizeof(uint32_t)), in cxl_doe_cdat_rsp() 174 memcpy(doe_cap->read_mbox + DIV_ROUND_UP(sizeof(rsp), sizeof(uint32_t)), in cxl_doe_cdat_rsp()
|
/qemu/include/hw/intc/ |
H A D | arm_gicv3_common.h | 68 #define GICV3_BMP_SIZE DIV_ROUND_UP(GICV3_MAXIRQ, 32) 294 uint32_t gicd_nsacr[DIV_ROUND_UP(GICV3_MAXIRQ, 16)];
|
H A D | allwinner-a10-pic.h | 21 #define AW_A10_PIC_REG_NUM DIV_ROUND_UP(AW_A10_PIC_INT_NR, 32)
|
/qemu/hw/usb/ |
H A D | dev-hub.c | 120 .wMaxPacketSize = 1 + DIV_ROUND_UP(MAX_PORTS, 8), 500 limit = DIV_ROUND_UP(s->num_ports + 1, 8) + 7; in usb_hub_handle_control() 507 limit = limit + DIV_ROUND_UP(s->num_ports, 8); in usb_hub_handle_control() 535 n = DIV_ROUND_UP(s->num_ports + 1, 8); in usb_hub_handle_data()
|
/qemu/include/ui/ |
H A D | surface.h | 92 return DIV_ROUND_UP(bits, 8); in surface_bytes_per_pixel()
|
H A D | pixman-minimal.h | 176 width * DIV_ROUND_UP(PIXMAN_FORMAT_BPP(format), 8); in pixman_image_create_bits()
|
/qemu/hw/misc/ |
H A D | unimp.c | 66 s->offset_fmt_width = DIV_ROUND_UP(64 - clz64(s->size - 1), 4); in unimp_realize()
|
/qemu/hw/vfio/ |
H A D | migration.c | 145 uint64_t buf[DIV_ROUND_UP(sizeof(struct vfio_device_feature) + in vfio_migration_set_state() 321 uint64_t buf[DIV_ROUND_UP(sizeof(struct vfio_device_feature) + in vfio_query_stop_copy_size() 881 uint64_t buf[DIV_ROUND_UP(sizeof(struct vfio_device_feature) + in vfio_migration_query_flags() 901 uint64_t buf[DIV_ROUND_UP(sizeof(struct vfio_device_feature), in vfio_dma_logging_supported()
|
/qemu/hw/pci/ |
H A D | pcie_doe.c | 45 DIV_ROUND_UP(sizeof(DoeDiscoveryReq), DWORD_BYTE)) { in pcie_doe_discovery() 52 .length = DIV_ROUND_UP(sizeof(DoeDiscoveryRsp), DWORD_BYTE), in pcie_doe_discovery()
|
/qemu/monitor/ |
H A D | hmp-cmds-target.c | 151 max_digits = DIV_ROUND_UP(wsize * 8, 3); in memory_dump() 159 max_digits = DIV_ROUND_UP(wsize * 8 * 10, 33); in memory_dump()
|
/qemu/hw/block/ |
H A D | tc58128.c | 75 blocks = DIV_ROUND_UP(ret, 528 * 32); in init_dev()
|
/qemu/hw/char/ |
H A D | virtio-serial-bus.c | 679 for (i = 0; i < DIV_ROUND_UP(max_nr_ports, 32); i++) { in virtio_serial_save_device() 813 for (i = 0; i < DIV_ROUND_UP(max_nr_ports, 32); i++) { in virtio_serial_load_device() 874 for (i = 0; i < DIV_ROUND_UP(max_nr_ports, 32); i++) { in find_free_port_id() 1083 vser->ports_map = g_malloc0((DIV_ROUND_UP(vser->serial.max_virtserial_ports, 32)) in virtio_serial_device_realize()
|
/qemu/hw/mips/ |
H A D | loongson3_bootp.c | 44 c->total_node = cpu_to_le32(DIV_ROUND_UP(current_machine->smp.cpus, in init_cpu_info()
|
/qemu/hw/audio/ |
H A D | pcspk.c | 41 #define PCSPK_MIN_COUNT DIV_ROUND_UP(PIT_FREQ, PCSPK_MAX_FREQ)
|
/qemu/block/export/ |
H A D | fuse.c | 422 allocated_blocks = DIV_ROUND_UP(length, 512); in fuse_getattr() 424 allocated_blocks = DIV_ROUND_UP(allocated_blocks, 512); in fuse_getattr()
|