All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markos Chandras <Markos.Chandras@imgtec.com>
To: <linux-mips@linux-mips.org>
Cc: "Maciej W. Rozycki" <macro@linux-mips.org>
Subject: Re: [RFC] MIPS: Prevent "BUG: using smp_processor_id() in preemptible..." errors
Date: Thu, 23 Apr 2015 08:59:03 +0100	[thread overview]
Message-ID: <5538A647.10009@imgtec.com> (raw)
In-Reply-To: <20150422172359.GA20553@paulmartin.codethink.co.uk>

Hi,

On 04/22/2015 06:24 PM, Paul Martin wrote:
> Commit 9b26616c8d9dae53fbac7f7cb2c6dd1308102976 "MIPS: Respect the ISA
> level in FCSR handling" added references to current_cpu_data, which is
> a macro expanding to cpu_data[smp_processor_id()].  Change these to
> raw_current_cpu_data.
> 
> These changes may or may not be a good idea.
> 
> There may also be a need for a similar change in
> arch/mips/kernel/ptrace.c which I haven't made.
> 

(^^^ missed your SOB line here? But since this RFC that might have been
intentional)

> ---
>  arch/mips/include/asm/elf.h | 4 ++--
>  arch/mips/math-emu/cp1emu.c | 2 +-
>  2 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/mips/include/asm/elf.h b/arch/mips/include/asm/elf.h
> index a594d8e..63f3bbc 100644
> --- a/arch/mips/include/asm/elf.h
> +++ b/arch/mips/include/asm/elf.h
> @@ -304,7 +304,7 @@ do {									\
>  									\
>  	current->thread.abi = &mips_abi;				\
>  									\
> -	current->thread.fpu.fcr31 = current_cpu_data.fpu_csr31;		\
> +	current->thread.fpu.fcr31 = raw_current_cpu_data.fpu_csr31;	\

The change looks sensible. I am wondering if
boot_cpu_data(==cpu_data[0]) is a better option though.

I leave that to Maciej.

-- 
markos

WARNING: multiple messages have this Message-ID (diff)
From: Markos Chandras <Markos.Chandras@imgtec.com>
To: linux-mips@linux-mips.org
Cc: "Maciej W. Rozycki" <macro@linux-mips.org>
Subject: Re: [RFC] MIPS: Prevent "BUG: using smp_processor_id() in preemptible..." errors
Date: Thu, 23 Apr 2015 08:59:03 +0100	[thread overview]
Message-ID: <5538A647.10009@imgtec.com> (raw)
Message-ID: <20150423075903.BZvlKO0JvHWt--6DXGZExxDpaNZ43CDDr0hgenQOHm8@z> (raw)
In-Reply-To: <20150422172359.GA20553@paulmartin.codethink.co.uk>

Hi,

On 04/22/2015 06:24 PM, Paul Martin wrote:
> Commit 9b26616c8d9dae53fbac7f7cb2c6dd1308102976 "MIPS: Respect the ISA
> level in FCSR handling" added references to current_cpu_data, which is
> a macro expanding to cpu_data[smp_processor_id()].  Change these to
> raw_current_cpu_data.
> 
> These changes may or may not be a good idea.
> 
> There may also be a need for a similar change in
> arch/mips/kernel/ptrace.c which I haven't made.
> 

(^^^ missed your SOB line here? But since this RFC that might have been
intentional)

> ---
>  arch/mips/include/asm/elf.h | 4 ++--
>  arch/mips/math-emu/cp1emu.c | 2 +-
>  2 files changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/mips/include/asm/elf.h b/arch/mips/include/asm/elf.h
> index a594d8e..63f3bbc 100644
> --- a/arch/mips/include/asm/elf.h
> +++ b/arch/mips/include/asm/elf.h
> @@ -304,7 +304,7 @@ do {									\
>  									\
>  	current->thread.abi = &mips_abi;				\
>  									\
> -	current->thread.fpu.fcr31 = current_cpu_data.fpu_csr31;		\
> +	current->thread.fpu.fcr31 = raw_current_cpu_data.fpu_csr31;	\

The change looks sensible. I am wondering if
boot_cpu_data(==cpu_data[0]) is a better option though.

I leave that to Maciej.

-- 
markos

  reply	other threads:[~2015-04-23  7:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-22 17:24 [RFC] MIPS: Prevent "BUG: using smp_processor_id() in preemptible..." errors Paul Martin
2015-04-23  7:59 ` Markos Chandras [this message]
2015-04-23  7:59   ` Markos Chandras
2015-04-23 21:21   ` Maciej W. Rozycki

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=5538A647.10009@imgtec.com \
    --to=markos.chandras@imgtec.com \
    --cc=linux-mips@linux-mips.org \
    --cc=macro@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 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.