qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 26/29] ide: qidl_declare BMDMAState + PCIIDEState


From: Michael Roth
Subject: [Qemu-devel] [PATCH 26/29] ide: qidl_declare BMDMAState + PCIIDEState
Date: Thu, 1 Nov 2012 08:04:28 -0500

Signed-off-by: Michael Roth <address@hidden>
---
 hw/ide/pci.h |   28 ++++++++++++++++------------
 1 file changed, 16 insertions(+), 12 deletions(-)

diff --git a/hw/ide/pci.h b/hw/ide/pci.h
index a694e54..b54ea26 100644
--- a/hw/ide/pci.h
+++ b/hw/ide/pci.h
@@ -2,33 +2,36 @@
 #define HW_IDE_PCI_H
 
 #include <hw/ide/internal.h>
+#include "qidl.h"
 
-typedef struct BMDMAState {
-    IDEDMA dma;
+typedef struct BMDMAState BMDMAState;
+
+QIDL_DECLARE_PUBLIC(BMDMAState) {
+    IDEDMA q_immutable dma;
     uint8_t cmd;
     uint8_t status;
     uint32_t addr;
 
-    IDEBus *bus;
+    IDEBus q_elsewhere *bus; /* via parent's corresponding bus */
     /* current transfer state */
     uint32_t cur_addr;
     uint32_t cur_prd_last;
     uint32_t cur_prd_addr;
     uint32_t cur_prd_len;
     uint8_t unit;
-    BlockDriverCompletionFunc *dma_cb;
+    BlockDriverCompletionFunc q_immutable *dma_cb;
     int64_t sector_num;
     uint32_t nsector;
     MemoryRegion addr_ioport;
     MemoryRegion extra_io;
-    QEMUBH *bh;
+    QEMUBH q_immutable *bh;
     qemu_irq irq;
 
     /* Bit 0-2 and 7:   BM status register
      * Bit 3-6:         bus->error_status */
     uint8_t migration_compat_status;
-    struct PCIIDEState *pci_dev;
-} BMDMAState;
+    struct PCIIDEState q_elsewhere *pci_dev; /* via parent */
+};
 
 typedef struct CMD646BAR {
     MemoryRegion cmd;
@@ -37,15 +40,16 @@ typedef struct CMD646BAR {
     struct PCIIDEState *pci_dev;
 } CMD646BAR;
 
-typedef struct PCIIDEState {
+typedef struct PCIIDEState PCIIDEState;
+
+QIDL_DECLARE_PUBLIC(PCIIDEState) {
     PCIDevice dev;
     IDEBus bus[2];
     BMDMAState bmdma[2];
-    uint32_t secondary; /* used only for cmd646 */
+    uint32_t q_immutable secondary; /* used only for cmd646 */
     MemoryRegion bmdma_bar;
-    CMD646BAR cmd646_bar[2]; /* used only for cmd646 */
-} PCIIDEState;
-
+    CMD646BAR q_immutable cmd646_bar[2]; /* used only for cmd646 */
+};
 
 static inline IDEState *bmdma_active_if(BMDMAState *bmdma)
 {
-- 
1.7.9.5




reply via email to

[Prev in Thread] Current Thread [Next in Thread]