MIPS: Stub asm/fpu.h functions
authorPaul Burton <paul.burton@mips.com>
Wed, 7 Nov 2018 23:14:04 +0000 (23:14 +0000)
committerPaul Burton <paul.burton@mips.com>
Fri, 9 Nov 2018 18:23:15 +0000 (10:23 -0800)
commit9ec55930e023a18dfc7cca60afdd8c9f9da54f3e
tree2f1bc66662c255717132ced7f9e288fc328f01ed
parentb372e83b67eb296d85654e2dde8a0e6105083b16
MIPS: Stub asm/fpu.h functions

Provide stub versions of functions in asm/fpu.h when
CONFIG_MIPS_FP_SUPPORT=n. Two approaches are taken to the functions
provided:

  - Functions which can safely be called when FP is not enabled provide
    stubs which return an error where appropriate or are simple no-ops.

  - Functions which should only ever be called in cases where
    cpu_has_fpu is true or the FPU was successfully enabled are declared
    extern & annotated with __compiletime_error() to detect cases in
    which they are called incorrectly.

Signed-off-by: Paul Burton <paul.burton@mips.com>
Patchwork: https://patchwork.linux-mips.org/patch/21006/
Cc: linux-mips@linux-mips.org
arch/mips/include/asm/fpu.h