lkml.org 
[lkml]   [2020]   [Jun]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH v2 1/4] ARC: allow to override default mcpu compiler flag
Date
Hi Eugeniy,

A couple of minor notes below.

> -----Original Message-----
> From: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
> Sent: Thursday, June 4, 2020 8:39 PM
> To: linux-snps-arc@lists.infradead.org; Vineet Gupta <vgupta@synopsys.com>
> Cc: linux-kernel@vger.kernel.org; Alexey Brodkin <abrodkin@synopsys.com>; Eugeniy Paltsev
> <paltsev@synopsys.com>
> Subject: [PATCH v2 1/4] ARC: allow to override default mcpu compiler flag
>
> Kernel builds set their own default -mcpu for a given ISA build.

We used to use a default "-mcpu" per ARC ISA version (one for ARCompact
and one for ARCv2).

> But that gets in the way of "custom" -mcpu flags from propagating
> into kernel build.

But with more versions of CPUs & SoCs becoming available we want to
be able to fine-tune generated code more precise.

> This will also be used in next patches for HSDK-4xD board support which
> uses a different -mcpu to effect dual issue scheduling.

"...for utilization of the new CPU's dual-issue capabilities"?

> +++ b/arch/arc/Makefile
> @@ -10,8 +10,25 @@ CROSS_COMPILE := $(call cc-cross-prefix, arc-linux- arceb-linux-)
> endif
>
> cflags-y += -fno-common -pipe -fno-builtin -mmedium-calls -D__linux__
> -cflags-$(CONFIG_ISA_ARCOMPACT) += -mA7
> -cflags-$(CONFIG_ISA_ARCV2) += -mcpu=hs38
> +
> +tune-mcpu-def-$(CONFIG_ISA_ARCOMPACT) := -mA7

I'd suggest to either swap "-mA7" which is being obsoleted with "-mcpu=arc700"
right here or as a separate change, otherwise we may soon get ATC700 builds
broken with newer compilers.

-Alexey

\
 
 \ /
  Last update: 2020-06-05 12:48    [W:0.273 / U:0.340 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site