All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andreas Barth <aba@not.so.argh.org>
To: Matt Turner <mattst88@gmail.com>
Cc: linux-mips@linux-mips.org, debian-mips@lists.debian.org
Subject: Re: [PATCH] mips/loongson: unify compiler flags and load location for Loongson 2E and 2F
Date: Mon, 22 Aug 2011 10:06:58 +0200	[thread overview]
Message-ID: <20110822080658.GA2657@mails.so.argh.org> (raw)
In-Reply-To: <CAEdQ38G8VEh+Q0gOZb7_YgvQK6n2f3u=Bep59tZ9hGJfz+C08Q@mail.gmail.com>

* Matt Turner (mattst88@gmail.com) [110822 02:20]:
> On Sat, Aug 20, 2011 at 9:05 PM, Andreas Barth <aba@not.so.argh.org> wrote:
> > diff --git a/arch/mips/loongson/Platform b/arch/mips/loongson/Platform
> > index 29692e5..d6471a5 100644
> > --- a/arch/mips/loongson/Platform
> > +++ b/arch/mips/loongson/Platform
> > @@ -4,10 +4,8 @@
> >
> >  # Only gcc >= 4.4 have Loongson specific support
> >  cflags-$(CONFIG_CPU_LOONGSON2) += -Wa,--trap
> > -cflags-$(CONFIG_CPU_LOONGSON2E) += \
> > -       $(call cc-option,-march=loongson2e,-march=r4600)
> > -cflags-$(CONFIG_CPU_LOONGSON2F) += \
> > -       $(call cc-option,-march=loongson2f,-march=r4600)
> > +cflags-$(CONFIG_CPU_LOONGSON2) += \
> > +       $(call cc-option,-march=r4600)
> >  # Enable the workarounds for Loongson2f
> >  ifdef CONFIG_CPU_LOONGSON2F_WORKAROUNDS
> >   ifeq ($(call as-option,-Wa$(comma)-mfix-loongson2f-nop,),)
> 
> ... but I don't understand this one.
> 
> So, in the name of simplification, let's just remove the ability to
> compile with -march=loongson2{e,f}? What?

I want to build a kernel that works on both 2e and 2f. Such a kernel
must not be built with 2e or 2f specific code (which are incompatible
to each other).

> Is there some case where a -march=loongson2e kernel won't work on a 2F
> system?

Yes. There are 2E opcodes removed in the 2F. See e.g.
http://media.romanrm.ru/loongson/info/Loongson%202F%20Datasheet.pdf 
  Implementing all the features described in the MIPSIII, Loongson 2E
  has some of custom instructions occupied the MIPS-reserved
  instruction slot.  So in the 2F, these custom-tailored instruction
  opcodes need to remove to the user instruction slot (COP2 or
  Special2).

(I could of course check if a kernel has such opcodes included. But
I'm unhappy to use compiler instructions which might end in invalid
code.


> The commit message should explain this stuff.

Ok.




Andi

  reply	other threads:[~2011-08-22  8:07 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-21  1:05 [PATCH] mips/loongson: unify compiler flags and load location for Loongson 2E and 2F Andreas Barth
2011-08-22  0:19 ` Matt Turner
2011-08-22  8:06   ` Andreas Barth [this message]
2011-08-22 20:15     ` Matt Turner
2011-08-25  8:00 ` Andreas Barth
2011-08-25 23:44   ` Matt Turner
2011-08-26  7:45     ` Andreas Barth
2011-08-26  3:21   ` wu zhangjin
2011-08-26  7:36     ` Andreas Barth

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=20110822080658.GA2657@mails.so.argh.org \
    --to=aba@not.so.argh.org \
    --cc=debian-mips@lists.debian.org \
    --cc=linux-mips@linux-mips.org \
    --cc=mattst88@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.