Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Daniel Sanders <daniel.sanders@imgtec.com>,
	linux-mips@linux-mips.org, Ralf Baechle <ralf@linux-mips.org>
Cc: Paul Burton <paul.burton@imgtec.com>,
	Markos Chandras <markos.chandras@imgtec.com>,
	James Hogan <james.hogan@imgtec.com>,
	Behan Webster <behanw@converseincode.com>
Subject: Re: [PATCH] MIPS: Changed current_thread_info() to an equivalent supported by both clang and GCC
Date: Fri, 09 Jan 2015 15:17:55 +0300	[thread overview]
Message-ID: <54AFC6F3.1020300@cogentembedded.com> (raw)
In-Reply-To: <1420805177-9087-1-git-send-email-daniel.sanders@imgtec.com>

Hello.

On 1/9/2015 3:06 PM, Daniel Sanders wrote:

> Without this, a 'break' instruction is executed very early in the boot and
> the boot hangs.

> The problem is that clang doesn't honour named registers on local variables
> and silently treats them as normal uninitialized variables. However, it
> does honour them on global variables.

> Signed-off-by: Daniel Sanders <daniel.sanders@imgtec.com>

[...]

> diff --git a/arch/mips/include/asm/thread_info.h b/arch/mips/include/asm/thread_info.h
> index 99eea59..2a2f3c4 100644
> --- a/arch/mips/include/asm/thread_info.h
> +++ b/arch/mips/include/asm/thread_info.h
> @@ -58,11 +58,11 @@ struct thread_info {
>   #define init_stack		(init_thread_union.stack)
>
>   /* How to get the thread information struct from C.  */
> +register struct thread_info *current_gp_register asm("$28");

    *static* missing?

WBR, Sergei

  parent reply	other threads:[~2015-01-09 12:18 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-09 12:06 [PATCH] MIPS: Changed current_thread_info() to an equivalent supported by both clang and GCC Daniel Sanders
2015-01-09 12:06 ` Daniel Sanders
2015-01-09 12:17 ` Sergei Shtylyov [this message]
2015-01-09 13:23   ` Daniel Sanders
2015-01-09 17:26     ` David Daney
2015-01-09 20:06       ` Daniel Sanders
2015-01-09 23:29         ` Behan Webster
2015-01-09 23:52         ` David Daney
2015-01-10 12:53           ` Daniel Sanders
2015-01-16 14:37             ` Ralf Baechle
2015-01-16 15:05               ` Måns Rullgård
2015-01-16 15:05                 ` Måns Rullgård
2015-01-17 16:16               ` Daniel Sanders

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=54AFC6F3.1020300@cogentembedded.com \
    --to=sergei.shtylyov@cogentembedded.com \
    --cc=behanw@converseincode.com \
    --cc=daniel.sanders@imgtec.com \
    --cc=james.hogan@imgtec.com \
    --cc=linux-mips@linux-mips.org \
    --cc=markos.chandras@imgtec.com \
    --cc=paul.burton@imgtec.com \
    --cc=ralf@linux-mips.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox