]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/x86/mach-voyager/voyager_smp.c
Merge branches 'release', 'acpi_pm_device_sleep_state' and 'battery' into release
[linux-2.6-omap-h63xx.git] / arch / x86 / mach-voyager / voyager_smp.c
index 981def2b4e9b303855646eddc24b19776dc3050e..3cc8eb2f36a995ad57252be8310ece8fcd32327a 100644 (file)
@@ -444,8 +444,6 @@ static __u32 __init setup_trampoline(void)
 static void __init start_secondary(void *unused)
 {
        __u8 cpuid = hard_smp_processor_id();
-       /* external functions not defined in the headers */
-       extern void calibrate_delay(void);
 
        cpu_init();
 
@@ -526,7 +524,7 @@ static void __init do_boot_cpu(__u8 cpu)
         * initial kernel stack.  We need to alter this to give the
         * booting CPU a new stack (taken from its idle process) */
        extern struct {
-               __u8 *esp;
+               __u8 *sp;
                unsigned short ss;
        } stack_start;
        /* This is the format of the CPI IDT gate (in real mode) which
@@ -555,9 +553,9 @@ static void __init do_boot_cpu(__u8 cpu)
        idle = fork_idle(cpu);
        if (IS_ERR(idle))
                panic("failed fork for CPU%d", cpu);
-       idle->thread.eip = (unsigned long)start_secondary;
+       idle->thread.ip = (unsigned long)start_secondary;
        /* init_tasks (in sched.c) is indexed logically */
-       stack_start.esp = (void *)idle->thread.esp;
+       stack_start.sp = (void *)idle->thread.sp;
 
        init_gdt(cpu);
        per_cpu(current_task, cpu) = idle;
@@ -567,7 +565,7 @@ static void __init do_boot_cpu(__u8 cpu)
        /* Note: Don't modify initial ss override */
        VDEBUG(("VOYAGER SMP: Booting CPU%d at 0x%lx[%x:%x], stack %p\n", cpu,
                (unsigned long)hijack_source.val, hijack_source.idt.Segment,
-               hijack_source.idt.Offset, stack_start.esp));
+               hijack_source.idt.Offset, stack_start.sp));
 
        /* init lowmem identity mapping */
        clone_pgd_range(swapper_pg_dir, swapper_pg_dir + USER_PGD_PTRS,
@@ -745,8 +743,8 @@ void __init initialize_secondary(void)
         */
 
        asm volatile ("movl %0,%%esp\n\t"
-                     "jmp *%1"::"r" (current->thread.esp),
-                     "r"(current->thread.eip));
+                     "jmp *%1"::"r" (current->thread.sp),
+                     "r"(current->thread.ip));
 }
 
 /* handle a Voyager SYS_INT -- If we don't, the base board will
@@ -755,7 +753,7 @@ void __init initialize_secondary(void)
  * System interrupts occur because some problem was detected on the
  * various busses.  To find out what you have to probe all the
  * hardware via the CAT bus.  FIXME: At the moment we do nothing. */
-fastcall void smp_vic_sys_interrupt(struct pt_regs *regs)
+void smp_vic_sys_interrupt(struct pt_regs *regs)
 {
        ack_CPI(VIC_SYS_INT);
        printk("Voyager SYSTEM INTERRUPT\n");
@@ -764,7 +762,7 @@ fastcall void smp_vic_sys_interrupt(struct pt_regs *regs)
 /* Handle a voyager CMN_INT; These interrupts occur either because of
  * a system status change or because a single bit memory error
  * occurred.  FIXME: At the moment, ignore all this. */
-fastcall void smp_vic_cmn_interrupt(struct pt_regs *regs)
+void smp_vic_cmn_interrupt(struct pt_regs *regs)
 {
        static __u8 in_cmn_int = 0;
        static DEFINE_SPINLOCK(cmn_int_lock);
@@ -800,7 +798,6 @@ static void smp_reschedule_interrupt(void)
 static struct mm_struct *flush_mm;
 static unsigned long flush_va;
 static DEFINE_SPINLOCK(tlbstate_lock);
-#define FLUSH_ALL      0xffffffff
 
 /*
  * We cannot call mmdrop() because we are in interrupt context,
@@ -809,7 +806,7 @@ static DEFINE_SPINLOCK(tlbstate_lock);
  * We need to reload %cr3 since the page tables may be going
  * away from under us..
  */
-static inline void leave_mm(unsigned long cpu)
+static inline void voyager_leave_mm(unsigned long cpu)
 {
        if (per_cpu(cpu_tlbstate, cpu).state == TLBSTATE_OK)
                BUG();
@@ -834,12 +831,12 @@ static void smp_invalidate_interrupt(void)
 
        if (flush_mm == per_cpu(cpu_tlbstate, cpu).active_mm) {
                if (per_cpu(cpu_tlbstate, cpu).state == TLBSTATE_OK) {
-                       if (flush_va == FLUSH_ALL)
+                       if (flush_va == TLB_FLUSH_ALL)
                                local_flush_tlb();
                        else
                                __flush_tlb_one(flush_va);
                } else
-                       leave_mm(cpu);
+                       voyager_leave_mm(cpu);
        }
        smp_mb__before_clear_bit();
        clear_bit(cpu, &smp_invalidate_needed);
@@ -903,7 +900,7 @@ void flush_tlb_current_task(void)
        cpu_mask = cpus_addr(mm->cpu_vm_mask)[0] & ~(1 << smp_processor_id());
        local_flush_tlb();
        if (cpu_mask)
-               voyager_flush_tlb_others(cpu_mask, mm, FLUSH_ALL);
+               voyager_flush_tlb_others(cpu_mask, mm, TLB_FLUSH_ALL);
 
        preempt_enable();
 }
@@ -920,10 +917,10 @@ void flush_tlb_mm(struct mm_struct *mm)
                if (current->mm)
                        local_flush_tlb();
                else
-                       leave_mm(smp_processor_id());
+                       voyager_leave_mm(smp_processor_id());
        }
        if (cpu_mask)
-               voyager_flush_tlb_others(cpu_mask, mm, FLUSH_ALL);
+               voyager_flush_tlb_others(cpu_mask, mm, TLB_FLUSH_ALL);
 
        preempt_enable();
 }
@@ -940,7 +937,7 @@ void flush_tlb_page(struct vm_area_struct *vma, unsigned long va)
                if (current->mm)
                        __flush_tlb_one(va);
                else
-                       leave_mm(smp_processor_id());
+                       voyager_leave_mm(smp_processor_id());
        }
 
        if (cpu_mask)
@@ -1087,7 +1084,7 @@ voyager_smp_call_function_mask(cpumask_t cpumask,
  * no local APIC, so I can't do this
  *
  * This function is currently a placeholder and is unused in the code */
-fastcall void smp_apic_timer_interrupt(struct pt_regs *regs)
+void smp_apic_timer_interrupt(struct pt_regs *regs)
 {
        struct pt_regs *old_regs = set_irq_regs(regs);
        wrapper_smp_local_timer_interrupt();
@@ -1095,7 +1092,7 @@ fastcall void smp_apic_timer_interrupt(struct pt_regs *regs)
 }
 
 /* All of the QUAD interrupt GATES */
-fastcall void smp_qic_timer_interrupt(struct pt_regs *regs)
+void smp_qic_timer_interrupt(struct pt_regs *regs)
 {
        struct pt_regs *old_regs = set_irq_regs(regs);
        ack_QIC_CPI(QIC_TIMER_CPI);
@@ -1103,31 +1100,31 @@ fastcall void smp_qic_timer_interrupt(struct pt_regs *regs)
        set_irq_regs(old_regs);
 }
 
-fastcall void smp_qic_invalidate_interrupt(struct pt_regs *regs)
+void smp_qic_invalidate_interrupt(struct pt_regs *regs)
 {
        ack_QIC_CPI(QIC_INVALIDATE_CPI);
        smp_invalidate_interrupt();
 }
 
-fastcall void smp_qic_reschedule_interrupt(struct pt_regs *regs)
+void smp_qic_reschedule_interrupt(struct pt_regs *regs)
 {
        ack_QIC_CPI(QIC_RESCHEDULE_CPI);
        smp_reschedule_interrupt();
 }
 
-fastcall void smp_qic_enable_irq_interrupt(struct pt_regs *regs)
+void smp_qic_enable_irq_interrupt(struct pt_regs *regs)
 {
        ack_QIC_CPI(QIC_ENABLE_IRQ_CPI);
        smp_enable_irq_interrupt();
 }
 
-fastcall void smp_qic_call_function_interrupt(struct pt_regs *regs)
+void smp_qic_call_function_interrupt(struct pt_regs *regs)
 {
        ack_QIC_CPI(QIC_CALL_FUNCTION_CPI);
        smp_call_function_interrupt();
 }
 
-fastcall void smp_vic_cpi_interrupt(struct pt_regs *regs)
+void smp_vic_cpi_interrupt(struct pt_regs *regs)
 {
        struct pt_regs *old_regs = set_irq_regs(regs);
        __u8 cpu = smp_processor_id();
@@ -1156,7 +1153,7 @@ static void do_flush_tlb_all(void *info)
 
        __flush_tlb_all();
        if (per_cpu(cpu_tlbstate, cpu).state == TLBSTATE_LAZY)
-               leave_mm(cpu);
+               voyager_leave_mm(cpu);
 }
 
 /* flush the TLB of every active CPU in the system */
@@ -1334,7 +1331,7 @@ int setup_profiling_timer(unsigned int multiplier)
 /* This is a bit of a mess, but forced on us by the genirq changes
  * there's no genirq handler that really does what voyager wants
  * so hack it up with the simple IRQ handler */
-static void fastcall handle_vic_irq(unsigned int irq, struct irq_desc *desc)
+static void handle_vic_irq(unsigned int irq, struct irq_desc *desc)
 {
        before_handle_vic_irq(irq);
        handle_simple_irq(irq, desc);