Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] ARC: allow selection of MMU page size
Date: Fri, 17 Jul 2015 09:11:18 +0000	[thread overview]
Message-ID: <1437124277.9157.16.camel@synopsys.com> (raw)
In-Reply-To: <20150716232530.761b0529@free-electrons.com>

Hi Thomas,

On Thu, 2015-07-16 at 23:25 +0200, Thomas Petazzoni wrote:
> Dear Alexey Brodkin,
> 
> On Thu, 16 Jul 2015 22:04:01 +0300, Alexey Brodkin wrote:
> 
> > +choice
> > +	prompt "MMU Page Size"
> > +	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
> 
> Remove the "And".
> 
> > +	    a toolchain with page size setting that matches hardware.
> 
> "with a page size matching the hardware configuration"
> 
> > +	    Otherwise user-space applications will fail on execution due to
> 
> "will fail at runtime"

Thanks for pointing to that.

> > +	    unexpected data layout/alignment.
> 
> What is the impact for people using external toolchains?

Well people have to use toolchain which page size matches HW.
That means you need to know which value is set in both
toolchain and HW.

By default in either substances 8k is used and most of the time
people will use it.

Still even in case of external toolchain we nay check for PAGE_SHIFT
value in "sysroot/usr/include/bits/uClibc_page.h".

PAGE_SHIFT=12 -> PAGE_SIZE=4k
PAGE_SHIFT=13 -> PAGE_SIZE=8k (default)
PAGE_SHIFT=14 -> PAGE_SIZE=16k

> > +
> > +config BR2_arc_page_size_4k
> 
> Can you use BR2_ARC_PAGE_SIZE_4K instead? I know the BR2_arc option is
> lower-case, but for most architectures options are upper-case, even if
> the core selection is lower-case. I think lower-case options is more an
> accident of the past rather than a real policy.

OK, will do.

> > +	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
> 
> Can you quickly comment on why 4 KB / 16 KB have dependencies on
> specific ARC cores and not 8 KB ?

8K page was the only option on earlier ARC cores like ARC 750D.
Starting from ARC 770D it's possible to select page size from 3 options:
4, 8 and 16k. But still 8k is its default value and most often that's
what people use.

Do you want that comment

> Can you respin with those changes?

Sure, will do shortly.\

-Alexey

  reply	other threads:[~2015-07-17  9:11 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 [this message]
2015-07-16 22:40 ` Arnout Vandecappelle
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=1437124277.9157.16.camel@synopsys.com \
    --to=alexey.brodkin@synopsys.com \
    --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