• Alan Kao's avatar
    Auto-detect whether a FPU exists · 9411ec60
    Alan Kao authored
    We expect that a kernel with CONFIG_FPU=y can still support no-FPU
    machines. To do so, the kernel should first examine the existence of a
    FPU, then do nothing if a FPU does exist; otherwise, it should
    disable/bypass all FPU-related functions.
    
    In this patch, a new global variable, has_fpu, is created and determined
    when parsing the hardware capability from device tree during booting.
    This variable is used in those FPU-related functions.
    Signed-off-by: default avatarAlan Kao <alankao@andestech.com>
    Cc: Greentime Hu <greentime@andestech.com>
    Cc: Vincent Chen <vincentc@andestech.com>
    Cc: Zong Li <zong@andestech.com>
    Cc: Nick Hu <nickhu@andestech.com>
    Signed-off-by: default avatarPalmer Dabbelt <palmer@sifive.com>
    9411ec60
process.c 4.07 KB