[PATCH 6/6] libdl/rtl-obj.c: synchronize cache after code relocation.

Pavel Pisa pisa at cmp.felk.cvut.cz
Wed Jul 20 08:50:00 UTC 2016


Hello Gedare,

On Tuesday 19 of July 2016 17:27:36 Gedare Bloom wrote:
> On Sun, Jul 17, 2016 at 6:48 PM,  <pisa at cmp.felk.cvut.cz> wrote:
> > From: Pavel Pisa <pisa at cmp.felk.cvut.cz>
> > diff --git a/cpukit/libdl/rtl-obj.h b/cpukit/libdl/rtl-obj.h
> > index 1202fd5..b1cb1d5 100644
> > --- a/cpukit/libdl/rtl-obj.h
> > +++ b/cpukit/libdl/rtl-obj.h
> > @@ -494,6 +494,15 @@ bool rtems_rtl_obj_relocate (rtems_rtl_obj_t*       
> >      obj, void*                        data);
> >
> >  /**
> > + * Synchronize caches to make code visible to CPU(s)
> > + *
> > + * @param obj The object file's descriptor.
> > + * @retval true Cache synchronization succeed.
> > + * @retval false Cache synchronization failed.
> > + */
>
> There does not actually appear to be any failure path?

There is no failure path and for actual cache operations
could be only to notify that it is not implemented right
way (or at all) or there is attempt to synchronize
some region which is prohibited (by nature or OS protection).
But this usually results in an exception.

Other possible source could be failure of list iteration
or some checks of RTL structures.

I have followed API/prototype of other RTL functions
but I agree that declaring cache operations as unconditionally
succeeding is reasonable approach.

rtems_cache_get_instruction_line_size()

Updated patch follows,

                         Pavel




More information about the devel mailing list