From patchwork Tue Jan 21 14:23:30 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 858976 Delivered-To: patch@linaro.org Received: by 2002:adf:fb47:0:b0:385:e875:8a9e with SMTP id c7csp225864wrs; Tue, 21 Jan 2025 06:34:27 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCXo98dgKRgzZQ1BrY0dds/kGqjugo6uRR+0Zfj9GFbv87K4novy2KEQ6LOwX1gSJDrkQJSZyw==@linaro.org X-Google-Smtp-Source: AGHT+IGdNE5U9YTKvVbXu3zp792NjR1/PYOT/mbiYeJleFtbe4NLw3kBlUTCrJT2kuoS8kGh5syq X-Received: by 2002:a05:620a:1793:b0:7b1:492c:ba83 with SMTP id af79cd13be357-7be6321993amr2354310185a.10.1737470067192; Tue, 21 Jan 2025 06:34:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1737470067; cv=none; d=google.com; s=arc-20240605; b=htn7tm+YydXUMTqxj4zTxYXnHeLuPwvfgKtxN2TNRPpOXBnCG5Ajqih/hunDjB3mq/ 6Skd2QcwYwuEmDrN9qvdrTCrI2HXz97DJsPNOKTbzpO3A+gOyBDhHLIljZ9t+U8VUSw6 aD4jDkJScGaOGSs96WxJZ5L7iIclR8psapR8uoNZv3QXgUuhHYWdgfAJ6sswH7G2LMf7 I1FUk2SfyykcXGJh0AvPyIWa8x/eepcGg8OpiMwCt4HtB3Mm6N2ktNjKfb3W7P82gDb2 Beshsznoo3rPYC4DwolQgMqSoBvXXNWXTdzaSywp7LiTsEFzUKs7pa1fNm4u+i1pYODm 8vmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=km3kArmfsAMK0iy+xJz4rtnl5tZfE33rr6rRoUamFRE=; fh=T9nLPmYdz8kSl8qI33evWuh/VVTqN+U2Q3T/ETy8raQ=; b=LffYZ2f8vsVPaT+Z4BZudpmzHzc7Q91oIyqn3/sXgp3e2p3pguQ/sD8nD0qgm1rbR5 2ZucyYBu8g0XHgFO/rJeS0OEqPgg67fQX4nZPBqGy0tyEkrUVLdKTy17Iu5wSFR9hHVb rfDdIWRSyIC6MUxDRTITZoPHnDQWvfVg277MScTNZa+OO9w+jpbV/1uVlhVGxLg5OfAL b342faw8jxAeoCwE4o3OuJsY2wxkjYUfJoVroO824MwHbscT06i5gm7Hgt9Ajc08eR5t yvHvn8WApQD8nK9z2HMpzduqmL3BqMMgBhQo61QODR4PkDf2rJ3XyyowZ647tfdOt0Ep 9tTg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=esELUc+i; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-46e1048a4fcsi118558381cf.494.2025.01.21.06.34.27 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 21 Jan 2025 06:34:27 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=esELUc+i; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1taFCa-0002li-3c; Tue, 21 Jan 2025 09:26:01 -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 1taFBm-0001zP-AL for qemu-devel@nongnu.org; Tue, 21 Jan 2025 09:25:17 -0500 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1taFBj-0003Tw-27 for qemu-devel@nongnu.org; Tue, 21 Jan 2025 09:25:09 -0500 Received: by mail-wr1-x42f.google.com with SMTP id ffacd0b85a97d-3862a921123so4054408f8f.3 for ; Tue, 21 Jan 2025 06:25:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1737469505; x=1738074305; 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=km3kArmfsAMK0iy+xJz4rtnl5tZfE33rr6rRoUamFRE=; b=esELUc+iZAUrjFGWCOfV8xw8hhaKtoJauqZoaLOo4lWl+m7BDiaxuiHsX11apIorFm ymoIt4Stq4KdgQRiyZaX2Ea3MVPIP0HT8VK/4r1KmXlPKwQIJs5LwW0xGJ1SLSA7m6WB pREm4f6j1QH3cK9akG2iLCWv92WlqDEc0yKQTh8RSrdT+Cvi0k6vex489pIRRZkNIbzd xlaDwnvcjvpl3S4X+2bJRdugwpDWzKL3eLZQ1CRtliziSDrNIwzA6Fnm3WaDtroTvy1d ulVGVdGDavBa5VXX2iUxNFRoP0AOJPzCMrq98ruoE5+AL/xi1WOF2ndh7yfE++TsnDk2 jKmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737469505; x=1738074305; 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=km3kArmfsAMK0iy+xJz4rtnl5tZfE33rr6rRoUamFRE=; b=DK7f0/ZO5Iw09pANaj9betHjud8EYxUBndkugeuEg6zXjPdxiN+XC4ya4MoD81awM9 XGSUA81xXIBpuxkm7JwiXHNBI7ul0Zt8n+hPXL4bPbgky/994Ju5omh4R5cqG/g9Psiz SdMsLxZ/7A7fi233VO1MRh2tlyuq8nbFwjdA4x//r3J6Z3nMr4SpU0qGbQS49GFOhigZ bJidrQChIwe26XLbMVHJ+Y9e59t17Re0BR9M+QPTyfjvI4tJO3tbjjyE00KJ9cxkEZGH I5qojH3WNug6664Ws7qapYwSymJZaKqfEA5y1NZVoFCRRIE0eJaAeo+LdaNyzub/zru1 uU9A== X-Gm-Message-State: AOJu0Yya6e43uC+7gatWUzwQVjS19S+StIdnfK2V2fW2tz8kcPutjsQ3 Y5SP1R9QxCoHAJA/Z99dSRZXvtYPz/iKe3IHUhrw52D9/PdoaJv+PKBLRhDkyGMJ1VDMGmwjh3U wEcg= X-Gm-Gg: ASbGncvhHaiFoRnoeIwQy3fyvagCGjCvYiVqOyXr4PChlKRPK7oDhwxYBONs6iLp8/V HtbE1veViup4LUQVtxqQ5AzTpu9TRAPx7IS2BQCJ21zjBFrtQVglonKTPPi0nJLPKcNDsYUb4sU V4Tidw8h6Kw9ZNmDDIV5gwMcUiIaOQr2Pz7LZkEy8bbVqLTRgNf+YZ36gt4FAtIkr1v2ibZO/tO /+Iy+X9P688JJyuIdwCG6t77PnE+aDk+lUvsrbJFkLVVdR+Vdy6t7JMM7/OI3imjGlYwstjMaox 7wZV64FLaVMhDabaazG0HHwL6pMebnYjRWlVN1MNaHmS X-Received: by 2002:a5d:4f8d:0:b0:385:e5d8:3ec2 with SMTP id ffacd0b85a97d-38bf566f8damr11608978f8f.28.1737469504953; Tue, 21 Jan 2025 06:25:04 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38bf327e1fdsm13688194f8f.94.2025.01.21.06.25.04 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 21 Jan 2025 06:25:04 -0800 (PST) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-arm@nongnu.org, qemu-s390x@nongnu.org, qemu-riscv@nongnu.org, qemu-ppc@nongnu.org, Paolo Bonzini , Richard Henderson , =?utf-8?q?Philippe_Mathie?= =?utf-8?q?u-Daud=C3=A9?= Subject: [PATCH 17/28] target/mips: Move has_work() from CPUClass to SysemuCPUOps Date: Tue, 21 Jan 2025 15:23:30 +0100 Message-ID: <20250121142341.17001-18-philmd@linaro.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250121142341.17001-1-philmd@linaro.org> References: <20250121142341.17001-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::42f; envelope-from=philmd@linaro.org; helo=mail-wr1-x42f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Move has_work() from CPUClass to SysemuCPUOps and cpu_mips_hw_interrupts_enabled() to system. Signed-off-by: Philippe Mathieu-Daudé --- target/mips/internal.h | 4 ++-- target/mips/cpu.c | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/target/mips/internal.h b/target/mips/internal.h index 91c786cff8a..28eb28936ba 100644 --- a/target/mips/internal.h +++ b/target/mips/internal.h @@ -162,8 +162,6 @@ void cpu_mips_store_cause(CPUMIPSState *env, target_ulong val); extern const VMStateDescription vmstate_mips_cpu; -#endif /* !CONFIG_USER_ONLY */ - static inline bool cpu_mips_hw_interrupts_enabled(CPUMIPSState *env) { return (env->CP0_Status & (1 << CP0St_IE)) && @@ -206,6 +204,8 @@ static inline bool cpu_mips_hw_interrupts_pending(CPUMIPSState *env) return r; } +#endif /* !CONFIG_USER_ONLY */ + void msa_reset(CPUMIPSState *env); /* cp0_timer.c */ diff --git a/target/mips/cpu.c b/target/mips/cpu.c index 47cd7cfdcef..0b3ac4e60a3 100644 --- a/target/mips/cpu.c +++ b/target/mips/cpu.c @@ -132,6 +132,7 @@ static vaddr mips_cpu_get_pc(CPUState *cs) return cpu->env.active_tc.PC; } +#if !defined(CONFIG_USER_ONLY) static bool mips_cpu_has_work(CPUState *cs) { CPUMIPSState *env = cpu_env(cs); @@ -177,6 +178,7 @@ static bool mips_cpu_has_work(CPUState *cs) } return has_work; } +#endif /* !CONFIG_USER_ONLY */ static int mips_cpu_mmu_index(CPUState *cs, bool ifunc) { @@ -534,6 +536,7 @@ static ObjectClass *mips_cpu_class_by_name(const char *cpu_model) #include "hw/core/sysemu-cpu-ops.h" static const struct SysemuCPUOps mips_sysemu_ops = { + .has_work = mips_cpu_has_work, .get_phys_page_debug = mips_cpu_get_phys_page_debug, .legacy_vmsd = &vmstate_mips_cpu, }; @@ -577,7 +580,6 @@ static void mips_cpu_class_init(ObjectClass *c, void *data) &mcc->parent_phases); cc->class_by_name = mips_cpu_class_by_name; - cc->has_work = mips_cpu_has_work; cc->mmu_index = mips_cpu_mmu_index; cc->dump_state = mips_cpu_dump_state; cc->set_pc = mips_cpu_set_pc;