From patchwork Mon Dec 14 20:34:07 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alistair Francis X-Patchwork-Id: 11973027 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 4E738C4361B for ; Mon, 14 Dec 2020 20:37: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 E45E2222BB for ; Mon, 14 Dec 2020 20:37:45 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E45E2222BB 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]:32792 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1koubI-00063x-Tc for qemu-devel@archiver.kernel.org; Mon, 14 Dec 2020 15:37:44 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:46732) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kouXr-0000qS-7M; Mon, 14 Dec 2020 15:34:11 -0500 Received: from esa6.hgst.iphmx.com ([216.71.154.45]:42393) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kouXp-0007tb-CD; Mon, 14 Dec 2020 15:34:10 -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=1607978049; x=1639514049; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=CTGEz6Ggv50vIsVjqVuctj/ddtwSeDBjNyqazv0Kae8=; b=T34nF4OeEiP7THbRLwFpEAkheqKR7WitQkIfpx0SYLiQ7UQH5EzZkwxm FiQfrRXnPfB5PBJdxKX339YnUPRxcBEIorEzM/iYlB5fKlmWIAh5j4/qd zMTQNIkq6hxMtcj91RlzbK5rh4Lj0s1qJz0nzqoqJNxcFZ2ZgD8iVlpT1 lo6xP+29MMg83l7/PvvrpXX5lpO1pzGUPfUsLmUF5Blv3VNkWrMdxdsyM QZPFFuH2DyAyHRh9tZ0dTWExkjdZgMOpcez0Gqir2V8z8CuusWL23ykll OA88iyoA26rjDs/41y8NpvdHnaujl1fOnQkdyLmgDqM1fmEYBlPesDkOW Q==; IronPort-SDR: T23XvT1F6henFwrQxD0aTDxSbfj9/1bxjDngnVGtc5mm9SVMeiE6aGJQ2IjyN+/fBBUTlosFQp +aWUSbGtKlNbZNYps2YGy9tQZzhXmQUqaUcnjzHqR+k4TBPVKB1o1xkYhp3J0Rnakj0anrhJnW lT9/0b7fqCOpWBAFwccwozZyPKIQrpLuo9lCe4870gwg2r8QDWQIEL2DUzUMZLKJikVX+aG0bv qaWLWpDD8i9UkgdUUWKsn1FPRfxhoYqdd4cS+7C1CS8dEnhcya8SQIEfJhO4gyEfzs+K/hU4Y6 g7U= X-IronPort-AV: E=Sophos;i="5.78,420,1599494400"; d="scan'208";a="156338119" Received: from uls-op-cesaip02.wdc.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 15 Dec 2020 04:34:08 +0800 IronPort-SDR: deyaYdHMeHeHoY9Y5YNost2NVb8Rz4+/bHQq7ZphpLqiM7/4MqeEpsTdEoV8OwhxQa2GpDBlMo dYYfsEThZi2J6eb/KPtDUyh5h5kIiPUPF1as/bAhSXqxxq/0tLpClfTAjYEtZeZdU+oDWeM7hS qVQaEbgI0ZXXbgVCpkWLXAV5rmxYcNoc9Nu4I634DNL9/7H2lN71qNmzDNPPfvKA9PdcWqqCcK 2lBd4Y9BObU/4SIThCuc2JdiIHdM1TCGe2OlnEur9wwtSEWpIWmTBc2xYscC32eI2kOJpSau8c hESQkh5Nwj4qgSgerwPAhGAt Received: from uls-op-cesaip02.wdc.com ([10.248.3.37]) by uls-op-cesaep02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Dec 2020 12:17:51 -0800 IronPort-SDR: 5VNRjjsCFGULiAhh66H855ZHzf3aU1/SbyuJTa1QMBDkWZnH7n9RzbftazsT3niovKj/5I6rli IP5HHR4BpQ7F9Q9aOFJ7+XJuCj+jIaWI+1n+b1efcSHvHKN58O9apGT54PXdEKXlkt4DU/DJJV P9w9xVy4TeZHpZdtXMXaY+qXpevxKlHgTaIMzGUNJH+7BfVo+6bL1xqEFxpUHdSu0NeOpHkSni 0aPUt0P070jd7Nm0zSrEurrjr36AYTfvFhwOzDcKpW0BOHS/nu9+62g4ENdZSDjO0MDMv0YSVa u3Y= WDCIronportException: Internal Received: from cnf006900.ad.shared (HELO risc6-mainframe.hgst.com) ([10.86.62.52]) by uls-op-cesaip02.wdc.com with ESMTP; 14 Dec 2020 12:34:07 -0800 From: Alistair Francis To: qemu-devel@nongnu.org, qemu-riscv@nongnu.org Subject: [PATCH v3 04/15] riscv: virt: Remove target macro conditionals Date: Mon, 14 Dec 2020 12:34:07 -0800 Message-Id: <3b7f53e0eef69904ec20a6fdcb30ab61672e5322.1607967113.git.alistair.francis@wdc.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: References: MIME-Version: 1.0 Received-SPF: pass client-ip=216.71.154.45; envelope-from=prvs=61015ee87=alistair.francis@wdc.com; helo=esa6.hgst.iphmx.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, 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;