From 09f71b054a95161950a03fafc9023637929bd404 Mon Sep 17 00:00:00 2001 From: Igor Mammedov Date: Thu, 9 Jun 2016 19:11:02 +0200 Subject: arm: virt: Parse cpu_model only once Considering that features are converted to global properties and global properties are automatically applied to every new instance of created CPU (at object_new() time), there is no point in parsing cpu_model string every time a CPU created. So move parsing outside CPU creation loop and do it only once. Parsing also should be done before any CPU is created so that features would affect the first CPU a well. Signed-off-by: Igor Mammedov Reviewed-by: Peter Maydell Signed-off-by: Eduardo Habkost --- qom/cpu.c | 1 - 1 file changed, 1 deletion(-) (limited to 'qom/cpu.c') diff --git a/qom/cpu.c b/qom/cpu.c index 2a0d9fe..f884a66 100644 --- a/qom/cpu.c +++ b/qom/cpu.c @@ -296,7 +296,6 @@ static void cpu_common_parse_features(const char *typename, char *features, * call it only once, so we can remove this check (or change it * to assert(!cpu_globals_initialized). * Current callers of ->parse_features() are: - * - machvirt_init() * - cpu_generic_init() * - cpu_x86_create() */ -- cgit v1.1