From patchwork Thu Mar 26 19:31:48 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Foley X-Patchwork-Id: 184921 Delivered-To: patch@linaro.org Received: by 2002:a92:de47:0:0:0:0:0 with SMTP id e7csp479144ilr; Thu, 26 Mar 2020 13:11:39 -0700 (PDT) X-Google-Smtp-Source: ADFU+vvq25VQFAWk/ZGjAtQ+vCZ50G6TYSfOszI19y7dgMzRPZ/aIyvIchRNEhFoL+7+QDigelxq X-Received: by 2002:ae9:e892:: with SMTP id a140mr10073817qkg.274.1585253499826; Thu, 26 Mar 2020 13:11:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1585253499; cv=none; d=google.com; s=arc-20160816; b=1DtNjccf5DO2RzIGNhR0NZTZc+Va7cAmPfj+sV6DJk9atFPDOmBnrK/W3s+JbTl5VO 5GxE5rPHKSr3VCdUix5BupmdyigHp2NxfOqPMbe6gT4tWVuemcyu/unCiiCwG3SUc7RQ QmdVg4M4vW6HpNOQLETBlDSlWQUnAnFtbIfgDPUERBmHQB5kfxrq0RGYVn3GlsYFzFlf /CBSbJ20kp0w4QrUnt3C4wqBlgBNfgLkfzdJLoD6WovcE84+KtmW316JJBwxNT8mlTlz l0gVVvx4wsjGs61d1T0kNiaMKoAHOFkT4PVEsyWxAxEN3gMWiWRrw1G9+ce8yLsYTtmh aPcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:references:in-reply-to :message-id:date:subject:to:from:dkim-signature; bh=1Q+PIOyWcMQmBhTsnZIFuAor/C++2Bjd3Zt2sBVNt6Q=; b=ktiwwekHEtyYpvLTVDUuLrN+s22sM/Mdk+QqNI7WqtmUPVKx7aZm+f/QyLJRD80DJj qpH/CWbh6ncEPaoBc8KFpKejYPZrplZoGTtnl38h87OCEimXepmbttvOwOy/RmouWfEZ msjhP8sJwLdWyqbSJMIznyNFbyB8otf7ZFN+jUdHZq0WfECmfqKZJ0TSInKdUKTo0has KYmLdTsaDruiQNC3UgSKgkDYReAU8iVSo2gxkPDbXHk8e976E4RJZ7rKY5v/w/zVizow dSYo5Y6D9mb7tl6DAqISGNdOfgUUim8Blmbvr1tULtqM0uuRlayHYnOJ73gN+qQUd+SP jYWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=GDuC+tXa; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id a14si2165258qtc.229.2020.03.26.13.11.39 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 26 Mar 2020 13:11:39 -0700 (PDT) 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=fail header.i=@linaro.org header.s=google header.b=GDuC+tXa; 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=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:59574 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jHYqp-0007c0-9U for patch@linaro.org; Thu, 26 Mar 2020 16:11:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59384) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jHYLL-0000CC-LZ for qemu-devel@nongnu.org; Thu, 26 Mar 2020 15:39:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jHYLK-0002CL-Iu for qemu-devel@nongnu.org; Thu, 26 Mar 2020 15:39:07 -0400 Received: from mail-qv1-xf44.google.com ([2607:f8b0:4864:20::f44]:32895) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jHYLK-0002C3-Fe for qemu-devel@nongnu.org; Thu, 26 Mar 2020 15:39:06 -0400 Received: by mail-qv1-xf44.google.com with SMTP id p19so3718437qve.0 for ; Thu, 26 Mar 2020 12:39:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=1Q+PIOyWcMQmBhTsnZIFuAor/C++2Bjd3Zt2sBVNt6Q=; b=GDuC+tXaw6A9r5ShqlJOFuGTnKALBxlZi4EPhvU+jINj1KY2Kn2q0GMh6ZFzqDiKDu V2C6wh09IJFk/EWAGI6wkwOjK4WWQMV7Ga+7dK5Meg7hOKq1GXcVngkSMxhh9/MTyzI6 hVvtpzFAcunVYdVxHb20avbHlsgr+9QTK74YVzZQ0Jq22AMqbqclJRWdkB6qGleJb20C EMEuAN+QxHoMjPxH/gs1S2D6iNjf3fRHWCM79PdT8+12rrOfWIG0dJcseEPIua113pJd mpSCPhal1Vbfi3PDvaD/gVOgDD9ib1YXCvXGm5EZjNPKhi4BmaJ6sL37oo+Pzw8ZvSMs K0Hg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=1Q+PIOyWcMQmBhTsnZIFuAor/C++2Bjd3Zt2sBVNt6Q=; b=iBX9lny4OdenNdF3TkUYeeKJxL63nuah4HcSf4x6pHsjhHiWOkNg2Apb9y/n7bC3X2 yrOUyGLy08gfR/Io0VTiKczQ5GN/fmWesIZPw3H8lPqL5oKBn3XE6ECTB4507gZ2pRYY VeVXbym09htVXJ2hd3h4ej92piMo80nAOg+2WKvpT2a6NFlsSPZhQvm3DM4SxeS3DRIp 0Y0EFuyvfbt1jM7fWk6FsZxx7RkJqV55M2k6VT7zPyKpeRtqsZqOhqiuJzJR8uNBq38E yto0ZnjaUv4vPIHUuvxU0unapmPghTpi94Xy+q/hio9YKpHmuXVbLUHYi1S8vOpO1/vb Dfzg== X-Gm-Message-State: ANhLgQ0m8nCbouqE5PjYpcYZYHfpMjrE6JkZ0AsciiytqKcLk5maDIb3 ElZ50Fm1loogspMkNDGkHchk50pQu6nBsA== X-Received: by 2002:ad4:53a2:: with SMTP id j2mr10105749qvv.145.1585251545718; Thu, 26 Mar 2020 12:39:05 -0700 (PDT) Received: from Rfoley-MA01.hsd1.ma.comcast.net ([2601:199:4480:60c0:fd55:4e67:1038:8302]) by smtp.gmail.com with ESMTPSA id u51sm2161916qth.46.2020.03.26.12.39.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Mar 2020 12:39:05 -0700 (PDT) From: Robert Foley To: qemu-devel@nongnu.org Subject: [PATCH v8 66/74] s390x: convert to cpu_has_work_with_iothread_lock Date: Thu, 26 Mar 2020 15:31:48 -0400 Message-Id: <20200326193156.4322-67-robert.foley@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200326193156.4322-1-robert.foley@linaro.org> References: <20200326193156.4322-1-robert.foley@linaro.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::f44 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: robert.foley@linaro.org, David Hildenbrand , Cornelia Huck , richard.henderson@linaro.org, qemu-s390x@nongnu.org, "Emilio G. Cota" , peter.puhov@linaro.org, alex.bennee@linaro.org Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: "Emilio G. Cota" Soon we will call cpu_has_work without the BQL. Cc: Cornelia Huck Cc: David Hildenbrand Cc: qemu-s390x@nongnu.org Reviewed-by: Richard Henderson Reviewed-by: Cornelia Huck Signed-off-by: Emilio G. Cota Signed-off-by: Robert Foley --- target/s390x/cpu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -- 2.17.1 diff --git a/target/s390x/cpu.c b/target/s390x/cpu.c index f1f206c763..04fd87026d 100644 --- a/target/s390x/cpu.c +++ b/target/s390x/cpu.c @@ -58,6 +58,8 @@ static bool s390_cpu_has_work(CPUState *cs) { S390CPU *cpu = S390_CPU(cs); + g_assert(qemu_mutex_iothread_locked()); + /* STOPPED cpus can never wake up */ if (s390_cpu_get_state(cpu) != S390_CPU_STATE_LOAD && s390_cpu_get_state(cpu) != S390_CPU_STATE_OPERATING) { @@ -482,7 +484,7 @@ static void s390_cpu_class_init(ObjectClass *oc, void *data) #endif scc->reset = s390_cpu_reset; cc->class_by_name = s390_cpu_class_by_name, - cc->has_work = s390_cpu_has_work; + cc->has_work_with_iothread_lock = s390_cpu_has_work; #ifdef CONFIG_TCG cc->do_interrupt = s390_cpu_do_interrupt; #endif