#include <asm/mtrr.h>
#include <asm/tlbflush.h>
-#include <asm/desc.h>
#include <mach_apic.h>
/*
*/
apic_wait_icr_idle();
- if (vector == CRASH_DUMP_VECTOR)
- cfg = (cfg&~APIC_VECTOR_MASK)|APIC_DM_NMI;
-
/*
* No need to touch the target chip field
*/
cfg = __prepare_ICR(shortcut, vector);
- if (vector == CRASH_DUMP_VECTOR) {
+ if (vector == DUMP_VECTOR) {
/*
* Setup DUMP IPI to be delivered as an NMI
*/
*/
cfg = __prepare_ICR(0, vector);
- if (vector == CRASH_DUMP_VECTOR) {
+ if (vector == DUMP_VECTOR) {
/*
* Setup DUMP IPI to be delivered as an NMI
*/
* 2) Leave the mm if we are in the lazy tlb mode.
*/
-fastcall void smp_invalidate_interrupt(struct pt_regs *regs)
+asmlinkage void smp_invalidate_interrupt (void)
{
unsigned long cpu;
cpu = get_cpu();
- if (current->active_mm)
- load_user_cs_desc(cpu, current->active_mm);
if (!cpu_isset(cpu, flush_cpumask))
goto out;
void dump_send_ipi(void)
{
- send_IPI_allbutself(CRASH_DUMP_VECTOR);
+ send_IPI_allbutself(DUMP_VECTOR);
}
/*
send_IPI_mask(cpumask_of_cpu(cpu), RESCHEDULE_VECTOR);
}
-void crash_dump_send_ipi(void)
-{
- send_IPI_allbutself(CRASH_DUMP_VECTOR);
-}
-
/*
* Structure and data for smp_call_function(). This is designed to minimise
* static memory requirements. It also looks cleaner.
* <func> The function to run. This must be fast and non-blocking.
* <info> An arbitrary pointer to pass to the function.
* <nonatomic> currently unused.
- * <wait> If 1, wait (atomically) until function has completed on other CPUs.
- * If 0, wait for the IPI to be received by other CPUs, but do not wait
- * for the completion of the function on each CPU.
- * If -1, do not wait for other CPUs to receive IPI.
+ * <wait> If true, wait (atomically) until function has completed on other CPUs.
* [RETURNS] 0 on success, else a negative status code. Does not return until
* remote CPUs are nearly ready to execute <<func>> or are or have executed.
*
* hardware interrupt handler or from a bottom half handler.
*/
{
- static struct call_data_struct dumpdata;
- struct call_data_struct normaldata;
- struct call_data_struct *data;
+ struct call_data_struct data;
int cpus = num_online_cpus()-1;
if (!cpus)
return 0;
/* Can deadlock when called with interrupts disabled */
- /* Only if we are waiting for other CPU to ack */
- WARN_ON(irqs_disabled() && wait >= 0);
+ WARN_ON(irqs_disabled());
+
+ data.func = func;
+ data.info = info;
+ atomic_set(&data.started, 0);
+ data.wait = wait;
+ if (wait)
+ atomic_set(&data.finished, 0);
spin_lock(&call_lock);
- if (wait == -1) {
- /* if another cpu beat us, they win! */
- if (dumpdata.func) {
- spin_unlock(&call_lock);
- return 0;
- }
- data = &dumpdata;
- } else
- data = &normaldata;
-
- data->func = func;
- data->info = info;
- atomic_set(&data->started, 0);
- data->wait = wait > 0 ? wait : 0;
- if (wait > 0)
- atomic_set(&data->finished, 0);
-
- call_data = data;
+ call_data = &data;
mb();
/* Send a message to all other CPUs and wait for them to respond */
send_IPI_allbutself(CALL_FUNCTION_VECTOR);
/* Wait for response */
- if (wait >= 0)
- while (atomic_read(&data->started) != cpus)
- cpu_relax();
+ while (atomic_read(&data.started) != cpus)
+ barrier();
- if (wait > 0)
- while (atomic_read(&data->finished) != cpus)
- cpu_relax();
+ if (wait)
+ while (atomic_read(&data.finished) != cpus)
+ barrier();
spin_unlock(&call_lock);
return 0;
* all the work is done automatically when
* we return from the interrupt.
*/
-fastcall void smp_reschedule_interrupt(struct pt_regs *regs)
+asmlinkage void smp_reschedule_interrupt(void)
{
ack_APIC_irq();
}
-fastcall void smp_call_function_interrupt(struct pt_regs *regs)
+asmlinkage void smp_call_function_interrupt(void)
{
void (*func) (void *info) = call_data->func;
void *info = call_data->info;