Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Ralf Baechle <ralf@linux-mips.org>
To: Robert Millan <rmh@gnu.org>
Cc: wu zhangjin <wuzhangjin@gmail.com>,
	David Daney <ddaney@caviumnetworks.com>,
	Aurelien Jarno <aurelien@aurel32.net>,
	linux-mips@linux-mips.org
Subject: Re: [PATCH] Enable AT_PLATFORM for Loongson 2F CPU
Date: Tue, 9 Nov 2010 15:40:55 +0000	[thread overview]
Message-ID: <20101109154055.GD10799@linux-mips.org> (raw)
In-Reply-To: <1289305442.31389.0@thorin>

On Tue, Nov 09, 2010 at 01:24:02PM +0100, Robert Millan wrote:

> El 09/11/10 10:48:34, en/na wu zhangjin va escriure:
> > Just rechecked this with a friend from Lemote, in reality, the
> > revision id of Loongson-2F is 0x3, so, my old code should be a
> > reference for you:
> > 
> > arch/mips/loongson/common/platform.c
> > 
> > PRID_REV_LOONGSON2F and PRID_REV_LOONGSON2E has already been defined
> > in arch/mips/include/asm/cpu.h
> > 
> > So, the manual is buggy, perhaps the editors of the manuals did copy
> > and paste for I have found the title of the 2F manual is the same as
> > the 2E manual ;-)
> 
> Thank you!  Then I suppose this will do it.

Looks technically ok; I just have a more stylistic problem with the patch:

> +			if (cpu == 0)
> +				__elf_platform = "loongson2e";

Cavium introduced this idion first.  Now your patch is repeating it and I'm
sure other SMP platforms will soon use it.   I don't want a thousand
if (cpu == 0) in that file, so can you cook a patch that introduces a
helper, something like

static void set_elf_platform(const char *plat)
{
	if (cpu == 0)
		__elf_platform = plat;
}

Then use that for all assignments to __elf_platform?  Thanks.

  Ralf

  reply	other threads:[~2010-11-09 15:41 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-04 12:18 [PATCH] Enable AT_PLATFORM for Loongson 2F CPU Robert Millan
2010-11-04 16:44 ` David Daney
2010-11-04 17:33   ` Aurelien Jarno
2010-11-04 18:43     ` Robert Millan
2010-11-04 19:11       ` David Daney
2010-11-04 19:29         ` Ralf Baechle
2010-11-07 12:30       ` Robert Millan
2010-11-08 19:13         ` David Daney
2010-11-08 22:27           ` Robert Millan
2010-11-08 22:50             ` David Daney
2010-11-08 23:02               ` Robert Millan
2010-11-09  9:48                 ` wu zhangjin
2010-11-09 12:24                   ` Robert Millan
2010-11-09 15:40                     ` Ralf Baechle [this message]
2010-11-11 14:47                       ` Robert Millan
2010-11-15 23:50                         ` Robert Millan
2010-11-15 23:59                           ` David Daney
2010-11-22 12:44                             ` Robert Millan

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=20101109154055.GD10799@linux-mips.org \
    --to=ralf@linux-mips.org \
    --cc=aurelien@aurel32.net \
    --cc=ddaney@caviumnetworks.com \
    --cc=linux-mips@linux-mips.org \
    --cc=rmh@gnu.org \
    --cc=wuzhangjin@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox