From patchwork Tue Dec 8 22:56:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair Francis X-Patchwork-Id: 11960023 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.5 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 1DD6DC433FE for ; Tue, 8 Dec 2020 23:19:46 +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 82FB5238E5 for ; Tue, 8 Dec 2020 23:19:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 82FB5238E5 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=wdc.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Received: from localhost ([::1]:47910 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kmmGm-0003QT-0x for qemu-devel@archiver.kernel.org; Tue, 08 Dec 2020 18:19:44 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:39720) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kmluB-0007xF-OU; Tue, 08 Dec 2020 17:56:23 -0500 Received: from esa3.hgst.iphmx.com ([216.71.153.141]:57377) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kmluA-0004Cc-0z; Tue, 08 Dec 2020 17:56:23 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1607468181; x=1639004181; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=CTGEz6Ggv50vIsVjqVuctj/ddtwSeDBjNyqazv0Kae8=; b=GAtKn3Avst74vsYNXxZ8clHJqqMCiXKkJ6qiMKqO7w0/zLFqX39L0T0M f9BomCqesYglAhC6quHxSFGCPyFVKtQqVmgLrs8vwkqO7dAM+bnPHLH0e qrl7fgw5qFsQocSyaHnk+CqXbke1jNy3K2q0w7Ax8q+XUSQYPbj/gXiHv 34qxD7TQjAqfaYl8ugZrin9TI4t6b1BMuCQFogaqclggosRGUQ2wn5xhn 3sxYL1rHisiXZcPrB7cwUCoXdt2UaS+bbjJCAqrFcKuPq/v8WACr2O03c Bg8RpSQiVYC4BzB9+joYnp8Q6IXvjlV1Lw+uiFiNsg9Voqvm1Xlf0LGbP Q==; IronPort-SDR: NNzBVLYB0tqs/q8yK/NVdZrJVPfYaYEqrBZIYv1KCJBaA+fTdAFtwGFnpR0zouJgM5pw8k8coj x1GsNX87cGtzFRiYn844PlWH9q/Lf9vD8gs+8TDqkaqUO4yd7Hk2+B8q0aFLxx8wIli8QMUkUS usLxvSfsazapFOG9wTDuaCo69Y/jHrVoQMy6q+VcE+SWga6K9ugmOGmd0FTcuMC50fNQClenaC EkWuV2W4SSa9pPNH1Cn3KJmRhTHFNiEdSCnK3Awl7pJ+TmyqJUCBxHX9boTfl3Mz2lW9CWN0nI qOk= X-IronPort-AV: E=Sophos;i="5.78,404,1599494400"; d="scan'208";a="159184101" Received: from h199-255-45-15.hgst.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 09 Dec 2020 06:56:20 +0800 IronPort-SDR: MJ58YaxzVVh9CmCuxcgopA0zZz2alzacjMkiAdjlRykubt283MITpyJBusqkFZybkirrR2Tc79 by5UYWBmh4eIm/a3uohX4sdzADchdm0sk= Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Dec 2020 14:40:20 -0800 IronPort-SDR: TyaGz7zgoYBzgLgAfVtTpKpSdxC5Whaj6/aWX539Jw9eoeOnwW5eZWlsckCuuXjV6dlgf8hx1t MugyxG9VfOoA== WDCIronportException: Internal Received: from usa001386.ad.shared (HELO risc6-mainframe.hgst.com) ([10.86.61.239]) by uls-op-cesaip01.wdc.com with ESMTP; 08 Dec 2020 14:56:20 -0800 From: Alistair Francis To: qemu-devel@nongnu.org, qemu-riscv@nongnu.org Subject: [PATCH v2 04/15] riscv: virt: Remove target macro conditionals Date: Tue, 8 Dec 2020 14:56:19 -0800 Message-Id: X-Mailer: git-send-email 2.29.2 In-Reply-To: References: MIME-Version: 1.0 Received-SPF: pass client-ip=216.71.153.141; envelope-from=prvs=6040d5def=alistair.francis@wdc.com; helo=esa3.hgst.iphmx.com X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham 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: alistair.francis@wdc.com, bmeng.cn@gmail.com, palmer@dabbelt.com, alistair23@gmail.com Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" Signed-off-by: Alistair Francis Reviewed-by: Bin Meng Tested-by: Bin Meng --- include/hw/riscv/virt.h | 6 ------ hw/riscv/virt.c | 2 +- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/include/hw/riscv/virt.h b/include/hw/riscv/virt.h index b4ed9a32eb..84b7a3848f 100644 --- a/include/hw/riscv/virt.h +++ b/include/hw/riscv/virt.h @@ -89,10 +89,4 @@ enum { #define FDT_INT_MAP_WIDTH (FDT_PCI_ADDR_CELLS + FDT_PCI_INT_CELLS + 1 + \ FDT_PLIC_ADDR_CELLS + FDT_PLIC_INT_CELLS) -#if defined(TARGET_RISCV32) -#define VIRT_CPU TYPE_RISCV_CPU_BASE32 -#elif defined(TARGET_RISCV64) -#define VIRT_CPU TYPE_RISCV_CPU_BASE64 -#endif - #endif diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c index 25cea7aa67..995e1c35f1 100644 --- a/hw/riscv/virt.c +++ b/hw/riscv/virt.c @@ -706,7 +706,7 @@ static void virt_machine_class_init(ObjectClass *oc, void *data) mc->desc = "RISC-V VirtIO board"; mc->init = virt_machine_init; mc->max_cpus = VIRT_CPUS_MAX; - mc->default_cpu_type = VIRT_CPU; + mc->default_cpu_type = TYPE_RISCV_CPU_BASE; mc->pci_allow_0_address = true; mc->possible_cpu_arch_ids = riscv_numa_possible_cpu_arch_ids; mc->cpu_index_to_instance_props = riscv_numa_cpu_index_to_props;