Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Arnout Vandecappelle <arnout@mind.be>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] ARC: allow selection of MMU page size
Date: Fri, 17 Jul 2015 00:40:20 +0200	[thread overview]
Message-ID: <55A832D4.9020801@mind.be> (raw)
In-Reply-To: <1437073441-11321-1-git-send-email-abrodkin@synopsys.com>

On 07/16/15 21:04, Alexey Brodkin wrote:
> Modern ARC cores (those sporting MMU of version 3 and 4) allow selection
> of different page sizes (4, 8 or 16 kB) during ASIC design creation.
> And it's important to build a toolchain with page size setting that matches
> hardware.
> 
> Otherwise user-space applications will fail on execution due to
> unexpected data layout/alignment etc.
> 
> Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
> c: Anton Kolesov <akolesov@synopsys.com>
> Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> ---
>  arch/Config.in.arc       | 30 ++++++++++++++++++++++++++++++
>  package/uclibc/uclibc.mk |  8 ++++++++
>  2 files changed, 38 insertions(+)
> 
> diff --git a/arch/Config.in.arc b/arch/Config.in.arc
> index b48a90f..e960eb8 100644
> --- a/arch/Config.in.arc
> +++ b/arch/Config.in.arc
> @@ -40,3 +40,33 @@ config BR2_GCC_TARGET_CPU
>  	default "arc700" if BR2_arc750d
>  	default "arc700" if BR2_arc770d
>  	default "archs"	 if BR2_archs38
> +
> +choice
> +	prompt "MMU Page Size"

 It is not really current policy, but wouldn't it make more sense to do

	prompt "MMU Page Size" if BR2_arc770d || BR2_archs38

? (i.e., only show it when there's anything to choose).

 Also perhaps it makes sense to add a new symbol
BR2_ARC_SUPPORTS_PAGE_SIZE_SELECTION or similar instead of specifying the
individual processors.


 Regards,
 Arnout

> +	default BR2_arc_page_size_8k
> +	help
> +	    MMU starting from version 3 (could be found in ARC 770) and now
> +	    version 4 (could be found in ARC HS38) allows selection of page
> +	    size during ASIC design creation. And it's important to build
> +	    a toolchain with page size setting that matches hardware.
> +	    Otherwise user-space applications will fail on execution due to
> +	    unexpected data layout/alignment.
> +
> +config BR2_arc_page_size_4k
> +	bool "4KB"
> +	depends on BR2_arc770d || BR2_archs38
> +
> +config BR2_arc_page_size_8k
> +	bool "8KB"
> +
> +config BR2_arc_page_size_16k
> +	bool "16KB"
> +	depends on BR2_arc770d || BR2_archs38

[snip]


-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

  parent reply	other threads:[~2015-07-16 22:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-16 19:04 [Buildroot] [PATCH] ARC: allow selection of MMU page size Alexey Brodkin
2015-07-16 21:25 ` Thomas Petazzoni
2015-07-17  9:11   ` Alexey Brodkin
2015-07-16 22:40 ` Arnout Vandecappelle [this message]
2015-07-17  7:59   ` Thomas Petazzoni
2015-07-17  8:04     ` Alexey Brodkin

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=55A832D4.9020801@mind.be \
    --to=arnout@mind.be \
    --cc=buildroot@busybox.net \
    /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