Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: Huacai Chen <chenhc@lemote.com>, Ralf Baechle <ralf@linux-mips.org>
Cc: John Crispin <john@phrozen.org>,
	"Steven J. Hill" <Steven.Hill@imgtec.com>,
	Aurelien Jarno <aurelien@aurel32.net>,
	linux-mips@linux-mips.org, Fuxin Zhang <zhangfx@lemote.com>,
	Zhangjin Wu <wuzhangjin@gmail.com>
Subject: Re: [PATCH 2/2] MIPS: Loongson: Fix COP2 usage for preemptible kernel
Date: Fri, 08 Aug 2014 16:12:16 +0400	[thread overview]
Message-ID: <53E4BEA0.1070501@cogentembedded.com> (raw)
In-Reply-To: <1407467768-24097-2-git-send-email-chenhc@lemote.com>

Hello.

On 8/8/2014 7:16 AM, Huacai Chen wrote:

> In preemptible kernel, only TIF_USEDFPU flag is reliable to distinguish
> whether _init_fpu()/_restore_fp() is needed. Because the value of the
> CP0_Status.CU1 isn't changed during preemption.

> Signed-off-by: Huacai Chen <chenhc@lemote.com>
> ---
>   arch/mips/loongson/loongson-3/cop2-ex.c |    8 ++++----
>   1 files changed, 4 insertions(+), 4 deletions(-)

> diff --git a/arch/mips/loongson/loongson-3/cop2-ex.c b/arch/mips/loongson/loongson-3/cop2-ex.c
> index 9182e8d..c1e9503 100644
> --- a/arch/mips/loongson/loongson-3/cop2-ex.c
> +++ b/arch/mips/loongson/loongson-3/cop2-ex.c
[...]
> @@ -39,8 +39,8 @@ static int loongson_cu2_call(struct notifier_block *nfb, unsigned long action,
>   			KSTK_STATUS(current) |= ST0_FR;
>   		else
>   			KSTK_STATUS(current) &= ~ST0_FR;
> -		/* If FPU is enabled, we needn't init or restore fp */
> -		if(!fpu_enabled) {
> +		/* If FPU is owned, we needn't init or restore fp */
> +		if(!fpu_owned) {

    Space is needed after *if*, high time to fix this.

WBR, Sergei

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

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-08  3:16 [PATCH 1/2] MIPS: Move CPU topology macros to topology.h Huacai Chen
2014-08-08  3:16 ` [PATCH 2/2] MIPS: Loongson: Fix COP2 usage for preemptible kernel Huacai Chen
2014-08-08 12:12   ` Sergei Shtylyov [this message]
2014-08-08 13:47 ` [PATCH 1/2] MIPS: Move CPU topology macros to topology.h Ralf Baechle
2014-08-13  0:18   ` Jayachandran C.
2014-08-13  0:18     ` Jayachandran C.
2014-08-20  3:57     ` Huacai Chen
2014-08-22  4:18       ` [PATCH 1/2] MIPS: Netlogic: Use MIPS topology.h Jayachandran C
2014-08-22  4:18         ` Jayachandran C
2014-08-22  4:18         ` [PATCH 2/2] MIPS: Move topology macros to topology.h Jayachandran C
2014-08-22  4:18           ` Jayachandran C
2014-08-25 13:20         ` [PATCH 1/2] MIPS: Netlogic: Use MIPS topology.h Ralf Baechle

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=53E4BEA0.1070501@cogentembedded.com \
    --to=sergei.shtylyov@cogentembedded.com \
    --cc=Steven.Hill@imgtec.com \
    --cc=aurelien@aurel32.net \
    --cc=chenhc@lemote.com \
    --cc=john@phrozen.org \
    --cc=linux-mips@linux-mips.org \
    --cc=ralf@linux-mips.org \
    --cc=wuzhangjin@gmail.com \
    --cc=zhangfx@lemote.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