From: lorenzo.pieralisi@arm.com (Lorenzo Pieralisi)
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 17:02:23 +0100 [thread overview]
Message-ID: <20110926160202.GA11647@e102568-lin.cambridge.arm.com> (raw)
In-Reply-To: <20110926145104.GL22455@n2100.arm.linux.org.uk>
Hi Russell,
thanks for looking at this series.
On Mon, Sep 26, 2011 at 03:51:04PM +0100, Russell King - ARM Linux wrote:
> 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.
I should not have converted it to a pointer, you are right, sorry; I am not
using it as such unless the MMU is off.
>
> 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.)
>
Well, to be precise the kernel runs in it when the MMU is on.
By no means, the purpose is NOT to dereference it when the MMU is on and
I am not doing that.
But I agree the physical address should be an integer parameter and be
passed as so, lest someone might want for whatever reason to dereference
it when the MMU is on and unleash hell.
Thank you,
Lorenzo
next prev parent reply other threads:[~2011-09-26 16:02 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
2011-09-26 16:02 ` Lorenzo Pieralisi [this message]
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=20110926160202.GA11647@e102568-lin.cambridge.arm.com \
--to=lorenzo.pieralisi@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).