From: Peter Maydell <peter.maydell@linaro.org>
To: qemu-devel@nongnu.org
Cc: "Andreas Färber" <afaerber@suse.de>,
"Anthony Liguori" <aliguori@amazon.com>,
patches@linaro.org
Subject: [Qemu-devel] [PATCH v2 3/4] a9scu: Use qom_private to mark private fields
Date: Fri, 9 May 2014 16:56:03 +0100 [thread overview]
Message-ID: <1399650964-21067-4-git-send-email-peter.maydell@linaro.org> (raw)
In-Reply-To: <1399650964-21067-1-git-send-email-peter.maydell@linaro.org>
Use the new qom_private infrastructure to mark private fields
in the QOM device struct.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
hw/misc/a9scu.c | 2 ++
include/hw/misc/a9scu.h | 16 +++++++++++-----
2 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/hw/misc/a9scu.c b/hw/misc/a9scu.c
index 4434945..81587b6 100644
--- a/hw/misc/a9scu.c
+++ b/hw/misc/a9scu.c
@@ -8,6 +8,8 @@
* This code is licensed under the GPL.
*/
+#define IMPLEMENTING_A9_SCU
+
#include "hw/misc/a9scu.h"
static uint64_t a9_scu_read(void *opaque, hwaddr offset,
diff --git a/include/hw/misc/a9scu.h b/include/hw/misc/a9scu.h
index efb0c30..86dd21f 100644
--- a/include/hw/misc/a9scu.h
+++ b/include/hw/misc/a9scu.h
@@ -14,15 +14,21 @@
/* A9MP private memory region. */
+#ifdef IMPLEMENTING_A9_SCU
+#define qom_private
+#else
+#define qom_private QEMU_PRIVATE_ATTR
+#endif
+
typedef struct A9SCUState {
/*< private >*/
- SysBusDevice parent_obj;
+ qom_private SysBusDevice parent_obj;
/*< public >*/
- MemoryRegion iomem;
- uint32_t control;
- uint32_t status;
- uint32_t num_cpu;
+ qom_private MemoryRegion iomem;
+ qom_private uint32_t control;
+ qom_private uint32_t status;
+ qom_private uint32_t num_cpu;
} A9SCUState;
#define TYPE_A9_SCU "a9-scu"
--
1.9.2
next prev parent reply other threads:[~2014-05-09 16:09 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-09 15:56 [Qemu-devel] [PATCH v2 0/4] Allow QOM struct fields to be marked as private Peter Maydell
2014-05-09 15:56 ` [Qemu-devel] [PATCH v2 1/4] Provide infrastructure for marking private QOM struct fields Peter Maydell
2014-05-09 15:56 ` [Qemu-devel] [PATCH v2 2/4] arm_gic: Use new qom_private macro to mark private fields Peter Maydell
2014-05-09 15:56 ` Peter Maydell [this message]
2014-05-09 15:56 ` [Qemu-devel] [PATCH v2 4/4] arm11scu: Use qom_private " Peter Maydell
2014-05-23 11:13 ` [Qemu-devel] [PATCH v2 0/4] Allow QOM struct fields to be marked as private Peter Maydell
2014-05-23 11:23 ` Andreas Färber
2014-05-23 11:50 ` Peter Maydell
2014-05-23 14:33 ` Paolo Bonzini
2014-05-23 16:21 ` Peter Maydell
2014-05-23 17:13 ` Paolo Bonzini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1399650964-21067-4-git-send-email-peter.maydell@linaro.org \
--to=peter.maydell@linaro.org \
--cc=afaerber@suse.de \
--cc=aliguori@amazon.com \
--cc=patches@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).