From: "Alex Bennée" <alex.bennee@linaro.org>
To: Aleksandar Markovic <aleksandar.markovic@rt-rk.com>
Cc: qemu-devel@nongnu.org, "Aurelien Jarno" <aurelien@aurel32.net>,
"Fam Zheng" <famz@redhat.com>,
"Gerd Hoffmann" <kraxel@redhat.com>,
"Laurent Vivier" <laurent@vivier.eu>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Peter Maydell" <peter.maydell@linaro.org>,
"Philippe Mathieu-Daudé" <f4bug@amsat.org>,
"Richard Henderson" <rth@twiddle.net>,
"Riku Voipio" <riku.voipio@iki.fi>,
"Yongbok Kim" <yongbok.kim@mips.com>,
"Aleksandar Markovic" <aleksandar.markovic@mips.com>,
"Goran Ferenc" <goran.ferenc@mips.com>,
"Miodrag Dinic" <miodrag.dinic@mips.com>,
"Petar Jovanovic" <petar.jovanovic@mips.com>
Subject: Re: [Qemu-devel] [PATCH 3/7] Revert "target/mips: hold BQL for timer interrupts"
Date: Fri, 19 Jan 2018 16:48:32 +0000 [thread overview]
Message-ID: <87h8rhokv3.fsf@linaro.org> (raw)
In-Reply-To: <1516377391-25945-4-git-send-email-aleksandar.markovic@rt-rk.com>
Aleksandar Markovic <aleksandar.markovic@rt-rk.com> writes:
> From: Aleksandar Markovic <aleksandar.markovic@mips.com>
>
> This reverts commit d394698d73836d1c50545bdb32dc58d09708fcfb.
>
> Ther revert is needed in order not to cause overlap with subsequent
> patches related to handling synchronization of interrupt code paths.
Hmm I'm fairly sure you should merge this with the follow-up patch to
add BQL locking to the appropriate place. Otherwise you break
bi-section.
>
> Signed-off-by: Miodrag Dinic <miodrag.dinic@mips.com>
> Signed-off-by: Aleksandar Markovic <aleksandar.markovic@mips.com>
> ---
> target/mips/op_helper.c | 21 +++------------------
> 1 file changed, 3 insertions(+), 18 deletions(-)
>
> diff --git a/target/mips/op_helper.c b/target/mips/op_helper.c
> index a429987..3830ee8 100644
> --- a/target/mips/op_helper.c
> +++ b/target/mips/op_helper.c
> @@ -17,7 +17,6 @@
> * License along with this library; if not, see <http://www.gnu.org/licenses/>.
> */
> #include "qemu/osdep.h"
> -#include "qemu/main-loop.h"
> #include "cpu.h"
> #include "internal.h"
> #include "qemu/host-utils.h"
> @@ -809,11 +808,7 @@ target_ulong helper_mftc0_tcschefback(CPUMIPSState *env)
>
> target_ulong helper_mfc0_count(CPUMIPSState *env)
> {
> - int32_t count;
> - qemu_mutex_lock_iothread();
> - count = (int32_t) cpu_mips_get_count(env);
> - qemu_mutex_unlock_iothread();
> - return count;
> + return (int32_t)cpu_mips_get_count(env);
> }
>
> target_ulong helper_mftc0_entryhi(CPUMIPSState *env)
> @@ -1388,9 +1383,7 @@ void helper_mtc0_hwrena(CPUMIPSState *env, target_ulong arg1)
>
> void helper_mtc0_count(CPUMIPSState *env, target_ulong arg1)
> {
> - qemu_mutex_lock_iothread();
> cpu_mips_store_count(env, arg1);
> - qemu_mutex_unlock_iothread();
> }
>
> void helper_mtc0_entryhi(CPUMIPSState *env, target_ulong arg1)
> @@ -1439,9 +1432,7 @@ void helper_mttc0_entryhi(CPUMIPSState *env, target_ulong arg1)
>
> void helper_mtc0_compare(CPUMIPSState *env, target_ulong arg1)
> {
> - qemu_mutex_lock_iothread();
> cpu_mips_store_compare(env, arg1);
> - qemu_mutex_unlock_iothread();
> }
>
> void helper_mtc0_status(CPUMIPSState *env, target_ulong arg1)
> @@ -1495,9 +1486,7 @@ void helper_mtc0_srsctl(CPUMIPSState *env, target_ulong arg1)
>
> void helper_mtc0_cause(CPUMIPSState *env, target_ulong arg1)
> {
> - qemu_mutex_lock_iothread();
> cpu_mips_store_cause(env, arg1);
> - qemu_mutex_unlock_iothread();
> }
>
> void helper_mttc0_cause(CPUMIPSState *env, target_ulong arg1)
> @@ -2339,16 +2328,12 @@ target_ulong helper_rdhwr_synci_step(CPUMIPSState *env)
>
> target_ulong helper_rdhwr_cc(CPUMIPSState *env)
> {
> - int32_t count;
> check_hwrena(env, 2, GETPC());
> #ifdef CONFIG_USER_ONLY
> - count = env->CP0_Count;
> + return env->CP0_Count;
> #else
> - qemu_mutex_lock_iothread();
> - count = (int32_t)cpu_mips_get_count(env);
> - qemu_mutex_unlock_iothread();
> + return (int32_t)cpu_mips_get_count(env);
> #endif
> - return count;
> }
>
> target_ulong helper_rdhwr_ccres(CPUMIPSState *env)
--
Alex Bennée
next prev parent reply other threads:[~2018-01-19 16:48 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-19 15:56 [Qemu-devel] [PATCH 0/7] target-mips: support MTTCG feature Aleksandar Markovic
2018-01-19 15:56 ` [Qemu-devel] [PATCH 1/7] target/mips: compare virtual addresses in LL/SC sequence Aleksandar Markovic
2018-01-19 16:29 ` Alex Bennée
2018-01-29 10:30 ` Miodrag Dinic
2018-01-19 15:56 ` [Qemu-devel] [PATCH 2/7] target/mips: reimplement SC instruction and use cmpxchg Aleksandar Markovic
2018-01-19 15:56 ` [Qemu-devel] [PATCH 3/7] Revert "target/mips: hold BQL for timer interrupts" Aleksandar Markovic
2018-01-19 16:48 ` Alex Bennée [this message]
2018-01-22 15:18 ` Aleksandar Markovic
2018-01-19 15:56 ` [Qemu-devel] [PATCH 4/7] hw/mips_int: hold BQL for all interrupt requests Aleksandar Markovic
2018-01-19 15:56 ` [Qemu-devel] [PATCH 5/7] target/mips: hold BQL in mips_vpe_wake() Aleksandar Markovic
2018-01-19 15:56 ` [Qemu-devel] [PATCH 6/7] hw/mips_cpc: kick a VP when putting it into Run state Aleksandar Markovic
2018-01-19 16:47 ` Alex Bennée
2018-01-19 15:56 ` [Qemu-devel] [PATCH 7/7] target/mips: introduce MTTCG-enabled builds Aleksandar Markovic
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87h8rhokv3.fsf@linaro.org \
--to=alex.bennee@linaro.org \
--cc=aleksandar.markovic@mips.com \
--cc=aleksandar.markovic@rt-rk.com \
--cc=aurelien@aurel32.net \
--cc=f4bug@amsat.org \
--cc=famz@redhat.com \
--cc=goran.ferenc@mips.com \
--cc=kraxel@redhat.com \
--cc=laurent@vivier.eu \
--cc=miodrag.dinic@mips.com \
--cc=pbonzini@redhat.com \
--cc=petar.jovanovic@mips.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=riku.voipio@iki.fi \
--cc=rth@twiddle.net \
--cc=yongbok.kim@mips.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).