Re: [PATCH] cpumask 5/10 rewrite cpumask.h - single bitmap based implementation

William Lee Irwin III
2004-06-04T08:20:57Z

On Thu, Jun 03, 2004 at 10:10:10AM -0700, Paul Jackson wrote:
> +static inline void __cpu_set(int cpu, volatile cpumask_t *dstp)
> +{
> + set_bit(cpu, dstp->bits);
> +}

Hungarian notation?

On Thu, Jun 03, 2004 at 10:10:10AM -0700, Paul Jackson wrote:
> +#if NR_CPUS > 1
> +#define num_online_cpus() cpus_weight(cpu_online_map)
> +#define num_possible_cpus() cpus_weight(cpu_possible_map)
> +#define num_present_cpus() cpus_weight(cpu_present_map)
> +#define cpu_online(cpu) cpu_isset((cpu), cpu_online_map)
> +#define cpu_possible(cpu) cpu_isset((cpu), cpu_possible_map)
> +#define cpu_present(cpu) cpu_isset((cpu), cpu_present_map)
> +#else
> +#define num_online_cpus() 1
> +#define num_possible_cpus() 1
> +#define num_present_cpus() 1
> +#define cpu_online(cpu) ((cpu) == 0)
> +#define cpu_possible(cpu) ((cpu) == 0)
> +#define cpu_present(cpu) ((cpu) == 0)
> +#endif

#ifdef'ing it anyway?

On Thu, Jun 03, 2004 at 10:10:10AM -0700, Paul Jackson wrote:
> @@ -1206,9 +1207,10 @@
> {
> struct ino_bucket *bp = ivector_table + (long)data;
> struct irqaction *ap = bp->irq_info;
> - cpumask_t mask = get_smpaff_in_irqaction(ap);
> + cpumask_t mask;
> int len;
>
> + cpus_addr(mask)[0] = get_smpaff_in_irqaction(ap);
> if (cpus_empty(mask))
> mask = cpu_online_map;

This is an improvement?

-- wli