The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Vineet Gupta <Vineet.Gupta1@synopsys.com>
To: Alexey Brodkin <Alexey.Brodkin@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>,
	"Vladimir Kondratiev" <vladimir.kondratiev@intel.com>
Subject: Re: [PATCH] arc: arcv2: cache: Explicitly set MSB counterpart of region ops addresses
Date: Wed, 2 Aug 2017 09:09:44 +0530	[thread overview]
Message-ID: <2f6ba6bb-ae07-0ff9-c2ff-0f162eab2ef0@synopsys.com> (raw)
In-Reply-To: <20170801095847.6425-1-abrodkin@synopsys.com>

On 08/01/2017 03:29 PM, Alexey Brodkin wrote:
> It is necessary to explicitly set both SLC_AUX_RGN_START1 and SLC_AUX_RGN_END1
> which hold MSB bits of the physical address correspondingly of region start
> and end otherwise SLC region operation is executed in unpredictable manner,
> for example on HSDK platform where PAE40 support exists in hardware
> we saw each and every SLC region op to take seconds (sic!).
>
> Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
> Reported-by: Vladimir Kondratiev <vladimir.kondratiev@intel.com>
> ---
>   arch/arc/include/asm/cache.h | 2 ++
>   arch/arc/mm/cache.c          | 8 ++++++--
>   2 files changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arc/include/asm/cache.h b/arch/arc/include/asm/cache.h
> index 35127ad95124..1f3c2f967471 100644
> --- a/arch/arc/include/asm/cache.h
> +++ b/arch/arc/include/asm/cache.h
> @@ -91,7 +91,9 @@ extern unsigned long perip_base, perip_end;
>   #define ARC_REG_SLC_FLUSH	0x904
>   #define ARC_REG_SLC_INVALIDATE	0x905
>   #define ARC_REG_SLC_RGN_START	0x914
> +#define ARC_REG_SLC_RGN_START1	0x915
>   #define ARC_REG_SLC_RGN_END	0x916
> +#define ARC_REG_SLC_RGN_END1	0x917
>   
>   /* Bit val in SLC_CONTROL */
>   #define SLC_CTRL_DIS		0x001
> diff --git a/arch/arc/mm/cache.c b/arch/arc/mm/cache.c
> index b7a1face1584..0b4e2650c5de 100644
> --- a/arch/arc/mm/cache.c
> +++ b/arch/arc/mm/cache.c
> @@ -580,6 +580,7 @@ noinline void slc_op(phys_addr_t paddr, unsigned long sz, const int op)
>   	static DEFINE_SPINLOCK(lock);
>   	unsigned long flags;
>   	unsigned int ctrl;
> +	phys_addr_t end;
>   
>   	spin_lock_irqsave(&lock, flags);
>   
> @@ -609,8 +610,11 @@ noinline void slc_op(phys_addr_t paddr, unsigned long sz, const int op)
>   	 * END needs to be setup before START (latter triggers the operation)
>   	 * END can't be same as START, so add (l2_line_sz - 1) to sz
>   	 */
> -	write_aux_reg(ARC_REG_SLC_RGN_END, (paddr + sz + l2_line_sz - 1));
> -	write_aux_reg(ARC_REG_SLC_RGN_START, paddr);
> +	end = paddr + sz + l2_line_sz - 1;
> +	write_aux_reg(ARC_REG_SLC_RGN_END1, upper_32_bits(end));
> +	write_aux_reg(ARC_REG_SLC_RGN_END, lower_32_bits(end));
> +	write_aux_reg(ARC_REG_SLC_RGN_START1, upper_32_bits(paddr));
> +	write_aux_reg(ARC_REG_SLC_RGN_START, lower_32_bits(paddr));

Are these registers present even if PAE is not configured in hardware ?

>   
>   	/* Make sure "busy" bit reports correct stataus, see STAR 9001165532 */
>   	read_aux_reg(ARC_REG_SLC_CTRL);

  reply	other threads:[~2017-08-02  3:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-01  9:58 [PATCH] arc: arcv2: cache: Explicitly set MSB counterpart of region ops addresses Alexey Brodkin
2017-08-02  3:39 ` Vineet Gupta [this message]
2017-08-02  8:03   ` Alexey Brodkin
2017-08-02  8:26     ` Vineet Gupta

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=2f6ba6bb-ae07-0ff9-c2ff-0f162eab2ef0@synopsys.com \
    --to=vineet.gupta1@synopsys.com \
    --cc=Alexey.Brodkin@synopsys.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-snps-arc@lists.infradead.org \
    --cc=vladimir.kondratiev@intel.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