From patchwork Mon Jun 26 23:19:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 696532 Delivered-To: patch@linaro.org Received: by 2002:adf:e885:0:0:0:0:0 with SMTP id d5csp3475439wrm; Mon, 26 Jun 2023 16:23:00 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4KZtBpz1/HdWQ2qcns7Zyj416ENkIeZrl47m1qyKd/7jMseFCg5EPmH/ZXg2/eWyk2vebv X-Received: by 2002:a05:622a:1303:b0:400:926f:4585 with SMTP id v3-20020a05622a130300b00400926f4585mr9033315qtk.66.1687821780638; Mon, 26 Jun 2023 16:23:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687821780; cv=none; d=google.com; s=arc-20160816; b=wuGR2Ot0sRj7Afk6cDrFVra4VSvyMsPP56VlKjGOIyC88QidQThcjxXBJgtUxnZS4q 1wuGrWLTTxxD4EIlst3TuCLnxYAL9sEOMBuC1vEIH+Cga6G5KyVE1K/5Szu+SDW/R0dp B4porH5GnWIz+8OEa3+VeCx6YwFsJF1u2W2qDKZRc7pIG7sOrQqyCidFMNZJxUtWzfMc LjyWAMJOlYlXYHnh1V5pOAgJVKqHaiNNFjSpWUsGUuTUHoyYnQGJgi6bXjRVwF/hF255 fmnjveKESBgLGHcm5oJjorW6qO+X4tmyp/SNEdfAb60+kWaDvOa5fJC5zrMXNewnQJNk LopA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=zgOYNNSnoVwlQK/r9wkyHNyY/Yl022DGjtE43qf1HB0=; fh=Q5PWRR3YGPXeAkQ7IpHJrCtvtZBBd6Ig9aRmT7uxHvE=; b=geuBrYIG8ywS42Th9uibMgpokdpOTp39OwfSQqoUVp7t6m5gSkBmLy11nNE0u9Ur/N gcdKHRfkz/nqJAIQrMTDdAlj70S86Tz00ChcCgcOqJpEiapWJKjshEWddDy/3GXkzcPe wOCY6gP69Ap2u/7HxsQMtR3WXb0/xsWupouhUA2VxW0ZrF+cyU/gyOtdgIEkAGZThHWS 0irCcOf82nc0GHknKB8VPnQlUG5T6sAy3gjgWc3UrmHJPKrAh+Q99yiRhKOJT38L+Qsd o3hTxVKHhz4D/wAcmMcs3cxrtCyISNLKpy8G3vXHwfsQ8IrSmFgwADVRJOzsGmoV/EZC JUQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DMKuUklZ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id f9-20020a05622a104900b004009847ba39si2140239qte.747.2023.06.26.16.23.00 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 26 Jun 2023 16:23:00 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DMKuUklZ; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qDvVp-0004iI-Gu; Mon, 26 Jun 2023 19:20:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qDvVm-0004gt-Sq for qemu-devel@nongnu.org; Mon, 26 Jun 2023 19:20:46 -0400 Received: from mail-ed1-x52b.google.com ([2a00:1450:4864:20::52b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qDvVj-000054-Qa for qemu-devel@nongnu.org; Mon, 26 Jun 2023 19:20:46 -0400 Received: by mail-ed1-x52b.google.com with SMTP id 4fb4d7f45d1cf-51d9123a8abso2699227a12.2 for ; Mon, 26 Jun 2023 16:20:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1687821642; x=1690413642; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=zgOYNNSnoVwlQK/r9wkyHNyY/Yl022DGjtE43qf1HB0=; b=DMKuUklZ/aESEWoH5CgrsX3F4rcfgPe9IrSZaXQpG4FXUBKofvrH4/lsKzLPIfFfRs 7nbwF1DT5cAOKIYyBXdiUnCJakYNxQHosGP5Bbhwd4aByVwPZ9sOC8UJY2HefGetNAm/ yeGWG0L77JyAiqFZTdkpvgZmkI7JwvAbDuVWJof39mkoX31p4f/J6aSIsXmY5AGDMAlX nnTW273WVHCawSNloNfyia29CXFP52v9mvjvSzzVhy2TyQtkzhT2t/nzj0sEr7oRnWaT W1KnOzRrJH8O0ovcnpNA89i9IsTpssqTBlQrQAgqpeZYPpFkxxw/bvBVTIJuFuKNajXk ePeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687821642; x=1690413642; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=zgOYNNSnoVwlQK/r9wkyHNyY/Yl022DGjtE43qf1HB0=; b=SRjyAUyAblg0lR8TkJL5XUMfEuIDUGzwCQmoNyK1n9C+3dkiJb9rJ9yZtSI04uvovV P6xPUY38I0anLaLmI++0meRMggYvei56bsjseJvg5I7fvPDq/tXnd8HlD2/wy7azm7z9 ZD89wYygoUvT2+jspRTlqaQsqzePloMj7h4q0LupYiMQbVa4K59SUsJqLzNBIF85MS6F KIgLouk8B0+DbtDQN7Va7NY+CBkIfs4BIK1E8z1ck0imQVPlXB5JAHzvhG9SmayHsYCt mT9waCheexDtbGcUC6LUPHEYsIgI/6utqZD5ErAIXc78nKr6k0kqPHxsm/Gk27C+lJno tvJQ== X-Gm-Message-State: AC+VfDxn72ESmo+Fhf8wLwUV+0GCuPxPF/l/UBpmvL59nn2SnUvmG69y w2/bW7UL7HA8QomlmLAiT4duezJ3IP1ZP+AXD7w= X-Received: by 2002:a17:906:fe03:b0:96f:b58e:7e21 with SMTP id wy3-20020a170906fe0300b0096fb58e7e21mr26173106ejb.52.1687821642178; Mon, 26 Jun 2023 16:20:42 -0700 (PDT) Received: from m1x-phil.lan ([176.187.199.226]) by smtp.gmail.com with ESMTPSA id gg18-20020a170906e29200b0098d2d219649sm3843858ejb.174.2023.06.26.16.20.40 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 26 Jun 2023 16:20:41 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Bin Meng , Liu Zhiwei , =?utf-8?q?Alex_Benn=C3=A9e?= , Thomas Huth , Beraldo Leal , Alistair Francis , =?utf-8?q?Philippe_Mathieu-Dau?= =?utf-8?q?d=C3=A9?= , Palmer Dabbelt , Wainer dos Santos Moschetta , Daniel Henrique Barboza , Weiwei Li , qemu-riscv@nongnu.org Subject: [PATCH 05/16] target/riscv: Move sysemu-specific files to target/riscv/sysemu/ Date: Tue, 27 Jun 2023 01:19:56 +0200 Message-Id: <20230626232007.8933-6-philmd@linaro.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20230626232007.8933-1-philmd@linaro.org> References: <20230626232007.8933-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::52b; envelope-from=philmd@linaro.org; helo=mail-ed1-x52b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Move sysemu-specific files to the a new 'sysemu' sub-directory, adapt meson rules. Signed-off-by: Philippe Mathieu-Daudé --- target/riscv/cpu.h | 2 +- target/riscv/{ => sysemu}/instmap.h | 0 target/riscv/{ => sysemu}/kvm_riscv.h | 0 target/riscv/{ => sysemu}/pmp.h | 0 target/riscv/{ => sysemu}/pmu.h | 0 target/riscv/{ => sysemu}/time_helper.h | 0 hw/riscv/virt.c | 2 +- target/riscv/cpu.c | 6 +++--- target/riscv/cpu_helper.c | 4 ++-- target/riscv/csr.c | 4 ++-- target/riscv/{ => sysemu}/arch_dump.c | 0 target/riscv/{ => sysemu}/kvm-stub.c | 0 target/riscv/{ => sysemu}/kvm.c | 0 target/riscv/{ => sysemu}/machine.c | 0 target/riscv/{ => sysemu}/monitor.c | 0 target/riscv/{ => sysemu}/pmp.c | 0 target/riscv/{ => sysemu}/pmu.c | 0 target/riscv/{ => sysemu}/riscv-qmp-cmds.c | 0 target/riscv/{ => sysemu}/time_helper.c | 0 target/riscv/meson.build | 13 ++++--------- target/riscv/sysemu/meson.build | 12 ++++++++++++ 21 files changed, 25 insertions(+), 18 deletions(-) rename target/riscv/{ => sysemu}/instmap.h (100%) rename target/riscv/{ => sysemu}/kvm_riscv.h (100%) rename target/riscv/{ => sysemu}/pmp.h (100%) rename target/riscv/{ => sysemu}/pmu.h (100%) rename target/riscv/{ => sysemu}/time_helper.h (100%) rename target/riscv/{ => sysemu}/arch_dump.c (100%) rename target/riscv/{ => sysemu}/kvm-stub.c (100%) rename target/riscv/{ => sysemu}/kvm.c (100%) rename target/riscv/{ => sysemu}/machine.c (100%) rename target/riscv/{ => sysemu}/monitor.c (100%) rename target/riscv/{ => sysemu}/pmp.c (100%) rename target/riscv/{ => sysemu}/pmu.c (100%) rename target/riscv/{ => sysemu}/riscv-qmp-cmds.c (100%) rename target/riscv/{ => sysemu}/time_helper.c (100%) create mode 100644 target/riscv/sysemu/meson.build diff --git a/target/riscv/cpu.h b/target/riscv/cpu.h index b1b56aa29e..83a9a965d1 100644 --- a/target/riscv/cpu.h +++ b/target/riscv/cpu.h @@ -88,7 +88,7 @@ typedef enum { #define MAX_RISCV_PMPS (16) #if !defined(CONFIG_USER_ONLY) -#include "pmp.h" +#include "sysemu/pmp.h" #include "debug.h" #endif diff --git a/target/riscv/instmap.h b/target/riscv/sysemu/instmap.h similarity index 100% rename from target/riscv/instmap.h rename to target/riscv/sysemu/instmap.h diff --git a/target/riscv/kvm_riscv.h b/target/riscv/sysemu/kvm_riscv.h similarity index 100% rename from target/riscv/kvm_riscv.h rename to target/riscv/sysemu/kvm_riscv.h diff --git a/target/riscv/pmp.h b/target/riscv/sysemu/pmp.h similarity index 100% rename from target/riscv/pmp.h rename to target/riscv/sysemu/pmp.h diff --git a/target/riscv/pmu.h b/target/riscv/sysemu/pmu.h similarity index 100% rename from target/riscv/pmu.h rename to target/riscv/sysemu/pmu.h diff --git a/target/riscv/time_helper.h b/target/riscv/sysemu/time_helper.h similarity index 100% rename from target/riscv/time_helper.h rename to target/riscv/sysemu/time_helper.h diff --git a/hw/riscv/virt.c b/hw/riscv/virt.c index 95708d890e..11f9577004 100644 --- a/hw/riscv/virt.c +++ b/hw/riscv/virt.c @@ -30,7 +30,7 @@ #include "hw/char/serial.h" #include "target/riscv/cpu.h" #include "hw/core/sysbus-fdt.h" -#include "target/riscv/pmu.h" +#include "target/riscv/sysemu/pmu.h" #include "hw/riscv/riscv_hart.h" #include "hw/riscv/virt.h" #include "hw/riscv/boot.h" diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c index 7f281cdcf6..a1513bf5cc 100644 --- a/target/riscv/cpu.c +++ b/target/riscv/cpu.c @@ -24,10 +24,10 @@ #include "cpu.h" #include "cpu_vendorid.h" #ifndef CONFIG_USER_ONLY -#include "pmu.h" -#include "time_helper.h" +#include "sysemu/pmu.h" +#include "sysemu/time_helper.h" #include "sysemu/kvm.h" -#include "kvm_riscv.h" +#include "sysemu/kvm_riscv.h" #endif #include "internals.h" #include "exec/exec-all.h" diff --git a/target/riscv/cpu_helper.c b/target/riscv/cpu_helper.c index d871718e5d..5ff48be561 100644 --- a/target/riscv/cpu_helper.c +++ b/target/riscv/cpu_helper.c @@ -22,9 +22,9 @@ #include "qemu/main-loop.h" #include "cpu.h" #include "internals.h" -#include "pmu.h" +#include "sysemu/pmu.h" #include "exec/exec-all.h" -#include "instmap.h" +#include "sysemu/instmap.h" #include "tcg/tcg-op.h" #include "trace.h" #include "semihosting/common-semi.h" diff --git a/target/riscv/csr.c b/target/riscv/csr.c index 936ba2be24..788d169502 100644 --- a/target/riscv/csr.c +++ b/target/riscv/csr.c @@ -22,8 +22,8 @@ #include "qemu/timer.h" #include "cpu.h" #ifndef CONFIG_USER_ONLY -#include "pmu.h" -#include "time_helper.h" +#include "sysemu/pmu.h" +#include "sysemu/time_helper.h" #endif #include "qemu/main-loop.h" #include "exec/exec-all.h" diff --git a/target/riscv/arch_dump.c b/target/riscv/sysemu/arch_dump.c similarity index 100% rename from target/riscv/arch_dump.c rename to target/riscv/sysemu/arch_dump.c diff --git a/target/riscv/kvm-stub.c b/target/riscv/sysemu/kvm-stub.c similarity index 100% rename from target/riscv/kvm-stub.c rename to target/riscv/sysemu/kvm-stub.c diff --git a/target/riscv/kvm.c b/target/riscv/sysemu/kvm.c similarity index 100% rename from target/riscv/kvm.c rename to target/riscv/sysemu/kvm.c diff --git a/target/riscv/machine.c b/target/riscv/sysemu/machine.c similarity index 100% rename from target/riscv/machine.c rename to target/riscv/sysemu/machine.c diff --git a/target/riscv/monitor.c b/target/riscv/sysemu/monitor.c similarity index 100% rename from target/riscv/monitor.c rename to target/riscv/sysemu/monitor.c diff --git a/target/riscv/pmp.c b/target/riscv/sysemu/pmp.c similarity index 100% rename from target/riscv/pmp.c rename to target/riscv/sysemu/pmp.c diff --git a/target/riscv/pmu.c b/target/riscv/sysemu/pmu.c similarity index 100% rename from target/riscv/pmu.c rename to target/riscv/sysemu/pmu.c diff --git a/target/riscv/riscv-qmp-cmds.c b/target/riscv/sysemu/riscv-qmp-cmds.c similarity index 100% rename from target/riscv/riscv-qmp-cmds.c rename to target/riscv/sysemu/riscv-qmp-cmds.c diff --git a/target/riscv/time_helper.c b/target/riscv/sysemu/time_helper.c similarity index 100% rename from target/riscv/time_helper.c rename to target/riscv/sysemu/time_helper.c diff --git a/target/riscv/meson.build b/target/riscv/meson.build index 7f56c5f88d..8967dfaded 100644 --- a/target/riscv/meson.build +++ b/target/riscv/meson.build @@ -7,6 +7,8 @@ gen = [ ] riscv_ss = ss.source_set() +riscv_system_ss = ss.source_set() + riscv_ss.add(gen) riscv_ss.add(files( 'cpu.c', @@ -22,19 +24,12 @@ riscv_ss.add(files( 'crypto_helper.c', 'zce_helper.c' )) -riscv_ss.add(when: 'CONFIG_KVM', if_true: files('kvm.c'), if_false: files('kvm-stub.c')) -riscv_system_ss = ss.source_set() riscv_system_ss.add(files( - 'arch_dump.c', - 'pmp.c', 'debug.c', - 'monitor.c', - 'machine.c', - 'pmu.c', - 'time_helper.c', - 'riscv-qmp-cmds.c', )) +subdir('sysemu') + target_arch += {'riscv': riscv_ss} target_softmmu_arch += {'riscv': riscv_system_ss} diff --git a/target/riscv/sysemu/meson.build b/target/riscv/sysemu/meson.build new file mode 100644 index 0000000000..5f8e1edcf2 --- /dev/null +++ b/target/riscv/sysemu/meson.build @@ -0,0 +1,12 @@ +riscv_system_ss.add(files( + 'arch_dump.c', + 'machine.c', + 'monitor.c', + 'pmp.c', + 'pmu.c', + 'riscv-qmp-cmds.c', + 'time_helper.c', +)) + +riscv_ss.add(when: 'CONFIG_KVM', if_true: files('kvm.c'), + if_false: files('kvm-stub.c'))