MIPS: Netlogic: Add topology.h for XLP family
Add mach-netlogic/topology.h which contains XLP cpu number to core and node mapping. Signed-off-by: Jayachandran C <jchandra@broadcom.com> Signed-off-by: John Crispin <blogic@openwrt.org> Patchwork: http://patchwork.linux-mips.org/patch/6271/
This commit is contained in:

committed by
Ralf Baechle

parent
c24a8a7a99
commit
ce59d0f7fe
20
arch/mips/include/asm/mach-netlogic/topology.h
Normal file
20
arch/mips/include/asm/mach-netlogic/topology.h
Normal file
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
* This file is subject to the terms and conditions of the GNU General Public
|
||||
* License. See the file "COPYING" in the main directory of this archive
|
||||
* for more details.
|
||||
*
|
||||
* Copyright (C) 2013 Broadcom Corporation
|
||||
*/
|
||||
#ifndef _ASM_MACH_NETLOGIC_TOPOLOGY_H
|
||||
#define _ASM_MACH_NETLOGIC_TOPOLOGY_H
|
||||
|
||||
#include <asm/mach-netlogic/multi-node.h>
|
||||
|
||||
#define topology_physical_package_id(cpu) cpu_to_node(cpu)
|
||||
#define topology_core_id(cpu) (cpu_logical_map(cpu) / NLM_THREADS_PER_CORE)
|
||||
#define topology_thread_cpumask(cpu) (&cpu_sibling_map[cpu])
|
||||
#define topology_core_cpumask(cpu) cpumask_of_node(cpu_to_node(cpu))
|
||||
|
||||
#include <asm-generic/topology.h>
|
||||
|
||||
#endif /* _ASM_MACH_NETLOGIC_TOPOLOGY_H */
|
Reference in New Issue
Block a user