public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v7 01/17] ARM: Clean up CONFIG_ARMV7_NONSEC/VIRT/PSCI conditions
Date: Wed, 22 Apr 2015 16:31:47 +0200	[thread overview]
Message-ID: <5537B0D3.1020500@siemens.com> (raw)
In-Reply-To: <20150422150337.0b5fa70f@e106785-lin.cambridge.arm.com>

On 2015-04-22 16:03, Andre Przywara wrote:
> On Tue, 21 Apr 2015 07:18:24 +0200
> Jan Kiszka <jan.kiszka@siemens.com> wrote:
> 
> Hi Jan,
> 
>> CONFIG_ARMV7_VIRT depends on CONFIG_ARMV7_NONSEC,
> 
> Is this Kconfig rule always enforced these days? Or can one get away
> without it by using stuff from include/configs/*.h?

I bet you can mess up a lot that way as those configs are pulled in
during build, not during configure. But I don't think we want to
replicate Kconfig rules into config header sanity checks.

Fact is that only Freescale's ls1021aqds.h and ls1021atwr.h still set
those switches in headers, but then both hardwired to "y" - do you know
why, Alison?

> 
>> thus doesn't need to
>> be taken into account additionally. CONFIG_ARMV7_PSCI is only set on
>> boards that support CONFIG_ARMV7_NONSEC, and it only works on those.
> 
> Shouldn't this be also modelled in Kconfig then?
> 

Likely, but that should be a separate patch.

> ...
> 
>> CC: Tang Yuantian <Yuantian.Tang@freescale.com>
>> CC: York Sun <yorksun@freescale.com>
>> CC: Steve Rae <srae@broadcom.com>
>> CC: Andre Przywara <andre.przywara@linaro.org>
>> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
>> ---
>>  arch/arm/cpu/armv7/Makefile             | 2 +-
>>  arch/arm/cpu/armv7/ls102xa/cpu.c        | 2 +-
>>  arch/arm/cpu/armv7/virt-dt.c            | 2 +-
>>  arch/arm/cpu/u-boot.lds                 | 2 +-
>>  arch/arm/include/asm/armv7.h            | 4 ++--
>>  arch/arm/lib/bootm-fdt.c                | 2 +-
>>  arch/arm/lib/bootm.c                    | 6 +++---
>>  board/armltd/vexpress/vexpress_common.c | 2 +-
>>  board/broadcom/bcm_ep/board.c           | 2 +-
>>  board/freescale/common/arm_sleep.c      | 2 +-
>>  10 files changed, 13 insertions(+), 13 deletions(-)
>>
>> diff --git a/arch/arm/cpu/armv7/Makefile b/arch/arm/cpu/armv7/Makefile
>> index 21fc03b..fbd0bf3 100644
>> --- a/arch/arm/cpu/armv7/Makefile
>> +++ b/arch/arm/cpu/armv7/Makefile
>> @@ -18,7 +18,7 @@ obj-y	+= lowlevel_init.o
>>  endif
>>  endif
>>  
>> -ifneq ($(CONFIG_ARMV7_NONSEC)$(CONFIG_ARMV7_VIRT),)
>> +ifneq ($(CONFIG_ARMV7_NONSEC),)
>>  obj-y	+= nonsec_virt.o
>>  obj-y	+= virt-v7.o
>>  obj-y	+= virt-dt.o
>> diff --git a/arch/arm/cpu/armv7/ls102xa/cpu.c b/arch/arm/cpu/armv7/ls102xa/cpu.c
>> index 1a640bb..75f0d8c 100644
>> --- a/arch/arm/cpu/armv7/ls102xa/cpu.c
>> +++ b/arch/arm/cpu/armv7/ls102xa/cpu.c
>> @@ -329,7 +329,7 @@ int arch_cpu_init(void)
>>  	return 0;
>>  }
>>  
>> -#if defined(CONFIG_ARMV7_NONSEC) || defined(CONFIG_ARMV7_VIRT)
>> +#ifdef CONFIG_ARMV7_NONSEC
>>  /* Set the address at which the secondary core starts from.*/
>>  void smp_set_core_boot_addr(unsigned long addr, int corenr)
>>  {
>> diff --git a/arch/arm/cpu/armv7/virt-dt.c b/arch/arm/cpu/armv7/virt-dt.c
>> index 9408e33..caaaaab 100644
>> --- a/arch/arm/cpu/armv7/virt-dt.c
>> +++ b/arch/arm/cpu/armv7/virt-dt.c
>> @@ -90,7 +90,7 @@ static int fdt_psci(void *fdt)
>>  
>>  int psci_update_dt(void *fdt)
>>  {
>> -#if defined(CONFIG_ARMV7_NONSEC) || defined(CONFIG_ARMV7_VIRT)
>> +#ifdef CONFIG_ARMV7_NONSEC
> 
> This is redundant now, isn't it? We compile this file only if
> CONFIG_ARMV7_NONSEC is defined (see above).

Right, even better. I'll clean up on top unless this series requires
another round.

> 
> The rest of the patch looks OK to me.
> 
> Cheers,
> Andre.

Thanks,
Jan

-- 
Siemens AG, Corporate Technology, CT RTC ITP SES-DE
Corporate Competence Center Embedded Linux

  reply	other threads:[~2015-04-22 14:31 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-21  5:18 [U-Boot] [PATCH v7 00/17] Add PSCI support for Jetson TK1/Tegra124 + CNTFRQ fix Jan Kiszka
2015-04-21  5:18 ` [U-Boot] [PATCH v7 01/17] ARM: Clean up CONFIG_ARMV7_NONSEC/VIRT/PSCI conditions Jan Kiszka
2015-04-22  6:02   ` Huan Wang
2015-04-22 14:03   ` Andre Przywara
2015-04-22 14:31     ` Jan Kiszka [this message]
2015-04-21  5:18 ` [U-Boot] [PATCH v7 02/17] sun7i: Remove duplicate call to psci_arch_init Jan Kiszka
2015-04-21  5:18 ` [U-Boot] [PATCH v7 03/17] ARM: Factor out common psci_get_cpu_id Jan Kiszka
2015-04-21  5:18 ` [U-Boot] [PATCH v7 04/17] ARM: Factor out reusable psci_cpu_off_common Jan Kiszka
2015-04-21  5:18 ` [U-Boot] [PATCH v7 05/17] ARM: Factor out reusable psci_cpu_entry Jan Kiszka
2015-04-21  5:18 ` [U-Boot] [PATCH v7 06/17] ARM: Factor out reusable psci_get_cpu_stack_top Jan Kiszka
2015-04-21  5:18 ` [U-Boot] [PATCH v7 07/17] ARM: Put target PC for PSCI CPU_ON on per-CPU stack Jan Kiszka
2015-05-13  7:21   ` Wang Dongsheng
2015-05-13  7:31     ` Jan Kiszka
2015-05-13  8:06       ` Wang Dongsheng
2015-04-21  5:18 ` [U-Boot] [PATCH v7 08/17] tegra124: Add more registers to struct mc_ctlr Jan Kiszka
2015-04-21  5:18 ` [U-Boot] [PATCH v7 09/17] virt-dt: Allow reservation of secure region when in a RAM carveout Jan Kiszka
2015-04-21  5:18 ` [U-Boot] [PATCH v7 10/17] tegra: Make tegra_powergate_power_on public Jan Kiszka
2015-04-21  5:18 ` [U-Boot] [PATCH v7 11/17] ARM: Add board-specific initialization hook for PSCI Jan Kiszka
2015-04-21  5:18 ` [U-Boot] [PATCH v7 12/17] tegra124: Add PSCI support for Tegra124 Jan Kiszka
2015-04-21  5:18 ` [U-Boot] [PATCH v7 13/17] tegra124: Reserve secure RAM using MC_SECURITY_CFG{0, 1}_0 Jan Kiszka
2015-04-21  5:18 ` [U-Boot] [PATCH v7 14/17] tegra: Set CNTFRQ for secondary CPUs Jan Kiszka
2015-04-21  5:18 ` [U-Boot] [PATCH v7 15/17] ARM: tegra: Enable SMMU when going non-secure Jan Kiszka
2015-04-21  5:18 ` [U-Boot] [PATCH v7 16/17] tegra: Boot in non-secure mode by default Jan Kiszka
2015-04-21  5:18 ` [U-Boot] [PATCH v7 17/17] jetson-tk1: Add PSCI configuration options and reserve secure code Jan Kiszka
2015-04-21 17:58   ` Ian Campbell
2015-04-21 18:10     ` Jan Kiszka
2015-04-21 15:33 ` [U-Boot] [PATCH v7 00/17] Add PSCI support for Jetson TK1/Tegra124 + CNTFRQ fix Stephen Warren
2015-05-08  6:01 ` Jan Kiszka
2015-05-08 15:40   ` Tom Warren

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=5537B0D3.1020500@siemens.com \
    --to=jan.kiszka@siemens.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox