Re: [Xen-devel] [PATCH v10 2/6] xen: introduce DEFINE_SYMBOL

2019-02-28 Thread Jan Beulich
>>> On 28.02.19 at 01:05, wrote: > On Wed, 27 Feb 2019, Jan Beulich wrote: >> >>> On 26.02.19 at 19:43, wrote: >> > On Tue, 26 Feb 2019, Ian Jackson wrote: >> >> Jan Beulich writes ("Re: [PATCH v10 2/6] xen: introduce DEFINE_SYMBOL"): >> >> > On 26.02.19 at 17:46, wrote: >> >> > > I am not aware

Re: [Xen-devel] [PATCH v10 2/6] xen: introduce DEFINE_SYMBOL

2019-02-27 Thread Stefano Stabellini
On Wed, 27 Feb 2019, Jan Beulich wrote: > >>> On 26.02.19 at 19:43, wrote: > > On Tue, 26 Feb 2019, Ian Jackson wrote: > >> Jan Beulich writes ("Re: [PATCH v10 2/6] xen: introduce DEFINE_SYMBOL"): > >> > On 26.02.19 at 17:46, wrote: > >> > > I am not aware of a standard C type which could be used

Re: [Xen-devel] [PATCH v10 2/6] xen: introduce DEFINE_SYMBOL

2019-02-27 Thread Jan Beulich
>>> On 26.02.19 at 19:43, wrote: > On Tue, 26 Feb 2019, Ian Jackson wrote: >> Jan Beulich writes ("Re: [PATCH v10 2/6] xen: introduce DEFINE_SYMBOL"): >> > On 26.02.19 at 17:46, wrote: >> > > I am not aware of a standard C type which could be used instead of >> > > this struct. But I think you c

Re: [Xen-devel] [PATCH v10 2/6] xen: introduce DEFINE_SYMBOL

2019-02-27 Thread Jan Beulich
>>> On 26.02.19 at 19:54, wrote: > On Tue, 26 Feb 2019, Jan Beulich wrote: >> >>> On 25.02.19 at 21:50, wrote: >> > --- a/xen/include/xen/compiler.h >> > +++ b/xen/include/xen/compiler.h >> > @@ -99,6 +99,38 @@ >> > __asm__ ("" : "=r"(__ptr) : "0"(ptr)); \ >> > (typeof(ptr)) (__ptr

Re: [Xen-devel] [PATCH v10 2/6] xen: introduce DEFINE_SYMBOL

2019-02-27 Thread Jan Beulich
>>> On 26.02.19 at 18:32, wrote: > Jan Beulich writes ("Re: [PATCH v10 2/6] xen: introduce DEFINE_SYMBOL"): >> On 26.02.19 at 17:46, wrote: >> > I am not aware of a standard C type which could be used instead of >> > this struct. But I think you can use the `packed' attribute to get >> > the rig

Re: [Xen-devel] [PATCH v10 2/6] xen: introduce DEFINE_SYMBOL

2019-02-26 Thread Stefano Stabellini
On Tue, 26 Feb 2019, Jan Beulich wrote: > >>> On 25.02.19 at 21:50, wrote: > > --- a/xen/include/xen/compiler.h > > +++ b/xen/include/xen/compiler.h > > @@ -99,6 +99,38 @@ > > __asm__ ("" : "=r"(__ptr) : "0"(ptr)); \ > > (typeof(ptr)) (__ptr + (off)); }) > > > > + > > +/* > > + *

Re: [Xen-devel] [PATCH v10 2/6] xen: introduce DEFINE_SYMBOL

2019-02-26 Thread Stefano Stabellini
On Tue, 26 Feb 2019, Ian Jackson wrote: > Jan Beulich writes ("Re: [PATCH v10 2/6] xen: introduce DEFINE_SYMBOL"): > > On 26.02.19 at 17:46, wrote: > > > I am not aware of a standard C type which could be used instead of > > > this struct. But I think you can use the `packed' attribute to get > >

Re: [Xen-devel] [PATCH v10 2/6] xen: introduce DEFINE_SYMBOL

2019-02-26 Thread Ian Jackson
Jan Beulich writes ("Re: [PATCH v10 2/6] xen: introduce DEFINE_SYMBOL"): > On 26.02.19 at 17:46, wrote: > > I am not aware of a standard C type which could be used instead of > > this struct. But I think you can use the `packed' attribute to get > > the right behaviour. The GCC manual says: > >

Re: [Xen-devel] [PATCH v10 2/6] xen: introduce DEFINE_SYMBOL

2019-02-26 Thread Jan Beulich
>>> On 26.02.19 at 17:46, wrote: > Stefano Stabellini writes ("[PATCH v10 2/6] xen: introduce DEFINE_SYMBOL"): >> +/* >> + * Declare start and end array variables in C corresponding to existing >> + * linker symbols. >> + * >> + * Two static inline functions are declared to do comparisons and >> +

Re: [Xen-devel] [PATCH v10 2/6] xen: introduce DEFINE_SYMBOL

2019-02-26 Thread Ian Jackson
Stefano Stabellini writes ("[PATCH v10 2/6] xen: introduce DEFINE_SYMBOL"): > Introduce a MACRO to be used to declare array variables corresponding to > linker symbols, plus two static inline functions to be used for > comparing and subtracting pointers with the linker symbols. > > Note that the s

Re: [Xen-devel] [PATCH v10 2/6] xen: introduce DEFINE_SYMBOL

2019-02-26 Thread Jan Beulich
>>> On 25.02.19 at 21:50, wrote: > --- a/xen/include/xen/compiler.h > +++ b/xen/include/xen/compiler.h > @@ -99,6 +99,38 @@ > __asm__ ("" : "=r"(__ptr) : "0"(ptr)); \ > (typeof(ptr)) (__ptr + (off)); }) > > + > +/* > + * Declare start and end array variables in C corresponding to

[Xen-devel] [PATCH v10 2/6] xen: introduce DEFINE_SYMBOL

2019-02-25 Thread Stefano Stabellini
Introduce a MACRO to be used to declare array variables corresponding to linker symbols, plus two static inline functions to be used for comparing and subtracting pointers with the linker symbols. Note that the start and end symbols are declared of different types to help avoid errors and misusing