From patchwork Wed Jun 17 21:02:25 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Foley X-Patchwork-Id: 190959 Delivered-To: patch@linaro.org Received: by 2002:a92:cf06:0:0:0:0:0 with SMTP id c6csp821316ilo; Wed, 17 Jun 2020 14:39:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzfMXG69MJhHkA3+WQNDYHy/vV7gECNST8trVH/eBRU+TQupfu4iyVlk5DUR2WNZ2gFyAf+ X-Received: by 2002:a25:d684:: with SMTP id n126mr1667486ybg.476.1592429970268; Wed, 17 Jun 2020 14:39:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592429970; cv=none; d=google.com; s=arc-20160816; b=YExs+rvFHgQ7wJi/xfit12wG6PLutxvlOtBrQGZAjiFWvrUVlSUu11M0SOLiH+GLh9 rr4VY7+9LEE+aU6MFFkd7iraEVYpGrC5+S6+CAFoLbzX5hkVIuD7AoxJ73hOByhitjap tBR1MGl0bFDvHBaDSQX2aR0T5v2WUhzxzHebukoSHhoHkkJM2z5/tUsp4kKrfSG63SE0 /3ZILStFXeg2r+h0Hy12NHuNBfj51jKASGnEGsQJPa7NyHsQIBwjmk5EmMs7uHm8J8+0 jV0VvBel6rh63ajietgqNO3s0AZD5XgY4HM1hKYPaBMdlGJvx6d2pBt5ctpX9B9CqHyW zJug== 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=xM5F5VKH4+4sC5/UG8rh4cawXyjUH8jNOSP42/FFGNs=; b=VTyMOlLsN4H0uE8CMCvwnK1oI30nDOpi82NNLBvFGWqwHT2TJd8QRUKWYqunQftCCc 7fj2t2oHdnvxcSvJs3UM2oilRvEf4HkVYS19ewo0Iu2EobpshJaR6Ge66Cl0li27L/ly POXuXoX0fAVaDf02NTUKYXEieX6sVXJMdyyv2PoSSdL6hi+oqY8NX2cNPfXVM0EekrBK EvvkFY+msigJPvGHY+X6B0BrLwrWRMYcXROI4EFGdDW1xr8nSm5O3NoRLjsg7e9GRmAz uzUeId0V/hpAoUdaYgSmU61El1C3uaPLbCeMkRvfwXM+f0MJKh1j8FB0lq944klmpwbH 1buw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=OFm64wZN; 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 e1si686159ybp.19.2020.06.17.14.39.30 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 17 Jun 2020 14:39:30 -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=OFm64wZN; 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]:52576 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jlfmL-0003Ox-KJ for patch@linaro.org; Wed, 17 Jun 2020 17:39:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38208) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jlfEv-0004hR-27 for qemu-devel@nongnu.org; Wed, 17 Jun 2020 17:04:58 -0400 Received: from mail-qt1-x844.google.com ([2607:f8b0:4864:20::844]:40085) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jlfEr-0000PX-Ed for qemu-devel@nongnu.org; Wed, 17 Jun 2020 17:04:56 -0400 Received: by mail-qt1-x844.google.com with SMTP id i16so2752568qtr.7 for ; Wed, 17 Jun 2020 14:04:52 -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=xM5F5VKH4+4sC5/UG8rh4cawXyjUH8jNOSP42/FFGNs=; b=OFm64wZNBrpW0k2TGETE/NApPmVP1ss5RBk7onAJHsQ7hcEsI6yN1SgiNrUrxHWD6J jYFFXroxefK9j4U+Fe0l9sR5wKekFRc1sW23R2+58zenplFK0YRODgS2w9pMy27xk8jL ZGNIfJtGlMGRN4N8U0x3cijwymopup+N2W6/P8Qlx92y4bqIKCYW2PBAvilqLXBP07AG XDSi0RMEblKmIye1sOOu4k1vm5jBSrRWE0B+8TIV1nUgqEEt4tRxIwd0tdrFCUmXpJPr wNkoEtWWW5e2K1Cj9S9JDFQXqNjygPb1PG18bNZjNHJTojEq5DVtfdDwlcC/pVEdNwOa B6ew== 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=xM5F5VKH4+4sC5/UG8rh4cawXyjUH8jNOSP42/FFGNs=; b=sMO6d1kdjRw5JmbZ/jiISflmicjHDTt9vqbM+J+O4efsoW4Bo2JNDcsBc0ASvujYw0 sFtidjbe1rPt74iLxX8kDxk1DKABf71yCBa/oBwr3K/rpfFfVcdsetgqTMppgqOH8ol/ yqDuDD3RQvsr7ppqm6frC1TGlKNOsjqF/f8l+/Yu546oYHK6Zs0/fQEdyl75xXOk0HpX G1aMQWwcN2kFRazCpuUnUCG+XqTqfX79bWh4urckPehcdb2sxREhiL7V147B2Nx8QCVF IKriTQKo5U4nYxzdyp7a48t1K7UG5QlEZzUpluUyq/XebY8XF6VuTQN8NYnzUOFfxenm Ju6Q== X-Gm-Message-State: AOAM530yOPZ2ZB7KUFqS41YdfbCO53Wx/8ZRBU6RKoxJvNR1YdzRRinm DNM2sm0HHdjlhkSdov/DFPY2PgvJbZVntw== X-Received: by 2002:ac8:7a90:: with SMTP id x16mr1085647qtr.233.1592427892159; Wed, 17 Jun 2020 14:04:52 -0700 (PDT) Received: from Rfoley-MA01.hsd1.ma.comcast.net ([2601:199:4480:60c0:fc79:714c:9711:2e9c]) by smtp.gmail.com with ESMTPSA id w13sm997245qkb.91.2020.06.17.14.04.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jun 2020 14:04:51 -0700 (PDT) From: Robert Foley To: qemu-devel@nongnu.org Subject: [PATCH v10 67/73] sparc: convert to cpu_has_work_with_iothread_lock Date: Wed, 17 Jun 2020 17:02:25 -0400 Message-Id: <20200617210231.4393-68-robert.foley@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200617210231.4393-1-robert.foley@linaro.org> References: <20200617210231.4393-1-robert.foley@linaro.org> Received-SPF: pass client-ip=2607:f8b0:4864:20::844; envelope-from=robert.foley@linaro.org; helo=mail-qt1-x844.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_HELO_NONE=0.001, SPF_PASS=-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, Mark Cave-Ayland , cota@braap.org, peter.puhov@linaro.org, alex.bennee@linaro.org, Artyom Tarasenko 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: Artyom Tarasenko Reviewed-by: Richard Henderson Acked-by: Mark Cave-Ayland Signed-off-by: Emilio G. Cota Signed-off-by: Robert Foley --- target/sparc/cpu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) -- 2.17.1 diff --git a/target/sparc/cpu.c b/target/sparc/cpu.c index cef25238a5..3fa1a535d9 100644 --- a/target/sparc/cpu.c +++ b/target/sparc/cpu.c @@ -704,6 +704,8 @@ static bool sparc_cpu_has_work(CPUState *cs) SPARCCPU *cpu = SPARC_CPU(cs); CPUSPARCState *env = &cpu->env; + g_assert(qemu_mutex_iothread_locked()); + return (cpu_interrupt_request(cs) & CPU_INTERRUPT_HARD) && cpu_interrupts_enabled(env); } @@ -863,7 +865,7 @@ static void sparc_cpu_class_init(ObjectClass *oc, void *data) cc->class_by_name = sparc_cpu_class_by_name; cc->parse_features = sparc_cpu_parse_features; - cc->has_work = sparc_cpu_has_work; + cc->has_work_with_iothread_lock = sparc_cpu_has_work; cc->do_interrupt = sparc_cpu_do_interrupt; cc->cpu_exec_interrupt = sparc_cpu_exec_interrupt; cc->dump_state = sparc_cpu_dump_state;