From patchwork Wed Jun 17 21:02:08 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Robert Foley X-Patchwork-Id: 190961 Delivered-To: patch@linaro.org Received: by 2002:a92:cf06:0:0:0:0:0 with SMTP id c6csp821945ilo; Wed, 17 Jun 2020 14:40:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzZGyJ+3LkSfx0Du6mnnfgBiHkvFJF9lOStrJKjQhK4y1k79RS2zeXBplDnk4WPk162I1DC X-Received: by 2002:a25:694d:: with SMTP id e74mr1592535ybc.195.1592430037690; Wed, 17 Jun 2020 14:40:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592430037; cv=none; d=google.com; s=arc-20160816; b=dWwqPdzr/yln0KM7vi8GkDlWvK1vy8lvlpvyz533zJmc+1f0qLU5uUsGHUJjgnoq05 78V0WitqNlfAC28fc8Q3axu+7fe/qFH6k1fRlKa8Koq8r92rOC4YMieHDkosXgfoVuRQ vnHf96j9QEbzvb8IaMECYQkmKocsL93ZOULevqu9PObPshXnfVbbsoV6HBcU7VPOW5IU mBxSQ1BjBZcBkG8Bnr5ZjY4yh8lL0dsl99DZe4aWC9VZWFbLSoI1r5UTOYmbrHDj5SVV N++Kcj2VCHDBdjkRCBruJQ47hkRoHZuYRwCbCP8MmwIzzDD8toyUHRVb3pkv6zjF3PMG +c3A== 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=8Q2sL8ohmf8wunp2u0YbDC2Iqv7PQMpqvb2Mr0aPlxc=; b=z8anRZu+ZN7l4TyOms6lHi9xWQIdI+kxMH16tnBbA4aM1nS1tQc5dmJ8QRIh7suijh GLnzHHrrIsx3SLOR+uTwsYMunWy9wQLnMZUS7O6EI5n2EWWf3Hp3KbKo1CiDXzVPPZyh sMxc+zFejMMKSERIJHQPMvbEqdk5dJhRfjqa02x38mRXKk/9qFIrZ8udna8xN3vgrdjT YqJwCusyqxYSHPlCiU7am860lko04NJoJNjUl6jdDMQIFBm2Yovv3i+5MhKa1YaOsCpJ dvkmdWcA1HPD/EPaf2px6uvLH+qQ6pwvzknTZxpy8G/4ORxFrgEUK+zO8YuumMDYOVNU oe4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=gNYKdFfH; 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 s88si838898ybi.345.2020.06.17.14.40.37 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 17 Jun 2020 14:40:37 -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=gNYKdFfH; 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]:55628 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jlfnR-0005EV-1n for patch@linaro.org; Wed, 17 Jun 2020 17:40:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37824) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jlfEV-00048Z-Ih for qemu-devel@nongnu.org; Wed, 17 Jun 2020 17:04:31 -0400 Received: from mail-qt1-x841.google.com ([2607:f8b0:4864:20::841]:34438) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jlfET-0000Lq-NS for qemu-devel@nongnu.org; Wed, 17 Jun 2020 17:04:31 -0400 Received: by mail-qt1-x841.google.com with SMTP id u17so2787124qtq.1 for ; Wed, 17 Jun 2020 14:04:29 -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=8Q2sL8ohmf8wunp2u0YbDC2Iqv7PQMpqvb2Mr0aPlxc=; b=gNYKdFfHfp3hprbcJcWx41N94LYYAkf3UbpgGT651vSBkXvSLCyegKbcfSdCvI5B6H 8V1qZPe2JIxzxZOFKRF8vqk9h6aLJtWXYLnDeu8qFKzReZb9l7IUZbkT1c5wcWGZMpSi pYK6TRseneD8eztvJOmVmxEenNRly046sp7Feo/N8jjbR1vo7JWyBwB5VCxuvxAgOtEx RhHRkuG/qgFA7CVapVJ5X3Zx7JUMiOlwGdQ5DUqSekapIdwoh36N6owZWY01KW2PZxC5 S4VJ4EgCaTKNTK9P9dBtQeTxgy5OnrOc4EVwYV/Vjx00SJR9q9S+WuQKYYe507vEDcuo vZwg== 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=8Q2sL8ohmf8wunp2u0YbDC2Iqv7PQMpqvb2Mr0aPlxc=; b=LGne6plKbc7Nb2Nmwgj1f9tNCoT2EcLbT3hvpnukaZyC7adh3W05WFtjt5twSZfX2S cn2eQaer47U0ijdU0dBLT2Mlup0PJcXcqcSqaZpli9lUwKjXhjqTT4ZQcgGBvUWk9EB3 5nRDimBL1vrW/VB4esb1SKi4ogwpM59ad5GZnAELcUWi2tQviEEGPCtVxpE09x+tlgB+ spj/fVJ1ZryHtvR3K//7qcfzc6hwg6oEfF/BgvzADaHrI5DpOLrYQVdKAD9Uy8zss8FV JoS4ePqhXMl7M/fJ+QaU+VdJ2Z0K/FWl+9o+3IryBpEUOTv9E0M/UwCSbxDV45W+iV1r jHgw== X-Gm-Message-State: AOAM532Zu4taQvIigJPZM5lGrSzBHgX1OiZ3ZoxaZ2y927n/9Sx78LH0 l++KiNG7zJWkmtLQP8MbPVIl/vvJPAkgRw== X-Received: by 2002:ac8:5354:: with SMTP id d20mr1106683qto.363.1592427868582; Wed, 17 Jun 2020 14:04:28 -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.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Jun 2020 14:04:27 -0700 (PDT) From: Robert Foley To: qemu-devel@nongnu.org Subject: [PATCH v10 50/73] mips: convert to cpu_interrupt_request Date: Wed, 17 Jun 2020 17:02:08 -0400 Message-Id: <20200617210231.4393-51-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::841; envelope-from=robert.foley@linaro.org; helo=mail-qt1-x841.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: Aleksandar Rikalo , robert.foley@linaro.org, Aleksandar Markovic , cota@braap.org, peter.puhov@linaro.org, alex.bennee@linaro.org, Aurelien Jarno Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: "Emilio G. Cota" 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 | 7 ++++--- target/mips/kvm.c | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) -- 2.17.1 diff --git a/target/mips/cpu.c b/target/mips/cpu.c index e86cd06548..761d8aaa54 100644 --- a/target/mips/cpu.c +++ b/target/mips/cpu.c @@ -56,13 +56,14 @@ static bool mips_cpu_has_work(CPUState *cs) MIPSCPU *cpu = MIPS_CPU(cs); CPUMIPSState *env = &cpu->env; bool has_work = false; + uint32_t interrupt_request = cpu_interrupt_request(cs); /* * Prior to MIPS Release 6 it is implementation dependent if non-enabled * interrupts wake-up the CPU, however most of the implementations only * check for interrupts that can be taken. */ - if ((cs->interrupt_request & CPU_INTERRUPT_HARD) && + if ((interrupt_request & CPU_INTERRUPT_HARD) && cpu_mips_hw_interrupts_pending(env)) { if (cpu_mips_hw_interrupts_enabled(env) || (env->insn_flags & ISA_MIPS32R6)) { @@ -76,7 +77,7 @@ static bool mips_cpu_has_work(CPUState *cs) * The QEMU model will issue an _WAKE request whenever the CPUs * should be woken up. */ - if (cs->interrupt_request & CPU_INTERRUPT_WAKE) { + if (interrupt_request & CPU_INTERRUPT_WAKE) { has_work = true; } @@ -86,7 +87,7 @@ static bool mips_cpu_has_work(CPUState *cs) } /* MIPS Release 6 has the ability to halt the CPU. */ if (env->CP0_Config5 & (1 << CP0C5_VP)) { - if (cs->interrupt_request & CPU_INTERRUPT_WAKE) { + if (interrupt_request & CPU_INTERRUPT_WAKE) { has_work = true; } if (!mips_vp_active(env)) { diff --git a/target/mips/kvm.c b/target/mips/kvm.c index 92608cfe15..682b969579 100644 --- a/target/mips/kvm.c +++ b/target/mips/kvm.c @@ -141,7 +141,7 @@ void kvm_arch_pre_run(CPUState *cs, struct kvm_run *run) qemu_mutex_lock_iothread(); - if ((cs->interrupt_request & CPU_INTERRUPT_HARD) && + if ((cpu_interrupt_request(cs) & CPU_INTERRUPT_HARD) && cpu_mips_io_interrupts_pending(cpu)) { intr.cpu = -1; intr.irq = 2;