|
@@ -58,6 +58,9 @@
|
|
#define CREATE_TRACE_POINTS
|
|
#define CREATE_TRACE_POINTS
|
|
#include <trace/events/ipi.h>
|
|
#include <trace/events/ipi.h>
|
|
|
|
|
|
|
|
+DEFINE_PER_CPU_READ_MOSTLY(int, cpu_number);
|
|
|
|
+EXPORT_PER_CPU_SYMBOL(cpu_number);
|
|
|
|
+
|
|
/*
|
|
/*
|
|
* as from 2.5, kernels no longer have an init_tasks structure
|
|
* as from 2.5, kernels no longer have an init_tasks structure
|
|
* so we need some other way of telling a new secondary core
|
|
* so we need some other way of telling a new secondary core
|
|
@@ -719,6 +722,8 @@ void __init smp_prepare_cpus(unsigned int max_cpus)
|
|
*/
|
|
*/
|
|
for_each_possible_cpu(cpu) {
|
|
for_each_possible_cpu(cpu) {
|
|
|
|
|
|
|
|
+ per_cpu(cpu_number, cpu) = cpu;
|
|
|
|
+
|
|
if (cpu == smp_processor_id())
|
|
if (cpu == smp_processor_id())
|
|
continue;
|
|
continue;
|
|
|
|
|