Home
last modified time | relevance | path

Searched refs:DIV_ROUND_UP (Results 1 – 25 of 100) sorted by relevance

1234

/qemu/scripts/coccinelle/
H A Dround.cocci1 // 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 Dfifo32.h62 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 Dbitops.h21 #define BITS_TO_LONGS(nr) DIV_ROUND_UP(nr, BITS_PER_BYTE * sizeof(long))
22 #define BITS_TO_U32S(nr) DIV_ROUND_UP(nr, BITS_PER_BYTE * sizeof(uint32_t))
H A Dosdep.h497 #ifndef DIV_ROUND_UP
498 #define DIV_ROUND_UP(n, d) (((n) + (d) - 1) / (d)) macro
/qemu/target/i386/
H A Darch_dump.c21 ((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 Dmirror.c154 uint64_t self_end_chunk = DIV_ROUND_UP(offset + bytes, s->granularity); in mirror_wait_on_conflicts()
165 uint64_t op_nb_chunks = DIV_ROUND_UP(op->offset + op->bytes, in mirror_wait_on_conflicts()
220 nb_chunks = DIV_ROUND_UP(op->bytes, s->granularity); in mirror_iteration_done()
379 nb_chunks = DIV_ROUND_UP(op->bytes, s->granularity); in mirror_co_read()
424 unsigned long end = DIV_ROUND_UP(op->offset + op->bytes, in mirror_co_zero()
441 DIV_ROUND_UP(op->bytes, op->s->granularity)); in mirror_co_zero()
485 DIV_ROUND_UP(bytes, s->granularity)); in mirror_perform()
496 DIV_ROUND_UP(bytes, s->granularity)); in mirror_perform()
662 nb_chunks -= DIV_ROUND_UP(io_bytes, s->granularity); in mirror_iteration()
890 int64_t bitmap_length = DIV_ROUND_UP(s->bdev_length, s->granularity); in mirror_dirty_init()
[all …]
H A Dparallels.c219 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()
1365 bitmap_new(DIV_ROUND_UP(s->header_size, s->bat_dirty_block)); in parallels_open()
H A Dblkdebug.c701 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 Dqed-check.c241 DIV_ROUND_UP(s->header.image_size, s->header.cluster_size); in qed_check()
/qemu/dump/
H A Ddump.c51 ((DIV_ROUND_UP((hdr_size), 4) + \
52 DIV_ROUND_UP((name_size), 4) + \
53 DIV_ROUND_UP((desc_size), 4)) * 4)
985 sub_hdr_size = DIV_ROUND_UP(sub_hdr_size, block_size); in create_header32()
990 bitmap_blocks = DIV_ROUND_UP(s->len_dump_bitmap, block_size) * 2; in create_header32()
1031 (DIV_ROUND_UP(hsize, 4) + DIV_ROUND_UP(name_size, 4)) * 4; in create_header32()
1096 sub_hdr_size = DIV_ROUND_UP(sub_hdr_size, block_size); in create_header64()
1101 bitmap_blocks = DIV_ROUND_UP(s->len_dump_bitmap, block_size) * 2; in create_header64()
1142 (DIV_ROUND_UP(hsize, 4) + DIV_ROUND_UP(name_size, 4)) * 4; in create_header64()
1924 tmp = DIV_ROUND_UP(DIV_ROUND_UP(s->max_mapnr, CHAR_BIT), in dump_init()
/qemu/include/hw/intc/
H A Dallwinner-a10-pic.h21 #define AW_A10_PIC_REG_NUM DIV_ROUND_UP(AW_A10_PIC_INT_NR, 32)
H A Darm_gicv3_common.h268 uint32_t gicd_nsacr[DIV_ROUND_UP(GICV3_MAXIRQ, 16)];
/qemu/hw/pci-bridge/
H A Dcxl_upstream.c154 DIV_ROUND_UP(sizeof(CDATReq), sizeof(uint32_t))) { in cxl_doe_cdat_rsp()
167 .length = DIV_ROUND_UP((sizeof(rsp) + len), sizeof(uint32_t)), in cxl_doe_cdat_rsp()
176 memcpy(doe_cap->read_mbox + DIV_ROUND_UP(sizeof(rsp), sizeof(uint32_t)), in cxl_doe_cdat_rsp()
/qemu/hw/usb/
H A Ddev-hub.c120 .wMaxPacketSize = 1 + DIV_ROUND_UP(MAX_PORTS, 8),
501 limit = DIV_ROUND_UP(s->num_ports + 1, 8) + 7; in usb_hub_handle_control()
508 limit = limit + DIV_ROUND_UP(s->num_ports, 8); in usb_hub_handle_control()
536 n = DIV_ROUND_UP(s->num_ports + 1, 8); in usb_hub_handle_data()
/qemu/include/ui/
H A Dsurface.h90 return DIV_ROUND_UP(bits, 8); in surface_bytes_per_pixel()
H A Dpixman-minimal.h176 width * DIV_ROUND_UP(PIXMAN_FORMAT_BPP(format), 8); in pixman_image_create_bits()
/qemu/hw/misc/
H A Dunimp.c66 s->offset_fmt_width = DIV_ROUND_UP(64 - clz64(s->size - 1), 4); in unimp_realize()
/qemu/monitor/
H A Dhmp-cmds-target.c152 max_digits = DIV_ROUND_UP(wsize * 8, 3); in memory_dump()
160 max_digits = DIV_ROUND_UP(wsize * 8 * 10, 33); in memory_dump()
/qemu/hw/pci/
H A Dpcie_doe.c45 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/hw/vfio/
H A Dmigration.c130 uint64_t buf[DIV_ROUND_UP(sizeof(struct vfio_device_feature) + in vfio_migration_set_state()
307 uint64_t buf[DIV_ROUND_UP(sizeof(struct vfio_device_feature) + in vfio_query_stop_copy_size()
935 uint64_t buf[DIV_ROUND_UP(sizeof(struct vfio_device_feature) + in vfio_migration_query_flags()
955 uint64_t buf[DIV_ROUND_UP(sizeof(struct vfio_device_feature), in vfio_dma_logging_supported()
/qemu/hw/openrisc/
H A Dcputimer.c60 DIV_ROUND_UP(now - or1k_timer->clk_offset, TIMER_PERIOD); in cpu_openrisc_count_update()
/qemu/hw/char/
H A Dvirtio-serial-bus.c680 for (i = 0; i < DIV_ROUND_UP(max_nr_ports, 32); i++) { in virtio_serial_save_device()
814 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 Dloongson3_bootp.c43 c->total_node = cpu_to_le32(DIV_ROUND_UP(cpu_count, in init_cpu_info()
/qemu/hw/audio/
H A Dpcspk.c41 #define PCSPK_MIN_COUNT DIV_ROUND_UP(PIT_FREQ, PCSPK_MAX_FREQ)
/qemu/ui/
H A Dcursor.c128 return DIV_ROUND_UP(c->width, 8); in cursor_get_mono_bpl()

1234