mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andreas Larsson <andreas@gaisler.com>
To: David Miller <davem@davemloft.net>, sparclinux@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, software@gaisler.com
Subject: [PATCH 1/2] sparc32,leon: Build with -mcpu=leon3 for SPARC_LEON
Date: Tue, 14 Nov 2017 15:03:42 +0100	[thread overview]
Message-ID: <1510668223-18484-2-git-send-email-andreas@gaisler.com> (raw)
In-Reply-To: <1510668223-18484-1-git-send-email-andreas@gaisler.com>

Apart from using LEON3 instruction timing it allows for usage of the
CASA instruction.

Signed-off-by: Andreas Larsson <andreas@gaisler.com>
---
 arch/sparc/Makefile | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/arch/sparc/Makefile b/arch/sparc/Makefile
index 8496a07..673ee73 100644
--- a/arch/sparc/Makefile
+++ b/arch/sparc/Makefile
@@ -24,14 +24,20 @@ LDFLAGS        := -m elf32_sparc
 export BITS    := 32
 UTS_MACHINE    := sparc
 
+ifeq ($(CONFIG_SPARC_LEON),y)
+SPARC_MCPU=leon3
+else
+SPARC_MCPU=v8
+endif
+
 # We are adding -Wa,-Av8 to KBUILD_CFLAGS to deal with a specs bug in some
 # versions of gcc.  Some gcc versions won't pass -Av8 to binutils when you
 # give -mcpu=v8.  This silently worked with older bintutils versions but
 # does not any more.
-KBUILD_CFLAGS  += -m32 -mcpu=v8 -pipe -mno-fpu -fcall-used-g5 -fcall-used-g7
+KBUILD_CFLAGS  += -m32 -mcpu=$(SPARC_MCPU) -pipe -mno-fpu -fcall-used-g5 -fcall-used-g7
 KBUILD_CFLAGS  += -Wa,-Av8
 
-KBUILD_AFLAGS  += -m32 -Wa,-Av8
+KBUILD_AFLAGS  += -m32 -mcpu=$(SPARC_MCPU) -Wa,-Av8
 
 else
 #####
-- 
2.8.0

  reply	other threads:[~2017-11-14 14:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-14 14:03 [PATCH 0/2] sparc32,leon: Allow and use CAS for atomic operations for LEON Andreas Larsson
2017-11-14 14:03 ` Andreas Larsson [this message]
2017-11-29 18:38   ` [PATCH 1/2] sparc32,leon: Build with -mcpu=leon3 for SPARC_LEON David Miller
2017-11-14 14:03 ` [PATCH 2/2] sparc32,leon: Add support for atomic operations with CAS Andreas Larsson

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=1510668223-18484-2-git-send-email-andreas@gaisler.com \
    --to=andreas@gaisler.com \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=software@gaisler.com \
    --cc=sparclinux@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®