Changeset 65871bb in mainline


Ignore:
Timestamp:
2012-11-24T21:30:24Z (12 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
957ce9a5
Parents:
36e5eb3
Message:

arm32: Don't try to initialize FPU without CONFIG_FPU

Print warning if we try to setup FPU on a machine that has none.

Location:
kernel/arch/arm32/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • kernel/arch/arm32/src/cpu/cpu.c

    r36e5eb3 r65871bb  
    134134        );
    135135#endif
     136#ifdef CONFIG_FPU
    136137        fpu_setup();
     138#endif
    137139}
    138140
  • kernel/arch/arm32/src/fpu_context.c

    r36e5eb3 r65871bb  
    152152                :"=r"(fpsid)::
    153153        );
     154        if (fpsid & FPSID_SW_ONLY_FLAG) {
     155                printf("No FPU avaiable\n");
     156                return;
     157        }
    154158        switch (FPSID_SUBACHITECTURE(fpsid))
    155159        {
     
    210214void fpu_context_save(fpu_context_t *ctx)
    211215{
    212         save_context(ctx);
     216        if (save_context)
     217                save_context(ctx);
    213218}
    214219
    215220void fpu_context_restore(fpu_context_t *ctx)
    216221{
    217         restore_context(ctx);
    218 }
     222        if (restore_context)
     223                restore_context(ctx);
     224}
Note: See TracChangeset for help on using the changeset viewer.