From patchwork Thu May 21 16:40:02 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Foley X-Patchwork-Id: 1295410 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=nongnu.org (client-ip=209.51.188.17; helo=lists.gnu.org; envelope-from=qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=linaro.org header.i=@linaro.org header.a=rsa-sha256 header.s=google header.b=w6ewQJaV; dkim-atps=neutral Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49Sbgf1f1Yz9sRW for ; Fri, 22 May 2020 03:09:02 +1000 (AEST) Received: from localhost ([::1]:49154 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jbogl-0004DG-V4 for incoming@patchwork.ozlabs.org; Thu, 21 May 2020 13:08:59 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50202) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jboJH-0004ab-SH for qemu-devel@nongnu.org; Thu, 21 May 2020 12:44:43 -0400 Received: from mail-qk1-x743.google.com ([2607:f8b0:4864:20::743]:33301) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jboJG-0006n2-Ms for qemu-devel@nongnu.org; Thu, 21 May 2020 12:44:43 -0400 Received: by mail-qk1-x743.google.com with SMTP id z80so7921281qka.0 for ; Thu, 21 May 2020 09:44:42 -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=Gn2vKDOISxQzKy44RYpzzeOAg/5NGEBTOA6wtcYZvN4=; b=w6ewQJaVNHlfqxUwmcl94B40fhD4pjmyTDUwV9aACZqsZay3ux3wsq6a9AedtIdZ4O 9TBgFrhwzNqBYP8y1lISG4kf3zfd6vpiBY11hAFTCoTPzeCEVCDriJ7s2PnBKZszu1Gz PFOKQi8J4XEkujUsy4qrCyJbW/Qachj+BP4hUAD3Rx0KOghPOIVK6hcPjW7ag9+FKIW7 y7reI1ZjXcm3+QnH3IpHMc+YdbWNN2+v/TIbR1vVP/JwLe7SL4qvvrDjAoGUwQ2clk7Z pVnDGNF+Wwwlji3Z+xE1CpSPz9N3b98mgXi0YqUCl47NyHLOqMN2jpxK8CflPflZ1xoz UT7g== 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=Gn2vKDOISxQzKy44RYpzzeOAg/5NGEBTOA6wtcYZvN4=; b=JDCrlwHu6nngK9OgD/CeifUm+MPmPzxShbf2BwOzgY567Bzu8g1miikzTuUzOR4C6I RkX29sP36m8tnwjFi3s/2IrzF5ytVblBkqLytQTot4lmtOVS2VS9hwCnxmvgj4F+JLal ulcuNy4MBJ4Cdb6ClLAFNvcs6YSDAu9asVR/FK1hqiwq/nwltwZHaYOw/jOWw+RqLv1R YbyNW6vmJDleGLsbG1S8SZfOCxy/mCf19sdwQQKLNW8xxk1kbrDmYwPY1fxwr0oQt2Wz P9A/ilvk9NQXDyMQR0Gj4LeZXryFRZNzQi/2x2/bxIQWJ06Lf7vvJfI3tEVOyQ4eRazJ QOrA== X-Gm-Message-State: AOAM533HSRgAEbf2f2U54h2vJrynjmYavU68v2ZEVQcIDCWIeMXQmc7E nXEkOfXHb6LQFri7CsuVdzHQsAPcNfoa3g== X-Google-Smtp-Source: ABdhPJxUOFG5AU32hHpb9iIRytixrzjcqFY3Ps0ryUK3ULJpyzY+5i0HLTIM22K4qI8eeSzfb8JyVA== X-Received: by 2002:a37:a42:: with SMTP id 63mr11126690qkk.399.1590079481587; Thu, 21 May 2020 09:44:41 -0700 (PDT) Received: from Rfoley-MA01.hsd1.ma.comcast.net ([2601:199:4480:60c0:1944:c530:655c:5583]) by smtp.gmail.com with ESMTPSA id x24sm5923829qth.57.2020.05.21.09.44.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 May 2020 09:44:40 -0700 (PDT) From: Robert Foley To: qemu-devel@nongnu.org Subject: [PATCH v9 65/74] mips: convert to cpu_has_work_with_iothread_lock Date: Thu, 21 May 2020 12:40:02 -0400 Message-Id: <20200521164011.638-66-robert.foley@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200521164011.638-1-robert.foley@linaro.org> References: <20200521164011.638-1-robert.foley@linaro.org> Received-SPF: pass client-ip=2607:f8b0:4864:20::743; envelope-from=robert.foley@linaro.org; helo=mail-qk1-x743.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action 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, richard.henderson@linaro.org, Aleksandar Markovic , cota@braap.org, peter.puhov@linaro.org, alex.bennee@linaro.org, Aurelien Jarno Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: "Qemu-devel" From: "Emilio G. Cota" Soon we will call cpu_has_work without the BQL. Cc: Aurelien Jarno Cc: Aleksandar Markovic Reviewed-by: Richard Henderson Signed-off-by: Emilio G. Cota Signed-off-by: Robert Foley --- target/mips/cpu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/target/mips/cpu.c b/target/mips/cpu.c index 761d8aaa54..ec9dde5100 100644 --- a/target/mips/cpu.c +++ b/target/mips/cpu.c @@ -58,6 +58,8 @@ static bool mips_cpu_has_work(CPUState *cs) bool has_work = false; uint32_t interrupt_request = cpu_interrupt_request(cs); + g_assert(qemu_mutex_iothread_locked()); + /* * Prior to MIPS Release 6 it is implementation dependent if non-enabled * interrupts wake-up the CPU, however most of the implementations only @@ -193,7 +195,7 @@ static void mips_cpu_class_init(ObjectClass *c, void *data) device_class_set_parent_reset(dc, mips_cpu_reset, &mcc->parent_reset); cc->class_by_name = mips_cpu_class_by_name; - cc->has_work = mips_cpu_has_work; + cc->has_work_with_iothread_lock = mips_cpu_has_work; cc->do_interrupt = mips_cpu_do_interrupt; cc->cpu_exec_interrupt = mips_cpu_exec_interrupt; cc->dump_state = mips_cpu_dump_state;