All of lore.kernel.org
 help / color / mirror / Atom feed
From: syin@broadcom.com (Sherman Yin)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: Fix up l2x0_init log message
Date: Wed, 13 Feb 2013 11:14:52 -0800	[thread overview]
Message-ID: <1360782893-20969-1-git-send-email-syin@broadcom.com> (raw)

At the end of the function l2x0_init(), printk displays the ?ways? and
?l2x0_size? variables, but these are calculated based on the aux_val
parameter, instead of the actual value in the aux register.

I think a better way is to leave the ?ways?, ?way_size? and ?l2x0_size?
derivation until after the following lines:

         /* Re-read it in case some bits are reserved. */
         aux = readl_relaxed(l2x0_base + L2X0_AUX_CTRL);

Then we will be reporting based on what the hardware tells us, instead of the
function argument.  Below is a proposed patch, although I'm not entirely happy
with the repeated switch statement.

Or is there a reason why we want to print the values derived from aux_val
instead?

Sherman Yin (1):
  ARM: Fix up l2x0_init log message

 arch/arm/mm/cache-l2x0.c |   39 +++++++++++++++++++++++++++++++--------
 1 file changed, 31 insertions(+), 8 deletions(-)

-- 
1.7.9.5

             reply	other threads:[~2013-02-13 19:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-13 19:14 Sherman Yin [this message]
2013-02-13 19:14 ` [PATCH] ARM: Fix up l2x0_init log message Sherman Yin

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=1360782893-20969-1-git-send-email-syin@broadcom.com \
    --to=syin@broadcom.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 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.