00001 #include <linux/cpumask.h>
00002
00003 #include "local.h"
00004
00005 static struct cpumask _possible = CPU_MASK_ALL;
00006 static struct cpumask _online = CPU_MASK_CPU0;
00007 static struct cpumask _present = CPU_MASK_CPU0;
00008 static struct cpumask _active = CPU_MASK_CPU0;
00009
00010 const struct cpumask *const cpu_possible_mask = &_possible;
00011 const struct cpumask *const cpu_online_mask = &_online;
00012 const struct cpumask *const cpu_present_mask = &_present;
00013 const struct cpumask *const cpu_active_mask = &_active;
00014
00015 cpumask_t cpu_mask_all = CPU_MASK_ALL;
00016 int nr_cpu_ids = NR_CPUS;
00017 const DECLARE_BITMAP(cpu_all_bits, NR_CPUS);
00018
00019
00020 #define MASK_DECLARE_1(x) [x+1][0] = 1UL << (x)
00021 #define MASK_DECLARE_2(x) MASK_DECLARE_1(x), MASK_DECLARE_1(x+1)
00022 #define MASK_DECLARE_4(x) MASK_DECLARE_2(x), MASK_DECLARE_2(x+2)
00023 #define MASK_DECLARE_8(x) MASK_DECLARE_4(x), MASK_DECLARE_4(x+4)
00024
00025 const unsigned long cpu_bit_bitmap[BITS_PER_LONG+1][BITS_TO_LONGS(NR_CPUS)] = {
00026 MASK_DECLARE_8(0), MASK_DECLARE_8(8),
00027 MASK_DECLARE_8(16), MASK_DECLARE_8(24),
00028 #if BITS_PER_LONG > 32
00029 MASK_DECLARE_8(32), MASK_DECLARE_8(40),
00030 MASK_DECLARE_8(48), MASK_DECLARE_8(56),
00031 #endif
00032 };
00033
00034 void __smp_call_function_single(int cpuid, struct call_single_data *data)
00035 {
00036 data->func(data->info);
00037 }