From nobody Tue Feb 10 05:46:55 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1610058307; cv=none; d=zohomail.com; s=zohoarc; b=JwXET4D8NTfi+YPvFcCB9gAfJPdiBYfRtxrhTksysBtbGjyAXM6qy6ll4HG6dXBuGxqHbtPSqueHnig1IU7BjMG4V62Nnk762gXzxvPKQykvUKePwIYXoMs92rw18J0jLdGZ6P9KPo+vqEh6jvuRODe6g4+Euk8iiiz5f7tLYwM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1610058307; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=LDza1xPJHLgPcRTP3LkN+2X1iZhd2c06drajcL8+MJU=; b=X+5YAEIGgUCim60DXJL9auFUSdbBNTJ2C11E0vLOUk3AW5J0BN5bbbAtuQZJB2aehHhJDr8CuXH0XxOMXiYcCJMEeXxZPxnp41DrMuwGzWcv9Mpic+3Ge+z/8IWWImGJWMuUXzI8iIthmYLW5fsfq051Wt0D09H92p0TkHyIvXI= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1610058307025484.0358087479143; Thu, 7 Jan 2021 14:25:07 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-480-iVcnokYcMU61hl2rQ7s5fQ-1; Thu, 07 Jan 2021 17:24:48 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 43ED4100C605; Thu, 7 Jan 2021 22:24:43 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 201C71724C; Thu, 7 Jan 2021 22:24:43 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id DF5CE5003A; Thu, 7 Jan 2021 22:24:42 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 107MOfjH029552 for ; Thu, 7 Jan 2021 17:24:41 -0500 Received: by smtp.corp.redhat.com (Postfix) id 4C3DA2166B29; Thu, 7 Jan 2021 22:24:41 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast06.extmail.prod.ext.rdu2.redhat.com [10.11.55.22]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 471652166B28 for ; Thu, 7 Jan 2021 22:24:41 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 33038185A794 for ; Thu, 7 Jan 2021 22:24:41 +0000 (UTC) Received: from mail-wr1-f41.google.com (mail-wr1-f41.google.com [209.85.221.41]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-27-vOMBcKFJPkytWhw_8G8XdQ-1; Thu, 07 Jan 2021 17:24:36 -0500 Received: by mail-wr1-f41.google.com with SMTP id t16so7143035wra.3; Thu, 07 Jan 2021 14:24:36 -0800 (PST) Received: from x1w.redhat.com (241.red-88-10-103.dynamicip.rima-tde.net. [88.10.103.241]) by smtp.gmail.com with ESMTPSA id k1sm10356498wrn.46.2021.01.07.14.24.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Jan 2021 14:24:34 -0800 (PST) X-MC-Unique: iVcnokYcMU61hl2rQ7s5fQ-1 X-MC-Unique: vOMBcKFJPkytWhw_8G8XdQ-1 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=LDza1xPJHLgPcRTP3LkN+2X1iZhd2c06drajcL8+MJU=; b=fBtq9mr+S9yJZzoff7uTRdrhIcoAA6TvMU3AwqoNPIi8EYZ+QUf8tjZrJ87kJmzhb8 1cel0LwUBSZcA1GE+mSoAHb65a+APk+KPB+6wUdV+THXfIQaysmNcDj34jTMF5VkSUED e7rEx+a6SH2aHYFpdt+F48R0sZpwova//DIJx1sHnzH/MwcjxXOxYFh4bi985RYYSFcf OS7wH83s+wtv6vF8B0s2vymiaqWU4B9uDv9lsnMgk9D4QrKpST4msYVonT9EyjNiTD63 d0/aLtUnqyGfhcf+SbkEjZGotRfCayD0lYMzPhHniVCmFMlzwRWHHE4HqnRk+3r8jLd/ 4nTQ== X-Gm-Message-State: AOAM533qzgziH6QdkwBjvDtI798cXJA35vJTtVE9O7XUR/0rKA+Ue8L9 7QFpczXhtnJM1weDARlkx3s= X-Google-Smtp-Source: ABdhPJzZbJj2jP0coNCZGst8B6hah0/bCVtvfFQLvcALnm39BBi1/wYWYtIpo/dUiEchSaYAkdfcWw== X-Received: by 2002:adf:e406:: with SMTP id g6mr657530wrm.255.1610058275274; Thu, 07 Jan 2021 14:24:35 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Subject: [PULL 19/66] target/mips: Inline cpu_state_reset() in mips_cpu_reset() Date: Thu, 7 Jan 2021 23:22:06 +0100 Message-Id: <20210107222253.20382-20-f4bug@amsat.org> In-Reply-To: <20210107222253.20382-1-f4bug@amsat.org> References: <20210107222253.20382-1-f4bug@amsat.org> MIME-Version: 1.0 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: libvir-list@redhat.com Cc: Aleksandar Rikalo , Paul Burton , kvm@vger.kernel.org, libvir-list@redhat.com, Huacai Chen , Richard Henderson , Laurent Vivier , Jiaxun Yang , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Paolo Bonzini , Aurelien Jarno X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Message-Id: <20201214183739.500368-2-f4bug@amsat.org> --- target/mips/cpu.c | 26 +++++++++----------------- 1 file changed, 9 insertions(+), 17 deletions(-) diff --git a/target/mips/cpu.c b/target/mips/cpu.c index 12126d37f16..4a251e2d3e8 100644 --- a/target/mips/cpu.c +++ b/target/mips/cpu.c @@ -104,10 +104,16 @@ static bool mips_cpu_has_work(CPUState *cs) =20 #include "translate_init.c.inc" =20 -/* TODO QOM'ify CPU reset and remove */ -static void cpu_state_reset(CPUMIPSState *env) +static void mips_cpu_reset(DeviceState *dev) { - CPUState *cs =3D env_cpu(env); + CPUState *cs =3D CPU(dev); + MIPSCPU *cpu =3D MIPS_CPU(cs); + MIPSCPUClass *mcc =3D MIPS_CPU_GET_CLASS(cpu); + CPUMIPSState *env =3D &cpu->env; + + mcc->parent_reset(dev); + + memset(env, 0, offsetof(CPUMIPSState, end_reset_fields)); =20 /* Reset registers to their default values */ env->CP0_PRid =3D env->cpu_model->CP0_PRid; @@ -330,20 +336,6 @@ static void cpu_state_reset(CPUMIPSState *env) /* UHI interface can be used to obtain argc and argv */ env->active_tc.gpr[4] =3D -1; } -} - -static void mips_cpu_reset(DeviceState *dev) -{ - CPUState *s =3D CPU(dev); - MIPSCPU *cpu =3D MIPS_CPU(s); - MIPSCPUClass *mcc =3D MIPS_CPU_GET_CLASS(cpu); - CPUMIPSState *env =3D &cpu->env; - - mcc->parent_reset(dev); - - memset(env, 0, offsetof(CPUMIPSState, end_reset_fields)); - - cpu_state_reset(env); =20 #ifndef CONFIG_USER_ONLY if (kvm_enabled()) { --=20 2.26.2