public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: thomas.petazzoni@free-electrons.com (Thomas Petazzoni)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: mm: show prefetch state when either data or instr prefect is enabled
Date: Thu, 11 Jun 2015 14:39:35 +0200	[thread overview]
Message-ID: <20150611143935.1f725466@free-electrons.com> (raw)
In-Reply-To: <20150611121052.GX7557@n2100.arm.linux.org.uk>

Russell,

On Thu, 11 Jun 2015 13:10:52 +0100, Russell King - ARM Linux wrote:

> > diff --git a/arch/arm/mm/cache-l2x0.c b/arch/arm/mm/cache-l2x0.c
> > index d6e43d8..6bdf3a5 100644
> > --- a/arch/arm/mm/cache-l2x0.c
> > +++ b/arch/arm/mm/cache-l2x0.c
> > @@ -656,7 +656,8 @@ static void __init l2c310_enable(void __iomem *base, u32 aux, unsigned num_lock)
> >  	/* Read back resulting AUX_CTRL value as it could have been altered. */
> >  	aux = readl_relaxed(base + L2X0_AUX_CTRL);
> >  
> > -	if (aux & (L310_AUX_CTRL_DATA_PREFETCH | L310_AUX_CTRL_INSTR_PREFETCH)) {
> 
> What this says is...
> 	first, bitwise _OR_ L310_AUX_CTRL_DATA_PREFETCH with
> 	L310_AUX_CTRL_INSTR_PREFETCH.  This produces a number which has
> 	_two_ bits set.
> 
> 	then, bitwise _AND_ that number with the auxiliary control register.
> 
> 	If the result is non-zero, then execute the code within the if() { }
> 	block.
> 
> So, I'm not going to take this patch.  The code is correct as it stands.

You are indeed absolutely correct. I got confused because I wasn't
seeing the message, but it was caused by the other problem (writing
AUX_CTRL overwriting the changes made to PREFETCH_CTRL). But that
obviously had nothing to do with this part of the code.

Sorry for the noise, and thanks for the quick feedback,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

      reply	other threads:[~2015-06-11 12:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-11 11:52 [PATCH] ARM: mm: show prefetch state when either data or instr prefect is enabled Thomas Petazzoni
2015-06-11 12:10 ` Russell King - ARM Linux
2015-06-11 12:39   ` Thomas Petazzoni [this message]

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=20150611143935.1f725466@free-electrons.com \
    --to=thomas.petazzoni@free-electrons.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