From patchwork Mon Feb 27 14:00:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 656972 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2365768wrb; Mon, 27 Feb 2023 06:01:57 -0800 (PST) X-Google-Smtp-Source: AK7set+Q8dQjWqEHD7n2afxo+Lf0bCfzY2SqSe3twrdwZVLaWWz/5wM1xnJ0zfVL70tYj3EyWuXC X-Received: by 2002:a05:6e02:20ee:b0:313:bf44:b4a5 with SMTP id q14-20020a056e0220ee00b00313bf44b4a5mr24824548ilv.13.1677506517596; Mon, 27 Feb 2023 06:01:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677506517; cv=none; d=google.com; s=arc-20160816; b=1HIY072n/Q+/cbpZH1nW6diuK3qTaCktK1hTl7Hz0kP4hCJR9oi0ss0Hhbmt5UUMN1 41X3H1eg4GTkiJDfonW7wdHLtLi6uS9CMmJREtdw7PBIxVz6tpBe9YCyzo7P/A4qZSO2 9zY9NdEv/Mo7h/woIYtKqIWN9rTVYLxcsT8XhXn9hCmAeJMsurUasgXa2dkMm9fzvlxy 55tjqoYm106W1q+FX+mkdxeHTo/EoNHExmY9p8deSdtzzAJsV0J0NXJcFVfXU/8gdBQ2 ylmP/4uR5eUdEkvVeZTtUKO0ChpO0sKMMrzRtWw9bd9Q0lDceoNQC91X4vHRkUwrRVQN IJrw== 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:to:from :dkim-signature; bh=DxEn9POx9LLw52m4ZF8v0HOcC8aENtYC1Crsbx0vnOw=; b=CiJSLmvO5pQeFPwFYW+KqRfMvbIWb7YRJ2ysrp4OJgKQylN/8+e4MICeGEpsHcTCuN Uk0RfvbaI/w64z/NK+nPRoGGeBoPe7kgZxcu8EwG0rkkrhtcE1wVA/AfBcZ1DWrfHeSh Vc4TmRWKSHHtShhfnsn1ZTTDXIVQAVQA7ivmridYHqZVogDecjFl3Smis/5AC7aqXG3h Haeui13BNmQOEhG1OHzjbLhhlP6aMYnBMhOygd3AkNDwi36f0+r/7fVNU57ci2hskgCF QUSx7M1GgayJ4aS2rYU56LX6shCTHHfeGlCOskiwlF/V3cCcZjudm/rgp/MMAnAGmZEK C5kg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=t1l9ZcGo; 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 t1-20020a67d901000000b003d0bf6ae00bsi2409975vsj.425.2023.02.27.06.01.57 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:01:57 -0800 (PST) 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=t1l9ZcGo; 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 1pWe3z-0000SJ-Fv; Mon, 27 Feb 2023 09:01:11 -0500 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 1pWe3x-0000Mt-K2 for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:01:09 -0500 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWe3w-0007WH-13 for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:01:09 -0500 Received: by mail-wr1-x436.google.com with SMTP id bx12so3173664wrb.11 for ; Mon, 27 Feb 2023 06:01:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=DxEn9POx9LLw52m4ZF8v0HOcC8aENtYC1Crsbx0vnOw=; b=t1l9ZcGomuXQMrxZBrzcdoLvh+wloIYApVU3Ywr0/vLda2jUd9Bk2L8uAKFQgYDQbS SpFg58IMC+5VfzxxxtOBls+7K4uSeD3dSs/WUBi42dZ+ZWAFEmaWMQfVNTuZinGfCYtl 6ndX1vyy5ftixjEhpVMfOtGVFO5fs4LaTJstpaS51cVK8H0n1ZkI/Q1gKpt74+G5lp1X t+mIf8j6TvGkETVT4hLhmnFepCBYMLOKcLF67YttnggP9XaixnxSj127+tKZ/v9mMG+C /pTMHiblYdCUJrLUimXx/h9Cpm9jiNNc2vEew9/MaYb2+N/G+YFRRwAnE7cSL+VEmwVV T8mg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=DxEn9POx9LLw52m4ZF8v0HOcC8aENtYC1Crsbx0vnOw=; b=mjQgddyZVq0HIWTDiQR2nRPzOowafHTJ9ETL9DpNvNNW1M/cdr/7nRc6r2K14buca5 zY5K4pTfa2wArOCZ6dhWic0oVNtg+sqbTXFY7iY0HBq3WCm88xjdptGYln69z5HDvaPn F0IGTT9S/BtPf1rFaffpZj3e+bf5QDk2vagd6UFN6YenWSzuwMw3b2ccrkL3Nekbwoj+ Jp+Y73wVnggpZ1fJr1LcNxeND6owQ4zQy6bfmtVc4upS3j8WOJ0pkCG3uVVp7C3APESa nflS5+jxZXTniYqX55BiNeLGt5HtbWOnael7FH0AcOjqejTkJsOXFjBKrZCtw8Qyaryu neFw== X-Gm-Message-State: AO0yUKWpJeKPoNuK2GrC5IgpJZzD1XSEYiEWHA5GEuBHeKMZ8PNnsvAw 8puTNoJ7C/J0Gbqu7GPFp48TViVZCvR6+Kyt X-Received: by 2002:adf:dc0c:0:b0:2cb:f4:e59a with SMTP id t12-20020adfdc0c000000b002cb00f4e59amr3548924wri.71.1677506466356; Mon, 27 Feb 2023 06:01:06 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id s9-20020a5d4249000000b002c5598c14acsm7158514wrr.6.2023.02.27.06.01.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Feb 2023 06:01:05 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 01/25] include/hw/arm/allwinner-a10.h: Remove superfluous includes from the header Date: Mon, 27 Feb 2023 14:00:38 +0000 Message-Id: <20230227140102.3712344-2-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230227140102.3712344-1-peter.maydell@linaro.org> References: <20230227140102.3712344-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::436; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x436.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 From: Thomas Huth pci_device.h is not needed at all in allwinner-a10.h, and serial.h is only needed by the corresponding .c file. Signed-off-by: Thomas Huth Reviewed-by: Alex Bennée Message-id: 20230215152233.210024-1-thuth@redhat.com Signed-off-by: Peter Maydell --- include/hw/arm/allwinner-a10.h | 2 -- hw/arm/allwinner-a10.c | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/include/hw/arm/allwinner-a10.h b/include/hw/arm/allwinner-a10.h index 79e0c80568e..095afb225d6 100644 --- a/include/hw/arm/allwinner-a10.h +++ b/include/hw/arm/allwinner-a10.h @@ -1,9 +1,7 @@ #ifndef HW_ARM_ALLWINNER_A10_H #define HW_ARM_ALLWINNER_A10_H -#include "hw/char/serial.h" #include "hw/arm/boot.h" -#include "hw/pci/pci_device.h" #include "hw/timer/allwinner-a10-pit.h" #include "hw/intc/allwinner-a10-pic.h" #include "hw/net/allwinner_emac.h" diff --git a/hw/arm/allwinner-a10.c b/hw/arm/allwinner-a10.c index dc1966ff7a2..b7ca795c712 100644 --- a/hw/arm/allwinner-a10.c +++ b/hw/arm/allwinner-a10.c @@ -18,6 +18,7 @@ #include "qemu/osdep.h" #include "qapi/error.h" #include "qemu/module.h" +#include "hw/char/serial.h" #include "hw/sysbus.h" #include "hw/arm/allwinner-a10.h" #include "hw/misc/unimp.h" From patchwork Mon Feb 27 14:00:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 656976 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2366208wrb; Mon, 27 Feb 2023 06:02:29 -0800 (PST) X-Google-Smtp-Source: AK7set/Ta0IXwrptX4/IL8AH+E1lNkP7ojfpOYWOb5rGHxdY7i9y0unPKU35kDSJ1FxT7Zj3ULA9 X-Received: by 2002:a05:7500:3d8e:b0:f4:636:6c62 with SMTP id le14-20020a0575003d8e00b000f406366c62mr782837gab.25.1677506548922; Mon, 27 Feb 2023 06:02:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677506548; cv=none; d=google.com; s=arc-20160816; b=oNW0RWc0MfVurafjI6co8rYOZukFSyXYY2iUm6AoxNfb1l7u3sAEnO9aLbCo7i4kdN ci1/lmKj+E+AI9AT8gvrXXBAsuHuk/GStcx9rtLwR1drNl2xy+FH61wYPTGVRkPle+5r EJAw0yZH2lbfy3WCJy62uz83dIeALB8LKA87sQVDJsBPHbm2tddadvrX759DxCaAY0y5 wl2Td6ENhB47TFH1A+h/JzZM2pxymhcQe5bUmWKdeRvDVmz3a026f7SKDndWsh7vzexN tPIsW9dn4BRMX5Id99FZp+hPGymCKnuPm/i6ycJL2NqOh9oZ8cSImODWAvbJu9IEMgaA v0BQ== 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:to:from :dkim-signature; bh=vrjkaKCliIFkLE0ljnHmQFIiPqAoUGCU+4M0ENFMcrk=; b=VnilXMbh+Fm1nctnxctnR2APsJjIsYkiSMdV+igfQ2OKeGPei16euKHkd3v81BaKiR uKuavnxTe0y9F7TqyOYDm49O/Nhhkjtr8moEbQ/mBABXEV4SB3ajSfW3Qcuc0pCw3OnS 3p6yPM984DRXl3WDf4Kaq1jJcrN+4MwEAp+lONPGn3azI49+6ky8aqiTib+ktAF04MIU 8p6VdfOyxlJH1wTqOGQKxXYYZT9xrQte5KAiZwJxGZs9fV+0IeBfmnaOtTiFmv6NZC2o 0nupL14H/awopMHEnP4tr71OiyXWBFcg2zlRlY2L4QGM5AJQa0UVStOH9Rqm2rPvPlBw RPiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gRNlgXAB; 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 c23-20020a67ce97000000b004120b7d8c7bsi2396046vse.676.2023.02.27.06.02.28 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:02:28 -0800 (PST) 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=gRNlgXAB; 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 1pWe4q-00018r-7u; Mon, 27 Feb 2023 09:02:04 -0500 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 1pWe3z-0000VE-Ok for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:01:11 -0500 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWe3x-0007WR-Uq for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:01:11 -0500 Received: by mail-wr1-x42c.google.com with SMTP id r7so6329417wrz.6 for ; Mon, 27 Feb 2023 06:01:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=vrjkaKCliIFkLE0ljnHmQFIiPqAoUGCU+4M0ENFMcrk=; b=gRNlgXABrQlLN4CfgW1Z61p3m+VGHgsGU8hF7Yvj5/QE82BS81YVdsqXEx1/NGwYTu JMaTJTUJQFB6WcYMhcRkAVVQnTJy6ECw6i5lc6vh20fLXKj5ToWe/UjWqN5dWxT2482u S27zOUvnE03xwtAIog27jdG6Q2McFMT7QlpzLJDxKCT8apmC5OAb7V5XqChF5e3hTZ/n /yIIc+pp1EKlY+KXdFMP3yy1K8KlH8c5FWWBuOzZff+7Xp80wmDc7oSTOKHH/AX32n+Z 5SiYVmTi6Qo01Oq5Jw56qJRz0oZpUesu0CmQlpc6IdMiCMR5Sxb96OqGBaxsvjz2M+lu itvA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=vrjkaKCliIFkLE0ljnHmQFIiPqAoUGCU+4M0ENFMcrk=; b=I2rozQbDILvhtSqWMOqtV2pEyFaekqEt1V0sdZqSQAQ+rgAAxCn95p8xtLfKBWg6Rr p/iZUBpdnHet16BAvJmnymJS0YMxkreUYX0816dhnzyUdTkQ6ajld/waUkD6SWvtXFzu +idl+zAg1I6c0P++uREufbdXYYdM6LQ/APA6p3CT20XnAFUOMcoW8ektTTUPHqyZlv+x /r++nAtF4qytPHolMzJu43gBOlwDyiExvXM3r1bIwMs4XW7Sx9ywEtSS7MwHxZ5y6ozs eAPR4TfSPKoEptIrkCb8IbZl0Xb/QwA4pY+N/y7q06xb82xlH++f5qnVJVPnUxybN8SV AMDw== X-Gm-Message-State: AO0yUKV21in3HW57DYGkQvqZfDvVAXoKZ7RkckShRaZzsZ6/Cm08d8z7 zDeGljQfRGPZ0OAQWj2h7bvCUGXmOSdkYdad X-Received: by 2002:a5d:4447:0:b0:2c9:b3a9:b080 with SMTP id x7-20020a5d4447000000b002c9b3a9b080mr6098768wrr.16.1677506468299; Mon, 27 Feb 2023 06:01:08 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id s9-20020a5d4249000000b002c5598c14acsm7158514wrr.6.2023.02.27.06.01.06 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Feb 2023 06:01:07 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 02/25] target/arm: Wrap breakpoint/watchpoint updates with tcg_enabled Date: Mon, 27 Feb 2023 14:00:39 +0000 Message-Id: <20230227140102.3712344-3-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230227140102.3712344-1-peter.maydell@linaro.org> References: <20230227140102.3712344-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42c; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42c.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 From: Fabiano Rosas This is in preparation for restricting compilation of some parts of debug_helper.c to TCG only. Signed-off-by: Fabiano Rosas Reviewed-by: Richard Henderson Signed-off-by: Peter Maydell --- target/arm/cpu.c | 6 ++++-- target/arm/debug_helper.c | 16 ++++++++++++---- target/arm/machine.c | 7 +++++-- 3 files changed, 21 insertions(+), 8 deletions(-) diff --git a/target/arm/cpu.c b/target/arm/cpu.c index 876ab8f3bf8..da416f7b1cb 100644 --- a/target/arm/cpu.c +++ b/target/arm/cpu.c @@ -539,8 +539,10 @@ static void arm_cpu_reset_hold(Object *obj) } #endif - hw_breakpoint_update_all(cpu); - hw_watchpoint_update_all(cpu); + if (tcg_enabled()) { + hw_breakpoint_update_all(cpu); + hw_watchpoint_update_all(cpu); + } arm_rebuild_hflags(env); } diff --git a/target/arm/debug_helper.c b/target/arm/debug_helper.c index 3c671c88c1a..3325eb9d7df 100644 --- a/target/arm/debug_helper.c +++ b/target/arm/debug_helper.c @@ -939,7 +939,9 @@ static void dbgwvr_write(CPUARMState *env, const ARMCPRegInfo *ri, value &= ~3ULL; raw_write(env, ri, value); - hw_watchpoint_update(cpu, i); + if (tcg_enabled()) { + hw_watchpoint_update(cpu, i); + } } static void dbgwcr_write(CPUARMState *env, const ARMCPRegInfo *ri, @@ -949,7 +951,9 @@ static void dbgwcr_write(CPUARMState *env, const ARMCPRegInfo *ri, int i = ri->crm; raw_write(env, ri, value); - hw_watchpoint_update(cpu, i); + if (tcg_enabled()) { + hw_watchpoint_update(cpu, i); + } } void hw_breakpoint_update(ARMCPU *cpu, int n) @@ -1062,7 +1066,9 @@ static void dbgbvr_write(CPUARMState *env, const ARMCPRegInfo *ri, int i = ri->crm; raw_write(env, ri, value); - hw_breakpoint_update(cpu, i); + if (tcg_enabled()) { + hw_breakpoint_update(cpu, i); + } } static void dbgbcr_write(CPUARMState *env, const ARMCPRegInfo *ri, @@ -1079,7 +1085,9 @@ static void dbgbcr_write(CPUARMState *env, const ARMCPRegInfo *ri, value = deposit64(value, 8, 1, extract64(value, 7, 1)); raw_write(env, ri, value); - hw_breakpoint_update(cpu, i); + if (tcg_enabled()) { + hw_breakpoint_update(cpu, i); + } } void define_debug_regs(ARMCPU *cpu) diff --git a/target/arm/machine.c b/target/arm/machine.c index b4c3850570c..fd6323f6d8a 100644 --- a/target/arm/machine.c +++ b/target/arm/machine.c @@ -2,6 +2,7 @@ #include "cpu.h" #include "qemu/error-report.h" #include "sysemu/kvm.h" +#include "sysemu/tcg.h" #include "kvm_arm.h" #include "internals.h" #include "migration/cpu.h" @@ -848,8 +849,10 @@ static int cpu_post_load(void *opaque, int version_id) return -1; } - hw_breakpoint_update_all(cpu); - hw_watchpoint_update_all(cpu); + if (tcg_enabled()) { + hw_breakpoint_update_all(cpu); + hw_watchpoint_update_all(cpu); + } /* * TCG gen_update_fp_context() relies on the invariant that From patchwork Mon Feb 27 14:00:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 657007 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2370757wrb; Mon, 27 Feb 2023 06:08:59 -0800 (PST) X-Google-Smtp-Source: AK7set9yKi3FfWGs3YWCWMNPfzqohZqHsv7Nv1HuKODTd6liGN8VLv+Bz5Qu5rLZeA4bTHiS1o2q X-Received: by 2002:ac8:5f96:0:b0:3bf:ce2f:576c with SMTP id j22-20020ac85f96000000b003bfce2f576cmr11656648qta.66.1677506939679; Mon, 27 Feb 2023 06:08:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677506939; cv=none; d=google.com; s=arc-20160816; b=K5nmAOJ8UG89S9gQE/qBU+oXGxIu6YYJn8CjhdBiyO9FR818KeV8Ntr5zPw4KGBQqI z19HjkVqiAMjva9LI+/azptON3W+sepDrk+RJzTKmsa5VueaImUWHQCkynv2+7EIrj7l Bw74ZbIdN+YQ6Jh+DA2YAdWruY+jDZIimHlFUq52xhaQVcJT9FJKTcfBAWw2/vqvI4av aOTnTtAlX3XCZJgeDF2nSB2JiP6Q0jBoysdcm41+krFnSU4kItXmlpBLHy0uFvMpPYqD okc96I4qzWHvjXPUZdbOdRzEHsePAvWwBl5ASdBMla7UtzwzpysS4nkepC2Ak/0o+yOO Q1Uw== 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:to:from :dkim-signature; bh=bE93Hku4a49BxWD57nAmzE6RVeycvKgkJSiaEIVzgyM=; b=IVIBMXwDNpNEmE1klKvA+j0khUOPze4fS76HPCUrcQfoXuuWM748Jt0iktXiLiTTqZ QRT3j6nB1ShxZvB+emb5MbxzdL+/GuRyGfuWefzXg8TPZ6/hmTXdI9n5wAtp7tiXKP1/ HKkCtTLJga/NBoNvagouHzVCLgQeNwVRucDhw0CTLD+0Glx0hbVsmzj+pMiOUR0uTipL POL3EE/vDjHakv2usmmpB2WNb0yOT/Z3hoCbuEuW3jjBLZYV9+rItqb1rSwbR+maEQ6W 7yQVmgIYeO/uXciZgpvq5nxI2nXfqwp8yktKjiwwgCzp6Ntv1BonSItY6mpnheb3Fh6D iQlg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cttRIdDn; 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 j25-20020ac84059000000b003b9eb961e99si5710103qtl.600.2023.02.27.06.08.59 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:08:59 -0800 (PST) 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=cttRIdDn; 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 1pWe50-0001Qc-2p; Mon, 27 Feb 2023 09:02:14 -0500 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 1pWe42-0000YM-DS for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:01:29 -0500 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWe3z-0007Wi-Fn for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:01:13 -0500 Received: by mail-wr1-x431.google.com with SMTP id v16so3527855wrn.0 for ; Mon, 27 Feb 2023 06:01:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=bE93Hku4a49BxWD57nAmzE6RVeycvKgkJSiaEIVzgyM=; b=cttRIdDnTLIWVpKXNinp7BxgUlMnCzEHvR/J8bg6B8aEBLX9XaSGxXknR73qrVbnNi X3VyH5Td1WroJ+Ig+CUjtHmjSAr28i9HG/jHqkHzrYaR2xaMMww9pCoIyfjRmDi8UNKb I2QxOWNdHg+MkULlsRjaiudmmVlcFPgWdKuDF5BA8sQBWdGS0CHBxHSCdsejRT0i0GTC kHgwQnJLYTmV3OIBE4dcovaWdenuNEWtI83IAOpI3WVW4WL+vmwH+wKjayjXTmdw2QLn q/Mo2Ka/pcxBs2c3EFL0rfrBF7aoNuA1U4XroenVG49b2PloDZ2QyBW3xYLOyrX+4XTL 7d+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bE93Hku4a49BxWD57nAmzE6RVeycvKgkJSiaEIVzgyM=; b=4gJl+ptqustAfl6awYV6GLEStYa3CZXc8zwtUg5/aXpRQpxEH1+WGlTq4/PKDVQ9fK nbPMQDakiCzjuKiZWucoWcBsteSGNprhxiPmY0d4KREnrNDd9rRyJZP/BDLg/pxu3A1C KyRAhlll4dE6hl+czeo8PnivCuKKmngeNpzopn1GAderOVcf9SyfGyyZFwBKsKW6yWrS uGdQKZxN73NsrRDBfHIJeDKlhX7+LLy92pxcUQnFOLzKKKiq/K0uCh2FV6BqNl2Pon9u AIVzp8TZ2B/5pOGg4EHJD72g8OFCrSj/mbQDJympmtUrRsNk5iL7SedyxrAgiRou1Era BUEg== X-Gm-Message-State: AO0yUKVnOFLq4UKxI6Pv8FrDdZQAuyDDWyQEoP3ZOZm03DSXMYdp1Vj1 l3yHdGBbadeC6k7jQRWaJXqqQXbjXLhoYME9 X-Received: by 2002:adf:ef8e:0:b0:2c7:83b:9d20 with SMTP id d14-20020adfef8e000000b002c7083b9d20mr15669589wro.34.1677506469590; Mon, 27 Feb 2023 06:01:09 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id s9-20020a5d4249000000b002c5598c14acsm7158514wrr.6.2023.02.27.06.01.08 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Feb 2023 06:01:08 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 03/25] target/arm: Wrap TCG-only code in debug_helper.c Date: Mon, 27 Feb 2023 14:00:40 +0000 Message-Id: <20230227140102.3712344-4-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230227140102.3712344-1-peter.maydell@linaro.org> References: <20230227140102.3712344-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::431; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x431.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 From: Fabiano Rosas The next few patches will move helpers under CONFIG_TCG. We'd prefer to keep the debug helpers and debug registers close together, so rearrange the file a bit to be able to wrap the helpers with a TCG ifdef. Signed-off-by: Fabiano Rosas Reviewed-by: Richard Henderson Signed-off-by: Peter Maydell --- target/arm/debug_helper.c | 476 +++++++++++++++++++------------------- 1 file changed, 239 insertions(+), 237 deletions(-) diff --git a/target/arm/debug_helper.c b/target/arm/debug_helper.c index 3325eb9d7df..dfc8b2a1a5d 100644 --- a/target/arm/debug_helper.c +++ b/target/arm/debug_helper.c @@ -12,8 +12,9 @@ #include "cpregs.h" #include "exec/exec-all.h" #include "exec/helper-proto.h" +#include "sysemu/tcg.h" - +#ifdef CONFIG_TCG /* Return the Exception Level targeted by debug exceptions. */ static int arm_debug_target_el(CPUARMState *env) { @@ -536,6 +537,243 @@ void HELPER(exception_swstep)(CPUARMState *env, uint32_t syndrome) raise_exception_debug(env, EXCP_UDEF, syndrome); } +void hw_watchpoint_update(ARMCPU *cpu, int n) +{ + CPUARMState *env = &cpu->env; + vaddr len = 0; + vaddr wvr = env->cp15.dbgwvr[n]; + uint64_t wcr = env->cp15.dbgwcr[n]; + int mask; + int flags = BP_CPU | BP_STOP_BEFORE_ACCESS; + + if (env->cpu_watchpoint[n]) { + cpu_watchpoint_remove_by_ref(CPU(cpu), env->cpu_watchpoint[n]); + env->cpu_watchpoint[n] = NULL; + } + + if (!FIELD_EX64(wcr, DBGWCR, E)) { + /* E bit clear : watchpoint disabled */ + return; + } + + switch (FIELD_EX64(wcr, DBGWCR, LSC)) { + case 0: + /* LSC 00 is reserved and must behave as if the wp is disabled */ + return; + case 1: + flags |= BP_MEM_READ; + break; + case 2: + flags |= BP_MEM_WRITE; + break; + case 3: + flags |= BP_MEM_ACCESS; + break; + } + + /* + * Attempts to use both MASK and BAS fields simultaneously are + * CONSTRAINED UNPREDICTABLE; we opt to ignore BAS in this case, + * thus generating a watchpoint for every byte in the masked region. + */ + mask = FIELD_EX64(wcr, DBGWCR, MASK); + if (mask == 1 || mask == 2) { + /* + * Reserved values of MASK; we must act as if the mask value was + * some non-reserved value, or as if the watchpoint were disabled. + * We choose the latter. + */ + return; + } else if (mask) { + /* Watchpoint covers an aligned area up to 2GB in size */ + len = 1ULL << mask; + /* + * If masked bits in WVR are not zero it's CONSTRAINED UNPREDICTABLE + * whether the watchpoint fires when the unmasked bits match; we opt + * to generate the exceptions. + */ + wvr &= ~(len - 1); + } else { + /* Watchpoint covers bytes defined by the byte address select bits */ + int bas = FIELD_EX64(wcr, DBGWCR, BAS); + int basstart; + + if (extract64(wvr, 2, 1)) { + /* + * Deprecated case of an only 4-aligned address. BAS[7:4] are + * ignored, and BAS[3:0] define which bytes to watch. + */ + bas &= 0xf; + } + + if (bas == 0) { + /* This must act as if the watchpoint is disabled */ + return; + } + + /* + * The BAS bits are supposed to be programmed to indicate a contiguous + * range of bytes. Otherwise it is CONSTRAINED UNPREDICTABLE whether + * we fire for each byte in the word/doubleword addressed by the WVR. + * We choose to ignore any non-zero bits after the first range of 1s. + */ + basstart = ctz32(bas); + len = cto32(bas >> basstart); + wvr += basstart; + } + + cpu_watchpoint_insert(CPU(cpu), wvr, len, flags, + &env->cpu_watchpoint[n]); +} + +void hw_watchpoint_update_all(ARMCPU *cpu) +{ + int i; + CPUARMState *env = &cpu->env; + + /* + * Completely clear out existing QEMU watchpoints and our array, to + * avoid possible stale entries following migration load. + */ + cpu_watchpoint_remove_all(CPU(cpu), BP_CPU); + memset(env->cpu_watchpoint, 0, sizeof(env->cpu_watchpoint)); + + for (i = 0; i < ARRAY_SIZE(cpu->env.cpu_watchpoint); i++) { + hw_watchpoint_update(cpu, i); + } +} + +void hw_breakpoint_update(ARMCPU *cpu, int n) +{ + CPUARMState *env = &cpu->env; + uint64_t bvr = env->cp15.dbgbvr[n]; + uint64_t bcr = env->cp15.dbgbcr[n]; + vaddr addr; + int bt; + int flags = BP_CPU; + + if (env->cpu_breakpoint[n]) { + cpu_breakpoint_remove_by_ref(CPU(cpu), env->cpu_breakpoint[n]); + env->cpu_breakpoint[n] = NULL; + } + + if (!extract64(bcr, 0, 1)) { + /* E bit clear : watchpoint disabled */ + return; + } + + bt = extract64(bcr, 20, 4); + + switch (bt) { + case 4: /* unlinked address mismatch (reserved if AArch64) */ + case 5: /* linked address mismatch (reserved if AArch64) */ + qemu_log_mask(LOG_UNIMP, + "arm: address mismatch breakpoint types not implemented\n"); + return; + case 0: /* unlinked address match */ + case 1: /* linked address match */ + { + /* + * Bits [1:0] are RES0. + * + * It is IMPLEMENTATION DEFINED whether bits [63:49] + * ([63:53] for FEAT_LVA) are hardwired to a copy of the sign bit + * of the VA field ([48] or [52] for FEAT_LVA), or whether the + * value is read as written. It is CONSTRAINED UNPREDICTABLE + * whether the RESS bits are ignored when comparing an address. + * Therefore we are allowed to compare the entire register, which + * lets us avoid considering whether FEAT_LVA is actually enabled. + * + * The BAS field is used to allow setting breakpoints on 16-bit + * wide instructions; it is CONSTRAINED UNPREDICTABLE whether + * a bp will fire if the addresses covered by the bp and the addresses + * covered by the insn overlap but the insn doesn't start at the + * start of the bp address range. We choose to require the insn and + * the bp to have the same address. The constraints on writing to + * BAS enforced in dbgbcr_write mean we have only four cases: + * 0b0000 => no breakpoint + * 0b0011 => breakpoint on addr + * 0b1100 => breakpoint on addr + 2 + * 0b1111 => breakpoint on addr + * See also figure D2-3 in the v8 ARM ARM (DDI0487A.c). + */ + int bas = extract64(bcr, 5, 4); + addr = bvr & ~3ULL; + if (bas == 0) { + return; + } + if (bas == 0xc) { + addr += 2; + } + break; + } + case 2: /* unlinked context ID match */ + case 8: /* unlinked VMID match (reserved if no EL2) */ + case 10: /* unlinked context ID and VMID match (reserved if no EL2) */ + qemu_log_mask(LOG_UNIMP, + "arm: unlinked context breakpoint types not implemented\n"); + return; + case 9: /* linked VMID match (reserved if no EL2) */ + case 11: /* linked context ID and VMID match (reserved if no EL2) */ + case 3: /* linked context ID match */ + default: + /* + * We must generate no events for Linked context matches (unless + * they are linked to by some other bp/wp, which is handled in + * updates for the linking bp/wp). We choose to also generate no events + * for reserved values. + */ + return; + } + + cpu_breakpoint_insert(CPU(cpu), addr, flags, &env->cpu_breakpoint[n]); +} + +void hw_breakpoint_update_all(ARMCPU *cpu) +{ + int i; + CPUARMState *env = &cpu->env; + + /* + * Completely clear out existing QEMU breakpoints and our array, to + * avoid possible stale entries following migration load. + */ + cpu_breakpoint_remove_all(CPU(cpu), BP_CPU); + memset(env->cpu_breakpoint, 0, sizeof(env->cpu_breakpoint)); + + for (i = 0; i < ARRAY_SIZE(cpu->env.cpu_breakpoint); i++) { + hw_breakpoint_update(cpu, i); + } +} + +#if !defined(CONFIG_USER_ONLY) + +vaddr arm_adjust_watchpoint_address(CPUState *cs, vaddr addr, int len) +{ + ARMCPU *cpu = ARM_CPU(cs); + CPUARMState *env = &cpu->env; + + /* + * In BE32 system mode, target memory is stored byteswapped (on a + * little-endian host system), and by the time we reach here (via an + * opcode helper) the addresses of subword accesses have been adjusted + * to account for that, which means that watchpoints will not match. + * Undo the adjustment here. + */ + if (arm_sctlr_b(env)) { + if (len == 1) { + addr ^= 3; + } else if (len == 2) { + addr ^= 2; + } + } + + return addr; +} + +#endif /* !CONFIG_USER_ONLY */ +#endif /* CONFIG_TCG */ + /* * Check for traps to "powerdown debug" registers, which are controlled * by MDCR.TDOSA @@ -813,112 +1051,6 @@ static const ARMCPRegInfo debug_lpae_cp_reginfo[] = { .access = PL0_R, .type = ARM_CP_CONST | ARM_CP_64BIT, .resetvalue = 0 }, }; -void hw_watchpoint_update(ARMCPU *cpu, int n) -{ - CPUARMState *env = &cpu->env; - vaddr len = 0; - vaddr wvr = env->cp15.dbgwvr[n]; - uint64_t wcr = env->cp15.dbgwcr[n]; - int mask; - int flags = BP_CPU | BP_STOP_BEFORE_ACCESS; - - if (env->cpu_watchpoint[n]) { - cpu_watchpoint_remove_by_ref(CPU(cpu), env->cpu_watchpoint[n]); - env->cpu_watchpoint[n] = NULL; - } - - if (!FIELD_EX64(wcr, DBGWCR, E)) { - /* E bit clear : watchpoint disabled */ - return; - } - - switch (FIELD_EX64(wcr, DBGWCR, LSC)) { - case 0: - /* LSC 00 is reserved and must behave as if the wp is disabled */ - return; - case 1: - flags |= BP_MEM_READ; - break; - case 2: - flags |= BP_MEM_WRITE; - break; - case 3: - flags |= BP_MEM_ACCESS; - break; - } - - /* - * Attempts to use both MASK and BAS fields simultaneously are - * CONSTRAINED UNPREDICTABLE; we opt to ignore BAS in this case, - * thus generating a watchpoint for every byte in the masked region. - */ - mask = FIELD_EX64(wcr, DBGWCR, MASK); - if (mask == 1 || mask == 2) { - /* - * Reserved values of MASK; we must act as if the mask value was - * some non-reserved value, or as if the watchpoint were disabled. - * We choose the latter. - */ - return; - } else if (mask) { - /* Watchpoint covers an aligned area up to 2GB in size */ - len = 1ULL << mask; - /* - * If masked bits in WVR are not zero it's CONSTRAINED UNPREDICTABLE - * whether the watchpoint fires when the unmasked bits match; we opt - * to generate the exceptions. - */ - wvr &= ~(len - 1); - } else { - /* Watchpoint covers bytes defined by the byte address select bits */ - int bas = FIELD_EX64(wcr, DBGWCR, BAS); - int basstart; - - if (extract64(wvr, 2, 1)) { - /* - * Deprecated case of an only 4-aligned address. BAS[7:4] are - * ignored, and BAS[3:0] define which bytes to watch. - */ - bas &= 0xf; - } - - if (bas == 0) { - /* This must act as if the watchpoint is disabled */ - return; - } - - /* - * The BAS bits are supposed to be programmed to indicate a contiguous - * range of bytes. Otherwise it is CONSTRAINED UNPREDICTABLE whether - * we fire for each byte in the word/doubleword addressed by the WVR. - * We choose to ignore any non-zero bits after the first range of 1s. - */ - basstart = ctz32(bas); - len = cto32(bas >> basstart); - wvr += basstart; - } - - cpu_watchpoint_insert(CPU(cpu), wvr, len, flags, - &env->cpu_watchpoint[n]); -} - -void hw_watchpoint_update_all(ARMCPU *cpu) -{ - int i; - CPUARMState *env = &cpu->env; - - /* - * Completely clear out existing QEMU watchpoints and our array, to - * avoid possible stale entries following migration load. - */ - cpu_watchpoint_remove_all(CPU(cpu), BP_CPU); - memset(env->cpu_watchpoint, 0, sizeof(env->cpu_watchpoint)); - - for (i = 0; i < ARRAY_SIZE(cpu->env.cpu_watchpoint); i++) { - hw_watchpoint_update(cpu, i); - } -} - static void dbgwvr_write(CPUARMState *env, const ARMCPRegInfo *ri, uint64_t value) { @@ -956,109 +1088,6 @@ static void dbgwcr_write(CPUARMState *env, const ARMCPRegInfo *ri, } } -void hw_breakpoint_update(ARMCPU *cpu, int n) -{ - CPUARMState *env = &cpu->env; - uint64_t bvr = env->cp15.dbgbvr[n]; - uint64_t bcr = env->cp15.dbgbcr[n]; - vaddr addr; - int bt; - int flags = BP_CPU; - - if (env->cpu_breakpoint[n]) { - cpu_breakpoint_remove_by_ref(CPU(cpu), env->cpu_breakpoint[n]); - env->cpu_breakpoint[n] = NULL; - } - - if (!extract64(bcr, 0, 1)) { - /* E bit clear : watchpoint disabled */ - return; - } - - bt = extract64(bcr, 20, 4); - - switch (bt) { - case 4: /* unlinked address mismatch (reserved if AArch64) */ - case 5: /* linked address mismatch (reserved if AArch64) */ - qemu_log_mask(LOG_UNIMP, - "arm: address mismatch breakpoint types not implemented\n"); - return; - case 0: /* unlinked address match */ - case 1: /* linked address match */ - { - /* - * Bits [1:0] are RES0. - * - * It is IMPLEMENTATION DEFINED whether bits [63:49] - * ([63:53] for FEAT_LVA) are hardwired to a copy of the sign bit - * of the VA field ([48] or [52] for FEAT_LVA), or whether the - * value is read as written. It is CONSTRAINED UNPREDICTABLE - * whether the RESS bits are ignored when comparing an address. - * Therefore we are allowed to compare the entire register, which - * lets us avoid considering whether FEAT_LVA is actually enabled. - * - * The BAS field is used to allow setting breakpoints on 16-bit - * wide instructions; it is CONSTRAINED UNPREDICTABLE whether - * a bp will fire if the addresses covered by the bp and the addresses - * covered by the insn overlap but the insn doesn't start at the - * start of the bp address range. We choose to require the insn and - * the bp to have the same address. The constraints on writing to - * BAS enforced in dbgbcr_write mean we have only four cases: - * 0b0000 => no breakpoint - * 0b0011 => breakpoint on addr - * 0b1100 => breakpoint on addr + 2 - * 0b1111 => breakpoint on addr - * See also figure D2-3 in the v8 ARM ARM (DDI0487A.c). - */ - int bas = extract64(bcr, 5, 4); - addr = bvr & ~3ULL; - if (bas == 0) { - return; - } - if (bas == 0xc) { - addr += 2; - } - break; - } - case 2: /* unlinked context ID match */ - case 8: /* unlinked VMID match (reserved if no EL2) */ - case 10: /* unlinked context ID and VMID match (reserved if no EL2) */ - qemu_log_mask(LOG_UNIMP, - "arm: unlinked context breakpoint types not implemented\n"); - return; - case 9: /* linked VMID match (reserved if no EL2) */ - case 11: /* linked context ID and VMID match (reserved if no EL2) */ - case 3: /* linked context ID match */ - default: - /* - * We must generate no events for Linked context matches (unless - * they are linked to by some other bp/wp, which is handled in - * updates for the linking bp/wp). We choose to also generate no events - * for reserved values. - */ - return; - } - - cpu_breakpoint_insert(CPU(cpu), addr, flags, &env->cpu_breakpoint[n]); -} - -void hw_breakpoint_update_all(ARMCPU *cpu) -{ - int i; - CPUARMState *env = &cpu->env; - - /* - * Completely clear out existing QEMU breakpoints and our array, to - * avoid possible stale entries following migration load. - */ - cpu_breakpoint_remove_all(CPU(cpu), BP_CPU); - memset(env->cpu_breakpoint, 0, sizeof(env->cpu_breakpoint)); - - for (i = 0; i < ARRAY_SIZE(cpu->env.cpu_breakpoint); i++) { - hw_breakpoint_update(cpu, i); - } -} - static void dbgbvr_write(CPUARMState *env, const ARMCPRegInfo *ri, uint64_t value) { @@ -1210,30 +1239,3 @@ void define_debug_regs(ARMCPU *cpu) g_free(dbgwcr_el1_name); } } - -#if !defined(CONFIG_USER_ONLY) - -vaddr arm_adjust_watchpoint_address(CPUState *cs, vaddr addr, int len) -{ - ARMCPU *cpu = ARM_CPU(cs); - CPUARMState *env = &cpu->env; - - /* - * In BE32 system mode, target memory is stored byteswapped (on a - * little-endian host system), and by the time we reach here (via an - * opcode helper) the addresses of subword accesses have been adjusted - * to account for that, which means that watchpoints will not match. - * Undo the adjustment here. - */ - if (arm_sctlr_b(env)) { - if (len == 1) { - addr ^= 3; - } else if (len == 2) { - addr ^= 2; - } - } - - return addr; -} - -#endif From patchwork Mon Feb 27 14:00:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 656980 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2366953wrb; Mon, 27 Feb 2023 06:03:26 -0800 (PST) X-Google-Smtp-Source: AK7set/0/xl2vVyfFqOouMYqEwoYcSOwL0k3UfcpXUqv8t+CPNc6YSnhOzOvP6V7H72d+xs5PtyC X-Received: by 2002:a05:622a:34c:b0:3bf:ce18:a54b with SMTP id r12-20020a05622a034c00b003bfce18a54bmr11984304qtw.33.1677506606700; Mon, 27 Feb 2023 06:03:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677506606; cv=none; d=google.com; s=arc-20160816; b=rFEGArTAjWLt56oueDadFHP36sq4QQ+FSGoDbz+ioKZmvxZAHGO5xo1vgVhtWj12GV wsZR2pP0BjJdOSIg1JAjDxkkq67MOFmd8KIGFjHVsWo9AFq2/34iOTcO3oM9gnlQJo0Z sFJqRClCjwLag8Rv5T7/hNw3cZSbptXQO1okfR1RNcDjrjZOA1sqdCf9y/ivDeuLkVsY y1tMp/0H45L94MYia7+sYUClnivNh+0sDSiFs+uCuPL7ELcWuTiRhU8qk19fVk+4nDOb VKAfBPJ2I9zmAdnMeDGZ4NHxyO5glKBoIGHjVSbTWtTtQ3pWbBbrrHGz5h2i+hnD0k8R RKCA== 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:to:from :dkim-signature; bh=yWuIpfN973PjPZqsEuqLsmILfrrzNt0DJYDKzdG9yUE=; b=AFxzHrgmC4Xs3poZZKGmmizFCtfq4eHG8Pp9S7hFiD7qBhkz8LGiX16aO3XSP7ACVy QGcfbJs5NF4/I3GApHsI+ne/4yI4I1f1rF9Rp70/vq+SouIVdZ3cyT0A7idaSbdlFuXU CS0Um4OEG0oBTnpXWwH0X5MyR8UFNJSrnMx+degF9cZHPN7uHXYNG+fvxEfrdGQpd+gR yvsW0Cfr1L880ObArnIcZZ46dFS4NA5seIUG+4TTIemHGts/F7QQQsm+C9TejhGLoyLl g8xtYOI7Q/RzFPF5c0Ah8EP4aWVwWniiYGCaG0S7Ce4UAwCWF3mB4fICeOnK4Nt5QbUn +ItA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hfaGH2e0; 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 h8-20020a05620a400800b0071dec9ab3fcsi7396028qko.16.2023.02.27.06.03.26 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:03:26 -0800 (PST) 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=hfaGH2e0; 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 1pWe5E-00034H-10; Mon, 27 Feb 2023 09:02:28 -0500 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 1pWe45-0000dJ-Kr for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:01:29 -0500 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWe40-0007Ww-M0 for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:01:14 -0500 Received: by mail-wm1-x32c.google.com with SMTP id r19-20020a05600c459300b003eb3e2a5e7bso2250201wmo.0 for ; Mon, 27 Feb 2023 06:01:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=yWuIpfN973PjPZqsEuqLsmILfrrzNt0DJYDKzdG9yUE=; b=hfaGH2e0HckZ0GVT5xJ+NNrEo8UjdQ2L1hoqUgCJywc2a2q3UP/AlFEzNG0NBJXDOY wETuo08Lq0jmLPwJwEK0fC9teP/6KWsxGE0xCaQaxrWgMrYGy65nN4qsW7ODaojUfqT6 lAs/sxfwq5ltKqQ+zQnnMzJHkdf89oMgSaVqI8/YIjx2HeQ2va5fAASkipPnbmtCRPMs qJ4a9WMCo9PqeKO5TTMk/geRcyfSLXLHQ/lzWm69UDlqbi+gQRP973KpP/tmA4bPzv9u PKL6/dn+nPsgkCAPkuLJWmTiTsZi2BePpTG0i6/8kMVsUqGTpPd9km9lzZ/wtP5Tm6XX GbuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=yWuIpfN973PjPZqsEuqLsmILfrrzNt0DJYDKzdG9yUE=; b=HVonET8lB9T1jqThcb5OsqRwbp+jzpWvqpd1hh2/QTmF6B2d7BKyziU79sATirnUyV 3e9hab/hR7FwC5eOCY3Bm+cGvCEy3kcLIoaPSkVmOtHvtNkh+fSmXvuK2KU/DwZhL4hB iouQvT4rpvAWEypjM73CdCdiOqyNvN6aLZNc4odDYR/ifivMbsbsHX4oFuByWKObs5wP /knvj7CBKSMEYJ7xDsgoNFlUD9meQq8ZwOtJhduPVCzjhs/fWszggBIMAhDGTylyCOMn /9NW9ozNAE+4B27V+vrvynRcffSVVjUQ+u6vg9hMKnQmPn4expNfgovLvvIpjUI1wEs+ c0rg== X-Gm-Message-State: AO0yUKW5iVEgTWXadkRf0lERKlvpNLxJ9Q3tprOp2FepUWqoXzOWDfVj d4Xwhs+qq5YkrAkUnHBDTPiTy0K4R5vrD4vG X-Received: by 2002:a05:600c:4da2:b0:3e2:19b0:887d with SMTP id v34-20020a05600c4da200b003e219b0887dmr19902962wmp.25.1677506470906; Mon, 27 Feb 2023 06:01:10 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id s9-20020a5d4249000000b002c5598c14acsm7158514wrr.6.2023.02.27.06.01.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Feb 2023 06:01:09 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 04/25] target/arm: move translate modules to tcg/ Date: Mon, 27 Feb 2023 14:00:41 +0000 Message-Id: <20230227140102.3712344-5-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230227140102.3712344-1-peter.maydell@linaro.org> References: <20230227140102.3712344-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32c; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x32c.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 From: Fabiano Rosas Introduce the target/arm/tcg directory. Its purpose is to hold the TCG code that is selected by CONFIG_TCG. Signed-off-by: Claudio Fontana Signed-off-by: Fabiano Rosas Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Signed-off-by: Peter Maydell --- MAINTAINERS | 1 + target/arm/{ => tcg}/translate-a64.h | 0 target/arm/{ => tcg}/translate.h | 0 target/arm/{ => tcg}/a32-uncond.decode | 0 target/arm/{ => tcg}/a32.decode | 0 target/arm/{ => tcg}/m-nocp.decode | 0 target/arm/{ => tcg}/mve.decode | 0 target/arm/{ => tcg}/neon-dp.decode | 0 target/arm/{ => tcg}/neon-ls.decode | 0 target/arm/{ => tcg}/neon-shared.decode | 0 target/arm/{ => tcg}/sme-fa64.decode | 0 target/arm/{ => tcg}/sme.decode | 0 target/arm/{ => tcg}/sve.decode | 0 target/arm/{ => tcg}/t16.decode | 0 target/arm/{ => tcg}/t32.decode | 0 target/arm/{ => tcg}/vfp-uncond.decode | 0 target/arm/{ => tcg}/vfp.decode | 0 target/arm/{ => tcg}/translate-a64.c | 0 target/arm/{ => tcg}/translate-m-nocp.c | 0 target/arm/{ => tcg}/translate-mve.c | 0 target/arm/{ => tcg}/translate-neon.c | 0 target/arm/{ => tcg}/translate-sme.c | 0 target/arm/{ => tcg}/translate-sve.c | 0 target/arm/{ => tcg}/translate-vfp.c | 0 target/arm/{ => tcg}/translate.c | 0 target/arm/meson.build | 30 +++--------------- target/arm/{ => tcg}/meson.build | 41 +------------------------ 27 files changed, 6 insertions(+), 66 deletions(-) rename target/arm/{ => tcg}/translate-a64.h (100%) rename target/arm/{ => tcg}/translate.h (100%) rename target/arm/{ => tcg}/a32-uncond.decode (100%) rename target/arm/{ => tcg}/a32.decode (100%) rename target/arm/{ => tcg}/m-nocp.decode (100%) rename target/arm/{ => tcg}/mve.decode (100%) rename target/arm/{ => tcg}/neon-dp.decode (100%) rename target/arm/{ => tcg}/neon-ls.decode (100%) rename target/arm/{ => tcg}/neon-shared.decode (100%) rename target/arm/{ => tcg}/sme-fa64.decode (100%) rename target/arm/{ => tcg}/sme.decode (100%) rename target/arm/{ => tcg}/sve.decode (100%) rename target/arm/{ => tcg}/t16.decode (100%) rename target/arm/{ => tcg}/t32.decode (100%) rename target/arm/{ => tcg}/vfp-uncond.decode (100%) rename target/arm/{ => tcg}/vfp.decode (100%) rename target/arm/{ => tcg}/translate-a64.c (100%) rename target/arm/{ => tcg}/translate-m-nocp.c (100%) rename target/arm/{ => tcg}/translate-mve.c (100%) rename target/arm/{ => tcg}/translate-neon.c (100%) rename target/arm/{ => tcg}/translate-sme.c (100%) rename target/arm/{ => tcg}/translate-sve.c (100%) rename target/arm/{ => tcg}/translate-vfp.c (100%) rename target/arm/{ => tcg}/translate.c (100%) copy target/arm/{ => tcg}/meson.build (64%) diff --git a/MAINTAINERS b/MAINTAINERS index 5c1ee411397..c6e6549f069 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -161,6 +161,7 @@ M: Peter Maydell L: qemu-arm@nongnu.org S: Maintained F: target/arm/ +F: target/arm/tcg/ F: tests/tcg/arm/ F: tests/tcg/aarch64/ F: tests/qtest/arm-cpu-features.c diff --git a/target/arm/translate-a64.h b/target/arm/tcg/translate-a64.h similarity index 100% rename from target/arm/translate-a64.h rename to target/arm/tcg/translate-a64.h diff --git a/target/arm/translate.h b/target/arm/tcg/translate.h similarity index 100% rename from target/arm/translate.h rename to target/arm/tcg/translate.h diff --git a/target/arm/a32-uncond.decode b/target/arm/tcg/a32-uncond.decode similarity index 100% rename from target/arm/a32-uncond.decode rename to target/arm/tcg/a32-uncond.decode diff --git a/target/arm/a32.decode b/target/arm/tcg/a32.decode similarity index 100% rename from target/arm/a32.decode rename to target/arm/tcg/a32.decode diff --git a/target/arm/m-nocp.decode b/target/arm/tcg/m-nocp.decode similarity index 100% rename from target/arm/m-nocp.decode rename to target/arm/tcg/m-nocp.decode diff --git a/target/arm/mve.decode b/target/arm/tcg/mve.decode similarity index 100% rename from target/arm/mve.decode rename to target/arm/tcg/mve.decode diff --git a/target/arm/neon-dp.decode b/target/arm/tcg/neon-dp.decode similarity index 100% rename from target/arm/neon-dp.decode rename to target/arm/tcg/neon-dp.decode diff --git a/target/arm/neon-ls.decode b/target/arm/tcg/neon-ls.decode similarity index 100% rename from target/arm/neon-ls.decode rename to target/arm/tcg/neon-ls.decode diff --git a/target/arm/neon-shared.decode b/target/arm/tcg/neon-shared.decode similarity index 100% rename from target/arm/neon-shared.decode rename to target/arm/tcg/neon-shared.decode diff --git a/target/arm/sme-fa64.decode b/target/arm/tcg/sme-fa64.decode similarity index 100% rename from target/arm/sme-fa64.decode rename to target/arm/tcg/sme-fa64.decode diff --git a/target/arm/sme.decode b/target/arm/tcg/sme.decode similarity index 100% rename from target/arm/sme.decode rename to target/arm/tcg/sme.decode diff --git a/target/arm/sve.decode b/target/arm/tcg/sve.decode similarity index 100% rename from target/arm/sve.decode rename to target/arm/tcg/sve.decode diff --git a/target/arm/t16.decode b/target/arm/tcg/t16.decode similarity index 100% rename from target/arm/t16.decode rename to target/arm/tcg/t16.decode diff --git a/target/arm/t32.decode b/target/arm/tcg/t32.decode similarity index 100% rename from target/arm/t32.decode rename to target/arm/tcg/t32.decode diff --git a/target/arm/vfp-uncond.decode b/target/arm/tcg/vfp-uncond.decode similarity index 100% rename from target/arm/vfp-uncond.decode rename to target/arm/tcg/vfp-uncond.decode diff --git a/target/arm/vfp.decode b/target/arm/tcg/vfp.decode similarity index 100% rename from target/arm/vfp.decode rename to target/arm/tcg/vfp.decode diff --git a/target/arm/translate-a64.c b/target/arm/tcg/translate-a64.c similarity index 100% rename from target/arm/translate-a64.c rename to target/arm/tcg/translate-a64.c diff --git a/target/arm/translate-m-nocp.c b/target/arm/tcg/translate-m-nocp.c similarity index 100% rename from target/arm/translate-m-nocp.c rename to target/arm/tcg/translate-m-nocp.c diff --git a/target/arm/translate-mve.c b/target/arm/tcg/translate-mve.c similarity index 100% rename from target/arm/translate-mve.c rename to target/arm/tcg/translate-mve.c diff --git a/target/arm/translate-neon.c b/target/arm/tcg/translate-neon.c similarity index 100% rename from target/arm/translate-neon.c rename to target/arm/tcg/translate-neon.c diff --git a/target/arm/translate-sme.c b/target/arm/tcg/translate-sme.c similarity index 100% rename from target/arm/translate-sme.c rename to target/arm/tcg/translate-sme.c diff --git a/target/arm/translate-sve.c b/target/arm/tcg/translate-sve.c similarity index 100% rename from target/arm/translate-sve.c rename to target/arm/tcg/translate-sve.c diff --git a/target/arm/translate-vfp.c b/target/arm/tcg/translate-vfp.c similarity index 100% rename from target/arm/translate-vfp.c rename to target/arm/tcg/translate-vfp.c diff --git a/target/arm/translate.c b/target/arm/tcg/translate.c similarity index 100% rename from target/arm/translate.c rename to target/arm/tcg/translate.c diff --git a/target/arm/meson.build b/target/arm/meson.build index 87e911b27fb..b2904b676b0 100644 --- a/target/arm/meson.build +++ b/target/arm/meson.build @@ -1,22 +1,4 @@ -gen = [ - decodetree.process('sve.decode', extra_args: '--decode=disas_sve'), - decodetree.process('sme.decode', extra_args: '--decode=disas_sme'), - decodetree.process('sme-fa64.decode', extra_args: '--static-decode=disas_sme_fa64'), - decodetree.process('neon-shared.decode', extra_args: '--decode=disas_neon_shared'), - decodetree.process('neon-dp.decode', extra_args: '--decode=disas_neon_dp'), - decodetree.process('neon-ls.decode', extra_args: '--decode=disas_neon_ls'), - decodetree.process('vfp.decode', extra_args: '--decode=disas_vfp'), - decodetree.process('vfp-uncond.decode', extra_args: '--decode=disas_vfp_uncond'), - decodetree.process('m-nocp.decode', extra_args: '--decode=disas_m_nocp'), - decodetree.process('mve.decode', extra_args: '--decode=disas_mve'), - decodetree.process('a32.decode', extra_args: '--static-decode=disas_a32'), - decodetree.process('a32-uncond.decode', extra_args: '--static-decode=disas_a32_uncond'), - decodetree.process('t32.decode', extra_args: '--static-decode=disas_t32'), - decodetree.process('t16.decode', extra_args: ['-w', '16', '--static-decode=disas_t16']), -] - arm_ss = ss.source_set() -arm_ss.add(gen) arm_ss.add(files( 'cpu.c', 'crypto_helper.c', @@ -29,11 +11,6 @@ arm_ss.add(files( 'neon_helper.c', 'op_helper.c', 'tlb_helper.c', - 'translate.c', - 'translate-m-nocp.c', - 'translate-mve.c', - 'translate-neon.c', - 'translate-vfp.c', 'vec_helper.c', 'vfp_helper.c', 'cpu_tcg.c', @@ -50,9 +27,6 @@ arm_ss.add(when: 'TARGET_AARCH64', if_true: files( 'pauth_helper.c', 'sve_helper.c', 'sme_helper.c', - 'translate-a64.c', - 'translate-sve.c', - 'translate-sme.c', )) arm_softmmu_ss = ss.source_set() @@ -67,5 +41,9 @@ arm_softmmu_ss.add(files( subdir('hvf') +if 'CONFIG_TCG' in config_all + subdir('tcg') +endif + target_arch += {'arm': arm_ss} target_softmmu_arch += {'arm': arm_softmmu_ss} diff --git a/target/arm/meson.build b/target/arm/tcg/meson.build similarity index 64% copy from target/arm/meson.build copy to target/arm/tcg/meson.build index 87e911b27fb..044561bd4de 100644 --- a/target/arm/meson.build +++ b/target/arm/tcg/meson.build @@ -15,57 +15,18 @@ gen = [ decodetree.process('t16.decode', extra_args: ['-w', '16', '--static-decode=disas_t16']), ] -arm_ss = ss.source_set() arm_ss.add(gen) + arm_ss.add(files( - 'cpu.c', - 'crypto_helper.c', - 'debug_helper.c', - 'gdbstub.c', - 'helper.c', - 'iwmmxt_helper.c', - 'm_helper.c', - 'mve_helper.c', - 'neon_helper.c', - 'op_helper.c', - 'tlb_helper.c', 'translate.c', 'translate-m-nocp.c', 'translate-mve.c', 'translate-neon.c', 'translate-vfp.c', - 'vec_helper.c', - 'vfp_helper.c', - 'cpu_tcg.c', )) -arm_ss.add(zlib) - -arm_ss.add(when: 'CONFIG_KVM', if_true: files('kvm.c', 'kvm64.c'), if_false: files('kvm-stub.c')) arm_ss.add(when: 'TARGET_AARCH64', if_true: files( - 'cpu64.c', - 'gdbstub64.c', - 'helper-a64.c', - 'mte_helper.c', - 'pauth_helper.c', - 'sve_helper.c', - 'sme_helper.c', 'translate-a64.c', 'translate-sve.c', 'translate-sme.c', )) - -arm_softmmu_ss = ss.source_set() -arm_softmmu_ss.add(files( - 'arch_dump.c', - 'arm-powerctl.c', - 'machine.c', - 'monitor.c', - 'psci.c', - 'ptw.c', -)) - -subdir('hvf') - -target_arch += {'arm': arm_ss} -target_softmmu_arch += {'arm': arm_softmmu_ss} From patchwork Mon Feb 27 14:00:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 657009 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2371386wrb; Mon, 27 Feb 2023 06:09:57 -0800 (PST) X-Google-Smtp-Source: AK7set+raO9KEYG+xz1Iyw2cYncFxcz9UQDRold6vv/Bm4/603eBdOfqA7mLLMUje+EkXsjqUOXn X-Received: by 2002:a05:622a:294:b0:3bf:c432:357 with SMTP id z20-20020a05622a029400b003bfc4320357mr13980947qtw.10.1677506997006; Mon, 27 Feb 2023 06:09:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677506996; cv=none; d=google.com; s=arc-20160816; b=EDLjX3SAYNs39SiI+aRHozNHyRNqQjQ9yLu0O7LLx3jnl9qROOVUaoIVy+GbwdAVuD N59BIBrNeEUTyJr8SYvefgAk9FiVWiP/ZuDgJ5yKWMRqSPun+yz30DeBeG/3m0XtzwWA 4aV9Ozll19IB5cEWArhEWcWR+Keg90HcxU0/YTIBguJxY/5WPZrBcXwAD9/vMJGr6nOn rLhjMIMXf4u0Y3ScnLgALpbfQyxDodwlRwbgjG6Tnssr5WO1dIMFPIrG6l+ukJFlA3rN tGxzYAjphMVhkRamocZr5UdHVfs6MSKqfM2kT8dp/fQt7SD18DdzHC7MhX9U8xwRicax J+vg== 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:to:from :dkim-signature; bh=oID0XRKWjWT5mF7tiW/PUiEOqizwpNDJYfpRIj4ZwZM=; b=rUNd12J3aA8veqPt580AOTvneO5R0FoFZTZ+9s54dr7SGhPsvou//H7Q/5DwaaGifW 1ZKjZ6BouGBQX59lpjxpesHSBKeQFLDoFRd2++j89miVda2pYNJFReVkjpbl9uaAvyuL oThmw37Lk/FUe6R4lnSqEl6fM4lacg9V+gQ7PvrhMo0HGmohrtH4h6/YJbxqV5HRU77q hjyt/8c2eYq1HNSY8/SGsYLBgvGmZXr6Yc3CJSbcHlHgqxZnJ9/S0ZPL8RtqjnBgtZrY JCJ31F2MW6lBZ0+Kfdk4iObPnfOeanUfMkYLMTJVUXDRPaMCi4jyuHIeLIRedhDF5qjT o7kA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=H0rma6gX; 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 bn45-20020a05620a2aed00b00718e35db8f5si5920785qkb.88.2023.02.27.06.09.56 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:09:56 -0800 (PST) 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=H0rma6gX; 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 1pWe52-0001q8-IQ; Mon, 27 Feb 2023 09:02:16 -0500 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 1pWe46-0000dL-0V for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:01:29 -0500 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWe41-0007XC-Vb for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:01:15 -0500 Received: by mail-wm1-x330.google.com with SMTP id o38-20020a05600c512600b003e8320d1c11so6627700wms.1 for ; Mon, 27 Feb 2023 06:01:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=oID0XRKWjWT5mF7tiW/PUiEOqizwpNDJYfpRIj4ZwZM=; b=H0rma6gXAXIT3PwNQMJH9TfYLwot1Wvz/3s/xT/TG9qqSsMSi4uEse7gx7UBsrjMnX dntEzeCwLrG3Puxguxvq95RjC8h0GV3VdtgPlJ+nQpsRyc1mqcwZsHCSiOKXybivk2js PElGYL81CExuKpQnr9xgjySmC4Js0ipI5LyfWz+xie0hg1YQ/mYttb7z1Ujaah8q5Gyq 3ioDyUB3Pd+/IoA9fi+Hy+CcR8ieN/oqRZzfN1ecCMgJaUmAcs8+vLDIMiXbfqLrCtJy TlOiiOSDidU4vhSK/OP/C6OQ1oxFJhjKUVMyKdZ7KwmffQMPovqAz+pDrLL2GI3xf0tu 6kpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=oID0XRKWjWT5mF7tiW/PUiEOqizwpNDJYfpRIj4ZwZM=; b=bUc94ToRZmW/cli0wL5+1rHU7yeSKeLUj2cl9XjiSfU9QWQ3zoTvCGyRcVmS9KS+JR APudq5OjilDJGvH6e8HDmbyTUVHhy2OLdVY06x52hkKaidpQteaMxJyYs+Apuf4SHqbM SugCSqxcq8pA/X4vxvTjOKQ/5we/UgxA/HiN1X487r3uRRgqhq+5vuVCjknsFuanLOia IswKHfBmXoaq1IZGORewF6UCN9g2w28t8fyAa48sat19HvH646tSSzz7ASRkYBeYuOn8 WtDumrAmvleOgbBOHo8NXm4NFnjuSvhBgb1U/sI4nAAwUsiqvWcWUPX5hZ8oCDiyuOfe EVTw== X-Gm-Message-State: AO0yUKU6uSvC+FkknMsIr7COAPrzlgFjmppMiTts5Orh/0yuyTaWgJP9 7Pj4M14xiZtuITYObIVBbtPvLNnb29NpBNjm X-Received: by 2002:a05:600c:331b:b0:3dc:4318:d00d with SMTP id q27-20020a05600c331b00b003dc4318d00dmr18799432wmp.11.1677506472129; Mon, 27 Feb 2023 06:01:12 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id s9-20020a5d4249000000b002c5598c14acsm7158514wrr.6.2023.02.27.06.01.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Feb 2023 06:01:11 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 05/25] target/arm: move helpers to tcg/ Date: Mon, 27 Feb 2023 14:00:42 +0000 Message-Id: <20230227140102.3712344-6-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230227140102.3712344-1-peter.maydell@linaro.org> References: <20230227140102.3712344-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::330; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x330.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 From: Claudio Fontana Signed-off-by: Claudio Fontana Signed-off-by: Fabiano Rosas Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Signed-off-by: Peter Maydell --- target/arm/{ => tcg}/vec_internal.h | 0 target/arm/tcg-stubs.c | 23 +++++++++++++++++++++++ target/arm/{ => tcg}/crypto_helper.c | 0 target/arm/{ => tcg}/helper-a64.c | 0 target/arm/{ => tcg}/iwmmxt_helper.c | 0 target/arm/{ => tcg}/m_helper.c | 0 target/arm/{ => tcg}/mte_helper.c | 0 target/arm/{ => tcg}/mve_helper.c | 0 target/arm/{ => tcg}/neon_helper.c | 0 target/arm/{ => tcg}/op_helper.c | 0 target/arm/{ => tcg}/pauth_helper.c | 0 target/arm/{ => tcg}/sme_helper.c | 0 target/arm/{ => tcg}/sve_helper.c | 0 target/arm/{ => tcg}/tlb_helper.c | 0 target/arm/{ => tcg}/vec_helper.c | 0 target/arm/meson.build | 15 ++------------- target/arm/tcg/meson.build | 13 +++++++++++++ 17 files changed, 38 insertions(+), 13 deletions(-) rename target/arm/{ => tcg}/vec_internal.h (100%) create mode 100644 target/arm/tcg-stubs.c rename target/arm/{ => tcg}/crypto_helper.c (100%) rename target/arm/{ => tcg}/helper-a64.c (100%) rename target/arm/{ => tcg}/iwmmxt_helper.c (100%) rename target/arm/{ => tcg}/m_helper.c (100%) rename target/arm/{ => tcg}/mte_helper.c (100%) rename target/arm/{ => tcg}/mve_helper.c (100%) rename target/arm/{ => tcg}/neon_helper.c (100%) rename target/arm/{ => tcg}/op_helper.c (100%) rename target/arm/{ => tcg}/pauth_helper.c (100%) rename target/arm/{ => tcg}/sme_helper.c (100%) rename target/arm/{ => tcg}/sve_helper.c (100%) rename target/arm/{ => tcg}/tlb_helper.c (100%) rename target/arm/{ => tcg}/vec_helper.c (100%) diff --git a/target/arm/vec_internal.h b/target/arm/tcg/vec_internal.h similarity index 100% rename from target/arm/vec_internal.h rename to target/arm/tcg/vec_internal.h diff --git a/target/arm/tcg-stubs.c b/target/arm/tcg-stubs.c new file mode 100644 index 00000000000..1a7ddb36647 --- /dev/null +++ b/target/arm/tcg-stubs.c @@ -0,0 +1,23 @@ +/* + * QEMU ARM stubs for some TCG helper functions + * + * Copyright 2021 SUSE LLC + * + * This work is licensed under the terms of the GNU GPL, version 2 or later. + * See the COPYING file in the top-level directory. + */ + +#include "qemu/osdep.h" +#include "cpu.h" +#include "internals.h" + +void write_v7m_exception(CPUARMState *env, uint32_t new_exc) +{ + g_assert_not_reached(); +} + +void raise_exception_ra(CPUARMState *env, uint32_t excp, uint32_t syndrome, + uint32_t target_el, uintptr_t ra) +{ + g_assert_not_reached(); +} diff --git a/target/arm/crypto_helper.c b/target/arm/tcg/crypto_helper.c similarity index 100% rename from target/arm/crypto_helper.c rename to target/arm/tcg/crypto_helper.c diff --git a/target/arm/helper-a64.c b/target/arm/tcg/helper-a64.c similarity index 100% rename from target/arm/helper-a64.c rename to target/arm/tcg/helper-a64.c diff --git a/target/arm/iwmmxt_helper.c b/target/arm/tcg/iwmmxt_helper.c similarity index 100% rename from target/arm/iwmmxt_helper.c rename to target/arm/tcg/iwmmxt_helper.c diff --git a/target/arm/m_helper.c b/target/arm/tcg/m_helper.c similarity index 100% rename from target/arm/m_helper.c rename to target/arm/tcg/m_helper.c diff --git a/target/arm/mte_helper.c b/target/arm/tcg/mte_helper.c similarity index 100% rename from target/arm/mte_helper.c rename to target/arm/tcg/mte_helper.c diff --git a/target/arm/mve_helper.c b/target/arm/tcg/mve_helper.c similarity index 100% rename from target/arm/mve_helper.c rename to target/arm/tcg/mve_helper.c diff --git a/target/arm/neon_helper.c b/target/arm/tcg/neon_helper.c similarity index 100% rename from target/arm/neon_helper.c rename to target/arm/tcg/neon_helper.c diff --git a/target/arm/op_helper.c b/target/arm/tcg/op_helper.c similarity index 100% rename from target/arm/op_helper.c rename to target/arm/tcg/op_helper.c diff --git a/target/arm/pauth_helper.c b/target/arm/tcg/pauth_helper.c similarity index 100% rename from target/arm/pauth_helper.c rename to target/arm/tcg/pauth_helper.c diff --git a/target/arm/sme_helper.c b/target/arm/tcg/sme_helper.c similarity index 100% rename from target/arm/sme_helper.c rename to target/arm/tcg/sme_helper.c diff --git a/target/arm/sve_helper.c b/target/arm/tcg/sve_helper.c similarity index 100% rename from target/arm/sve_helper.c rename to target/arm/tcg/sve_helper.c diff --git a/target/arm/tlb_helper.c b/target/arm/tcg/tlb_helper.c similarity index 100% rename from target/arm/tlb_helper.c rename to target/arm/tcg/tlb_helper.c diff --git a/target/arm/vec_helper.c b/target/arm/tcg/vec_helper.c similarity index 100% rename from target/arm/vec_helper.c rename to target/arm/tcg/vec_helper.c diff --git a/target/arm/meson.build b/target/arm/meson.build index b2904b676b0..3e2f4030056 100644 --- a/target/arm/meson.build +++ b/target/arm/meson.build @@ -1,17 +1,9 @@ arm_ss = ss.source_set() arm_ss.add(files( 'cpu.c', - 'crypto_helper.c', 'debug_helper.c', 'gdbstub.c', 'helper.c', - 'iwmmxt_helper.c', - 'm_helper.c', - 'mve_helper.c', - 'neon_helper.c', - 'op_helper.c', - 'tlb_helper.c', - 'vec_helper.c', 'vfp_helper.c', 'cpu_tcg.c', )) @@ -22,11 +14,6 @@ arm_ss.add(when: 'CONFIG_KVM', if_true: files('kvm.c', 'kvm64.c'), if_false: fil arm_ss.add(when: 'TARGET_AARCH64', if_true: files( 'cpu64.c', 'gdbstub64.c', - 'helper-a64.c', - 'mte_helper.c', - 'pauth_helper.c', - 'sve_helper.c', - 'sme_helper.c', )) arm_softmmu_ss = ss.source_set() @@ -43,6 +30,8 @@ subdir('hvf') if 'CONFIG_TCG' in config_all subdir('tcg') +else + arm_ss.add(files('tcg-stubs.c')) endif target_arch += {'arm': arm_ss} diff --git a/target/arm/tcg/meson.build b/target/arm/tcg/meson.build index 044561bd4de..1f27ba1272e 100644 --- a/target/arm/tcg/meson.build +++ b/target/arm/tcg/meson.build @@ -23,10 +23,23 @@ arm_ss.add(files( 'translate-mve.c', 'translate-neon.c', 'translate-vfp.c', + 'crypto_helper.c', + 'iwmmxt_helper.c', + 'm_helper.c', + 'mve_helper.c', + 'neon_helper.c', + 'op_helper.c', + 'tlb_helper.c', + 'vec_helper.c', )) arm_ss.add(when: 'TARGET_AARCH64', if_true: files( 'translate-a64.c', 'translate-sve.c', 'translate-sme.c', + 'helper-a64.c', + 'mte_helper.c', + 'pauth_helper.c', + 'sme_helper.c', + 'sve_helper.c', )) From patchwork Mon Feb 27 14:00:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 657025 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2373137wrb; Mon, 27 Feb 2023 06:13:05 -0800 (PST) X-Google-Smtp-Source: AK7set/Xx+1ur6caCt4EdC5z1ucD6ZemULENLSvmLT6bSn4XDtPFqOwmxRuceI+j8GfvTfoBLjUi X-Received: by 2002:a05:622a:654:b0:3bf:d688:2a7d with SMTP id a20-20020a05622a065400b003bfd6882a7dmr6200334qtb.26.1677507185652; Mon, 27 Feb 2023 06:13:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677507185; cv=none; d=google.com; s=arc-20160816; b=hmETicNl0FofQRl+F21uOFIN1ZFYhBr7k68mbfobRKm0as4PTL0FhzvzZR04WEaeOG JFNJCGrddhUcMImUOTqqHCtRW+n9OO54MRXZDSbDmEqiVK1WsmgtuC9RA4MGRc6iu7Ax Y9Lxd50rJmNiuNGysIA7NfVMZQ4BLbARoE3Ur7xVycwhlDv7T/97f/jvvFa6/tupdnGG N3ODgRvaZNM0NNE316+y3WFzgYXB6uDd1xQctt9dlbEWSxpiFsaSFl75Z2Q2sINibbQq HHSPx1siGkgYQ3Z9tfr5Ni/gNtJCMVFXepTuG8aEOlq3Up5zbzmE+CKyXyKZ53JDdH7u PwGQ== 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:to:from :dkim-signature; bh=oDI/Gvf1vTBawfRe/WqKnp9A0gmcK09jwaqQOvTxWMM=; b=eXQuiNPLrBYmi4tiDdlkr8z9UU6/S9qjUrUpEKzC+NuQJQuIoAYFwoZBGx6X1Ged04 0owjN7b5su3wWFA6bIzfW1496Fw69Lj3zr/+qP6yN4D3LrD0LoBiUsscR6E+qgQ91EWe Wr31FYfaX2vu26v2Td3vCDKUxAJGkvr6LwfyLFtnI9cn9cGoPZjb/8SdfzSH4h057TJ5 84DhnJGwV5/Ia+syE+mcRvlc4qJEEwkxzXDd96Od1/g71zDDX0v58qt/6GoFcXrEspa3 tGkqU6CNg5TdbMD4JbtLHrICFt1Qbsu3XdB3MTaRBxvTjZE5tkp4AUTYNgZiL0Zd8kKu ArxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=NE87DflL; 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 h8-20020ac85e08000000b003b85320f52dsi6288677qtx.588.2023.02.27.06.13.05 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:13:05 -0800 (PST) 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=NE87DflL; 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 1pWe53-0001u5-EP; Mon, 27 Feb 2023 09:02:17 -0500 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 1pWe48-0000da-Qh for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:01:29 -0500 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWe44-0007XL-Du for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:01:18 -0500 Received: by mail-wm1-x32b.google.com with SMTP id m25-20020a7bcb99000000b003e7842b75f2so3883991wmi.3 for ; Mon, 27 Feb 2023 06:01:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=oDI/Gvf1vTBawfRe/WqKnp9A0gmcK09jwaqQOvTxWMM=; b=NE87DflL9Bcf61p+nKys6TyxSGKu1rFXWOAw9vFJdWYGnlZlrB8J/3CWdE+5OIpB+a aOCZOop5WD7owzAt5xt0aSk2XdfswACgUjgzvwpYP8P5JFTvdQRjU2GH4+i6Lb5p9L// 0EculsczBLExubH9T8IRUk3yprlLwXWqBVBHswzwE6nvL3CEB50bH1yQ5SOuK6KfBpi6 iIGCWAWjqQutIu4LkApoQDl7sx5DHl5loNegB4CjXZaUlPVe1WfACbECk9m1AwzlY9Z/ E6rsgdTbnCIiNJ4FuXr0GFl+ZBktAEy0dXiCEGI6LWy1oF3a/vgZpZ7aCN/sp0POgGmH Y6hQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=oDI/Gvf1vTBawfRe/WqKnp9A0gmcK09jwaqQOvTxWMM=; b=P7H8s37Cr4NC8KwRCdgRK1Cjb2H0BEDeyVM9HKoctfxa5sR4jGFlh3d9KCkDu1JqUX JmWW/xXp/13RP9nt3QYlOjd8rCjIH/mTH34DNnGPy+LVeK7wJXQYoQ4Eu5J99pSCa2Xe IsHFXAy4/8HOVWd+kezeZUaEFszzL6es9zh1JOeOW27th2J4Cz+tohzvxhEzEgaieEUY jaCbksxvKi9Y2/V5gzQeiGxnQERonQP8KBehoU61C8BWlox/Jk9XZ2CG7cwD050o9uyV Oaxpevw9Ov9KLcjJPB0fnXiHL1e945r/MHhqa33LrKexOARL5jeOF2MK97whwYsE8YpF TgYQ== X-Gm-Message-State: AO0yUKUR9F8DbrhT+Qt/uQgF9GFJsHK5miRDdIgGV4zKM+Wd9qDf8MHN 9+w2fWUuj1MfMwokQwghuMttg/Hxbl2ctQMC X-Received: by 2002:a05:600c:3b1e:b0:3ea:e5fc:a5a4 with SMTP id m30-20020a05600c3b1e00b003eae5fca5a4mr10202472wms.1.1677506473360; Mon, 27 Feb 2023 06:01:13 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id s9-20020a5d4249000000b002c5598c14acsm7158514wrr.6.2023.02.27.06.01.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Feb 2023 06:01:12 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 06/25] target/arm: Move psci.c into the tcg directory Date: Mon, 27 Feb 2023 14:00:43 +0000 Message-Id: <20230227140102.3712344-7-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230227140102.3712344-1-peter.maydell@linaro.org> References: <20230227140102.3712344-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32b; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x32b.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 From: Claudio Fontana Signed-off-by: Claudio Fontana Signed-off-by: Fabiano Rosas Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Tested-by: Philippe Mathieu-Daudé Signed-off-by: Peter Maydell --- target/arm/{ => tcg}/psci.c | 0 target/arm/meson.build | 1 - target/arm/tcg/meson.build | 4 ++++ 3 files changed, 4 insertions(+), 1 deletion(-) rename target/arm/{ => tcg}/psci.c (100%) diff --git a/target/arm/psci.c b/target/arm/tcg/psci.c similarity index 100% rename from target/arm/psci.c rename to target/arm/tcg/psci.c diff --git a/target/arm/meson.build b/target/arm/meson.build index 3e2f4030056..a5191b57e1c 100644 --- a/target/arm/meson.build +++ b/target/arm/meson.build @@ -22,7 +22,6 @@ arm_softmmu_ss.add(files( 'arm-powerctl.c', 'machine.c', 'monitor.c', - 'psci.c', 'ptw.c', )) diff --git a/target/arm/tcg/meson.build b/target/arm/tcg/meson.build index 1f27ba1272e..fa8a9eab933 100644 --- a/target/arm/tcg/meson.build +++ b/target/arm/tcg/meson.build @@ -43,3 +43,7 @@ arm_ss.add(when: 'TARGET_AARCH64', if_true: files( 'sme_helper.c', 'sve_helper.c', )) + +arm_softmmu_ss.add(files( + 'psci.c', +)) From patchwork Mon Feb 27 14:00:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 656978 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2366641wrb; Mon, 27 Feb 2023 06:03:02 -0800 (PST) X-Google-Smtp-Source: AK7set+9zZB/2eri50MNY9P9398PM0sWH61gO6MUZDy8KnOsZ95srziOvK8e9NPZjJR4YW+8jiox X-Received: by 2002:a05:7500:3d8e:b0:f6:98d9:ecc1 with SMTP id le14-20020a0575003d8e00b000f698d9ecc1mr756132gab.12.1677506582598; Mon, 27 Feb 2023 06:03:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677506582; cv=none; d=google.com; s=arc-20160816; b=Qg5DE65MjSKr/YNqJ1kt6KiDOZ9Z/esoQX4Fi4fKbAtkYVal6lCjlenaCpjZOzlDWT WqwUPdnL5bmIXGadJkDHG2iCwIJdvovRX4YoLmbwm/DWcb0w1gQ3zW+Z3kBRsCbVcIZ+ 6Thg5h7nkUlYE5p1rq63GQ7JxJqzO7hSfyGfdTj+I7fbQSUfb4/phkbYZ+z4uApVdZRr wEKs6DNBe3vmzC/7+FGW44VCS1dPYUnJvdBDS6qc0McQDSmmKhP4uYNzh0kM1doJL/OL 7iSdt2e287eK7b1QlVd9caLwg3EhP/h2ElUTKCU5V1JIyyYhJGHl/8cJ7/OXsFIwqDov KbWQ== 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:to:from :dkim-signature; bh=qA/3Z94irQbWBM1pbSkHlsvHgpn7DcaD1jcVgPus5vI=; b=lydQMX/g8c8c5cX+ISCfv0sxDtRfzYfjSOIt/MLhEXebE6SyS1U4Pvvk+TKMFAOnRt fFFJVhTKibRoE6q9vDOTQ5sYYqo1ybgBxrZ5EnvUmLHw4kMV3lStcO6GHFpo1c+Bf43J FrfVDWDh3FrSvcOHWbzoKAN1K03cZGAWPniRwOjw78gBl54C7Q4dUZ8dmpypaJ4xc79/ ZUd1e7aM6PHWel8HuO6EuYeCqDO5Q9dbFIFYp/2ic1ZOcEUI+2w00QDkagwVR2gBEjbC 7Ov7Fx+G/qONEt4mQBccElnR+7UVB39GkgclwSdKKW4wnzRo60Vjh9S56UeVr5Jd8mdP ddsQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="UOK/XBgk"; 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 h17-20020ab02351000000b0068f832cc64asi2582093uao.170.2023.02.27.06.03.02 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:03:02 -0800 (PST) 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="UOK/XBgk"; 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 1pWe58-0002E7-QQ; Mon, 27 Feb 2023 09:02:22 -0500 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 1pWe48-0000dr-VG for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:01:29 -0500 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWe44-0007XY-Er for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:01:19 -0500 Received: by mail-wm1-x32d.google.com with SMTP id m25-20020a7bcb99000000b003e7842b75f2so3884039wmi.3 for ; Mon, 27 Feb 2023 06:01:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=qA/3Z94irQbWBM1pbSkHlsvHgpn7DcaD1jcVgPus5vI=; b=UOK/XBgkCuLakUDjlRyQFBTIDa84LBgmj3ZZfUnOfd/YcNitORKfoxCMZ9BALbabqb oNaFR976pL2BdQ7w815XICuBT3ONxxeZHGcUuCEG/ozGt0MJVjj+tNNi0zpox+k/yQGe cTMX+70SieY3HizgqxorLIR0DNuF61SXciBOxj3VuhVD8A+bWdl3f27f+zhRqJdAfT0g Z5mNwZ72VWqPMu6r+7Y6aby24DXhCXFo91C/AkbPmvaUaJSnpBWsclfLvEIvbnLDIqgm MqY8vEa490eUGDFlbH7L3iKvqLw6BfmYpW04DFLfAhQSe7mB/c8XQKE9Zz+VmIrsd19Q EINQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=qA/3Z94irQbWBM1pbSkHlsvHgpn7DcaD1jcVgPus5vI=; b=C4iCiEXGmf/SmTmvqVvMBlGEaeLQTAJq8N0TmOV85zYO0msdfvqB0a5r+LK/ly9Gk/ 92yj6YCa892+AUvcn87TSNL74dCitk7Y+1Ul5QPM6hp2LnWgiCRaRMuVlxQjt8iKBln3 f2ZlAz+JwRSXpZrIr/1kdT4Pv4YZ4ZK0y4GjxqzsuA4m1mkFOt7z8Ak/ejxFK5pa2wex 4zU3S5xP7Wejbr6u3aogVFiPoC5EMPTiPSDPMoHgCGZxvv3paa5kCFHgFRs+yDC15oHe TZeWyhBuWolpZbzRNe8kA1pcplgHXYc4YQD08dmnTQacn6EfWqpHtL7G9ERhpC22DJJZ DrJw== X-Gm-Message-State: AO0yUKWm+dXGZEpq4f4mIqBhR0kGdXpl4wEh1BRDbXeLJAa7ytzefwuq uXn+0ml5wbNoEZTmSylRLucDH4tAsM2TpZ/a X-Received: by 2002:a05:600c:3b8b:b0:3ea:ea6b:f9ad with SMTP id n11-20020a05600c3b8b00b003eaea6bf9admr11959801wms.31.1677506474680; Mon, 27 Feb 2023 06:01:14 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id s9-20020a5d4249000000b002c5598c14acsm7158514wrr.6.2023.02.27.06.01.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Feb 2023 06:01:13 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 07/25] target/arm: Wrap arm_rebuild_hflags calls with tcg_enabled Date: Mon, 27 Feb 2023 14:00:44 +0000 Message-Id: <20230227140102.3712344-8-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230227140102.3712344-1-peter.maydell@linaro.org> References: <20230227140102.3712344-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32d; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x32d.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 From: Fabiano Rosas This is in preparation to moving the hflags code into its own file under the tcg/ directory. Signed-off-by: Fabiano Rosas Reviewed-by: Richard Henderson Tested-by: Philippe Mathieu-Daudé Signed-off-by: Peter Maydell --- hw/arm/boot.c | 6 +++++- hw/intc/armv7m_nvic.c | 20 +++++++++++++------- target/arm/arm-powerctl.c | 7 +++++-- target/arm/cpu.c | 3 ++- target/arm/helper.c | 18 +++++++++++++----- target/arm/machine.c | 5 ++++- 6 files changed, 42 insertions(+), 17 deletions(-) diff --git a/hw/arm/boot.c b/hw/arm/boot.c index 3d7d11f782f..1e021c4a340 100644 --- a/hw/arm/boot.c +++ b/hw/arm/boot.c @@ -15,6 +15,7 @@ #include "hw/arm/boot.h" #include "hw/arm/linux-boot-if.h" #include "sysemu/kvm.h" +#include "sysemu/tcg.h" #include "sysemu/sysemu.h" #include "sysemu/numa.h" #include "hw/boards.h" @@ -827,7 +828,10 @@ static void do_cpu_reset(void *opaque) info->secondary_cpu_reset_hook(cpu, info); } } - arm_rebuild_hflags(env); + + if (tcg_enabled()) { + arm_rebuild_hflags(env); + } } } diff --git a/hw/intc/armv7m_nvic.c b/hw/intc/armv7m_nvic.c index e54553283f4..8e289051a40 100644 --- a/hw/intc/armv7m_nvic.c +++ b/hw/intc/armv7m_nvic.c @@ -18,6 +18,7 @@ #include "hw/intc/armv7m_nvic.h" #include "hw/irq.h" #include "hw/qdev-properties.h" +#include "sysemu/tcg.h" #include "sysemu/runstate.h" #include "target/arm/cpu.h" #include "exec/exec-all.h" @@ -2454,8 +2455,10 @@ static MemTxResult nvic_sysreg_write(void *opaque, hwaddr addr, /* This is UNPREDICTABLE; treat as RAZ/WI */ exit_ok: - /* Ensure any changes made are reflected in the cached hflags. */ - arm_rebuild_hflags(&s->cpu->env); + if (tcg_enabled()) { + /* Ensure any changes made are reflected in the cached hflags. */ + arm_rebuild_hflags(&s->cpu->env); + } return MEMTX_OK; } @@ -2636,11 +2639,14 @@ static void armv7m_nvic_reset(DeviceState *dev) } } - /* - * We updated state that affects the CPU's MMUidx and thus its hflags; - * and we can't guarantee that we run before the CPU reset function. - */ - arm_rebuild_hflags(&s->cpu->env); + if (tcg_enabled()) { + /* + * We updated state that affects the CPU's MMUidx and thus its + * hflags; and we can't guarantee that we run before the CPU + * reset function. + */ + arm_rebuild_hflags(&s->cpu->env); + } } static void nvic_systick_trigger(void *opaque, int n, int level) diff --git a/target/arm/arm-powerctl.c b/target/arm/arm-powerctl.c index b75f813b403..326a03153df 100644 --- a/target/arm/arm-powerctl.c +++ b/target/arm/arm-powerctl.c @@ -15,6 +15,7 @@ #include "arm-powerctl.h" #include "qemu/log.h" #include "qemu/main-loop.h" +#include "sysemu/tcg.h" #ifndef DEBUG_ARM_POWERCTL #define DEBUG_ARM_POWERCTL 0 @@ -127,8 +128,10 @@ static void arm_set_cpu_on_async_work(CPUState *target_cpu_state, target_cpu->env.regs[0] = info->context_id; } - /* CP15 update requires rebuilding hflags */ - arm_rebuild_hflags(&target_cpu->env); + if (tcg_enabled()) { + /* CP15 update requires rebuilding hflags */ + arm_rebuild_hflags(&target_cpu->env); + } /* Start the new CPU at the requested address */ cpu_set_pc(target_cpu_state, info->entry); diff --git a/target/arm/cpu.c b/target/arm/cpu.c index da416f7b1cb..0b333a749f6 100644 --- a/target/arm/cpu.c +++ b/target/arm/cpu.c @@ -542,8 +542,9 @@ static void arm_cpu_reset_hold(Object *obj) if (tcg_enabled()) { hw_breakpoint_update_all(cpu); hw_watchpoint_update_all(cpu); + + arm_rebuild_hflags(env); } - arm_rebuild_hflags(env); } #if defined(CONFIG_TCG) && !defined(CONFIG_USER_ONLY) diff --git a/target/arm/helper.c b/target/arm/helper.c index 07d41003654..af72e6d16c0 100644 --- a/target/arm/helper.c +++ b/target/arm/helper.c @@ -5173,7 +5173,7 @@ static void sctlr_write(CPUARMState *env, const ARMCPRegInfo *ri, /* This may enable/disable the MMU, so do a TLB flush. */ tlb_flush(CPU(cpu)); - if (ri->type & ARM_CP_SUPPRESS_TB_END) { + if (tcg_enabled() && ri->type & ARM_CP_SUPPRESS_TB_END) { /* * Normally we would always end the TB on an SCTLR write; see the * comment in ARMCPRegInfo sctlr initialization below for why Xscale @@ -6841,7 +6841,9 @@ void aarch64_set_svcr(CPUARMState *env, uint64_t new, uint64_t mask) memset(env->zarray, 0, sizeof(env->zarray)); } - arm_rebuild_hflags(env); + if (tcg_enabled()) { + arm_rebuild_hflags(env); + } } static void svcr_write(CPUARMState *env, const ARMCPRegInfo *ri, @@ -9886,7 +9888,7 @@ void cpsr_write(CPUARMState *env, uint32_t val, uint32_t mask, } mask &= ~CACHED_CPSR_BITS; env->uncached_cpsr = (env->uncached_cpsr & ~mask) | (val & mask); - if (rebuild_hflags) { + if (tcg_enabled() && rebuild_hflags) { arm_rebuild_hflags(env); } } @@ -10445,7 +10447,10 @@ static void take_aarch32_exception(CPUARMState *env, int new_mode, env->regs[14] = env->regs[15] + offset; } env->regs[15] = newpc; - arm_rebuild_hflags(env); + + if (tcg_enabled()) { + arm_rebuild_hflags(env); + } } static void arm_cpu_do_interrupt_aarch32_hyp(CPUState *cs) @@ -11001,7 +11006,10 @@ static void arm_cpu_do_interrupt_aarch64(CPUState *cs) pstate_write(env, PSTATE_DAIF | new_mode); env->aarch64 = true; aarch64_restore_sp(env, new_el); - helper_rebuild_hflags_a64(env, new_el); + + if (tcg_enabled()) { + helper_rebuild_hflags_a64(env, new_el); + } env->pc = addr; diff --git a/target/arm/machine.c b/target/arm/machine.c index fd6323f6d8a..fc4a4a40644 100644 --- a/target/arm/machine.c +++ b/target/arm/machine.c @@ -871,7 +871,10 @@ static int cpu_post_load(void *opaque, int version_id) if (!kvm_enabled()) { pmu_op_finish(&cpu->env); } - arm_rebuild_hflags(&cpu->env); + + if (tcg_enabled()) { + arm_rebuild_hflags(&cpu->env); + } return 0; } From patchwork Mon Feb 27 14:00:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 656985 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2367600wrb; Mon, 27 Feb 2023 06:04:18 -0800 (PST) X-Google-Smtp-Source: AK7set840pd+VCQcuKohhnQQITr0DvsOcciQPYuLzk0SdpsXdsN3g7ue2DffjCWzMa2SrHp9dk6d X-Received: by 2002:a2e:a367:0:b0:295:a716:cb12 with SMTP id i7-20020a2ea367000000b00295a716cb12mr3251693ljn.30.1677506657680; Mon, 27 Feb 2023 06:04:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677506657; cv=none; d=google.com; s=arc-20160816; b=bYwxNTxrp+mTYe6+tKGZYxjjktR1UIrbpmO8WpogAVTo/PJwLcDs/uyTeiAzgKSGky ASUCce0zaTkomSkv38tmX/Eu2uXiYJNVdhDeVOXXHSyVoeBUwGNAVQ7TyM8Z+/aFUjT4 2TjlgyFk1020nufsCe/WXGxfi9/97XLE7JS1VDxhczzGyP7MdOghf+jygnX8zL0oWQ7u BUhNFz2gsmPgK09lVp2vqGW7VjV3vCZIXlwhVTlzxBW+TDVGLQo6X3iDbuXCSsvYup4E rZyDxwO5AMhGuR1rBnTnkYss+YemHhiBGm62vug3PzKWukZum0eqgFWj92SEQ+U7t3eX mLBw== 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:to:from :dkim-signature; bh=Ku7kL3lIZ9ja7LCy0WnkJW4LdaPapwCQHS2Pc0hPYdE=; b=QidoYBWw2fuu8O3dBKtll4gLyIVfnQkNXEgKPZd8T+aSqKnoR58QbjwljezanFfXkt kepyVaJmAoejk4aLJYzp4sPqTw/dxrat2OuCvtxDhmmV+/Mr41QcqkYA4nLH5y6qWNCs iSd7fcxbSQQmsqjfcSN7eOBsp7t6HsD//oQMw1HxY97ddpUTvbguspkC5CHkki2QPayM v/v0v872C5vWfURGDm9s6pYXifoNUd+x64cswh7w5D0SGEtvTKZheDe49g234uInJSAy bPvdXC4GGhagkjWJI22KtFBNc9p+itMYtvFkYuZjNI1eTaUNWMsaZTmduvjaXrk8hZF9 Z1Uw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ncE+0WpM; 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 k24-20020a05651c10b800b002934fe8e831si3688608ljn.538.2023.02.27.06.04.17 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:04:17 -0800 (PST) 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=ncE+0WpM; 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 1pWe5C-0002mR-AH; Mon, 27 Feb 2023 09:02:26 -0500 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 1pWe4B-0000e9-3o for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:01:29 -0500 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWe45-0007Wi-Py for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:01:22 -0500 Received: by mail-wr1-x431.google.com with SMTP id v16so3528354wrn.0 for ; Mon, 27 Feb 2023 06:01:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=Ku7kL3lIZ9ja7LCy0WnkJW4LdaPapwCQHS2Pc0hPYdE=; b=ncE+0WpMf1IGtvs+EJEwUAsZ5PX9TbxBeXbdDqaBgN//V7V7y77boUnjYalstWsUCw TDiaYeftx+mKypTA2hFBk3zIk/54iKBFSPjh/ipHzak0ByUN2gdZMo9+mVyz4rygi4zx T5BD2Q3g2Lx+hB3uDv9UqqcX86yZhaV+803/UQoS+pJhrCkPYxdWlFIOu4xtHALVeBoF EZVZ/HfUai2CkHAuUipotXDoe9x2A1hjDHDCsnhjvYvKU7auE87tndpnHpOSp/nQBq5w j1b7tY5iyiQsennlPq3Cza8vQMZtZXCg9tErGZDl4DQfRfQfqTid2CADOXlG+xPs5Wso 5F5Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Ku7kL3lIZ9ja7LCy0WnkJW4LdaPapwCQHS2Pc0hPYdE=; b=M00m4sQ+oBmcOsg/Ho9yypvUcomqPINKxGtg/gyD03RHARG14TvBSdtADs6bHJH8yy 3ymxQFyNN/Q3iHCzcm6SIN5iqrIziRoqaSAFcqH2006c22nTPMST5e0HRvApT/78QS/g OrrlfyiJpuHsMrEowjKz3mP4jt/V1/u5G+ihfrvL/2jvmd3OQt1RdTH2S3QeqvV6VRff +V4CqWh5WZUdujyiHky/VVYdDGj8HXr8ZZry9n50VcR+jHNRT77nNVqNrnAxO7gwoiSr Ub61dud96LAnrc7QioNTgV0pgN73kTt/aoyf4RZcs8N7ulEvIhBloLvLy6NP4713UA9z igcA== X-Gm-Message-State: AO0yUKVa1s+tv7kXg6IUjZjRpaqod5fzAcI3H2Zn+mZa57UbQ7IMgOLU zmbxD8XDJbX/zEhPsJYNmeB2MYJAmLhySHfu X-Received: by 2002:adf:f247:0:b0:2c7:1e00:d514 with SMTP id b7-20020adff247000000b002c71e00d514mr11937768wrp.38.1677506475968; Mon, 27 Feb 2023 06:01:15 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id s9-20020a5d4249000000b002c5598c14acsm7158514wrr.6.2023.02.27.06.01.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Feb 2023 06:01:14 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 08/25] target/arm: Move hflags code into the tcg directory Date: Mon, 27 Feb 2023 14:00:45 +0000 Message-Id: <20230227140102.3712344-9-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230227140102.3712344-1-peter.maydell@linaro.org> References: <20230227140102.3712344-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::431; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x431.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 From: Fabiano Rosas The hflags are used only for TCG code, so introduce a new file hflags.c to keep that code. Signed-off-by: Fabiano Rosas Reviewed-by: Richard Henderson Tested-by: Philippe Mathieu-Daudé Signed-off-by: Peter Maydell --- target/arm/internals.h | 2 + target/arm/helper.c | 393 +----------------------------------- target/arm/tcg-stubs.c | 4 + target/arm/tcg/hflags.c | 403 +++++++++++++++++++++++++++++++++++++ target/arm/tcg/meson.build | 1 + 5 files changed, 411 insertions(+), 392 deletions(-) create mode 100644 target/arm/tcg/hflags.c diff --git a/target/arm/internals.h b/target/arm/internals.h index 759b70c646f..ed48f8c9a69 100644 --- a/target/arm/internals.h +++ b/target/arm/internals.h @@ -1073,6 +1073,7 @@ ARMVAParameters aa64_va_parameters(CPUARMState *env, uint64_t va, int aa64_va_parameter_tbi(uint64_t tcr, ARMMMUIdx mmu_idx); int aa64_va_parameter_tbid(uint64_t tcr, ARMMMUIdx mmu_idx); +int aa64_va_parameter_tcma(uint64_t tcr, ARMMMUIdx mmu_idx); /* Determine if allocation tags are available. */ static inline bool allocation_tag_access_enabled(CPUARMState *env, int el, @@ -1383,4 +1384,5 @@ static inline bool arm_fgt_active(CPUARMState *env, int el) (!arm_feature(env, ARM_FEATURE_EL3) || (env->cp15.scr_el3 & SCR_FGTEN)); } +void assert_hflags_rebuild_correctly(CPUARMState *env); #endif diff --git a/target/arm/helper.c b/target/arm/helper.c index af72e6d16c0..14af7ba0958 100644 --- a/target/arm/helper.c +++ b/target/arm/helper.c @@ -6669,32 +6669,6 @@ int sme_exception_el(CPUARMState *env, int el) return 0; } -/* This corresponds to the ARM pseudocode function IsFullA64Enabled(). */ -static bool sme_fa64(CPUARMState *env, int el) -{ - if (!cpu_isar_feature(aa64_sme_fa64, env_archcpu(env))) { - return false; - } - - if (el <= 1 && !el_is_in_host(env, el)) { - if (!FIELD_EX64(env->vfp.smcr_el[1], SMCR, FA64)) { - return false; - } - } - if (el <= 2 && arm_is_el2_enabled(env)) { - if (!FIELD_EX64(env->vfp.smcr_el[2], SMCR, FA64)) { - return false; - } - } - if (arm_feature(env, ARM_FEATURE_EL3)) { - if (!FIELD_EX64(env->vfp.smcr_el[3], SMCR, FA64)) { - return false; - } - } - - return true; -} - /* * Given that SVE is enabled, return the vector length for EL. */ @@ -11150,7 +11124,7 @@ int aa64_va_parameter_tbid(uint64_t tcr, ARMMMUIdx mmu_idx) } } -static int aa64_va_parameter_tcma(uint64_t tcr, ARMMMUIdx mmu_idx) +int aa64_va_parameter_tcma(uint64_t tcr, ARMMMUIdx mmu_idx) { if (regime_has_2_ranges(mmu_idx)) { return extract64(tcr, 57, 2); @@ -11861,371 +11835,6 @@ ARMMMUIdx arm_mmu_idx(CPUARMState *env) return arm_mmu_idx_el(env, arm_current_el(env)); } -static inline bool fgt_svc(CPUARMState *env, int el) -{ - /* - * Assuming fine-grained-traps are active, return true if we - * should be trapping on SVC instructions. Only AArch64 can - * trap on an SVC at EL1, but we don't need to special-case this - * because if this is AArch32 EL1 then arm_fgt_active() is false. - * We also know el is 0 or 1. - */ - return el == 0 ? - FIELD_EX64(env->cp15.fgt_exec[FGTREG_HFGITR], HFGITR_EL2, SVC_EL0) : - FIELD_EX64(env->cp15.fgt_exec[FGTREG_HFGITR], HFGITR_EL2, SVC_EL1); -} - -static CPUARMTBFlags rebuild_hflags_common(CPUARMState *env, int fp_el, - ARMMMUIdx mmu_idx, - CPUARMTBFlags flags) -{ - DP_TBFLAG_ANY(flags, FPEXC_EL, fp_el); - DP_TBFLAG_ANY(flags, MMUIDX, arm_to_core_mmu_idx(mmu_idx)); - - if (arm_singlestep_active(env)) { - DP_TBFLAG_ANY(flags, SS_ACTIVE, 1); - } - - return flags; -} - -static CPUARMTBFlags rebuild_hflags_common_32(CPUARMState *env, int fp_el, - ARMMMUIdx mmu_idx, - CPUARMTBFlags flags) -{ - bool sctlr_b = arm_sctlr_b(env); - - if (sctlr_b) { - DP_TBFLAG_A32(flags, SCTLR__B, 1); - } - if (arm_cpu_data_is_big_endian_a32(env, sctlr_b)) { - DP_TBFLAG_ANY(flags, BE_DATA, 1); - } - DP_TBFLAG_A32(flags, NS, !access_secure_reg(env)); - - return rebuild_hflags_common(env, fp_el, mmu_idx, flags); -} - -static CPUARMTBFlags rebuild_hflags_m32(CPUARMState *env, int fp_el, - ARMMMUIdx mmu_idx) -{ - CPUARMTBFlags flags = {}; - uint32_t ccr = env->v7m.ccr[env->v7m.secure]; - - /* Without HaveMainExt, CCR.UNALIGN_TRP is RES1. */ - if (ccr & R_V7M_CCR_UNALIGN_TRP_MASK) { - DP_TBFLAG_ANY(flags, ALIGN_MEM, 1); - } - - if (arm_v7m_is_handler_mode(env)) { - DP_TBFLAG_M32(flags, HANDLER, 1); - } - - /* - * v8M always applies stack limit checks unless CCR.STKOFHFNMIGN - * is suppressing them because the requested execution priority - * is less than 0. - */ - if (arm_feature(env, ARM_FEATURE_V8) && - !((mmu_idx & ARM_MMU_IDX_M_NEGPRI) && - (ccr & R_V7M_CCR_STKOFHFNMIGN_MASK))) { - DP_TBFLAG_M32(flags, STACKCHECK, 1); - } - - if (arm_feature(env, ARM_FEATURE_M_SECURITY) && env->v7m.secure) { - DP_TBFLAG_M32(flags, SECURE, 1); - } - - return rebuild_hflags_common_32(env, fp_el, mmu_idx, flags); -} - -static CPUARMTBFlags rebuild_hflags_a32(CPUARMState *env, int fp_el, - ARMMMUIdx mmu_idx) -{ - CPUARMTBFlags flags = {}; - int el = arm_current_el(env); - - if (arm_sctlr(env, el) & SCTLR_A) { - DP_TBFLAG_ANY(flags, ALIGN_MEM, 1); - } - - if (arm_el_is_aa64(env, 1)) { - DP_TBFLAG_A32(flags, VFPEN, 1); - } - - if (el < 2 && env->cp15.hstr_el2 && arm_is_el2_enabled(env) && - (arm_hcr_el2_eff(env) & (HCR_E2H | HCR_TGE)) != (HCR_E2H | HCR_TGE)) { - DP_TBFLAG_A32(flags, HSTR_ACTIVE, 1); - } - - if (arm_fgt_active(env, el)) { - DP_TBFLAG_ANY(flags, FGT_ACTIVE, 1); - if (fgt_svc(env, el)) { - DP_TBFLAG_ANY(flags, FGT_SVC, 1); - } - } - - if (env->uncached_cpsr & CPSR_IL) { - DP_TBFLAG_ANY(flags, PSTATE__IL, 1); - } - - /* - * The SME exception we are testing for is raised via - * AArch64.CheckFPAdvSIMDEnabled(), as called from - * AArch32.CheckAdvSIMDOrFPEnabled(). - */ - if (el == 0 - && FIELD_EX64(env->svcr, SVCR, SM) - && (!arm_is_el2_enabled(env) - || (arm_el_is_aa64(env, 2) && !(env->cp15.hcr_el2 & HCR_TGE))) - && arm_el_is_aa64(env, 1) - && !sme_fa64(env, el)) { - DP_TBFLAG_A32(flags, SME_TRAP_NONSTREAMING, 1); - } - - return rebuild_hflags_common_32(env, fp_el, mmu_idx, flags); -} - -static CPUARMTBFlags rebuild_hflags_a64(CPUARMState *env, int el, int fp_el, - ARMMMUIdx mmu_idx) -{ - CPUARMTBFlags flags = {}; - ARMMMUIdx stage1 = stage_1_mmu_idx(mmu_idx); - uint64_t tcr = regime_tcr(env, mmu_idx); - uint64_t sctlr; - int tbii, tbid; - - DP_TBFLAG_ANY(flags, AARCH64_STATE, 1); - - /* Get control bits for tagged addresses. */ - tbid = aa64_va_parameter_tbi(tcr, mmu_idx); - tbii = tbid & ~aa64_va_parameter_tbid(tcr, mmu_idx); - - DP_TBFLAG_A64(flags, TBII, tbii); - DP_TBFLAG_A64(flags, TBID, tbid); - - if (cpu_isar_feature(aa64_sve, env_archcpu(env))) { - int sve_el = sve_exception_el(env, el); - - /* - * If either FP or SVE are disabled, translator does not need len. - * If SVE EL > FP EL, FP exception has precedence, and translator - * does not need SVE EL. Save potential re-translations by forcing - * the unneeded data to zero. - */ - if (fp_el != 0) { - if (sve_el > fp_el) { - sve_el = 0; - } - } else if (sve_el == 0) { - DP_TBFLAG_A64(flags, VL, sve_vqm1_for_el(env, el)); - } - DP_TBFLAG_A64(flags, SVEEXC_EL, sve_el); - } - if (cpu_isar_feature(aa64_sme, env_archcpu(env))) { - int sme_el = sme_exception_el(env, el); - bool sm = FIELD_EX64(env->svcr, SVCR, SM); - - DP_TBFLAG_A64(flags, SMEEXC_EL, sme_el); - if (sme_el == 0) { - /* Similarly, do not compute SVL if SME is disabled. */ - int svl = sve_vqm1_for_el_sm(env, el, true); - DP_TBFLAG_A64(flags, SVL, svl); - if (sm) { - /* If SVE is disabled, we will not have set VL above. */ - DP_TBFLAG_A64(flags, VL, svl); - } - } - if (sm) { - DP_TBFLAG_A64(flags, PSTATE_SM, 1); - DP_TBFLAG_A64(flags, SME_TRAP_NONSTREAMING, !sme_fa64(env, el)); - } - DP_TBFLAG_A64(flags, PSTATE_ZA, FIELD_EX64(env->svcr, SVCR, ZA)); - } - - sctlr = regime_sctlr(env, stage1); - - if (sctlr & SCTLR_A) { - DP_TBFLAG_ANY(flags, ALIGN_MEM, 1); - } - - if (arm_cpu_data_is_big_endian_a64(el, sctlr)) { - DP_TBFLAG_ANY(flags, BE_DATA, 1); - } - - if (cpu_isar_feature(aa64_pauth, env_archcpu(env))) { - /* - * In order to save space in flags, we record only whether - * pauth is "inactive", meaning all insns are implemented as - * a nop, or "active" when some action must be performed. - * The decision of which action to take is left to a helper. - */ - if (sctlr & (SCTLR_EnIA | SCTLR_EnIB | SCTLR_EnDA | SCTLR_EnDB)) { - DP_TBFLAG_A64(flags, PAUTH_ACTIVE, 1); - } - } - - if (cpu_isar_feature(aa64_bti, env_archcpu(env))) { - /* Note that SCTLR_EL[23].BT == SCTLR_BT1. */ - if (sctlr & (el == 0 ? SCTLR_BT0 : SCTLR_BT1)) { - DP_TBFLAG_A64(flags, BT, 1); - } - } - - /* Compute the condition for using AccType_UNPRIV for LDTR et al. */ - if (!(env->pstate & PSTATE_UAO)) { - switch (mmu_idx) { - case ARMMMUIdx_E10_1: - case ARMMMUIdx_E10_1_PAN: - /* TODO: ARMv8.3-NV */ - DP_TBFLAG_A64(flags, UNPRIV, 1); - break; - case ARMMMUIdx_E20_2: - case ARMMMUIdx_E20_2_PAN: - /* - * Note that EL20_2 is gated by HCR_EL2.E2H == 1, but EL20_0 is - * gated by HCR_EL2. == '11', and so is LDTR. - */ - if (env->cp15.hcr_el2 & HCR_TGE) { - DP_TBFLAG_A64(flags, UNPRIV, 1); - } - break; - default: - break; - } - } - - if (env->pstate & PSTATE_IL) { - DP_TBFLAG_ANY(flags, PSTATE__IL, 1); - } - - if (arm_fgt_active(env, el)) { - DP_TBFLAG_ANY(flags, FGT_ACTIVE, 1); - if (FIELD_EX64(env->cp15.fgt_exec[FGTREG_HFGITR], HFGITR_EL2, ERET)) { - DP_TBFLAG_A64(flags, FGT_ERET, 1); - } - if (fgt_svc(env, el)) { - DP_TBFLAG_ANY(flags, FGT_SVC, 1); - } - } - - if (cpu_isar_feature(aa64_mte, env_archcpu(env))) { - /* - * Set MTE_ACTIVE if any access may be Checked, and leave clear - * if all accesses must be Unchecked: - * 1) If no TBI, then there are no tags in the address to check, - * 2) If Tag Check Override, then all accesses are Unchecked, - * 3) If Tag Check Fail == 0, then Checked access have no effect, - * 4) If no Allocation Tag Access, then all accesses are Unchecked. - */ - if (allocation_tag_access_enabled(env, el, sctlr)) { - DP_TBFLAG_A64(flags, ATA, 1); - if (tbid - && !(env->pstate & PSTATE_TCO) - && (sctlr & (el == 0 ? SCTLR_TCF0 : SCTLR_TCF))) { - DP_TBFLAG_A64(flags, MTE_ACTIVE, 1); - } - } - /* And again for unprivileged accesses, if required. */ - if (EX_TBFLAG_A64(flags, UNPRIV) - && tbid - && !(env->pstate & PSTATE_TCO) - && (sctlr & SCTLR_TCF0) - && allocation_tag_access_enabled(env, 0, sctlr)) { - DP_TBFLAG_A64(flags, MTE0_ACTIVE, 1); - } - /* Cache TCMA as well as TBI. */ - DP_TBFLAG_A64(flags, TCMA, aa64_va_parameter_tcma(tcr, mmu_idx)); - } - - return rebuild_hflags_common(env, fp_el, mmu_idx, flags); -} - -static CPUARMTBFlags rebuild_hflags_internal(CPUARMState *env) -{ - int el = arm_current_el(env); - int fp_el = fp_exception_el(env, el); - ARMMMUIdx mmu_idx = arm_mmu_idx_el(env, el); - - if (is_a64(env)) { - return rebuild_hflags_a64(env, el, fp_el, mmu_idx); - } else if (arm_feature(env, ARM_FEATURE_M)) { - return rebuild_hflags_m32(env, fp_el, mmu_idx); - } else { - return rebuild_hflags_a32(env, fp_el, mmu_idx); - } -} - -void arm_rebuild_hflags(CPUARMState *env) -{ - env->hflags = rebuild_hflags_internal(env); -} - -/* - * If we have triggered a EL state change we can't rely on the - * translator having passed it to us, we need to recompute. - */ -void HELPER(rebuild_hflags_m32_newel)(CPUARMState *env) -{ - int el = arm_current_el(env); - int fp_el = fp_exception_el(env, el); - ARMMMUIdx mmu_idx = arm_mmu_idx_el(env, el); - - env->hflags = rebuild_hflags_m32(env, fp_el, mmu_idx); -} - -void HELPER(rebuild_hflags_m32)(CPUARMState *env, int el) -{ - int fp_el = fp_exception_el(env, el); - ARMMMUIdx mmu_idx = arm_mmu_idx_el(env, el); - - env->hflags = rebuild_hflags_m32(env, fp_el, mmu_idx); -} - -/* - * If we have triggered a EL state change we can't rely on the - * translator having passed it to us, we need to recompute. - */ -void HELPER(rebuild_hflags_a32_newel)(CPUARMState *env) -{ - int el = arm_current_el(env); - int fp_el = fp_exception_el(env, el); - ARMMMUIdx mmu_idx = arm_mmu_idx_el(env, el); - env->hflags = rebuild_hflags_a32(env, fp_el, mmu_idx); -} - -void HELPER(rebuild_hflags_a32)(CPUARMState *env, int el) -{ - int fp_el = fp_exception_el(env, el); - ARMMMUIdx mmu_idx = arm_mmu_idx_el(env, el); - - env->hflags = rebuild_hflags_a32(env, fp_el, mmu_idx); -} - -void HELPER(rebuild_hflags_a64)(CPUARMState *env, int el) -{ - int fp_el = fp_exception_el(env, el); - ARMMMUIdx mmu_idx = arm_mmu_idx_el(env, el); - - env->hflags = rebuild_hflags_a64(env, el, fp_el, mmu_idx); -} - -static inline void assert_hflags_rebuild_correctly(CPUARMState *env) -{ -#ifdef CONFIG_DEBUG_TCG - CPUARMTBFlags c = env->hflags; - CPUARMTBFlags r = rebuild_hflags_internal(env); - - if (unlikely(c.flags != r.flags || c.flags2 != r.flags2)) { - fprintf(stderr, "TCG hflags mismatch " - "(current:(0x%08x,0x" TARGET_FMT_lx ")" - " rebuilt:(0x%08x,0x" TARGET_FMT_lx ")\n", - c.flags, c.flags2, r.flags, r.flags2); - abort(); - } -#endif -} - static bool mve_no_pred(CPUARMState *env) { /* diff --git a/target/arm/tcg-stubs.c b/target/arm/tcg-stubs.c index 1a7ddb36647..152b172e243 100644 --- a/target/arm/tcg-stubs.c +++ b/target/arm/tcg-stubs.c @@ -21,3 +21,7 @@ void raise_exception_ra(CPUARMState *env, uint32_t excp, uint32_t syndrome, { g_assert_not_reached(); } +/* Temporarily while cpu_get_tb_cpu_state() is still in common code */ +void assert_hflags_rebuild_correctly(CPUARMState *env) +{ +} diff --git a/target/arm/tcg/hflags.c b/target/arm/tcg/hflags.c new file mode 100644 index 00000000000..b2ccd77cffc --- /dev/null +++ b/target/arm/tcg/hflags.c @@ -0,0 +1,403 @@ +/* + * ARM hflags + * + * This code is licensed under the GNU GPL v2 or later. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ +#include "qemu/osdep.h" +#include "cpu.h" +#include "internals.h" +#include "exec/helper-proto.h" +#include "cpregs.h" + +static inline bool fgt_svc(CPUARMState *env, int el) +{ + /* + * Assuming fine-grained-traps are active, return true if we + * should be trapping on SVC instructions. Only AArch64 can + * trap on an SVC at EL1, but we don't need to special-case this + * because if this is AArch32 EL1 then arm_fgt_active() is false. + * We also know el is 0 or 1. + */ + return el == 0 ? + FIELD_EX64(env->cp15.fgt_exec[FGTREG_HFGITR], HFGITR_EL2, SVC_EL0) : + FIELD_EX64(env->cp15.fgt_exec[FGTREG_HFGITR], HFGITR_EL2, SVC_EL1); +} + +static CPUARMTBFlags rebuild_hflags_common(CPUARMState *env, int fp_el, + ARMMMUIdx mmu_idx, + CPUARMTBFlags flags) +{ + DP_TBFLAG_ANY(flags, FPEXC_EL, fp_el); + DP_TBFLAG_ANY(flags, MMUIDX, arm_to_core_mmu_idx(mmu_idx)); + + if (arm_singlestep_active(env)) { + DP_TBFLAG_ANY(flags, SS_ACTIVE, 1); + } + + return flags; +} + +static CPUARMTBFlags rebuild_hflags_common_32(CPUARMState *env, int fp_el, + ARMMMUIdx mmu_idx, + CPUARMTBFlags flags) +{ + bool sctlr_b = arm_sctlr_b(env); + + if (sctlr_b) { + DP_TBFLAG_A32(flags, SCTLR__B, 1); + } + if (arm_cpu_data_is_big_endian_a32(env, sctlr_b)) { + DP_TBFLAG_ANY(flags, BE_DATA, 1); + } + DP_TBFLAG_A32(flags, NS, !access_secure_reg(env)); + + return rebuild_hflags_common(env, fp_el, mmu_idx, flags); +} + +static CPUARMTBFlags rebuild_hflags_m32(CPUARMState *env, int fp_el, + ARMMMUIdx mmu_idx) +{ + CPUARMTBFlags flags = {}; + uint32_t ccr = env->v7m.ccr[env->v7m.secure]; + + /* Without HaveMainExt, CCR.UNALIGN_TRP is RES1. */ + if (ccr & R_V7M_CCR_UNALIGN_TRP_MASK) { + DP_TBFLAG_ANY(flags, ALIGN_MEM, 1); + } + + if (arm_v7m_is_handler_mode(env)) { + DP_TBFLAG_M32(flags, HANDLER, 1); + } + + /* + * v8M always applies stack limit checks unless CCR.STKOFHFNMIGN + * is suppressing them because the requested execution priority + * is less than 0. + */ + if (arm_feature(env, ARM_FEATURE_V8) && + !((mmu_idx & ARM_MMU_IDX_M_NEGPRI) && + (ccr & R_V7M_CCR_STKOFHFNMIGN_MASK))) { + DP_TBFLAG_M32(flags, STACKCHECK, 1); + } + + if (arm_feature(env, ARM_FEATURE_M_SECURITY) && env->v7m.secure) { + DP_TBFLAG_M32(flags, SECURE, 1); + } + + return rebuild_hflags_common_32(env, fp_el, mmu_idx, flags); +} + +/* This corresponds to the ARM pseudocode function IsFullA64Enabled(). */ +static bool sme_fa64(CPUARMState *env, int el) +{ + if (!cpu_isar_feature(aa64_sme_fa64, env_archcpu(env))) { + return false; + } + + if (el <= 1 && !el_is_in_host(env, el)) { + if (!FIELD_EX64(env->vfp.smcr_el[1], SMCR, FA64)) { + return false; + } + } + if (el <= 2 && arm_is_el2_enabled(env)) { + if (!FIELD_EX64(env->vfp.smcr_el[2], SMCR, FA64)) { + return false; + } + } + if (arm_feature(env, ARM_FEATURE_EL3)) { + if (!FIELD_EX64(env->vfp.smcr_el[3], SMCR, FA64)) { + return false; + } + } + + return true; +} + +static CPUARMTBFlags rebuild_hflags_a32(CPUARMState *env, int fp_el, + ARMMMUIdx mmu_idx) +{ + CPUARMTBFlags flags = {}; + int el = arm_current_el(env); + + if (arm_sctlr(env, el) & SCTLR_A) { + DP_TBFLAG_ANY(flags, ALIGN_MEM, 1); + } + + if (arm_el_is_aa64(env, 1)) { + DP_TBFLAG_A32(flags, VFPEN, 1); + } + + if (el < 2 && env->cp15.hstr_el2 && arm_is_el2_enabled(env) && + (arm_hcr_el2_eff(env) & (HCR_E2H | HCR_TGE)) != (HCR_E2H | HCR_TGE)) { + DP_TBFLAG_A32(flags, HSTR_ACTIVE, 1); + } + + if (arm_fgt_active(env, el)) { + DP_TBFLAG_ANY(flags, FGT_ACTIVE, 1); + if (fgt_svc(env, el)) { + DP_TBFLAG_ANY(flags, FGT_SVC, 1); + } + } + + if (env->uncached_cpsr & CPSR_IL) { + DP_TBFLAG_ANY(flags, PSTATE__IL, 1); + } + + /* + * The SME exception we are testing for is raised via + * AArch64.CheckFPAdvSIMDEnabled(), as called from + * AArch32.CheckAdvSIMDOrFPEnabled(). + */ + if (el == 0 + && FIELD_EX64(env->svcr, SVCR, SM) + && (!arm_is_el2_enabled(env) + || (arm_el_is_aa64(env, 2) && !(env->cp15.hcr_el2 & HCR_TGE))) + && arm_el_is_aa64(env, 1) + && !sme_fa64(env, el)) { + DP_TBFLAG_A32(flags, SME_TRAP_NONSTREAMING, 1); + } + + return rebuild_hflags_common_32(env, fp_el, mmu_idx, flags); +} + +static CPUARMTBFlags rebuild_hflags_a64(CPUARMState *env, int el, int fp_el, + ARMMMUIdx mmu_idx) +{ + CPUARMTBFlags flags = {}; + ARMMMUIdx stage1 = stage_1_mmu_idx(mmu_idx); + uint64_t tcr = regime_tcr(env, mmu_idx); + uint64_t sctlr; + int tbii, tbid; + + DP_TBFLAG_ANY(flags, AARCH64_STATE, 1); + + /* Get control bits for tagged addresses. */ + tbid = aa64_va_parameter_tbi(tcr, mmu_idx); + tbii = tbid & ~aa64_va_parameter_tbid(tcr, mmu_idx); + + DP_TBFLAG_A64(flags, TBII, tbii); + DP_TBFLAG_A64(flags, TBID, tbid); + + if (cpu_isar_feature(aa64_sve, env_archcpu(env))) { + int sve_el = sve_exception_el(env, el); + + /* + * If either FP or SVE are disabled, translator does not need len. + * If SVE EL > FP EL, FP exception has precedence, and translator + * does not need SVE EL. Save potential re-translations by forcing + * the unneeded data to zero. + */ + if (fp_el != 0) { + if (sve_el > fp_el) { + sve_el = 0; + } + } else if (sve_el == 0) { + DP_TBFLAG_A64(flags, VL, sve_vqm1_for_el(env, el)); + } + DP_TBFLAG_A64(flags, SVEEXC_EL, sve_el); + } + if (cpu_isar_feature(aa64_sme, env_archcpu(env))) { + int sme_el = sme_exception_el(env, el); + bool sm = FIELD_EX64(env->svcr, SVCR, SM); + + DP_TBFLAG_A64(flags, SMEEXC_EL, sme_el); + if (sme_el == 0) { + /* Similarly, do not compute SVL if SME is disabled. */ + int svl = sve_vqm1_for_el_sm(env, el, true); + DP_TBFLAG_A64(flags, SVL, svl); + if (sm) { + /* If SVE is disabled, we will not have set VL above. */ + DP_TBFLAG_A64(flags, VL, svl); + } + } + if (sm) { + DP_TBFLAG_A64(flags, PSTATE_SM, 1); + DP_TBFLAG_A64(flags, SME_TRAP_NONSTREAMING, !sme_fa64(env, el)); + } + DP_TBFLAG_A64(flags, PSTATE_ZA, FIELD_EX64(env->svcr, SVCR, ZA)); + } + + sctlr = regime_sctlr(env, stage1); + + if (sctlr & SCTLR_A) { + DP_TBFLAG_ANY(flags, ALIGN_MEM, 1); + } + + if (arm_cpu_data_is_big_endian_a64(el, sctlr)) { + DP_TBFLAG_ANY(flags, BE_DATA, 1); + } + + if (cpu_isar_feature(aa64_pauth, env_archcpu(env))) { + /* + * In order to save space in flags, we record only whether + * pauth is "inactive", meaning all insns are implemented as + * a nop, or "active" when some action must be performed. + * The decision of which action to take is left to a helper. + */ + if (sctlr & (SCTLR_EnIA | SCTLR_EnIB | SCTLR_EnDA | SCTLR_EnDB)) { + DP_TBFLAG_A64(flags, PAUTH_ACTIVE, 1); + } + } + + if (cpu_isar_feature(aa64_bti, env_archcpu(env))) { + /* Note that SCTLR_EL[23].BT == SCTLR_BT1. */ + if (sctlr & (el == 0 ? SCTLR_BT0 : SCTLR_BT1)) { + DP_TBFLAG_A64(flags, BT, 1); + } + } + + /* Compute the condition for using AccType_UNPRIV for LDTR et al. */ + if (!(env->pstate & PSTATE_UAO)) { + switch (mmu_idx) { + case ARMMMUIdx_E10_1: + case ARMMMUIdx_E10_1_PAN: + /* TODO: ARMv8.3-NV */ + DP_TBFLAG_A64(flags, UNPRIV, 1); + break; + case ARMMMUIdx_E20_2: + case ARMMMUIdx_E20_2_PAN: + /* + * Note that EL20_2 is gated by HCR_EL2.E2H == 1, but EL20_0 is + * gated by HCR_EL2. == '11', and so is LDTR. + */ + if (env->cp15.hcr_el2 & HCR_TGE) { + DP_TBFLAG_A64(flags, UNPRIV, 1); + } + break; + default: + break; + } + } + + if (env->pstate & PSTATE_IL) { + DP_TBFLAG_ANY(flags, PSTATE__IL, 1); + } + + if (arm_fgt_active(env, el)) { + DP_TBFLAG_ANY(flags, FGT_ACTIVE, 1); + if (FIELD_EX64(env->cp15.fgt_exec[FGTREG_HFGITR], HFGITR_EL2, ERET)) { + DP_TBFLAG_A64(flags, FGT_ERET, 1); + } + if (fgt_svc(env, el)) { + DP_TBFLAG_ANY(flags, FGT_SVC, 1); + } + } + + if (cpu_isar_feature(aa64_mte, env_archcpu(env))) { + /* + * Set MTE_ACTIVE if any access may be Checked, and leave clear + * if all accesses must be Unchecked: + * 1) If no TBI, then there are no tags in the address to check, + * 2) If Tag Check Override, then all accesses are Unchecked, + * 3) If Tag Check Fail == 0, then Checked access have no effect, + * 4) If no Allocation Tag Access, then all accesses are Unchecked. + */ + if (allocation_tag_access_enabled(env, el, sctlr)) { + DP_TBFLAG_A64(flags, ATA, 1); + if (tbid + && !(env->pstate & PSTATE_TCO) + && (sctlr & (el == 0 ? SCTLR_TCF0 : SCTLR_TCF))) { + DP_TBFLAG_A64(flags, MTE_ACTIVE, 1); + } + } + /* And again for unprivileged accesses, if required. */ + if (EX_TBFLAG_A64(flags, UNPRIV) + && tbid + && !(env->pstate & PSTATE_TCO) + && (sctlr & SCTLR_TCF0) + && allocation_tag_access_enabled(env, 0, sctlr)) { + DP_TBFLAG_A64(flags, MTE0_ACTIVE, 1); + } + /* Cache TCMA as well as TBI. */ + DP_TBFLAG_A64(flags, TCMA, aa64_va_parameter_tcma(tcr, mmu_idx)); + } + + return rebuild_hflags_common(env, fp_el, mmu_idx, flags); +} + +static CPUARMTBFlags rebuild_hflags_internal(CPUARMState *env) +{ + int el = arm_current_el(env); + int fp_el = fp_exception_el(env, el); + ARMMMUIdx mmu_idx = arm_mmu_idx_el(env, el); + + if (is_a64(env)) { + return rebuild_hflags_a64(env, el, fp_el, mmu_idx); + } else if (arm_feature(env, ARM_FEATURE_M)) { + return rebuild_hflags_m32(env, fp_el, mmu_idx); + } else { + return rebuild_hflags_a32(env, fp_el, mmu_idx); + } +} + +void arm_rebuild_hflags(CPUARMState *env) +{ + env->hflags = rebuild_hflags_internal(env); +} + +/* + * If we have triggered a EL state change we can't rely on the + * translator having passed it to us, we need to recompute. + */ +void HELPER(rebuild_hflags_m32_newel)(CPUARMState *env) +{ + int el = arm_current_el(env); + int fp_el = fp_exception_el(env, el); + ARMMMUIdx mmu_idx = arm_mmu_idx_el(env, el); + + env->hflags = rebuild_hflags_m32(env, fp_el, mmu_idx); +} + +void HELPER(rebuild_hflags_m32)(CPUARMState *env, int el) +{ + int fp_el = fp_exception_el(env, el); + ARMMMUIdx mmu_idx = arm_mmu_idx_el(env, el); + + env->hflags = rebuild_hflags_m32(env, fp_el, mmu_idx); +} + +/* + * If we have triggered a EL state change we can't rely on the + * translator having passed it to us, we need to recompute. + */ +void HELPER(rebuild_hflags_a32_newel)(CPUARMState *env) +{ + int el = arm_current_el(env); + int fp_el = fp_exception_el(env, el); + ARMMMUIdx mmu_idx = arm_mmu_idx_el(env, el); + env->hflags = rebuild_hflags_a32(env, fp_el, mmu_idx); +} + +void HELPER(rebuild_hflags_a32)(CPUARMState *env, int el) +{ + int fp_el = fp_exception_el(env, el); + ARMMMUIdx mmu_idx = arm_mmu_idx_el(env, el); + + env->hflags = rebuild_hflags_a32(env, fp_el, mmu_idx); +} + +void HELPER(rebuild_hflags_a64)(CPUARMState *env, int el) +{ + int fp_el = fp_exception_el(env, el); + ARMMMUIdx mmu_idx = arm_mmu_idx_el(env, el); + + env->hflags = rebuild_hflags_a64(env, el, fp_el, mmu_idx); +} + +void assert_hflags_rebuild_correctly(CPUARMState *env) +{ +#ifdef CONFIG_DEBUG_TCG + CPUARMTBFlags c = env->hflags; + CPUARMTBFlags r = rebuild_hflags_internal(env); + + if (unlikely(c.flags != r.flags || c.flags2 != r.flags2)) { + fprintf(stderr, "TCG hflags mismatch " + "(current:(0x%08x,0x" TARGET_FMT_lx ")" + " rebuilt:(0x%08x,0x" TARGET_FMT_lx ")\n", + c.flags, c.flags2, r.flags, r.flags2); + abort(); + } +#endif +} diff --git a/target/arm/tcg/meson.build b/target/arm/tcg/meson.build index fa8a9eab933..d27e76af6cb 100644 --- a/target/arm/tcg/meson.build +++ b/target/arm/tcg/meson.build @@ -24,6 +24,7 @@ arm_ss.add(files( 'translate-neon.c', 'translate-vfp.c', 'crypto_helper.c', + 'hflags.c', 'iwmmxt_helper.c', 'm_helper.c', 'mve_helper.c', From patchwork Mon Feb 27 14:00:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 657069 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2380564wrb; Mon, 27 Feb 2023 06:27:09 -0800 (PST) X-Google-Smtp-Source: AK7set+prYwn6zF191wkr5Hmg32GmdgYU/+eNmdTsuIa/FtfRDG9f5uwG/4rSG600JHsqZuKcSmL X-Received: by 2002:a05:622a:5:b0:3bf:ca3d:6757 with SMTP id x5-20020a05622a000500b003bfca3d6757mr12354628qtw.66.1677508028856; Mon, 27 Feb 2023 06:27:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677508028; cv=none; d=google.com; s=arc-20160816; b=FMa4Svu9mAZpO8yVtIJzWE163IflPOE2d6qR/AfnDCrATVHG4vxWrncaL4DUDyuxYZ FrEVD/H7X+i7rrwj4YLblGmJejs/oQh9VxiOQ2afPu15hMF3HjErl7bhIETHo5MnaQmr dlqDD9+wKfVljYo8/tbHcCFi9OYW9q9EYir20eahQJ9nZSiisVLkhQymWWvTgBGtDp7E fm+o6WESZPq2MJAHQsh/+yGEVf8WDdMRhKmoUFhsSRCzEECRLAPPRFoIFh/d2RRyxKjS P9vuXv4S5c0B5OfEW30ORA5wztda4vA2upSB1brdqmCDxb9/PGJ4SADDkHlDvdnHTLGS Hlxw== 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:to:from :dkim-signature; bh=6hrZpnhPLRDXNa3A83fUHvIa4VTeZDIvb4ThTrNTe+A=; b=OvpgkT0EoIF5ihhwimwZbFM4kdV/2qGG1mcML1hFRGeTxkzYsrCXcDH36qhr02Tw9V Y2l5gkbtWgy5d+UVL0vA/D3pB3pzMm7rbctmbXyBB9XJbYw4da3JEj5M7GcPEbCJK2cW /d8T9mvXc40acPD/yiyuEEdjbj8uIDsnC8B/ssHncGe3gODwKZA+lujoSdJDVbdOuVoA /T58c0pRCyiecxsHOAHDqOzHJ+CS9aCgY7nC1vBDH++0sDSZGUfsKEg2z/TkTFnCmPjY vJRzWgfaW1H4yyvMhEGJQpNBEunrvAx4hRFTQNVnyhYev4UZy15YrFOY+uM4g+YlcN8x 91nw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Kj1DMvse; 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 a18-20020a05622a02d200b003ba00b95ffesi7065108qtx.529.2023.02.27.06.27.08 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:27:08 -0800 (PST) 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=Kj1DMvse; 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 1pWe4x-0001PH-Dt; Mon, 27 Feb 2023 09:02:13 -0500 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 1pWe4A-0000ds-Af for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:01:29 -0500 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWe47-0007Xv-Ox for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:01:21 -0500 Received: by mail-wm1-x336.google.com with SMTP id d41-20020a05600c4c2900b003e9e066550fso3884554wmp.4 for ; Mon, 27 Feb 2023 06:01:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=6hrZpnhPLRDXNa3A83fUHvIa4VTeZDIvb4ThTrNTe+A=; b=Kj1DMvseuh3f0ipPcHG5Sto6W8TOREEnezReAJy1Gu/ST4WQINTz8CivgrRvJ2mAQC UWbIDcW7iIOH0R+bfMK+194dJruazsloVtM02w0SodEKNkA+ndkwaiR27ItciFVoJ2lu zDv4FBoDg42h6KD1y9jhDLhd/n8Bx4QhBY6DZOfMXd9TmCCGvYhGOjLySzRXJhFJHuRn tg6B/Y7wAW+fgs1gEtxBHbx5lHrpcn9ofvEag2PIs1xqVL+KlLALDiLoxUKSq+W9fEDo qGCrXUl6UCDZFcbOEg/v4wYfI6iO9c3Zemjqkx1jYHL8R62YkttoRAMpDkb4qf2JN1hZ TLwg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=6hrZpnhPLRDXNa3A83fUHvIa4VTeZDIvb4ThTrNTe+A=; b=UAgAHzO/u+XphMdSUxgOWUAHfRgWL2Qk8OsER8mZHE0mYKNSnuLViEAbUhXlOSA6wF s5+P/Y+C5OjXBNpp6JIf3JHCrZd9shDfjtIT7qj1EBoS15h6prlGcAw6Wzgfksj37Qu9 3L6DD1jVPxGEPqFQiZrcTSiws+d/UygjqND4PxbI3SFm+LKUqFZhPuAH7j7Jw3VfoqIx 8ZBHjRjXM1DI8KTCbc9X1HKv85Xo1T+Uk0oDB5rA+YjtAaX5ip73ad7ZAixgI0APtO/r nrzDVobqAgs7YqvXu57LG03iIWlk0thJ7tA7Hf64V9VLnHijk8feP0SyuXPcI/zcOSH3 rsMQ== X-Gm-Message-State: AO0yUKWJgdC9zxP3ZpT2W8Tfc+uFifdaRnAngYr+vIZbOsrdZanFwRnW eOTjY0x5CELLeG06T3+gh3zds3ktTafF+JQW X-Received: by 2002:a7b:c384:0:b0:3ea:d620:570a with SMTP id s4-20020a7bc384000000b003ead620570amr12963128wmj.38.1677506477153; Mon, 27 Feb 2023 06:01:17 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id s9-20020a5d4249000000b002c5598c14acsm7158514wrr.6.2023.02.27.06.01.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Feb 2023 06:01:16 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 09/25] target/arm: Move regime_using_lpae_format into internal.h Date: Mon, 27 Feb 2023 14:00:46 +0000 Message-Id: <20230227140102.3712344-10-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230227140102.3712344-1-peter.maydell@linaro.org> References: <20230227140102.3712344-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::336; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x336.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 From: Fabiano Rosas This function is needed by common code (ptw.c), so move it along with the other regime_* functions in internal.h. When we enable the build without TCG, the tlb_helper.c file will not be present. Signed-off-by: Fabiano Rosas Reviewed-by: Richard Henderson Tested-by: Philippe Mathieu-Daudé Signed-off-by: Peter Maydell --- target/arm/internals.h | 21 ++++++++++++++++++--- target/arm/tcg/tlb_helper.c | 18 ------------------ 2 files changed, 18 insertions(+), 21 deletions(-) diff --git a/target/arm/internals.h b/target/arm/internals.h index ed48f8c9a69..680c5747170 100644 --- a/target/arm/internals.h +++ b/target/arm/internals.h @@ -600,9 +600,6 @@ int arm_mmu_idx_to_el(ARMMMUIdx mmu_idx); /* Return the MMU index for a v7M CPU in the specified security state */ ARMMMUIdx arm_v7m_mmu_idx_for_secstate(CPUARMState *env, bool secstate); -/* Return true if the translation regime is using LPAE format page tables */ -bool regime_using_lpae_format(CPUARMState *env, ARMMMUIdx mmu_idx); - /* * Return true if the stage 1 translation regime is using LPAE * format page tables @@ -767,6 +764,24 @@ static inline uint64_t regime_tcr(CPUARMState *env, ARMMMUIdx mmu_idx) return env->cp15.tcr_el[regime_el(env, mmu_idx)]; } +/* Return true if the translation regime is using LPAE format page tables */ +static inline bool regime_using_lpae_format(CPUARMState *env, ARMMMUIdx mmu_idx) +{ + int el = regime_el(env, mmu_idx); + if (el == 2 || arm_el_is_aa64(env, el)) { + return true; + } + if (arm_feature(env, ARM_FEATURE_PMSA) && + arm_feature(env, ARM_FEATURE_V8)) { + return true; + } + if (arm_feature(env, ARM_FEATURE_LPAE) + && (regime_tcr(env, mmu_idx) & TTBCR_EAE)) { + return true; + } + return false; +} + /** * arm_num_brps: Return number of implemented breakpoints. * Note that the ID register BRPS field is "number of bps - 1", diff --git a/target/arm/tcg/tlb_helper.c b/target/arm/tcg/tlb_helper.c index 60abcbebe64..31eb77f7df9 100644 --- a/target/arm/tcg/tlb_helper.c +++ b/target/arm/tcg/tlb_helper.c @@ -12,24 +12,6 @@ #include "exec/helper-proto.h" -/* Return true if the translation regime is using LPAE format page tables */ -bool regime_using_lpae_format(CPUARMState *env, ARMMMUIdx mmu_idx) -{ - int el = regime_el(env, mmu_idx); - if (el == 2 || arm_el_is_aa64(env, el)) { - return true; - } - if (arm_feature(env, ARM_FEATURE_PMSA) && - arm_feature(env, ARM_FEATURE_V8)) { - return true; - } - if (arm_feature(env, ARM_FEATURE_LPAE) - && (regime_tcr(env, mmu_idx) & TTBCR_EAE)) { - return true; - } - return false; -} - /* * Returns true if the stage 1 translation regime is using LPAE format page * tables. Used when raising alignment exceptions, whose FSR changes depending From patchwork Mon Feb 27 14:00:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 656973 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2365920wrb; Mon, 27 Feb 2023 06:02:07 -0800 (PST) X-Google-Smtp-Source: AK7set9ieYA/CfY3lWVzVtkfgCvL1HqbMaJVDopiBEmPYzA7qUwW6PJE2I3C+dDhXBSSpWCvezoz X-Received: by 2002:a05:6122:a01:b0:401:5986:10ed with SMTP id 1-20020a0561220a0100b00401598610edmr22734837vkn.13.1677506526926; Mon, 27 Feb 2023 06:02:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677506526; cv=none; d=google.com; s=arc-20160816; b=XueHcctGhSbSOVzhYArqiVoRPYOdPwXGCCF6NmZ2jJbjA03bWyWzMD1U++aF+f5Zxt CkO8KFI3Y59VZ2KT4U6zJsa2Bc+B5KdxQFh1NvHjzyK8ZKex/Q8qmhopHjrYBy7L6OjX 1s+5ZERoGkjafMeKzFNc4+TgPWRoioMNXnnOfivLwP6rMqX4+pwt8Lh/cmrGQzoaAehZ Q4T9is7uSzdBVcqbRDNVvhZilg68+MPsPHv7F9+SNCHE7tneJl3A3CuDNjyQ6NHQQMtt SY9+GiYvVuHkszqkaPXVE4eT7Q3V8FUqvBFYpBMqViy1vEuHlg6P/MRfetx7riLPANKR gYZw== 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:to:from :dkim-signature; bh=0HDhvD5xSaakovM1bRp/U074mbpNZA16y8F0RLm3wAY=; b=boO7l+pZ9kZ5WhW8uVA6nNPv2MhmnDtarqmRp7k1FwkFEm05Ng+ktrGTJX8J9eecge t9D33SzIgUncfGhvaj8eO/9QhcSY9Z0YgSB/2J0WT7JX+ibiijdEFOBxQ3GYUW07VwxV 5fmUnsSfJjb95qgMAwztcSJBr9bJ94Vf2amQLOgc9VcHPrDxScGs992LyJqIKzhNssHo mKaSLsZrmmsvx0mOUlZmv//ljgHUl+/+ZVeyXyQYeiGtSpgMirvkxeIHlUODUMKDjnqK YqEFv84zSZV+SUAd9u2fL6LfLYh17AsxrrssnNWgEpPl3kmvvUngYMIXHZwUNU/OxYcC NXQQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="Sj5jP/yT"; 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 l25-20020a67fe19000000b004146d2d9462si2428865vsr.510.2023.02.27.06.02.06 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:02:06 -0800 (PST) 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="Sj5jP/yT"; 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 1pWe4q-00019k-Ah; Mon, 27 Feb 2023 09:02:04 -0500 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 1pWe4B-0000eB-ST for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:01:29 -0500 Received: from mail-wr1-x433.google.com ([2a00:1450:4864:20::433]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWe48-0007Y0-J3 for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:01:23 -0500 Received: by mail-wr1-x433.google.com with SMTP id h14so6337939wru.4 for ; Mon, 27 Feb 2023 06:01:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=0HDhvD5xSaakovM1bRp/U074mbpNZA16y8F0RLm3wAY=; b=Sj5jP/yTdFoAkecfQvfdeh42lr2ulSkySYpL4tAaIIlNACzRcUykV1ASZBZqDliQsf GHCGGG/HrYAmoRmAlt0UQlmlyNNKsoEM4ohmGjbNZcBpc7yqcdkMtJc3HFSZquwwjyg7 +Mj7UkKZqQCuiXtVBwFDfBUoMzTGLYPIvc4VCWysJ1vYXsMkq7onRFA8WzGds5AAzzOZ F9ebpGjxIFkoSfqhhtT2kz2S12oUnl4HmxeDTkqCbrfeLbswvPUxg4weh6s7Brl+koHa aS5XlsiWN50I49gkh0Pw/XJL/I3Np+8uGgim/0aPfhw7qo69ft1c7L5mswG412+DNAKD 70lA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=0HDhvD5xSaakovM1bRp/U074mbpNZA16y8F0RLm3wAY=; b=YnbZP67SYrUBqxgk0+lkvirRioLvfUoB0RfPg3gN0eAEAVdZ2tL3g3ohz1aAeMTT0x oEua9uhj+wGVl+VKmEtFVJSXqO9y3LxQ342JEsB4ufn3lgdWfNLEGEVW0ycwPinfqORm EUx1Al/05W4KKu5LJDY6fodCwRViQFKGWE0lMQDmY+Opik4Oi63TFSPKeF1Goi6cYscx eKq/6kHpc3Lx6fdlRnBJleig4JHSOwECUNS9dRbhU+fPodAyjBx8pLs9EgDqj9LxomZZ jqeV/MXShc0djPtAdioiho6IwOpAkQUVPs2Xe7f6XxjCVb33lLCPmZLTj8url0/OkGBC F5Gg== X-Gm-Message-State: AO0yUKVRd0Shulb46yukkK49t5KyYM0mTqMkjQRTcz8aRgOHL/Uc9iAY EpwhORka6NyC+C4jPuusipQskIKUqCEkwoc2 X-Received: by 2002:adf:f386:0:b0:2c7:995f:3030 with SMTP id m6-20020adff386000000b002c7995f3030mr7859613wro.60.1677506478827; Mon, 27 Feb 2023 06:01:18 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id s9-20020a5d4249000000b002c5598c14acsm7158514wrr.6.2023.02.27.06.01.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Feb 2023 06:01:17 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 10/25] target/arm: Don't access TCG code when debugging with KVM Date: Mon, 27 Feb 2023 14:00:47 +0000 Message-Id: <20230227140102.3712344-11-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230227140102.3712344-1-peter.maydell@linaro.org> References: <20230227140102.3712344-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::433; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x433.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 From: Fabiano Rosas When TCG is disabled this part of the code should not be reachable, so wrap it with an ifdef for now. Signed-off-by: Fabiano Rosas Reviewed-by: Richard Henderson Tested-by: Philippe Mathieu-Daudé Signed-off-by: Peter Maydell --- target/arm/ptw.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/target/arm/ptw.c b/target/arm/ptw.c index 2b125fff446..be0cc6bc15f 100644 --- a/target/arm/ptw.c +++ b/target/arm/ptw.c @@ -254,6 +254,7 @@ static bool S1_ptw_translate(CPUARMState *env, S1Translate *ptw, ptw->out_host = NULL; ptw->out_rw = false; } else { +#ifdef CONFIG_TCG CPUTLBEntryFull *full; int flags; @@ -270,6 +271,9 @@ static bool S1_ptw_translate(CPUARMState *env, S1Translate *ptw, ptw->out_rw = full->prot & PAGE_WRITE; pte_attrs = full->pte_attrs; pte_secure = full->attrs.secure; +#else + g_assert_not_reached(); +#endif } if (regime_is_stage2(s2_mmu_idx)) { From patchwork Mon Feb 27 14:00:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 657004 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2370743wrb; Mon, 27 Feb 2023 06:08:59 -0800 (PST) X-Google-Smtp-Source: AK7set+dr0GkE1jxeg7/gAxYRqPa+nsYcqP4EiGCRQm78TOU74DtzSJoqLJ0nK98vRd/3g9pmtes X-Received: by 2002:a05:622a:46:b0:3a8:1677:bc39 with SMTP id y6-20020a05622a004600b003a81677bc39mr43554611qtw.52.1677506938787; Mon, 27 Feb 2023 06:08:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677506938; cv=none; d=google.com; s=arc-20160816; b=AVWRldF7m4E+T0oVLjxj57lhNGSPKGpAyTpohoevOgHxMnu+d/DIELumZs4sgCg8a2 pbbdoL5/HfsdX7u0e8tVV4XiPyoFLW6baFvBui8oGcJay09fN5RE20zXOqm+pChxf50G 6bAcVOH6u53JM/6Jpp8+3W2PdfC9pD8+Nkz7mkt4O1dB+YsQ7hoXyfAxBsRRksIBfrro KtofxhBZqmTz2/sDyxgZS44LutUl2ddTfkBS1AsuB19ho4SH96fjRYO1EhbUQBErCmat CPeUW9oHAUWktGhOZ4MB9p+RXimbu7KWO7TxZ97agwc6sH2ZUH8tyQNZZgdx+bZcPnLf my3w== 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:to:from :dkim-signature; bh=FhwqGr42a8O7VHpaKqpcSkL5g78mGefM0X1jMjxurOQ=; b=GIW+lwdoIXpm9/Nx9B+Br5Wy03vLfoWJ0wfCxr1+EDw+q8Hsc9N2znVSnVjdmd2vuU /sy1vwoP0F3PHzQfQ52dmaDDXbC2LPqVDj1YXJcIba1N0Hh9AOZmb1JiZHOHCubN7Xtk m9V1BB5ThSoFZgl/hsnEeN6rW31t4iq6QGu2NLelM6ADHYGmDTwPoTWm4RA2qWbjG6TC mSfywCC+QlBWLQlfLfhE8tQEJlA6DHPHOMjtS4BbHNKnMkTBjqDYOM4p1jd2necY8Uvt i6s3tOsm4HnlPPgqXOd1kkPYwqnpCjW1kQ3nQXdN9glj4uSWmwbA31IQ95FZ8R/aQEVJ SA+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=yB5sAnZz; 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 p76-20020a37424f000000b0071d18e31edesi6126690qka.166.2023.02.27.06.08.58 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:08:58 -0800 (PST) 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=yB5sAnZz; 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 1pWe58-0002ES-KK; Mon, 27 Feb 2023 09:02:22 -0500 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 1pWe4B-0000eA-S8 for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:01:29 -0500 Received: from mail-wm1-x330.google.com ([2a00:1450:4864:20::330]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWe49-0007XC-U8 for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:01:23 -0500 Received: by mail-wm1-x330.google.com with SMTP id o38-20020a05600c512600b003e8320d1c11so6627824wms.1 for ; Mon, 27 Feb 2023 06:01:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=FhwqGr42a8O7VHpaKqpcSkL5g78mGefM0X1jMjxurOQ=; b=yB5sAnZzMUf8BK4mQ6+/evWC0D4cShyIVQjzxTYHaettME7cOIVNuxwVpSBOsP2mAK LE8ybqYu5RvUOysW2f4reNejpKdqK8YAuyuo+BK1vnpozPEl4fS/J6QyoS3GDGmVi87e IfRX5inTknv9dKNpj42OMmDcZ7BRpKCHq37vyp7kKyqZ2s2NEp7v8ar8pJtssMFDllU8 2NOHXIQv48yAB4DbpATL2nFxGV5bj4ITp8Ud3Cn9F1LEsJkIKwnFtWZ46HAv2RA4FJ5j EDUFhrvZAuBy4TcFXFg597L+gOmx0l+Knv7IxwkaToQATm0t7KVhrzjixFTmsWORE1XO zP3w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=FhwqGr42a8O7VHpaKqpcSkL5g78mGefM0X1jMjxurOQ=; b=676MCe7ieC8twkQhApyJwAaqYkSxiOrjnHWGLN6sDoz3rmOK0ktrDo43R64zgPegX0 UuhrOuaGJ0SYsmI5Sh7XQeMsn3mxHng9GLz9vu/w71T8nRgFZjxCxjsPs2ttW8ecokEl DmO+b0EwHGc3vTXoN4PP0pznphFmXRQo5WUG29SEj0iIkXDqsMLOvGfW+lDPgxaBMlwv BpnK4FDwl4JQT8mNN8hHJtFrUcjS5+tq+LTAzIYoltwjfzSj6SoOnlFxfBPpTSrF0yxo /uxGupgow4i1mUhdfYDfq68WsMVbKU7pQ1iPbzTWdtVd6ISwD78Yq8wmGu8b72MSXpSC h7qw== X-Gm-Message-State: AO0yUKVGn7FPH+Cde7pW304OJTtSEFRcL6lqGSAGRdf7/aULyJ9yoibg 17DEpjXiM5tcBQZBzptR+cWO19/VNr/iDR6u X-Received: by 2002:a05:600c:810:b0:3dc:557f:6123 with SMTP id k16-20020a05600c081000b003dc557f6123mr18705719wmp.1.1677506480195; Mon, 27 Feb 2023 06:01:20 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id s9-20020a5d4249000000b002c5598c14acsm7158514wrr.6.2023.02.27.06.01.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Feb 2023 06:01:19 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 11/25] cpu-defs.h: Expose CPUTLBEntryFull to non-TCG code Date: Mon, 27 Feb 2023 14:00:48 +0000 Message-Id: <20230227140102.3712344-12-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230227140102.3712344-1-peter.maydell@linaro.org> References: <20230227140102.3712344-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::330; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x330.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 From: Fabiano Rosas This struct has no dependencies on TCG code and it is being used in target/arm/ptw.c to simplify the passing around of page table walk results. Those routines can be reached by KVM code via the gdbstub breakpoint code, so take the structure out of CONFIG_TCG to make it visible when building with --disable-tcg. Signed-off-by: Fabiano Rosas Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Signed-off-by: Peter Maydell --- include/exec/cpu-defs.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/exec/cpu-defs.h b/include/exec/cpu-defs.h index 21309cf567a..d5a4f307178 100644 --- a/include/exec/cpu-defs.h +++ b/include/exec/cpu-defs.h @@ -135,6 +135,10 @@ typedef struct CPUTLBEntry { QEMU_BUILD_BUG_ON(sizeof(CPUTLBEntry) != (1 << CPU_TLB_ENTRY_BITS)); + +#endif /* !CONFIG_USER_ONLY && CONFIG_TCG */ + +#if !defined(CONFIG_USER_ONLY) /* * The full TLB entry, which is not accessed by generated TCG code, * so the layout is not as critical as that of CPUTLBEntry. This is @@ -176,7 +180,9 @@ typedef struct CPUTLBEntryFull { TARGET_PAGE_ENTRY_EXTRA #endif } CPUTLBEntryFull; +#endif /* !CONFIG_USER_ONLY */ +#if !defined(CONFIG_USER_ONLY) && defined(CONFIG_TCG) /* * Data elements that are per MMU mode, minus the bits accessed by * the TCG fast path. From patchwork Mon Feb 27 14:00:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 657035 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2374273wrb; Mon, 27 Feb 2023 06:15:01 -0800 (PST) X-Google-Smtp-Source: AK7set9WcnE0wWd9wXGv2VYwHfBnS4+9cC1kydjPJsJ1tKEirm2ijSVoy4KMIDMqcnvPrA7bk/oW X-Received: by 2002:ad4:5ccf:0:b0:56f:37a:4563 with SMTP id iu15-20020ad45ccf000000b0056f037a4563mr51237077qvb.42.1677507301780; Mon, 27 Feb 2023 06:15:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677507301; cv=none; d=google.com; s=arc-20160816; b=qmfdWb3eW+U9/bxY0CBlmcDvFBKwIjjK5hTXWwenAaigAvjdFeb2Dh1+osMYguT084 7lCZE0610PhDwZkNc11gDrMdxYd5X3VcZVx5JZr+a2VG3UoRCHVkYetwciaGwy2C+FKA 4PL8xvvBYh/DJo6P2ycXkWOaKojYgKplnqQaVeQMtvS4e4/YmREYcUrxXcmPCh7ljM2p RzWTeL1M2BNCUsuuTG5Ww/VH6dGljYB9T7vLs10FmKgprBVZx4AKFBvnFLI3kH/v6wm9 dTV8hBY7ORBFx+1A/rE7+yiARbC35038Niiyh4BQfzHwKkokjiH2t8jTuUo3S7GqgfFf C1Dw== 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:to:from :dkim-signature; bh=WQzF5MTagtjkGDrk69RrslbmWiJlU48DYJ35+pc8mww=; b=JYTiCBQxRRJtlLKe1TbaeRlF3VYlr4WQAYBgTBJg0Dku6bW0xwWcBwPw2LmCNA4ZMM PV58qno9BbktrzhToH3wHR1VvWRo/LrLsGECNVR/CFXQtu02WxMujW8WMDcaoQouAz1u 6h6EyolEAGvlV0DKRUIgwlOOlpq9/eSGSccpINRtxXEf6QbCfWcNumfwNCFMQuwJE3XA /53YTTy0pYRp1RLKlKdjqo2Vbs4MJEkoMVDoFMpD1waR88pMU7JAKUcmrCp7w2oKV6qz 1OODOYHWz11QHRpfXnItVntp6LoLXVS7PN8+wh4NGZptvpLXnU+YJTGRtxl9mGxBEwDp zNiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=EtWk3QH2; 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 s11-20020a0c8d4b000000b0056f042f1f47si6593973qvb.154.2023.02.27.06.15.01 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:15:01 -0800 (PST) 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=EtWk3QH2; 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 1pWe5B-0002MD-3h; Mon, 27 Feb 2023 09:02:25 -0500 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 1pWe4C-0000eF-Oc for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:01:33 -0500 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWe4A-0007WH-Pv for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:01:24 -0500 Received: by mail-wr1-x436.google.com with SMTP id bx12so3174848wrb.11 for ; Mon, 27 Feb 2023 06:01:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=WQzF5MTagtjkGDrk69RrslbmWiJlU48DYJ35+pc8mww=; b=EtWk3QH2phsRLcsm659fppzGznMqpUatI66BWLuJk2Hq/Yz4kj8aLTvzbltsunmTRx PMDkTXoksJVVtTFwQ/hVmIDTFUlx3/Wf62JohUYWjE9F8+xig0KpUrKjTva4PhLsDTG/ seQdHyzizMOajhg8PjtuVf2LCbQ7KDVmBgTSK8QPgC1fme9nlAgM280tdqh9uQyqAoPV vlD2/U/wECBHBX3qih5KFv39GzrXUhCPIWyB1Vop8gAOQ5l89rimnyaMP6a7JX7SQfRQ nSeN2iRdi/0LtUXTG1I3Wz09xbxYu+n3r0TGLkgSOh/Ap0kuaBb3fB3lkJBeQFXCAapY Js9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=WQzF5MTagtjkGDrk69RrslbmWiJlU48DYJ35+pc8mww=; b=18qRa4YdKpaKZLaB2pacUJRwgngxiw3t0njR5npMalnWCS3G0/EyB4FNDWLEkX+v8q gBKwvzxNUllKYvBpcrHGyrPodtJ/3Nd/0qsY0OT7pyf7URm3mc1LWOiapiHx5WtpxCLr UE8M3ChDewchS9W8gMtvjZPav/4tQ20VZ1iOCbHhV+PKTKMQ2QCR7ACPJaYhPgvhW7w2 1XNunh26aL4IRk2MVEcVQbjJ3aE7njsmbogho+ompKGEfsx/toejbxKCP+Vm0OSdyxhK W+rVTl2/fCMuHgohrdgeLK5RKM3ZgixXrF3DloGAoDVVJmtpSlvNoMm4JISfVg518yK8 27FA== X-Gm-Message-State: AO0yUKWZANrkcaau4Ud3y+okDGkAmN2uqooXgeNMDyNGIEpxNPv3Ejt5 nkon53JYYlHVUA58AmMYaOIjPM2TFztAcevF X-Received: by 2002:a5d:5a97:0:b0:2c5:561f:fda with SMTP id bp23-20020a5d5a97000000b002c5561f0fdamr6738641wrb.5.1677506482124; Mon, 27 Feb 2023 06:01:22 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id s9-20020a5d4249000000b002c5598c14acsm7158514wrr.6.2023.02.27.06.01.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Feb 2023 06:01:21 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 12/25] tests/avocado: add machine:none tag to version.py Date: Mon, 27 Feb 2023 14:00:49 +0000 Message-Id: <20230227140102.3712344-13-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230227140102.3712344-1-peter.maydell@linaro.org> References: <20230227140102.3712344-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::436; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x436.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 From: Fabiano Rosas This test currently fails when run on a host for which the QEMU target has no default machine set: ERROR| Output: qemu-system-aarch64: No machine specified, and there is no default Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Fabiano Rosas Signed-off-by: Peter Maydell --- tests/avocado/version.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/avocado/version.py b/tests/avocado/version.py index ded7f039c1b..dd775955eb8 100644 --- a/tests/avocado/version.py +++ b/tests/avocado/version.py @@ -15,6 +15,7 @@ class Version(QemuSystemTest): """ :avocado: tags=quick + :avocado: tags=machine:none """ def test_qmp_human_info_version(self): self.vm.add_args('-nodefaults') From patchwork Mon Feb 27 14:00:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 657045 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2376088wrb; Mon, 27 Feb 2023 06:18:16 -0800 (PST) X-Google-Smtp-Source: AK7set9Mf1TlbNFbCnusOKGuHAN27LkjT8kxCIwBjLhPYJbK+B8raRR5H4ShYQ6dcc2guD3QsOsn X-Received: by 2002:a5b:60d:0:b0:a50:142e:d05e with SMTP id d13-20020a5b060d000000b00a50142ed05emr9293438ybq.35.1677507496741; Mon, 27 Feb 2023 06:18:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677507496; cv=none; d=google.com; s=arc-20160816; b=GL9xqgDVEUQG0PmEXQR2KlJWBCzYEjPtZ4S3Zim/hvMYH+NBT0aFjNDUNeG9nAFVMx ZDR1mALIJesNmEf5RAapMo2ZA3V0xzkJoESsXlqyzrH7yBOX6gXdGOZFkHoSJHmLBggq La/Zibfafw+0sbWEMW6AKKFlthUCZMntCcZp9Jhz5N60HNMJJ0mAvlqZReDjkAco3kId 4rqy9QeTPIYAlLmqNwHNxSFxITrDlf+V3L9vq862t6j+6MIUiPGMXLoUch+XrxsJjwxB 6wq6Oq335bRpZR9Xw1cZLhc4HGxfsVUd13CpdCv3bXnd64R4LzBT4SeCxVrQxuecMexM heUA== 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:to:from :dkim-signature; bh=/KzSvjX9f4BCGIMkUG2tIfmdibE7Hacb/lDW3ntcm+Y=; b=YhBCYSRzcoc3Z9ZdtHhHzzOCFvjfMQ4YjyvaSuRvzRlHovfOE74P2tJUG/YT6PP9XS 1/iRjHrAogV36SWYieT+rQl1mZkxDAHM69eIx1IbK8Qc8j1mdc3xkuTfKvAXGyic72fE nrpP3fUOyODKOnYaE3opMTiC64SGs/GS8XGE+l17deHMIcB6gtvYm9V1PCqRq5l/gNco Urjqni7PEROqacXcooXoul62QSikybhhOb18AgQZNNGznQk+qRbnLjXFh7TwQLLXNrEf tmy5Hv6lDaBD91k+jCMhmVNE1XaQHi5SH4Xt2OoitB8wvfsE6kWWKZ/qG0xcguTTuGbg Zv8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=wYdBEPwF; 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 w18-20020a05620a425200b0073bb0dc724dsi8414177qko.466.2023.02.27.06.18.16 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:18:16 -0800 (PST) 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=wYdBEPwF; 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 1pWe5A-0002Ia-7I; Mon, 27 Feb 2023 09:02:24 -0500 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 1pWe4E-0000gd-VW for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:01:33 -0500 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWe4C-0007Yy-SI for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:01:26 -0500 Received: by mail-wr1-x42d.google.com with SMTP id bw19so6296146wrb.13 for ; Mon, 27 Feb 2023 06:01:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=/KzSvjX9f4BCGIMkUG2tIfmdibE7Hacb/lDW3ntcm+Y=; b=wYdBEPwFeJ9dtloednwvpgqd2a3dmH9iCt2y2zuh/1aqxEKhEstoy318C8gaXaH6JO uQnSouejSOIllwnHROaREn1E38v61OQhqzXbgUtS+1l1r4cYxiD1wb+LlpHBdPK5X3Ck 3hB4ric1YZ0PT/PjRIk2PyjxRpUBRP+/jV1tJs+Piag/6hWMx2qjql6lCYFbF3sRgdaR XOcSeckxm4Ah6hm0QLaJC1OmZmH6qq3NkY1cEuEr0DEfMcleBCNPjcxAVt1BVtXWq+yZ C3bmm2n+2a2gOWN6yKCEmfziZfojKKkYdi5YAZdswYvF2qZGc9GsejfHXfIQGM+WNjpT sEuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/KzSvjX9f4BCGIMkUG2tIfmdibE7Hacb/lDW3ntcm+Y=; b=Q0paCAMjDxM+NtdnuvKCRsk5y42plomSeThsgw89cDSa7zKrR7+Naq9EghBPXh0aPz 8cSSTJDgORrTODJREs+3dNOgoku+zCuyuVcOVH2ccSxHE3hNb+2XX3e9jTuh2Xf+Huhi 9J+twpfIDP7NOIZ1ZCqbfDyDw4RVEXUSKpVaxMqs31vb26FesXNiz4miVjMxUnNxFQR+ 6xfuvDwEmC+a9RmiNTCwHjZxv4byuYp2qnL07vyqgNUjWJdXptID/LB4WrrlIbXjEArL upJPUOKIsUIWoa3HQ1stELRroBsLz6teDV5wUfB1IaKruSARS22DTS9DTBmnyymIAJbP FZeQ== X-Gm-Message-State: AO0yUKW3cqokAG9g6itn0QhQP4MB8WvebvFg0nV88FJI0SOBonXw2fEA JnU0qLUOYWB6oz3+chW/uyVf+C7rmI7YyAoX X-Received: by 2002:adf:f34f:0:b0:2c7:fcc:2501 with SMTP id e15-20020adff34f000000b002c70fcc2501mr12136896wrp.28.1677506483327; Mon, 27 Feb 2023 06:01:23 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id s9-20020a5d4249000000b002c5598c14acsm7158514wrr.6.2023.02.27.06.01.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Feb 2023 06:01:22 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 13/25] hw/gpio/max7310: Simplify max7310_realize() Date: Mon, 27 Feb 2023 14:00:50 +0000 Message-Id: <20230227140102.3712344-14-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230227140102.3712344-1-peter.maydell@linaro.org> References: <20230227140102.3712344-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42d; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42d.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 From: Philippe Mathieu-Daudé Since &I2C_SLAVE(dev)->qdev == dev, no need to go back and forth with QOM type casting. Directly use 'dev'. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-id: 20230220115114.25237-2-philmd@linaro.org Signed-off-by: Peter Maydell --- hw/gpio/max7310.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/hw/gpio/max7310.c b/hw/gpio/max7310.c index db6b5e3d764..031482d9398 100644 --- a/hw/gpio/max7310.c +++ b/hw/gpio/max7310.c @@ -183,11 +183,10 @@ static void max7310_gpio_set(void *opaque, int line, int level) * but also accepts sequences that are not SMBus so return an I2C device. */ static void max7310_realize(DeviceState *dev, Error **errp) { - I2CSlave *i2c = I2C_SLAVE(dev); MAX7310State *s = MAX7310(dev); - qdev_init_gpio_in(&i2c->qdev, max7310_gpio_set, 8); - qdev_init_gpio_out(&i2c->qdev, s->handler, 8); + qdev_init_gpio_in(dev, max7310_gpio_set, ARRAY_SIZE(s->handler)); + qdev_init_gpio_out(dev, s->handler, ARRAY_SIZE(s->handler)); } static void max7310_class_init(ObjectClass *klass, void *data) From patchwork Mon Feb 27 14:00:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 656984 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2367594wrb; Mon, 27 Feb 2023 06:04:17 -0800 (PST) X-Google-Smtp-Source: AK7set/LiZDrg8T1eB2/QSPAs4ao05wfmydqy212dihBLoBajsECpLU2ZM/XRg9NqWCq32qlloJt X-Received: by 2002:ad4:5c47:0:b0:56e:a2a1:a4b2 with SMTP id a7-20020ad45c47000000b0056ea2a1a4b2mr49756470qva.15.1677506656973; Mon, 27 Feb 2023 06:04:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677506656; cv=none; d=google.com; s=arc-20160816; b=fyS2KSba3MtJPdUBsXffNQSml0POyxoqFNmg18lz1LdFS3hY2OPTz8bPHEHjIKQmej NNCJ6GAI2T6f4Lhfo+Mbi9jCH2E4lQ5UPfrcPV54SARCZ8cud8M04+YEGhYAH9trOpJu DF65j6Nz19ow3lQZJ2FAEQ1IGbFem5RwZvzPLBI/MqWY3X1DsOsZ2jKiYpvGmgJ4+aiK 2506aYl8A2aPzBxyiw3wmSYjIpaDN9jnJndJfqZLCBRXHzLVoExaecOCD9/rKH6SZByk k1HhN0tSFUlBNDDDNxkqC6ZebhwWnU3uJkXtTfdQh8+DPRMgUq1+8/uSWr7qxlWAse+f Pp/w== 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:to:from :dkim-signature; bh=jYGZU16lCx9TTfWKSjti8JTz2r03DCjlL5gG1/zGeXY=; b=dsoymYJbShLeDm0OdJmSKIgDqq+4zCROkoyIxGZz2HDafmNs7DxEhGRt8Drm4QzdEO 4rCy2sw3l61lwXHODy2acv9cpfnIhxSIQJgDLlmqWnvs+D48KfXyBTLE+iC0Sd4qsmGj Iu89Cm9j91550iM9E8tWAXw9qiU2z4ygC/Y/5qEnX/llkFgZsfgp7RWD7H2zRe0HTWGC LTqH2uVIAYPCJaFeBY/ThUk+rw2FnSDf78CTsf99buG0uoUIouUIvMaWFyIFaYOXSDGC aAVKbPdDOYEmiTpT86uLPw2RFcuV2+KfzctZ5wmd/RdMBfStf4g0qdzKR92MY5EyysS8 C2DA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=R3h+lMfQ; 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 ef14-20020a05620a808e00b007423ca3ef4fsi6160322qkb.151.2023.02.27.06.04.16 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:04:16 -0800 (PST) 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=R3h+lMfQ; 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 1pWe55-00023u-Hv; Mon, 27 Feb 2023 09:02:19 -0500 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 1pWe4G-0000iC-7U for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:01:33 -0500 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWe4E-0007WR-D8 for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:01:27 -0500 Received: by mail-wr1-x42c.google.com with SMTP id r7so6330594wrz.6 for ; Mon, 27 Feb 2023 06:01:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=jYGZU16lCx9TTfWKSjti8JTz2r03DCjlL5gG1/zGeXY=; b=R3h+lMfQ++CYNsE0UU2FacFfDQFkk6Rwy2Mvjm4/MsZ1OkaezdHPQeRfE0UXeQsxDv MXb6n4TSc6HtKm21fIASYdW9kiMHzNOuvz/fYE81wraOguwmWtqE/u7cun3QFbH+2Zi1 x2b/GMMX/BwHDiamJSCZcKdJLB1sOUDKzgdl9LQCPADjST572yGkLgw+uKQwFzaN0DoN jEMhlj0r8UtlulQzLwgWBL0t09Zq6aK9TeuEoC66n2ViLvAvtOt7efW+oBPLoNcJLEi/ RmzPyvuiIrWdnGYOGdoXFRV5JVpxYR8Mr4BPLPZPWrsbzgs7IH+GCwOkxKBP0/CppXJd VDZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=jYGZU16lCx9TTfWKSjti8JTz2r03DCjlL5gG1/zGeXY=; b=u2T3FbMkPmQJtZmlvo/+sZEHWCtmflnXyklymNxcKlQ1A7RMW/+52yrvGZS+J5mg1S OjcR9UzwzbX6KFJsyrrKqp18Ksyo0rv4Ju+Veh/Pbt2bIirOzEFAjriEr18tKMXK4Ytk HA0Wxhga1sRzKVaZKjtIWqhKZWEJY+9UT7NiMBRNQ0Y/wn8I2qrN79StrIJb3Iq2z/i5 K5dcN2dd2SXHA1b5qAZObkjBytzrnsTB23S32rqfcKFNcuSnPwkd0gzuoRuBBYMncHUN s/TZYNgohBuEIX/jeyz2VfVC3ePP1mGa5w+Exr8nwbhnn8s7y+kuTP8MWOV4PjpdOYk+ bRnw== X-Gm-Message-State: AO0yUKWKLN9hZ/ewtmBIL5padcP0lRkNGoT6kKnraW7bndB3fvSFIEhb MWRvXnBfKFkyVbpXzdvA342YKLhtcLjaowBv X-Received: by 2002:adf:f5cb:0:b0:2cc:be:be0 with SMTP id k11-20020adff5cb000000b002cc00be0be0mr1846159wrp.41.1677506484575; Mon, 27 Feb 2023 06:01:24 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id s9-20020a5d4249000000b002c5598c14acsm7158514wrr.6.2023.02.27.06.01.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Feb 2023 06:01:23 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 14/25] hw/char/pl011: Un-inline pl011_create() Date: Mon, 27 Feb 2023 14:00:51 +0000 Message-Id: <20230227140102.3712344-15-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230227140102.3712344-1-peter.maydell@linaro.org> References: <20230227140102.3712344-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42c; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42c.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 From: Philippe Mathieu-Daudé pl011_create() is only used in DeviceRealize handlers, not a hot-path. Inlining is not justified. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alex Bennée Reviewed-by: Richard Henderson Message-id: 20230220115114.25237-3-philmd@linaro.org Signed-off-by: Peter Maydell --- include/hw/char/pl011.h | 19 +------------------ hw/char/pl011.c | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/include/hw/char/pl011.h b/include/hw/char/pl011.h index 926322e242d..d82870c0069 100644 --- a/include/hw/char/pl011.h +++ b/include/hw/char/pl011.h @@ -15,10 +15,8 @@ #ifndef HW_PL011_H #define HW_PL011_H -#include "hw/qdev-properties.h" #include "hw/sysbus.h" #include "chardev/char-fe.h" -#include "qapi/error.h" #include "qom/object.h" #define TYPE_PL011 "pl011" @@ -57,22 +55,7 @@ struct PL011State { const unsigned char *id; }; -static inline DeviceState *pl011_create(hwaddr addr, - qemu_irq irq, - Chardev *chr) -{ - DeviceState *dev; - SysBusDevice *s; - - dev = qdev_new("pl011"); - s = SYS_BUS_DEVICE(dev); - qdev_prop_set_chr(dev, "chardev", chr); - sysbus_realize_and_unref(s, &error_fatal); - sysbus_mmio_map(s, 0, addr); - sysbus_connect_irq(s, 0, irq); - - return dev; -} +DeviceState *pl011_create(hwaddr addr, qemu_irq irq, Chardev *chr); static inline DeviceState *pl011_luminary_create(hwaddr addr, qemu_irq irq, diff --git a/hw/char/pl011.c b/hw/char/pl011.c index c15cb7af20b..77bbc2a982b 100644 --- a/hw/char/pl011.c +++ b/hw/char/pl011.c @@ -19,10 +19,12 @@ */ #include "qemu/osdep.h" +#include "qapi/error.h" #include "hw/char/pl011.h" #include "hw/irq.h" #include "hw/sysbus.h" #include "hw/qdev-clock.h" +#include "hw/qdev-properties.h" #include "hw/qdev-properties-system.h" #include "migration/vmstate.h" #include "chardev/char-fe.h" @@ -31,6 +33,21 @@ #include "qemu/module.h" #include "trace.h" +DeviceState *pl011_create(hwaddr addr, qemu_irq irq, Chardev *chr) +{ + DeviceState *dev; + SysBusDevice *s; + + dev = qdev_new("pl011"); + s = SYS_BUS_DEVICE(dev); + qdev_prop_set_chr(dev, "chardev", chr); + sysbus_realize_and_unref(s, &error_fatal); + sysbus_mmio_map(s, 0, addr); + sysbus_connect_irq(s, 0, irq); + + return dev; +} + #define PL011_INT_TX 0x20 #define PL011_INT_RX 0x10 From patchwork Mon Feb 27 14:00:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 656974 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2365935wrb; Mon, 27 Feb 2023 06:02:07 -0800 (PST) X-Google-Smtp-Source: AK7set+6gnx5sBG0EGDEWwvgnZnBkVO6Z4cB3n+y0mGf/Qq3baFppgS5fSCiIi8XcwThRn8Isw37 X-Received: by 2002:a1f:7dcc:0:b0:401:1c83:fb9d with SMTP id y195-20020a1f7dcc000000b004011c83fb9dmr20876126vkc.6.1677506527685; Mon, 27 Feb 2023 06:02:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677506527; cv=none; d=google.com; s=arc-20160816; b=wDASAzJ2RnPQ2YRgBMKUY6u1fj6x20uaSWb2H7uPOiceXmdk0otvOdC1+mD3G1NG4e D/qDuKJxjE/O+ZF9ePfC0bmx2Q3sQVsC8KWChXq5p5LM8GMQxUhcZGhVEWjVwWgZkSfD Zj8WUPn0LyJIBYe5Z9qaUaUXUYWYP9pYbN6L8hA8tcIm9jLHkq+4B4huDq5npCKHo9/b /8CSo4h++109sQLjqiuJZerypDNiLf2A9Q8Ev/IsfX8EF18UermvnB0Khgv0iPOA1nL5 t1RL2AnJZBCFupDveE9L+qALbukwmzJ0OQje+42q5mmZ8X13FlX0LgFZ2UHtHApP3fFi qxFg== 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:to:from :dkim-signature; bh=VDLsCaYW69zOK5yA/VohVYicyAoFr83OJm2v2NkJmG4=; b=wtJMbtApDQQxAjxEKVDzhSSul6G7fwu47EUFhPCSiZjokhDRSLSrH/nusgmcFjSHrh aLDlYzn2zZYb5s3MlJr3KaCG0QlRNdj0Cckdg6LqNF31cuT0CUnwMzpi2H1Wo/dn7oB6 soSbnFCfpt7EbXr/UDUUl2/9m7cjABDMVBdzlCXhh1icBefRgtqq6GZ7+kngfvTFlDTD 8o9SvvYD119HU7tWJzU6UzxYi2EfYPb1Nw6eisCbYly1tTHAnuMbL8aoSyrttnH0+vMj SwZ6Tmzu2/ctZ1D6S4MKATbjtxO3LaWV3XJyWeiABVipW/IbTt/eLsHw7aYjKxKp9HZG FgFA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Z8RRajFT; 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 e139-20020a1f1e91000000b003d5f74e5ae5si2383880vke.82.2023.02.27.06.02.07 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:02:07 -0800 (PST) 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=Z8RRajFT; 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 1pWe4p-000141-SV; Mon, 27 Feb 2023 09:02:03 -0500 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 1pWe4G-0000iD-E6 for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:01:33 -0500 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWe4E-0007WC-Qq for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:01:28 -0500 Received: by mail-wr1-x42b.google.com with SMTP id q16so6349603wrw.2 for ; Mon, 27 Feb 2023 06:01:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=VDLsCaYW69zOK5yA/VohVYicyAoFr83OJm2v2NkJmG4=; b=Z8RRajFTajjarHPlSLuYjskv0irQqL1MoEiJs/ZhS8CCRuMQ8SJIKJXcCTDTfrmCu/ 7yVK44jYkAVA67Dyfco5afdfoCJNfePneuKcklv4hUroRyG4kCa29sXZ1g7Jcm5g+XDo 3djoRlFwW6XPf9nvfd48BLR69E73WF9+KIVzZaLB+jMsqvOIpT6opEmrzUei/rjN84za Ru+tLL9JFdTThfJqNUQBFsQW6dR8WJu/gkh4z7HXNaCCiLBhNMYlwQyYAldK++3cEgli 6J0Rl3rrR54tksVdHYsRczsYcMkxtGHZu0KtvDdC1auGEL753oGMv/CPwtKaACgzAi11 +tyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=VDLsCaYW69zOK5yA/VohVYicyAoFr83OJm2v2NkJmG4=; b=ZVYTLdh+p2cPp2Xt1mVm4Lxj+qf2hfc6H/5VIWS8/jtMoSXddH1+IIibUq6qIcI9ii t107sKgSYAdzW5MuV6kd1zD5koD6avGTZPxLD2jk8mCJ5JdQbAQa53p9TC6ZB2qmozuA MPvt+hA2RPuDqFSqUXfz9v9vw7ptXXJn3+S9mEHh+V2Z3iinCslW1tP/R70xyh0ju8Ym kaK/oWW1GQFburnzcwuyDipt922oFkWlFj5lCDPhEzbj3EJtQfBzXFjNOhY+YDp1B2sA oGdYuBdDPmRP0dt6bAxl8KdtjJFhp6l67nkT6jW8kKvE51Vc0meVAczoEu4dirB2DBly BzPg== X-Gm-Message-State: AO0yUKWY3A3SpOMWNGe/LUUA374mj2iORbFnapVfBkXQC+fBROG7uWhk G9rJ01xncEIsrR5PPoBI+HGZ9pjRSxK5V/tf X-Received: by 2002:adf:e887:0:b0:2c7:1c36:3c67 with SMTP id d7-20020adfe887000000b002c71c363c67mr9889631wrm.23.1677506486138; Mon, 27 Feb 2023 06:01:26 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id s9-20020a5d4249000000b002c5598c14acsm7158514wrr.6.2023.02.27.06.01.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Feb 2023 06:01:25 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 15/25] hw/char/pl011: Open-code pl011_luminary_create() Date: Mon, 27 Feb 2023 14:00:52 +0000 Message-Id: <20230227140102.3712344-16-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230227140102.3712344-1-peter.maydell@linaro.org> References: <20230227140102.3712344-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42b; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42b.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 From: Philippe Mathieu-Daudé pl011_luminary_create() is only used for the Stellaris board, open-code it. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alex Bennée Reviewed-by: Richard Henderson Message-id: 20230220115114.25237-4-philmd@linaro.org Signed-off-by: Peter Maydell --- include/hw/char/pl011.h | 17 ----------------- hw/arm/stellaris.c | 11 ++++++++--- 2 files changed, 8 insertions(+), 20 deletions(-) diff --git a/include/hw/char/pl011.h b/include/hw/char/pl011.h index d82870c0069..d8538021323 100644 --- a/include/hw/char/pl011.h +++ b/include/hw/char/pl011.h @@ -57,21 +57,4 @@ struct PL011State { DeviceState *pl011_create(hwaddr addr, qemu_irq irq, Chardev *chr); -static inline DeviceState *pl011_luminary_create(hwaddr addr, - qemu_irq irq, - Chardev *chr) -{ - DeviceState *dev; - SysBusDevice *s; - - dev = qdev_new("pl011_luminary"); - s = SYS_BUS_DEVICE(dev); - qdev_prop_set_chr(dev, "chardev", chr); - sysbus_realize_and_unref(s, &error_fatal); - sysbus_mmio_map(s, 0, addr); - sysbus_connect_irq(s, 0, irq); - - return dev; -} - #endif diff --git a/hw/arm/stellaris.c b/hw/arm/stellaris.c index 67a2293d35f..f7e99baf623 100644 --- a/hw/arm/stellaris.c +++ b/hw/arm/stellaris.c @@ -1146,9 +1146,14 @@ static void stellaris_init(MachineState *ms, stellaris_board_info *board) for (i = 0; i < 4; i++) { if (board->dc2 & (1 << i)) { - pl011_luminary_create(0x4000c000 + i * 0x1000, - qdev_get_gpio_in(nvic, uart_irq[i]), - serial_hd(i)); + SysBusDevice *sbd; + + dev = qdev_new("pl011_luminary"); + sbd = SYS_BUS_DEVICE(dev); + qdev_prop_set_chr(dev, "chardev", serial_hd(i)); + sysbus_realize_and_unref(sbd, &error_fatal); + sysbus_mmio_map(sbd, 0, 0x4000c000 + i * 0x1000); + sysbus_connect_irq(sbd, 0, qdev_get_gpio_in(nvic, uart_irq[i])); } } if (board->dc2 & (1 << 4)) { From patchwork Mon Feb 27 14:00:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 656977 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2366485wrb; Mon, 27 Feb 2023 06:02:51 -0800 (PST) X-Google-Smtp-Source: AK7set+DdCpGTAZNWb+YXnpzwBnSv3hJkCKwOBrW9F6HEgRQUpdRj9Cp9ezPDE6GWAhM9Ngx+zg8 X-Received: by 2002:a1f:3107:0:b0:416:c3a2:aff3 with SMTP id x7-20020a1f3107000000b00416c3a2aff3mr581607vkx.6.1677506571004; Mon, 27 Feb 2023 06:02:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677506570; cv=none; d=google.com; s=arc-20160816; b=A+YH0mvsH6Gur9fJdYNO938yji5QBVnIgvJsJl6dudEoYv+sIW4scU6zG7tAH3mlPV JWq7/LGhg8GMeHTfCaoB3MCJMGNxMiubTy9tZ6rub4xNCqZZtGREdqe0kWnCeSr6qZQ1 6WpJNIdM/mpM+nxMt/onfvdecGxYYHNSWFTGnVmbhKtzUeVpP+ZeK20nBYaONr3XQpxS wDrf1GfBJxp87w7swmdAIhvQEMk181KUwCqsOn7n631yUbYg7gUCBRxpWsUucoP1ZDtX vm/NRyvdxlLxkNDpCQ80dtcxM9ngQ4/jvFh6mjVo8mZHYwNWX8bZuSVHOvIegqSkeHIt rhpA== 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:to:from :dkim-signature; bh=KlVlw+pS2hFrB7UptmYDw7cy3LLQizZlFOoz6eLzmsM=; b=ApC2Wp7gIsLg4hvH3ibYqqTb31DBtk87H3FyAkH5Xk6+L+enXTpw4HaUQ/JPHSMQXp yYppcmYB42ETWBSfVjw5LHRtQp5vedrm1esTDp37FjmT/cZ+vr38U/tLyQWhjHTdWtR0 h+GM2LwJ1MWywvz15AU5jA8ezsm+Zg2eCyGWGzNtv9tbjmMYgDjq3uv/lreMmXr5kPgJ PpTS/hJ8qdjFJG9KtTxivMmWPS0/mmVchL+aUjoI2Z2LQiOGXdt8CXZh9A+9FUsJWGEx ndIqlTGzm9ogl9dK9Ix71cTarELZ73D3cyzR1dKSFjG2o5boXegTdi1/DNPEv21vbs/B Qf6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=cxXGaEnd; 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 n83-20020a1fa456000000b004137d419b4dsi2413558vke.27.2023.02.27.06.02.50 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:02:50 -0800 (PST) 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=cxXGaEnd; 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 1pWe4t-0001Go-Qx; Mon, 27 Feb 2023 09:02:07 -0500 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 1pWe4K-0000lS-C6 for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:01:34 -0500 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWe4H-0007a0-9R for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:01:30 -0500 Received: by mail-wr1-x42e.google.com with SMTP id bv17so6337274wrb.5 for ; Mon, 27 Feb 2023 06:01:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=KlVlw+pS2hFrB7UptmYDw7cy3LLQizZlFOoz6eLzmsM=; b=cxXGaEndh7+OuX+TZ2yTc+x+y7rL/E4bsZJDXjEvRXtTTLJpdBK7JDx8EkeLx9qGwo nW22qX0VAK18PSNR4hHGKLFe0UaRaM3FQR5lAebRS60jIVwi7vrif47uurlErnwlwtSM aBkVaJrBiNSJWFFJ7fS1AuzJ39NqMID8OWc+levdCR0jbFth3fyuTEfm2zvBfZmagGVl U8WltLxFLSZQPw+4vHHEhkxMXbEPvCINVxUtNG+mBJgnHHJiC7k2eAvXQT1Aj6uqBIRs DUEtbcXTKVQ7GVo/018Pvh4G2u2A+4mjC7IJIBZZQAgoMX+i3lvPyUWgFjqXJ2b6WKhZ 93yg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=KlVlw+pS2hFrB7UptmYDw7cy3LLQizZlFOoz6eLzmsM=; b=b1gO9lFfgK2iPs2+HA5ZijCEz8P9AjAiBtlVYV+acu9L11ibB/30/A6f7ahVVQWdcg 5lBN9uqx/gJszBQwGKl/+OF5v/+qqDmpIJtgj5bo9GFP6CCZVO42tKDf/SW6UBN/vJ1C Lq26r8BeoPhG0Wlrag0pY1RnBlNd21O+c9mW92HmceU1Rlh94Uvw4qD/9eKhrcityX2g s18C9mCc7azSsBdAZcjHc9EdogK4cO2qeTdrTTY5oosSuRRbxQ8UqgxEaEN/BlyPa3i5 tsg4XTr8i5Mb57ilyV96rSGnr5U5COSNYluGZjqRc8R9n5B5kvpVAYFlVDBxLMiqLFuz xsmg== X-Gm-Message-State: AO0yUKUSASedaJjlkdbfJOZ2wOsRhLs0W68HQdBjyPAFESMsG9XxkJSN vvBSn0I7tvjWITcCYOVefD2lmUS/yEcJIveC X-Received: by 2002:a5d:4bc6:0:b0:2ca:7dcd:530 with SMTP id l6-20020a5d4bc6000000b002ca7dcd0530mr3957768wrt.37.1677506487343; Mon, 27 Feb 2023 06:01:27 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id s9-20020a5d4249000000b002c5598c14acsm7158514wrr.6.2023.02.27.06.01.26 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Feb 2023 06:01:26 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 16/25] hw/char/xilinx_uartlite: Expose XILINX_UARTLITE QOM type Date: Mon, 27 Feb 2023 14:00:53 +0000 Message-Id: <20230227140102.3712344-17-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230227140102.3712344-1-peter.maydell@linaro.org> References: <20230227140102.3712344-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42e; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42e.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 From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alex Bennée Reviewed-by: Richard Henderson Message-id: 20230220115114.25237-5-philmd@linaro.org Signed-off-by: Peter Maydell --- include/hw/char/xilinx_uartlite.h | 6 +++++- hw/char/xilinx_uartlite.c | 4 +--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/include/hw/char/xilinx_uartlite.h b/include/hw/char/xilinx_uartlite.h index dd09c068019..753d3a453ec 100644 --- a/include/hw/char/xilinx_uartlite.h +++ b/include/hw/char/xilinx_uartlite.h @@ -18,6 +18,10 @@ #include "hw/qdev-properties.h" #include "hw/sysbus.h" #include "qapi/error.h" +#include "qom/object.h" + +#define TYPE_XILINX_UARTLITE "xlnx.xps-uartlite" +OBJECT_DECLARE_SIMPLE_TYPE(XilinxUARTLite, XILINX_UARTLITE) static inline DeviceState *xilinx_uartlite_create(hwaddr addr, qemu_irq irq, @@ -26,7 +30,7 @@ static inline DeviceState *xilinx_uartlite_create(hwaddr addr, DeviceState *dev; SysBusDevice *s; - dev = qdev_new("xlnx.xps-uartlite"); + dev = qdev_new(TYPE_XILINX_UARTLITE); s = SYS_BUS_DEVICE(dev); qdev_prop_set_chr(dev, "chardev", chr); sysbus_realize_and_unref(s, &error_fatal); diff --git a/hw/char/xilinx_uartlite.c b/hw/char/xilinx_uartlite.c index 99b9a6f851e..180bb97202c 100644 --- a/hw/char/xilinx_uartlite.c +++ b/hw/char/xilinx_uartlite.c @@ -24,6 +24,7 @@ #include "qemu/osdep.h" #include "qemu/log.h" +#include "hw/char/xilinx_uartlite.h" #include "hw/irq.h" #include "hw/qdev-properties.h" #include "hw/qdev-properties-system.h" @@ -53,9 +54,6 @@ #define CONTROL_RST_RX 0x02 #define CONTROL_IE 0x10 -#define TYPE_XILINX_UARTLITE "xlnx.xps-uartlite" -OBJECT_DECLARE_SIMPLE_TYPE(XilinxUARTLite, XILINX_UARTLITE) - struct XilinxUARTLite { SysBusDevice parent_obj; From patchwork Mon Feb 27 14:00:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 656979 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2366963wrb; Mon, 27 Feb 2023 06:03:27 -0800 (PST) X-Google-Smtp-Source: AK7set8GaJE7YD24ggFwPc6KHLPgReu1gQN45rJw5AfM/YgtKzCVTTWFqT3+Q8WPAaRR/mxNdgCJ X-Received: by 2002:a05:6358:3e49:b0:104:892:49b0 with SMTP id k9-20020a0563583e4900b00104089249b0mr53765rwd.25.1677506607269; Mon, 27 Feb 2023 06:03:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677506607; cv=none; d=google.com; s=arc-20160816; b=NamntdEKDudonlblOhaCfAwkp+bl1UA/0rUZdoGXFOC9WBKo1rPfbz+bzNp/cj/MpQ HBt8wtRCy9dMRvLpx8Lc6zbZvn0bDeSzy5yBU1RVbDI5VB2KWVCs1sLZQqHNrkBzAQng kEiwrkdAiT10K9ftYStb+1UYwkdO4wE2P+whMcN693N09do66U85qxlMTLUzctRrm574 Zu9AebTx+JSvQADfUawB+XoUW8Vc/95lAv5K/JiHC/ZMlNMNasf0Zcox7JzQapQyF/YA a22Wuzf543Kj9g8MDdYL/45F5yldqyugoL04AuPoCVitCnTJEz8ruYCP8ZBTx0g9tFy5 L7mQ== 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:to:from :dkim-signature; bh=vzsUur0Aw/LlsgsbO3t88OL+32rrRcXjZlMZhRcStSQ=; b=vQ3YqGsrjIhD88wK+OpVABMUXG1SvPgriRX/qLrIgSbe6rkLqCT/TYkbHInEAlVU9H QvSuYOr5E/nBtHcV+ysOTFMKtFxOMupzv1usTwQYGEc7Oand4vndodw+LeW9czYgd8DO OrgpQBGvSlw4oCHYcyz0FwxQQAVBNPjH/PTKpww+vGprRXcFggPTtObKKCXSQDZs/Kyl Is1MZJ6ValtLZ/XWuHpbsH2KklAEBh53vlxnioqShRzjyHbvq+KmCDEza83gOMDooJz5 tlp/vBtsJ6v1SkKo67kYiae4beJ8VrlF98ofJzNBG10CN2nrfhkb4cWWVrueVW9RbTqT Ynow== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bCdhMYzm; 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 k9-20020a05620a414900b00708084c79f3si6767209qko.610.2023.02.27.06.03.27 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:03:27 -0800 (PST) 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=bCdhMYzm; 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 1pWe59-0002H6-NC; Mon, 27 Feb 2023 09:02:23 -0500 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 1pWe4L-0000lW-Or for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:01:36 -0500 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWe4I-0007at-Vy for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:01:33 -0500 Received: by mail-wm1-x32a.google.com with SMTP id j19-20020a05600c1c1300b003e9b564fae9so7244343wms.2 for ; Mon, 27 Feb 2023 06:01:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=vzsUur0Aw/LlsgsbO3t88OL+32rrRcXjZlMZhRcStSQ=; b=bCdhMYzmUz1147AEbgy2qrIzzG28Smey6nbuTnIM30alPqs1VHkp0TrrP43F4Kw45+ aEEfOeuez71v7ZsOMzpR/5z+m/BpfsJewWLKTyFEvisIjJu+uaNuFs3OsisYqz/IQMyU Im9gkw7XgB3o7zWvcgBXGaTb75au6cY9O6K9w1bpmZaQand5T27C51TfmYJlv2k90EPi s6rK0Gv6Lo2hkQe8+G98yhblmHtZixFO6BAgUfSRLFLb8rvRqrjIDjGs+AaWyE5wQWt9 ij0yY/LEua5TfTkvpyxRi7QJp0MkB/KmUcdbgmebPKsZx+wF48H1No3Qdh1DuaN4w9+p K1XQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=vzsUur0Aw/LlsgsbO3t88OL+32rrRcXjZlMZhRcStSQ=; b=mRYaXa67JFO0s9BEPsV1n7vhH4LQimATD9i2nikb2qRrQPBv2nm4zs8XRHhGfuZniH 8Q1JHiclDMoO4hz4BqtG2ofGVDnQkhLgKUe6TazKGSkawMWsMVeedLRpSlQsXXm3mB+t 8Yp22jK2i+XocExDSo7F+8VZD+wTWDzGsAgC0Ly9+TGXsc8Cca1nO0d7ed6gnubW1tXd k/qR5IvNWJ+qZtrnLOhITKUV8D0H+n8y6UbFS/1RQrIf+qnr2fa4/3mPFv79IwPSUvhi 2Iq7F5R2jateeTeYUyVM6t5ZqcDHFiRevHQ6onAfIm70EGxs7xfcEZmjwACpCnX3uxjZ xT4A== X-Gm-Message-State: AO0yUKU9LjbfbfhiUQvW0LlkvrKdO6RLTau3rolqmZbHNv9ECxZ+F6r3 MnG1EFDV1UdDZXDT8iiQpkWzzecocUGM3UL4 X-Received: by 2002:a05:600c:44d4:b0:3eb:2de9:8aed with SMTP id f20-20020a05600c44d400b003eb2de98aedmr7407506wmo.41.1677506488560; Mon, 27 Feb 2023 06:01:28 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id s9-20020a5d4249000000b002c5598c14acsm7158514wrr.6.2023.02.27.06.01.27 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Feb 2023 06:01:27 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 17/25] hw/char/xilinx_uartlite: Open-code xilinx_uartlite_create() Date: Mon, 27 Feb 2023 14:00:54 +0000 Message-Id: <20230227140102.3712344-18-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230227140102.3712344-1-peter.maydell@linaro.org> References: <20230227140102.3712344-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32a; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x32a.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 From: Philippe Mathieu-Daudé Open-code the single use of xilinx_uartlite_create(). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alex Bennée Reviewed-by: Richard Henderson Message-id: 20230220115114.25237-6-philmd@linaro.org Signed-off-by: Peter Maydell --- include/hw/char/xilinx_uartlite.h | 20 -------------------- hw/microblaze/petalogix_s3adsp1800_mmu.c | 7 +++++-- 2 files changed, 5 insertions(+), 22 deletions(-) diff --git a/include/hw/char/xilinx_uartlite.h b/include/hw/char/xilinx_uartlite.h index 753d3a453ec..36d4e8444da 100644 --- a/include/hw/char/xilinx_uartlite.h +++ b/include/hw/char/xilinx_uartlite.h @@ -15,29 +15,9 @@ #ifndef XILINX_UARTLITE_H #define XILINX_UARTLITE_H -#include "hw/qdev-properties.h" -#include "hw/sysbus.h" -#include "qapi/error.h" #include "qom/object.h" #define TYPE_XILINX_UARTLITE "xlnx.xps-uartlite" OBJECT_DECLARE_SIMPLE_TYPE(XilinxUARTLite, XILINX_UARTLITE) -static inline DeviceState *xilinx_uartlite_create(hwaddr addr, - qemu_irq irq, - Chardev *chr) -{ - DeviceState *dev; - SysBusDevice *s; - - dev = qdev_new(TYPE_XILINX_UARTLITE); - s = SYS_BUS_DEVICE(dev); - qdev_prop_set_chr(dev, "chardev", chr); - sysbus_realize_and_unref(s, &error_fatal); - sysbus_mmio_map(s, 0, addr); - sysbus_connect_irq(s, 0, irq); - - return dev; -} - #endif diff --git a/hw/microblaze/petalogix_s3adsp1800_mmu.c b/hw/microblaze/petalogix_s3adsp1800_mmu.c index 9d959d1ad80..505639c2980 100644 --- a/hw/microblaze/petalogix_s3adsp1800_mmu.c +++ b/hw/microblaze/petalogix_s3adsp1800_mmu.c @@ -100,8 +100,11 @@ petalogix_s3adsp1800_init(MachineState *machine) irq[i] = qdev_get_gpio_in(dev, i); } - xilinx_uartlite_create(UARTLITE_BASEADDR, irq[UARTLITE_IRQ], - serial_hd(0)); + dev = qdev_new(TYPE_XILINX_UARTLITE); + qdev_prop_set_chr(dev, "chardev", serial_hd(0)); + sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal); + sysbus_mmio_map(SYS_BUS_DEVICE(dev), 0, UARTLITE_BASEADDR); + sysbus_connect_irq(SYS_BUS_DEVICE(dev), 0, irq[UARTLITE_IRQ]); /* 2 timers at irq 2 @ 62 Mhz. */ dev = qdev_new("xlnx.xps-timer"); From patchwork Mon Feb 27 14:00:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 656986 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2367793wrb; Mon, 27 Feb 2023 06:04:33 -0800 (PST) X-Google-Smtp-Source: AK7set9RJQOtQxX+AYvzy2u6k1UBCwz0UAmDtBDxRbqC61H05Quk+PoNsesfd93+6Lla2xfyySHZ X-Received: by 2002:a2e:b892:0:b0:295:b96e:ca99 with SMTP id r18-20020a2eb892000000b00295b96eca99mr1837694ljp.50.1677506673170; Mon, 27 Feb 2023 06:04:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677506673; cv=none; d=google.com; s=arc-20160816; b=sscWHA6ZwpnaPp3qvy7aIusYf5KUWkzE1EcWL/hFFmkdPOB6Q02fDhMX8a16rHHb0u XOxQNoHoaO8AQ957IpnXEUgCaWBwLsWV/gJsDWJ0CZQNM+Q+A8jn14oXsz4r4yW/sj6T EYEpRrgf5ZDm4IE4Y+Nc6/TjoGctG/mds9cqMzLfcg1zyNqjwGdd04fEkA1wn9DKELrX t3tt/IZN8KiXJORyRIfpcx0BQ62V8bEyamVE0Ohi1T+XgUJFfxFFQ7pgXLIMpnpA5bdd xQxEDjmcAt9iA0nC1jjLpK2GTr4osPRF7RwnHmaZAr8A23RZXwPQGG07TUyovatL9dud C6+Q== 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:to:from :dkim-signature; bh=qm89jNZzQrE8sBPqBWdhslClrvicJCmDVh4kNrz6Gcg=; b=UpbTrSQeFWsu7R9dZNff0JgBSeRzgE1e/SxN6S2OawmP6z/VSzC0WTT+Ohn8to0CCf eCJtJwOeuTddQbqXRKsZK4ULiqsd1JfHXL1xMx29+LLaVVKhLpn6jFVxHpop/nnoIvyi zh+URhthq9fAf1vfxwUZpxb6Fn9BUrUjQj1LlyWtdL6ScA5n0jl1K0ACV3uQshfkzGqw VrHr+hdA+CIliFnDiFe4+u4mpGAxzs2Hi6bniECyBhZx594BO2Xp6GKNL2L9H7UqIZXO fVAfFPDZ64Ta0c3IM3z8vByAHMUwZraO22N5bkcJfjte9bp3neeZz139ZtZieUW00YGd pBFg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=D7CntBw7; 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 e2-20020a2e9e02000000b002958937f83dsi4195544ljk.3.2023.02.27.06.04.32 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:04:33 -0800 (PST) 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=D7CntBw7; 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 1pWe5H-0003Uv-A7; Mon, 27 Feb 2023 09:02:31 -0500 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 1pWe4N-0000lm-7w for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:01:36 -0500 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWe4K-0007c6-5I for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:01:34 -0500 Received: by mail-wr1-x42d.google.com with SMTP id bt28so6326858wrb.8 for ; Mon, 27 Feb 2023 06:01:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=qm89jNZzQrE8sBPqBWdhslClrvicJCmDVh4kNrz6Gcg=; b=D7CntBw7raCyyiA7qN+bhq/iWLoOdtJHd5z1WsXKP/AWlUWHlj85IvtYz53rrV2tJ2 ZsQRXZBsnWBZ0EtCBIokjtAo+Cul0iJYKa2pCgzeziFv8epzD5UsQT4Qrb7MAUHBjM9k M7xP1lV0cQLgx2qgttmncy/DdtTGAI1XJDGcPF0VC24E618BiBYhrCvwItGmmxqr1Of6 I04fAA7wWeQo0+F49LUIw0fJ5epJKQwP6TVChoY8tD0o8zCFROHKwVYZGP3KXsvoHZp8 4PPJfEbVi3mSJMWxqB3e836LEX5PrSSf5Xvb6POuQw2jcVuYICcxWwhv0Fhr01R/TClE 2wFw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=qm89jNZzQrE8sBPqBWdhslClrvicJCmDVh4kNrz6Gcg=; b=rstdMuRySFaBWq56cLEee0EM/4DwIrooKXzSPtFaW56on49LXohV+kLgcCWFRib1+B KP1wCIO+EJ51lvMGuIWd1mXvX5+zFZQ31gNHiMVCeQcKNPnSECKySdxc+l1llcwW4s36 6ykJ0f3gVn4JAUYD46DeS4cjkgpgIDy3C87QCb//WkxOBv7ueHTFqTMp3CFDqwNAfk2q RROwIqYX9kREKZ/uApUWJXGSTAT1MQ40PT+CIipTPyj6LwGY30Y42YjCezYmeQlEVFqr JHUMaXOkXVv6KuydSDPXC5qIjPTNhZMSl5r0iqPjmLbn4h+Gi7cq5EWmHZvLIq+YQALq DcYA== X-Gm-Message-State: AO0yUKXMl5Yplq62X0HghOfIPRPH6s72ejREjpMqmx1phRU60gB9cxdy IeAoKI7y5WO5w0T7YiOB2ip0yIZZtNC6tA/4 X-Received: by 2002:a5d:60ca:0:b0:2c7:e909:5fcf with SMTP id x10-20020a5d60ca000000b002c7e9095fcfmr8141292wrt.3.1677506489697; Mon, 27 Feb 2023 06:01:29 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id s9-20020a5d4249000000b002c5598c14acsm7158514wrr.6.2023.02.27.06.01.28 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Feb 2023 06:01:28 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 18/25] hw/char/cmsdk-apb-uart: Open-code cmsdk_apb_uart_create() Date: Mon, 27 Feb 2023 14:00:55 +0000 Message-Id: <20230227140102.3712344-19-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230227140102.3712344-1-peter.maydell@linaro.org> References: <20230227140102.3712344-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42d; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42d.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 From: Philippe Mathieu-Daudé cmsdk_apb_uart_create() is only used twice in the same file. Open-code it. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Peter Maydell Message-id: 20230220115114.25237-7-philmd@linaro.org Signed-off-by: Peter Maydell --- include/hw/char/cmsdk-apb-uart.h | 34 -------------------------- hw/arm/mps2.c | 41 +++++++++++++++++++++----------- 2 files changed, 27 insertions(+), 48 deletions(-) diff --git a/include/hw/char/cmsdk-apb-uart.h b/include/hw/char/cmsdk-apb-uart.h index 64b0a3d5345..7de8f8d1b94 100644 --- a/include/hw/char/cmsdk-apb-uart.h +++ b/include/hw/char/cmsdk-apb-uart.h @@ -12,10 +12,8 @@ #ifndef CMSDK_APB_UART_H #define CMSDK_APB_UART_H -#include "hw/qdev-properties.h" #include "hw/sysbus.h" #include "chardev/char-fe.h" -#include "qapi/error.h" #include "qom/object.h" #define TYPE_CMSDK_APB_UART "cmsdk-apb-uart" @@ -45,36 +43,4 @@ struct CMSDKAPBUART { uint8_t rxbuf; }; -/** - * cmsdk_apb_uart_create - convenience function to create TYPE_CMSDK_APB_UART - * @addr: location in system memory to map registers - * @chr: Chardev backend to connect UART to, or NULL if no backend - * @pclk_frq: frequency in Hz of the PCLK clock (used for calculating baud rate) - */ -static inline DeviceState *cmsdk_apb_uart_create(hwaddr addr, - qemu_irq txint, - qemu_irq rxint, - qemu_irq txovrint, - qemu_irq rxovrint, - qemu_irq uartint, - Chardev *chr, - uint32_t pclk_frq) -{ - DeviceState *dev; - SysBusDevice *s; - - dev = qdev_new(TYPE_CMSDK_APB_UART); - s = SYS_BUS_DEVICE(dev); - qdev_prop_set_chr(dev, "chardev", chr); - qdev_prop_set_uint32(dev, "pclk-frq", pclk_frq); - sysbus_realize_and_unref(s, &error_fatal); - sysbus_mmio_map(s, 0, addr); - sysbus_connect_irq(s, 0, txint); - sysbus_connect_irq(s, 1, rxint); - sysbus_connect_irq(s, 2, txovrint); - sysbus_connect_irq(s, 3, rxovrint); - sysbus_connect_irq(s, 4, uartint); - return dev; -} - #endif diff --git a/hw/arm/mps2.c b/hw/arm/mps2.c index a86a994dbac..d92fd60684c 100644 --- a/hw/arm/mps2.c +++ b/hw/arm/mps2.c @@ -35,6 +35,7 @@ #include "hw/boards.h" #include "exec/address-spaces.h" #include "sysemu/sysemu.h" +#include "hw/qdev-properties.h" #include "hw/misc/unimp.h" #include "hw/char/cmsdk-apb-uart.h" #include "hw/timer/cmsdk-apb-timer.h" @@ -282,6 +283,9 @@ static void mps2_common_init(MachineState *machine) qdev_connect_gpio_out(orgate_dev, 0, qdev_get_gpio_in(armv7m, 12)); for (i = 0; i < 5; i++) { + DeviceState *dev; + SysBusDevice *s; + static const hwaddr uartbase[] = {0x40004000, 0x40005000, 0x40006000, 0x40007000, 0x40009000}; @@ -294,12 +298,16 @@ static void mps2_common_init(MachineState *machine) rxovrint = qdev_get_gpio_in(orgate_dev, i * 2 + 1); } - cmsdk_apb_uart_create(uartbase[i], - qdev_get_gpio_in(armv7m, uartirq[i] + 1), - qdev_get_gpio_in(armv7m, uartirq[i]), - txovrint, rxovrint, - NULL, - serial_hd(i), SYSCLK_FRQ); + dev = qdev_new(TYPE_CMSDK_APB_UART); + s = SYS_BUS_DEVICE(dev); + qdev_prop_set_chr(dev, "chardev", serial_hd(i)); + qdev_prop_set_uint32(dev, "pclk-frq", SYSCLK_FRQ); + sysbus_realize_and_unref(s, &error_fatal); + sysbus_mmio_map(s, 0, uartbase[i]); + sysbus_connect_irq(s, 0, qdev_get_gpio_in(armv7m, uartirq[i] + 1)); + sysbus_connect_irq(s, 1, qdev_get_gpio_in(armv7m, uartirq[i])); + sysbus_connect_irq(s, 2, txovrint); + sysbus_connect_irq(s, 3, rxovrint); } break; } @@ -324,7 +332,8 @@ static void mps2_common_init(MachineState *machine) 0x4002c000, 0x4002d000, 0x4002e000}; Object *txrx_orgate; - DeviceState *txrx_orgate_dev; + DeviceState *txrx_orgate_dev, *dev; + SysBusDevice *s; txrx_orgate = object_new(TYPE_OR_IRQ); object_property_set_int(txrx_orgate, "num-lines", 2, &error_fatal); @@ -332,13 +341,17 @@ static void mps2_common_init(MachineState *machine) txrx_orgate_dev = DEVICE(txrx_orgate); qdev_connect_gpio_out(txrx_orgate_dev, 0, qdev_get_gpio_in(armv7m, uart_txrx_irqno[i])); - cmsdk_apb_uart_create(uartbase[i], - qdev_get_gpio_in(txrx_orgate_dev, 0), - qdev_get_gpio_in(txrx_orgate_dev, 1), - qdev_get_gpio_in(orgate_dev, i * 2), - qdev_get_gpio_in(orgate_dev, i * 2 + 1), - NULL, - serial_hd(i), SYSCLK_FRQ); + + dev = qdev_new(TYPE_CMSDK_APB_UART); + s = SYS_BUS_DEVICE(dev); + qdev_prop_set_chr(dev, "chardev", serial_hd(i)); + qdev_prop_set_uint32(dev, "pclk-frq", SYSCLK_FRQ); + sysbus_realize_and_unref(s, &error_fatal); + sysbus_mmio_map(s, 0, uartbase[i]); + sysbus_connect_irq(s, 0, qdev_get_gpio_in(txrx_orgate_dev, 0)); + sysbus_connect_irq(s, 1, qdev_get_gpio_in(txrx_orgate_dev, 1)); + sysbus_connect_irq(s, 2, qdev_get_gpio_in(orgate_dev, i * 2)); + sysbus_connect_irq(s, 3, qdev_get_gpio_in(orgate_dev, i * 2 + 1)); } break; } From patchwork Mon Feb 27 14:00:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 656995 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2370212wrb; Mon, 27 Feb 2023 06:08:03 -0800 (PST) X-Google-Smtp-Source: AK7set8LSapECr20HDAmQT1FUtNW/2Ksf41r1nR5n5Ua2yRB1i9M2eq+rDkitZOuXfpK5DqYUMRa X-Received: by 2002:a05:622a:355:b0:3bc:ff12:e5e5 with SMTP id r21-20020a05622a035500b003bcff12e5e5mr30122195qtw.17.1677506882571; Mon, 27 Feb 2023 06:08:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677506882; cv=none; d=google.com; s=arc-20160816; b=1DAooRS2ch+kt2jMaPa6IL81J6K65kDTurWuqXWaood5CPFMVrNvAZmV17ZuU5vW4V UxE7980IF8c7h/Iy7vlbE7ZTNLZqrX2R8LPWgq7BnJBDAJH08ZCHkhHUml/uPK9/0P+k CaR5gVLjx3hgfN1E01zeExihANO8y05wmWkGiboOKA+8FWXljbxGQUdZPNIumY/xVlIn ZjneCdaspv6Y9Fbk6tFyvrLRe8EfnGDD/E8VSI/FxTqSeYfJcImVQsdPZowCzglQhXjs GrueewkVmipkbisDEFSxgnxAHNBHxfEgliYpDDRDYOXgkXzXGV9e1oCfmsv4P+UixC3y ZR2A== 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:to:from :dkim-signature; bh=z84JjE7d4GepJQVg5IhunfehKuie9dRvNDWsB4oPk4A=; b=C3yQmnTADjW60HihoBHtHR4j38yC0NfQCoT8pBVH4QmiL+ZOLPbhATTN2UfZxYkv9J 1+2Xh302ZDBjzLwWa5xu/IyEhLyXAerXp/eX4nXqvQBRo2gOhv1Gv5esEQ+OAtFJisrh PS7kYtatVNBr59FFKKDkYNFp0RvwG8gb7NZhC6lFv+5YQagcdu15YrtmTSUByKTxK536 5rt5Zk4HeI56mhI/7ONWCfxKdZyfEjxJxZvfwMHEYEhZaQMyuH/VhxSkZk9/Lg0eeUNz pyZdVWPMrrhdEJ32Pf71nBYhbYgIc3WMJjKRSr3gHhSpr9KPXJVo6cKhF0qyIugeArhp WUPQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=mDSOKS6g; 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 k9-20020a05620a414900b007242a1945a8si6932275qko.693.2023.02.27.06.08.02 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:08:02 -0800 (PST) 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=mDSOKS6g; 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 1pWe5F-0003Dn-FG; Mon, 27 Feb 2023 09:02:29 -0500 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 1pWe4L-0000lV-O7 for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:01:34 -0500 Received: from mail-wr1-x431.google.com ([2a00:1450:4864:20::431]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWe4K-0007Wi-5O for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:01:33 -0500 Received: by mail-wr1-x431.google.com with SMTP id v16so3529422wrn.0 for ; Mon, 27 Feb 2023 06:01:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=z84JjE7d4GepJQVg5IhunfehKuie9dRvNDWsB4oPk4A=; b=mDSOKS6gDhesGLyZ8MVmdMLDmIamMbZWl4NAmBXaAMckuZgKFF4nVfudbffA3dem9V Gbh3jXB0z9yQAch5rAoImWI7AuynCFW6Wma1yYyYKSuh567iCIJNGzNvD9k0zTs7b9s/ Jc0mbVxh2PK+yFfSM7kI7K30G7rglxV7Dvux4oYXjyCWTsWZ/HZQcspZuV1dKexH82Uq eYZGVXftdKW0howb66ypPRI9X2J08OhmHw6MBgGxiAFNtFLLX3WfmAl0HtrZGtO5aLJs 5lnJBGDjsyXISIt9yyNO2qDcVUwzIl8QVLFfhnJdkgItM2nrAp71rkLLuXeIDS3HBC3e TjQg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=z84JjE7d4GepJQVg5IhunfehKuie9dRvNDWsB4oPk4A=; b=xyaQHoAxAZK8i7enoaDUPeW8xj5ibw28kIRKzsVOZpos0dfaRwTMjjHi3jSeXxloR0 40Dl/ff4e8RuMFf2fw8mu0vh8I3LfTXmC8ttJQOHNTvDbsYsqmBFSFIGR9MqUsoJ4LYz mxe8ZkI7CkqMmNZep5K/daxmspHknRctHGgbSfoxryssy22MPyBLVdGcVTkmeWbAkjUR 7ZbABRHB80ADRKHacmZVFFlnOvh+FSksqXnyMcSKQVOG48+xD/2EkHKyQ9ovtnfwMG37 cGXPhAhJSNXIVz/efSYDizlz9lkuC5gILjWGjsWh6X2hEzMpYQHKLivFw5DPnM/PaMR1 0gAw== X-Gm-Message-State: AO0yUKVrG97Hw7s/Ki7gubsr+2X0ClspjjpABrljGzfAI0kLZFzrpd40 yngcR5ma8oQl2FIwrNVQ2W1/8rGxEnHIlO9C X-Received: by 2002:a5d:6406:0:b0:2c7:ae2:56df with SMTP id z6-20020a5d6406000000b002c70ae256dfmr15748272wru.70.1677506490876; Mon, 27 Feb 2023 06:01:30 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id s9-20020a5d4249000000b002c5598c14acsm7158514wrr.6.2023.02.27.06.01.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Feb 2023 06:01:29 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 19/25] hw/timer/cmsdk-apb-timer: Remove unused 'qdev-properties.h' header Date: Mon, 27 Feb 2023 14:00:56 +0000 Message-Id: <20230227140102.3712344-20-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230227140102.3712344-1-peter.maydell@linaro.org> References: <20230227140102.3712344-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::431; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x431.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, TVD_SPACE_RATIO=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 From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alex Bennée Message-id: 20230220115114.25237-8-philmd@linaro.org Signed-off-by: Peter Maydell --- include/hw/timer/cmsdk-apb-timer.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/hw/timer/cmsdk-apb-timer.h b/include/hw/timer/cmsdk-apb-timer.h index c4c7eae8499..2dd615d1be9 100644 --- a/include/hw/timer/cmsdk-apb-timer.h +++ b/include/hw/timer/cmsdk-apb-timer.h @@ -12,7 +12,6 @@ #ifndef CMSDK_APB_TIMER_H #define CMSDK_APB_TIMER_H -#include "hw/qdev-properties.h" #include "hw/sysbus.h" #include "hw/ptimer.h" #include "hw/clock.h" From patchwork Mon Feb 27 14:00:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 657036 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2374762wrb; Mon, 27 Feb 2023 06:15:56 -0800 (PST) X-Google-Smtp-Source: AK7set9B2YEt3bGeR69+hQlMuwUzWUkCMuuwvT8pygqD+bsD9LQnvxOTiOhuT/urip0NPtcbL2uv X-Received: by 2002:ad4:5946:0:b0:56e:a05a:2a3a with SMTP id eo6-20020ad45946000000b0056ea05a2a3amr38422246qvb.17.1677507356312; Mon, 27 Feb 2023 06:15:56 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677507356; cv=none; d=google.com; s=arc-20160816; b=Wel1zka9KspRM0uQ3Us5JHJBjbqZ8KR52VkRKMb6DW2CnpUaF8KJcizv95rJOLqzvD lKzBa71m9Yas29reKA3O4tehizOoK220NnG2Mc6GbGd+J6SyckG94oRItquA3cEM7YoK E5gj3BlDN+7Ge41I7BdoMIaeHvjUhROnB8NNtmNXH87lYT9Et2r/aqTTiU5G3OH9AZwh sd/06gF5XR0XnFmyiUni+IqhWfW5xju2V+KVgYVCjnc7QLDHQ5nJE8Y23Jk1xAnfhCQn 5YWSc1oyRgUu7oHhbbmQbeu/gtWQuDSctAu13zfXXGn7nUCqHsvQa6oTHt+CX/Pgq9fh o/tQ== 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:to:from :dkim-signature; bh=a/LUrffyQW57nzfvUKYl3CFpJsURKsL4yXJqSOTnUyw=; b=a8DnkKNZIVB9GSWa23qgq6sIc5EnrZaWeQrPwVjvDrOasYUOqWwDe2x8otwT64A/JJ UPoN90wx1ByzmNa3F50CLwj6jByGhAB9LK82Fztx2EJUD+TObfdsY2fXB8IUBnP4ML5s 4NLKiETNAH+tbN6ubyWXqSTni+TelvwbgPpjjukZfrwgwJDBkQAOpGJliUJjDJcBRtTp 802fw+ym3nPk/BE62kvcyZJiy/oKPTQ83uzbbbLBBfE6xrUjYEjBBkFyKaOu5FZInZWz PhvpcGDB30UeXnxTHav57PPNVx+3w4qVRxQUaQSpG0hLIoj4HN36TB40VGgd5RmBdT3c N+pQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=iY7AT3Aq; 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 i21-20020a05620a249500b006fa57ff8d78si7303330qkn.67.2023.02.27.06.15.56 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:15:56 -0800 (PST) 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=iY7AT3Aq; 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 1pWe53-0001u8-Mi; Mon, 27 Feb 2023 09:02:17 -0500 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 1pWe4O-0000mD-7d for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:01:39 -0500 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWe4L-0007ch-HC for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:01:35 -0500 Received: by mail-wr1-x42b.google.com with SMTP id t15so6329142wrz.7 for ; Mon, 27 Feb 2023 06:01:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=a/LUrffyQW57nzfvUKYl3CFpJsURKsL4yXJqSOTnUyw=; b=iY7AT3Aq+MFTlX/QpmZBttEhj4wTBY4adRx3cneP7IomS5z1VebshN8SHmQWuCqZ2l lzPy82vnt8hn4eDv6N1VkvkYAg8mn8H8PYJcwUTs4DNP+kc/NIG2Uq1PPumWSJ/flWNR JNR9KiwNs1LzZ/yOEF4fk+tpAv0qtKf1cEJHRq8R5byUH0ZMuGxy+ou7zpXqRN282Csq n3QJY6SttMKbwvhsvjyT1B5qbJ1lU8pwSL9F0l2PRwCR1HzMqzL5eUUEV67s+M6Cjbbz W416pKRG1n6C5Gz4Ve1coUYow1yMdEcH4lcyf1wzmFxkF420hAbMflVONDI3zWhKON19 nXZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=a/LUrffyQW57nzfvUKYl3CFpJsURKsL4yXJqSOTnUyw=; b=MTJXsDu2LcBes0cIDVSccGvZSxkSR9oJLSScq1axB/1uZsS9MPBoK5/9qx60IvcoAR XtcVKIOJXlo+w6Tn0sJEo+4AnuQdjVKPr8/+E+xE/ZMFYLJMadVfkiOyLcFe9UoonSPN LCSWk/3Y4nBVKGTiMp3zqzEFnMsritPafo7a5HPGPotT4aLzO/RCQJIE83EVeVp0Ve9U 9wwfuGwuyl+xXi7qlZCZeNymB1DCpqJz1qzzD8tVHsKB8E3ZQorIwVPEaKmGT4bmv1U6 iQrbPuyvjAjoLkLhulA5bcpG11UF0vulb/YbJ00AsQnyPLwOy+qIOsak1yYV1cfLtZFj KzWw== X-Gm-Message-State: AO0yUKU/D8/dvrIJCFH9x3KfANw/9rbpj4e8myB/3UsAVlIX6NjpweaF xKCjALKl6ZJ+8rE3bdD8PVnRidZ4d+ktlJXU X-Received: by 2002:adf:f1c1:0:b0:2c5:598c:14b0 with SMTP id z1-20020adff1c1000000b002c5598c14b0mr20196526wro.20.1677506492100; Mon, 27 Feb 2023 06:01:32 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id s9-20020a5d4249000000b002c5598c14acsm7158514wrr.6.2023.02.27.06.01.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Feb 2023 06:01:31 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 20/25] hw/intc/armv7m_nvic: Use QOM cast CPU() macro Date: Mon, 27 Feb 2023 14:00:57 +0000 Message-Id: <20230227140102.3712344-21-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230227140102.3712344-1-peter.maydell@linaro.org> References: <20230227140102.3712344-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42b; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42b.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 From: Philippe Mathieu-Daudé Avoid accessing 'parent_obj' directly. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Alex Bennée Message-id: 20230220115114.25237-9-philmd@linaro.org Signed-off-by: Peter Maydell --- hw/intc/armv7m_nvic.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/intc/armv7m_nvic.c b/hw/intc/armv7m_nvic.c index 8e289051a40..63afe1fdf58 100644 --- a/hw/intc/armv7m_nvic.c +++ b/hw/intc/armv7m_nvic.c @@ -578,7 +578,7 @@ static void do_armv7m_nvic_set_pending(void *opaque, int irq, bool secure, * which saves having to have an extra argument is_terminal * that we'd only use in one place. */ - cpu_abort(&s->cpu->parent_obj, + cpu_abort(CPU(s->cpu), "Lockup: can't take terminal derived exception " "(original exception priority %d)\n", s->vectpending_prio); @@ -644,7 +644,7 @@ static void do_armv7m_nvic_set_pending(void *opaque, int irq, bool secure, * Lockup condition due to a guest bug. We don't model * Lockup, so report via cpu_abort() instead. */ - cpu_abort(&s->cpu->parent_obj, + cpu_abort(CPU(s->cpu), "Lockup: can't escalate %d to HardFault " "(current priority %d)\n", irq, running); } @@ -742,7 +742,7 @@ void armv7m_nvic_set_pending_lazyfp(NVICState *s, int irq, bool secure) * We want to escalate to HardFault but the context the * FP state belongs to prevents the exception pre-empting. */ - cpu_abort(&s->cpu->parent_obj, + cpu_abort(CPU(s->cpu), "Lockup: can't escalate to HardFault during " "lazy FP register stacking\n"); } From patchwork Mon Feb 27 14:00:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 657086 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2382479wrb; Mon, 27 Feb 2023 06:31:05 -0800 (PST) X-Google-Smtp-Source: AK7set977ALYofMTHY4iGCTTyig5oOT2DWwlTdFqsTYQYs3u3d+Pd0dDZON/uzqWvMtPHbNL8zQ2 X-Received: by 2002:a05:6870:170e:b0:16e:116e:1c36 with SMTP id h14-20020a056870170e00b0016e116e1c36mr19430900oae.3.1677508265143; Mon, 27 Feb 2023 06:31:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677508265; cv=none; d=google.com; s=arc-20160816; b=CdNh/3k13zna8vgodDVN3WbNb3PtB0Ufpigh0mBHaQfdzeEpmEGFLg84M1/RzFWzbX X4oeLONnOqhd1XL/jegGKhTg+9WTlEXGiAE0wOx4pI+6Yiza8pLnvbnXIiZhDvlLctXF TQGVoNj0FaNaIStQui7wKK4VIKx/+oZICkO3DvU9eWGgad0ExSEVZ3l8JZYcz8cfiAZj d7q09GxVEA03ogso655QHJQaVlZCwv/zbZGtl6okvsfTJ6kb79Qlxh0k7vYQEUDHC66u RYTF9fPNSBqgORuUOSi1KylXXX0llwFnqnptUN4PaAQkqPPODdheNn+ISE0OKWEVs19z G8YA== 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:to:from :dkim-signature; bh=s3p4BYVS0fXofW3OGu8iWGz+dlE7VopRg+VENQUXfKg=; b=RGdlCREU5zZB2hcvbzVX8DtZ6ZZK2CWxWHm3AaedXwj/WLrw0jE1K8ehGue4Lc9TZJ V+NvDf2bmgur622PHRJn+QiYlq+Y0MYaVVy32gfVFNHkxC8tiFf9PahEHmtpjIwfRWbl Pae6LVuim+K7ylDOIVHlW4I6lpSLguIq/wOhXH9AcL0sL9L63sGRcfbznRO06GcjzH6B +SFu+xdU5477ao+TCU4YdbzaEnI+d09z0NxXYJy/goRbnsg5W6BG2iEMZD7zEsw4QTbz gRdwFcnMVB0Vc5rmRz00rjp0nso499fThkaKpyuzljmhLvjnjBILbVtNQya8AqyUHZn/ RDLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Vn1OL1xD; 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 b6-20020ae9eb06000000b007423ccd7a76si5959810qkg.107.2023.02.27.06.31.04 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:31:05 -0800 (PST) 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=Vn1OL1xD; 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 1pWe5I-0003mo-U0; Mon, 27 Feb 2023 09:02:33 -0500 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 1pWe4P-0000o6-Kh for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:01:42 -0500 Received: from mail-lf1-x136.google.com ([2a00:1450:4864:20::136]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWe4N-0007dh-Uo for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:01:37 -0500 Received: by mail-lf1-x136.google.com with SMTP id s22so8642071lfi.9 for ; Mon, 27 Feb 2023 06:01:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=s3p4BYVS0fXofW3OGu8iWGz+dlE7VopRg+VENQUXfKg=; b=Vn1OL1xDJJy/CCs7G1bkkFkMBB+lGrlM4TzYq2N+XuwO1rct9INP4clQJmUfDubxeH frLuHbhUCiWhGCalrTV7mSYBfMXq8E6IGVdTtNLHTxY/Uhhqs3P8rCLhbp5SLMvje2VU RnrVuVxdWQkZ9TElNNWUa5XoqwHEtSxobInn55wgUfPsImtQqvw9ydW/6FFJ/2u8317F nK3l8GLuHKV9/eOaG8n4XvfqSHgrpTNepn4k0W79KLpLyw4iSNkIokr0X9Wrb41lNtvT Fup2RtJ/AWbQ8rp6M4ZmGDZx4S3x4IYfrTWqVDInoWuL2jV0Pv4GD7xWaMlTkAHxY19l 6j0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=s3p4BYVS0fXofW3OGu8iWGz+dlE7VopRg+VENQUXfKg=; b=dy5V8gc07+Ztyhu7n+3vSn/qkuVV3Lxk5OJIPBx4N9x1ihJplw4Wokn/uNpLsEfpdB /DB2vERXdZDAe99C2zFXrSRBWn3NSGn01QrpWO22ojvnuL1djZIp3nnL+MtPYZTDHYLi LU9SoVYqjWnSfyeotRxhF7i0zNTEjM0163ExJhn6x0lmSf/Fd5e3tXLwnFEKavZBNohQ jxr3OowFrEi/hxd1mn7jPjAXPhsObbaHV3N6/aQ7pylQzAT/xM5c1hemhMi8vgwZXe8D S1HMf6SPBhYqM6NMfwRYvWZMtwccNx+eRC+kXB2Gi89yHdbi2zKunTmlnWA0Mz7Z4QBy V6/g== X-Gm-Message-State: AO0yUKVIbBszyl6D18TsjOAlIKA9A+0LTmIxPzphKyhAXEjfd13kPe96 UJ6nwGaX3SZScg2EFCHRtNxpAIZKinKqSZUp X-Received: by 2002:ac2:4e65:0:b0:4df:3185:5e05 with SMTP id y5-20020ac24e65000000b004df31855e05mr1533042lfs.27.1677506493311; Mon, 27 Feb 2023 06:01:33 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id s9-20020a5d4249000000b002c5598c14acsm7158514wrr.6.2023.02.27.06.01.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Feb 2023 06:01:32 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 21/25] hw/arm/musicpal: Remove unused dummy MemoryRegion Date: Mon, 27 Feb 2023 14:00:58 +0000 Message-Id: <20230227140102.3712344-22-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230227140102.3712344-1-peter.maydell@linaro.org> References: <20230227140102.3712344-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::136; envelope-from=peter.maydell@linaro.org; helo=mail-lf1-x136.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 From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Signed-off-by: Peter Maydell --- hw/arm/musicpal.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/hw/arm/musicpal.c b/hw/arm/musicpal.c index 89b66606c32..06d9add7c72 100644 --- a/hw/arm/musicpal.c +++ b/hw/arm/musicpal.c @@ -1072,7 +1072,6 @@ struct musicpal_key_state { SysBusDevice parent_obj; /*< public >*/ - MemoryRegion iomem; uint32_t kbd_extended; uint32_t pressed_keys; qemu_irq out[8]; @@ -1161,9 +1160,6 @@ static void musicpal_key_init(Object *obj) DeviceState *dev = DEVICE(sbd); musicpal_key_state *s = MUSICPAL_KEY(dev); - memory_region_init(&s->iomem, obj, "dummy", 0); - sysbus_init_mmio(sbd, &s->iomem); - s->kbd_extended = 0; s->pressed_keys = 0; From patchwork Mon Feb 27 14:00:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 656998 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2370399wrb; Mon, 27 Feb 2023 06:08:21 -0800 (PST) X-Google-Smtp-Source: AK7set++Kwp0327dhyfH5LYzFgilDAarXDps/i8kHxG0cR6p46NC3lBt+Fk5PjVuCdCwFfRN/AH1 X-Received: by 2002:ad4:4ee4:0:b0:56e:9986:4fa9 with SMTP id dv4-20020ad44ee4000000b0056e99864fa9mr45381560qvb.7.1677506901724; Mon, 27 Feb 2023 06:08:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677506901; cv=none; d=google.com; s=arc-20160816; b=fcuhc5J7m7TUXJCg8cuozQn3fykgwC5jiNiLu3uGdDkYxPKpZIl8E/uy73zfD8eL3U sI2eiyg44Gj80R1JZ9E0nXCO2oMmZSf2TF+wRNXdnStspFG/x6TUGP9aya38B752Arbk Vgpi4kNrHMWQzv2+VUDo7WABDbcKDSwfsJdXFSzsRrMRGeJjzfOUazkANuAbAaqLDHdW Evr28QBjemDvotv6Ndgg0v/991V2Cy60J4VcX5IM42yQM7mvc/DVLIDCX1wchj7RIbIj ldXy7dWdSrzocjWE5UHLPaEhRCnGJOf2DMPQyOcfH5geS/AzZcDlO4Iqm4qCtUAca7fU M4Ww== 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:to:from :dkim-signature; bh=eMvi4KhirUzuoIPRZhoENemFll4CeurZVpqkoOYKjcs=; b=fqrPq+5Prw/HbLWvsJUI4GxY8OAaG8EeiHuqLvz68jdbknIWjHqF2pWaB6/9Lg1qYQ UnJF13d3VVVR8ACsrbzfJ8rx/giczHD9s0FIaNIP4YYJlOb+iDcU8v3i3rFL/SufOLMv VWiRD4SK5hH7kHgiWtHEm2YKXKJb+FPjHit6274nfD1Q3ZlSN8oGZEj1GiQJewyk6vsP qpFK7Iqg15P2Z8LaKIQi1w+m+CovrABiIYW5z1Hb3D2TUjYUmFauTgKg67ax6XvUgBVX /RiTI7mdNhl6SLm4b2DiDdGM64D8K5ovw60QCQhDbMM+/mfDL6+0+KDofphzTtX9QRSk TRJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="tyUSwV3/"; 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 f21-20020a0caa95000000b0056eb3abe4f1si6046753qvb.168.2023.02.27.06.08.21 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:08:21 -0800 (PST) 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="tyUSwV3/"; 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 1pWe56-00025x-7O; Mon, 27 Feb 2023 09:02:20 -0500 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 1pWe4P-0000oE-O6 for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:01:46 -0500 Received: from mail-wr1-x430.google.com ([2a00:1450:4864:20::430]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWe4O-0007dp-7T for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:01:37 -0500 Received: by mail-wr1-x430.google.com with SMTP id t15so6329306wrz.7 for ; Mon, 27 Feb 2023 06:01:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=eMvi4KhirUzuoIPRZhoENemFll4CeurZVpqkoOYKjcs=; b=tyUSwV3/PCCXvaHAcHhrUDAbn/V97nEHaHd3imUbBajQm3TxP+PscISkVuBpJzI0hO MPYiuu8+L6ShtIf97bRFzz8BHNZ6lU9ekHAW+bSjQC3lYbiAdfAhXIPqKzGCxKfFWMpO GPDoH5JWSZBdADo/G0QqGcm3gBv659ya1MnH8VlioKyXOdqtWTX2iuBDImlG4uhfiz8X S+TAQ0asRIMjusaimquGDCOGXBSAm48zBo5XE26s3yiH2uZwSI5aQ4shA2YrjLa5kgAr m2YhiBGKueWO13HrOrDkcAp+6/yXB1KVbrwFQ+ZEPbbwnctNUhxK+JEa4A2VoWyof6FG ZGJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=eMvi4KhirUzuoIPRZhoENemFll4CeurZVpqkoOYKjcs=; b=2judL8hsvjs6XbkzsHmEf7lMJfKJ09+0mr5I4BfkOAD16RImECXErs+fEUSE6iBM9q 2TtXnFPOz7dRwpPPd/LSYn+5xTI18S2HEdSAyzgyiZ7P1/92TPpoppGLSMaIB5mTHp4V L8+9cYUsW8X1OZhRz9D/PRZlQiqWvx9PfvgxBW4KLWxSeUVLHvNnO2PI6oFXLMW4munn wZC+tl9GQ0azwVACHhgaEDyl0XG7ABH2B76GMOal5ri2H+IP8HLfdT5O4Q+HVG+UeYA0 Hvp7s/NhoCxb30J6e2ra7k3xRzyNPHIHEaOJ7IZVEb61biTjeLY4iOgMUghN9+No8Wij pjlA== X-Gm-Message-State: AO0yUKXLs+YXSnXAaQnVDfWQPhXmiIKZQTH6+q1wKzMg+fO743h6v/Bc 0XQ4gKMvpyIKACa/ctfgI5/UB4S2Cu8dRwA3 X-Received: by 2002:a5d:66c3:0:b0:2c9:79f4:101f with SMTP id k3-20020a5d66c3000000b002c979f4101fmr6247404wrw.34.1677506494660; Mon, 27 Feb 2023 06:01:34 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id s9-20020a5d4249000000b002c5598c14acsm7158514wrr.6.2023.02.27.06.01.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Feb 2023 06:01:33 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 22/25] iothread: Remove unused IOThreadClass / IOTHREAD_CLASS Date: Mon, 27 Feb 2023 14:00:59 +0000 Message-Id: <20230227140102.3712344-23-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230227140102.3712344-1-peter.maydell@linaro.org> References: <20230227140102.3712344-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x430.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 From: Philippe Mathieu-Daudé Since commit be8d853766 ("iothread: add I/O thread object") we never used IOThreadClass / IOTHREAD_CLASS() / IOTHREAD_GET_CLASS(), remove these definitions. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Stefan Hajnoczi Reviewed-by: Alistair Francis Message-id: 20230113200138.52869-2-philmd@linaro.org Signed-off-by: Peter Maydell --- iothread.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/iothread.c b/iothread.c index 3862a644712..b41c305bd96 100644 --- a/iothread.c +++ b/iothread.c @@ -25,10 +25,6 @@ #include "qemu/rcu.h" #include "qemu/main-loop.h" -typedef ObjectClass IOThreadClass; - -DECLARE_CLASS_CHECKERS(IOThreadClass, IOTHREAD, - TYPE_IOTHREAD) #ifdef CONFIG_POSIX /* Benchmark results from 2016 on NVMe SSD drives show max polling times around From patchwork Mon Feb 27 14:01:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 656982 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2367277wrb; Mon, 27 Feb 2023 06:03:51 -0800 (PST) X-Google-Smtp-Source: AK7set8MiVlGpOjwICGVrZbtTXrs20tFT1YZeD/a6CDNFSaAayqrHj49E3N7BCH28nZfcAwUMzgN X-Received: by 2002:a05:6214:1d08:b0:56e:a832:928 with SMTP id e8-20020a0562141d0800b0056ea8320928mr15450057qvd.24.1677506631515; Mon, 27 Feb 2023 06:03:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677506631; cv=none; d=google.com; s=arc-20160816; b=p7Ina+6VEabeljupqnCxw4QFmJebT96EeYX7jS2hkinYXDCWLMTO4WZO8Tq6nr+NZG YfNOYVFOPQyIkTll/MQjhvjqfmPubVqGXODg3cCZfdqSonOBjmH2cmB2vdhdVFwhyuBA PuUmLXupENuiDzDEFSE97gDHrvzO9DjTQT3BpRyYwtHhDy8m1QN4FvHUtwIdAS4n+THq iwlWeMWPqJWUjEDcRh1Pt1Jwc9Vl0lqLkmPL0woRfHML8d4TFyR1qn7CMHedPApp9FWF M3o1zA5FxYelOupfPSMsbL4WjfVLr9VZFuv/zO9hj93f5K5baM9uqArxHdKfAaEbTjLe RdHA== 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:to:from :dkim-signature; bh=ABw6Fx7bvROh29XWw3RjhC64oEfI8tf4qJj38BnQL70=; b=MDfSA1OTrWsDmCsXVcYzB4AhtIj24RQ5Vbqxl2JJ9dug7DHzxE5wT0ZBsBtzPn2IKG wUmGRYKQP/KOCIbuJnqQN7t70Ghag74hyk596z0GbnaIB+WbMzFVeufmM8mhYUSLbbmQ cINjVlsnTf/nzdIvv58le16rK1ASaPv1zVLcxuCkDKFnhhz0Vykc7BPhYQxH0RTmsAKl HuhKYxT9O4hcSHUX1OkF12yDqKJcQl1aw2YIKKLHX2Bjylz0QS3f/CX1buFw8K0L+YAj twuvv0vgmB79nlH/4hr44nSpgx6VpIb+5m1TZt2zWbWd1oeox/2STPWhja94I+dPI7qd mYLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=IHNhWW1n; 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 m4-20020a0cdb84000000b0056eda3b12d9si6790565qvk.70.2023.02.27.06.03.51 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:03:51 -0800 (PST) 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=IHNhWW1n; 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 1pWe55-000234-75; Mon, 27 Feb 2023 09:02:19 -0500 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 1pWe4R-0000pi-2E for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:01:46 -0500 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWe4O-0007at-PT for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:01:38 -0500 Received: by mail-wm1-x32a.google.com with SMTP id j19-20020a05600c1c1300b003e9b564fae9so7244782wms.2 for ; Mon, 27 Feb 2023 06:01:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=ABw6Fx7bvROh29XWw3RjhC64oEfI8tf4qJj38BnQL70=; b=IHNhWW1nPJp1x+JsdMTC/DS7cfoXtSfW9EulLFGyKR4XXpZNqI+A93av3I75VEqM3l cBQF9j6ph3eYwapXxt8W+X4u6Ssg6aoxklXy+WB6SdVNb3cTYEBNvOEEJrZHyigg7Pwp wanz4klSsKLag6vnqE7P7CHw8eAG6I+H9MaiR00i+Wiw9Tu3PWnhqLHJota8b5QNv+eF QdTWeu737K8DjQEgqz78kFbfg1e8LxAc/6HBkvaSS6FuuOx6o+pnDHAycgp0T6cBKwHu 1pYY6akByTti6pA+vXZNPuVOnSwPqcC5euuTq4L0JiXS1zDgjTBTcCdWDUIU79WVNbRk xCPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ABw6Fx7bvROh29XWw3RjhC64oEfI8tf4qJj38BnQL70=; b=RgEYVgXJJM79NCayFNmsIZ7sYNHwJwxkjDVWbycmsbiTyySyEpdfie7JJEDWhPnVbz 7Z5VXyIqkmb35YtSQ40jILSjPLGykUOR+dhhde4Bldxi/xVVQgI+rJKwFLlh8RYz1t0K hSRICqQ8cROQCNPJnwak8pqeptbI3YuDAfg4ITw2n+PNz0JSu8rvrF6zHycF2oaD56JD k9W25yfrzMJX1sJTK0aj9WytgyvxjaL5LPntJaDoQjwWjba63JOCMEsq3TgCd9kOqeau Y1yaZ0wkkZejfouXcSkJdc9DnAQGNVoj2WE0i7kKeMns4y+wpR/lcQqGon2ps8esIeWX njyg== X-Gm-Message-State: AO0yUKXeeDVWep1zlHWaF1eS3juWXKE/QSDbSQsPjYH//qsE/HeSuv95 bcbvSu9oPgOfdzCwoHGPCgxJERisW/BfgorJ X-Received: by 2002:a05:600c:1616:b0:3eb:383c:187d with SMTP id m22-20020a05600c161600b003eb383c187dmr5457148wmn.27.1677506495931; Mon, 27 Feb 2023 06:01:35 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id s9-20020a5d4249000000b002c5598c14acsm7158514wrr.6.2023.02.27.06.01.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Feb 2023 06:01:34 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 23/25] hw/irq: Declare QOM macros using OBJECT_DECLARE_SIMPLE_TYPE() Date: Mon, 27 Feb 2023 14:01:00 +0000 Message-Id: <20230227140102.3712344-24-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230227140102.3712344-1-peter.maydell@linaro.org> References: <20230227140102.3712344-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32a; envelope-from=peter.maydell@linaro.org; helo=mail-wm1-x32a.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 From: Philippe Mathieu-Daudé QOM *DECLARE* macros expect a typedef as first argument, not a structure. Replace 'struct IRQState' by 'IRQState' to avoid when modifying the macros: ../hw/core/irq.c:29:1: error: declaration of anonymous struct must be a definition DECLARE_INSTANCE_CHECKER(struct IRQState, IRQ, ^ Use OBJECT_DECLARE_SIMPLE_TYPE instead of DECLARE_INSTANCE_CHECKER. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Stefan Hajnoczi Reviewed-by: Alistair Francis Message-id: 20230113200138.52869-3-philmd@linaro.org Signed-off-by: Peter Maydell --- hw/core/irq.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/hw/core/irq.c b/hw/core/irq.c index 3623f711fe6..3f14e2dda74 100644 --- a/hw/core/irq.c +++ b/hw/core/irq.c @@ -26,8 +26,7 @@ #include "hw/irq.h" #include "qom/object.h" -DECLARE_INSTANCE_CHECKER(struct IRQState, IRQ, - TYPE_IRQ) +OBJECT_DECLARE_SIMPLE_TYPE(IRQState, IRQ) struct IRQState { Object parent_obj; @@ -68,7 +67,7 @@ qemu_irq *qemu_allocate_irqs(qemu_irq_handler handler, void *opaque, int n) qemu_irq qemu_allocate_irq(qemu_irq_handler handler, void *opaque, int n) { - struct IRQState *irq; + IRQState *irq; irq = IRQ(object_new(TYPE_IRQ)); irq->handler = handler; @@ -94,7 +93,7 @@ void qemu_free_irq(qemu_irq irq) static void qemu_notirq(void *opaque, int line, int level) { - struct IRQState *irq = opaque; + IRQState *irq = opaque; irq->handler(irq->opaque, irq->n, !level); } @@ -120,7 +119,7 @@ void qemu_irq_intercept_in(qemu_irq *gpio_in, qemu_irq_handler handler, int n) static const TypeInfo irq_type_info = { .name = TYPE_IRQ, .parent = TYPE_OBJECT, - .instance_size = sizeof(struct IRQState), + .instance_size = sizeof(IRQState), }; static void irq_register_types(void) From patchwork Mon Feb 27 14:01:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 657022 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2373083wrb; Mon, 27 Feb 2023 06:13:01 -0800 (PST) X-Google-Smtp-Source: AK7set+ydOjIk66RWz127eefguNLUHwy01yukzv1G3BvkgRiE8UPwrq4bH6rV/WyM39N2T9kNoeI X-Received: by 2002:a05:6214:1bc7:b0:56e:bdfb:f4c5 with SMTP id m7-20020a0562141bc700b0056ebdfbf4c5mr49727324qvc.36.1677507181662; Mon, 27 Feb 2023 06:13:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677507181; cv=none; d=google.com; s=arc-20160816; b=BHTL+MLdsHzD6B+B+r93Ap5LvHnPVwciJ8pExkTM0c2185eJRxHxPV2Kas82kjY84k b6l82vJpIbSJ2KuIzMmDG2DFsi4azNVAEBj5W/CZrOyVHaUriEsJLm1/uFKnmONQYUC3 9TaBIq6/GhjOYT39gisrUVvxRk1oVD68RY3PFXg7TLUre1RkEM+0yxU7AzFxBPzOMM8+ yWV9ruOYaI/6hWvcYatLpwt4xD13ncJ086hO1/XItl6UbJno7kLTA3pv6FMTkXMCg2c0 n2DMz+d2OCsMZNRrZ27URK2yPbz57CK486FJ5QPcHsGhZeusdVB6cm1CJAegxWHtjIgT adRw== 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:to:from :dkim-signature; bh=UjsmPr4NI1xBRDaPfLgfuSMFB/tmuf/54srjtmPP27c=; b=TEJxBJnLx0aN58UFDwqvc3XxUnM7qjelpP2viXCEtrBF4VTZ38HI5akE6A66zqfQnX +L//GxcCuTuK3MrOufy1hme5GRHj+s6Bi29B+ERwM0kSIvmSzhgTfzyM+fY7iWHqN756 3kVu7ellCnOydTsVa/c2VQmeWsl8GXIg+QhArXtH8Ft9CXO4pbGiMxO5zOqFCM3szVUZ jeliQf+7J7RK0GwXTehB6RvNS0a6OlhnLtCuCE/EzVXShLgq54eLKSB+UswXr5IS0iia 7kplhV09quZ/jNBO9/LYgjvtVl6VMtr6sr+D47JMVT4pd2iSReVU6nK/Ah0z8wirJllE 7QEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=EhnD367Y; 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 i3-20020a0cf483000000b0057115385fd7si6461126qvm.477.2023.02.27.06.13.01 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:13:01 -0800 (PST) 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=EhnD367Y; 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 1pWe5K-0003vF-9f; Mon, 27 Feb 2023 09:02:34 -0500 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 1pWe4S-0000px-Oi for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:01:46 -0500 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWe4P-0007WH-M9 for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:01:39 -0500 Received: by mail-wr1-x436.google.com with SMTP id bx12so3175870wrb.11 for ; Mon, 27 Feb 2023 06:01:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=UjsmPr4NI1xBRDaPfLgfuSMFB/tmuf/54srjtmPP27c=; b=EhnD367YwV75/gp9l5edA72NTiWkJlJR4DFKmtpXOPN+GRxXwLE+tvYxqExQb7GQ0k //yqcFdMrHIgztELWGcQCrhrLQWv3zHJ4rdHZ+LeoT7bumAS/rOiZ8IHpVG8b4n6znlI ziXhwrXXTmPcZ2AjYbsmrwEOHnmmeYZN9LBNs3KUhKtO/7IOQMxfiWgzyWVerLtHJz5y 3Kl8pm9YKbrXa4NZCCv8U8+hNL0bg8gmJr1vq0s66TPq/hgTScgzUTgSrnmFrDoaLU1J 5JvA4YgxfMDo5aM/nRE50IgrOyvQUu7ls8usa6KgTX6sVm+7Q8I5oY8uqvBqzII2TW8e 0ogA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=UjsmPr4NI1xBRDaPfLgfuSMFB/tmuf/54srjtmPP27c=; b=ZhmWCic+h2zN0QSeSFHrUdHztcbyuwX+BpC9FTmIeHHZoS8CNtwsK9P8V/yl7rOE1w dr505hrlwwuvpsMfdRw8noLUhhyeS02j21nIAKn0ulR4bUxRKZOerZ4fhB5U7dOqY6xi /bbIZ2CgXurvaaSQR2tSDwt4MzzrBKfClBOPHdDI8HcbAZ0YCqv9qwxxJe1lBgaBplLv yXl8vtqfUCY1aDvjZyGud7KpQNciJTe17p/7AHVTU+Ck9trpCK6ixrfvvg1sFA7eee5F yW8MAgeoufagbiGrHEFhq+XVOcoJk4G3xo/7Q0v7a2DttjLGmIWKvGF0RQ0TOZEk6cX0 Gjdw== X-Gm-Message-State: AO0yUKUlZezSpPxagcq+y5swp972EvGIVVYrY9FRRi7baZYpU5eru+o0 lIuRD+sP4IN1fhzcZbqWqkUI7iwPXSrwIrSj X-Received: by 2002:a5d:6e88:0:b0:2cc:1935:1ae8 with SMTP id k8-20020a5d6e88000000b002cc19351ae8mr1972459wrz.47.1677506496973; Mon, 27 Feb 2023 06:01:36 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id s9-20020a5d4249000000b002c5598c14acsm7158514wrr.6.2023.02.27.06.01.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Feb 2023 06:01:36 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 24/25] hw/or-irq: Declare QOM macros using OBJECT_DECLARE_SIMPLE_TYPE() Date: Mon, 27 Feb 2023 14:01:01 +0000 Message-Id: <20230227140102.3712344-25-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230227140102.3712344-1-peter.maydell@linaro.org> References: <20230227140102.3712344-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::436; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x436.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 From: Philippe Mathieu-Daudé Missed during automatic conversion from commit 8063396bf3 ("Use OBJECT_DECLARE_SIMPLE_TYPE when possible"). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Stefan Hajnoczi Reviewed-by: Alistair Francis Message-id: 20230113200138.52869-4-philmd@linaro.org Signed-off-by: Peter Maydell --- include/hw/or-irq.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/include/hw/or-irq.h b/include/hw/or-irq.h index f2f0a273810..131abc2e0c7 100644 --- a/include/hw/or-irq.h +++ b/include/hw/or-irq.h @@ -37,8 +37,7 @@ typedef struct OrIRQState qemu_or_irq; -DECLARE_INSTANCE_CHECKER(qemu_or_irq, OR_IRQ, - TYPE_OR_IRQ) +OBJECT_DECLARE_SIMPLE_TYPE(OrIRQState, OR_IRQ) struct OrIRQState { DeviceState parent_obj; From patchwork Mon Feb 27 14:01:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Peter Maydell X-Patchwork-Id: 656987 Delivered-To: patch@linaro.org Received: by 2002:adf:a3c6:0:0:0:0:0 with SMTP id m6csp2368240wrb; Mon, 27 Feb 2023 06:05:09 -0800 (PST) X-Google-Smtp-Source: AK7set9MHVyHeAjbJw/MXRJ3aHrr3cDH11XXjTnv596+kzsbp2zmNLJK9+McISo30yNxge3O1MQh X-Received: by 2002:a05:622a:15c8:b0:3bf:be8a:8f96 with SMTP id d8-20020a05622a15c800b003bfbe8a8f96mr16297307qty.12.1677506709138; Mon, 27 Feb 2023 06:05:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1677506709; cv=none; d=google.com; s=arc-20160816; b=EnwyxxL8VkzvcsokQA3qEiXKGZ/As/MFxiMEYiwL3wHcnmPK1RGFjnwCaSNGX0y03I VO6W+l1CHsdtkc96/45XXHpXMpLnB44BpGkYrVgDPhM24vW6rdbmg8hGX3H/2C5KVEhY 4VDxtVsk1H5yBrBAWUF4ds6Ws/Ih84aia/1kochvPBYowLlE6cfsttvB8YFYQMJ3vwIg 1vnVn/DTMMDPo6ToiIYylRYbLW2MFa5f70Li0qUmqV2+4C3IDBe7y/9+aIxbcWnBSwf7 hzc0qllSrRXSoBG7WlsnQbZR1vkGsELVOPdmmzWL6sjc7tjUeGy/lc7yVl+SN6aBmI6i l9WQ== 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:to:from :dkim-signature; bh=ZaphTkHMH0LsRYFTiO6wvd3PA01MvbeRtFqcDhu3XaQ=; b=l/SZR55XfgShL2Ng4pY74fU3mBs3iaxVawI6QTcb4eyV1Qb3etqgtlvGCQlQc6S1tP DJr5LCfMQAb2owqwB59r5tTWgyfaxYMfgbaR/fLgX6/M7dhRapgP0d13SntfIP1jIa5v lX88b48pT7daFwX72kjP9cvt/cdARE2UR/+AprH4ubsEUX5oKJz3HLbgyLpNE2ni7+SG JevuHYcWzCyEiaWKSigsVOvr0lbYAQrmV3swzPtPON1hhHh+ENF1HsWNsPu3/A+mX1fh 8j/CLbcWT1B2g1hhji0Xs/SgRO7KUwe/wq8pUWWCCbM4+p/i8yhTAEepgKmljSC28pDh cvwA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="S/HnXpUM"; 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 29-20020a05620a049d00b00742702e2d44si5829345qkr.111.2023.02.27.06.05.08 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 27 Feb 2023 06:05:09 -0800 (PST) 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="S/HnXpUM"; 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 1pWe5C-0002jg-4G; Mon, 27 Feb 2023 09:02:26 -0500 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 1pWe4T-0000q3-3c for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:01:46 -0500 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pWe4R-0007a0-05 for qemu-devel@nongnu.org; Mon, 27 Feb 2023 09:01:40 -0500 Received: by mail-wr1-x42e.google.com with SMTP id bv17so6337953wrb.5 for ; Mon, 27 Feb 2023 06:01:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=ZaphTkHMH0LsRYFTiO6wvd3PA01MvbeRtFqcDhu3XaQ=; b=S/HnXpUMeEgAyUmvPZ287VoQLOvAYoCnviR1N3Rmh+27XekHhR9OqOXl6QxoP2buja nnBSeSFUHCoG2kx7kqcn5CVgWaUMc0bux9ldM/x3j8aY3oKvIhQxRh1fJ8E76vqvDTVY EeoeggCyHGb7exxisNnzsQCjdBqVxCJWcu4Mo9xN0LqSGpTPduKqES56Q5fAgggJyFV5 qOw8qv9I81oMotnKhGRGs5i5NmdrThVoF0qjN+6gacMEvJnEhWyESVlz5T+e+gUweTFQ NJcPHudOaICAtREkeztlSIELovHBqE3ErcxHD5nU/6CdCRhLpDW5W2X1ZKBjXA4fyBGd obKg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=ZaphTkHMH0LsRYFTiO6wvd3PA01MvbeRtFqcDhu3XaQ=; b=QXhH6/ZYFvTQPV/2nWnMkl0S21Ww+l7Iud4LzsRcgcZYCN+P7Nt7fjn2MF0HaYlzYN 93YCChTVDEhIWEU0/8iTu4L6W1eeJ8b7APwBT5FRzE0jP0lxiEDUlHlr919bMVKZZMvJ iNHdD3nUdqzRmvBjnIBTJd7fQFOiWCGTBTCqFAgb4lh3sXjJ4Ze7W+UjmwuxGlYuptJJ y2CqdCsWeXcTi7iYrqVa5ohYFRmX3d+ieA4ym2rPqlV7bAYya5bkTrMGi7yX2pjsd3Fz WDQ/JsS9yG7fLVGjK66m/iqtvXS0xOtcepEdJ+KA+WLfkf5GcU5GhmHO8idAY41ektij piZA== X-Gm-Message-State: AO0yUKW5t212jKtpe/xmzIMeGMq8FxRSJ69a13aBvFidkppQu0ybtFbL 8rDLBlocP+IUdXdSgZazCkE0sI21itaMT/8g X-Received: by 2002:a5d:522e:0:b0:2c3:db9e:4b06 with SMTP id i14-20020a5d522e000000b002c3db9e4b06mr21780943wra.45.1677506498215; Mon, 27 Feb 2023 06:01:38 -0800 (PST) Received: from orth.archaic.org.uk (orth.archaic.org.uk. [2001:8b0:1d0::2]) by smtp.gmail.com with ESMTPSA id s9-20020a5d4249000000b002c5598c14acsm7158514wrr.6.2023.02.27.06.01.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Feb 2023 06:01:37 -0800 (PST) From: Peter Maydell To: qemu-devel@nongnu.org Subject: [PULL 25/25] hw: Replace qemu_or_irq typedef by OrIRQState Date: Mon, 27 Feb 2023 14:01:02 +0000 Message-Id: <20230227140102.3712344-26-peter.maydell@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230227140102.3712344-1-peter.maydell@linaro.org> References: <20230227140102.3712344-1-peter.maydell@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42e; envelope-from=peter.maydell@linaro.org; helo=mail-wr1-x42e.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 From: Philippe Mathieu-Daudé OBJECT_DECLARE_SIMPLE_TYPE() macro provides the OrIRQState declaration for free. Besides, the QOM code style is to use the structure name as typedef, and QEMU style is to use Camel Case, so rename qemu_or_irq as OrIRQState. Mechanical change using: $ sed -i -e 's/qemu_or_irq/OrIRQState/g' $(git grep -l qemu_or_irq) Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Stefan Hajnoczi Reviewed-by: Alistair Francis Message-id: 20230113200138.52869-5-philmd@linaro.org Signed-off-by: Peter Maydell --- include/hw/arm/armsse.h | 6 +++--- include/hw/arm/bcm2835_peripherals.h | 2 +- include/hw/arm/exynos4210.h | 4 ++-- include/hw/arm/stm32f205_soc.h | 2 +- include/hw/arm/stm32f405_soc.h | 2 +- include/hw/arm/xlnx-versal.h | 6 +++--- include/hw/arm/xlnx-zynqmp.h | 2 +- include/hw/or-irq.h | 2 -- hw/arm/exynos4210.c | 4 ++-- hw/arm/mps2-tz.c | 2 +- hw/core/or-irq.c | 18 +++++++++--------- hw/pci-host/raven.c | 2 +- 12 files changed, 25 insertions(+), 27 deletions(-) diff --git a/include/hw/arm/armsse.h b/include/hw/arm/armsse.h index 9648e7a4193..cd0931d0a0b 100644 --- a/include/hw/arm/armsse.h +++ b/include/hw/arm/armsse.h @@ -155,12 +155,12 @@ struct ARMSSE { TZPPC apb_ppc[NUM_INTERNAL_PPCS]; TZMPC mpc[IOTS_NUM_MPC]; CMSDKAPBTimer timer[3]; - qemu_or_irq ppc_irq_orgate; + OrIRQState ppc_irq_orgate; SplitIRQ sec_resp_splitter; SplitIRQ ppc_irq_splitter[NUM_PPCS]; SplitIRQ mpc_irq_splitter[IOTS_NUM_EXP_MPC + IOTS_NUM_MPC]; - qemu_or_irq mpc_irq_orgate; - qemu_or_irq nmi_orgate; + OrIRQState mpc_irq_orgate; + OrIRQState nmi_orgate; SplitIRQ cpu_irq_splitter[NUM_SSE_IRQS]; diff --git a/include/hw/arm/bcm2835_peripherals.h b/include/hw/arm/bcm2835_peripherals.h index c9d25d493e0..d724a2fc28a 100644 --- a/include/hw/arm/bcm2835_peripherals.h +++ b/include/hw/arm/bcm2835_peripherals.h @@ -56,7 +56,7 @@ struct BCM2835PeripheralState { BCM2835AuxState aux; BCM2835FBState fb; BCM2835DMAState dma; - qemu_or_irq orgated_dma_irq; + OrIRQState orgated_dma_irq; BCM2835ICState ic; BCM2835PropertyState property; BCM2835RngState rng; diff --git a/include/hw/arm/exynos4210.h b/include/hw/arm/exynos4210.h index 97353f1c02f..68db19f0cb7 100644 --- a/include/hw/arm/exynos4210.h +++ b/include/hw/arm/exynos4210.h @@ -96,8 +96,8 @@ struct Exynos4210State { MemoryRegion boot_secondary; MemoryRegion bootreg_mem; I2CBus *i2c_if[EXYNOS4210_I2C_NUMBER]; - qemu_or_irq pl330_irq_orgate[EXYNOS4210_NUM_DMA]; - qemu_or_irq cpu_irq_orgate[EXYNOS4210_NCPUS]; + OrIRQState pl330_irq_orgate[EXYNOS4210_NUM_DMA]; + OrIRQState cpu_irq_orgate[EXYNOS4210_NCPUS]; A9MPPrivState a9mpcore; Exynos4210GicState ext_gic; Exynos4210CombinerState int_combiner; diff --git a/include/hw/arm/stm32f205_soc.h b/include/hw/arm/stm32f205_soc.h index 849d3ed8891..5a4f7762642 100644 --- a/include/hw/arm/stm32f205_soc.h +++ b/include/hw/arm/stm32f205_soc.h @@ -63,7 +63,7 @@ struct STM32F205State { STM32F2XXADCState adc[STM_NUM_ADCS]; STM32F2XXSPIState spi[STM_NUM_SPIS]; - qemu_or_irq *adc_irqs; + OrIRQState *adc_irqs; MemoryRegion sram; MemoryRegion flash; diff --git a/include/hw/arm/stm32f405_soc.h b/include/hw/arm/stm32f405_soc.h index 249ab5434ec..c968ce3ab23 100644 --- a/include/hw/arm/stm32f405_soc.h +++ b/include/hw/arm/stm32f405_soc.h @@ -63,7 +63,7 @@ struct STM32F405State { STM32F4xxExtiState exti; STM32F2XXUsartState usart[STM_NUM_USARTS]; STM32F2XXTimerState timer[STM_NUM_TIMERS]; - qemu_or_irq adc_irqs; + OrIRQState adc_irqs; STM32F2XXADCState adc[STM_NUM_ADCS]; STM32F2XXSPIState spi[STM_NUM_SPIS]; diff --git a/include/hw/arm/xlnx-versal.h b/include/hw/arm/xlnx-versal.h index cbe8a19c10f..b6786e9832d 100644 --- a/include/hw/arm/xlnx-versal.h +++ b/include/hw/arm/xlnx-versal.h @@ -85,7 +85,7 @@ struct Versal { } rpu; struct { - qemu_or_irq irq_orgate; + OrIRQState irq_orgate; XlnxXramCtrl ctrl[XLNX_VERSAL_NR_XRAM]; } xram; @@ -103,7 +103,7 @@ struct Versal { XlnxCSUDMA dma_src; XlnxCSUDMA dma_dst; MemoryRegion linear_mr; - qemu_or_irq irq_orgate; + OrIRQState irq_orgate; } ospi; } iou; @@ -113,7 +113,7 @@ struct Versal { XlnxVersalEFuseCtrl efuse_ctrl; XlnxVersalEFuseCache efuse_cache; - qemu_or_irq apb_irq_orgate; + OrIRQState apb_irq_orgate; } pmc; struct { diff --git a/include/hw/arm/xlnx-zynqmp.h b/include/hw/arm/xlnx-zynqmp.h index 20bdf894aa0..687c75e3b03 100644 --- a/include/hw/arm/xlnx-zynqmp.h +++ b/include/hw/arm/xlnx-zynqmp.h @@ -130,7 +130,7 @@ struct XlnxZynqMPState { XlnxZDMA gdma[XLNX_ZYNQMP_NUM_GDMA_CH]; XlnxZDMA adma[XLNX_ZYNQMP_NUM_ADMA_CH]; XlnxCSUDMA qspi_dma; - qemu_or_irq qspi_irq_orgate; + OrIRQState qspi_irq_orgate; XlnxZynqMPAPUCtrl apu_ctrl; XlnxZynqMPCRF crf; CadenceTTCState ttc[XLNX_ZYNQMP_NUM_TTC]; diff --git a/include/hw/or-irq.h b/include/hw/or-irq.h index 131abc2e0c7..c0a42f37112 100644 --- a/include/hw/or-irq.h +++ b/include/hw/or-irq.h @@ -35,8 +35,6 @@ */ #define MAX_OR_LINES 48 -typedef struct OrIRQState qemu_or_irq; - OBJECT_DECLARE_SIMPLE_TYPE(OrIRQState, OR_IRQ) struct OrIRQState { diff --git a/hw/arm/exynos4210.c b/hw/arm/exynos4210.c index 8dafa2215b6..6f2dda13f63 100644 --- a/hw/arm/exynos4210.c +++ b/hw/arm/exynos4210.c @@ -507,7 +507,7 @@ static uint64_t exynos4210_calc_affinity(int cpu) return (0x9 << ARM_AFF1_SHIFT) | cpu; } -static DeviceState *pl330_create(uint32_t base, qemu_or_irq *orgate, +static DeviceState *pl330_create(uint32_t base, OrIRQState *orgate, qemu_irq irq, int nreq, int nevents, int width) { SysBusDevice *busdev; @@ -806,7 +806,7 @@ static void exynos4210_init(Object *obj) for (i = 0; i < ARRAY_SIZE(s->pl330_irq_orgate); i++) { char *name = g_strdup_printf("pl330-irq-orgate%d", i); - qemu_or_irq *orgate = &s->pl330_irq_orgate[i]; + OrIRQState *orgate = &s->pl330_irq_orgate[i]; object_initialize_child(obj, name, orgate, TYPE_OR_IRQ); g_free(name); diff --git a/hw/arm/mps2-tz.c b/hw/arm/mps2-tz.c index 284c09c91d3..07aecd9497d 100644 --- a/hw/arm/mps2-tz.c +++ b/hw/arm/mps2-tz.c @@ -152,7 +152,7 @@ struct MPS2TZMachineState { TZMSC msc[4]; CMSDKAPBUART uart[6]; SplitIRQ sec_resp_splitter; - qemu_or_irq uart_irq_orgate; + OrIRQState uart_irq_orgate; DeviceState *lan9118; SplitIRQ cpu_irq_splitter[MPS2TZ_NUMIRQ_MAX]; Clock *sysclk; diff --git a/hw/core/or-irq.c b/hw/core/or-irq.c index d8f3754e967..1df4bc05a7c 100644 --- a/hw/core/or-irq.c +++ b/hw/core/or-irq.c @@ -31,7 +31,7 @@ static void or_irq_handler(void *opaque, int n, int level) { - qemu_or_irq *s = OR_IRQ(opaque); + OrIRQState *s = OR_IRQ(opaque); int or_level = 0; int i; @@ -46,7 +46,7 @@ static void or_irq_handler(void *opaque, int n, int level) static void or_irq_reset(DeviceState *dev) { - qemu_or_irq *s = OR_IRQ(dev); + OrIRQState *s = OR_IRQ(dev); int i; for (i = 0; i < MAX_OR_LINES; i++) { @@ -56,7 +56,7 @@ static void or_irq_reset(DeviceState *dev) static void or_irq_realize(DeviceState *dev, Error **errp) { - qemu_or_irq *s = OR_IRQ(dev); + OrIRQState *s = OR_IRQ(dev); assert(s->num_lines <= MAX_OR_LINES); @@ -65,7 +65,7 @@ static void or_irq_realize(DeviceState *dev, Error **errp) static void or_irq_init(Object *obj) { - qemu_or_irq *s = OR_IRQ(obj); + OrIRQState *s = OR_IRQ(obj); qdev_init_gpio_out(DEVICE(obj), &s->out_irq, 1); } @@ -84,7 +84,7 @@ static void or_irq_init(Object *obj) static bool vmstate_extras_needed(void *opaque) { - qemu_or_irq *s = OR_IRQ(opaque); + OrIRQState *s = OR_IRQ(opaque); return s->num_lines >= OLD_MAX_OR_LINES; } @@ -95,7 +95,7 @@ static const VMStateDescription vmstate_or_irq_extras = { .minimum_version_id = 1, .needed = vmstate_extras_needed, .fields = (VMStateField[]) { - VMSTATE_VARRAY_UINT16_UNSAFE(levels, qemu_or_irq, num_lines, 0, + VMSTATE_VARRAY_UINT16_UNSAFE(levels, OrIRQState, num_lines, 0, vmstate_info_bool, bool), VMSTATE_END_OF_LIST(), }, @@ -106,7 +106,7 @@ static const VMStateDescription vmstate_or_irq = { .version_id = 1, .minimum_version_id = 1, .fields = (VMStateField[]) { - VMSTATE_BOOL_SUB_ARRAY(levels, qemu_or_irq, 0, OLD_MAX_OR_LINES), + VMSTATE_BOOL_SUB_ARRAY(levels, OrIRQState, 0, OLD_MAX_OR_LINES), VMSTATE_END_OF_LIST(), }, .subsections = (const VMStateDescription*[]) { @@ -116,7 +116,7 @@ static const VMStateDescription vmstate_or_irq = { }; static Property or_irq_properties[] = { - DEFINE_PROP_UINT16("num-lines", qemu_or_irq, num_lines, 1), + DEFINE_PROP_UINT16("num-lines", OrIRQState, num_lines, 1), DEFINE_PROP_END_OF_LIST(), }; @@ -136,7 +136,7 @@ static void or_irq_class_init(ObjectClass *klass, void *data) static const TypeInfo or_irq_type_info = { .name = TYPE_OR_IRQ, .parent = TYPE_DEVICE, - .instance_size = sizeof(qemu_or_irq), + .instance_size = sizeof(OrIRQState), .instance_init = or_irq_init, .class_init = or_irq_class_init, }; diff --git a/hw/pci-host/raven.c b/hw/pci-host/raven.c index cdfb62ac2ec..072ffe3c5e2 100644 --- a/hw/pci-host/raven.c +++ b/hw/pci-host/raven.c @@ -60,7 +60,7 @@ DECLARE_INSTANCE_CHECKER(PREPPCIState, RAVEN_PCI_HOST_BRIDGE, struct PRePPCIState { PCIHostState parent_obj; - qemu_or_irq *or_irq; + OrIRQState *or_irq; qemu_irq pci_irqs[PCI_NUM_PINS]; PCIBus pci_bus; AddressSpace pci_io_as;