* [PATCH] minios: fix build issue with xen_*mb defines
@ 2016-09-28 9:50 Juergen Gross
2016-09-28 10:01 ` Wei Liu
2016-09-28 11:07 ` Samuel Thibault
0 siblings, 2 replies; 7+ messages in thread
From: Juergen Gross @ 2016-09-28 9:50 UTC (permalink / raw)
To: minios-devel, xen-devel; +Cc: Juergen Gross, samuel.thibault, wei.liu2
Commit e35295d724d64e6e025ec31c2e510e448b8641d1 ("mini-os: fix builds
with uncommon config settings") introduced a bug which will break
the build, as xc_minios.c will have defined those macros via
xc_private.h.
Fix this by defining the macros only if compiling a minios source.
Signed-off-by: Juergen Gross <jgross@suse.com>
---
include/x86/os.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/x86/os.h b/include/x86/os.h
index 0f5dd6c..fbc2eeb 100644
--- a/include/x86/os.h
+++ b/include/x86/os.h
@@ -511,14 +511,14 @@ static __inline__ unsigned long __ffs(unsigned long word)
#error "Unsupported architecture"
#endif
-#endif /* ifdef __INSIDE_MINIOS */
-
/********************* common i386 and x86_64 ****************************/
#define xen_mb() mb()
#define xen_rmb() rmb()
#define xen_wmb() wmb()
#define xen_barrier() asm volatile ( "" : : : "memory")
+#endif /* ifdef __INSIDE_MINIOS */
+
#define wrmsr(msr,val1,val2) \
__asm__ __volatile__("wrmsr" \
: /* no outputs */ \
--
2.6.6
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply related [flat|nested] 7+ messages in thread* Re: [PATCH] minios: fix build issue with xen_*mb defines
2016-09-28 9:50 [PATCH] minios: fix build issue with xen_*mb defines Juergen Gross
@ 2016-09-28 10:01 ` Wei Liu
2016-09-28 10:06 ` Juergen Gross
2016-09-28 11:07 ` Samuel Thibault
1 sibling, 1 reply; 7+ messages in thread
From: Wei Liu @ 2016-09-28 10:01 UTC (permalink / raw)
To: Juergen Gross; +Cc: minios-devel, xen-devel, wei.liu2, samuel.thibault
On Wed, Sep 28, 2016 at 11:50:04AM +0200, Juergen Gross wrote:
> Commit e35295d724d64e6e025ec31c2e510e448b8641d1 ("mini-os: fix builds
> with uncommon config settings") introduced a bug which will break
> the build, as xc_minios.c will have defined those macros via
> xc_private.h.
>
> Fix this by defining the macros only if compiling a minios source.
>
Reported-by: Wei Liu <wei.liu2@citrix.com>
> Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
> ---
> include/x86/os.h | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/include/x86/os.h b/include/x86/os.h
> index 0f5dd6c..fbc2eeb 100644
> --- a/include/x86/os.h
> +++ b/include/x86/os.h
> @@ -511,14 +511,14 @@ static __inline__ unsigned long __ffs(unsigned long word)
> #error "Unsupported architecture"
> #endif
>
> -#endif /* ifdef __INSIDE_MINIOS */
> -
> /********************* common i386 and x86_64 ****************************/
One nit, might want to retain the position of this comment.
> #define xen_mb() mb()
> #define xen_rmb() rmb()
> #define xen_wmb() wmb()
> #define xen_barrier() asm volatile ( "" : : : "memory")
>
> +#endif /* ifdef __INSIDE_MINIOS */
> +
> #define wrmsr(msr,val1,val2) \
> __asm__ __volatile__("wrmsr" \
> : /* no outputs */ \
> --
> 2.6.6
>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH] minios: fix build issue with xen_*mb defines
2016-09-28 10:01 ` Wei Liu
@ 2016-09-28 10:06 ` Juergen Gross
2016-09-28 10:10 ` Wei Liu
0 siblings, 1 reply; 7+ messages in thread
From: Juergen Gross @ 2016-09-28 10:06 UTC (permalink / raw)
To: Wei Liu; +Cc: minios-devel, xen-devel, samuel.thibault
On 28/09/16 12:01, Wei Liu wrote:
> On Wed, Sep 28, 2016 at 11:50:04AM +0200, Juergen Gross wrote:
>> Commit e35295d724d64e6e025ec31c2e510e448b8641d1 ("mini-os: fix builds
>> with uncommon config settings") introduced a bug which will break
>> the build, as xc_minios.c will have defined those macros via
>> xc_private.h.
>>
>> Fix this by defining the macros only if compiling a minios source.
>>
>
> Reported-by: Wei Liu <wei.liu2@citrix.com>
>
>> Signed-off-by: Juergen Gross <jgross@suse.com>
>
> Reviewed-by: Wei Liu <wei.liu2@citrix.com>
>
>> ---
>> include/x86/os.h | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/include/x86/os.h b/include/x86/os.h
>> index 0f5dd6c..fbc2eeb 100644
>> --- a/include/x86/os.h
>> +++ b/include/x86/os.h
>> @@ -511,14 +511,14 @@ static __inline__ unsigned long __ffs(unsigned long word)
>> #error "Unsupported architecture"
>> #endif
>>
>> -#endif /* ifdef __INSIDE_MINIOS */
>> -
>> /********************* common i386 and x86_64 ****************************/
>
> One nit, might want to retain the position of this comment.
Didn't I?
Or do you mean it should be outside the ifdef? So keeping the #endif
above and adding another #ifdef __INSIDE_MINIOS after the comment?
>
>> #define xen_mb() mb()
>> #define xen_rmb() rmb()
>> #define xen_wmb() wmb()
>> #define xen_barrier() asm volatile ( "" : : : "memory")
>>
>> +#endif /* ifdef __INSIDE_MINIOS */
>> +
>> #define wrmsr(msr,val1,val2) \
>> __asm__ __volatile__("wrmsr" \
>> : /* no outputs */ \
>> --
>> 2.6.6
>>
>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH] minios: fix build issue with xen_*mb defines
2016-09-28 10:06 ` Juergen Gross
@ 2016-09-28 10:10 ` Wei Liu
2016-09-28 10:14 ` [Minios-devel] " Juergen Gross
0 siblings, 1 reply; 7+ messages in thread
From: Wei Liu @ 2016-09-28 10:10 UTC (permalink / raw)
To: Juergen Gross; +Cc: minios-devel, xen-devel, Wei Liu, samuel.thibault
On Wed, Sep 28, 2016 at 12:06:02PM +0200, Juergen Gross wrote:
> On 28/09/16 12:01, Wei Liu wrote:
> > On Wed, Sep 28, 2016 at 11:50:04AM +0200, Juergen Gross wrote:
> >> Commit e35295d724d64e6e025ec31c2e510e448b8641d1 ("mini-os: fix builds
> >> with uncommon config settings") introduced a bug which will break
> >> the build, as xc_minios.c will have defined those macros via
> >> xc_private.h.
> >>
> >> Fix this by defining the macros only if compiling a minios source.
> >>
> >
> > Reported-by: Wei Liu <wei.liu2@citrix.com>
> >
> >> Signed-off-by: Juergen Gross <jgross@suse.com>
> >
> > Reviewed-by: Wei Liu <wei.liu2@citrix.com>
> >
> >> ---
> >> include/x86/os.h | 4 ++--
> >> 1 file changed, 2 insertions(+), 2 deletions(-)
> >>
> >> diff --git a/include/x86/os.h b/include/x86/os.h
> >> index 0f5dd6c..fbc2eeb 100644
> >> --- a/include/x86/os.h
> >> +++ b/include/x86/os.h
> >> @@ -511,14 +511,14 @@ static __inline__ unsigned long __ffs(unsigned long word)
> >> #error "Unsupported architecture"
> >> #endif
> >>
> >> -#endif /* ifdef __INSIDE_MINIOS */
> >> -
> >> /********************* common i386 and x86_64 ****************************/
> >
> > One nit, might want to retain the position of this comment.
>
> Didn't I?
>
> Or do you mean it should be outside the ifdef? So keeping the #endif
> above and adding another #ifdef __INSIDE_MINIOS after the comment?
>
What I meant is to have the comment before wrmsr as before. But I think
it is also a valid comment in its position now. I don't want to bikeshed
too much on this.
Wei.
> >
> >> #define xen_mb() mb()
> >> #define xen_rmb() rmb()
> >> #define xen_wmb() wmb()
> >> #define xen_barrier() asm volatile ( "" : : : "memory")
> >>
> >> +#endif /* ifdef __INSIDE_MINIOS */
> >> +
> >> #define wrmsr(msr,val1,val2) \
> >> __asm__ __volatile__("wrmsr" \
> >> : /* no outputs */ \
> >> --
> >> 2.6.6
> >>
> >
>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [Minios-devel] [PATCH] minios: fix build issue with xen_*mb defines
2016-09-28 10:10 ` Wei Liu
@ 2016-09-28 10:14 ` Juergen Gross
0 siblings, 0 replies; 7+ messages in thread
From: Juergen Gross @ 2016-09-28 10:14 UTC (permalink / raw)
To: Wei Liu; +Cc: minios-devel, xen-devel, samuel.thibault
On 28/09/16 12:10, Wei Liu wrote:
> On Wed, Sep 28, 2016 at 12:06:02PM +0200, Juergen Gross wrote:
>> On 28/09/16 12:01, Wei Liu wrote:
>>> On Wed, Sep 28, 2016 at 11:50:04AM +0200, Juergen Gross wrote:
>>>> Commit e35295d724d64e6e025ec31c2e510e448b8641d1 ("mini-os: fix builds
>>>> with uncommon config settings") introduced a bug which will break
>>>> the build, as xc_minios.c will have defined those macros via
>>>> xc_private.h.
>>>>
>>>> Fix this by defining the macros only if compiling a minios source.
>>>>
>>>
>>> Reported-by: Wei Liu <wei.liu2@citrix.com>
>>>
>>>> Signed-off-by: Juergen Gross <jgross@suse.com>
>>>
>>> Reviewed-by: Wei Liu <wei.liu2@citrix.com>
>>>
>>>> ---
>>>> include/x86/os.h | 4 ++--
>>>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>>>
>>>> diff --git a/include/x86/os.h b/include/x86/os.h
>>>> index 0f5dd6c..fbc2eeb 100644
>>>> --- a/include/x86/os.h
>>>> +++ b/include/x86/os.h
>>>> @@ -511,14 +511,14 @@ static __inline__ unsigned long __ffs(unsigned long word)
>>>> #error "Unsupported architecture"
>>>> #endif
>>>>
>>>> -#endif /* ifdef __INSIDE_MINIOS */
>>>> -
>>>> /********************* common i386 and x86_64 ****************************/
>>>
>>> One nit, might want to retain the position of this comment.
>>
>> Didn't I?
>>
>> Or do you mean it should be outside the ifdef? So keeping the #endif
>> above and adding another #ifdef __INSIDE_MINIOS after the comment?
>>
>
> What I meant is to have the comment before wrmsr as before. But I think
> it is also a valid comment in its position now. I don't want to bikeshed
> too much on this.
Well, the xen_*mb stuff _is_ common to i386 and x86_64. I placed those
defines at that position on purpose. Moving the comment after those
defines would position them in the x86-64 specific section when looking
at the comments.
Juergen
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] minios: fix build issue with xen_*mb defines
2016-09-28 9:50 [PATCH] minios: fix build issue with xen_*mb defines Juergen Gross
2016-09-28 10:01 ` Wei Liu
@ 2016-09-28 11:07 ` Samuel Thibault
2016-09-28 11:10 ` [Minios-devel] " Wei Liu
1 sibling, 1 reply; 7+ messages in thread
From: Samuel Thibault @ 2016-09-28 11:07 UTC (permalink / raw)
To: Juergen Gross; +Cc: minios-devel, xen-devel, wei.liu2
Juergen Gross, on Wed 28 Sep 2016 11:50:04 +0200, wrote:
> Commit e35295d724d64e6e025ec31c2e510e448b8641d1 ("mini-os: fix builds
> with uncommon config settings") introduced a bug which will break
> the build, as xc_minios.c will have defined those macros via
> xc_private.h.
>
> Fix this by defining the macros only if compiling a minios source.
>
> Signed-off-by: Juergen Gross <jgross@suse.com>
Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
> ---
> include/x86/os.h | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/include/x86/os.h b/include/x86/os.h
> index 0f5dd6c..fbc2eeb 100644
> --- a/include/x86/os.h
> +++ b/include/x86/os.h
> @@ -511,14 +511,14 @@ static __inline__ unsigned long __ffs(unsigned long word)
> #error "Unsupported architecture"
> #endif
>
> -#endif /* ifdef __INSIDE_MINIOS */
> -
> /********************* common i386 and x86_64 ****************************/
> #define xen_mb() mb()
> #define xen_rmb() rmb()
> #define xen_wmb() wmb()
> #define xen_barrier() asm volatile ( "" : : : "memory")
>
> +#endif /* ifdef __INSIDE_MINIOS */
> +
> #define wrmsr(msr,val1,val2) \
> __asm__ __volatile__("wrmsr" \
> : /* no outputs */ \
> --
> 2.6.6
>
--
Samuel
X-Favorit-Cartoon: Calvin and Hobbes
-+- Mail header of Wim van Dorst -+-
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [Minios-devel] [PATCH] minios: fix build issue with xen_*mb defines
2016-09-28 11:07 ` Samuel Thibault
@ 2016-09-28 11:10 ` Wei Liu
0 siblings, 0 replies; 7+ messages in thread
From: Wei Liu @ 2016-09-28 11:10 UTC (permalink / raw)
To: Samuel Thibault, Juergen Gross, minios-devel, xen-devel, wei.liu2
On Wed, Sep 28, 2016 at 01:07:36PM +0200, Samuel Thibault wrote:
> Juergen Gross, on Wed 28 Sep 2016 11:50:04 +0200, wrote:
> > Commit e35295d724d64e6e025ec31c2e510e448b8641d1 ("mini-os: fix builds
> > with uncommon config settings") introduced a bug which will break
> > the build, as xc_minios.c will have defined those macros via
> > xc_private.h.
> >
> > Fix this by defining the macros only if compiling a minios source.
> >
> > Signed-off-by: Juergen Gross <jgross@suse.com>
>
> Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
>
Thanks, now pushed.
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2016-09-28 11:10 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-28 9:50 [PATCH] minios: fix build issue with xen_*mb defines Juergen Gross
2016-09-28 10:01 ` Wei Liu
2016-09-28 10:06 ` Juergen Gross
2016-09-28 10:10 ` Wei Liu
2016-09-28 10:14 ` [Minios-devel] " Juergen Gross
2016-09-28 11:07 ` Samuel Thibault
2016-09-28 11:10 ` [Minios-devel] " Wei Liu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).