X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=arch%2Falpha%2Fkernel%2Fsmp.c;h=ad176441be558bcf41d7dfd109913ef77a36fa7d;hb=6ae26fa468533c86aaa6936fd366142fcf01386f;hp=4dc273e537fdd38830deb0ede8a3b560827a8ab0;hpb=077e98945db7e54a9865b5f29a1f02f531eca414;p=linux-2.6 diff --git a/arch/alpha/kernel/smp.c b/arch/alpha/kernel/smp.c index 4dc273e537..ad176441be 100644 --- a/arch/alpha/kernel/smp.c +++ b/arch/alpha/kernel/smp.c @@ -16,9 +16,9 @@ #include #include #include +#include #include #include -#include #include #include #include @@ -52,6 +52,7 @@ /* A collection of per-processor data. */ struct cpuinfo_alpha cpu_data[NR_CPUS]; +EXPORT_SYMBOL(cpu_data); /* A collection of single bit ipi messages. */ static struct { @@ -65,7 +66,7 @@ enum ipi_message_type { }; /* Set to a secondary's cpuid when it comes online. */ -static int smp_secondary_alive __initdata = 0; +static int smp_secondary_alive __devinitdata = 0; /* Which cpus ids came online. */ cpumask_t cpu_online_map; @@ -74,6 +75,7 @@ EXPORT_SYMBOL(cpu_online_map); int smp_num_probed; /* Internal processor count */ int smp_num_cpus = 1; /* Number that came online. */ +EXPORT_SYMBOL(smp_num_cpus); extern void calibrate_delay(void); @@ -172,7 +174,7 @@ smp_callin(void) } /* Wait until hwrpb->txrdy is clear for cpu. Return -1 on timeout. */ -static int __init +static int __devinit wait_for_txrdy (unsigned long cpumask) { unsigned long timeout; @@ -357,7 +359,7 @@ secondary_cpu_start(int cpuid, struct task_struct *idle) /* * Bring one cpu online. */ -static int __init +static int __cpuinit smp_boot_one_cpu(int cpuid) { struct task_struct *idle; @@ -486,7 +488,7 @@ smp_prepare_boot_cpu(void) { } -int __devinit +int __cpuinit __cpu_up(unsigned int cpu) { smp_boot_one_cpu(cpu); @@ -515,12 +517,15 @@ smp_cpus_done(unsigned int max_cpus) void smp_percpu_timer_interrupt(struct pt_regs *regs) { + struct pt_regs *old_regs; int cpu = smp_processor_id(); unsigned long user = user_mode(regs); struct cpuinfo_alpha *data = &cpu_data[cpu]; + old_regs = set_irq_regs(regs); + /* Record kernel PC. */ - profile_tick(CPU_PROFILING, regs); + profile_tick(CPU_PROFILING); if (!--data->prof_counter) { /* We need to make like a normal interrupt -- otherwise @@ -534,9 +539,10 @@ smp_percpu_timer_interrupt(struct pt_regs *regs) irq_exit(); } + set_irq_regs(old_regs); } -int __init +int setup_profiling_timer(unsigned int multiplier) { return -EINVAL; @@ -786,6 +792,7 @@ smp_call_function_on_cpu (void (*func) (void *info), void *info, int retry, return 0; } +EXPORT_SYMBOL(smp_call_function_on_cpu); int smp_call_function (void (*func) (void *info), void *info, int retry, int wait) @@ -793,6 +800,7 @@ smp_call_function (void (*func) (void *info), void *info, int retry, int wait) return smp_call_function_on_cpu (func, info, retry, wait, cpu_online_map); } +EXPORT_SYMBOL(smp_call_function); static void ipi_imb(void *ignored) @@ -807,6 +815,7 @@ smp_imb(void) if (on_each_cpu(ipi_imb, NULL, 1, 1)) printk(KERN_CRIT "smp_imb: timed out\n"); } +EXPORT_SYMBOL(smp_imb); static void ipi_flush_tlb_all(void *ignored) @@ -862,6 +871,7 @@ flush_tlb_mm(struct mm_struct *mm) preempt_enable(); } +EXPORT_SYMBOL(flush_tlb_mm); struct flush_tlb_page_struct { struct vm_area_struct *vma; @@ -914,6 +924,7 @@ flush_tlb_page(struct vm_area_struct *vma, unsigned long addr) preempt_enable(); } +EXPORT_SYMBOL(flush_tlb_page); void flush_tlb_range(struct vm_area_struct *vma, unsigned long start, unsigned long end) @@ -921,6 +932,7 @@ flush_tlb_range(struct vm_area_struct *vma, unsigned long start, unsigned long e /* On the Alpha we always flush the whole user tlb. */ flush_tlb_mm(vma->vm_mm); } +EXPORT_SYMBOL(flush_tlb_range); static void ipi_flush_icache_page(void *x)