From patchwork Mon Oct 9 17:14:41 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: 731029 Delivered-To: patch@linaro.org Received: by 2002:a5d:574c:0:b0:31d:da82:a3b4 with SMTP id q12csp1329343wrw; Mon, 9 Oct 2023 10:16:03 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEQtYX5jC6lTvKcAxjJ7W8QKeqSv/4tPOGcswnawLIJZAQQeS3SCslbWXn2IsTjjT9LbGZt X-Received: by 2002:a05:620a:1092:b0:774:1c99:daf9 with SMTP id g18-20020a05620a109200b007741c99daf9mr16102584qkk.37.1696871763379; Mon, 09 Oct 2023 10:16:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696871763; cv=none; d=google.com; s=arc-20160816; b=ezJgKHLcuum/wF09C0VINB2v/DE2nlAnDQeSsdgd0nrUHnaGjUZrt48uE78j9Xt+/9 Cm2z/+GnyMKVzttc5swwDQYTkjbkIVB2Nj5DbhrpcvoMXlibkNyoQB1sA/LdFWfyt77k hgZFkukxr32mQ5uHGqXKm7hZa+4qQ5oyqdVQOHL41MKCPukgD5oKXZ7mxW8JX0A09y31 Rc1e6tOMHOBkATqmTLzAW/u4eabfi2MyWssi6nFFJuqdkpf4ZSAvVfD5KR7qCM8YkRSr m+CYcLQDKTisaaQ3F4Cs1Vw5iRJr7cs+c7RYeOxAhNdTdd0kj6kKmGHr1N+Qu2l75WwF uXuA== 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=kbNgWbdkf530P5fV+/XaqJAGbVDQW2KbluK4ohQuwu8=; fh=Eu6p7OZ8FBcTkZIEE6MFuz9KO7eOSptawzVzLPCDhbU=; b=qG8+16NT4deqOcAGd8WKxk+mjycmiyCb4Odta5Gs7v60R+SZVcFS1RSMX+kCF9sXpQ tkKZdaNdldjDqxKgnc0P2oZUljLCwuUepNpJO+j59iF1OkFXU2ohZ2w/zOSORemCS9n/ bPA9aUaw8FOn+Xfi0gRGJDO+DtWSLPN03f652C90zHDsugKPjBPNk0Z8U3oJgwHJW1/Z +bEwaQbcI0XURnLOvjhQgfSicY5OzO2GdHZWhJc78VD/N1COM/ojJqsh/M/tGc+SBwiv VPdyZhBR2Y43QeTTN5K/Z9o6dXMS4fhuvAemvjCorZzGYIXAENJ8G3Ltg8jliSUCfaVu 4EHA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VcZzEIUn; 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 y9-20020a05620a44c900b00773e4b0d065si6634675qkp.532.2023.10.09.10.16.03 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 09 Oct 2023 10:16:03 -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=VcZzEIUn; 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 1qptqh-0004Fp-RH; Mon, 09 Oct 2023 13:15:20 -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 1qptqY-0004E1-0o for qemu-devel@nongnu.org; Mon, 09 Oct 2023 13:15:10 -0400 Received: from mail-ej1-x62f.google.com ([2a00:1450:4864:20::62f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qptqM-0001Ea-84 for qemu-devel@nongnu.org; Mon, 09 Oct 2023 13:15:01 -0400 Received: by mail-ej1-x62f.google.com with SMTP id a640c23a62f3a-9a9f139cd94so798817866b.2 for ; Mon, 09 Oct 2023 10:14:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1696871692; x=1697476492; darn=nongnu.org; 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=kbNgWbdkf530P5fV+/XaqJAGbVDQW2KbluK4ohQuwu8=; b=VcZzEIUnwhBvh3PWfRbQkP9fqVNr7mM8h8kCCNZoscbHVBzdjz7Aqc5s0qOCh2vJ2+ awxQdkbjBDCMAQJ9R9ca4Tl3iJKTZxwhSYDSds/BFETX7xwLP+YHFVpFsDJcu0FpP/Uc YmCbovfoqJbF3NxHsWA4LQeUsazcnNJJ7J+aW63uEaC8BX53syy5mfHn1mvHIA+pclSG ckoVSfXuV3GmcqdwUU1JfDCLuj9nCm20fONEpL79DwwbCjyvdemX0rEzmFRFOLJPVh9m W2or1wnllHDmjFhPVfvA7CYhPcQA/of5cwxQk7oDaqyEAhLd+jfkWDY+ZCSd0eR+lhji XZrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696871692; x=1697476492; 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=kbNgWbdkf530P5fV+/XaqJAGbVDQW2KbluK4ohQuwu8=; b=ZO2K9A3eMO4bh9w76snrXSAcWtyR03vgimD+SHaTK8DhNn6TwKvEPFhg2JoFXVJEp/ KwSchamRKh9NxBmxbFbiVl6fGLA7wEADofpWhFFPKb25vL6AwnfIzX/rcRtO+j7+mIY6 HOZIx6spu7rrz3uzowrLkxYmBkokHIi7lqf/jhHdGYmvcTKfm4pKhJ2AN0e8njG6JcgJ DH9dGWJbBarSVNnHYaEoLw903mzrasXAA13jQZ4khxiSvXzqAytuby7cHc9OtdD5z5lh SaAX0duDzEhNI5MOimAhbp94hqUs9mBdKPy1n8yyc/RHr/UXFCLQFXo9Hua87YNHg67P eIVg== X-Gm-Message-State: AOJu0YwA8ju0RNbJykb/jFB5cxz6g1NlfOgyWx5sz7swxZFNmERVEmTg 2NWeuDeKdXxwlA+zVNuSRE8eI0V/j7U4bmBtX24= X-Received: by 2002:a17:906:ef90:b0:9ad:786d:72ae with SMTP id ze16-20020a170906ef9000b009ad786d72aemr11896517ejb.75.1696871692385; Mon, 09 Oct 2023 10:14:52 -0700 (PDT) Received: from m1x-phil.lan (thr44-h01-176-170-217-185.dsl.sta.abo.bbox.fr. [176.170.217.185]) by smtp.gmail.com with ESMTPSA id ks8-20020a170906f84800b00982a92a849asm6984634ejb.91.2023.10.09.10.14.50 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 09 Oct 2023 10:14:52 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Herv=C3=A9_Poussineau?= , =?utf-8?q?Phil?= =?utf-8?q?ippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Alex_Ben?= =?utf-8?q?n=C3=A9e?= , Aleksandar Rikalo , Aurelien Jarno , Jiaxun Yang , Richard Henderson , Huacai Chen Subject: [PATCH 1/3] hw/mips: Merge 'hw/mips/cpudevs.h' with 'target/mips/cpu.h' Date: Mon, 9 Oct 2023 19:14:41 +0200 Message-ID: <20231009171443.12145-2-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231009171443.12145-1-philmd@linaro.org> References: <20231009171443.12145-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62f; envelope-from=philmd@linaro.org; helo=mail-ej1-x62f.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 autolearn=ham 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 "hw/mips/cpudevs.h" contains declarations which are specific to the MIPS architecture; it doesn't make sense for these to be called from a non-MIPS architecture. Move the declarations to "target/mips/cpu.h". Signed-off-by: Philippe Mathieu-Daudé --- include/hw/mips/cpudevs.h | 14 -------------- target/mips/cpu.h | 4 +++- hw/mips/cps.c | 1 - hw/mips/fuloong2e.c | 1 - hw/mips/jazz.c | 1 - hw/mips/loongson3_virt.c | 1 - hw/mips/malta.c | 1 - hw/mips/mips_int.c | 1 - hw/mips/mipssim.c | 1 - target/mips/sysemu/cp0_timer.c | 1 - target/mips/tcg/sysemu/tlb_helper.c | 1 - 11 files changed, 3 insertions(+), 24 deletions(-) delete mode 100644 include/hw/mips/cpudevs.h diff --git a/include/hw/mips/cpudevs.h b/include/hw/mips/cpudevs.h deleted file mode 100644 index f7c9728fa9..0000000000 --- a/include/hw/mips/cpudevs.h +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef HW_MIPS_CPUDEVS_H -#define HW_MIPS_CPUDEVS_H - -#include "target/mips/cpu-qom.h" - -/* Definitions for MIPS CPU internal devices. */ - -/* mips_int.c */ -void cpu_mips_irq_init_cpu(MIPSCPU *cpu); - -/* mips_timer.c */ -void cpu_mips_clock_init(MIPSCPU *cpu); - -#endif diff --git a/target/mips/cpu.h b/target/mips/cpu.h index 67f8e8b988..fb44defc93 100644 --- a/target/mips/cpu.h +++ b/target/mips/cpu.h @@ -1345,8 +1345,10 @@ uint64_t cpu_mips_phys_to_kseg1(void *opaque, uint64_t addr); #if !defined(CONFIG_USER_ONLY) -/* mips_int.c */ +/* HW declaration specific to the MIPS target */ void cpu_mips_soft_irq(CPUMIPSState *env, int irq, int level); +void cpu_mips_irq_init_cpu(MIPSCPU *cpu); +void cpu_mips_clock_init(MIPSCPU *cpu); /* mips_itu.c */ void itc_reconfigure(struct MIPSITUState *tag); diff --git a/hw/mips/cps.c b/hw/mips/cps.c index 2b5269ebf1..b6612c1762 100644 --- a/hw/mips/cps.c +++ b/hw/mips/cps.c @@ -24,7 +24,6 @@ #include "hw/mips/mips.h" #include "hw/qdev-clock.h" #include "hw/qdev-properties.h" -#include "hw/mips/cpudevs.h" #include "sysemu/kvm.h" #include "sysemu/reset.h" diff --git a/hw/mips/fuloong2e.c b/hw/mips/fuloong2e.c index c6109633fe..97b2c8ed8e 100644 --- a/hw/mips/fuloong2e.c +++ b/hw/mips/fuloong2e.c @@ -30,7 +30,6 @@ #include "hw/block/flash.h" #include "hw/mips/mips.h" #include "hw/mips/bootloader.h" -#include "hw/mips/cpudevs.h" #include "hw/pci/pci.h" #include "hw/loader.h" #include "hw/ide/pci.h" diff --git a/hw/mips/jazz.c b/hw/mips/jazz.c index c32d2b0b0a..86dfe05ea8 100644 --- a/hw/mips/jazz.c +++ b/hw/mips/jazz.c @@ -26,7 +26,6 @@ #include "qemu/datadir.h" #include "hw/clock.h" #include "hw/mips/mips.h" -#include "hw/mips/cpudevs.h" #include "hw/intc/i8259.h" #include "hw/dma/i8257.h" #include "hw/char/serial.h" diff --git a/hw/mips/loongson3_virt.c b/hw/mips/loongson3_virt.c index b74b358874..33eae01eca 100644 --- a/hw/mips/loongson3_virt.c +++ b/hw/mips/loongson3_virt.c @@ -32,7 +32,6 @@ #include "hw/char/serial.h" #include "hw/intc/loongson_liointc.h" #include "hw/mips/mips.h" -#include "hw/mips/cpudevs.h" #include "hw/mips/fw_cfg.h" #include "hw/mips/loongson3_bootp.h" #include "hw/misc/unimp.h" diff --git a/hw/mips/malta.c b/hw/mips/malta.c index dac27fad9d..b0110c4da6 100644 --- a/hw/mips/malta.c +++ b/hw/mips/malta.c @@ -37,7 +37,6 @@ #include "hw/block/flash.h" #include "hw/mips/mips.h" #include "hw/mips/bootloader.h" -#include "hw/mips/cpudevs.h" #include "hw/pci/pci.h" #include "hw/pci/pci_bus.h" #include "qemu/log.h" diff --git a/hw/mips/mips_int.c b/hw/mips/mips_int.c index 73437cd90f..6c32e466a3 100644 --- a/hw/mips/mips_int.c +++ b/hw/mips/mips_int.c @@ -23,7 +23,6 @@ #include "qemu/osdep.h" #include "qemu/main-loop.h" #include "hw/irq.h" -#include "hw/mips/cpudevs.h" #include "sysemu/kvm.h" #include "kvm_mips.h" diff --git a/hw/mips/mipssim.c b/hw/mips/mipssim.c index 2f951f7fc6..4f743f37eb 100644 --- a/hw/mips/mipssim.c +++ b/hw/mips/mipssim.c @@ -30,7 +30,6 @@ #include "qemu/datadir.h" #include "hw/clock.h" #include "hw/mips/mips.h" -#include "hw/mips/cpudevs.h" #include "hw/char/serial.h" #include "hw/isa/isa.h" #include "net/net.h" diff --git a/target/mips/sysemu/cp0_timer.c b/target/mips/sysemu/cp0_timer.c index 9d2bcb0dea..62de502caa 100644 --- a/target/mips/sysemu/cp0_timer.c +++ b/target/mips/sysemu/cp0_timer.c @@ -22,7 +22,6 @@ #include "qemu/osdep.h" #include "hw/irq.h" -#include "hw/mips/cpudevs.h" #include "qemu/timer.h" #include "sysemu/kvm.h" #include "internal.h" diff --git a/target/mips/tcg/sysemu/tlb_helper.c b/target/mips/tcg/sysemu/tlb_helper.c index 7dbc2e24c4..4ede904800 100644 --- a/target/mips/tcg/sysemu/tlb_helper.c +++ b/target/mips/tcg/sysemu/tlb_helper.c @@ -24,7 +24,6 @@ #include "exec/exec-all.h" #include "exec/cpu_ldst.h" #include "exec/log.h" -#include "hw/mips/cpudevs.h" #include "exec/helper-proto.h" /* TLB management */ From patchwork Mon Oct 9 17:14:42 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: 731028 Delivered-To: patch@linaro.org Received: by 2002:a5d:574c:0:b0:31d:da82:a3b4 with SMTP id q12csp1329312wrw; Mon, 9 Oct 2023 10:15:58 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEL4c1MK+BAPrJrMt9kvyOjw1bPzPzeOO/3+N2DDCeTiPCmnZtS2waUZ+qD7g+HCFqV3K0c X-Received: by 2002:a05:6808:17a5:b0:3ab:81e4:4da0 with SMTP id bg37-20020a05680817a500b003ab81e44da0mr21976158oib.42.1696871758633; Mon, 09 Oct 2023 10:15:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696871758; cv=none; d=google.com; s=arc-20160816; b=IGmQo1LUtw/LbC6393uUvpZe6lXk+PO+xBktEYR4FSV8dJMvddkQwQLO98ALNQZ8zp 9n0ny5Cc3rg1iIQB2zaq7M+HySjpuFdC/tscrBESM0ZD+/n12FHtWRtCdB7kvnNp9Q9w 6xJnnJ6zd6yY+7lZrMeTo14H7anEp6+hHBJVH2/qgmTXpL9e3/7y2Sj3RZMRo73SWhhX Ti/2ypmSYrz9nHnZsCMMTuYnD8IpqQhiRz+Brvap80R6wHgENkebVab/RZkwx0a+TMtT 8BQlaNsyZ2Y3ACafmNmFSu8wXtQuYapiIcetfuCUeIVX01fcijQ/Q5tuu5o0sHFJGM4p cgHw== 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=fbvzk8w4yOrUuIdaZAWtNHnxqM3Ns8E/x7P8LC66JEg=; fh=Eu6p7OZ8FBcTkZIEE6MFuz9KO7eOSptawzVzLPCDhbU=; b=AW7QHqynqdmogk+kpSLoGWzl3LW17JVwA0QKJTjszciybC73ypso54WtXhHn4+YJPs ILhL/VDmLWefo9FGWkkMBfrsYMRwLOVLlOgSqjMIQYtR2K73fxLTC+gEr2yKPTiZLH4o yJRCOLMLa6yWhUkaj0ih6tZLJ0R1sgugXpMhz3iBLaubZ8qs6BUXVYNxZvUrf8X5hxEA bO6ByfLj/x+7l6/gJ8zRqiYPqyB766G1oJPUZWUyAVvHv0J8xuon39gs00Wvs2ScYsZD bW6xzN4l+lnjvY7AAdGr2lD1B0jPLItHoW5JU802R+Ftqqs1zyTmRs0Ez5KanrzV4GAs BxwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=VVgUntWV; 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 i15-20020ac85e4f000000b004181e519799si6436624qtx.100.2023.10.09.10.15.58 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 09 Oct 2023 10:15:58 -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=VVgUntWV; 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 1qptqk-0004IX-Il; Mon, 09 Oct 2023 13:15:22 -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 1qptqa-0004Ft-IA for qemu-devel@nongnu.org; Mon, 09 Oct 2023 13:15:19 -0400 Received: from mail-ej1-x62f.google.com ([2a00:1450:4864:20::62f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qptqP-0001F7-Va for qemu-devel@nongnu.org; Mon, 09 Oct 2023 13:15:08 -0400 Received: by mail-ej1-x62f.google.com with SMTP id a640c23a62f3a-9936b3d0286so864265466b.0 for ; Mon, 09 Oct 2023 10:14:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1696871698; x=1697476498; darn=nongnu.org; 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=fbvzk8w4yOrUuIdaZAWtNHnxqM3Ns8E/x7P8LC66JEg=; b=VVgUntWViajyAgunUMxqgJDuQQnFe8UpRuVTEI38VvXmyhKYrtJLbnwHz9gUEMM/At LdiXmW+/EVbX/nyKdsG6ELoYETLQdtQswRvg7I1KTrtX2zU6/p4veezIahvW8q6IuIdh hskT3TvBia08yqIfot6CYEOjcbIupUDeBaFyViUKZQzBlIWe6HNVhqniBCHQFXq8ZYwK Ad+1SSH053NBizVmiyDehEdcUmaDVhECBSUz1E17ICTZD1XtNLrSRK4sLsLrytngBMmu 6huCGo4FlBgO85WR7kzXZxuWLr+ifQsAwjsEnETRhCe+h+AEnFK/7ylLsY+Qhu//bBZz e7vw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696871698; x=1697476498; 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=fbvzk8w4yOrUuIdaZAWtNHnxqM3Ns8E/x7P8LC66JEg=; b=wtbBF5oaLoFH5/SGWZxaL/vfmKLUzotm8CI7neSFUgGABLhfJb/7Ik/aU2cbFYbaON xjkX6KPfiGZj2knR8Lef6VKXb3tJktw/StZ9Xqhb/KJuilTf9GDTpnguLP4xd/LEtywX FksGkIxHWS8IPV1HzrQes+C4ppd5WcJSj5Xl2Qk6gsshLESbVRFPr7+F/7+5uloYuvTA EVQMrqq2tynZCVyH0Epu95p8rv/1RvwWlJJU5lpRZKKeAxjXqDxbk5stMV1oBCqxDOaz YcQQWjjM7l7yx4pi46FbCur6jUAS2gHZoAQ1NmW+Sj+OFxG1AASKaDIL8/s5VEncX8fK a0Mg== X-Gm-Message-State: AOJu0YxfYL8HU76dM3Ck9PuwUb5QvgTWIJN4zdhEYRPpshqTamPXPVQA j669SrQ448e9FB+cIj+HgOX8SErcua/QOFQK2Qc= X-Received: by 2002:a17:906:9c1:b0:9ae:5aa4:9fa with SMTP id r1-20020a17090609c100b009ae5aa409famr14158989eje.42.1696871698001; Mon, 09 Oct 2023 10:14:58 -0700 (PDT) Received: from m1x-phil.lan (thr44-h01-176-170-217-185.dsl.sta.abo.bbox.fr. [176.170.217.185]) by smtp.gmail.com with ESMTPSA id e25-20020a1709062c1900b009adc77fe164sm7045575ejh.66.2023.10.09.10.14.56 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 09 Oct 2023 10:14:57 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Herv=C3=A9_Poussineau?= , =?utf-8?q?Phil?= =?utf-8?q?ippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Alex_Ben?= =?utf-8?q?n=C3=A9e?= , Aleksandar Rikalo , Aurelien Jarno , Jiaxun Yang , Richard Henderson , Huacai Chen Subject: [PATCH 2/3] hw/misc/mips_itu: Declare itc_reconfigure() in 'hw/misc/mips_itu.h' Date: Mon, 9 Oct 2023 19:14:42 +0200 Message-ID: <20231009171443.12145-3-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231009171443.12145-1-philmd@linaro.org> References: <20231009171443.12145-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::62f; envelope-from=philmd@linaro.org; helo=mail-ej1-x62f.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 autolearn=ham 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 We already provide "hw/misc/mips_itu.h" to declare prototype related to MIPSITUState. Move itc_reconfigure() declaration there. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/misc/mips_itu.h | 2 ++ target/mips/cpu.h | 3 --- target/mips/tcg/sysemu/cp0_helper.c | 1 + 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/hw/misc/mips_itu.h b/include/hw/misc/mips_itu.h index 35218b2d14..a413789151 100644 --- a/include/hw/misc/mips_itu.h +++ b/include/hw/misc/mips_itu.h @@ -79,4 +79,6 @@ struct MIPSITUState { /* Get ITC Configuration Tag memory region. */ MemoryRegion *mips_itu_get_tag_region(MIPSITUState *itu); +void itc_reconfigure(struct MIPSITUState *tag); + #endif /* MIPS_ITU_H */ diff --git a/target/mips/cpu.h b/target/mips/cpu.h index fb44defc93..5fddceff3a 100644 --- a/target/mips/cpu.h +++ b/target/mips/cpu.h @@ -1350,9 +1350,6 @@ void cpu_mips_soft_irq(CPUMIPSState *env, int irq, int level); void cpu_mips_irq_init_cpu(MIPSCPU *cpu); void cpu_mips_clock_init(MIPSCPU *cpu); -/* mips_itu.c */ -void itc_reconfigure(struct MIPSITUState *tag); - #endif /* !CONFIG_USER_ONLY */ /* helper.c */ diff --git a/target/mips/tcg/sysemu/cp0_helper.c b/target/mips/tcg/sysemu/cp0_helper.c index 5da1124589..d349548743 100644 --- a/target/mips/tcg/sysemu/cp0_helper.c +++ b/target/mips/tcg/sysemu/cp0_helper.c @@ -28,6 +28,7 @@ #include "qemu/host-utils.h" #include "exec/helper-proto.h" #include "exec/exec-all.h" +#include "hw/misc/mips_itu.h" /* SMP helpers. */ From patchwork Mon Oct 9 17:14:43 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: 731030 Delivered-To: patch@linaro.org Received: by 2002:a5d:574c:0:b0:31d:da82:a3b4 with SMTP id q12csp1329460wrw; Mon, 9 Oct 2023 10:16:16 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHgqxPETGZf3567onc6kTU2DUouf4ur5L5pUKfPMNK3qacSuc/YR9vHHlPdqpxqYsu9HCUr X-Received: by 2002:a9d:6a0b:0:b0:6b9:52cb:3adf with SMTP id g11-20020a9d6a0b000000b006b952cb3adfmr15684648otn.20.1696871775471; Mon, 09 Oct 2023 10:16:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696871775; cv=none; d=google.com; s=arc-20160816; b=QtovQ1JJAa02/9mF6hO0oN3ILBEaGONgyJrTYWkJH1ZNNkyG4OWlnfbh4cbiInc/iN ffYBZzvI82biuVLmqICSNHS9+rnhfpNhJNzrQIsQFxjqFY/xzabwLu/yQOoJQTJI7Y0J P/uoRGGRiXQXQj6gICfqXOuwDrlwqQL2lqdcYLKFt2iaPJBfQSJw3NGsN9G+0Sy1jFZj +18hkdbCODK/8f4LQcsxyPKsYN3OrCq7U4YhoclLKQStHeWh4rt4gVbwBQ2XJ1EEkun5 jQ1c5Ue7khfpUx+ECF9cBxuSm/P8ozgdP7JU16IkfadyLUiAa7Ivb6dc6Y6yXPeb+CAq a8Pg== 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=PeZLMWVBcIq2AL5jS2WYOBrnjRfadpnh5KEt1PKPozs=; fh=Eu6p7OZ8FBcTkZIEE6MFuz9KO7eOSptawzVzLPCDhbU=; b=vph4+mjlffPyPxMln3MguIKpo6xsnRJ27S7SyJCST7ZXZ7YX5XPj1O1ezucleifv3N 1xECOZ5MLheu4MOhVyOXH84gprCsisqGtK0yIYts6VYD92KHauj12A2UWz8PIPEsiUiH gLXrMF7leE+6C4+9b9dRJ7QTy+350OkvSzjQXfuUrmybj/ZZa1T5K6pzFpCywiQzRBjT fY6bL+Z+480ETQjJ9cgjvE231O330e1iCLc5SietHEOkA/5s6wU3gb/OJbmpaGlknvdg ZLDr1vgeDCKM/TX7aWKcJQMriIcsZYTW6sKhWiwpWWtkOG/y5LtW+Iwf/cHo0/oTTApU aSbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=wkROtT7E; 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 q9-20020a0c9a49000000b006563bd1457fsi6391433qvd.183.2023.10.09.10.16.15 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 09 Oct 2023 10:16:15 -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=wkROtT7E; 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 1qptqj-0004IG-QG; Mon, 09 Oct 2023 13:15:21 -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 1qptqf-0004H2-7M for qemu-devel@nongnu.org; Mon, 09 Oct 2023 13:15:19 -0400 Received: from mail-ed1-x532.google.com ([2a00:1450:4864:20::532]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qptqa-0001Qd-BF for qemu-devel@nongnu.org; Mon, 09 Oct 2023 13:15:16 -0400 Received: by mail-ed1-x532.google.com with SMTP id 4fb4d7f45d1cf-536b39daec1so8146484a12.2 for ; Mon, 09 Oct 2023 10:15:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1696871703; x=1697476503; darn=nongnu.org; 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=PeZLMWVBcIq2AL5jS2WYOBrnjRfadpnh5KEt1PKPozs=; b=wkROtT7EuYRh2NoUjFNlTIsB1I2wklm+gYjvOQCSqT1NRWkUZnZgvg+CFgWxVouIwP RUhdVNVhbwobcBQrmEAL5mQiDq89A8HxcxDsypEf8+GJzJzxwaYbhT1ovR6hQC1CzLyn BY9sed9w4RrWSgBKh7Xyp1Wcoub9FdhRdqBAad2mvW/r801vZtiJDRvGW+9d0T/w+R8I UP4iYkOFHZTXxxrpMXzjxJMAJm9soSrtFMrlkJEo7UpU7c3s2mgFL72DzpPmEIEfuwGd SjAQbtncvEQBHYLCLfQLAFM3QXoxDPpLO/TrMvB6nH6dKmM0Ff9VuSwfDl5yjJyQXtgy /Mxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1696871703; x=1697476503; 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=PeZLMWVBcIq2AL5jS2WYOBrnjRfadpnh5KEt1PKPozs=; b=bmarJEZrWG8607Sv4WR2UbUXs4deogrBA76Mdg126IejOSBKuos4LXuMfLLVTwn0pl GMFsQcX97tXXuC2kWpAn0KIHg+wvh44cAA3JXviTt940Ys3wsuY6u/iD4xNPmp9oMzuw 6nzSIfmkgbViesexgQ0vlxgKzzcpbzoVPl97JaT5AU4Zso2ZNDH6TuexVf2GAy3jkmR1 UdXeeXEvDrpY8pTu9YEE3Q48Lc4Fn780doKigJBveL1Sg5z28kY/fpFxN5ln6IHmCcgV Oy0RGxAL4PtZV0jKiNihGnvXHhkGeSTo4Ln4oOlB2oEcjuKsC/b3YaSjypsr6YVHAsFb aXXg== X-Gm-Message-State: AOJu0Yw+X2kE5nBwXcreI8gJkdlEEWEddr9A5IMxnu6j46P8hAetXyNG ekwLU3YGqi1dJCWmWOKQUyyDQvmVdJVNbDmxM6Q= X-Received: by 2002:a05:6402:389:b0:530:8897:f0e9 with SMTP id o9-20020a056402038900b005308897f0e9mr13757593edv.21.1696871703530; Mon, 09 Oct 2023 10:15:03 -0700 (PDT) Received: from m1x-phil.lan (thr44-h01-176-170-217-185.dsl.sta.abo.bbox.fr. [176.170.217.185]) by smtp.gmail.com with ESMTPSA id u5-20020aa7d545000000b00534e791296bsm6339002edr.37.2023.10.09.10.15.02 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 09 Oct 2023 10:15:03 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Herv=C3=A9_Poussineau?= , =?utf-8?q?Phil?= =?utf-8?q?ippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Alex_Ben?= =?utf-8?q?n=C3=A9e?= , Aleksandar Rikalo , Aurelien Jarno , Jiaxun Yang , Richard Henderson , Huacai Chen Subject: [PATCH 3/3] hw/misc/mips_itu: Make MIPSITUState target agnostic Date: Mon, 9 Oct 2023 19:14:43 +0200 Message-ID: <20231009171443.12145-4-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20231009171443.12145-1-philmd@linaro.org> References: <20231009171443.12145-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::532; envelope-from=philmd@linaro.org; helo=mail-ed1-x532.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 autolearn=ham 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 When prototyping a heterogenous machine including the ITU, we get: include/hw/misc/mips_itu.h:76:5: error: unknown type name 'MIPSCPU' MIPSCPU *cpu0; ^ MIPSCPU is declared in the target specific "cpu.h" header, but we don't want to include it, because "cpu.h" is target specific and its inclusion taints all files including "mips_itu.h", which become target specific too. We can however use the 'ArchCPU *' type in the public header. By keeping the TYPE_MIPS_CPU QOM type check in the link property declaration, QOM core code will still check the property is a correct MIPS CPU. TYPE_MIPS_ITU is still built per-(MIPS)target, but its header can now be included by other targets. Signed-off-by: Philippe Mathieu-Daudé --- include/hw/misc/mips_itu.h | 2 +- hw/misc/mips_itu.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/hw/misc/mips_itu.h b/include/hw/misc/mips_itu.h index a413789151..5caed6cc36 100644 --- a/include/hw/misc/mips_itu.h +++ b/include/hw/misc/mips_itu.h @@ -73,7 +73,7 @@ struct MIPSITUState { /* SAAR */ uint64_t *saar; - MIPSCPU *cpu0; + ArchCPU *cpu0; }; /* Get ITC Configuration Tag memory region. */ diff --git a/hw/misc/mips_itu.c b/hw/misc/mips_itu.c index 0eda302db4..5a83ccc4e8 100644 --- a/hw/misc/mips_itu.c +++ b/hw/misc/mips_itu.c @@ -532,7 +532,7 @@ static void mips_itu_realize(DeviceState *dev, Error **errp) return; } - env = &s->cpu0->env; + env = &MIPS_CPU(s->cpu0)->env; if (env->saarp) { s->saar = env->CP0_SAAR; } @@ -563,7 +563,7 @@ static Property mips_itu_properties[] = { ITC_FIFO_NUM_MAX), DEFINE_PROP_UINT32("num-semaphores", MIPSITUState, num_semaphores, ITC_SEMAPH_NUM_MAX), - DEFINE_PROP_LINK("cpu[0]", MIPSITUState, cpu0, TYPE_MIPS_CPU, MIPSCPU *), + DEFINE_PROP_LINK("cpu[0]", MIPSITUState, cpu0, TYPE_MIPS_CPU, ArchCPU *), DEFINE_PROP_END_OF_LIST(), };