Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

MIPS: SGI-IP27: No need for slice_map

per_cpu_init is called exactly once for every CPU. So there is no
need for protection via slice_map.

Signed-off-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
Signed-off-by: Paul Burton <paulburton@kernel.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: James Hogan <jhogan@kernel.org>
Cc: linux-mips@vger.kernel.org
Cc: linux-kernel@vger.kernel.org

authored by

Thomas Bogendoerfer and committed by
Paul Burton
d96ee783 d31f9e64

-6
-1
arch/mips/include/asm/mach-ip27/mmzone.h
··· 13 13 kern_vars_t kern_vars; 14 14 DECLARE_BITMAP(h_bigwin_used, HUB_NUM_BIG_WINDOW); 15 15 cpumask_t h_cpus; 16 - unsigned long slice_map; 17 16 }; 18 17 19 18 struct node_data {
-5
arch/mips/sgi-ip27/ip27-init.c
··· 72 72 void per_cpu_init(void) 73 73 { 74 74 int cpu = smp_processor_id(); 75 - int slice = LOCAL_HUB_L(PI_CPU_NUM); 76 75 nasid_t nasid = get_nasid(); 77 - struct hub_data *hub = hub_data(nasid); 78 - 79 - if (test_and_set_bit(slice, &hub->slice_map)) 80 - return; 81 76 82 77 clear_c0_status(ST0_IM); 83 78