All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eugeniy.Paltsev@synopsys.com (Eugeniy Paltsev)
To: linux-snps-arc@lists.infradead.org
Subject: [PATCH 1/3] ARC: mcip: halt GFRC together with ARC cores
Date: Thu, 22 Feb 2018 12:58:25 +0000	[thread overview]
Message-ID: <1519304304.2982.21.camel@synopsys.com> (raw)
In-Reply-To: <8c86b9f9-a4b7-1217-7cf3-1d8891292679@synopsys.com>

Hi Vineet,

On Wed, 2018-02-21@15:42 -0800, Vineet Gupta wrote:
> On 02/21/2018 12:31 PM, Vineet Gupta wrote:
> > Hi Eugeniy,
> > 
> > > Starting from ARC HS v3.0
> > 
> > ?From the STAR fix, it seem this was fixed in HS 2.1c, so you should be able to?
> > test it on HSDK, which was my next question: where and how did you test this and?
> > verify that it works as we think it does. I tried the patch on HSDK and I still?
> > see the rcu_preempt self-detected stall error splat when running hackbench and?
> > pausing the target with Metaware debugger. Perhaps we need to write a small test?
> > case to check what's going on. Also try that on AXS103 release which is definitely?
> > HS 3.0 !
> 
> So I tried this on both.
> ? - HSDK???(HS 2.1c): Doesn't work
> ? - AXS103 (HS 3.0) : Works

I checked the HS_3.00a and HS_2.1c documentation - GFRC HALT commands/settings exist
only in HS_3.00a.

> 
> Fortunately we can read (yet another BCR: GFRC_BUILD) and infer whether this is?
> supported or not. So add that check in mcip_update_gfrc_halt_mask()

Ok, I'll add GFRC_BUILD read.

> > > it's possible to tie GFRC to state of up-to 4
> > > ARC cores with help of GFRC's CORE register where we set a mask for
> > > cores which state we need to rely on.
> 
> On second thoughts, do we really have to do this per cpu. Just write 0xf once just?
> as Alexey did in first iteration.

And we will face with same problems like with MCIP debug.
Remember what happens when we launch kernel on one CPU on board which has several CPUs.

> In theory this could be called concurrently by multiple cpus and mcip doesn't?
> guarantee any internal serialization/buffering. Granted, current use
case is fine?
> as mcip_setup_per_cpu --> plat_smp_ops.init_per_cpu is serialized by master core,?
> we could run into issue when say cpu hot plug etc
works. So better to wrap this?
> inside the spinlock which we already have.

Yep, I was also thinking about adding the spinlock here...
I'll add it in next patch version.

> -Vineet
-- 
?Eugeniy Paltsev

WARNING: multiple messages have this Message-ID (diff)
From: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
To: "Eugeniy.Paltsev@synopsys.com" <Eugeniy.Paltsev@synopsys.com>,
	"Vineet Gupta" <Vineet.Gupta1@synopsys.com>,
	"linux-snps-arc@lists.infradead.org"
	<linux-snps-arc@lists.infradead.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Alexey.Brodkin@synopsys.com" <Alexey.Brodkin@synopsys.com>
Subject: Re: [PATCH 1/3] ARC: mcip: halt GFRC together with ARC cores
Date: Thu, 22 Feb 2018 12:58:25 +0000	[thread overview]
Message-ID: <1519304304.2982.21.camel@synopsys.com> (raw)
In-Reply-To: <8c86b9f9-a4b7-1217-7cf3-1d8891292679@synopsys.com>

Hi Vineet,

On Wed, 2018-02-21 at 15:42 -0800, Vineet Gupta wrote:
> On 02/21/2018 12:31 PM, Vineet Gupta wrote:
> > Hi Eugeniy,
> > 
> > > Starting from ARC HS v3.0
> > 
> >  From the STAR fix, it seem this was fixed in HS 2.1c, so you should be able to 
> > test it on HSDK, which was my next question: where and how did you test this and 
> > verify that it works as we think it does. I tried the patch on HSDK and I still 
> > see the rcu_preempt self-detected stall error splat when running hackbench and 
> > pausing the target with Metaware debugger. Perhaps we need to write a small test 
> > case to check what's going on. Also try that on AXS103 release which is definitely 
> > HS 3.0 !
> 
> So I tried this on both.
>   - HSDK   (HS 2.1c): Doesn't work
>   - AXS103 (HS 3.0) : Works

I checked the HS_3.00a and HS_2.1c documentation - GFRC HALT commands/settings exist
only in HS_3.00a.

> 
> Fortunately we can read (yet another BCR: GFRC_BUILD) and infer whether this is 
> supported or not. So add that check in mcip_update_gfrc_halt_mask()

Ok, I'll add GFRC_BUILD read.

> > > it's possible to tie GFRC to state of up-to 4
> > > ARC cores with help of GFRC's CORE register where we set a mask for
> > > cores which state we need to rely on.
> 
> On second thoughts, do we really have to do this per cpu. Just write 0xf once just 
> as Alexey did in first iteration.

And we will face with same problems like with MCIP debug.
Remember what happens when we launch kernel on one CPU on board which has several CPUs.

> In theory this could be called concurrently by multiple cpus and mcip doesn't 
> guarantee any internal serialization/buffering. Granted, current use
case is fine 
> as mcip_setup_per_cpu --> plat_smp_ops.init_per_cpu is serialized by master core, 
> we could run into issue when say cpu hot plug etc
works. So better to wrap this 
> inside the spinlock which we already have.

Yep, I was also thinking about adding the spinlock here...
I'll add it in next patch version.

> -Vineet
-- 
 Eugeniy Paltsev

  reply	other threads:[~2018-02-22 12:58 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-21  9:40 [PATCH 1/3] ARC: mcip: halt GFRC together with ARC cores Eugeniy Paltsev
2018-02-21  9:40 ` Eugeniy Paltsev
2018-02-21  9:40 ` [PATCH 2/3] ARC: mcip: setup MCIP debug mask according to cpu possible mask Eugeniy Paltsev
2018-02-21  9:40   ` Eugeniy Paltsev
2018-02-21  9:40 ` [PATCH 3/3] ARC: setup cpu possible mask according to possible-cpus dts property Eugeniy Paltsev
2018-02-21  9:40   ` Eugeniy Paltsev
2018-02-21 20:31 ` [PATCH 1/3] ARC: mcip: halt GFRC together with ARC cores Vineet Gupta
2018-02-21 20:31   ` Vineet Gupta
2018-02-21 23:42   ` Vineet Gupta
2018-02-21 23:42     ` Vineet Gupta
2018-02-22 12:58     ` Eugeniy Paltsev [this message]
2018-02-22 12:58       ` Eugeniy Paltsev

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=1519304304.2982.21.camel@synopsys.com \
    --to=eugeniy.paltsev@synopsys.com \
    --cc=linux-snps-arc@lists.infradead.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.