From: will.deacon@arm.com (Will Deacon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: kvm: implement replacement for ld's LOG2CEIL()
Date: Mon, 23 Mar 2015 11:40:01 +0000 [thread overview]
Message-ID: <20150323114001.GF11189@arm.com> (raw)
In-Reply-To: <1427107977-18591-1-git-send-email-ard.biesheuvel@linaro.org>
On Mon, Mar 23, 2015 at 10:52:57AM +0000, Ard Biesheuvel wrote:
> Commit 06f75a1f6200 ("ARM, arm64: kvm: get rid of the bounce
> page") uses ld's builtin function LOG2CEIL() to align the
> KVM init code to a log2 upper bound of its size. However,
> this function turns out to be a fairly recent addition to
> binutils, which breaks the build for older toolchains.
>
> So instead, implement a replacement LOG2_ROUNDUP() using
> the C preprocessor.
>
> Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
> ---
>
> Linker map output after applying this patch:
>
> 0xc09a2590 __idmap_text_end = .
> [...]
> *fill* 0xc09a2590 0x70
> 0xc09a2600 __hyp_idmap_text_start = .
> *(.hyp.idmap.text)
> .hyp.idmap.text
> 0xc09a2600 0x100 arch/arm/kvm/built-in.o
> 0xc09a2600 __kvm_hyp_init
> 0xc09a26ec __kvm_hyp_init_end
> 0xc09a2700 __hyp_idmap_text_end = .
>
> which confirms that the alignemnt is correct. The size of the region
> is 0xec bytes, and 0x70 bytes of padding are emitted to align it at
> a 0x100 byte boundary
>
> arch/arm/kernel/vmlinux.lds.S | 24 ++++++++++++++++++++++--
> 1 file changed, 22 insertions(+), 2 deletions(-)
Thanks Ard. I pushed this on top of kvm-bounce-page and re-generated
for-next/core.
Will
next prev parent reply other threads:[~2015-03-23 11:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-23 10:52 [PATCH] ARM: kvm: implement replacement for ld's LOG2CEIL() Ard Biesheuvel
2015-03-23 11:40 ` Will Deacon [this message]
2015-03-23 16:03 ` Ard Biesheuvel
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=20150323114001.GF11189@arm.com \
--to=will.deacon@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.