diff mbox

[RFC,16/34] mb: cpu: Guard cpu_init definition for user mode

Message ID ebaab9e7c5c0273d59083547f6555aa958305aa7.1431322749.git.crosthwaite.peter@gmail.com
State New
Headers show

Commit Message

Peter Crosthwaite May 11, 2015, 6:29 a.m. UTC
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 <crosthwaite.peter@gmail.com>
---
 target-microblaze/cpu.h | 2 ++
 1 file changed, 2 insertions(+)
diff mbox

Patch

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