From 926e296d48784f7759cf18c75a1e5368c3eea386 Mon Sep 17 00:00:00 2001 From: Xiang Xiao Date: Wed, 25 Jan 2023 01:07:12 +0800 Subject: [PATCH] boards/jupiter-nano: Remove sam_ostest.c since fpu special handling is done in arch common code now Signed-off-by: Xiang Xiao --- boards/arm/sama5/jupiter-nano/src/Makefile | 4 - .../arm/sama5/jupiter-nano/src/sam_ostest.c | 98 ------------------- 2 files changed, 102 deletions(-) delete mode 100644 boards/arm/sama5/jupiter-nano/src/sam_ostest.c diff --git a/boards/arm/sama5/jupiter-nano/src/Makefile b/boards/arm/sama5/jupiter-nano/src/Makefile index 5fd5f0ec2f..48cbb39e94 100644 --- a/boards/arm/sama5/jupiter-nano/src/Makefile +++ b/boards/arm/sama5/jupiter-nano/src/Makefile @@ -110,10 +110,6 @@ ifeq ($(CONFIG_USBMSC),y) CSRCS += sam_usbmsc.c endif -ifeq ($(CONFIG_ARCH_FPU),y) -CSRCS += sam_ostest.c -endif - ifeq ($(CONFIG_ARCH_LEDS),y) CSRCS += sam_autoleds.c else diff --git a/boards/arm/sama5/jupiter-nano/src/sam_ostest.c b/boards/arm/sama5/jupiter-nano/src/sam_ostest.c deleted file mode 100644 index 2c60f808f6..0000000000 --- a/boards/arm/sama5/jupiter-nano/src/sam_ostest.c +++ /dev/null @@ -1,98 +0,0 @@ -/**************************************************************************** - * boards/arm/sama5/jupiter-nano/src/sam_ostest.c - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. The - * ASF licenses this file to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance with the - * License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - * - ****************************************************************************/ - -/**************************************************************************** - * Included Files - ****************************************************************************/ - -#include - -#include -#include -#include -#include - -#include -#include - -#include "arm_internal.h" -#include "jupiter-nano.h" - -/**************************************************************************** - * Pre-processor Definitions - ****************************************************************************/ - -/* Configuration ************************************************************/ - -#undef HAVE_FPU -#if defined(CONFIG_ARCH_FPU) && !defined(CONFIG_TESTING_OSTEST_FPUTESTDISABLE) && \ - defined(CONFIG_TESTING_OSTEST_FPUSIZE) && defined(CONFIG_SCHED_WAITPID) -# define HAVE_FPU 1 -#endif - -#ifdef HAVE_FPU - -#if CONFIG_TESTING_OSTEST_FPUSIZE != (4*FPU_CONTEXT_REGS) -# error "CONFIG_TESTING_OSTEST_FPUSIZE has the wrong size" -#endif - -/**************************************************************************** - * Private Data - ****************************************************************************/ - -static uint32_t g_saveregs[XCPTCONTEXT_REGS]; - -/**************************************************************************** - * Private Functions - ****************************************************************************/ - -/**************************************************************************** - * Public Functions - ****************************************************************************/ - -/* Given an array of size CONFIG_TESTING_OSTEST_FPUSIZE, this function will - * return the current FPU registers. - */ - -void arch_getfpu(uint32_t *fpusave) -{ - irqstate_t flags; - - /* Take a snapshot of the thread context right now */ - - flags = enter_critical_section(); - arm_saveusercontext(g_saveregs); - - /* Return only the floating register values */ - - memcpy(fpusave, &g_saveregs[REG_S0], (4*FPU_CONTEXT_REGS)); - leave_critical_section(flags); -} - -/* Given two arrays of size CONFIG_TESTING_OSTEST_FPUSIZE this function - * will compare them and return true if they are identical. - */ - -bool arch_cmpfpu(const uint32_t *fpusave1, const uint32_t *fpusave2) -{ - return memcmp(fpusave1, fpusave2, (4*FPU_CONTEXT_REGS)) == 0; -} - -#endif /* HAVE_FPU */