* [PATCH 0/3] XTF: small fixes
@ 2016-05-06 14:25 Roger Pau Monne
2016-05-06 14:25 ` [PATCH 1/3] xtf: don't re-define __noinline Roger Pau Monne
` (3 more replies)
0 siblings, 4 replies; 7+ messages in thread
From: Roger Pau Monne @ 2016-05-06 14:25 UTC (permalink / raw)
To: xen-devel
Hello,
This is a series of very small fixes for XTF, the first two are code fixes,
while the last one is a build system fix.
Thanks, Roger.
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/3] xtf: don't re-define __noinline
2016-05-06 14:25 [PATCH 0/3] XTF: small fixes Roger Pau Monne
@ 2016-05-06 14:25 ` Roger Pau Monne
2016-05-06 14:25 ` [PATCH 2/3] xtf: avoid shifting a negative value Roger Pau Monne
` (2 subsequent siblings)
3 siblings, 0 replies; 7+ messages in thread
From: Roger Pau Monne @ 2016-05-06 14:25 UTC (permalink / raw)
To: xen-devel; +Cc: Andrew Cooper, Roger Pau Monne
On FreeBSD __noinline is already defined in cdefs.h
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
---
Cc: Andrew Cooper <andrew.cooper3@citrix.com>
---
include/xtf/compiler.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/xtf/compiler.h b/include/xtf/compiler.h
index 47d929c..251b853 100644
--- a/include/xtf/compiler.h
+++ b/include/xtf/compiler.h
@@ -4,7 +4,9 @@
#define __aligned(x) __attribute__((__aligned__(x)))
#define __packed __attribute__((__packed__))
+#ifndef __noinline /* Avoid conflicting with cdefs.h */
#define __noinline __attribute__((__noinline__))
+#endif
#ifndef __always_inline /* Avoid conflicting with cdefs.h */
#define __always_inline __attribute__((__always_inline__))
--
2.7.4 (Apple Git-66)
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 2/3] xtf: avoid shifting a negative value
2016-05-06 14:25 [PATCH 0/3] XTF: small fixes Roger Pau Monne
2016-05-06 14:25 ` [PATCH 1/3] xtf: don't re-define __noinline Roger Pau Monne
@ 2016-05-06 14:25 ` Roger Pau Monne
2016-05-06 14:57 ` Andrew Cooper
2016-05-06 14:25 ` [PATCH 3/3] xtf: fix usage of "-executable" with find Roger Pau Monne
2016-05-06 14:46 ` [PATCH 0/3] XTF: small fixes Andrew Cooper
3 siblings, 1 reply; 7+ messages in thread
From: Roger Pau Monne @ 2016-05-06 14:25 UTC (permalink / raw)
To: xen-devel; +Cc: Andrew Cooper, Roger Pau Monne
Because it's undefined behaviour.
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
---
Cc: Andrew Cooper <andrew.cooper3@citrix.com>
---
include/arch/x86/processor.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/arch/x86/processor.h b/include/arch/x86/processor.h
index c9f253f..841953c 100644
--- a/include/arch/x86/processor.h
+++ b/include/arch/x86/processor.h
@@ -134,7 +134,7 @@
/* Segment-based Error Code - supplemental constants. */
#define X86_EC_TABLE_MASK (3 << 1)
#define X86_EC_SEL_SHIFT 3
-#define X86_EC_SEL_MASK (-1 << X86_EC_SEL_SHIFT)
+#define X86_EC_SEL_MASK (-1U << X86_EC_SEL_SHIFT)
#define X86_EC_GDT 0
#define X86_EC_LDT X86_EC_TI
--
2.7.4 (Apple Git-66)
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 3/3] xtf: fix usage of "-executable" with find
2016-05-06 14:25 [PATCH 0/3] XTF: small fixes Roger Pau Monne
2016-05-06 14:25 ` [PATCH 1/3] xtf: don't re-define __noinline Roger Pau Monne
2016-05-06 14:25 ` [PATCH 2/3] xtf: avoid shifting a negative value Roger Pau Monne
@ 2016-05-06 14:25 ` Roger Pau Monne
2016-05-06 14:46 ` [PATCH 0/3] XTF: small fixes Andrew Cooper
3 siblings, 0 replies; 7+ messages in thread
From: Roger Pau Monne @ 2016-05-06 14:25 UTC (permalink / raw)
To: xen-devel; +Cc: Andrew Cooper, Roger Pau Monne
"-executable" is a GNU only extension to find. Instead replace it with a
POSIX compatible one.
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
---
Cc: Andrew Cooper <andrew.cooper3@citrix.com>
---
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index 7657e19..fd8c3e0 100644
--- a/Makefile
+++ b/Makefile
@@ -22,7 +22,7 @@ cscope:
.PHONY: clean
clean:
find . \( -name "*.o" -o -name "*.d" -o -name "*.lds" \) -delete
- find tests/ \( -executable -name "test-*" -o -name "test-*.cfg" \
+ find tests/ \( -perm -a=x -name "test-*" -o -name "test-*.cfg" \
-o -name "test-info.json" \) -delete
.PHONY: distclean
--
2.7.4 (Apple Git-66)
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH 0/3] XTF: small fixes
2016-05-06 14:25 [PATCH 0/3] XTF: small fixes Roger Pau Monne
` (2 preceding siblings ...)
2016-05-06 14:25 ` [PATCH 3/3] xtf: fix usage of "-executable" with find Roger Pau Monne
@ 2016-05-06 14:46 ` Andrew Cooper
3 siblings, 0 replies; 7+ messages in thread
From: Andrew Cooper @ 2016-05-06 14:46 UTC (permalink / raw)
To: Roger Pau Monne, xen-devel
On 06/05/16 15:25, Roger Pau Monne wrote:
> Hello,
>
> This is a series of very small fixes for XTF, the first two are code fixes,
> while the last one is a build system fix.
>
> Thanks, Roger.
1 and 3 look fine - I will take them straight as-is.
2 is slightly more problematic - comment on that patch.
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/3] xtf: avoid shifting a negative value
2016-05-06 14:25 ` [PATCH 2/3] xtf: avoid shifting a negative value Roger Pau Monne
@ 2016-05-06 14:57 ` Andrew Cooper
2016-05-06 15:05 ` Andrew Cooper
0 siblings, 1 reply; 7+ messages in thread
From: Andrew Cooper @ 2016-05-06 14:57 UTC (permalink / raw)
To: Roger Pau Monne, xen-devel
On 06/05/16 15:25, Roger Pau Monne wrote:
> Because it's undefined behaviour.
>
> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
> ---
> Cc: Andrew Cooper <andrew.cooper3@citrix.com>
> ---
> include/arch/x86/processor.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/arch/x86/processor.h b/include/arch/x86/processor.h
> index c9f253f..841953c 100644
> --- a/include/arch/x86/processor.h
> +++ b/include/arch/x86/processor.h
> @@ -134,7 +134,7 @@
> /* Segment-based Error Code - supplemental constants. */
> #define X86_EC_TABLE_MASK (3 << 1)
> #define X86_EC_SEL_SHIFT 3
> -#define X86_EC_SEL_MASK (-1 << X86_EC_SEL_SHIFT)
> +#define X86_EC_SEL_MASK (-1U << X86_EC_SEL_SHIFT)
The resulting expression needs to be signed, to DTRT when implicitly
promoted. I presume this was clang complaining?
Does using the constant (-9) work?
~Andrew
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH 2/3] xtf: avoid shifting a negative value
2016-05-06 14:57 ` Andrew Cooper
@ 2016-05-06 15:05 ` Andrew Cooper
0 siblings, 0 replies; 7+ messages in thread
From: Andrew Cooper @ 2016-05-06 15:05 UTC (permalink / raw)
To: Roger Pau Monne, xen-devel
On 06/05/16 15:57, Andrew Cooper wrote:
> On 06/05/16 15:25, Roger Pau Monne wrote:
>> Because it's undefined behaviour.
>>
>> Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
>> ---
>> Cc: Andrew Cooper <andrew.cooper3@citrix.com>
>> ---
>> include/arch/x86/processor.h | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/include/arch/x86/processor.h b/include/arch/x86/processor.h
>> index c9f253f..841953c 100644
>> --- a/include/arch/x86/processor.h
>> +++ b/include/arch/x86/processor.h
>> @@ -134,7 +134,7 @@
>> /* Segment-based Error Code - supplemental constants. */
>> #define X86_EC_TABLE_MASK (3 << 1)
>> #define X86_EC_SEL_SHIFT 3
>> -#define X86_EC_SEL_MASK (-1 << X86_EC_SEL_SHIFT)
>> +#define X86_EC_SEL_MASK (-1U << X86_EC_SEL_SHIFT)
> The resulting expression needs to be signed, to DTRT when implicitly
> promoted. I presume this was clang complaining?
>
> Does using the constant (-9) work?
Or indeed perhaps ~(1 << X86_EC_SEL_SHIFT) which (iirc) will keep the
signed-ness of 1 even through bitwise inversion.
~Andrew
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2016-05-06 15:06 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-06 14:25 [PATCH 0/3] XTF: small fixes Roger Pau Monne
2016-05-06 14:25 ` [PATCH 1/3] xtf: don't re-define __noinline Roger Pau Monne
2016-05-06 14:25 ` [PATCH 2/3] xtf: avoid shifting a negative value Roger Pau Monne
2016-05-06 14:57 ` Andrew Cooper
2016-05-06 15:05 ` Andrew Cooper
2016-05-06 14:25 ` [PATCH 3/3] xtf: fix usage of "-executable" with find Roger Pau Monne
2016-05-06 14:46 ` [PATCH 0/3] XTF: small fixes Andrew Cooper
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.