From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/2] ARM: calculate VMALLOC_END by probing in mdesc->map_io()
Date: Sat, 22 Jan 2011 23:15:28 +0000 [thread overview]
Message-ID: <20110122231528.GD11960@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <1295737001-19578-1-git-send-email-eric.y.miao@gmail.com>
On Sun, Jan 23, 2011 at 06:56:40AM +0800, Eric Miao wrote:
> From: Eric Miao <eric.miao@linaro.org>
>
> Provided that the only place initializing the fixed IO mapping is
> in mdesc->map_io(), the VMALLOC_END can actually be calculated by
> first invoking the function without actually doing the map.
We really can't do this. You're assuming that platforms only do IO
mapping in their map_io callback - that's way far from the truth.
Samsung platforms for instance register clocks and other stuff.
OMAP platforms issue cache flushes which won't work on CPUs requiring
a mapping to be setup for this to work. They also check CPU revisions
(requiring mappings in place for that), probe the size of sram, etc.
None of this will work without mappings setup.
And there's a catch-you in OMAP there - it needs accessible mappings
to work out what other mappings (eg, sram size) to setup. It can't map
a larger area than is actually present because that's known to cause
problems.
So, without a lot of effort to clean up platform code first, it's
really unsafe to do this double-call of map_io(). Given that it
takes some platform support _years_ to change, I really don't see
that this is a practical approach.
I'd instead suggest adding vmalloc_end to the machine description
record.
next prev parent reply other threads:[~2011-01-22 23:15 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-22 22:56 [PATCH 1/2] ARM: calculate VMALLOC_END by probing in mdesc->map_io() Eric Miao
2011-01-22 22:56 ` [PATCH 2/2] ARM: remove now useless vmalloc.h Eric Miao
2011-01-22 23:15 ` Russell King - ARM Linux [this message]
2011-01-23 4:59 ` [PATCH 1/2] ARM: calculate VMALLOC_END by probing in mdesc->map_io() Eric Miao
2011-01-23 5:30 ` Nicolas Pitre
2011-01-23 7:15 ` [PATCH 1/2] ARM: calculate VMALLOC_END by probing inmdesc->map_io() Santosh Shilimkar
2011-01-23 14:17 ` Nicolas Pitre
2011-01-23 14:27 ` Santosh Shilimkar
2011-01-23 9:40 ` [PATCH 1/2] ARM: calculate VMALLOC_END by probing in mdesc->map_io() Russell King - ARM Linux
2011-01-23 14:21 ` Nicolas Pitre
2011-01-23 14:34 ` Russell King - ARM Linux
2011-01-23 23:05 ` Eric Miao
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=20110122231528.GD11960@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).