edu.c (95a9457fd44ad97c518858a4e1586a5498f9773c) | edu.c (64a7b8de42aff54dce4d82585f25060a741531d1) |
---|---|
1/* 2 * QEMU educational PCI device 3 * 4 * Copyright (c) 2012-2015 Jiri Slaby 5 * 6 * Permission is hereby granted, free of charge, to any person obtaining a 7 * copy of this software and associated documentation files (the "Software"), 8 * to deal in the Software without restriction, including without limitation --- 382 unchanged lines hidden (view full) --- 391 392 qemu_cond_destroy(&edu->thr_cond); 393 qemu_mutex_destroy(&edu->thr_mutex); 394 395 timer_del(&edu->dma_timer); 396 msi_uninit(pdev); 397} 398 | 1/* 2 * QEMU educational PCI device 3 * 4 * Copyright (c) 2012-2015 Jiri Slaby 5 * 6 * Permission is hereby granted, free of charge, to any person obtaining a 7 * copy of this software and associated documentation files (the "Software"), 8 * to deal in the Software without restriction, including without limitation --- 382 unchanged lines hidden (view full) --- 391 392 qemu_cond_destroy(&edu->thr_cond); 393 qemu_mutex_destroy(&edu->thr_mutex); 394 395 timer_del(&edu->dma_timer); 396 msi_uninit(pdev); 397} 398 |
399static void edu_obj_uint64(Object *obj, Visitor *v, const char *name, 400 void *opaque, Error **errp) 401{ 402 uint64_t *val = opaque; 403 404 visit_type_uint64(v, name, val, errp); 405} 406 | |
407static void edu_instance_init(Object *obj) 408{ 409 EduState *edu = EDU(obj); 410 411 edu->dma_mask = (1UL << 28) - 1; | 399static void edu_instance_init(Object *obj) 400{ 401 EduState *edu = EDU(obj); 402 403 edu->dma_mask = (1UL << 28) - 1; |
412 object_property_add(obj, "dma_mask", "uint64", edu_obj_uint64, 413 edu_obj_uint64, NULL, &edu->dma_mask, NULL); | 404 object_property_add_uint64_ptr(obj, "dma_mask", 405 &edu->dma_mask, OBJ_PROP_FLAG_READWRITE, 406 NULL); |
414} 415 416static void edu_class_init(ObjectClass *class, void *data) 417{ 418 DeviceClass *dc = DEVICE_CLASS(class); 419 PCIDeviceClass *k = PCI_DEVICE_CLASS(class); 420 421 k->realize = pci_edu_realize; --- 26 unchanged lines hidden --- | 407} 408 409static void edu_class_init(ObjectClass *class, void *data) 410{ 411 DeviceClass *dc = DEVICE_CLASS(class); 412 PCIDeviceClass *k = PCI_DEVICE_CLASS(class); 413 414 k->realize = pci_edu_realize; --- 26 unchanged lines hidden --- |