From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24044 invoked by alias); 10 Feb 2013 12:33:29 -0000 Received: (qmail 24036 invoked by uid 22791); 10 Feb 2013 12:33:28 -0000 X-SWARE-Spam-Status: No, hits=-2.7 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from hagrid.ecoscentric.com (HELO mail.ecoscentric.com) (212.13.207.197) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 10 Feb 2013 12:33:21 +0000 Received: from localhost (hagrid.ecoscentric.com [127.0.0.1]) by mail.ecoscentric.com (Postfix) with ESMTP id E84B34680005 for ; Sun, 10 Feb 2013 12:33:19 +0000 (GMT) Received: from mail.ecoscentric.com ([127.0.0.1]) by localhost (hagrid.ecoscentric.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vghaTULc24zQ; Sun, 10 Feb 2013 12:33:18 +0000 (GMT) From: bugzilla-daemon@bugs.ecos.sourceware.org To: ecos-patches@ecos.sourceware.org Subject: [Bug 1001607] Cortex-M4F architectural Floating Point Support Date: Sun, 10 Feb 2013 12:33:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: eCos X-Bugzilla-Component: Patches and contributions X-Bugzilla-Keywords: X-Bugzilla-Severity: enhancement X-Bugzilla-Who: ilijak@siva.com.mk X-Bugzilla-Status: NEEDINFO X-Bugzilla-Priority: low X-Bugzilla-Assigned-To: jifl@ecoscentric.com X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://bugs.ecos.sourceware.org/ Auto-Submitted: auto-generated MIME-Version: 1.0 Mailing-List: contact ecos-patches-help@ecos.sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: ecos-patches-owner@ecos.sourceware.org X-SW-Source: 2013-02/txt/msg00022.txt.bz2 Please do not reply to this email, use the link below. http://bugs.ecos.sourceware.org/show_bug.cgi?id=1001607 --- Comment #53 from Ilija Kocho --- Hi Jifl (In reply to comment #52) > Hi Ilija, > [snip] > (In reply to comment #45) > > - fpinttest.c renamed fpinttestf.c. > > - Added fpinttestf1.c for testing of NONE context switching scheme, as > > it normally fails fpinttestf.c > > In that case fpinttestf.c should use CYG_TEST_NA if it's using the NONE > context scheme - tests should do the right thing whatever the configuration. > > So I suggest adding this to the tests in fpinttestf.c for when to be NA > (including in the CYG_TEST_NA call itself at the bottom): > (!defined(CYGHWR_HAL_CORTEXM_FPU) || !defined(CYGHWR_HAL_CORTEXM_FPU_SWITCH_NONE)) I don't think we need the CYGHWR_HAL_CORTEXM_FPU test. On the other hand fprintestsf.c is included in fpinttestf1.c which overrides FP_THREADS_N. Therefore for the last condition I put: (!defined(CYGHWR_HAL_CORTEXM_FPU_SWITCH_NONE) || (FP_THREADS_N == 1)) FAOD: Since we want to move tests in kernel/tests, we don't have problem with mentioning CORTEXM macros, do we? > > > (In reply to comment #50) > > > > Here is a patch with CYGARC_CORTEXM_FPU_EXC_AUTOSAVE option removed. > > CYGARC_CORTEXM_FPU_EXC_AUTOSAVE still lives as a macro defined in > > fpv4_sp_d16.h. > > Hmm, so I've now started wondering about saving the context in lazy mode as > well. You already set CYGARC_REG_FPU_FPCCR_ASPEN/LSPEN for lazy mode which > means the CPU will already be doing lazy stacking in interrupt/exception > handlers. > > So in fact, can we just change the define at the top of fpv4_sp_d16.h to: > > #if defined CYGHWR_HAL_CORTEXM_FPU_SWITCH_ALL || \ > defined CYGHWR_HAL_CORTEXM_FPU_SWITCH_LAZY > #define CYGARC_CORTEXM_FPU_EXC_AUTOSAVE > #endif > > and then change the CYGHWR_HAL_CORTEXM_FPU_SWITCH_ALL test on line 158 to > also include LAZY, and then it might just work for lazy mode too? I can't > see anything else in the way. Provided that that LAZY uses FPU enabled/disbled state in order to distinguish between _FP_ and _INT_ threads, suppose that _INT_ thread is interrupted by _FP_ ISR. Then Usage Fault VSR will enable FPU and FPU will remain enabled after ISR returns [in thread context], effectively converting the tread to _FP_. Gradually, this ISR "_FP_ missioner" ISR may convert all threads to _FP_ so we're not lazy any more. There are also other problems, related to variable ISR stack frame length, that are described in that comment #42 and/or comment #47. [snip] > > BTW don't forget at some point to either tidy up the indentations in the > CDL, or let me know and I will do so after check-in - you've done enough > after all! I take it that we are a step or less to check in :) I am trying to keep the code tidy as we apporach end of the pipeline, but sometimes my editor tries to play smart and doesn't agree with me. I'll check it before check-in, but if you are not happy you are welcome to edit. Speaking of CDL cross check, I would ask you is to make language and clarity check on larger descrioptions, especially CYGHWR_HAL_CORTEXM_FPU_SWITCH. Thanks for the comments. Ilija -- You are receiving this mail because: You are on the CC list for the bug.