linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCH 2/3] ARM: mm: add l2x0 physical address parameter to init
Date: Mon, 26 Sep 2011 15:51:04 +0100	[thread overview]
Message-ID: <20110926145104.GL22455@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <1317047561-11020-3-git-send-email-lorenzo.pieralisi@arm.com>

On Mon, Sep 26, 2011 at 03:32:40PM +0100, Lorenzo Pieralisi wrote:
> This patch redefines the l2x0_init function, and it adds a
> parameter defining the L2 physical base address in preparation
> for L2 resume support. The device tree init code retrieves the
> physical address from the "reg" array and converts it to a
> physical address pointer.

I've no idea why many people have a really dire time understanding the
following basic fact.  I keep seeing the same things: virtual addresses
as integers and physical addresses as pointers.

Virtual addresses are pointers.
Physical addresses are NOT pointers but integers.

Why?  You CAN'T dereference a physical address when running in the virtual
address space (which is the space which the kernel runs in.)

Stop doing it.

  reply	other threads:[~2011-09-26 14:51 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-26 14:32 [RFC PATCH 0/3] ARM: mm: add L2 suspend/resume support Lorenzo Pieralisi
2011-09-26 14:32 ` [RFC PATCH 1/3] ARM: mm: add outercache resume hook Lorenzo Pieralisi
2011-09-26 14:32 ` [RFC PATCH 2/3] ARM: mm: add l2x0 physical address parameter to init Lorenzo Pieralisi
2011-09-26 14:51   ` Russell King - ARM Linux [this message]
2011-09-26 16:02     ` Lorenzo Pieralisi
2011-09-26 14:32 ` [RFC PATCH 3/3] ARM: mm: add l2x0 suspend/resume support Lorenzo Pieralisi
2011-09-26 14:55   ` Russell King - ARM Linux
2011-09-26 16:27     ` Lorenzo Pieralisi
2011-09-26 15:06   ` Russell King - ARM Linux
2011-09-26 17:14     ` Lorenzo Pieralisi
2011-09-27  5:29       ` Santosh Shilimkar
2011-09-27 10:28         ` Lorenzo Pieralisi
2011-09-27 10:57           ` Santosh Shilimkar
2011-09-28 19:24             ` Russell King - ARM Linux
2011-09-29  5:38               ` 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=20110926145104.GL22455@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --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).