From nobody Sat May 18 19:12:37 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=gmail.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1646649591535836.2860144325473; Mon, 7 Mar 2022 02:39:51 -0800 (PST) Received: from localhost ([::1]:35182 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nRAmM-0008Pp-5J for importer@patchew.org; Mon, 07 Mar 2022 05:39:50 -0500 Received: from eggs.gnu.org ([209.51.188.92]:37224) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nRALg-0002qU-PF for qemu-devel@nongnu.org; Mon, 07 Mar 2022 05:12:18 -0500 Received: from [2a00:1450:4864:20::434] (port=34668 helo=mail-wr1-x434.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nRALf-0004HP-9w for qemu-devel@nongnu.org; Mon, 07 Mar 2022 05:12:16 -0500 Received: by mail-wr1-x434.google.com with SMTP id j26so11989340wrb.1 for ; Mon, 07 Mar 2022 02:12:14 -0800 (PST) Received: from localhost.localdomain ([185.126.107.38]) by smtp.gmail.com with ESMTPSA id bg20-20020a05600c3c9400b0037fa5c422c8sm21859356wmb.48.2022.03.07.02.12.12 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 07 Mar 2022 02:12:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=W8OlnKGBcJmp8ZSBDdM9hwxfl+ILOgzIJHWHqjOQrx0=; b=nmBaKEbT+EaNDb12oP2syZp4IAXvLANNAbEQxjdr2Y38w4Zhmb8gjnQlPp5iySi7t4 Dsgexwxk/QaoxMGwoxCi0ygmGpmtAwM7AVqGd2lHDdR9ID0vq66UX7M86VP14AClaZ2r ppkx1TRaSuoOx5L6RFrkt10r3XvrbOCRePUhAAUphgGlYpocVBy0qeUQ5XMJ9jKEa0yj p/BeIb6UmkaOFaPjpL2eo0QMaaoHTUzd2RNekEEB4yha68GRIPLSObmwlS1vwpLwhAE9 hMmjZmPXRnhqQK6ekVPbl26jb/WHx26Q3W+v2ZABWtRErPXIG/2W9m2rL4cTSlincrh1 ZX2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=W8OlnKGBcJmp8ZSBDdM9hwxfl+ILOgzIJHWHqjOQrx0=; b=pHQJdxhZgo2oyTdyVQmHWqXGuFdS1YNmiWERoVvfKEb8zNeE3bR4G1lEtVUf/ao/k5 a87XE6Eeub3tdbQCi9LOV56J6ml+clk6M5grzDCom6Q4/uZpHkw0WJB7hLPAb3FLVKWY 189KbF4byCdPh8xc5oDAvDT2ZkYxGNVWS21qKffZfMvia2jT96b/kHyoXVyrh7QjLPcc HEynJg/X93AIXAo54PPyx+U0XSN+2bfebU7pkWX6DWVwS9XN5l8V/FeJW7YkoY7yxm1Q 2HzcCaMevjW0djpcEgRyesQhRSYQEuC6h2IrwOszTyGIMrep4/3HaT7I0Pt8ADVQ8yeN K47g== X-Gm-Message-State: AOAM5334E8MYb+tosATKBXp1pNaQB+4E63IGj+ZWf7c742OVOxKWVvOZ /55BlXXtKj0Jj5HjGQoS5oQrfCRFeGE= X-Google-Smtp-Source: ABdhPJxW6umkoOY9QxXMNjx3Yfjp7u1eXTY/54Kn5SZ93m4f/zPD3a1JeO2riVyRvbBJXNeqEn3yoA== X-Received: by 2002:adf:bc09:0:b0:1f0:2483:48b with SMTP id s9-20020adfbc09000000b001f02483048bmr7991671wrg.118.1646647933648; Mon, 07 Mar 2022 02:12:13 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 01/16] target/mips: Fix cycle counter timing calculations Date: Mon, 7 Mar 2022 11:11:52 +0100 Message-Id: <20220307101207.90369-2-philippe.mathieu.daude@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220307101207.90369-1-philippe.mathieu.daude@gmail.com> References: <20220307101207.90369-1-philippe.mathieu.daude@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::434 (failed) Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::434; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-x434.google.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 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, FREEMAIL_FROM=0.001, PDS_HP_HELO_NORDNS=0.659, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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: , Cc: Aleksandar Rikalo , Simon Burge , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1646649593314100001 From: Simon Burge The cp0_count_ns value is calculated from the CP0_COUNT_RATE_DEFAULT constant in target/mips/cpu.c. The cycle counter resolution is defined per-CPU in target/mips/cpu-defs.c.inc; use this value for calculating cp0_count_ns. Fixings timing problems on guest OSs for the 20Kc CPU which has a CCRes of 1. Signed-off-by: Simon Burge Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20211213135125.18378-1-simonb@NetBSD.org> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- target/mips/cpu.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/target/mips/cpu.c b/target/mips/cpu.c index 4aae23934b..0766e25693 100644 --- a/target/mips/cpu.c +++ b/target/mips/cpu.c @@ -440,8 +440,9 @@ static void mips_cp0_period_set(MIPSCPU *cpu) { CPUMIPSState *env =3D &cpu->env; =20 + /* env->CCRes isn't initialised this early, use env->cpu_model->CCRes.= */ env->cp0_count_ns =3D clock_ticks_to_ns(MIPS_CPU(cpu)->clock, - cpu->cp0_count_rate); + env->cpu_model->CCRes); assert(env->cp0_count_ns); } =20 --=20 2.34.1 From nobody Sat May 18 19:12:37 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=gmail.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1646651694421260.29670750163234; Mon, 7 Mar 2022 03:14:54 -0800 (PST) Received: from localhost ([::1]:44378 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nRBKI-0004I7-66 for importer@patchew.org; Mon, 07 Mar 2022 06:14:54 -0500 Received: from eggs.gnu.org ([209.51.188.92]:37238) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nRALm-0002tA-KD for qemu-devel@nongnu.org; Mon, 07 Mar 2022 05:12:22 -0500 Received: from [2a00:1450:4864:20::42d] (port=42586 helo=mail-wr1-x42d.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nRALl-0004Ii-4S for qemu-devel@nongnu.org; Mon, 07 Mar 2022 05:12:22 -0500 Received: by mail-wr1-x42d.google.com with SMTP id u10so20725758wra.9 for ; Mon, 07 Mar 2022 02:12:19 -0800 (PST) Received: from localhost.localdomain ([185.126.107.38]) by smtp.gmail.com with ESMTPSA id x2-20020adff0c2000000b001f1fa284a32sm1604906wro.115.2022.03.07.02.12.17 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 07 Mar 2022 02:12:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=DqaZ5Ub4osh9S6eeel3VjCBvvslN0dh7T/O90JZjAfc=; b=kFSzdr92zF2OUN0ZRJfIS0rqFvDPEjO2CzyCdxP6KyeOfepuG60RB/xJDDvmuxMjst r6KLU8uPw5ybTr8xYtZsOOHVymXr4LJSe1itImeEukEbhzFYnMOk2Pa9iAPAN00X5R/h qdxJWReUGw9kanbYMEHls5Qb0UApRrpLpPMuRhIsZogC06VcoVX40frmwvKCw1SLpeNf sdT5zp6Us0J4I2HMjlzfEp5keKbT2ArJX+Ftu2om9RlYWWhHtSTBBXjJUIcmDoKnzd0v 1YGzDzIZ/oBWJ1wdxXzgBgoK7JBCCvpZj0qaQO1JyLtuFVNy2ZX2texHzZh5AVGjCEFG D3Uw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=DqaZ5Ub4osh9S6eeel3VjCBvvslN0dh7T/O90JZjAfc=; b=ukCGb3zdyzDM8fU3NLNuPMPGSf4M0gP1fXzvsxnaKVzBkmhxUwUM4zt5WYNDj2KjAi hlWUtbUre4NvCuhWMf0l8JOzX7Cww1Mnfmz3viDxwGozZ3NietjRU5LckG1Gzdt7Je7M fPFFxT0sxBzdO4cw5oaupiOgqa3gcqoGnE4NuiJX+jsyURw/cShbUHYxdcq7vS6Cw+5e KZafBv1dHkSMvsN7VV9f2ijWY8pR7mkm95IOb/ywdtAuG7KMCQvFs31g6ckoFKi/bPfZ +5eaCZ+fqbcIJEKVUoCPtYxdBqf5F6yWeN1p/pyjhEpFRdd3nBBUL1lWE7AQsKBi6Him IXxg== X-Gm-Message-State: AOAM5308zZ+9s4wnihCF6ovcdpB4aijAfTP/kjbp0Fd7QTpvTaeqJZLU Lizei8flKZKBVH3ZVcFuh61EtNJmNtc= X-Google-Smtp-Source: ABdhPJx93mYXBEwF24vXUkQWpaaY61okbPubdNO+QYuVLfT3Cdq7aQo9aij7B31Mbn/fU0ogdQINKw== X-Received: by 2002:adf:c40e:0:b0:1f1:d719:52d2 with SMTP id v14-20020adfc40e000000b001f1d71952d2mr7922389wrf.105.1646647938437; Mon, 07 Mar 2022 02:12:18 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 02/16] target/mips: Remove duplicated MIPSCPU::cp0_count_rate Date: Mon, 7 Mar 2022 11:11:53 +0100 Message-Id: <20220307101207.90369-3-philippe.mathieu.daude@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220307101207.90369-1-philippe.mathieu.daude@gmail.com> References: <20220307101207.90369-1-philippe.mathieu.daude@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::42d (failed) Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::42d; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-x42d.google.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 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, FREEMAIL_FROM=0.001, PDS_HP_HELO_NORDNS=0.659, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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: , Cc: Aleksandar Rikalo , Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1646651696301100001 From: Philippe Mathieu-Daud=C3=A9 Since the previous commit 9ea89876f9d ("target/mips: Fix cycle counter timing calculations"), MIPSCPU::cp0_count_rate is not used anymore. We don't need it since it is already expressed as mips_def_t::CCRes. Remove the duplicate and clean. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Message-Id: <>20211213102340.1847248-1-f4bug@amsat.org> --- target/mips/cpu.c | 10 ---------- target/mips/cpu.h | 9 --------- target/mips/internal.h | 9 +++++++++ 3 files changed, 9 insertions(+), 19 deletions(-) diff --git a/target/mips/cpu.c b/target/mips/cpu.c index 0766e25693..af287177d5 100644 --- a/target/mips/cpu.c +++ b/target/mips/cpu.c @@ -434,13 +434,11 @@ static void mips_cpu_disas_set_info(CPUState *s, disa= ssemble_info *info) * Since commit 6af0bf9c7c3 this model assumes a CPU clocked at 200MHz. */ #define CPU_FREQ_HZ_DEFAULT 200000000 -#define CP0_COUNT_RATE_DEFAULT 2 =20 static void mips_cp0_period_set(MIPSCPU *cpu) { CPUMIPSState *env =3D &cpu->env; =20 - /* env->CCRes isn't initialised this early, use env->cpu_model->CCRes.= */ env->cp0_count_ns =3D clock_ticks_to_ns(MIPS_CPU(cpu)->clock, env->cpu_model->CCRes); assert(env->cp0_count_ns); @@ -515,13 +513,6 @@ static ObjectClass *mips_cpu_class_by_name(const char = *cpu_model) return oc; } =20 -static Property mips_cpu_properties[] =3D { - /* CP0 timer running at half the clock of the CPU */ - DEFINE_PROP_UINT32("cp0-count-rate", MIPSCPU, cp0_count_rate, - CP0_COUNT_RATE_DEFAULT), - DEFINE_PROP_END_OF_LIST() -}; - #ifndef CONFIG_USER_ONLY #include "hw/core/sysemu-cpu-ops.h" =20 @@ -561,7 +552,6 @@ static void mips_cpu_class_init(ObjectClass *c, void *d= ata) device_class_set_parent_realize(dc, mips_cpu_realizefn, &mcc->parent_realize); device_class_set_parent_reset(dc, mips_cpu_reset, &mcc->parent_reset); - device_class_set_props(dc, mips_cpu_properties); =20 cc->class_by_name =3D mips_cpu_class_by_name; cc->has_work =3D mips_cpu_has_work; diff --git a/target/mips/cpu.h b/target/mips/cpu.h index 56b1cbd091..ea66b866c6 100644 --- a/target/mips/cpu.h +++ b/target/mips/cpu.h @@ -1168,7 +1168,6 @@ struct CPUMIPSState { * @env: #CPUMIPSState * @clock: this CPU input clock (may be connected * to an output clock from another device). - * @cp0_count_rate: rate at which the coprocessor 0 counter increments * * A MIPS CPU. */ @@ -1180,14 +1179,6 @@ struct MIPSCPU { Clock *clock; CPUNegativeOffsetState neg; CPUMIPSState env; - /* - * The Count register acts as a timer, incrementing at a constant rate, - * whether or not an instruction is executed, retired, or any forward - * progress is made through the pipeline. The rate at which the counter - * increments is implementation dependent, and is a function of the - * pipeline clock of the processor, not the issue width of the process= or. - */ - unsigned cp0_count_rate; }; =20 =20 diff --git a/target/mips/internal.h b/target/mips/internal.h index daddb05fd4..1526fb880d 100644 --- a/target/mips/internal.h +++ b/target/mips/internal.h @@ -46,6 +46,15 @@ struct mips_def_t { target_ulong CP0_LLAddr_rw_bitmask; int CP0_LLAddr_shift; int32_t SYNCI_Step; + /* + * @CCRes: rate at which the coprocessor 0 counter increments + * + * The Count register acts as a timer, incrementing at a constant rate, + * whether or not an instruction is executed, retired, or any forward + * progress is made through the pipeline. The rate at which the counter + * increments is implementation dependent, and is a function of the + * pipeline clock of the processor, not the issue width of the process= or. + */ int32_t CCRes; int32_t CP0_Status_rw_bitmask; int32_t CP0_TCStatus_rw_bitmask; --=20 2.34.1 From nobody Sat May 18 19:12:37 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=gmail.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1646649787992560.8621495220093; Mon, 7 Mar 2022 02:43:07 -0800 (PST) Received: from localhost ([::1]:43812 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nRApW-0005qE-Nn for importer@patchew.org; Mon, 07 Mar 2022 05:43:06 -0500 Received: from eggs.gnu.org ([209.51.188.92]:37272) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nRALr-00032T-JB for qemu-devel@nongnu.org; Mon, 07 Mar 2022 05:12:27 -0500 Received: from [2a00:1450:4864:20::429] (port=45681 helo=mail-wr1-x429.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nRALo-0004J3-Tx for qemu-devel@nongnu.org; Mon, 07 Mar 2022 05:12:26 -0500 Received: by mail-wr1-x429.google.com with SMTP id p9so22348005wra.12 for ; Mon, 07 Mar 2022 02:12:24 -0800 (PST) Received: from localhost.localdomain ([185.126.107.38]) by smtp.gmail.com with ESMTPSA id e6-20020a5d5006000000b001e75916a7c2sm10852834wrt.84.2022.03.07.02.12.22 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 07 Mar 2022 02:12:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=m5DGgo+E7BroNY51ivtexNtcI1JQgvQ9mCnqaaS1YQ8=; b=Ms5zq5cos4yjabzeyCR8vXS9YSWh+AlAkrqentH/zydV9NXu/aueDL91yEqb8qoZeC XA6ib9Dfr8/RhbExHQ6oHMd1KdS28QfHOhYjtBBoOn78nKT6li10jNMHTaOayDhYGEiy B+LtG/QODNxuaXe3XQsOvblX3evegG8uLhWrGA3O/FGZO7PO7gPpEdv6oHiGcSswawoS wKL3G6/2q52kFgQqgqewt+myY92no6dDl3dJeTXgpDhzrMKixe2wSUKP3zGv7Tq3SSlV aw64ja3T1sordpSFi6S98zszv37dUvqgcfam+sn+mq0ym9tcGvlxmlIVIOQDQ6KkcEti unVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=m5DGgo+E7BroNY51ivtexNtcI1JQgvQ9mCnqaaS1YQ8=; b=J849pmy1jCBnyG17MjJNvihg9rl4Ga+ckclNtXub8wgrBse+nLFjBS2N0YMRXqi/YJ nT30PdI4ylxn4kpCYLGp5vjAmCPyPoETPsQh57cA8kYSB00w1aC1Z5nYE2iygbnWLy5+ KleQKTottg32VlD842elW4c7/DWPJ7TJJQXHp82dMMozx71b3tE7j162JH4i9FJgLWwm we6VsAPW/zfh6MDQaSZMoXHXwVaSlQJOh3IXsfQ1IY9asz44HDqyMBeLAmRprXE+RoBv FCQlECguXpws6IOGSMusYQVOi9E530MeL0IOWP+OYYh8E7go3y0BoUmAF1RFDKzt5xRO t2cg== X-Gm-Message-State: AOAM5303J3AReZfcWMkVbOWa8L2N+qxjPucZG0R89QoJmCwOZhurnl54 qBiqMnDbu1z0E1MCksrUx1RDU+HIgjE= X-Google-Smtp-Source: ABdhPJy2pc/2Jog6rL2FzmKDnO8QHRy9mDyQRB3Qw2KlG2xHSBaAbq0FrQVv1Pe92ejsC0pcgL4aXA== X-Received: by 2002:a5d:64af:0:b0:1f1:e6e5:c7cb with SMTP id m15-20020a5d64af000000b001f1e6e5c7cbmr5064929wrp.642.1646647943222; Mon, 07 Mar 2022 02:12:23 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 03/16] hw/mips/gt64xxx_pci: Fix PCI IRQ levels to be preserved during migration Date: Mon, 7 Mar 2022 11:11:54 +0100 Message-Id: <20220307101207.90369-4-philippe.mathieu.daude@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220307101207.90369-1-philippe.mathieu.daude@gmail.com> References: <20220307101207.90369-1-philippe.mathieu.daude@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::429 (failed) Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::429; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-x429.google.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 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, FREEMAIL_FROM=0.001, PDS_HP_HELO_NORDNS=0.659, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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: , Cc: Peter Maydell , Aleksandar Rikalo , Bernhard Beschow , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1646649789972100001 From: Bernhard Beschow Based on commit e735b55a8c11dd455e31ccd4420e6c9485191d0c: piix_pci: eliminate PIIX3State::pci_irq_levels PIIX3State::pci_irq_levels are redundant which is already tracked by PCIBus layer. So eliminate them. The IRQ levels in the PCIBus layer are already preserved during migration. By reusing them and rather than having a redundant implementation the bug is avoided in the first place. Suggested-by: Peter Maydell Signed-off-by: Bernhard Beschow Reviewed-by: Peter Maydell Message-Id: <20220217101924.15347-2-shentey@gmail.com> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/mips/gt64xxx_pci.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/hw/mips/gt64xxx_pci.c b/hw/mips/gt64xxx_pci.c index c7480bd019..4cbd0911f5 100644 --- a/hw/mips/gt64xxx_pci.c +++ b/hw/mips/gt64xxx_pci.c @@ -1006,14 +1006,11 @@ static int gt64120_pci_map_irq(PCIDevice *pci_dev, = int irq_num) } } =20 -static int pci_irq_levels[4]; - static void gt64120_pci_set_irq(void *opaque, int irq_num, int level) { int i, pic_irq, pic_level; qemu_irq *pic =3D opaque; - - pci_irq_levels[irq_num] =3D level; + PCIBus *bus =3D pci_get_bus(piix4_dev); =20 /* now we change the pic irq level according to the piix irq mappings = */ /* XXX: optimize */ @@ -1023,7 +1020,7 @@ static void gt64120_pci_set_irq(void *opaque, int irq= _num, int level) pic_level =3D 0; for (i =3D 0; i < 4; i++) { if (pic_irq =3D=3D piix4_dev->config[PIIX_PIRQCA + i]) { - pic_level |=3D pci_irq_levels[i]; + pic_level |=3D pci_bus_get_irq_level(bus, i); } } qemu_set_irq(pic[pic_irq], pic_level); --=20 2.34.1 From nobody Sat May 18 19:12:37 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=gmail.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1646649850933103.53296562141884; Mon, 7 Mar 2022 02:44:10 -0800 (PST) Received: from localhost ([::1]:46584 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nRAqX-0007fK-Tt for importer@patchew.org; Mon, 07 Mar 2022 05:44:09 -0500 Received: from eggs.gnu.org ([209.51.188.92]:37314) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nRALv-00039L-Fr for qemu-devel@nongnu.org; Mon, 07 Mar 2022 05:12:32 -0500 Received: from [2a00:1450:4864:20::436] (port=35504 helo=mail-wr1-x436.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nRALt-0004JY-NQ for qemu-devel@nongnu.org; Mon, 07 Mar 2022 05:12:31 -0500 Received: by mail-wr1-x436.google.com with SMTP id b5so22396552wrr.2 for ; Mon, 07 Mar 2022 02:12:29 -0800 (PST) Received: from localhost.localdomain ([185.126.107.38]) by smtp.gmail.com with ESMTPSA id v8-20020a1cf708000000b0034d7b5f2da0sm12628341wmh.33.2022.03.07.02.12.27 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 07 Mar 2022 02:12:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=RwdUgpkZN5CktV/umLjJJE5bTR8gDxBJwZfTcsY4jPo=; b=SaUhlxpUGyem0CGjSzZVcdlYjrl+q+2UPGvjfLncHIZ44tLxHzFeiHUHdMNr2PTsPM iKVdndyxXrms55QzA/tWQRrrnRi4qeVYldyHlP8P7UYHe/QIrloQ2yPCChS/Dh2hKwyK P+rab4O+qzzc4O0psCGaxH3RTYX7DfPzZ3KDSQ9FJU6w9XzfVKBQV1lyBt/2Fxal6nft LaAjoMehayoh7DwKAIsz7ZPg9Apw2CrHJy85zu/qAXhnw935pPNkX8MtEtcjX6ugQWtt /fmYVO2qmGktrcSQxXvrSqnEOunG86Zqslz8KSCSm/DQW78wsx87+zcicptiKY/oNs8p EENg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=RwdUgpkZN5CktV/umLjJJE5bTR8gDxBJwZfTcsY4jPo=; b=XZwq3LDAHW0Q81YKridnql39BMi2dHX12GZvVwwv9/tPJGulXf9+BCkSgJfjO2387L 7fisXUC5rBMCBQ7Pp5Fm1IKKZFDw14vXLgHGEDTf6MfP9rz+ONjA7AGNv9AC9zTnBs5t FGPYW4mGnIYupGSViJS5S+fFxj+PslleRAnPpOGmSauzseK5774p9S14JQxQTaj/Cvvj z9zZcdHA0qGqd0ivieDXlEyhwhqDv5q2JCdy4kls4CXPJRZqtdlTw6i4+05m2moeWok+ V7zSueDajSN++odwK1fcCTWJxLBwmG47jPJlwkPYwZKPV23MDEn+uwpAi2XfdJLQ+xvF rcgw== X-Gm-Message-State: AOAM5338S+HnOPDnK7g7ofKb+YvLmpO5vFDcTEPNHU4e33iYQ7YHrZjw lf80qo63ZC0Dd3P3159rXHmwNrmDVcE= X-Google-Smtp-Source: ABdhPJwMOzaIzLwXjaxDPZPcH1w1FVD743VajhYufQ+dPMhJ2TAwUqp19UGv6+dHmnCR6r1xXJfkqw== X-Received: by 2002:adf:9144:0:b0:1f1:eb7c:be75 with SMTP id j62-20020adf9144000000b001f1eb7cbe75mr4363621wrj.259.1646647948052; Mon, 07 Mar 2022 02:12:28 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 04/16] malta: Move PCI interrupt handling from gt64xxx_pci to piix4 Date: Mon, 7 Mar 2022 11:11:55 +0100 Message-Id: <20220307101207.90369-5-philippe.mathieu.daude@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220307101207.90369-1-philippe.mathieu.daude@gmail.com> References: <20220307101207.90369-1-philippe.mathieu.daude@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::436 (failed) Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::436; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-x436.google.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 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, FREEMAIL_FROM=0.001, PDS_HP_HELO_NORDNS=0.659, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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: , Cc: Aleksandar Rikalo , Bernhard Beschow , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1646649852052100001 From: Bernhard Beschow Handling PCI interrupts in piix4 increases cohesion and reduces differences between piix4 and piix3. Signed-off-by: Bernhard Beschow Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20220217101924.15347-3-shentey@gmail.com> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/isa/piix4.c | 55 ++++++++++++++++++++++++++++++++++++++ hw/mips/gt64xxx_pci.c | 60 ++++-------------------------------------- hw/mips/malta.c | 6 +---- include/hw/mips/mips.h | 2 +- 4 files changed, 62 insertions(+), 61 deletions(-) diff --git a/hw/isa/piix4.c b/hw/isa/piix4.c index 0fe7b69bc4..196b56e69c 100644 --- a/hw/isa/piix4.c +++ b/hw/isa/piix4.c @@ -45,6 +45,7 @@ struct PIIX4State { PCIDevice dev; qemu_irq cpu_intr; qemu_irq *isa; + qemu_irq i8259[ISA_NUM_IRQS]; =20 RTCState rtc; /* Reset Control Register */ @@ -54,6 +55,27 @@ struct PIIX4State { =20 OBJECT_DECLARE_SIMPLE_TYPE(PIIX4State, PIIX4_PCI_DEVICE) =20 +static void piix4_set_irq(void *opaque, int irq_num, int level) +{ + int i, pic_irq, pic_level; + qemu_irq *pic =3D opaque; + PCIBus *bus =3D pci_get_bus(piix4_dev); + + /* now we change the pic irq level according to the piix irq mappings = */ + /* XXX: optimize */ + pic_irq =3D piix4_dev->config[PIIX_PIRQCA + irq_num]; + if (pic_irq < 16) { + /* The pic level is the logical OR of all the PCI irqs mapped to i= t. */ + pic_level =3D 0; + for (i =3D 0; i < 4; i++) { + if (pic_irq =3D=3D piix4_dev->config[PIIX_PIRQCA + i]) { + pic_level |=3D pci_bus_get_irq_level(bus, i); + } + } + qemu_set_irq(pic[pic_irq], pic_level); + } +} + static void piix4_isa_reset(DeviceState *dev) { PIIX4State *d =3D PIIX4_PCI_DEVICE(dev); @@ -248,8 +270,34 @@ static void piix4_register_types(void) =20 type_init(piix4_register_types) =20 +static int pci_slot_get_pirq(PCIDevice *pci_dev, int irq_num) +{ + int slot; + + slot =3D PCI_SLOT(pci_dev->devfn); + + switch (slot) { + /* PIIX4 USB */ + case 10: + return 3; + /* AMD 79C973 Ethernet */ + case 11: + return 1; + /* Crystal 4281 Sound */ + case 12: + return 2; + /* PCI slot 1 to 4 */ + case 18 ... 21: + return ((slot - 18) + irq_num) & 0x03; + /* Unknown device, don't do any translation */ + default: + return irq_num; + } +} + DeviceState *piix4_create(PCIBus *pci_bus, ISABus **isa_bus, I2CBus **smbu= s) { + PIIX4State *s; PCIDevice *pci; DeviceState *dev; int devfn =3D PCI_DEVFN(10, 0); @@ -257,6 +305,7 @@ DeviceState *piix4_create(PCIBus *pci_bus, ISABus **isa= _bus, I2CBus **smbus) pci =3D pci_create_simple_multifunction(pci_bus, devfn, true, TYPE_PIIX4_PCI_DEVICE); dev =3D DEVICE(pci); + s =3D PIIX4_PCI_DEVICE(pci); if (isa_bus) { *isa_bus =3D ISA_BUS(qdev_get_child_bus(dev, "isa.0")); } @@ -271,5 +320,11 @@ DeviceState *piix4_create(PCIBus *pci_bus, ISABus **is= a_bus, I2CBus **smbus) NULL, 0, NULL); } =20 + pci_bus_irqs(pci_bus, piix4_set_irq, pci_slot_get_pirq, s->i8259, 4); + + for (int i =3D 0; i < ISA_NUM_IRQS; i++) { + s->i8259[i] =3D qdev_get_gpio_in_named(dev, "isa", i); + } + return dev; } diff --git a/hw/mips/gt64xxx_pci.c b/hw/mips/gt64xxx_pci.c index 4cbd0911f5..eb205d6d70 100644 --- a/hw/mips/gt64xxx_pci.c +++ b/hw/mips/gt64xxx_pci.c @@ -29,7 +29,6 @@ #include "hw/mips/mips.h" #include "hw/pci/pci.h" #include "hw/pci/pci_host.h" -#include "hw/southbridge/piix.h" #include "migration/vmstate.h" #include "hw/intc/i8259.h" #include "hw/irq.h" @@ -981,53 +980,6 @@ static const MemoryRegionOps isd_mem_ops =3D { }, }; =20 -static int gt64120_pci_map_irq(PCIDevice *pci_dev, int irq_num) -{ - int slot; - - slot =3D PCI_SLOT(pci_dev->devfn); - - switch (slot) { - /* PIIX4 USB */ - case 10: - return 3; - /* AMD 79C973 Ethernet */ - case 11: - return 1; - /* Crystal 4281 Sound */ - case 12: - return 2; - /* PCI slot 1 to 4 */ - case 18 ... 21: - return ((slot - 18) + irq_num) & 0x03; - /* Unknown device, don't do any translation */ - default: - return irq_num; - } -} - -static void gt64120_pci_set_irq(void *opaque, int irq_num, int level) -{ - int i, pic_irq, pic_level; - qemu_irq *pic =3D opaque; - PCIBus *bus =3D pci_get_bus(piix4_dev); - - /* now we change the pic irq level according to the piix irq mappings = */ - /* XXX: optimize */ - pic_irq =3D piix4_dev->config[PIIX_PIRQCA + irq_num]; - if (pic_irq < 16) { - /* The pic level is the logical OR of all the PCI irqs mapped to i= t. */ - pic_level =3D 0; - for (i =3D 0; i < 4; i++) { - if (pic_irq =3D=3D piix4_dev->config[PIIX_PIRQCA + i]) { - pic_level |=3D pci_bus_get_irq_level(bus, i); - } - } - qemu_set_irq(pic[pic_irq], pic_level); - } -} - - static void gt64120_reset(DeviceState *dev) { GT64120State *s =3D GT64120_PCI_HOST_BRIDGE(dev); @@ -1204,7 +1156,7 @@ static void gt64120_realize(DeviceState *dev, Error *= *errp) "gt64120-isd", 0x1000); } =20 -PCIBus *gt64120_register(qemu_irq *pic) +PCIBus *gt64120_register(void) { GT64120State *d; PCIHostState *phb; @@ -1215,12 +1167,10 @@ PCIBus *gt64120_register(qemu_irq *pic) phb =3D PCI_HOST_BRIDGE(dev); memory_region_init(&d->pci0_mem, OBJECT(dev), "pci0-mem", 4 * GiB); address_space_init(&d->pci0_mem_as, &d->pci0_mem, "pci0-mem"); - phb->bus =3D pci_register_root_bus(dev, "pci", - gt64120_pci_set_irq, gt64120_pci_map_= irq, - pic, - &d->pci0_mem, - get_system_io(), - PCI_DEVFN(18, 0), 4, TYPE_PCI_BUS); + phb->bus =3D pci_root_bus_new(dev, "pci", + &d->pci0_mem, + get_system_io(), + PCI_DEVFN(18, 0), TYPE_PCI_BUS); sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal); =20 pci_create_simple(phb->bus, PCI_DEVFN(0, 0), "gt64120_pci"); diff --git a/hw/mips/malta.c b/hw/mips/malta.c index b770b8d367..13254dbc89 100644 --- a/hw/mips/malta.c +++ b/hw/mips/malta.c @@ -97,7 +97,6 @@ struct MaltaState { =20 Clock *cpuclk; MIPSCPSState cps; - qemu_irq i8259[ISA_NUM_IRQS]; }; =20 static struct _loaderparams { @@ -1391,7 +1390,7 @@ void mips_malta_init(MachineState *machine) stl_p(memory_region_get_ram_ptr(bios_copy) + 0x10, 0x00000420); =20 /* Northbridge */ - pci_bus =3D gt64120_register(s->i8259); + pci_bus =3D gt64120_register(); /* * The whole address space decoded by the GT-64120A doesn't generate * exception when accessing invalid memory. Create an empty slot to @@ -1404,9 +1403,6 @@ void mips_malta_init(MachineState *machine) =20 /* Interrupt controller */ qdev_connect_gpio_out_named(dev, "intr", 0, i8259_irq); - for (int i =3D 0; i < ISA_NUM_IRQS; i++) { - s->i8259[i] =3D qdev_get_gpio_in_named(dev, "isa", i); - } =20 /* generate SPD EEPROM data */ generate_eeprom_spd(&smbus_eeprom_buf[0 * 256], ram_size); diff --git a/include/hw/mips/mips.h b/include/hw/mips/mips.h index 6c9c8805f3..ff88942e63 100644 --- a/include/hw/mips/mips.h +++ b/include/hw/mips/mips.h @@ -10,7 +10,7 @@ #include "exec/memory.h" =20 /* gt64xxx.c */ -PCIBus *gt64120_register(qemu_irq *pic); +PCIBus *gt64120_register(void); =20 /* bonito.c */ PCIBus *bonito_init(qemu_irq *pic); --=20 2.34.1 From nobody Sat May 18 19:12:37 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=gmail.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1646651972876548.7578551675264; Mon, 7 Mar 2022 03:19:32 -0800 (PST) Received: from localhost ([::1]:52984 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nRBOl-0001lb-Dn for importer@patchew.org; Mon, 07 Mar 2022 06:19:31 -0500 Received: from eggs.gnu.org ([209.51.188.92]:37332) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nRALz-0003G7-Ri for qemu-devel@nongnu.org; Mon, 07 Mar 2022 05:12:36 -0500 Received: from [2a00:1450:4864:20::42b] (port=44582 helo=mail-wr1-x42b.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nRALy-0004KG-Ft for qemu-devel@nongnu.org; Mon, 07 Mar 2022 05:12:35 -0500 Received: by mail-wr1-x42b.google.com with SMTP id u1so22333320wrg.11 for ; Mon, 07 Mar 2022 02:12:34 -0800 (PST) Received: from localhost.localdomain ([185.126.107.38]) by smtp.gmail.com with ESMTPSA id i5-20020a1c3b05000000b00382871cf734sm18454092wma.25.2022.03.07.02.12.32 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 07 Mar 2022 02:12:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=KDE9Vz75Ls7oUn4Wdl9zyEDREjfA3a6GoIfStHrEoHA=; b=BCzxjWnoRyYZCmlbcLnt2V7hyCrwlPDicDdR2mPrda/zUq+6/js9UgQGLJ5CzfsqOF EdB3uzbZMPqRpg70Kuws0MJKotV5i9FbYzZFIobkbXNcwcorGhGT5GfcTF8A5Z0epnEu WeVXt+F7sC0fIZyXdICncZarGv3EC9SzkHy67t3FQ+BAfb/A7vOj6ZlOdk50WIjFXBim w9DJgREc4+Ov6ZCuel/LoBBoNWAz2rnPRZfNBVVjdlFhQr7DoTiLlLTM7TOmDs4kmxzL IbHB4sdgEM/AZJu40jNeBhc/2a+9jjKZtmi6IZdlUXtHnZgv0YFSHXDFnTR7+OqveLot DqzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=KDE9Vz75Ls7oUn4Wdl9zyEDREjfA3a6GoIfStHrEoHA=; b=jNWbVRsPnps5rQSTOk264syCu3uvQ8MBCm+GOdy0zuE6Tnp6dlzl7fIdT9PGWt/Am1 wEcqO60VafM6KTBFKrjofyo6zCCJDF2ErgStVLEadA9kIzt8ouwmAAnCHc7+0alghHQl zXd4DGQibTwY/KT+9EgnOq9XJa0uvFRap81ECh3YWxk2OtLBqkocZr+tgzruarr+SmaG XH9Qw1a7N7qnJIkYf+GD+oJKFtFJlg4sI5+pjeykx0AA4/JkSkznD3NhO+cEVGLdB+dp 5dwl9W3v3fpouJ8yuezIvavoCI5Wu/p8XtYVYVk8pmGyEx7Da9kvJDJakg2vqwe0LcSj zfkg== X-Gm-Message-State: AOAM533GrwicP72Yi8NNnqP+VXtUZYpQ/Pydcb7Hy5jIM2isb4pO3KDf r/rtL1w6tM8AIqho4uqQlEFnQJlP/RY= X-Google-Smtp-Source: ABdhPJzJr6QkT1v6pZdzGOnHxQBWH/f9DnK3fWGCHRksg0qJ2sUPlUhKVm8gAlmSu84Oxv/TmKVGKw== X-Received: by 2002:a05:6000:18c3:b0:1e5:82d3:e4e2 with SMTP id w3-20020a05600018c300b001e582d3e4e2mr7558451wrq.575.1646647953027; Mon, 07 Mar 2022 02:12:33 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 05/16] hw/isa/piix4: Resolve redundant i8259[] attribute Date: Mon, 7 Mar 2022 11:11:56 +0100 Message-Id: <20220307101207.90369-6-philippe.mathieu.daude@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220307101207.90369-1-philippe.mathieu.daude@gmail.com> References: <20220307101207.90369-1-philippe.mathieu.daude@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::42b (failed) Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::42b; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-x42b.google.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 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, FREEMAIL_FROM=0.001, PDS_HP_HELO_NORDNS=0.659, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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: , Cc: Aleksandar Rikalo , Bernhard Beschow , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , "Michael S . Tsirkin" Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1646651973980100003 From: Bernhard Beschow This is a follow-up on patch "malta: Move PCI interrupt handling from gt64xxx_pci to piix4" where i8259[] was moved from MaltaState to PIIX4State to make the code movement more obvious. However, i8259[] seems redundant to *isa, so remove it. Signed-off-by: Bernhard Beschow Reviewed-by: Philippe Mathieu-Daud=C3=A9 Acked-by: Michael S. Tsirkin Message-Id: <20220217101924.15347-4-shentey@gmail.com> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/isa/piix4.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/hw/isa/piix4.c b/hw/isa/piix4.c index 196b56e69c..179968b18e 100644 --- a/hw/isa/piix4.c +++ b/hw/isa/piix4.c @@ -45,7 +45,6 @@ struct PIIX4State { PCIDevice dev; qemu_irq cpu_intr; qemu_irq *isa; - qemu_irq i8259[ISA_NUM_IRQS]; =20 RTCState rtc; /* Reset Control Register */ @@ -320,11 +319,7 @@ DeviceState *piix4_create(PCIBus *pci_bus, ISABus **is= a_bus, I2CBus **smbus) NULL, 0, NULL); } =20 - pci_bus_irqs(pci_bus, piix4_set_irq, pci_slot_get_pirq, s->i8259, 4); - - for (int i =3D 0; i < ISA_NUM_IRQS; i++) { - s->i8259[i] =3D qdev_get_gpio_in_named(dev, "isa", i); - } + pci_bus_irqs(pci_bus, piix4_set_irq, pci_slot_get_pirq, s->isa, 4); =20 return dev; } --=20 2.34.1 From nobody Sat May 18 19:12:37 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=gmail.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1646650962017281.14623315673145; Mon, 7 Mar 2022 03:02:42 -0800 (PST) Received: from localhost ([::1]:37736 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nRB8T-0005w6-HV for importer@patchew.org; Mon, 07 Mar 2022 06:02:41 -0500 Received: from eggs.gnu.org ([209.51.188.92]:37376) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nRAM5-0003bE-9N for qemu-devel@nongnu.org; Mon, 07 Mar 2022 05:12:41 -0500 Received: from [2a00:1450:4864:20::432] (port=35502 helo=mail-wr1-x432.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nRAM3-0004Kr-FK for qemu-devel@nongnu.org; Mon, 07 Mar 2022 05:12:40 -0500 Received: by mail-wr1-x432.google.com with SMTP id b5so22397265wrr.2 for ; Mon, 07 Mar 2022 02:12:39 -0800 (PST) Received: from localhost.localdomain ([185.126.107.38]) by smtp.gmail.com with ESMTPSA id m13-20020a05600c4f4d00b00386744cb31bsm14868336wmq.35.2022.03.07.02.12.37 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 07 Mar 2022 02:12:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=5vQfnGNW4YGHzEz5RbgJRcPJf9BCYtMfRnHfC+25hVw=; b=F8oXBnjjnpCfG+n5+zCjeaAxHWkZtvovnzyual5KmpHx66kQ3nlexPmDnGJxcZcDxw th9R/sUo2uJnBYJDpDkdeJT/qbXmqL8CIdiK/de5fm9LTipJXFGZ7uhcNVG603g36Cmb zn0bJn+NI7vWYlb/I1KIkJcx3hPtdQn6VyRmxb03Cqu1qJuU0ijbN2tMZXkbpxgcQ2RJ 8N0ocewQnEWyyt/vcYWuer9EeIQCn80KO1y989FOtcImEbrFoDTJAjod+TVsN2ujE+l9 V9TXoqPmrImS1a5+pugEIRDF9V9uNVcG6qdsor+tC7y/xyXidg4kU9P5RwfHZNy6a7lb tWjQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=5vQfnGNW4YGHzEz5RbgJRcPJf9BCYtMfRnHfC+25hVw=; b=D71fbPHCYdxhtzz5E8AwjPaweORliMkbZpNMKUZMg8z5wrrnvaBmaOEpqnldf+5f2S 6PZo7oIzeIMs9sSKEQIDDV/C5uu7dH1h8txR43ndaMJhtBQ5tz6uTcyFuwDTCyFzUr+q FYlPYwHHCnrIUZt5hUZa+B4FjqKNK5MevsOBmr+EL8hKa/Kw8pUOyn8rDzn+ZRiaWocN Th6ngiIbCMAn8+wOB35oaq677k28MyamYY1BSVxTgH8PUgIVKkFdZJzngOc2eCinPnsK 6K/83CYh0fSCaZvDXwJ4vruxKnKhDltM/Q/5MMpCRb8Z+G7O4kjF4H3ZgHMmKHm+ua+K UPpQ== X-Gm-Message-State: AOAM530lsZnfa/4uDky2IdRpumYC4F/BmMjhHAyf3zu6BnX3aySv1ts0 9u3syeW2VkxaadlCGmizs8O0hnoZXtY= X-Google-Smtp-Source: ABdhPJyBgD0ECA1v2J5ho8/9N4m9oY9Mctm3y6xLW4mb3lKRy6ZpVb9mP3CbuCgTMJrpP/U1zp7Uzw== X-Received: by 2002:adf:e751:0:b0:1f0:2139:2489 with SMTP id c17-20020adfe751000000b001f021392489mr7504817wrn.319.1646647958005; Mon, 07 Mar 2022 02:12:38 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 06/16] hw/isa/piix4: Pass PIIX4State as opaque parameter for piix4_set_irq() Date: Mon, 7 Mar 2022 11:11:57 +0100 Message-Id: <20220307101207.90369-7-philippe.mathieu.daude@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220307101207.90369-1-philippe.mathieu.daude@gmail.com> References: <20220307101207.90369-1-philippe.mathieu.daude@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::432 (failed) Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::432; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-x432.google.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 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, FREEMAIL_FROM=0.001, PDS_HP_HELO_NORDNS=0.659, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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: , Cc: Peter Maydell , Aleksandar Rikalo , "Michael S . Tsirkin" , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Bernhard Beschow Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1646650963860100001 From: Bernhard Beschow Passing PIIX4State rather than just the qemu_irq allows for resolving the global piix4_dev variable. Signed-off-by: Bernhard Beschow Reviewed-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daud=C3=A9 Acked-by: Michael S. Tsirkin Message-Id: <20220217101924.15347-5-shentey@gmail.com> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/isa/piix4.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/isa/piix4.c b/hw/isa/piix4.c index 179968b18e..caa2002e2c 100644 --- a/hw/isa/piix4.c +++ b/hw/isa/piix4.c @@ -57,7 +57,7 @@ OBJECT_DECLARE_SIMPLE_TYPE(PIIX4State, PIIX4_PCI_DEVICE) static void piix4_set_irq(void *opaque, int irq_num, int level) { int i, pic_irq, pic_level; - qemu_irq *pic =3D opaque; + PIIX4State *s =3D opaque; PCIBus *bus =3D pci_get_bus(piix4_dev); =20 /* now we change the pic irq level according to the piix irq mappings = */ @@ -71,7 +71,7 @@ static void piix4_set_irq(void *opaque, int irq_num, int = level) pic_level |=3D pci_bus_get_irq_level(bus, i); } } - qemu_set_irq(pic[pic_irq], pic_level); + qemu_set_irq(s->isa[pic_irq], pic_level); } } =20 @@ -319,7 +319,7 @@ DeviceState *piix4_create(PCIBus *pci_bus, ISABus **isa= _bus, I2CBus **smbus) NULL, 0, NULL); } =20 - pci_bus_irqs(pci_bus, piix4_set_irq, pci_slot_get_pirq, s->isa, 4); + pci_bus_irqs(pci_bus, piix4_set_irq, pci_slot_get_pirq, s, 4); =20 return dev; } --=20 2.34.1 From nobody Sat May 18 19:12:37 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=gmail.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1646649981023621.2693783293628; Mon, 7 Mar 2022 02:46:21 -0800 (PST) Received: from localhost ([::1]:52414 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nRAsc-00037P-0b for importer@patchew.org; Mon, 07 Mar 2022 05:46:18 -0500 Received: from eggs.gnu.org ([209.51.188.92]:37392) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nRAM9-0003t1-TN for qemu-devel@nongnu.org; Mon, 07 Mar 2022 05:12:45 -0500 Received: from [2a00:1450:4864:20::333] (port=56111 helo=mail-wm1-x333.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nRAM8-0004LI-Bi for qemu-devel@nongnu.org; Mon, 07 Mar 2022 05:12:45 -0500 Received: by mail-wm1-x333.google.com with SMTP id i66so8828411wma.5 for ; Mon, 07 Mar 2022 02:12:43 -0800 (PST) Received: from localhost.localdomain ([185.126.107.38]) by smtp.gmail.com with ESMTPSA id p12-20020a056000018c00b001f079518150sm7678574wrx.93.2022.03.07.02.12.41 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 07 Mar 2022 02:12:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=AAr+OMvlkoYQ7CFBaWp4gsKrO37KyhZbmhJyWlgqtm4=; b=VACXgPUiSL6mBLKt4ElIPd3BwsepJA0LW/3xV0nsMutjXix6YVeSr+T3SBdqyBA0KB hobl2DBrqHDPrhGRa0wofEVzc1rL6IIm562wWLfrqD92/GA+Fym+giFuekHxTIUzr2xj 8EAtJNPRKEKe1dtNKzwBqIEWghe4TItI3sJH6XkQbNXNv4gD6RdtKnbuzgYP63qu/6DI 9yy5rmTfYM63E79EmtsoUUcM482UklvI6smzEC7AzlsMgBQSfRARMS8F8C+JfEQI3I6c z+GhVKt4c5tu0ZIwoSnufkLoI/BxJFF6su321g8EkmI7Cy0QCz85fGuN7Ykl76dNoLVT Dfnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=AAr+OMvlkoYQ7CFBaWp4gsKrO37KyhZbmhJyWlgqtm4=; b=L23LkW/FZrRiEFgr++zPJMg1jr85GK5y0iyZOhaA0XDI4LJ4ayZh7V2IHTjkQ46KqR vekAEFCuuk06n7faidhMgTIFFMT8gEuptO8Q+oXBUpYFuNQCsYNM6NQcEH5D6ebrxBwX O6KFWSMaNImxLFpgoUxotSPKLcZTXG0QverJZBTdGY2/HN8SKx1hTTMn3T9cPBk+S71o Bw7WOsEybX9n3w8zZTBAtMHDPkjKcJ3+OdOSrvGTv0wi714uiCkA35k9OFctGOC+6jNV h1KsghvFqK8HxuazRVUf/fmjS9c8L7f0uIv/VA0JFfBhq/FqUWCVDpdmLeut6s2aEZwz L/SQ== X-Gm-Message-State: AOAM531p0NqhM4oqIc9ARHqnESJemq2jmSOpSeOE62J38zDVh9BCaOi3 diJcJZ396tj0tL8haalD6a9NaAPeWBc= X-Google-Smtp-Source: ABdhPJzp0rxRKOYql+tJ2dYJiir4Zwt969MV2r3HeVNHQH+rnoDd+dCwzNU+TwSVNUSnkZ3blCOj4Q== X-Received: by 2002:a05:600c:2056:b0:389:736a:5631 with SMTP id p22-20020a05600c205600b00389736a5631mr14290311wmg.120.1646647962804; Mon, 07 Mar 2022 02:12:42 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 07/16] hw/isa/piix4: Resolve global instance variable Date: Mon, 7 Mar 2022 11:11:58 +0100 Message-Id: <20220307101207.90369-8-philippe.mathieu.daude@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220307101207.90369-1-philippe.mathieu.daude@gmail.com> References: <20220307101207.90369-1-philippe.mathieu.daude@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::333 (failed) Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::333; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wm1-x333.google.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 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, FREEMAIL_FROM=0.001, PDS_HP_HELO_NORDNS=0.659, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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: , Cc: Aleksandar Rikalo , Bernhard Beschow , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , "Michael S . Tsirkin" Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1646649983339100001 From: Bernhard Beschow Now that piix4_set_irq's opaque parameter references own PIIX4State, piix4_dev becomes redundant. Signed-off-by: Bernhard Beschow Reviewed-by: Philippe Mathieu-Daud=C3=A9 Acked-by: Michael S. Tsirkin Message-Id: <20220217101924.15347-6-shentey@gmail.com> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/isa/piix4.c | 10 +++------- include/hw/southbridge/piix.h | 2 -- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/hw/isa/piix4.c b/hw/isa/piix4.c index caa2002e2c..2e9b5ccada 100644 --- a/hw/isa/piix4.c +++ b/hw/isa/piix4.c @@ -39,8 +39,6 @@ #include "sysemu/runstate.h" #include "qom/object.h" =20 -PCIDevice *piix4_dev; - struct PIIX4State { PCIDevice dev; qemu_irq cpu_intr; @@ -58,16 +56,16 @@ static void piix4_set_irq(void *opaque, int irq_num, in= t level) { int i, pic_irq, pic_level; PIIX4State *s =3D opaque; - PCIBus *bus =3D pci_get_bus(piix4_dev); + PCIBus *bus =3D pci_get_bus(&s->dev); =20 /* now we change the pic irq level according to the piix irq mappings = */ /* XXX: optimize */ - pic_irq =3D piix4_dev->config[PIIX_PIRQCA + irq_num]; + pic_irq =3D s->dev.config[PIIX_PIRQCA + irq_num]; if (pic_irq < 16) { /* The pic level is the logical OR of all the PCI irqs mapped to i= t. */ pic_level =3D 0; for (i =3D 0; i < 4; i++) { - if (pic_irq =3D=3D piix4_dev->config[PIIX_PIRQCA + i]) { + if (pic_irq =3D=3D s->dev.config[PIIX_PIRQCA + i]) { pic_level |=3D pci_bus_get_irq_level(bus, i); } } @@ -219,8 +217,6 @@ static void piix4_realize(PCIDevice *dev, Error **errp) return; } isa_init_irq(ISA_DEVICE(&s->rtc), &s->rtc.irq, RTC_ISA_IRQ); - - piix4_dev =3D dev; } =20 static void piix4_init(Object *obj) diff --git a/include/hw/southbridge/piix.h b/include/hw/southbridge/piix.h index 6387f2b612..f63f83e5c6 100644 --- a/include/hw/southbridge/piix.h +++ b/include/hw/southbridge/piix.h @@ -70,8 +70,6 @@ typedef struct PIIXState PIIX3State; DECLARE_INSTANCE_CHECKER(PIIX3State, PIIX3_PCI_DEVICE, TYPE_PIIX3_PCI_DEVICE) =20 -extern PCIDevice *piix4_dev; - PIIX3State *piix3_create(PCIBus *pci_bus, ISABus **isa_bus); =20 DeviceState *piix4_create(PCIBus *pci_bus, ISABus **isa_bus, I2CBus **smbu= s); --=20 2.34.1 From nobody Sat May 18 19:12:37 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=gmail.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1646650063732736.5061616156; Mon, 7 Mar 2022 02:47:43 -0800 (PST) Received: from localhost ([::1]:55126 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nRAty-0004zo-L0 for importer@patchew.org; Mon, 07 Mar 2022 05:47:42 -0500 Received: from eggs.gnu.org ([209.51.188.92]:37434) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nRAME-0004AF-OP for qemu-devel@nongnu.org; Mon, 07 Mar 2022 05:12:50 -0500 Received: from [2a00:1450:4864:20::335] (port=51794 helo=mail-wm1-x335.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nRAMD-0004Lj-9P for qemu-devel@nongnu.org; Mon, 07 Mar 2022 05:12:50 -0500 Received: by mail-wm1-x335.google.com with SMTP id q20so6508046wmq.1 for ; Mon, 07 Mar 2022 02:12:48 -0800 (PST) Received: from localhost.localdomain ([185.126.107.38]) by smtp.gmail.com with ESMTPSA id p15-20020a05600c1d8f00b003899d50f01csm5022185wms.6.2022.03.07.02.12.46 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 07 Mar 2022 02:12:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=BGq1NvCPKkPo6oZnX28wU6tvhaY2hUXR54Kp2JjpCz4=; b=KzpWKRDPFVk40D/sFzK8l19ejmaDhHs5OcYvbQK0R8CW5EG441rAJIB124ZIToh6n1 QWvOvUJB97gYcd9sOoPJbkwDCwSEnWPrmYIds/0MF/08V9w6CmJgLBzR7QMnJt0/9Zn8 NS1k7vGw5Yznpnz5LcIJMnOB6kT8JZHx6ivAbBMAKib+siUW9AOdJqxC12D/l2n7/HmQ ExZ5dn+ibMS6GWGKdf8JiFYp8vaMX016h4sMF3y06c24+mAJ2rFJUz169mcvS3V+1QVt crgIuzBk0j2Xfok+zlsjIpV+lKMAXEF3yhGVA7AUab3UUpuvuwumOc9ePaqEMjHVJ2XS tSrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=BGq1NvCPKkPo6oZnX28wU6tvhaY2hUXR54Kp2JjpCz4=; b=Mn9OFqIIi0MQSPV8xCdwOccQJ0A5DJ6jXbPA56mO00mb1EeOy1NhPWFGCAd5Xlnhz5 d+LKq8mrpe+Ci1Xqc1rK5ph7P+nQ9y4vrUW/TwVISbNnw2ua15NX3PER+VOz3Tsevzow maN8E54BPEyyAhtykSHj5cBJ4XbaR0feNtt3gRNfxKIV2LLW2AEb5iD93FWj8zJDvt0Q g12uINuqdif2TSqVGLt7MsRUvMidW3ruljdbvfMkgoKD5UK+cYJSb5R3CgfiOlrw09xD MyeAITBwoqzXzW849wBS7MoCeJjGm71Vjbn+r0pFJb5tMkm1wEF8RswX8E0Kjw0Bl9hc ppzQ== X-Gm-Message-State: AOAM532ffPd40lioUbzVIHvZQXIdXUqP9qNRNdwqUTI3tVtxlm94CiYX qT9XetoSYmH/hkYPc25jx4qEINeGOHs= X-Google-Smtp-Source: ABdhPJzBiNLyw+tjvj7zRyNSbxh3m24uUUkGAGgYZYTHeQsJ73GVQkpMg3LkAjhaxADjBTiA6yJ7eA== X-Received: by 2002:a7b:c30e:0:b0:37f:a63d:3d1f with SMTP id k14-20020a7bc30e000000b0037fa63d3d1fmr8380488wmj.178.1646647967635; Mon, 07 Mar 2022 02:12:47 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 08/16] hw/isa/piix4: Replace some magic IRQ constants Date: Mon, 7 Mar 2022 11:11:59 +0100 Message-Id: <20220307101207.90369-9-philippe.mathieu.daude@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220307101207.90369-1-philippe.mathieu.daude@gmail.com> References: <20220307101207.90369-1-philippe.mathieu.daude@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::335 (failed) Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wm1-x335.google.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 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, FREEMAIL_FROM=0.001, PDS_HP_HELO_NORDNS=0.659, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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: , Cc: Aleksandar Rikalo , Bernhard Beschow , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , "Michael S . Tsirkin" Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1646650065691100001 From: Bernhard Beschow This is a follow-up on patch "malta: Move PCI interrupt handling from gt64xxx_pci to piix4". gt64xxx_pci used magic constants, and probably didn't want to use piix4-specific constants. Now that the interrupt handing resides in piix4, its constants can be used. Signed-off-by: Bernhard Beschow Reviewed-by: Philippe Mathieu-Daud=C3=A9 Acked-by: Michael S. Tsirkin Message-Id: <20220217101924.15347-7-shentey@gmail.com> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/isa/piix4.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/isa/piix4.c b/hw/isa/piix4.c index 2e9b5ccada..f876c71750 100644 --- a/hw/isa/piix4.c +++ b/hw/isa/piix4.c @@ -61,10 +61,10 @@ static void piix4_set_irq(void *opaque, int irq_num, in= t level) /* now we change the pic irq level according to the piix irq mappings = */ /* XXX: optimize */ pic_irq =3D s->dev.config[PIIX_PIRQCA + irq_num]; - if (pic_irq < 16) { + if (pic_irq < ISA_NUM_IRQS) { /* The pic level is the logical OR of all the PCI irqs mapped to i= t. */ pic_level =3D 0; - for (i =3D 0; i < 4; i++) { + for (i =3D 0; i < PIIX_NUM_PIRQS; i++) { if (pic_irq =3D=3D s->dev.config[PIIX_PIRQCA + i]) { pic_level |=3D pci_bus_get_irq_level(bus, i); } @@ -315,7 +315,7 @@ DeviceState *piix4_create(PCIBus *pci_bus, ISABus **isa= _bus, I2CBus **smbus) NULL, 0, NULL); } =20 - pci_bus_irqs(pci_bus, piix4_set_irq, pci_slot_get_pirq, s, 4); + pci_bus_irqs(pci_bus, piix4_set_irq, pci_slot_get_pirq, s, PIIX_NUM_PI= RQS); =20 return dev; } --=20 2.34.1 From nobody Sat May 18 19:12:37 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=gmail.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1646652387949332.6593565349697; Mon, 7 Mar 2022 03:26:27 -0800 (PST) Received: from localhost ([::1]:41960 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nRBVS-0004mP-PO for importer@patchew.org; Mon, 07 Mar 2022 06:26:26 -0500 Received: from eggs.gnu.org ([209.51.188.92]:37450) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nRAMK-0004DA-8y for qemu-devel@nongnu.org; Mon, 07 Mar 2022 05:12:58 -0500 Received: from [2a00:1450:4864:20::432] (port=46669 helo=mail-wr1-x432.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nRAMH-0004M1-SL for qemu-devel@nongnu.org; Mon, 07 Mar 2022 05:12:55 -0500 Received: by mail-wr1-x432.google.com with SMTP id x15so22336347wru.13 for ; Mon, 07 Mar 2022 02:12:53 -0800 (PST) Received: from localhost.localdomain ([185.126.107.38]) by smtp.gmail.com with ESMTPSA id o11-20020adf9d4b000000b001f0077ea337sm11338767wre.22.2022.03.07.02.12.51 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 07 Mar 2022 02:12:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=zKnK2u0z+UoUHu8ipnwT4tgVhDExVvLYNczURL/a2ws=; b=N1iLoH2LvRvPDmbLHXhycA1nAGHQrLTCPXYStv2lcMQOPYmtDcjVcnb4zbWcdW76x+ UFzLYwpZdJgI0W+5gfVkowh6Dm2QEn0Zq9f7O3zrqc6v9QnaP/Ed2Qkgu8pnYGI3OqpW CQQY43W33NiSdSgbuc0p0RAJaUZ0c2pzUgVe/NivJa5bBvWfcxkQaVRC9D333hwHVzFc EE1jVyMc6Mi4+ef8rnZTNCoDvdM54Z/SOtESvVX1v5XPQT7YttqyzFHnlaNba3m8LGuM TMvr/wXOlnUua7NiuDWQhoprAoU3q+6V2ZvWnlNH9VVaI/6UHUZQFG9soYdi8QzaOEAt 9p0A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=zKnK2u0z+UoUHu8ipnwT4tgVhDExVvLYNczURL/a2ws=; b=tamWf9THXtgT2tHKnUfRpVd1hh83gr2DO7BFjMCYQF07ZtVZ9FvNeDdgKd4rKigCCE QhU19Qdxm+qBokFYn4CZJchdAPtPot2mxINUh11+KuMIAVgn0P+QnqlDtE5Na9R394Wq AhZ+Amfakolxv7ItUPNwRXGOHwknfmZqDJ3R7Rsofod7GznaYqw6P+BtEqxjl3k0E30H kePMEKcjUIdvr5QCxrV71CnN7di59fhqNGyK4NaVaNzY4QMbqNqlG71IBGM4kX6bioG0 l/4bj0gp7++ae2MEIayl4hUHfEfKxwk1pnkuESw94f4op9qcN4LvMdAwaaiPRMKUEsEt r7zQ== X-Gm-Message-State: AOAM530543oI09xQNu9Lw/HYbQ6q3ROnohIrK0Rxq2dmwn5ffaJSzat6 iQ18i3K6V6WI/Hpj4uDGqRMU+VbnlMc= X-Google-Smtp-Source: ABdhPJwpztNz1mOPF67FXyEGR2rnIZ17JjlJ+Qj3P8ygRq9ZdWNu+NdsbGVjEHuX5MqlYVty0/MS/Q== X-Received: by 2002:a5d:6a4a:0:b0:1f1:2457:a7eb with SMTP id t10-20020a5d6a4a000000b001f12457a7ebmr7828952wrw.523.1646647972442; Mon, 07 Mar 2022 02:12:52 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 09/16] hw/mips/gt64xxx_pci: Resolve gt64120_register() Date: Mon, 7 Mar 2022 11:12:00 +0100 Message-Id: <20220307101207.90369-10-philippe.mathieu.daude@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220307101207.90369-1-philippe.mathieu.daude@gmail.com> References: <20220307101207.90369-1-philippe.mathieu.daude@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::432 (failed) Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::432; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-x432.google.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 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, FREEMAIL_FROM=0.001, PDS_HP_HELO_NORDNS=0.659, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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: , Cc: Aleksandar Rikalo , Bernhard Beschow , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1646652388646100001 From: Bernhard Beschow Now that gt64120_register() lost its pic parameter, there is an opportunity to remove it. gt64120_register() is old style by wrapping qdev API, and the new style is to use qdev directly. So take the opportunity and modernize the code. Suggested-by: BALATON Zoltan Signed-off-by: Bernhard Beschow Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: BALATON Zoltan Message-Id: <20220217101924.15347-8-shentey@gmail.com> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/mips/gt64xxx_pci.c | 21 ++++----------------- hw/mips/malta.c | 3 ++- include/hw/mips/mips.h | 3 --- 3 files changed, 6 insertions(+), 21 deletions(-) diff --git a/hw/mips/gt64xxx_pci.c b/hw/mips/gt64xxx_pci.c index eb205d6d70..e0ff1b5566 100644 --- a/hw/mips/gt64xxx_pci.c +++ b/hw/mips/gt64xxx_pci.c @@ -26,7 +26,6 @@ #include "qapi/error.h" #include "qemu/units.h" #include "qemu/log.h" -#include "hw/mips/mips.h" #include "hw/pci/pci.h" #include "hw/pci/pci_host.h" #include "migration/vmstate.h" @@ -1151,30 +1150,18 @@ static void gt64120_reset(DeviceState *dev) static void gt64120_realize(DeviceState *dev, Error **errp) { GT64120State *s =3D GT64120_PCI_HOST_BRIDGE(dev); + PCIHostState *phb =3D PCI_HOST_BRIDGE(dev); =20 memory_region_init_io(&s->ISD_mem, OBJECT(dev), &isd_mem_ops, s, "gt64120-isd", 0x1000); -} - -PCIBus *gt64120_register(void) -{ - GT64120State *d; - PCIHostState *phb; - DeviceState *dev; - - dev =3D qdev_new(TYPE_GT64120_PCI_HOST_BRIDGE); - d =3D GT64120_PCI_HOST_BRIDGE(dev); - phb =3D PCI_HOST_BRIDGE(dev); - memory_region_init(&d->pci0_mem, OBJECT(dev), "pci0-mem", 4 * GiB); - address_space_init(&d->pci0_mem_as, &d->pci0_mem, "pci0-mem"); + memory_region_init(&s->pci0_mem, OBJECT(dev), "pci0-mem", 4 * GiB); + address_space_init(&s->pci0_mem_as, &s->pci0_mem, "pci0-mem"); phb->bus =3D pci_root_bus_new(dev, "pci", - &d->pci0_mem, + &s->pci0_mem, get_system_io(), PCI_DEVFN(18, 0), TYPE_PCI_BUS); - sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), &error_fatal); =20 pci_create_simple(phb->bus, PCI_DEVFN(0, 0), "gt64120_pci"); - return phb->bus; } =20 static void gt64120_pci_realize(PCIDevice *d, Error **errp) diff --git a/hw/mips/malta.c b/hw/mips/malta.c index 13254dbc89..55037eb90f 100644 --- a/hw/mips/malta.c +++ b/hw/mips/malta.c @@ -1390,7 +1390,8 @@ void mips_malta_init(MachineState *machine) stl_p(memory_region_get_ram_ptr(bios_copy) + 0x10, 0x00000420); =20 /* Northbridge */ - pci_bus =3D gt64120_register(); + dev =3D sysbus_create_simple("gt64120", -1, NULL); + pci_bus =3D PCI_BUS(qdev_get_child_bus(dev, "pci")); /* * The whole address space decoded by the GT-64120A doesn't generate * exception when accessing invalid memory. Create an empty slot to diff --git a/include/hw/mips/mips.h b/include/hw/mips/mips.h index ff88942e63..101799f7d3 100644 --- a/include/hw/mips/mips.h +++ b/include/hw/mips/mips.h @@ -9,9 +9,6 @@ =20 #include "exec/memory.h" =20 -/* gt64xxx.c */ -PCIBus *gt64120_register(void); - /* bonito.c */ PCIBus *bonito_init(qemu_irq *pic); =20 --=20 2.34.1 From nobody Sat May 18 19:12:37 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=gmail.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1646650194769123.79328923237983; Mon, 7 Mar 2022 02:49:54 -0800 (PST) Received: from localhost ([::1]:35528 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nRAw6-0002Ke-4x for importer@patchew.org; Mon, 07 Mar 2022 05:49:54 -0500 Received: from eggs.gnu.org ([209.51.188.92]:37494) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nRAMO-0004FO-HS for qemu-devel@nongnu.org; Mon, 07 Mar 2022 05:13:00 -0500 Received: from [2a00:1450:4864:20::32c] (port=44586 helo=mail-wm1-x32c.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nRAMN-0004MP-0G for qemu-devel@nongnu.org; Mon, 07 Mar 2022 05:13:00 -0500 Received: by mail-wm1-x32c.google.com with SMTP id bg31-20020a05600c3c9f00b00381590dbb33so8942048wmb.3 for ; Mon, 07 Mar 2022 02:12:58 -0800 (PST) Received: from localhost.localdomain ([185.126.107.38]) by smtp.gmail.com with ESMTPSA id u10-20020adfa18a000000b001f04c24afe7sm10857180wru.41.2022.03.07.02.12.56 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 07 Mar 2022 02:12:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=zwKcr0BxuWom7IkiNcPhPZK4xdCumUneF31LB5FuiUY=; b=HkgfJrUF7Lj9+nmVbUNfzF9UP3gz0PeSpBl5h2Htw3Voq6pekfjWHjD6X1K0qa7Bzw jBtkzP5AhfcomeuhY3EMeRARyX3VRpLqM89R4gJKCQ39LWgw58xgxsy9SfLDd9S3tfgm tSu5K+NQ+P61FSDrnSHELbzFTBTgpemMYowz9WGezL+ZFve9/ApXsETnZEqsOLoS9LGl hefg8pZR2G7HyFlKqzd/5AjqmKObBX2tyivFsAMo1jhd6RFlFbXS7GYtFnWKVCaCub+T MsZQXzXlWEIkNJXVIXaBNm2R/9rfvrAK793XNAHLBS+jKGy2VDOqCzPhxucd6Cdc1HXd XDZg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=zwKcr0BxuWom7IkiNcPhPZK4xdCumUneF31LB5FuiUY=; b=YZkm7RDJ8UayhDxI6cxtNNIMgBgL2QTS+n5SXEv8JnHPdfxK1rqpJ+FCOlkFU72ub4 Rg4N+VMQdRWp3X7d9hBXsK7ozMruVNfP6sdF32Aoho2cFxD3nlAx/ddnHNHIHV/VHlT3 XuoqY9K0//QbyB/eAevN78wmVw4GM2saniS0tHpJyPhiku17nF64WtHPi43DI5qC0d3s eMlBK5Wv8C3pp0Ja3iKqV3VJ2Zn8W3jTNjp8Rwn3ZJhFMGiHIXJNZftVk6Q/EnKVNHQE 2fN5OHlhry2fvOwRg/vEbUkVBVXxYfvOZhvF1jCLi6iRg6ubS9t4f6BWj+7U3f+6Ajns OlLQ== X-Gm-Message-State: AOAM532kfBdk/ghJnWGoNmN3jcfFAbmzJyYwqezf2zxaYdxsMAm4MJnm kMtus9lfSgSrFUFiykRfONzQQIgmyAM= X-Google-Smtp-Source: ABdhPJwpAw+/D02VLkC5oW44AssJPO+7fI9hMAa1OAlJp6ECe7se2fPd+geO6QRw/XtxWhq/h0+LkA== X-Received: by 2002:a05:600c:1994:b0:389:bcf5:6e79 with SMTP id t20-20020a05600c199400b00389bcf56e79mr250439wmq.43.1646647977298; Mon, 07 Mar 2022 02:12:57 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 10/16] hw/rtc/mc146818rtc: QOM'ify IRQ number Date: Mon, 7 Mar 2022 11:12:01 +0100 Message-Id: <20220307101207.90369-11-philippe.mathieu.daude@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220307101207.90369-1-philippe.mathieu.daude@gmail.com> References: <20220307101207.90369-1-philippe.mathieu.daude@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::32c (failed) Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32c; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wm1-x32c.google.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 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, FREEMAIL_FROM=0.001, PDS_HP_HELO_NORDNS=0.659, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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: , Cc: Aleksandar Rikalo , Bernhard Beschow , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1646650196350100001 From: Bernhard Beschow Exposing the IRQ number as a QOM property not only allows it to be configurable but also to be displayed in HMP: Before: (qemu) info qtree ... dev: mc146818rtc, id "" gpio-out "" 1 base_year =3D 0 (0x0) lost_tick_policy =3D "discard" After: dev: mc146818rtc, id "" gpio-out "" 1 base_year =3D 0 (0x0) irq =3D 8 (0x8) lost_tick_policy =3D "discard" The reason the IRQ number didn's show up before is that this device does not call isa_init_irq(). Signed-off-by: Bernhard Beschow Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20220301220037.76555-2-shentey@gmail.com> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/isa/piix4.c | 2 +- hw/rtc/mc146818rtc.c | 13 +++++++++++-- include/hw/rtc/mc146818rtc.h | 1 + 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/hw/isa/piix4.c b/hw/isa/piix4.c index f876c71750..fc3c8b3fd1 100644 --- a/hw/isa/piix4.c +++ b/hw/isa/piix4.c @@ -216,7 +216,7 @@ static void piix4_realize(PCIDevice *dev, Error **errp) if (!qdev_realize(DEVICE(&s->rtc), BUS(isa_bus), errp)) { return; } - isa_init_irq(ISA_DEVICE(&s->rtc), &s->rtc.irq, RTC_ISA_IRQ); + isa_init_irq(ISA_DEVICE(&s->rtc), &s->rtc.irq, s->rtc.isairq); } =20 static void piix4_init(Object *obj) diff --git a/hw/rtc/mc146818rtc.c b/hw/rtc/mc146818rtc.c index ac9a60c90e..f235c2ddbe 100644 --- a/hw/rtc/mc146818rtc.c +++ b/hw/rtc/mc146818rtc.c @@ -912,6 +912,11 @@ static void rtc_realizefn(DeviceState *dev, Error **er= rp) s->base_year =3D 0; } =20 + if (s->isairq >=3D ISA_NUM_IRQS) { + error_setg(errp, "Maximum value for \"irq\" is: %u", ISA_NUM_IRQS = - 1); + return; + } + rtc_set_date_from_host(isadev); =20 switch (s->lost_tick_policy) { @@ -957,15 +962,17 @@ ISADevice *mc146818_rtc_init(ISABus *bus, int base_ye= ar, qemu_irq intercept_irq) { DeviceState *dev; ISADevice *isadev; + RTCState *s; =20 isadev =3D isa_new(TYPE_MC146818_RTC); dev =3D DEVICE(isadev); + s =3D MC146818_RTC(isadev); qdev_prop_set_int32(dev, "base_year", base_year); isa_realize_and_unref(isadev, bus, &error_fatal); if (intercept_irq) { qdev_connect_gpio_out(dev, 0, intercept_irq); } else { - isa_connect_gpio_out(isadev, 0, RTC_ISA_IRQ); + isa_connect_gpio_out(isadev, 0, s->isairq); } =20 object_property_add_alias(qdev_get_machine(), "rtc-time", OBJECT(isade= v), @@ -976,6 +983,7 @@ ISADevice *mc146818_rtc_init(ISABus *bus, int base_year= , qemu_irq intercept_irq) =20 static Property mc146818rtc_properties[] =3D { DEFINE_PROP_INT32("base_year", RTCState, base_year, 1980), + DEFINE_PROP_UINT8("irq", RTCState, isairq, RTC_ISA_IRQ), DEFINE_PROP_LOSTTICKPOLICY("lost_tick_policy", RTCState, lost_tick_policy, LOST_TICK_POLICY_DISCARD), DEFINE_PROP_END_OF_LIST(), @@ -1011,6 +1019,7 @@ static void rtc_reset_hold(Object *obj) =20 static void rtc_build_aml(ISADevice *isadev, Aml *scope) { + RTCState *s =3D MC146818_RTC(isadev); Aml *dev; Aml *crs; =20 @@ -1021,7 +1030,7 @@ static void rtc_build_aml(ISADevice *isadev, Aml *sco= pe) crs =3D aml_resource_template(); aml_append(crs, aml_io(AML_DECODE16, RTC_ISA_BASE, RTC_ISA_BASE, 0x01, 0x08)); - aml_append(crs, aml_irq_no_flags(RTC_ISA_IRQ)); + aml_append(crs, aml_irq_no_flags(s->isairq)); =20 dev =3D aml_device("RTC"); aml_append(dev, aml_name_decl("_HID", aml_eisaid("PNP0B00"))); diff --git a/include/hw/rtc/mc146818rtc.h b/include/hw/rtc/mc146818rtc.h index 5b45b22924..deef93f89a 100644 --- a/include/hw/rtc/mc146818rtc.h +++ b/include/hw/rtc/mc146818rtc.h @@ -25,6 +25,7 @@ struct RTCState { MemoryRegion coalesced_io; uint8_t cmos_data[128]; uint8_t cmos_index; + uint8_t isairq; int32_t base_year; uint64_t base_rtc; uint64_t last_update; --=20 2.34.1 From nobody Sat May 18 19:12:37 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=gmail.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1646651158545536.8397141490472; Mon, 7 Mar 2022 03:05:58 -0800 (PST) Received: from localhost ([::1]:46334 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nRBBe-0003Ng-AH for importer@patchew.org; Mon, 07 Mar 2022 06:05:58 -0500 Received: from eggs.gnu.org ([209.51.188.92]:37520) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nRAMT-0004Gz-7q for qemu-devel@nongnu.org; Mon, 07 Mar 2022 05:13:05 -0500 Received: from [2a00:1450:4864:20::429] (port=35499 helo=mail-wr1-x429.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nRAMR-0004Mq-Qu for qemu-devel@nongnu.org; Mon, 07 Mar 2022 05:13:04 -0500 Received: by mail-wr1-x429.google.com with SMTP id b5so22399059wrr.2 for ; Mon, 07 Mar 2022 02:13:03 -0800 (PST) Received: from localhost.localdomain ([185.126.107.38]) by smtp.gmail.com with ESMTPSA id i4-20020a05600c354400b003899f5a8195sm4839033wmq.32.2022.03.07.02.13.01 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 07 Mar 2022 02:13:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=uOlBtYjfRkygbNbkO0nMqqr60G0oqcOJiqgel0P1B+U=; b=KG1XNh24sGZyE36kUKRiPCwR1n2TbDJCRhkEbxuqcFX1Kq2HX0XWvRKVZClwgLb7uB GaRf6PTTVHXfJ3JQ1Ei6hkfm7Fjt1k/onltvzWDRUwvpp4gvLXQc89jnKdsdLZqjUhl/ lHC0KeV5vHUJHjpr/xsFBpHMv0wAzJbG1oJ42lgOGg64JmEPJHofZxilPXve9Arfyq1w QJniHXjXVDYHKX8o/K7CuQ95KKKpBFnKSWcYHK0DxbLyU0k4xjtkah7YImFq7hnezmlL ntMMTQEwdmKhmTuh0X6eixBUA/lUF4ebWLwNUmpTa80iFurnHJiN2zbmjDRagBHSordd A6BA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=uOlBtYjfRkygbNbkO0nMqqr60G0oqcOJiqgel0P1B+U=; b=8FHflcsAhlcmaaVfLR34hlB0kOwTvk1pHc2xE1fjrOPEkxvD44cb/2SM74x9Q1/PMv aPnktpS8/wGeRAXplrfhMg58aYnnyriEMj2mUrDh3R+BytuYQ04ba98uAJluxcqJwfEJ Rk22wVdnHHfvMSArE/zvF8HlksiW3L2P/kde5okRfxopeO+4uPKldfiKontZqeW95omV Bd3zFY6CACaU4Pq3zZrLmElFtGObTXoW9w6wcVu21hTScpP5UfGeTLGw/UHabEE8A0eX xnZJlHQAqxWJ/2B/EWr0NRDDAdiw6kX08IEcyPhBNlXbDTKWKXmJw8P2GAOiL3mfJG27 Wp6w== X-Gm-Message-State: AOAM530Bmj5xvlPbRjZRIH4FWEhySmox5KzsasDiM39kOwq2+YR6txSX aNA8Ym2Lza/npq/6d4h9wCuA9OwK/e0= X-Google-Smtp-Source: ABdhPJyNADngVxqrM5ZMqcIAU0BfVhPfY/n2HCLFZB96s0IK36Po+O4hHsp+5/T8dkv+XsIfDS1K/A== X-Received: by 2002:adf:ed0c:0:b0:1f0:63a5:36aa with SMTP id a12-20020adfed0c000000b001f063a536aamr7699378wro.588.1646647982101; Mon, 07 Mar 2022 02:13:02 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 11/16] hw/rtc/m48t59-isa: QOM'ify IRQ number Date: Mon, 7 Mar 2022 11:12:02 +0100 Message-Id: <20220307101207.90369-12-philippe.mathieu.daude@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220307101207.90369-1-philippe.mathieu.daude@gmail.com> References: <20220307101207.90369-1-philippe.mathieu.daude@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::429 (failed) Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::429; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-x429.google.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 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, FREEMAIL_FROM=0.001, PDS_HP_HELO_NORDNS=0.659, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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: , Cc: Aleksandar Rikalo , Bernhard Beschow , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1646651159784100001 From: Bernhard Beschow Exposing the IRQ number as a QOM property not only allows it to be configurable but also to be printed by standard QOM mechanisms. This allows isabus_dev_print() to be retired eventually. Signed-off-by: Bernhard Beschow Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20220301220037.76555-3-shentey@gmail.com> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/rtc/m48t59-isa.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/hw/rtc/m48t59-isa.c b/hw/rtc/m48t59-isa.c index dc21fb10a5..e9086eada4 100644 --- a/hw/rtc/m48t59-isa.c +++ b/hw/rtc/m48t59-isa.c @@ -42,6 +42,7 @@ struct M48txxISAState { ISADevice parent_obj; M48t59State state; uint32_t io_base; + uint8_t isairq; MemoryRegion io; }; =20 @@ -79,6 +80,7 @@ static void m48txx_isa_toggle_lock(Nvram *obj, int lock) static Property m48t59_isa_properties[] =3D { DEFINE_PROP_INT32("base-year", M48txxISAState, state.base_year, 0), DEFINE_PROP_UINT32("iobase", M48txxISAState, io_base, 0x74), + DEFINE_PROP_UINT8("irq", M48txxISAState, isairq, 8), DEFINE_PROP_END_OF_LIST(), }; =20 @@ -97,9 +99,14 @@ static void m48t59_isa_realize(DeviceState *dev, Error *= *errp) M48txxISAState *d =3D M48TXX_ISA(dev); M48t59State *s =3D &d->state; =20 + if (d->isairq >=3D ISA_NUM_IRQS) { + error_setg(errp, "Maximum value for \"irq\" is: %u", ISA_NUM_IRQS = - 1); + return; + } + s->model =3D u->info.model; s->size =3D u->info.size; - isa_init_irq(isadev, &s->IRQ, 8); + isa_init_irq(isadev, &s->IRQ, d->isairq); m48t59_realize_common(s, errp); memory_region_init_io(&d->io, OBJECT(dev), &m48t59_io_ops, s, "m48t59"= , 4); if (d->io_base !=3D 0) { --=20 2.34.1 From nobody Sat May 18 19:12:37 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=gmail.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1646652593673303.25089779548534; Mon, 7 Mar 2022 03:29:53 -0800 (PST) Received: from localhost ([::1]:50322 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nRBYm-000296-HT for importer@patchew.org; Mon, 07 Mar 2022 06:29:52 -0500 Received: from eggs.gnu.org ([209.51.188.92]:37570) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nRAMY-0004S7-6y for qemu-devel@nongnu.org; Mon, 07 Mar 2022 05:13:10 -0500 Received: from [2a00:1450:4864:20::42e] (port=42598 helo=mail-wr1-x42e.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nRAMW-0004NG-LZ for qemu-devel@nongnu.org; Mon, 07 Mar 2022 05:13:09 -0500 Received: by mail-wr1-x42e.google.com with SMTP id u10so20729421wra.9 for ; Mon, 07 Mar 2022 02:13:08 -0800 (PST) Received: from localhost.localdomain ([185.126.107.38]) by smtp.gmail.com with ESMTPSA id h12-20020a5d548c000000b001f1f99e7792sm1804411wrv.111.2022.03.07.02.13.06 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 07 Mar 2022 02:13:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=iq/phndxmXP1fEuqNLg+aeoAruQ+H73qFUXnPncUnqs=; b=VdCC+a0QgJmee/46IWVDsw+5jgqwUJfdl2JjpA9RlBMIyKNE8hSgLSdg1a74Gjplr2 tSjT1tDYEtQllk68SKuy4p4uJSDhsFIivnnQMS58CdywzAcm/IWaHhbWOZ61ZCP65WfY E4zvPnxHvLvGha7s6xh4vvYjHvCqKtWp6h3fUBnCwsgUq5x+J9/vVTBcsPIZPYdRxDv/ aZpUqps2BXYx2IAPH6nnB+U+P3FHlwoFzPlrZzArunjl03AHHyoYMk/6rJdof3kBBc7X s8W0YuRQKKojFNw15nV9rsv3oa87VPTDyxFGr6WBYGzrUzkIAzn1Oijep4E6xdA0jFnA FIgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=iq/phndxmXP1fEuqNLg+aeoAruQ+H73qFUXnPncUnqs=; b=ZIHZ/tTOeAvVNFtFfsN7gC+G3by5s8WQCQZ9K3iYTUCxqY2/4OyecOY+mmZJWzc5Ml t00F0W+BWxXc1MehWxZ7chp2cEPkgXYpRUZVhaT/ctr/9ty/nnykRoUOSNJPPIwPNnNE CTvey9OSGdoQuLzeqroIHr8qM43m5nFsJIkQWXLNLzAVyVxWqyAsT1QNeJy/zQb6yLRa NsmeWbBDoS1fP/z6GA+B27v3WfCJA9joN4+ZlOsiZMH5xw5Ab5XjGE4FluZzVgiAGWK+ TbMignFrG3cVyu+su7uKiTXKspyn8UiJbUvW6y3ZzZGaUPe/YARVSmKAjNbmfot6wTvN VT/Q== X-Gm-Message-State: AOAM531npTEsPKDdz475MjE5wzQSN18kOsvvBgX0DqpSH03eVNPJ1Uaf zlyqYDsvmn9IhtBeRJHcoF2dPZ/zhro= X-Google-Smtp-Source: ABdhPJx2WwpPRx9RQJjN7ZfhKUg/rAa7Mersc4pnCLsFHD9DOTa/8l8Q6WRxepSzNaTQgbR5gRPvpQ== X-Received: by 2002:adf:eb81:0:b0:1e3:2bf5:132 with SMTP id t1-20020adfeb81000000b001e32bf50132mr7720494wrn.246.1646647987143; Mon, 07 Mar 2022 02:13:07 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 12/16] hw/input/pckbd: QOM'ify IRQ numbers Date: Mon, 7 Mar 2022 11:12:03 +0100 Message-Id: <20220307101207.90369-13-philippe.mathieu.daude@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220307101207.90369-1-philippe.mathieu.daude@gmail.com> References: <20220307101207.90369-1-philippe.mathieu.daude@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::42e (failed) Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::42e; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-x42e.google.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 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, FREEMAIL_FROM=0.001, PDS_HP_HELO_NORDNS=0.659, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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: , Cc: Aleksandar Rikalo , Bernhard Beschow , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1646652594571100001 From: Bernhard Beschow Exposing the IRQ numbers as QOM properties not only allows them to be configurable but also to be printed by standard QOM mechanisms. This allows isabus_dev_print() to be retired eventually. Signed-off-by: Bernhard Beschow Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20220301220037.76555-4-shentey@gmail.com> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/input/pckbd.c | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/hw/input/pckbd.c b/hw/input/pckbd.c index baba62f357..eb77e12f6f 100644 --- a/hw/input/pckbd.c +++ b/hw/input/pckbd.c @@ -26,6 +26,7 @@ #include "qemu/error-report.h" #include "qemu/log.h" #include "qemu/timer.h" +#include "qapi/error.h" #include "hw/isa/isa.h" #include "migration/vmstate.h" #include "hw/acpi/aml-build.h" @@ -671,6 +672,8 @@ struct ISAKBDState { KBDState kbd; bool kbd_throttle; MemoryRegion io[2]; + uint8_t kbd_irq; + uint8_t mouse_irq; }; =20 void i8042_isa_mouse_fake_event(ISAKBDState *isa) @@ -734,8 +737,20 @@ static void i8042_realizefn(DeviceState *dev, Error **= errp) ISAKBDState *isa_s =3D I8042(dev); KBDState *s =3D &isa_s->kbd; =20 - isa_init_irq(isadev, &s->irq_kbd, 1); - isa_init_irq(isadev, &s->irq_mouse, 12); + if (isa_s->kbd_irq >=3D ISA_NUM_IRQS) { + error_setg(errp, "Maximum value for \"kbd-irq\" is: %u", + ISA_NUM_IRQS - 1); + return; + } + + if (isa_s->mouse_irq >=3D ISA_NUM_IRQS) { + error_setg(errp, "Maximum value for \"mouse-irq\" is: %u", + ISA_NUM_IRQS - 1); + return; + } + + isa_init_irq(isadev, &s->irq_kbd, isa_s->kbd_irq); + isa_init_irq(isadev, &s->irq_mouse, isa_s->mouse_irq); =20 isa_register_ioport(isadev, isa_s->io + 0, 0x60); isa_register_ioport(isadev, isa_s->io + 1, 0x64); @@ -754,6 +769,7 @@ static void i8042_realizefn(DeviceState *dev, Error **e= rrp) =20 static void i8042_build_aml(ISADevice *isadev, Aml *scope) { + ISAKBDState *isa_s =3D I8042(isadev); Aml *kbd; Aml *mou; Aml *crs; @@ -761,7 +777,7 @@ static void i8042_build_aml(ISADevice *isadev, Aml *sco= pe) crs =3D aml_resource_template(); aml_append(crs, aml_io(AML_DECODE16, 0x0060, 0x0060, 0x01, 0x01)); aml_append(crs, aml_io(AML_DECODE16, 0x0064, 0x0064, 0x01, 0x01)); - aml_append(crs, aml_irq_no_flags(1)); + aml_append(crs, aml_irq_no_flags(isa_s->kbd_irq)); =20 kbd =3D aml_device("KBD"); aml_append(kbd, aml_name_decl("_HID", aml_eisaid("PNP0303"))); @@ -769,7 +785,7 @@ static void i8042_build_aml(ISADevice *isadev, Aml *sco= pe) aml_append(kbd, aml_name_decl("_CRS", crs)); =20 crs =3D aml_resource_template(); - aml_append(crs, aml_irq_no_flags(12)); + aml_append(crs, aml_irq_no_flags(isa_s->mouse_irq)); =20 mou =3D aml_device("MOU"); aml_append(mou, aml_name_decl("_HID", aml_eisaid("PNP0F13"))); @@ -783,6 +799,8 @@ static void i8042_build_aml(ISADevice *isadev, Aml *sco= pe) static Property i8042_properties[] =3D { DEFINE_PROP_BOOL("extended-state", ISAKBDState, kbd.extended_state, tr= ue), DEFINE_PROP_BOOL("kbd-throttle", ISAKBDState, kbd_throttle, false), + DEFINE_PROP_UINT8("kbd-irq", ISAKBDState, kbd_irq, 1), + DEFINE_PROP_UINT8("mouse-irq", ISAKBDState, mouse_irq, 12), DEFINE_PROP_END_OF_LIST(), }; =20 --=20 2.34.1 From nobody Sat May 18 19:12:37 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=gmail.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1646652821629487.9392917549958; Mon, 7 Mar 2022 03:33:41 -0800 (PST) Received: from localhost ([::1]:58746 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nRBcS-0007ql-GB for importer@patchew.org; Mon, 07 Mar 2022 06:33:40 -0500 Received: from eggs.gnu.org ([209.51.188.92]:37600) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nRAMd-0004jo-G8 for qemu-devel@nongnu.org; Mon, 07 Mar 2022 05:13:15 -0500 Received: from [2a00:1450:4864:20::432] (port=37635 helo=mail-wr1-x432.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nRAMb-0004Ng-Of for qemu-devel@nongnu.org; Mon, 07 Mar 2022 05:13:15 -0500 Received: by mail-wr1-x432.google.com with SMTP id q14so6808587wrc.4 for ; Mon, 07 Mar 2022 02:13:13 -0800 (PST) Received: from localhost.localdomain ([185.126.107.38]) by smtp.gmail.com with ESMTPSA id r16-20020a05600c35d000b00389a826abd3sm1807742wmq.42.2022.03.07.02.13.11 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 07 Mar 2022 02:13:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=2EWxsRqGLmu+y9a9we3MPYsnUoSssM0/xVYg8aJ1C4w=; b=Idfz7Fpq17OOZyFdhWdQNdYa8M9BR+1BzVohsRr0YQGvSp1BAU9saHlnLK7rYBu3Xt Fr5uHxdda+UgJkAF0Z7zI9FqiiL2ylfBzc+bdz1/akaIn1VcDh1qdJIXjCjdkCXvh/sa vKK3b7wTeDD5KuKOly4BGtirBja6YnOHqtD9n9eM4VffMx2iVS10DYPXavhk9c3XMNAr gWAaQjc/iXLiCB1d+WNEdX0BdpS2OHBdIzg+HOxRTMz0t0gjPw6fye2BjMp2WLNRA67m dNl7RsACeaeNd4nZmZNsmm184WWDNhxpWG9jUSouhL9/7+gjR62dxqU0+V9jVvEFLeP/ Ot5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=2EWxsRqGLmu+y9a9we3MPYsnUoSssM0/xVYg8aJ1C4w=; b=7xZ28fnLYAt9VAb5pTjxctlBtRUX3mEipfd8UrryeT7F7cZrkiB98CZpor9920dVRE ZkAZt1HPNTWZGNUaeuJFgzJPiBsipXObA9UhMt4oo95NVbfCbLWFjfV7Ps6ty3bkEK0+ PnJi1VSdnJi1OCD/Sa3Q796nFymdulX9UdtVGTG/3GcneLUQK/JdRT8yKj8VerZTdOgl X8uJ1DQZES5KxYICeMLSZpMxJZnBSq7dcAg4U3ASX8u7hZos+S79tKZM2HcNXQGtAsxt dBfvlwN/Ir8txfwuSgd3mR1DbLRa6nwj/Z4l/WeM8Ms9h7YC5pVlVcOIEs2dLyVwdhuV QJEA== X-Gm-Message-State: AOAM533CNMKp6jvntpJSySIFcv7hMdgMDuaoH8QoscvdHIWq8ywUGx6s vHx3ygOMIv40w2dVgU/NdaGvMTVkVvM= X-Google-Smtp-Source: ABdhPJyi0D5oD+uY2x5+VaRnA+ljORrELvKd0gcj8mAzMk3DliDtb6n8YNxcyGMcJJ3W1rpBF+e/JA== X-Received: by 2002:a05:6000:1c06:b0:1f1:ed99:8143 with SMTP id ba6-20020a0560001c0600b001f1ed998143mr4278556wrb.163.1646647991988; Mon, 07 Mar 2022 02:13:11 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 13/16] hw/isa/isa-bus: Remove isabus_dev_print() Date: Mon, 7 Mar 2022 11:12:04 +0100 Message-Id: <20220307101207.90369-14-philippe.mathieu.daude@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220307101207.90369-1-philippe.mathieu.daude@gmail.com> References: <20220307101207.90369-1-philippe.mathieu.daude@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::432 (failed) Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::432; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-x432.google.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 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, FREEMAIL_FROM=0.001, PDS_HP_HELO_NORDNS=0.659, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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: , Cc: Aleksandar Rikalo , Bernhard Beschow , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1646652822597100001 From: Bernhard Beschow All isabus_dev_print() did was to print up to two IRQ numbers per device. This is redundant if the IRQ numbers are present as QOM properties (see e.g. the modified tests/qemu-iotests/172.out). Now that the last devices relying on isabus_dev_print() had their IRQ numbers QOM'ified, the contribution of this function ultimately became redundant. Remove it. Signed-off-by: Bernhard Beschow Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20220301220037.76555-5-shentey@gmail.com> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/isa/isa-bus.c | 16 ---------------- tests/qemu-iotests/172.out | 26 -------------------------- 2 files changed, 42 deletions(-) diff --git a/hw/isa/isa-bus.c b/hw/isa/isa-bus.c index 6c31398dda..af5add6a26 100644 --- a/hw/isa/isa-bus.c +++ b/hw/isa/isa-bus.c @@ -21,21 +21,18 @@ #include "qemu/error-report.h" #include "qemu/module.h" #include "qapi/error.h" -#include "monitor/monitor.h" #include "hw/sysbus.h" #include "sysemu/sysemu.h" #include "hw/isa/isa.h" =20 static ISABus *isabus; =20 -static void isabus_dev_print(Monitor *mon, DeviceState *dev, int indent); static char *isabus_get_fw_dev_path(DeviceState *dev); =20 static void isa_bus_class_init(ObjectClass *klass, void *data) { BusClass *k =3D BUS_CLASS(klass); =20 - k->print_dev =3D isabus_dev_print; k->get_fw_dev_path =3D isabus_get_fw_dev_path; } =20 @@ -222,19 +219,6 @@ void isa_build_aml(ISABus *bus, Aml *scope) } } =20 -static void isabus_dev_print(Monitor *mon, DeviceState *dev, int indent) -{ - ISADevice *d =3D ISA_DEVICE(dev); - - if (d->isairq[1] !=3D -1) { - monitor_printf(mon, "%*sisa irqs %d,%d\n", indent, "", - d->isairq[0], d->isairq[1]); - } else if (d->isairq[0] !=3D -1) { - monitor_printf(mon, "%*sisa irq %d\n", indent, "", - d->isairq[0]); - } -} - static void isabus_bridge_class_init(ObjectClass *klass, void *data) { DeviceClass *dc =3D DEVICE_CLASS(klass); diff --git a/tests/qemu-iotests/172.out b/tests/qemu-iotests/172.out index 4cf4d536b4..9479b92185 100644 --- a/tests/qemu-iotests/172.out +++ b/tests/qemu-iotests/172.out @@ -15,7 +15,6 @@ Testing: fdtypeA =3D "auto" fdtypeB =3D "auto" fallback =3D "288" - isa irq 6 bus: floppy-bus.0 type floppy-bus dev: floppy, id "" @@ -43,7 +42,6 @@ Testing: -fda TEST_DIR/t.qcow2 fdtypeA =3D "auto" fdtypeB =3D "auto" fallback =3D "288" - isa irq 6 bus: floppy-bus.0 type floppy-bus dev: floppy, id "" @@ -81,7 +79,6 @@ Testing: -fdb TEST_DIR/t.qcow2 fdtypeA =3D "auto" fdtypeB =3D "auto" fallback =3D "288" - isa irq 6 bus: floppy-bus.0 type floppy-bus dev: floppy, id "" @@ -135,7 +132,6 @@ Testing: -fda TEST_DIR/t.qcow2 -fdb TEST_DIR/t.qcow2.2 fdtypeA =3D "auto" fdtypeB =3D "auto" fallback =3D "288" - isa irq 6 bus: floppy-bus.0 type floppy-bus dev: floppy, id "" @@ -190,7 +186,6 @@ Testing: -fdb fdtypeA =3D "auto" fdtypeB =3D "auto" fallback =3D "288" - isa irq 6 bus: floppy-bus.0 type floppy-bus dev: floppy, id "" @@ -230,7 +225,6 @@ Testing: -drive if=3Dfloppy,file=3DTEST_DIR/t.qcow2 fdtypeA =3D "auto" fdtypeB =3D "auto" fallback =3D "288" - isa irq 6 bus: floppy-bus.0 type floppy-bus dev: floppy, id "" @@ -268,7 +262,6 @@ Testing: -drive if=3Dfloppy,file=3DTEST_DIR/t.qcow2,ind= ex=3D1 fdtypeA =3D "auto" fdtypeB =3D "auto" fallback =3D "288" - isa irq 6 bus: floppy-bus.0 type floppy-bus dev: floppy, id "" @@ -322,7 +315,6 @@ Testing: -drive if=3Dfloppy,file=3DTEST_DIR/t.qcow2 -dr= ive if=3Dfloppy,file=3DTEST_DIR/t fdtypeA =3D "auto" fdtypeB =3D "auto" fallback =3D "288" - isa irq 6 bus: floppy-bus.0 type floppy-bus dev: floppy, id "" @@ -380,7 +372,6 @@ Testing: -drive if=3Dnone,file=3DTEST_DIR/t.qcow2 -devi= ce floppy,drive=3Dnone0 fdtypeA =3D "auto" fdtypeB =3D "auto" fallback =3D "288" - isa irq 6 bus: floppy-bus.0 type floppy-bus dev: floppy, id "" @@ -418,7 +409,6 @@ Testing: -drive if=3Dnone,file=3DTEST_DIR/t.qcow2 -devi= ce floppy,drive=3Dnone0,unit=3D1 fdtypeA =3D "auto" fdtypeB =3D "auto" fallback =3D "288" - isa irq 6 bus: floppy-bus.0 type floppy-bus dev: floppy, id "" @@ -456,7 +446,6 @@ Testing: -drive if=3Dnone,file=3DTEST_DIR/t.qcow2 -driv= e if=3Dnone,file=3DTEST_DIR/t.qco fdtypeA =3D "auto" fdtypeB =3D "auto" fallback =3D "288" - isa irq 6 bus: floppy-bus.0 type floppy-bus dev: floppy, id "" @@ -520,7 +509,6 @@ Testing: -fda TEST_DIR/t.qcow2 -drive if=3Dnone,file=3D= TEST_DIR/t.qcow2.2 -device fl fdtypeA =3D "auto" fdtypeB =3D "auto" fallback =3D "288" - isa irq 6 bus: floppy-bus.0 type floppy-bus dev: floppy, id "" @@ -575,7 +563,6 @@ Testing: -fda TEST_DIR/t.qcow2 -drive if=3Dnone,file=3D= TEST_DIR/t.qcow2.2 -device fl fdtypeA =3D "auto" fdtypeB =3D "auto" fallback =3D "288" - isa irq 6 bus: floppy-bus.0 type floppy-bus dev: floppy, id "" @@ -630,7 +617,6 @@ Testing: -fdb TEST_DIR/t.qcow2 -drive if=3Dnone,file=3D= TEST_DIR/t.qcow2.2 -device fl fdtypeA =3D "auto" fdtypeB =3D "auto" fallback =3D "288" - isa irq 6 bus: floppy-bus.0 type floppy-bus dev: floppy, id "" @@ -685,7 +671,6 @@ Testing: -fdb TEST_DIR/t.qcow2 -drive if=3Dnone,file=3D= TEST_DIR/t.qcow2.2 -device fl fdtypeA =3D "auto" fdtypeB =3D "auto" fallback =3D "288" - isa irq 6 bus: floppy-bus.0 type floppy-bus dev: floppy, id "" @@ -749,7 +734,6 @@ Testing: -drive if=3Dfloppy,file=3DTEST_DIR/t.qcow2 -dr= ive if=3Dnone,file=3DTEST_DIR/t.q fdtypeA =3D "auto" fdtypeB =3D "auto" fallback =3D "288" - isa irq 6 bus: floppy-bus.0 type floppy-bus dev: floppy, id "" @@ -804,7 +788,6 @@ Testing: -drive if=3Dfloppy,file=3DTEST_DIR/t.qcow2 -dr= ive if=3Dnone,file=3DTEST_DIR/t.q fdtypeA =3D "auto" fdtypeB =3D "auto" fallback =3D "288" - isa irq 6 bus: floppy-bus.0 type floppy-bus dev: floppy, id "" @@ -865,7 +848,6 @@ Testing: -drive if=3Dnone,file=3DTEST_DIR/t.qcow2 -glob= al floppy.drive=3Dnone0 -device fdtypeA =3D "auto" fdtypeB =3D "auto" fallback =3D "288" - isa irq 6 bus: floppy-bus.0 type floppy-bus dev: floppy, id "" @@ -933,7 +915,6 @@ Testing: -device floppy fdtypeA =3D "auto" fdtypeB =3D "auto" fallback =3D "288" - isa irq 6 bus: floppy-bus.0 type floppy-bus dev: floppy, id "" @@ -958,7 +939,6 @@ Testing: -device floppy,drive-type=3D120 fdtypeA =3D "auto" fdtypeB =3D "auto" fallback =3D "288" - isa irq 6 bus: floppy-bus.0 type floppy-bus dev: floppy, id "" @@ -983,7 +963,6 @@ Testing: -device floppy,drive-type=3D144 fdtypeA =3D "auto" fdtypeB =3D "auto" fallback =3D "288" - isa irq 6 bus: floppy-bus.0 type floppy-bus dev: floppy, id "" @@ -1008,7 +987,6 @@ Testing: -device floppy,drive-type=3D288 fdtypeA =3D "auto" fdtypeB =3D "auto" fallback =3D "288" - isa irq 6 bus: floppy-bus.0 type floppy-bus dev: floppy, id "" @@ -1036,7 +1014,6 @@ Testing: -drive if=3Dnone,file=3DTEST_DIR/t.qcow2 -de= vice floppy,drive=3Dnone0,drive-t fdtypeA =3D "auto" fdtypeB =3D "auto" fallback =3D "288" - isa irq 6 bus: floppy-bus.0 type floppy-bus dev: floppy, id "" @@ -1074,7 +1051,6 @@ Testing: -drive if=3Dnone,file=3DTEST_DIR/t.qcow2 -de= vice floppy,drive=3Dnone0,drive-t fdtypeA =3D "auto" fdtypeB =3D "auto" fallback =3D "288" - isa irq 6 bus: floppy-bus.0 type floppy-bus dev: floppy, id "" @@ -1115,7 +1091,6 @@ Testing: -drive if=3Dnone,file=3DTEST_DIR/t.qcow2 -de= vice floppy,drive=3Dnone0,logical fdtypeA =3D "auto" fdtypeB =3D "auto" fallback =3D "288" - isa irq 6 bus: floppy-bus.0 type floppy-bus dev: floppy, id "" @@ -1153,7 +1128,6 @@ Testing: -drive if=3Dnone,file=3DTEST_DIR/t.qcow2 -de= vice floppy,drive=3Dnone0,physica fdtypeA =3D "auto" fdtypeB =3D "auto" fallback =3D "288" - isa irq 6 bus: floppy-bus.0 type floppy-bus dev: floppy, id "" --=20 2.34.1 From nobody Sat May 18 19:12:37 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=gmail.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1646650149040725.8235959919423; Mon, 7 Mar 2022 02:49:09 -0800 (PST) Received: from localhost ([::1]:60948 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nRAvM-0000QU-Oa for importer@patchew.org; Mon, 07 Mar 2022 05:49:08 -0500 Received: from eggs.gnu.org ([209.51.188.92]:37630) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nRAMh-0004rv-Q0 for qemu-devel@nongnu.org; Mon, 07 Mar 2022 05:13:20 -0500 Received: from [2a00:1450:4864:20::430] (port=44596 helo=mail-wr1-x430.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nRAMg-0004PT-9d for qemu-devel@nongnu.org; Mon, 07 Mar 2022 05:13:19 -0500 Received: by mail-wr1-x430.google.com with SMTP id u1so22336587wrg.11 for ; Mon, 07 Mar 2022 02:13:17 -0800 (PST) Received: from localhost.localdomain ([185.126.107.38]) by smtp.gmail.com with ESMTPSA id v2-20020adf8b42000000b001edc38024c9sm11913880wra.65.2022.03.07.02.13.15 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 07 Mar 2022 02:13:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=cJh4PYyUI6xHySX36hONClAaQmYIjo+6gw5rU4C8imM=; b=k5oeEjoo24eXvS4XM+EhxIOQaiwwcyBDR/C6JspQJ3ZL03rK3wPvMsToBZzAbaYpZz is+65AQvdyrwgXujw4oxxutU0+xfmdYCmlo1jZl/NqjOEY0rl2tO1W0mU3+FYahqk5E1 disRC11KI0mC7o8Obxqv7HZWJJ3tYNhGipVBLGsjaN1NEK7vTYmcecTM8J729Y2B4gim m80YWyiD6z/lLjm9vsA/5HId6aG2oHQiyPW2licnsqvbRTmt+ouCz2g/Y48X3wKt1bsk 8C++ZWUp4MYzIUBod3wqUH5UnqPE87caRiyNeUQKQsWM2HEbvyUpBOuJikSDLeWL9Fe2 XNLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=cJh4PYyUI6xHySX36hONClAaQmYIjo+6gw5rU4C8imM=; b=whuaVqihu1lo6BSNVR3RZUjMzgZsmP2ZYO3ly39zhAbJfOzKJ0wbw+hgLSjSpTz4ob 7OggftuYV11hpYCXu26xmpWrPFaaW1GV3b2cnbw4UMdKaNuv1vN/VMVJeAUY85jsViE2 0mGitU18iEREZnbbO5yjmIw+TVJRGKvBO1ebPaMDTQv9dkGdz5E5xL5fym9CVFQz/PbG Dq+pcqB4/wK+FhbKvmZ5nDlcxdgrV4ERxyua+OoPsVTtg4KuiqJbUEG+EIs75S2My20P 2WGPIV+Imz9ba3CGCxg0j33OvGlKgCgmPHLygq9OfkVM1wJk0xTsHGU8VafrCrMwYDbK qt4A== X-Gm-Message-State: AOAM533XPUcnpU5xIuuXHoUvdE4Q59wfoObylPkt3RbGb5tPLbaa3nW4 jyiF7Ch5wI7xz/DrghoYgRzvYBjN+fs= X-Google-Smtp-Source: ABdhPJy9Q6r4NM8TvlaPdho1rmjPf/mIOw9jOMZpifPuEnmYMlVScM0cHkLGBmE/fU2SenOacv+n4w== X-Received: by 2002:a05:6000:114e:b0:1f0:4b8d:457 with SMTP id d14-20020a056000114e00b001f04b8d0457mr7850616wrx.89.1646647996776; Mon, 07 Mar 2022 02:13:16 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 14/16] isa: Drop unused attributes from ISADevice Date: Mon, 7 Mar 2022 11:12:05 +0100 Message-Id: <20220307101207.90369-15-philippe.mathieu.daude@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220307101207.90369-1-philippe.mathieu.daude@gmail.com> References: <20220307101207.90369-1-philippe.mathieu.daude@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::430 (failed) Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::430; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wr1-x430.google.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 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, FREEMAIL_FROM=0.001, PDS_HP_HELO_NORDNS=0.659, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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: , Cc: Aleksandar Rikalo , Bernhard Beschow , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1646650175323100003 From: Bernhard Beschow Now that the last users of ISADevice::isairq[] have been resolved during the previous commits, it can be removed for good. Signed-off-by: Bernhard Beschow Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20220301220037.76555-7-shentey@gmail.com> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/isa/isa-bus.c | 13 ------------- include/hw/isa/isa.h | 2 -- 2 files changed, 15 deletions(-) diff --git a/hw/isa/isa-bus.c b/hw/isa/isa-bus.c index af5add6a26..c64a14120b 100644 --- a/hw/isa/isa-bus.c +++ b/hw/isa/isa-bus.c @@ -87,11 +87,7 @@ qemu_irq isa_get_irq(ISADevice *dev, unsigned isairq) =20 void isa_init_irq(ISADevice *dev, qemu_irq *p, unsigned isairq) { - assert(dev->nirqs < ARRAY_SIZE(dev->isairq)); - assert(isairq < ISA_NUM_IRQS); - dev->isairq[dev->nirqs] =3D isairq; *p =3D isa_get_irq(dev, isairq); - dev->nirqs++; } =20 void isa_connect_gpio_out(ISADevice *isadev, int gpioirq, unsigned isairq) @@ -150,14 +146,6 @@ int isa_register_portio_list(ISADevice *dev, return 0; } =20 -static void isa_device_init(Object *obj) -{ - ISADevice *dev =3D ISA_DEVICE(obj); - - dev->isairq[0] =3D -1; - dev->isairq[1] =3D -1; -} - ISADevice *isa_new(const char *name) { return ISA_DEVICE(qdev_new(name)); @@ -244,7 +232,6 @@ static const TypeInfo isa_device_type_info =3D { .name =3D TYPE_ISA_DEVICE, .parent =3D TYPE_DEVICE, .instance_size =3D sizeof(ISADevice), - .instance_init =3D isa_device_init, .abstract =3D true, .class_size =3D sizeof(ISADeviceClass), .class_init =3D isa_device_class_init, diff --git a/include/hw/isa/isa.h b/include/hw/isa/isa.h index d4417b34b6..d80cab5b79 100644 --- a/include/hw/isa/isa.h +++ b/include/hw/isa/isa.h @@ -83,8 +83,6 @@ struct ISADevice { DeviceState parent_obj; /*< public >*/ =20 - int8_t isairq[2]; /* -1 =3D unassigned */ - int nirqs; int ioport_id; }; =20 --=20 2.34.1 From nobody Sat May 18 19:12:37 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=gmail.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1646650320524275.33216555972535; Mon, 7 Mar 2022 02:52:00 -0800 (PST) Received: from localhost ([::1]:44170 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nRAy7-00085m-BX for importer@patchew.org; Mon, 07 Mar 2022 05:51:59 -0500 Received: from eggs.gnu.org ([209.51.188.92]:37648) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nRAMo-0004x0-FX for qemu-devel@nongnu.org; Mon, 07 Mar 2022 05:13:26 -0500 Received: from [2a00:1450:4864:20::332] (port=40742 helo=mail-wm1-x332.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nRAMm-0004Ps-AZ for qemu-devel@nongnu.org; Mon, 07 Mar 2022 05:13:25 -0500 Received: by mail-wm1-x332.google.com with SMTP id bi14-20020a05600c3d8e00b00386f2897400so5246174wmb.5 for ; Mon, 07 Mar 2022 02:13:23 -0800 (PST) Received: from localhost.localdomain ([185.126.107.38]) by smtp.gmail.com with ESMTPSA id l10-20020a7bc44a000000b003899263bab1sm6609674wmi.20.2022.03.07.02.13.20 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 07 Mar 2022 02:13:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=sjqdeQnFVDOxsZhUeJhTFcRMhF0JVoSy8TW73eBt5/Q=; b=YZcaqgPJBrnCERZ4SecTFi6pesRg/42zT/tzzF/y+NvROErqPsUEX8upDOuv/Cne5A 83sF+q1MI91OGXSnNMNDigyN6da1XMoeSxyf+M6WWA7WSgbCYVX4GqgAyOM+7NJlvDlL 17Kk7I1b2A+eF5Hm8VUwVk1W4TGQ00Y0CqBUE5X0JXCbQqYi4No4PYh1bT4LEMRyNzMF zxQqPFGI/6guPHmMa5dvntK7Um0WRFgGflzVy3rfnrYcZmg5bi4woVPukRFKgTWMwM2t /19XfFEh7+vG0R0iiyHmLzFFsXPeyoKNcQJO9tcK2TipzhZAXarnhDFE1GLUWjV1W5G8 ntnA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=sjqdeQnFVDOxsZhUeJhTFcRMhF0JVoSy8TW73eBt5/Q=; b=Wy7d8X9r+wYwjsaJiAQs87XYtq04LZkre2h+U+DDAgUHFyjCQeKFaPFx4CLuKKR9+J ati04fqQNrCmrW5pEPXl1ycIrZyrlZucjzymiXmpQw05puRKkjW9LSRXAGk+bhBwSPva GnkOGDW+6s2GoUkHfQ3hoZNfJrWDrALT6cPhDzap+HFDBTbiCNgudpoKVNNWOmMh3QvQ 3oK8E+rSPIzMdATgFmkJQK7tvQxsbIS1Ux6/H87ly4u0ItKGgHmY73vDS0Ye7s+O2zj5 lSkLx4iQR7zgmjkxpPga0ogWSIaFXmeRi6BoRewQQyA97eRBquZD4gFiyNkkNK7zMie4 dn2w== X-Gm-Message-State: AOAM532Ma8ZzZl8kzhSu5aco50i1yarzBuIahb8q/7uLji4p869UhSJ4 tSMbmlQiW1qpe3wLH1oCpsxzXC9sEMQ= X-Google-Smtp-Source: ABdhPJz9AXjb5jkTQZ0RXTEZ272tpMtXdoRwadarVV7C0fwt2I/8rhnK/uBTyo6LukyH3rn6jLbpWg== X-Received: by 2002:a05:600c:2314:b0:381:8931:2387 with SMTP id 20-20020a05600c231400b0038189312387mr18028074wmo.76.1646648002675; Mon, 07 Mar 2022 02:13:22 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 15/16] isa: Inline and remove one-line isa_init_irq() Date: Mon, 7 Mar 2022 11:12:06 +0100 Message-Id: <20220307101207.90369-16-philippe.mathieu.daude@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220307101207.90369-1-philippe.mathieu.daude@gmail.com> References: <20220307101207.90369-1-philippe.mathieu.daude@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::332 (failed) Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::332; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wm1-x332.google.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 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, FREEMAIL_FROM=0.001, PDS_HP_HELO_NORDNS=0.659, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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: , Cc: Corey Minyard , Aleksandar Rikalo , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Gerd Hoffmann , Bernhard Beschow , Stefan Berger Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1646650321535100001 From: Bernhard Beschow isa_init_irq() has become a trivial one-line wrapper for isa_get_irq(). It can therefore be removed. isa_ipmi_kcs) Signed-off-by: Bernhard Beschow Reviewed-by: Stefan Berger (tpm_tis_isa) Acked-by: Corey Minyard (isa_ipmi_bt, Reviewed-by: Philippe Mathieu-Daud=C3=A9 Acked-by: Gerd Hoffmann Message-Id: <20220301220037.76555-8-shentey@gmail.com> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- hw/isa/piix4.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/isa/piix4.c b/hw/isa/piix4.c index fc3c8b3fd1..8607e0ac36 100644 --- a/hw/isa/piix4.c +++ b/hw/isa/piix4.c @@ -216,7 +216,7 @@ static void piix4_realize(PCIDevice *dev, Error **errp) if (!qdev_realize(DEVICE(&s->rtc), BUS(isa_bus), errp)) { return; } - isa_init_irq(ISA_DEVICE(&s->rtc), &s->rtc.irq, s->rtc.isairq); + s->rtc.irq =3D isa_get_irq(ISA_DEVICE(&s->rtc), s->rtc.isairq); } =20 static void piix4_init(Object *obj) --=20 2.34.1 From nobody Sat May 18 19:12:37 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=gmail.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1646650286646162.04875224165983; Mon, 7 Mar 2022 02:51:26 -0800 (PST) Received: from localhost ([::1]:41274 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nRAxZ-00066m-Gs for importer@patchew.org; Mon, 07 Mar 2022 05:51:25 -0500 Received: from eggs.gnu.org ([209.51.188.92]:37670) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nRAMs-00052Q-ED for qemu-devel@nongnu.org; Mon, 07 Mar 2022 05:13:30 -0500 Received: from [2a00:1450:4864:20::32b] (port=39901 helo=mail-wm1-x32b.google.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nRAMq-0004Q9-VR for qemu-devel@nongnu.org; Mon, 07 Mar 2022 05:13:30 -0500 Received: by mail-wm1-x32b.google.com with SMTP id o18-20020a05600c4fd200b003826701f847so10415563wmq.4 for ; Mon, 07 Mar 2022 02:13:28 -0800 (PST) Received: from localhost.localdomain ([185.126.107.38]) by smtp.gmail.com with ESMTPSA id a10-20020a7bc1ca000000b00389bc87db45sm648826wmj.7.2022.03.07.02.13.26 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 07 Mar 2022 02:13:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=79rWpr963VJk+lg9R1mhD2p10j2yYBoHlGspCnGAQpY=; b=abZj0anbzq3P0KEE//sn2dOp5vEeNkDtSgArgscTT/9soNTUnggvWJUMOv1+ihpHiY JpotHcuzhJAu/xgDzfWmC7ic7MRxCfNjg/RfQrTG0Zp2aDKc/IMCVfPZnlkI8AMF0+ox 7HOQ0eGdv3ZOFAVsxyDrskJ8OcIOXWp/nqIbHIBN3bdg+SsctXseRKcS1eOkCGXomM+r 92aJYKk/4GCGGnM8o845mrxE5YjrnDfWEbmjY7G0PaeCIZTxVyelVgCvKy0LFqY4x7vK RpAhWR5TqoVsWPE7ukK/gzlO/o6cHUw/00W9gsyEAO5nmqF/0hzHgmsDRstWv9nOPDMm 2CpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=79rWpr963VJk+lg9R1mhD2p10j2yYBoHlGspCnGAQpY=; b=i29x81jhDYsJtp9ritMAHSl9/7fhGdZX/OH3Y2sqeoVapNOCSs/oKXJ4oCB/i1aGdW TGRClkCjqvRG/bBG4RmWGgabom6oI6OzQglhz51sNQuN+Wd2xT2fkqh3IQCzUc0XTTLs piiuCE1AEWkVNg8p1trGu/11TmMeLI3q+jJulMs15grL+YdLZ/b0c2wVtvdhsigyhUs7 3hPxRJr2yy1BzpcPohhQe5+izWOrn4cgqxXtLII2fHjkJacCVxsF6dMjo4ao/bET4CFb pKMLsDabNHUSAe07YZyGn6Fgc+PvE1YHsOCBVV+csv5+r/OqCI2VyijL9N6ILs9331mN BlWw== X-Gm-Message-State: AOAM531swVMk+U26SfG2PCY/Ac/ecy7F42OK7/V/2tJco14QjlL2iLEw hrLf/jQwiiEOsE41RmFnxndufGcrB4s= X-Google-Smtp-Source: ABdhPJyUsrAk4tTxz6AE/ijQpVCvN5n0+x6wFn//Qgr/lKFVL90vIHNYeHDu2pSRFYdg7uYJGrnI/Q== X-Received: by 2002:a7b:ce95:0:b0:386:bc81:c912 with SMTP id q21-20020a7bce95000000b00386bc81c912mr17575696wmj.4.1646648007427; Mon, 07 Mar 2022 02:13:27 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 16/16] tests/avocado/linux_ssh_mips_malta.py: add missing accel (tcg) tag Date: Mon, 7 Mar 2022 11:12:07 +0100 Message-Id: <20220307101207.90369-17-philippe.mathieu.daude@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220307101207.90369-1-philippe.mathieu.daude@gmail.com> References: <20220307101207.90369-1-philippe.mathieu.daude@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a00:1450:4864:20::32b (failed) Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32b; envelope-from=philippe.mathieu.daude@gmail.com; helo=mail-wm1-x32b.google.com X-Spam_score_int: -6 X-Spam_score: -0.7 X-Spam_bar: / X-Spam_report: (-0.7 / 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, FREEMAIL_FROM=0.001, PDS_HP_HELO_NORDNS=0.659, RCVD_IN_DNSWL_NONE=-0.0001, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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: , Cc: Aleksandar Rikalo , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Cleber Rosa Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1646650288511100001 From: Cleber Rosa Being explicit about the accelerator used on these tests is a good thing in itself, but it will also be used in the filtering rules applied on "make check-avocado". Signed-off-by: Cleber Rosa Reviewed-by: Philippe Mathieu-Daud=C3=A9 Message-Id: <20220225210156.2032055-6-crosa@redhat.com> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- tests/avocado/linux_ssh_mips_malta.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/avocado/linux_ssh_mips_malta.py b/tests/avocado/linux_ss= h_mips_malta.py index c0f0be5ade..0179d8a6ca 100644 --- a/tests/avocado/linux_ssh_mips_malta.py +++ b/tests/avocado/linux_ssh_mips_malta.py @@ -23,6 +23,9 @@ @skipUnless(os.getenv('AVOCADO_TIMEOUT_EXPECTED'), 'Test might timeout') @skipUnless(ssh.SSH_CLIENT_BINARY, 'No SSH client available') class LinuxSSH(QemuSystemTest, LinuxSSHMixIn): + """ + :avocado: tags=3Daccel:tcg + """ =20 timeout =3D 150 # Not for 'configure --enable-debug --enable-debug-tcg' =20 --=20 2.34.1