From: Wu Zhangjin <wuzhangjin@gmail.com>
To: linux-kernel@vger.kernel.org, linux-mips@linux-mips.org,
ralf@linux-mips.org
Cc: Wu Zhangjin <wuzhangjin@gmail.com>, Yan Hua <yanh@lemote.com>,
Philippe Vachon <philippe@cowpig.ca>,
Zhang Le <r0bertz@gentoo.org>, Zhang Fuxin <zhangfx@lemote.com>,
loongson-dev <loongson-dev@googlegroups.com>,
Liu Junliang <liujl@lemote.com>, Erwan Lerale <erwan@thiscow.com>,
Arnaud Patard <apatard@mandriva.com>
Subject: [PATCH v4 15/16] [loongson] add gcc 4.4 support for Loongson2E
Date: Thu, 2 Jul 2009 23:27:41 +0800 [thread overview]
Message-ID: <c99f466b537534606e679fd21e06f19838dfd79d.1246546684.git.wuzhangjin@gmail.com> (raw)
In-Reply-To: <cover.1246546684.git.wuzhangjin@gmail.com>
because only gcc >=4.4 have loongson-specific support, we need to choose
the suitable -march argument for gcc <= 4.3 and gcc >= 4.4, and here, we
use -march=loongson2e for loongson2e.
thanks goes to Arnaud Patard <apatard@mandriva.com> for suggestion of
using cc-options(Documentation/kbuild/makefiles.txt). and thanks Zhang
Le for introducing the new CPU_LOONGSON2E kernel option.
NOTE: -mtune option is not need if -march and -mtune use the same value.
Signed-off-by: Zhang Le <r0bertz@gentoo.org>
Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com>
---
arch/mips/Kconfig | 18 +++++++++++-------
arch/mips/Makefile | 6 +++++-
arch/mips/loongson/Kconfig | 2 +-
3 files changed, 17 insertions(+), 9 deletions(-)
diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index 482dcc3..466920a 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -1030,12 +1030,10 @@ choice
prompt "CPU type"
default CPU_R4X00
-config CPU_LOONGSON2
- bool "Loongson 2"
- depends on SYS_HAS_CPU_LOONGSON2
- select CPU_SUPPORTS_32BIT_KERNEL
- select CPU_SUPPORTS_64BIT_KERNEL
- select CPU_SUPPORTS_HIGHMEM
+config CPU_LOONGSON2E
+ bool "Loongson 2E"
+ depends on SYS_HAS_CPU_LOONGSON2E
+ select CPU_LOONGSON2
help
The Loongson 2E processor implements the MIPS III instruction set
with many extensions.
@@ -1282,7 +1280,13 @@ config CPU_CAVIUM_OCTEON
endchoice
-config SYS_HAS_CPU_LOONGSON2
+config CPU_LOONGSON2
+ bool
+ select CPU_SUPPORTS_32BIT_KERNEL
+ select CPU_SUPPORTS_64BIT_KERNEL
+ select CPU_SUPPORTS_HIGHMEM
+
+config SYS_HAS_CPU_LOONGSON2E
bool
config SYS_HAS_CPU_MIPS32_R1
diff --git a/arch/mips/Makefile b/arch/mips/Makefile
index 94d6f58..1efa9aa 100644
--- a/arch/mips/Makefile
+++ b/arch/mips/Makefile
@@ -120,7 +120,11 @@ cflags-$(CONFIG_CPU_R4300) += -march=r4300 -Wa,--trap
cflags-$(CONFIG_CPU_VR41XX) += -march=r4100 -Wa,--trap
cflags-$(CONFIG_CPU_R4X00) += -march=r4600 -Wa,--trap
cflags-$(CONFIG_CPU_TX49XX) += -march=r4600 -Wa,--trap
-cflags-$(CONFIG_CPU_LOONGSON2) += -march=r4600 -Wa,--trap
+# only gcc >= 4.4 have the loongson-specific support
+cflags-$(CONFIG_CPU_LOONGSON2) += -Wa,--trap
+cflags-$(CONFIG_CPU_LOONGSON2E) += \
+ $(call cc-option,-march=loongson2e,-march=r4600)
+
cflags-$(CONFIG_CPU_MIPS32_R1) += $(call cc-option,-march=mips32,-mips32 -U_MIPS_ISA -D_MIPS_ISA=_MIPS_ISA_MIPS32) \
-Wa,-mips32 -Wa,--trap
cflags-$(CONFIG_CPU_MIPS32_R2) += $(call cc-option,-march=mips32r2,-mips32r2 -U_MIPS_ISA -D_MIPS_ISA=_MIPS_ISA_MIPS32) \
diff --git a/arch/mips/loongson/Kconfig b/arch/mips/loongson/Kconfig
index 376712a..d450925 100644
--- a/arch/mips/loongson/Kconfig
+++ b/arch/mips/loongson/Kconfig
@@ -7,7 +7,7 @@ config LEMOTE_FULOONG2E
select ARCH_SPARSEMEM_ENABLE
select CEVT_R4K
select CSRC_R4K
- select SYS_HAS_CPU_LOONGSON2
+ select SYS_HAS_CPU_LOONGSON2E
select DMA_NONCOHERENT
select BOOT_ELF32
select BOARD_SCACHE
--
1.6.2.1
next prev parent reply other threads:[~2009-07-02 15:28 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-02 15:15 [PATCH v4 00/16] Cleanup Lemote FuLoong2e Support Wu
2009-07-02 15:18 ` [PATCH v4 01/16] [loongson] eary_printk: Remove existing implementation Wu Zhangjin
2009-07-02 15:19 ` [PATCH v4 02/16] [loongson] kgdb: Remove out-of-date board-specific source code Wu Zhangjin
2009-07-22 20:31 ` Jason Wessel
2009-07-02 15:20 ` [PATCH v4 03/16] [loongson] early_printk: add new implmentation Wu Zhangjin
2009-07-06 10:43 ` Ralf Baechle
2009-07-06 13:57 ` Wu Zhangjin
2009-07-02 15:20 ` [PATCH v4 04/16] [loongson] pm: Remove redundant source code Wu Zhangjin
2009-07-02 15:21 ` [PATCH v4 05/16] [loongson] pm: clean up the reboot support Wu Zhangjin
2009-07-02 15:22 ` [PATCH v4 06/16] [loongson] pci: use existing mips_io_port_base Wu Zhangjin
2009-07-02 15:22 ` [PATCH v4 07/16] [loongson] split the implementation of prom,setup parts Wu Zhangjin
2009-07-02 15:23 ` [PATCH v4 08/16] [loongson] clean up the coding style Wu Zhangjin
2009-07-02 15:23 ` [PATCH v4 09/16] [loongson] pci: clean up pcimap setup Wu Zhangjin
2009-07-02 15:24 ` [PATCH v4 10/16] [loongson] rtc: enable legacy RTC driver on fulong Wu Zhangjin
2009-07-02 15:25 ` [PATCH v4 11/16] [loongson] add oprofile support Wu Zhangjin
2009-07-02 15:26 ` [PATCH v4 12/16] [loongson] change naming methods Wu Zhangjin
2009-07-02 15:26 ` [PATCH v4 13/16] [loongson] split common loongson source code out Wu Zhangjin
2009-07-02 15:27 ` [PATCH v4 14/16] [loongson] add a machtype kernel command line argument Wu Zhangjin
2009-07-02 15:27 ` Wu Zhangjin [this message]
2009-07-02 15:28 ` [PATCH v4 16/16] [loongson] update the default config file for fuloong2e Wu Zhangjin
2010-06-17 10:47 ` [PATCH v4 00/16] Cleanup Lemote FuLoong2e Support Stuart Longland
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=c99f466b537534606e679fd21e06f19838dfd79d.1246546684.git.wuzhangjin@gmail.com \
--to=wuzhangjin@gmail.com \
--cc=apatard@mandriva.com \
--cc=erwan@thiscow.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@linux-mips.org \
--cc=liujl@lemote.com \
--cc=loongson-dev@googlegroups.com \
--cc=philippe@cowpig.ca \
--cc=r0bertz@gentoo.org \
--cc=ralf@linux-mips.org \
--cc=yanh@lemote.com \
--cc=zhangfx@lemote.com \
/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®