1*49cdfc7eSAndroid Build Coastguard Worker /* 2*49cdfc7eSAndroid Build Coastguard Worker * Copyright (C) 2012 Linux Test Project, Inc. 3*49cdfc7eSAndroid Build Coastguard Worker * 4*49cdfc7eSAndroid Build Coastguard Worker * This program is free software; you can redistribute it and/or modify 5*49cdfc7eSAndroid Build Coastguard Worker * it under the terms of the GNU General Public License as published by 6*49cdfc7eSAndroid Build Coastguard Worker * the Free Software Foundation; either version 2 of the License, or 7*49cdfc7eSAndroid Build Coastguard Worker * (at your option) any later version. 8*49cdfc7eSAndroid Build Coastguard Worker * 9*49cdfc7eSAndroid Build Coastguard Worker * This program is distributed in the hope that it will be useful, 10*49cdfc7eSAndroid Build Coastguard Worker * but WITHOUT ANY WARRANTY; without even the implied warranty of 11*49cdfc7eSAndroid Build Coastguard Worker * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See 12*49cdfc7eSAndroid Build Coastguard Worker * the GNU General Public License for more details. 13*49cdfc7eSAndroid Build Coastguard Worker * 14*49cdfc7eSAndroid Build Coastguard Worker * You should have received a copy of the GNU General Public License 15*49cdfc7eSAndroid Build Coastguard Worker * along with this program; if not, write to the Free Software 16*49cdfc7eSAndroid Build Coastguard Worker * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 17*49cdfc7eSAndroid Build Coastguard Worker */ 18*49cdfc7eSAndroid Build Coastguard Worker 19*49cdfc7eSAndroid Build Coastguard Worker #ifndef NUMA_HELPER_H 20*49cdfc7eSAndroid Build Coastguard Worker #define NUMA_HELPER_H 21*49cdfc7eSAndroid Build Coastguard Worker 22*49cdfc7eSAndroid Build Coastguard Worker #include "config.h" 23*49cdfc7eSAndroid Build Coastguard Worker #ifdef HAVE_NUMA_H 24*49cdfc7eSAndroid Build Coastguard Worker # include <numa.h> 25*49cdfc7eSAndroid Build Coastguard Worker #endif 26*49cdfc7eSAndroid Build Coastguard Worker #ifdef HAVE_NUMAIF_H 27*49cdfc7eSAndroid Build Coastguard Worker # include <numaif.h> 28*49cdfc7eSAndroid Build Coastguard Worker #endif 29*49cdfc7eSAndroid Build Coastguard Worker 30*49cdfc7eSAndroid Build Coastguard Worker #define NH_MEMS (1 << 0) 31*49cdfc7eSAndroid Build Coastguard Worker #define NH_CPUS (1 << 1) 32*49cdfc7eSAndroid Build Coastguard Worker 33*49cdfc7eSAndroid Build Coastguard Worker unsigned long get_max_node(void); 34*49cdfc7eSAndroid Build Coastguard Worker int get_allowed_nodes_arr(int flag, int *num_nodes, int **nodes); 35*49cdfc7eSAndroid Build Coastguard Worker int get_allowed_nodes(int flag, int count, ...); 36*49cdfc7eSAndroid Build Coastguard Worker void nh_dump_nodes(void); 37*49cdfc7eSAndroid Build Coastguard Worker int is_numa(void (*cleanup_fn)(void), int flag, int min_nodes); 38*49cdfc7eSAndroid Build Coastguard Worker 39*49cdfc7eSAndroid Build Coastguard Worker #endif /* NUMA_HELPER_H */ 40