git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fedora core 6 1.2949 + vserver 2.2.0
[linux-2.6.git]
/
arch
/
arm
/
kernel
/
smp.c
diff --git
a/arch/arm/kernel/smp.c
b/arch/arm/kernel/smp.c
index
02aa300
..
070bcb7
100644
(file)
--- a/
arch/arm/kernel/smp.c
+++ b/
arch/arm/kernel/smp.c
@@
-7,7
+7,7
@@
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
-#include <linux/
config
.h>
+#include <linux/
module
.h>
#include <linux/delay.h>
#include <linux/init.h>
#include <linux/spinlock.h>
#include <linux/delay.h>
#include <linux/init.h>
#include <linux/spinlock.h>
@@
-20,6
+20,7
@@
#include <linux/cpu.h>
#include <linux/smp.h>
#include <linux/seq_file.h>
#include <linux/cpu.h>
#include <linux/smp.h>
#include <linux/seq_file.h>
+#include <linux/irq.h>
#include <asm/atomic.h>
#include <asm/cacheflush.h>
#include <asm/atomic.h>
#include <asm/cacheflush.h>
@@
-37,7
+38,9
@@
* The online bitmask indicates that the CPU is up and running.
*/
cpumask_t cpu_possible_map;
* The online bitmask indicates that the CPU is up and running.
*/
cpumask_t cpu_possible_map;
+EXPORT_SYMBOL(cpu_possible_map);
cpumask_t cpu_online_map;
cpumask_t cpu_online_map;
+EXPORT_SYMBOL(cpu_online_map);
/*
* as from 2.5, kernels no longer have an init_tasks structure
/*
* as from 2.5, kernels no longer have an init_tasks structure
@@
-337,9
+340,6
@@
void __init smp_prepare_boot_cpu(void)
unsigned int cpu = smp_processor_id();
per_cpu(cpu_data, cpu).idle = current;
unsigned int cpu = smp_processor_id();
per_cpu(cpu_data, cpu).idle = current;
-
- cpu_set(cpu, cpu_present_map);
- cpu_set(cpu, cpu_online_map);
}
static void send_ipi_message(cpumask_t callmap, enum ipi_msg_type msg)
}
static void send_ipi_message(cpumask_t callmap, enum ipi_msg_type msg)
@@
-451,6
+451,7
@@
int smp_call_function(void (*func)(void *info), void *info, int retry,
return smp_call_function_on_cpu(func, info, retry, wait,
cpu_online_map);
}
return smp_call_function_on_cpu(func, info, retry, wait,
cpu_online_map);
}
+EXPORT_SYMBOL_GPL(smp_call_function);
void show_ipi_list(struct seq_file *p)
{
void show_ipi_list(struct seq_file *p)
{
@@
-476,25
+477,26
@@
void show_local_irqs(struct seq_file *p)
seq_putc(p, '\n');
}
seq_putc(p, '\n');
}
-static void ipi_timer(
struct pt_regs *regs
)
+static void ipi_timer(
void
)
{
{
- int user = user_mode(regs);
-
irq_enter();
irq_enter();
- profile_tick(CPU_PROFILING
, regs
);
- update_process_times(user);
+ profile_tick(CPU_PROFILING);
+ update_process_times(user
_mode(get_irq_regs())
);
irq_exit();
}
#ifdef CONFIG_LOCAL_TIMERS
asmlinkage void do_local_timer(struct pt_regs *regs)
{
irq_exit();
}
#ifdef CONFIG_LOCAL_TIMERS
asmlinkage void do_local_timer(struct pt_regs *regs)
{
+ struct pt_regs *old_regs = set_irq_regs(regs);
int cpu = smp_processor_id();
if (local_timer_ack()) {
irq_stat[cpu].local_timer_irqs++;
int cpu = smp_processor_id();
if (local_timer_ack()) {
irq_stat[cpu].local_timer_irqs++;
- ipi_timer(
regs
);
+ ipi_timer();
}
}
+
+ set_irq_regs(old_regs);
}
#endif
}
#endif
@@
-553,6
+555,7
@@
asmlinkage void do_IPI(struct pt_regs *regs)
{
unsigned int cpu = smp_processor_id();
struct ipi_data *ipi = &per_cpu(ipi_data, cpu);
{
unsigned int cpu = smp_processor_id();
struct ipi_data *ipi = &per_cpu(ipi_data, cpu);
+ struct pt_regs *old_regs = set_irq_regs(regs);
ipi->ipi_count++;
ipi->ipi_count++;
@@
-576,7
+579,7
@@
asmlinkage void do_IPI(struct pt_regs *regs)
switch (nextmsg) {
case IPI_TIMER:
switch (nextmsg) {
case IPI_TIMER:
- ipi_timer(
regs
);
+ ipi_timer();
break;
case IPI_RESCHEDULE:
break;
case IPI_RESCHEDULE:
@@
-601,6
+604,8
@@
asmlinkage void do_IPI(struct pt_regs *regs)
}
} while (msgs);
}
}
} while (msgs);
}
+
+ set_irq_regs(old_regs);
}
void smp_send_reschedule(int cpu)
}
void smp_send_reschedule(int cpu)