From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55265) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ebpuB-000529-R3 for qemu-devel@nongnu.org; Wed, 17 Jan 2018 10:45:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ebpuA-00085G-VV for qemu-devel@nongnu.org; Wed, 17 Jan 2018 10:45:35 -0500 Received: from mx1.redhat.com ([209.132.183.28]:47980) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ebpuA-00083o-OW for qemu-devel@nongnu.org; Wed, 17 Jan 2018 10:45:34 -0500 From: Igor Mammedov Date: Wed, 17 Jan 2018 16:43:21 +0100 Message-Id: <1516203816-19374-10-git-send-email-imammedo@redhat.com> In-Reply-To: <1516203816-19374-1-git-send-email-imammedo@redhat.com> References: <1516203816-19374-1-git-send-email-imammedo@redhat.com> Subject: [Qemu-devel] [PATCH 09/24] nios2: cpu: add TARGET_DEFAULT_CPU_TYPE macro List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Laurent Vivier , Chris Wulff , Marek Vasut it will be used for for 2 purposes, 1st is to provide to cpu name resolving class for machine 'none' cpu_parse_cpu_model(machine_class->default_cpu_type, cpu_model) and later to drop a bunch of ifdefs *-user/main.c that set default cpu_model. For the later default is set to bogus 'any', and nios2_cpu_class_by_name() always returns TYPE_NIOS2_CPU class regardless of cpu_model value. So use this type for default. Signed-off-by: Igor Mammedov --- CC: Chris Wulff CC: Marek Vasut --- target/nios2/cpu.h | 1 + 1 file changed, 1 insertion(+) diff --git a/target/nios2/cpu.h b/target/nios2/cpu.h index 88823a6..2d03958 100644 --- a/target/nios2/cpu.h +++ b/target/nios2/cpu.h @@ -232,6 +232,7 @@ void nios2_check_interrupts(CPUNios2State *env); #endif #define cpu_init(cpu_model) cpu_generic_init(TYPE_NIOS2_CPU, cpu_model) +#define TARGET_DEFAULT_CPU_TYPE TYPE_NIOS2_CPU #define cpu_gen_code cpu_nios2_gen_code #define cpu_signal_handler cpu_nios2_signal_handler -- 2.7.4