lkml.org 
[lkml]   [2012]   [Feb]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: MCE, AMD: Hide smp-only code around CONFIG_SMP

* Borislav Petkov <bp@alien8.de> wrote:

> +++ b/arch/x86/include/asm/smp.h
> @@ -33,8 +33,15 @@ static inline bool cpu_has_ht_siblings(void)
>
> DECLARE_PER_CPU(cpumask_var_t, cpu_sibling_map);
> DECLARE_PER_CPU(cpumask_var_t, cpu_core_map);
> -/* cpus sharing the last level cache: */
> +
> +#ifdef CONFIG_SMP
> +/* CPUs sharing the last level cache: */
> DECLARE_PER_CPU(cpumask_var_t, cpu_llc_shared_map);
> +#else
> +static DECLARE_BITMAP(cpu_llc_shared_bits, NR_CPUS) __read_mostly = { [0] = 1UL };
> +static struct cpumask *const cpu_llc_shared_map = to_cpumask(cpu_llc_shared_bits);
> +#endif

Why not just expose it like on SMP?

We want to *reduce* the specialness of UP, not increase it - one
more word of .data and .text does not matter much - UP is
becoming more and more an oddball, rarely tested config. By the
time these changes hit any real boxes it will be even more
oddball.

Thanks,

Ingo


\
 
 \ /
  Last update: 2012-02-09 09:09    [W:0.945 / U:1.492 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site