ocaml/xc_get_cpu_featureset/arm: Return not implemented on ARM
PATCH 1/1 ocaml/xc_get_cpu_featureset/arm: Return not implemented on ARM
. as it is not implemented on it.
---
v1: Initial botched patch that didn't compile.
v2: Andrew mentioned to "need to set ENOSYS in the xch last
error." - but we do not use 'failwith_xc', and:
a). The error codes you set are no EXX type.
b). The best I can do is set errno=ENOSYS; Is that what you would like?
Cc: Stefano Stabellini <[email protected]>
Cc: Julien Grall <[email protected]>
----
--- tools/ocaml/libs/xc/xenctrl_stubs.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
tools/ocaml/libs/xc/xenctrl_stubs.c +4 -1
@@ -1218,6 +1218,7 @@ CAMLprim value stub_xc_get_cpu_featureset(value xch, value idx) {CAMLparam2 (xch, idx);CAMLlocal1 (bitmap_val); +#if defined(__i386__) || defined(__x86_64__)/* Safe, because of the global ocaml lock. */ static uint32_t fs_len;
@@ -1245,7 +1246,9 @@ CAMLprim value stub_xc_get_cpu_featureset(value xch, value idx)for (i =0 ; i < len; ++i) Store_field(bitmap_val, i, caml_copy_int64(fs[i])); } - +#else +caml_failwith ("xc_get_cpu_featureset: not implemented" ); +#endif CAMLreturn (bitmap_val); }
Signature · 7 lines
2.5.0 _______________________________________________ Xen-devel mailing list [email protected] http://lists.xen.org/xen-devel
Quoted 11 lines · Konrad Rzeszutek Wilk
. as it is not implemented on it.
Signed-off-by Konrad Rzeszutek Wilk <[email protected]>---
v1: Initial botched patch that didn't compile.
v2: Andrew mentioned to "need to set ENOSYS in the xch last
error." - but we do not use 'failwith_xc', and:
a). The error codes you set are no EXX type.
b). The best I can do is set errno=ENOSYS; Is that what you would like?
As far as I can tell this change follows existing pattern so it's probably fine. But I will wait until some ocaml experts chime in.
Quoted 38 lines
Cc David Scott <[email protected]>Cc Ian Jackson <[email protected]>Cc Wei Liu <[email protected]>Cc Andrew Cooper <[email protected]>Cc: Stefano Stabellini <[email protected]>
Cc: Julien Grall <[email protected]>
------- tools/ocaml/libs/xc/xenctrl_stubs.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)tools/ocaml/libs/xc/xenctrl_stubs.c +4
-1@@ -1218,6 +1218,7 @@ CAMLprim value stub_xc_get_cpu_featureset(value xch, value idx) {CAMLparam2 (xch, idx);CAMLlocal1 (bitmap_val); +#if defined(__i386__) || defined(__x86_64__)/* Safe, because of the global ocaml lock. */ static uint32_t fs_len;@@ -1245,7 +1246,9 @@ CAMLprim value stub_xc_get_cpu_featureset(value xch, value idx)for (i =0 ; i < len; ++i) Store_field(bitmap_val, i, caml_copy_int64(fs[i])); } - +#else +caml_failwith ("xc_get_cpu_featureset: not implemented" ); +#endif CAMLreturn (bitmap_val); }Signature · 1 line
2.5.0
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Andrew Cooper
Reviewed-byQuoted 12 lines · Wei Liu
Quoted 11 lines · Konrad Rzeszutek Wilk
. as it is not implemented on it.
Signed-off-by Konrad Rzeszutek Wilk <[email protected]>---
v1: Initial botched patch that didn't compile.
v2: Andrew mentioned to "need to set ENOSYS in the xch last
error." - but we do not use 'failwith_xc', and:
a). The error codes you set are no EXX type.
b). The best I can do is set errno=ENOSYS; Is that what you would like?
Quoted 2 lines
As far as I can tell this change follows existing pattern so it's probably fine. But I will wait until some ocaml experts chime in.
This appears to be the prevailing pattern.
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Quoted 13 lines · Andrew Cooper
Quoted 12 lines · Wei Liu
Quoted 11 lines · Konrad Rzeszutek Wilk
. as it is not implemented on it.
Signed-off-by Konrad Rzeszutek Wilk <[email protected]>---
v1: Initial botched patch that didn't compile.
v2: Andrew mentioned to "need to set ENOSYS in the xch last
error." - but we do not use 'failwith_xc', and:
a). The error codes you set are no EXX type.
b). The best I can do is set errno=ENOSYS; Is that what you would like?
Quoted 6 lines
Quoted 2 lines
As far as I can tell this change follows existing pattern so it's probably fine. But I will wait until some ocaml experts chime in.
This appears to be the prevailing pattern.
Reviewed-by Andrew Cooper <[email protected]>
Thanks.
Acked and queued.
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel