From: msalter@redhat.com (Mark Salter)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] arm64: fixmap: fix missing sub-page offset for earlyprintk
Date: Mon, 28 Apr 2014 15:44:57 -0400 [thread overview]
Message-ID: <1398714297.3010.79.camel@deneb.redhat.com> (raw)
In-Reply-To: <1398711006-14943-1-git-send-email-marc.zyngier@arm.com>
On Mon, 2014-04-28 at 19:50 +0100, Marc Zyngier wrote:
> Commit d57c33c5daa4 (add generic fixmap.h) added (among other
> similar things) set_fixmap_io to deal with early ioremap of devices.
>
> More recently, commit bf4b558eba92 (arm64: add early_ioremap support)
> converted the arm64 earlyprintk to use set_fixmap_io. A side effect of
> this conversion is that my virtual machines have stopped booting when
> I pass "earlyprintk=uart8250-8bit,0x3f8" to the guest kernel.
>
> Turns out that the new earlyprintk code doesn't care at all about
> sub-page offsets, and just assumes that the earlyprintk device will
> be page-aligned. Obviously, that doesn't play well with the above example.
>
> Further investigation shows that set_fixmap_io uses __set_fixmap instead
> of __set_fixmap_offset. A fix is to introduce a set_fixmap_offset_io that
> uses the latter, and to remove the superflous call to fix_to_virt
> (which only returns the value that set_fixmap_io has already given us).
>
> With this applied, my VMs are back in business. Tested on a Cortex-A57
> platform with kvmtool as platform emulation.
>
> Cc: Mark Salter <msalter@redhat.com>
> Cc: Catalin Marinas <catalin.marinas@arm.com>
> Cc: Will Deacon <will.deacon@arm.com>
> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
> ---
Acked-by: Mark Salter <msalter@redhat.com>
next prev parent reply other threads:[~2014-04-28 19:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-28 18:50 [PATCH] arm64: fixmap: fix missing sub-page offset for earlyprintk Marc Zyngier
2014-04-28 19:44 ` Mark Salter [this message]
2014-04-28 23:51 ` Rob Herring
2014-04-29 8:57 ` Catalin Marinas
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=1398714297.3010.79.camel@deneb.redhat.com \
--to=msalter@redhat.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).