[PATCH] score/or1k/cpu.c: discard linker-symbols.h include and extern the related variable

Sebastian Huber sebastian.huber at embedded-brains.de
Wed Feb 11 08:22:05 UTC 2015


On 10/02/15 23:12, Joel Sherrill wrote:
> On 2/10/2015 3:46 PM, Peter Dufault wrote:
>>> >>On Feb 10, 2015, at 15:30 , Joel Sherrill<Joel.Sherrill at oarcorp.com>  wrote:
>>> >>
>>> >>On 2/10/2015 2:26 PM, Hesham Moustafa wrote:
>>>> >>>On Tue, Feb 10, 2015 at 8:21 PM, Joel Sherrill
>>>> >>><joel.sherrill at oarcorp.com>  wrote:
>>>>> >>>>Thanks. One down.
>>>>> >>>>
>>>>> >>>>Crap. It should have had a comment that closed the PR.:(
>>>> >>>Who should add the comment? The ticket is now closed (fixed). In the
>>>> >>>future patches, should I tag the ticket/PR number part of the commit
>>>> >>>message?
>>> >>I think the procedure is to use the git commit message like this:
>>> >>
>>> >>=======================
>>> >>or1k/cpu.c: Eliminate dependency on BSP provided .h file
>>> >>
>>> >>close XXXX
>>> >>=======================
>>> >>
>>> >>You just posted a patch and I did remember to add the --author
>>> >>info but forgot the PR.
>>>>> >>>>On 2/10/2015 2:04 PM, Hesham ALMatary wrote:
>>>>>> >>>>>---
>>>>>> >>>>>cpukit/score/cpu/or1k/cpu.c | 7 ++++++-
>>>>>> >>>>>1 file changed, 6 insertions(+), 1 deletion(-)
>>>>>> >>>>>
>>>>>> >>>>>diff --git a/cpukit/score/cpu/or1k/cpu.c b/cpukit/score/cpu/or1k/cpu.c
>>>>>> >>>>>index 9d1ae49..69845ff 100644
>>>>>> >>>>>--- a/cpukit/score/cpu/or1k/cpu.c
>>>>>> >>>>>+++ b/cpukit/score/cpu/or1k/cpu.c
>>>>>> >>>>>@@ -14,9 +14,14 @@
>>>>>> >>>>>#include <rtems/system.h>
>>>>>> >>>>>#include <rtems/score/isr.h>
>>>>>> >>>>>#include <rtems/score/wkspace.h>
>>>>>> >>>>>-#include <bsp/linker-symbols.h>
>>>>>> >>>>>#include <rtems/score/cpu.h>
>>>>>> >>>>>
>>>>>> >>>>>+/* bsp_start_vector_table_begin is the start address of the vector table
>>>>>> >>>>>+ * containing addresses to ISR Handlers. It's defined at the BSP linkcmds
>>>>>> >>>>>+ * and may differ from one BSP to another.
>>>>>> >>>>>+ */
>>>>>> >>>>>+extern char bsp_start_vector_table_begin[];
>>>>>> >>>>>+
>>>>>> >>>>>/**
>>>>>> >>>>>  * @brief Performs processor dependent initialization.
>>>>>> >>>>>  */
>>>>>> >>>>>-- 2.1.0
>>>>> >>>>--
>>>>> >>>>Joel Sherrill, Ph.D.             Director of Research & Development
>>>>> >>>>joel.sherrill at OARcorp.com         On-Line Applications Research
>>>>> >>>>Ask me about RTEMS: a free RTOS  Huntsville AL 35805
>>>>> >>>>Support Available                (256) 722-9985
>>>>> >>>>
>> >I'm not sure what it fixes, but removing a header file and putting an "extern" declaration in a C file instead needs to be explained in a comment.  In general that's moving backwards, I guess the comment implies something (that it may differ from one BSP to another), but since an extern in C code is bad practice it should be better explained.
> The overarching rule is that code in cpukit/ SHALL not include anything
> from the BSP.
>
> It possibly could be moved to cpu.h or a port provided file that defines
> the symbols expected to be provided by the BSP.
>
> I am happy with anything that moves us in a better direction. This was
> breaking the dependency.
>

In case the cpukit depends on this, then this symbol should go into 
cpu.h with a _OR1K_ prefix.

-- 
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.huber at embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.




More information about the devel mailing list