Re: [RFC] MIPS: Prevent "BUG: using smp_processor_id() in preemptible..." errors

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

 



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





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

  Powered by Linux