lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 24 Jan 2011 11:58:24 -0800
From:	Yinghai Lu <yinghai@...nel.org>
To:	Tejun Heo <tj@...nel.org>
Cc:	linux-kernel@...r.kernel.org, hpa@...or.com, mingo@...hat.com,
	tglx@...utronix.de, x86@...nel.org, eric.dumazet@...il.com,
	brgerst@...il.com, gorcunov@...il.com, penberg@...nel.org,
	shaohui.zheng@...el.com, rientjes@...gle.com
Subject: Re: [PATCH 04/16] x86: Replace cpu_2_logical_apicid[] with early
 percpu variable

On Sun, Jan 23, 2011 at 5:37 AM, Tejun Heo <tj@...nel.org> wrote:
> Unlike x86_64, on x86_32, the mapping from cpu to logical apicid may
> vary depending on apic in use.  cpu_2_logical_apicid[] array is used
> for this mapping.  Replace it with early percpu variable
> x86_cpu_to_logical_apicid to make it better aligned with other
> mappings.
>
> Signed-off-by: Tejun Heo <tj@...nel.org>
> ---
>  arch/x86/include/asm/apic.h      |    4 ----
>  arch/x86/include/asm/smp.h       |    3 +++
>  arch/x86/kernel/apic/apic.c      |   11 +++++++++++
>  arch/x86/kernel/apic/es7000_32.c |    2 +-
>  arch/x86/kernel/apic/numaq_32.c  |    2 +-
>  arch/x86/kernel/apic/summit_32.c |    4 ++--
>  arch/x86/kernel/setup_percpu.c   |    7 +++++++
>  arch/x86/kernel/smpboot.c        |    7 ++-----
>  8 files changed, 27 insertions(+), 13 deletions(-)
>
> diff --git a/arch/x86/include/asm/apic.h b/arch/x86/include/asm/apic.h
> index 5e3969c..eb139ec 100644
> --- a/arch/x86/include/asm/apic.h
> +++ b/arch/x86/include/asm/apic.h
> @@ -595,8 +595,4 @@ extern int default_check_phys_apicid_present(int phys_apicid);
>
>  #endif /* CONFIG_X86_LOCAL_APIC */
>
> -#ifdef CONFIG_X86_32
> -extern u8 cpu_2_logical_apicid[NR_CPUS];
> -#endif
> -
>  #endif /* _ASM_X86_APIC_H */
> diff --git a/arch/x86/include/asm/smp.h b/arch/x86/include/asm/smp.h
> index 4c2f63c..dc7c46a 100644
> --- a/arch/x86/include/asm/smp.h
> +++ b/arch/x86/include/asm/smp.h
> @@ -38,6 +38,9 @@ static inline struct cpumask *cpu_core_mask(int cpu)
>
>  DECLARE_EARLY_PER_CPU(u16, x86_cpu_to_apicid);
>  DECLARE_EARLY_PER_CPU(u16, x86_bios_cpu_apicid);
> +#if defined(CONFIG_SMP) && defined(CONFIG_X86_32)
> +DECLARE_EARLY_PER_CPU(int, x86_cpu_to_logical_apicid);
> +#endif

why changing it from u8 to int?

Thanks

Yinghai
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ