All of lore.kernel.org
 help / color / mirror / Atom feed
From: "André Przywara" <andre.przywara@arm.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [linux-sunxi] Re: [PATCH 02/12] sunxi: simplify ACTLR.SMP bit set #ifdef
Date: Sun, 22 Jan 2017 01:06:47 +0000	[thread overview]
Message-ID: <13a5b049-d5aa-738a-a514-d252b068741c@arm.com> (raw)
In-Reply-To: <20170116074447.3m6is3wayfcc2xxl@lukather>

Hi,

On 16/01/17 07:44, Maxime Ripard wrote:
> On Fri, Jan 13, 2017 at 08:28:07AM +0000, Andr? Przywara wrote:
>> On 13/01/17 08:09, Vishnu Patekar wrote:
>> Hi Vishnu,
>>
>>> Even for the single core cortex-a7, SMP bit should be set before
>>> enabling MMU and cache.
>>>
>>> Reference: Cortex A7 r0p5 TRM. section 4.3.31.
>>
>> Ah, good point, thanks for the heads up. I was misled by the SMP name
>> when answering Icenowy.
>> So it's about coherency in general and we need the bit for TLBs and
>> caches to work as well.
>> Let me check what that means for the other SoCs and whether we need to
>> rename the config symbol then.

So I checked the other ARMv7 Cortex TRMs, in contrast to the A7 TRM they
explicitly speak of cache and TLB requests from other _processors_.
So it should not be needed to use caches and the MMU on a uni-core
implementation (which seem to be pretty rare with Cortex-A7s).
But: my understanding is that it actually controls handling coherency
request from outside of the processor core, which could be from a
coherent agent on the bus as well, if I get this correctly.
So I think it does not hurt to enable the bit on the V3s as well and
could avoid potential problems. As this lines up with what the TRM says,
we should turn it on as in the other cores.

Icenowy: did you see problems with setting this bit and turned it off
for a reason or was that just because the bit is named "SMP"?

> If we still needs it,

First: we definitely need this symbol, since it guards an implementation
defined register and the Cortex-A53 does not define it. So we have to
confine its use to the ARMv7 Cortex CPUs.

> x86 has a CONFIG_SMP symbol, that would be
> better to just leverage that.

Sounds tempting, but this seems to be a generic symbol that enables SMP
support _within_ U-Boot, so it allows multiple cores to execute U-Boot
code. This is clearly not what we want. Defining it seems to enable
architecture specific and generic code paths in U-Boot.

I can rename this symbol if that helps to avoid confusion, for instance
to read CONFIG_SUNXI_NO_ACTLR_SMP or to CONFIG_CPU_IS_NOT_SMP or
CONFIG_CPU_IS_UP.

Cheers,
Andre.

  reply	other threads:[~2017-01-22  1:06 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-13  1:29 [U-Boot] [PATCH 00/12] sunxi: Allwinner H5 and OrangePi PC2 support Andre Przywara
2017-01-13  1:29 ` [U-Boot] [PATCH 01/12] sunxi: fix ACTLR.SMP assembly routine Andre Przywara
2017-01-16  7:42   ` Maxime Ripard
2017-01-13  1:29 ` [U-Boot] [PATCH 02/12] sunxi: simplify ACTLR.SMP bit set #ifdef Andre Przywara
2017-01-13  4:41   ` Icenowy Zheng
2017-01-13  8:09     ` [U-Boot] [linux-sunxi] " Vishnu Patekar
2017-01-13  8:28       ` André Przywara
2017-01-16  7:44         ` Maxime Ripard
2017-01-22  1:06           ` André Przywara [this message]
2017-01-23  9:55             ` Maxime Ripard
2017-01-13  8:20     ` [U-Boot] " André Przywara
2017-01-13  1:29 ` [U-Boot] [PATCH 03/12] sunxi: configs: merge sun9i and sun50i SPL memory definitions Andre Przywara
2017-01-16  7:45   ` Maxime Ripard
2017-01-13  1:29 ` [U-Boot] [PATCH 04/12] sunxi: Kconfig: introduce CONFIG_SUNXI_HIGH_SRAM Andre Przywara
2017-01-16  7:46   ` Maxime Ripard
2017-01-13  1:29 ` [U-Boot] [PATCH 05/12] sunxi: provide ARMv8 mem_map for every ARM64 board Andre Przywara
2017-01-16  7:47   ` Maxime Ripard
2017-01-13  1:29 ` [U-Boot] [PATCH 06/12] SPI: SPL: sunxi: fix 64-bit build Andre Przywara
2017-01-15 12:17   ` Rask Ingemann Lambertsen
2017-01-19 13:57     ` Simon Glass
2017-01-13  1:29 ` [U-Boot] [PATCH 07/12] sunxi: DRAM: add Allwinner H5 support Andre Przywara
2017-01-16  7:56   ` Maxime Ripard
2017-01-13  1:30 ` [U-Boot] [PATCH 08/12] sunxi: prepare for sharing MACH_SUN8I_H3 config symbol Andre Przywara
2017-01-16  7:59   ` Maxime Ripard
2017-01-22  1:06     ` André Przywara
2017-01-13  1:30 ` [U-Boot] [PATCH 09/12] sunxi: H5: add COUNTER_FREQUENCY Andre Przywara
2017-01-16  8:01   ` Maxime Ripard
2017-01-22  1:06     ` André Przywara
2017-01-13  1:30 ` [U-Boot] [PATCH 10/12] sunxi: introduce Allwinner H5 config option Andre Przywara
2017-01-13  1:30 ` [U-Boot] [PATCH 11/12] sunxi: dts: add basic OrangePi PC 2 device tree file Andre Przywara
2017-01-13  1:30 ` [U-Boot] [PATCH 12/12] sunxi: configs: add basic OrangePi PC 2 defconfig Andre Przywara
2017-01-13  4:39 ` [U-Boot] [PATCH 00/12] sunxi: Allwinner H5 and OrangePi PC2 support Icenowy Zheng

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=13a5b049-d5aa-738a-a514-d252b068741c@arm.com \
    --to=andre.przywara@arm.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.