All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ralf Baechle <ralf@linux-mips.org>
To: James Hogan <james.hogan@mips.com>
Cc: Paul Burton <paul.burton@mips.com>,
	James Hogan <jhogan@kernel.org>,
	linux-mips@linux-mips.org, stable@vger.kernel.org
Subject: Re: [PATCH] MIPS: CM: Drop WARN_ON(vp != 0)
Date: Wed, 6 Dec 2017 14:57:45 +0100	[thread overview]
Message-ID: <20171206135745.GD5238@linux-mips.org> (raw)
In-Reply-To: <20171205222822.15034-1-james.hogan@mips.com>

On Tue, Dec 05, 2017 at 10:28:22PM +0000, James Hogan wrote:

> Since commit 68923cdc2eb3 ("MIPS: CM: Add cluster & block args to
> mips_cm_lock_other()"), mips_smp_send_ipi_mask() has used
> mips_cm_lock_other_cpu() with each CPU number, rather than
> mips_cm_lock_other() with the first VPE in each core. Prior to r6,
> multicore multithreaded systems such as dual-core dual-thread
> interAptivs with CPU Idle enabled (e.g. MIPS Creator Ci40) results in
> mips_cm_lock_other() repeatedly hitting WARN_ON(vp != 0).
> 
> There doesn't appear to be anything fundamentally wrong about passing a
> non-zero VP/VPE number, even if it is a core's region that is locked
> into the other region before r6, so remove that particular WARN_ON().
> 
> Fixes: 68923cdc2eb3 ("MIPS: CM: Add cluster & block args to mips_cm_lock_other()")
> Signed-off-by: James Hogan <jhogan@kernel.org>
> Reviewed-by: Paul Burton <paul.burton@mips.com>
> Cc: Ralf Baechle <ralf@linux-mips.org>
> Cc: linux-mips@linux-mips.org
> Cc: <stable@vger.kernel.org> # 4.14+
> ---
>  arch/mips/kernel/mips-cm.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/arch/mips/kernel/mips-cm.c b/arch/mips/kernel/mips-cm.c
> index dd5567b1e305..8f5bd04f320a 100644
> --- a/arch/mips/kernel/mips-cm.c
> +++ b/arch/mips/kernel/mips-cm.c
> @@ -292,7 +292,6 @@ void mips_cm_lock_other(unsigned int cluster, unsigned int core,
>  				  *this_cpu_ptr(&cm_core_lock_flags));
>  	} else {
>  		WARN_ON(cluster != 0);
> -		WARN_ON(vp != 0);

I think the reason is that for a while the combination of SMP/CMP with
MT was at the bottom of priorities and nobody really cared about it so
a WARN_ON was thrown in.  Which in this case might well itself be a bug!

  Ralf

  reply	other threads:[~2017-12-06 14:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-05 22:28 [PATCH] MIPS: CM: Drop WARN_ON(vp != 0) James Hogan
2017-12-05 22:28 ` James Hogan
2017-12-06 13:57 ` Ralf Baechle [this message]
2017-12-06 17:43   ` Paul Burton
2017-12-06 17:43     ` Paul Burton

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=20171206135745.GD5238@linux-mips.org \
    --to=ralf@linux-mips.org \
    --cc=james.hogan@mips.com \
    --cc=jhogan@kernel.org \
    --cc=linux-mips@linux-mips.org \
    --cc=paul.burton@mips.com \
    --cc=stable@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.