X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=libcfs%2Finclude%2Flibcfs%2Flinux%2Flinux-cpu.h;h=ab6b55e0586a6277249578273f5151043afa827b;hb=604c266a175b72500ef99793652b64ed4f842b2c;hp=a46e2524660268f9b38d7d32d7be4e83b7582842;hpb=42bf19a573a5c967e54302cc08c7b51effac3dd9;p=fs%2Flustre-release.git diff --git a/libcfs/include/libcfs/linux/linux-cpu.h b/libcfs/include/libcfs/linux/linux-cpu.h index a46e252..ab6b55e 100644 --- a/libcfs/include/libcfs/linux/linux-cpu.h +++ b/libcfs/include/libcfs/linux/linux-cpu.h @@ -23,7 +23,7 @@ /* * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. * - * Copyright (c) 2012, 2013, Intel Corporation. + * Copyright (c) 2012, 2017, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/ @@ -39,61 +39,6 @@ #ifndef __LIBCFS_LINUX_CPU_H__ #define __LIBCFS_LINUX_CPU_H__ -#ifndef __LIBCFS_LIBCFS_H__ -#error Do not #include this file directly. #include instead -#endif - -#ifndef __KERNEL__ -#error This include is only for kernel use. -#endif - -#include -#include -#include -#include - -#ifdef CONFIG_SMP - -#define HAVE_LIBCFS_CPT - -/** virtual processing unit */ -struct cfs_cpu_partition { - /* CPUs mask for this partition */ - cpumask_t *cpt_cpumask; - /* nodes mask for this partition */ - nodemask_t *cpt_nodemask; - /* NUMA distance between CPTs */ - unsigned *cpt_distance; - /* spread rotor for NUMA allocator */ - int cpt_spread_rotor; - /* NUMA node if cpt_nodemask is empty */ - int cpt_node; -}; - -/** descriptor for CPU partitions */ -struct cfs_cpt_table { - /* spread rotor for NUMA allocator */ - int ctb_spread_rotor; - /* maximum NUMA distance between all nodes in table */ - unsigned ctb_distance; - /* # of CPU partitions */ - int ctb_nparts; - /* partitions tables */ - struct cfs_cpu_partition *ctb_parts; - /* shadow HW CPU to CPU partition ID */ - int *ctb_cpu2cpt; - /* all cpus in this partition table */ - cpumask_t *ctb_cpumask; - /* shadow HW node to CPU partition ID */ - int *ctb_node2cpt; - /* all nodes in this partition table */ - nodemask_t *ctb_nodemask; -}; - -void cfs_cpu_core_siblings(int cpu, cpumask_t *mask); - -#endif /* CONFIG_SMP */ - #ifndef HAVE_TOPOLOGY_SIBLING_CPUMASK # define topology_sibling_cpumask(cpu) topology_thread_cpumask(cpu) #endif /* HAVE_TOPOLOGY_SIBLING_CPUMASK */