linux-mips
[Top] [All Lists]

Re: [PATCH 1/2] MIPS: Netlogic: define cpu_has_fpu macro

To: Jayachandran C <jchandra@broadcom.com>
Subject: Re: [PATCH 1/2] MIPS: Netlogic: define cpu_has_fpu macro
From: Ralf Baechle <ralf@linux-mips.org>
Date: Tue, 14 Aug 2012 15:38:58 +0200
Cc: linux-mips@linux-mips.org
In-reply-to: <1344950773-29299-2-git-send-email-jchandra@broadcom.com>
List-archive: <http://www.linux-mips.org/archives/linux-mips/>
List-help: <mailto:ecartis@linux-mips.org?Subject=help>
List-id: linux-mips <linux-mips.eddie.linux-mips.org>
List-owner: <mailto:ralf@linux-mips.org>
List-post: <mailto:linux-mips@linux-mips.org>
List-software: Ecartis version 1.0.0
List-subscribe: <mailto:ecartis@linux-mips.org?subject=subscribe%20linux-mips>
List-unsubscribe: <mailto:ecartis@linux-mips.org?subject=unsubscribe%20linux-mips>
References: <1344950773-29299-1-git-send-email-jchandra@broadcom.com> <1344950773-29299-2-git-send-email-jchandra@broadcom.com>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.5.21 (2010-09-15)
On Tue, Aug 14, 2012 at 06:56:12PM +0530, Jayachandran C wrote:

> The default implementation of 'cpu_has_fpu' macro calls
> smp_processor_id() which causes this warning when preemption is enabled:
> 
> [    4.664000] Algorithmics/MIPS FPU Emulator v1.5
> [    4.676000] BUG: using smp_processor_id() in preemptible [00000000] code: 
> init/1
> [    4.700000] caller is fpu_emulator_cop1Handler+0x434/0x27b8
> 
> Work around this by defining cpu_has_fpu for XLR and XLP in
> mach-netlogic/cpu-feature-overrides.h

Where is cpu_has_fpu being invoked from?  For exactly the scenario you're
running into there is raw_cpu_has_fpu and I wonder if the caller should be
switched to that instead.

  Ralf

<Prev in Thread] Current Thread [Next in Thread>