Re: [PATCH] Add support for deferrable timers (respun)

Andi Kleen
2007-03-28T10:07:52Z

Venki Pallipadi <venkatesh.pallipadi@intel.com> writes:
> +++ new/kernel/timer.c 2007-03-26 15:19:35.000000000 -0800
> @@ -74,7 +74,7 @@
> tvec_t tv3;
> tvec_t tv4;
> tvec_t tv5;
> -} ____cacheline_aligned_in_smp;
> +} ____cacheline_aligned;

Why this change? It should be aligned to 2 bytes anyways.

> static DEFINE_PER_CPU(tvec_base_t *, tvec_bases) = &boot_tvec_bases;
>
> +/*
> + * The lowest bit of base ptr in timer is used as a flag to indicate
> + * 'deferrable' nature of the timer. Functions below help us manage that flag.
> + */
> +static inline unsigned int tbase_get_deferrable(struct tvec_t_base_s *base)
> +{
> + return ((unsigned int)base & TBASE_DEFERRABLE_FLAG);

This will warn on 64bit for cast ptr -> int

-Andi