qemu-devel
[Top][All Lists]
Advanced

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

[Qemu-devel] [RFC PATCH 16/34] mb: cpu: Guard cpu_init definition for us


From: Peter Crosthwaite
Subject: [Qemu-devel] [RFC PATCH 16/34] mb: cpu: Guard cpu_init definition for user mode
Date: Sun, 10 May 2015 23:29:19 -0700

cpu_init is only used by user-mode code. Don't define it for system
emulation. This prepares support for multi-arch as in multi-arch
system mode multiple cpu.h's from different archs may get included
together and this guards against a multiple def.

It also has the added bonus of no new system machine models being
able to use the legacy cpu_init() call.

Signed-off-by: Peter Crosthwaite <address@hidden>
---
 target-microblaze/cpu.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/target-microblaze/cpu.h b/target-microblaze/cpu.h
index bcaff1f..da42483 100644
--- a/target-microblaze/cpu.h
+++ b/target-microblaze/cpu.h
@@ -281,7 +281,9 @@ MicroBlazeCPU *cpu_mb_init(const char *cpu_model);
 #define TARGET_PHYS_ADDR_SPACE_BITS 48
 #define TARGET_VIRT_ADDR_SPACE_BITS 64
 
+#ifdef CONFIG_USER_ONLY
 #define cpu_init(cpu_model) CPU(cpu_mb_init(cpu_model))
+#endif
 
 /* MMU modes definitions */
 #define MMU_NOMMU_IDX   0
-- 
1.9.1




reply via email to

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