linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: will.deacon@arm.com (Will Deacon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/4] ARM: cache-l2x0: Manage the errata at run time
Date: Mon, 21 Jan 2013 14:03:44 +0000	[thread overview]
Message-ID: <20130121140344.GG18005@mudshark.cambridge.arm.com> (raw)
In-Reply-To: <20130121131451.GA29855@bnru10>

On Mon, Jan 21, 2013 at 01:14:53PM +0000, srinidhi kasagar wrote:
> Make it possible to manage the errata by its own by using the
> l2x0 ID register. This relieves the platforms from choosing the
> Errata's at compile time
> 
> Signed-off-by: srinidhi kasagar <srinidhi.kasagar@stericsson.com>
> ---
>  arch/arm/include/asm/hardware/cache-l2x0.h |    2 +
>  arch/arm/mm/cache-l2x0.c                   |   77 +++++++++++++++-------------
>  2 files changed, 43 insertions(+), 36 deletions(-)
> 
> diff --git a/arch/arm/include/asm/hardware/cache-l2x0.h b/arch/arm/include/asm/hardware/cache-l2x0.h
> index 3b2c40b..d5994ac 100644
> --- a/arch/arm/include/asm/hardware/cache-l2x0.h
> +++ b/arch/arm/include/asm/hardware/cache-l2x0.h
> @@ -117,6 +117,8 @@ static inline int l2x0_of_init(u32 aux_val, u32 aux_mask)
>  }
>  #endif
>  
> +asmlinkage u32 l2x0_get_rtl_release(void);
> +
>  struct l2x0_regs {
>  	unsigned long phy_base;
>  	unsigned long aux_ctrl;
> diff --git a/arch/arm/mm/cache-l2x0.c b/arch/arm/mm/cache-l2x0.c
> index c2f3739..49058ac 100644
> --- a/arch/arm/mm/cache-l2x0.c
> +++ b/arch/arm/mm/cache-l2x0.c
> @@ -49,6 +49,16 @@ struct l2x0_of_data {
>  
>  static bool of_init = false;
>  
> +/*
> + * Identify ther RTL releases of l2x0 - This might help in applying
> + * the l2x0 errata's dynamically rather compile time options
> + */
> +asmlinkage u32 l2x0_get_rtl_release(void)
> +{
> +	return readl_relaxed(l2x0_base + L2X0_CACHE_ID) &
> +			L2X0_CACHE_ID_RTL_MASK;
> +}

You're calling this function all over the place, including from the flush
code. Can you read the RTL release during probe and stash it somewhere
instead please?

Will

  reply	other threads:[~2013-01-21 14:03 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-21 13:14 [PATCH 1/4] ARM: cache-l2x0: Manage the errata at run time srinidhi kasagar
2013-01-21 14:03 ` Will Deacon [this message]
2013-01-22  5:42   ` Srinidhi Kasagar
2013-01-22 17:05     ` Will Deacon
2013-01-21 16:08 ` Russell King - ARM Linux
2013-01-22  5:50   ` Srinidhi Kasagar
2013-01-22  8:42   ` Santosh Shilimkar

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=20130121140344.GG18005@mudshark.cambridge.arm.com \
    --to=will.deacon@arm.com \
    --cc=linux-arm-kernel@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 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).