From nobody Sat Apr 5 17:27:09 2025 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; 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=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1737821278; cv=none; d=zohomail.com; s=zohoarc; b=PVJqGulFYnmidFNDlTV0+OHe/qL3B88skbIL73pTMioTHlJ8HGOBUoAbB0DBWrYk1a33e5jpHeQNZ8nZQPbeoQPy7eHS8tKrykzRIiPk9WsZSWhVQaMB/+xLyf3XlDwiu67v61bzTgpfyXAnrEGTYRmzuNt5UN5ENniacb7aUKE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1737821278; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=srYqpBi+i1JHdcQoMXjqQayhwRKKfnrZUrD1yEs/h/w=; b=gvA39Glmp5PJGR/MtvXPWU7giyMms9W4WMjceSibBCwMh5MJn0b4qqhdYOhxIPxgyAOyXi77NKcNtfCxDdM+JVxdncNpx0uNiO3GAePT3zoUufyJDyxLDYetrgvGUjm9wuW0eBD3K0WqcxyFZABCzc/6BqOvg+oi3oDmCELUnNU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; 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=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1737821278883917.7254351675894; Sat, 25 Jan 2025 08:07:58 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tbigN-0004fm-P0; Sat, 25 Jan 2025 11:06:51 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tbigJ-0004UQ-Ht for qemu-devel@nongnu.org; Sat, 25 Jan 2025 11:06:49 -0500 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tbigI-0000l3-3L for qemu-devel@nongnu.org; Sat, 25 Jan 2025 11:06:47 -0500 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-436ce2ab251so19732115e9.1 for ; Sat, 25 Jan 2025 08:06:45 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-438bd4fa3efsm66192825e9.2.2025.01.25.08.06.43 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Sat, 25 Jan 2025 08:06:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737821204; x=1738426004; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=srYqpBi+i1JHdcQoMXjqQayhwRKKfnrZUrD1yEs/h/w=; b=RBW5FcgW4VuHVfxx2aldE3jDYLYgjLtGzSURw3WzaOJ+eWgyFDscuX0hTdX5xlSpvx zVUbL35L0fCu/7DbddAG0QUmPoZGgDXR/Ddw1d76Gzj3LrfNraT00BiC/oiG9PzSd0jW LuWtPi83GPblKgzvGuaXRmieRB/kNmfvqLi1rDfaznxmWHPP5H4ug6snDxHBwxZ32GUN EMvHDR3V/ozwhV9rq1Fq9FuV2DFDE7kr0jRLAQT+MJgBnv9MmmWTmNt1IXyvpDjyPYGJ HC2BaRdWeyihaWXjOU2IdgUQP2k5+r9OCDxf3HoebxjzQC4qJW9fwyN+D4a+1GWtjOXF 4GBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737821204; x=1738426004; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=srYqpBi+i1JHdcQoMXjqQayhwRKKfnrZUrD1yEs/h/w=; b=Z5X6Ky7o5KotnesYb16wWMWoxN75Kx1dHWIdZ0ytsc9a6KCouUH5kMajlF6y0xVosc k5f482nJolX7sBu8C87lbmJnJEES5K/jkUM2AV86hfoRANyUh7vnVl+GKFIe/S962/o0 iTWFqD2oCL0jxKhpgeFZO4+4ieqXJJ8gRwG3V0XvtfZ3QHAkiTZNHBMQABBd86ausHHm 3EDPuMNktGbV/oWXfOjhR4E1lDbFQGAitqLY3mM3Ywl8BSzI8F/+iDkh5xuR5j00Fypp /R7/jcu0K0vyl+0tpC6bK7XGc2CAK+8ucJ/t2pZVa1kGHueeCnazECGrNLhF+KJJBSfi 0Rqg== X-Gm-Message-State: AOJu0YxPS3hLE5E95ZlWXSlMORK9jXS9B8s5ZZyvBFG4TGJvSIzQcHTt /nbQeE4tF4mbr50KNPQ/xvf/kP6LQqg6EF1f+zyarZiXMZDsN5vEXffTUoOVJmaHDDtuk+/lEKB gC88= X-Gm-Gg: ASbGncsFR27Kj/FiO2YUAG9hp7+Zo1Sio2wrqQFUrIlRgm4VERckYO6W8/mc9sgsI3F Mcz2SEf4NEHWxWbCxP3LFheFPJQW4tw301o5TGaOdJzrO4JP/PLbBs6NUa8GyM85AWMTdthOugX yRyuUyUhgeh6/dRn5TRXtg0GyL2XFyT+1grHA+p43pAI5C4uEAdYd2ucxX6JSZ10HFjk9tmfVLX AlSxRvi0um9vuUi/OtDh3SFTiKWOj341nk6fqe069oQX2iDhfwgf6upqz5TFp0GmLHo+DEbYs7e ZF4oI+bO3TDg0O6DhMq6pLUlgkZctTpYXlRpbbmaRiLXUvKRYoiFRxvxK8LO X-Google-Smtp-Source: AGHT+IEWu2i+YTLFqeAb4LRThmyQu41nXXGb1bDpdviB9wmM9QVgvklg2o1ID5kzpelR00ORWj2XiQ== X-Received: by 2002:a05:600c:4e07:b0:434:a802:e99a with SMTP id 5b1f17b1804b1-438913bec32mr310554025e9.4.1737821204358; Sat, 25 Jan 2025 08:06:44 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Richard Henderson , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v2 10/24] target/loongarch: Move has_work() from CPUClass to SysemuCPUOps Date: Sat, 25 Jan 2025 17:05:38 +0100 Message-ID: <20250125160552.20546-11-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250125160552.20546-1-philmd@linaro.org> References: <20250125160552.20546-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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=philmd@linaro.org; helo=mail-wm1-x335.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1737821279703019000 Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson --- target/loongarch/cpu.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/target/loongarch/cpu.c b/target/loongarch/cpu.c index d611a604704..20aba0e1fff 100644 --- a/target/loongarch/cpu.c +++ b/target/loongarch/cpu.c @@ -349,11 +349,9 @@ static void loongarch_restore_state_to_opc(CPUState *c= s, } #endif /* CONFIG_TCG */ =20 +#ifndef CONFIG_USER_ONLY static bool loongarch_cpu_has_work(CPUState *cs) { -#ifdef CONFIG_USER_ONLY - return true; -#else bool has_work =3D false; =20 if ((cs->interrupt_request & CPU_INTERRUPT_HARD) && @@ -362,8 +360,8 @@ static bool loongarch_cpu_has_work(CPUState *cs) } =20 return has_work; -#endif } +#endif /* !CONFIG_USER_ONLY */ =20 static int loongarch_cpu_mmu_index(CPUState *cs, bool ifetch) { @@ -835,6 +833,7 @@ static const TCGCPUOps loongarch_tcg_ops =3D { #include "hw/core/sysemu-cpu-ops.h" =20 static const struct SysemuCPUOps loongarch_sysemu_ops =3D { + .has_work =3D loongarch_cpu_has_work, .write_elf64_note =3D loongarch_cpu_write_elf64_note, .get_phys_page_debug =3D loongarch_cpu_get_phys_page_debug, }; @@ -860,7 +859,6 @@ static void loongarch_cpu_class_init(ObjectClass *c, vo= id *data) &lacc->parent_phases); =20 cc->class_by_name =3D loongarch_cpu_class_by_name; - cc->has_work =3D loongarch_cpu_has_work; cc->mmu_index =3D loongarch_cpu_mmu_index; cc->dump_state =3D loongarch_cpu_dump_state; cc->set_pc =3D loongarch_cpu_set_pc; --=20 2.47.1