linux-mips
[Top] [All Lists]

Re: [GIT repo] loongson: Merge and Clean up fuloong(2e), fuloong(2f) and

To: Wu Zhangjin <wuzhangjin@gmail.com>
Subject: Re: [GIT repo] loongson: Merge and Clean up fuloong(2e), fuloong(2f) and yeeloong(2f) support
From: Zhang Le <r0bertz@gentoo.org>
Date: Sat, 16 May 2009 01:09:27 +0800
Cc: Arnaud Patard <apatard@mandriva.com>, linux-mips@linux-mips.org, Ralf Baechle <ralf@linux-mips.org>, loongson-dev@googlegroups.com, zhangfx@lemote.com, yanh@lemote.com, Philippe Vachon <philippe@cowpig.ca>, Erwan Lerale <erwan@thiscow.com>
In-reply-to: <1242383903.10164.118.camel@falcon>
Mail-followup-to: Wu Zhangjin <wuzhangjin@gmail.com>, Arnaud Patard <apatard@mandriva.com>, linux-mips@linux-mips.org, Ralf Baechle <ralf@linux-mips.org>, loongson-dev@googlegroups.com, zhangfx@lemote.com, yanh@lemote.com, Philippe Vachon <philippe@cowpig.ca>, Erwan Lerale <erwan@thiscow.com>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <1242357553.30339.66.camel@falcon> <m3iqk2rcwd.fsf@anduin.mandriva.com> <1242383903.10164.118.camel@falcon>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.5.19 (2009-01-05)
On 18:38 Fri 15 May     , Wu Zhangjin wrote:
> On Fri, 2009-05-15 at 10:25 +0200, Arnaud Patard wrote:
> > - even if it should not affect the kernel, compiling with
> >   -march=loongson2f even for 2e (you're matching on loongson2 so 2e and
> >   2f) looks weird.
> 
> sorry, this is really a very obvious error, in 2e, -march=loongson2e
> should be used.
> 
> to fix this problem, perhaps we can add two new kernel options:
> 
> config CPU_LOONGSON2E
>       bool
> 
> config CPU_LOONGSON2F
>       bool
> 
> and then use this solution:
> 
> config FULOONG2E
>       ...
>       select CPU_LOONGSON2E
>       ...
> 
> config YEELOONG2F
>       ...
>       select CPU_LOONGSON2F
>       ...
> 
> cflags-$(CONFIG_CPU_LOONGSON2E)  += -march=loongson2e -Wa,--trap
> cflags-$(CONFIG_CPU_LOONGSON2F)  += -march=loongson2f -Wa,--trap
> 
> is this solution okay?

I have tried to solve this problem once. At that time, there is no loongson-dev
list. So I send my patch to yanhua and zhang fuxin directly. It seems that they
didn't forward that patch to you.

For the whole patch, please check attachment. It does not applicable on top of
your work any more.

But here is how I deal with the CPU types:

@@ -951,14 +929,20 @@ 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.
+
+config CPU_LOONGSON2F
+       bool "Loongson 2F"
+       depends on SYS_HAS_CPU_LOONGSON2F
+       select CPU_LOONGSON2
        help
-         The Loongson 2E/2F processor implements the MIPS III instruction set
+         The Loongson 2F processor implements the MIPS III instruction set
         with many extensions.

 config CPU_MIPS32_R1
@@ -1171,7 +1155,16 @@ config CPU_SB1

 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_LOONGSON2F
        bool

 config SYS_HAS_CPU_MIPS32_R1

-- 
Zhang, Le
Gentoo/Loongson Developer
http://zhangle.is-a-geek.org
0260 C902 B8F8 6506 6586 2B90 BC51 C808 1E4E 2973

Attachment: 0001-Resent-RFC-lemote-products-naming-convention-chan.patch
Description: Text document

Attachment: pgpBtn4Aeh3uH.pgp
Description: PGP signature

<Prev in Thread] Current Thread [Next in Thread>