minios: fix build issue with xen_*mb defines
PATCH 1/1 minios: fix build issue with xen_*mb defines
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.
--- include/x86/os.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
include/x86/os.h +2 -2
@@ -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 */ \
Signature · 7 lines
2.6.6 _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
Quoted 7 lines · Juergen Gross
Commit
e35295d724d64e6e025ec31c2e510e448b8641d1("mini-os: fix builds with uncommon config settings") introduced a bug which will break the build, asxc_minios.cwill have defined those macros viaxc_private.h.Fix this by defining the macros only if compiling a minios source.
Quoted 1 line
Signed-off-by Juergen Gross <[email protected]>
Quoted 9 lines
--- include/x86/os.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)include/x86/os.h +0
-0
include/x86/os.h static __inline__ unsigned long __ffs(unsigned long word) · line 514
Quoted 6 lines
include/x86/os.h +0
-2@@ -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.
Quoted 13 lines
include/x86/os.h +2
-0#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 */ \Signature · 1 line
2.6.6
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 27 lines · Wei Liu
Quoted 7 lines · Juergen Gross
Commit
e35295d724d64e6e025ec31c2e510e448b8641d1("mini-os: fix builds with uncommon config settings") introduced a bug which will break the build, asxc_minios.cwill have defined those macros viaxc_private.h.Fix this by defining the macros only if compiling a minios source.
Reported-by Wei Liu <[email protected]>Quoted 1 line
Signed-off-by Juergen Gross <[email protected]>Reviewed-by Wei Liu <[email protected]>Quoted 12 lines
--- include/x86/os.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)include/x86/os.h +0
-0@@ -511,14 +511,14 @@ static __inline__ unsigned long __ffs(unsigned long word)#error "Unsupported architecture"#endif
Quoted 5 lines
include/x86/os.h static __inline__ unsigned long __ffs(unsigned long word) · line 514
Quoted 3 lines
include/x86/os.h +0
-2-#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?
Quoted 6 lines
Quoted 6 lines
include/x86/os.h +0
-0#define xen_mb () mb()#define xen_rmb () rmb()#define xen_wmb () wmb()#define xen_barrier () asm volatile ( "" : : : "memory")
Quoted 9 lines
Quoted 8 lines
include/x86/os.h +2
-0+#endif /* ifdef __INSIDE_MINIOS */ +#define wrmsr (msr,val1,val2) \ __asm__ __volatile__("wrmsr" \ :/* no outputs */ \Signature · 1 line
2.6.6
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 34 lines · Juergen Gross
Quoted 27 lines · Wei Liu
Quoted 7 lines · Juergen Gross
Commit
e35295d724d64e6e025ec31c2e510e448b8641d1("mini-os: fix builds with uncommon config settings") introduced a bug which will break the build, asxc_minios.cwill have defined those macros viaxc_private.h.Fix this by defining the macros only if compiling a minios source.
Reported-by Wei Liu <[email protected]>Quoted 1 line
Signed-off-by Juergen Gross <[email protected]>Reviewed-by Wei Liu <[email protected]>Quoted 12 lines
--- include/x86/os.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)include/x86/os.h +0
-0@@ -511,14 +511,14 @@ static __inline__ unsigned long __ffs(unsigned long word)#error "Unsupported architecture"#endif Quoted 5 lines
include/x86/os.h static __inline__ unsigned long __ffs(unsigned long word) · line 514
Quoted 3 lines
include/x86/os.h +0
-2-#endif /* ifdef __INSIDE_MINIOS */ -/********************* common i386 and x86_64 ****************************/ One nit, might want to retain the position of this comment.
Quoted 5 lines
Didn't I?
Or do you mean it should be outside the ifdef? So keeping the #endif above and adding another #ifdef
__INSIDE_MINIOSafter 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.
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
include/x86/os.h +0
-0#define xen_mb () mb()#define xen_rmb () rmb()#define xen_wmb () wmb()#define xen_barrier () asm volatile ( "" : : : "memory")
Quoted 10 lines
Quoted 9 lines
Quoted 8 lines
include/x86/os.h +2
-0+#endif /* ifdef __INSIDE_MINIOS */ +#define wrmsr (msr,val1,val2) \ __asm__ __volatile__("wrmsr" \ :/* no outputs */ \Signature · 1 line
2.6.6
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 37 lines · Wei Liu
Quoted 36 lines · Juergen Gross
Quoted 27 lines · Wei Liu
Quoted 7 lines · Juergen Gross
Commit
e35295d724d64e6e025ec31c2e510e448b8641d1("mini-os: fix builds with uncommon config settings") introduced a bug which will break the build, asxc_minios.cwill have defined those macros viaxc_private.h.Fix this by defining the macros only if compiling a minios source.
Reported-by Wei Liu <[email protected]>Quoted 1 line
Signed-off-by Juergen Gross <[email protected]>Reviewed-by Wei Liu <[email protected]>Quoted 12 lines
--- include/x86/os.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)include/x86/os.h +0
-0@@ -511,14 +511,14 @@ static __inline__ unsigned long __ffs(unsigned long word)#error "Unsupported architecture"#endif Quoted 5 lines
include/x86/os.h static __inline__ unsigned long __ffs(unsigned long word) · line 514
Quoted 3 lines
include/x86/os.h +0
-2-#endif /* ifdef __INSIDE_MINIOS */ -/********************* common i386 and x86_64 ****************************/ One nit, might want to retain the position of this comment.
Didn't I?
Quoted 7 lines
Quoted 3 lines
Or do you mean it should be outside the ifdef? So keeping the #endif above and adding another #ifdef
__INSIDE_MINIOSafter 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
[email protected]
https://lists.xen.org/xen-devel
Quoted 8 lines · 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, asxc_minios.cwill have defined those macros viaxc_private.h.Fix this by defining the macros only if compiling a minios source.
Signed-off-by Juergen Gross <[email protected]>
Quoted 28 lines
--- include/x86/os.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)include/x86/os.h +2
-2@@ -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 */ \Signature · 1 line
2.6.6
Signature · 8 lines
Samuel X-Favorit-Cartoon: Calvin and Hobbes -+- Mail header of Wim van Dorst -+- _______________________________________________ Xen-devel mailing list [email protected] https://lists.xen.org/xen-devel
Quoted 6 lines · Samuel Thibault
Quoted 5 lines · 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, asxc_minios.cwill have defined those macros viaxc_private.h.
Quoted 6 lines
Quoted 3 lines
Fix this by defining the macros only if compiling a minios source.
Signed-off-by Juergen Gross <[email protected]>Acked-by Samuel Thibault <[email protected]>
Thanks, now pushed.
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel