From: Tom Rini <trini@konsulko.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/1] ARM: Move SYS_CACHELINE_SIZE over to Kconfig
Date: Sun, 21 Aug 2016 11:43:24 -0400 [thread overview]
Message-ID: <20160821154324.GV5342@bill-the-cat> (raw)
In-Reply-To: <CAK7LNARi=gZ3bFwQ-JQTq8My+neFtvFEOuT-ZFL6xEs5ZWW6gg@mail.gmail.com>
On Mon, Aug 22, 2016 at 12:28:19AM +0900, Masahiro Yamada wrote:
> Hi Tom,
>
>
>
> > diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
> > index aef901c..15cd66a 100644
> > --- a/arch/arm/Kconfig
> > +++ b/arch/arm/Kconfig
> > @@ -79,6 +79,11 @@ config SYS_ARM_ARCH
> > default 4 if CPU_SA1100
> > default 8 if ARM64
> >
> > +config SYS_CACHELINE_SIZE
> > + int
> > + default 64 if CPU_V7 || ARM64
Note! I had a brain fart here last night and used 'printf %x' when I
thought I was doing 'printf %d', so, no, ARM64 should get moved up to
shift 7 / 128 bytes.
> > + default 32
> > +
>
> I do not like this very much.
>
> Next, I would need to change it to
>
> config SYS_CACHELINE_SIZE
> int
> + default 128 if CACHE_UNIPHIER
> default 64 if CPU_V7 || ARM64
> default 32
>
> but I do not want to dirty the common place
> with my SoC-specific stuff.
>
>
>
>
> Instead, can we have this part look like as follows?
>
>
> config CACHE_SHIFT_7
> bool
>
> config CACHE_SHIFT_6
> bool
>
> config SYS_CACHELINE_SIZE
> int
> default 128 if CACHE_SHIFT_7
> default 64 if CACHE_SHIFT_6
> default 32
>
>
>
> Then, my config option can select 'CACHE_SHIFT_7'.
>
> config CACHE_UNIPHIER
> bool "Enable the UniPhier L2 cache controller"
> depends on ARCH_UNIPHIER_32BIT
> + select CACHE_SHIFT_7
> default y
>
>
>
> This idea was borrowed from Linux.
> (you can grep "_L1_CACHE_SHIFT" in Linux Kconfig files.)
I'm agreeable to moving over to shift to more obviously align with the
Linux Kernel (and it will make other arches easier to migrate too). But
the UniPhier case currently looks to me like it's overloading what
CONFIG_SYS_CACHELINE_SIZE is doing, ie in the Linux Kernel it's not
setting the shift to 7, in 32bit. Or is this a 64bit only feature?
Thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160821/bc6ef4f9/attachment.sig>
next prev parent reply other threads:[~2016-08-21 15:43 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-21 13:30 [U-Boot] [PATCH 1/1] ARM: Move SYS_CACHELINE_SIZE over to Kconfig Tom Rini
2016-08-21 15:28 ` Masahiro Yamada
2016-08-21 15:43 ` Tom Rini [this message]
2016-08-21 16:32 ` Masahiro Yamada
2016-08-21 20:18 ` Tom Rini
2016-08-21 20:39 ` Wolfgang Denk
2016-08-22 11:36 ` Masahiro Yamada
2016-08-22 3:42 ` Lokesh Vutla
2016-08-22 4:23 ` Heiko Schocher
2016-08-25 13:32 ` Adam Ford
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=20160821154324.GV5342@bill-the-cat \
--to=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
/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.