From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B1288C433DB for ; Mon, 4 Jan 2021 22:22:01 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6C01922518 for ; Mon, 4 Jan 2021 22:22:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6C01922518 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=amsat.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:39804 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kwYEh-00071r-5b for qemu-devel@archiver.kernel.org; Mon, 04 Jan 2021 17:21:59 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:41972) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kwY5T-0006cH-Vt for qemu-devel@nongnu.org; Mon, 04 Jan 2021 17:12:28 -0500 Received: from mail-wm1-x331.google.com ([2a00:1450:4864:20::331]:40635) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kwY5R-0007tX-GR for qemu-devel@nongnu.org; Mon, 04 Jan 2021 17:12:26 -0500 Received: by mail-wm1-x331.google.com with SMTP id r4so633681wmh.5 for ; Mon, 04 Jan 2021 14:12:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=DwLakVX9UEsAH+MmXq72YbVgXyrXxgRV9mVJnolEV3k=; b=Gmi94JhBkJXrVi0c/wi1jjurTWq1ybMc3PfRGPvjqZGeA88mzEBZ8Bp+ZvYFjAkmjV pm84gSTq4o6pG/1lTesmqZnUDekfh5VhAkY4TlPDIwTGC5WeTYucoEfwjVo3NwB6FBpO c3Hm9LLPkvWasM0mL2D+4x7yj3iV7vb914ZAlJ1DXYthZbzrfpeqCJUBSepkjc2EVqtd sBDXBPDgy3qRnOD1jaT0OXcnGISrTsw7jTiQ2H3yyngmtf7ZqRbQZHIAbh+nLxoKcV7p GgVZooE2mfQHNVpyV8m80QEJmZgXnGGPT253na5zu0MbhS/O0ty+G8FkLCNndfMwQe6Z NPmQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=DwLakVX9UEsAH+MmXq72YbVgXyrXxgRV9mVJnolEV3k=; b=rqu29qfCELYMpaqHxLvcaBhucGhNnAjqdLRa6+8HKyJSRhQX9Mc/5NyYfanaULpgV3 HotLogAnOTbjeNJbJ+lrLgzkwpDCTjft0MeptpimOfkg8Hqss9lfk9uA5Qkbvaj1VEO+ 4ZlCcS5RRIHTYevaVGLhN6VlhdHSS/4RrG3rjuxjGXew6NE7nXCMEjpRfIIuDvio/q1v D9epzVchX8ExQ9qch8haLplQseCdULCRsa/J2zMrD5khUTZbmRIMwfBMond2rx09hb9O mqcw5zqdSY7p4eX5aYlQLbmuNQKRz0ZpKzhLxjutJYpmcjBbSeI8ftoc23I4dFVHFSHE Jpsg== X-Gm-Message-State: AOAM531Yiecfxn3ioYfOwh5BXvSMakIh6XFK3vOZZh8wp/2Q39NE9F1I kczih/tEVph1veAjyqG1dxvxt4T9jzQ= X-Google-Smtp-Source: ABdhPJwIK4BbFoJSoDNkYMQ+vRP1jUMVACf3J2HYogGdJlUZV83i0q2BZQ96oYsRigUS2VsRcWoAZA== X-Received: by 2002:a7b:cb93:: with SMTP id m19mr809192wmi.45.1609798344054; Mon, 04 Jan 2021 14:12:24 -0800 (PST) Received: from x1w.redhat.com (241.red-88-10-103.dynamicip.rima-tde.net. [88.10.103.241]) by smtp.gmail.com with ESMTPSA id 189sm1164064wma.22.2021.01.04.14.12.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Jan 2021 14:12:23 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PATCH v3 05/15] hw/mips/boston: Check 64-bit support with cpu_type_is_64bit() Date: Mon, 4 Jan 2021 23:11:44 +0100 Message-Id: <20210104221154.3127610-6-f4bug@amsat.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210104221154.3127610-1-f4bug@amsat.org> References: <20210104221154.3127610-1-f4bug@amsat.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2a00:1450:4864:20::331; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wm1-x331.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.248, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.248, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Aleksandar Rikalo , Paul Burton , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Aurelien Jarno Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Directly check if the CPU supports 64-bit with the recently added cpu_type_is_64bit() helper (inlined). Signed-off-by: Philippe Mathieu-Daudé --- hw/mips/boston.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/hw/mips/boston.c b/hw/mips/boston.c index c3b94c68e1b..467fbc1c8be 100644 --- a/hw/mips/boston.c +++ b/hw/mips/boston.c @@ -444,7 +444,6 @@ static void boston_mach_init(MachineState *machine) DriveInfo *hd[6]; Chardev *chr; int fw_size, fit_err; - bool is_64b; if ((machine->ram_size % GiB) || (machine->ram_size > (2 * GiB))) { @@ -463,8 +462,6 @@ static void boston_mach_init(MachineState *machine) exit(1); } - is_64b = cpu_type_supports_isa(machine->cpu_type, ISA_MIPS64); - object_initialize_child(OBJECT(machine), "cps", &s->cps, TYPE_MIPS_CPS); object_property_set_str(OBJECT(&s->cps), "cpu-type", machine->cpu_type, &error_fatal); @@ -545,7 +542,8 @@ static void boston_mach_init(MachineState *machine) } gen_firmware(memory_region_get_ram_ptr(flash) + 0x7c00000, - s->kernel_entry, s->fdt_base, is_64b); + s->kernel_entry, s->fdt_base, + cpu_type_is_64bit(machine->cpu_type)); } else if (!qtest_enabled()) { error_report("Please provide either a -kernel or -bios argument"); exit(1); -- 2.26.2