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: [PATCH] shmobile: fix map_io init usage
Date: Mon, 16 May 2011 08:49:28 +0100	[thread overview]
Message-ID: <20110516074928.GJ30539@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <BANLkTikorWv-9VnRG51v30YFQksRMxVS5Q@mail.gmail.com>

On Mon, May 16, 2011 at 01:28:34PM +0900, Magnus Damm wrote:
> On Fri, May 13, 2011 at 10:56 AM, Jean-Christophe PLAGNIOL-VILLARD
> <plagnioj@jcrosoft.com> wrote:
> > On 18:28 Sun 01 May ? ? , Jean-Christophe PLAGNIOL-VILLARD wrote:
> >> switch early init to init_early and introduce soc map_io
> >>
> >> with this Patch we will not do any more early device setup during the map io
> >>
> >> Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
> >> Cc: Russell King <rmk+kernel@arm.linux.org.uk>
> >> Cc: Paul Mundt <lethal@linux-sh.org>
> >> Cc: Magnus Damm <magnus.damm@gmail.com>
> > ping
> 
> Why? The device init order is changed by this patch to setup the
> serial console later. I fail to see the benefit. Basically, the serial
> console setup is delayed to happen in ->init_early() instead of
> ->map_io(). In practice this means that we restrict ourselves to not
> be able to output debug messages on the serial console from a bunch of
> calls in setup_arch().

Because that's how its supposed to work.  map_io is for setting up the
device mappings.  Those mappings need flushing out to RAM on some CPUs
to be visible, and that's taken care of _after_ map_io has returned.

If the page table entries haven't found their way to RAM, accessing
devices in map_io will cause a fault, and produce a silently non-booting
kernel.  With a write-alloc writeback cache policy, this becomes more
likely than the default policy of a read-alloc writeback cache.

Platforms should not do their own cache and TLB maintainence in their
map_io callback to make it work either - should we need to change
things that means going through all platforms.

  reply	other threads:[~2011-05-16  7:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-01 16:28 [PATCH] shmobile: fix map_io init usage Jean-Christophe PLAGNIOL-VILLARD
2011-05-13  1:56 ` Jean-Christophe PLAGNIOL-VILLARD
2011-05-14 10:26   ` Russell King - ARM Linux
2011-05-16  4:28   ` Magnus Damm
2011-05-16  7:49     ` Russell King - ARM Linux [this message]
2011-05-18 10:56       ` Magnus Damm

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=20110516074928.GJ30539@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).