All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bob Picco <bpicco@meloft.net>
To: sparclinux@vger.kernel.org
Subject: Re: [PATCH v1 1/3] sparc64: correctly recognise M7 cpu type
Date: Sun, 24 Aug 2014 12:35:06 +0000	[thread overview]
Message-ID: <20140824123506.GA5102@zareason> (raw)
In-Reply-To: <1408686773-3044-1-git-send-email-allen.pais@oracle.com>

Hi,
David Miller wrote:	[Sun Aug 24 2014, 02:43:11AM EDT]
> From: Allen Pais <allen.pais@oracle.com>
> Date: Sun, 24 Aug 2014 11:49:29 +0530
> 
> > David,
> >> 
> >>> @@ -414,6 +414,8 @@ sun4v_chip_type:
> >>>  	cmp	%g2, 'T'
> >>>  	be,pt	%xcc, 70f
> >>>  	 cmp	%g2, 'M'
> >>> +	be,pt	%xcc, 71f
> >>> +	 nop
> >>>  	bne,pn	%xcc, 49f
> >>>  	 nop
> >> 
> >> This code block is supposed to fallthrough when %g2 is 'M' so that
> >> we accept all of "{T,M}345..." but your change is breaking that
> >> such that we will now only accept "M" as a prefix for "7".
> >> 
> >> That's a regression.
> >> 
> >> All you have to do is add the new comparison against '7' in the
> >> "70:" label code block, and you're done.
> >> 
> > 
> >  When we are on this topic, here's a patch that attempts to simplify 
> > cpu detection. 
> > 
> > Here's a quick diff.
> 
> You can't call C code until you've cleared the BSS, you can't clear
> the BSS until you hook up the proper optimized routines, you can't
> hook up the proper optimized routined until you know the cpu type.
I'm aware of BSS and cpu initialization routines. Many issues are subtle
until paging_init finishes.

What BSS does this code touch or reference? None that I'm aware of.

The code is executing on OBP stack and the kernel has been remapped and
doesn't require PIC address manipulation any longer. Your only assumptions
should be OBP handling register window events and accessing compile time
initialized data. BSS is taboo for the reason you state.

One obviously has to be VERY careful. The "VERY" part is true of all code
here. Should there be fear of strcmp then implement it in simple "C" and name
it "boot_strcmp".

Perhaps I've missed an issue.

thanx,

bob
> 
> I would have done this years ago otherwise.
> --
> To unsubscribe from this list: send the line "unsubscribe sparclinux" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2014-08-24 12:35 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-22  5:53 [PATCH v1 1/3] sparc64: correctly recognise M7 cpu type Allen Pais
2014-08-23 18:51 ` David Miller
2014-08-24  6:18 ` David Miller
2014-08-24  6:19 ` Allen Pais
2014-08-24  6:31 ` Allen Pais
2014-08-24  6:43 ` David Miller
2014-08-24  6:43 ` Allen Pais
2014-08-24 12:35 ` Bob Picco [this message]
2014-08-24 19:06 ` David Miller

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=20140824123506.GA5102@zareason \
    --to=bpicco@meloft.net \
    --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 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.