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]
Message-ID: <alpine.DEB.2.00.1101121831001.8631@chino.kir.corp.google.com>
Date:	Wed, 12 Jan 2011 18:40:09 -0800 (PST)
From:	David Rientjes <rientjes@...gle.com>
To:	Tejun Heo <tj@...nel.org>
cc:	linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...hat.com>,
	tglx@...utronix.de, "H. Peter Anvin" <hpa@...or.com>,
	x86@...nel.org, eric.dumazet@...il.com, yinghai@...nel.org,
	brgerst@...il.com, gorcunov@...il.com,
	Pekka Enberg <penberg@...nel.org>, shaohui.zheng@...el.com
Subject: Re: [PATCH 05/16] x86: Always use x86_cpu_to_logical_apicid for cpu
 -> logical apic id

On Thu, 30 Dec 2010, Tejun Heo wrote:

> diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
> index ba78b1e..8ad231c 100644
> --- a/arch/x86/kernel/apic/apic.c
> +++ b/arch/x86/kernel/apic/apic.c
> @@ -1252,6 +1252,14 @@ void __cpuinit setup_local_APIC(void)
>  	 */
>  	apic->init_apic_ldr();
>  
> +#ifdef CONFIG_X86_32
> +	/*
> +	 * APIC LDR is initialized.  Fetch and store logical_apic_id.
> +	 */
> +	early_per_cpu(x86_cpu_to_logical_apicid, cpu) =
> +		logical_smp_processor_id();
> +#endif
> +
>  	/*
>  	 * Set Task Priority to 'accept all'. We never change this
>  	 * later on.

You can remove the initialization of x86_cpu_to_logical_apicid in the 
->init_apic_ldr() callback in x2apic_cluster.c now too?

[snip]

> diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c
> index eb04f30..0768761 100644
> --- a/arch/x86/kernel/smpboot.c
> +++ b/arch/x86/kernel/smpboot.c
> @@ -168,19 +168,18 @@ static void unmap_cpu_to_node(int cpu)
>  static void map_cpu_to_logical_apicid(void)
>  {
>  	int cpu = smp_processor_id();
> -	int apicid = logical_smp_processor_id();
> -	int node = apic->apicid_to_node(apicid);
> +	int logical_apicid = early_per_cpu(x86_cpu_to_logical_apicid, cpu);
> +	int node;
>  
> +	node = apic->apicid_to_node(logical_apicid);
>  	if (!node_online(node))
>  		node = first_online_node;
>  
> -	early_per_cpu(x86_cpu_to_logical_apicid, cpu) = apicid;
>  	map_cpu_to_node(cpu, node);
>  }
>  
>  void numa_remove_cpu(int cpu)
>  {
> -	early_per_cpu(x86_cpu_to_logical_apicid, cpu) = BAD_APICID;
>  	unmap_cpu_to_node(cpu);
>  }
>  #else

I don't see where this is reset to BAD_APICID when numa_remove_cpu() is 
called when disabling a cpu after the patch.
--
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