Whamcloud - gitweb
New tag 2.15.63
[fs/lustre-release.git] / libcfs / include / libcfs / linux / linux-cpu.h
1 /*
2  * GPL HEADER START
3  *
4  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License version 2 only,
8  * as published by the Free Software Foundation.
9  *
10  * This program is distributed in the hope that it will be useful, but
11  * WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * General Public License version 2 for more details (a copy is included
14  * in the LICENSE file that accompanied this code).
15  *
16  * You should have received a copy of the GNU General Public License
17  * version 2 along with this program; if not, write to the
18  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19  * Boston, MA 021110-1307, USA
20  *
21  * GPL HEADER END
22  */
23 /*
24  * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
25  *
26  * Copyright (c) 2012, 2017, Intel Corporation.
27  */
28 /*
29  * This file is part of Lustre, http://www.lustre.org/
30  *
31  * libcfs/include/libcfs/linux/linux-mem.h
32  *
33  * Basic library routines.
34  *
35  * Author: liang@whamcloud.com
36  */
37
38 #ifndef __LIBCFS_LINUX_CPU_H__
39 #define __LIBCFS_LINUX_CPU_H__
40
41 #include <linux/cpu.h>
42
43 #ifndef HAVE_TOPOLOGY_SIBLING_CPUMASK
44 # define topology_sibling_cpumask(cpu)  topology_thread_cpumask(cpu)
45 #endif /* HAVE_TOPOLOGY_SIBLING_CPUMASK */
46
47 #ifndef HAVE_CPUS_READ_LOCK
48 # define cpus_read_lock         get_online_cpus
49 # define cpus_read_unlock       put_online_cpus
50 #endif
51
52 #endif /* __LIBCFS_LINUX_CPU_H__ */