Re: [PATCH 2/2] MIPS: Loongson: Fix COP2 usage for preemptible kernel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
  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



[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux