From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:49869) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WinMi-0002cq-No for qemu-devel@nongnu.org; Fri, 09 May 2014 12:09:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WinMh-0003NH-TD for qemu-devel@nongnu.org; Fri, 09 May 2014 12:09:40 -0400 Received: from mnementh.archaic.org.uk ([2001:8b0:1d0::1]:48110) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WinMh-0003N0-NK for qemu-devel@nongnu.org; Fri, 09 May 2014 12:09:39 -0400 From: Peter Maydell Date: Fri, 9 May 2014 16:56:03 +0100 Message-Id: <1399650964-21067-4-git-send-email-peter.maydell@linaro.org> In-Reply-To: <1399650964-21067-1-git-send-email-peter.maydell@linaro.org> References: <1399650964-21067-1-git-send-email-peter.maydell@linaro.org> Subject: [Qemu-devel] [PATCH v2 3/4] a9scu: Use qom_private to mark private fields List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Andreas=20F=C3=A4rber?= , Anthony Liguori , patches@linaro.org Use the new qom_private infrastructure to mark private fields in the QOM device struct. Signed-off-by: Peter Maydell --- 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