On 29/08/2024 1:01 pm, Jan Beulich wrote:
> --- a/xen/arch/x86/time.c
> +++ b/xen/arch/x86/time.c
> @@ -66,10 +66,10 @@ struct cpu_time {
> struct platform_timesource {
> const char *id;
> const char *name;
> - u64 frequency;
> + uint64_t frequency;
> /* Post-init this hook may only be invoked via the read_counter()
> wrapper! */
> - u64 (*read_counter)(void);
> - s64 (*init)(struct platform_timesource *);
> + uint64_t (*read_counter)(void);
> + int64_t (*init)(struct platform_timesource *);
> void (*resume)(struct platform_timesource *);
I'm surprised that we haven't seen MISRA complaints about this. That,
or I've not been paying enough attention.
> --- a/xen/common/ubsan/ubsan.c
> +++ b/xen/common/ubsan/ubsan.c
> @@ -21,7 +21,6 @@ static DEFINE_PER_CPU(struct xen_ubsan[1
> #define current this_cpu(in_ubsan)
> #define dump_stack dump_execution_state
> #define u64 long long unsigned int
> -#define s64 long long int
This block of defines was my magic to use ubsan.c otherwise unmodified
from Linux.
It ought to use linux-compat.h now it exists, rather than swapping away
from {u,s}64.
Everything else looks good.
~Andrew