X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=arch%2Falpha%2Fkernel%2Fsmp.c;h=d1ec4f51df1aae6c3678dc85d393edb2d33ee321;hb=a2f44b27303a5353859d77a3e96a1d3f33f56ab7;hp=185255416e8538c22384ae89491720834aa6fcc1;hpb=134734d875a0a48d994ef20b9905209b4b8b6f75;p=linux-2.6.git diff --git a/arch/alpha/kernel/smp.c b/arch/alpha/kernel/smp.c index 185255416..d1ec4f51d 100644 --- a/arch/alpha/kernel/smp.c +++ b/arch/alpha/kernel/smp.c @@ -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 { @@ -68,13 +69,13 @@ enum ipi_message_type { static int smp_secondary_alive __initdata = 0; /* Which cpus ids came online. */ -cpumask_t cpu_present_mask; cpumask_t cpu_online_map; 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); @@ -439,7 +440,7 @@ setup_smp(void) if ((cpu->flags & 0x1cc) == 0x1cc) { smp_num_probed++; /* Assume here that "whami" == index */ - cpu_set(i, cpu_present_mask); + cpu_set(i, cpu_present_map); cpu->pal_revision = boot_cpu_palrev; } @@ -450,11 +451,10 @@ setup_smp(void) } } else { smp_num_probed = 1; - cpu_set(boot_cpuid, cpu_present_mask); } - printk(KERN_INFO "SMP: %d CPUs probed -- cpu_present_mask = %lx\n", - smp_num_probed, cpu_possible_map.bits[0]); + printk(KERN_INFO "SMP: %d CPUs probed -- cpu_present_map = %lx\n", + smp_num_probed, cpu_present_map.bits[0]); } /* @@ -473,7 +473,7 @@ smp_prepare_cpus(unsigned int max_cpus) /* Nothing to do on a UP box, or when told not to. */ if (smp_num_probed == 1 || max_cpus == 0) { - cpu_present_mask = cpumask_of_cpu(boot_cpuid); + cpu_present_map = cpumask_of_cpu(boot_cpuid); printk(KERN_INFO "SMP mode deactivated.\n"); return; } @@ -486,10 +486,6 @@ smp_prepare_cpus(unsigned int max_cpus) void __devinit smp_prepare_boot_cpu(void) { - /* - * Mark the boot cpu (current cpu) as online - */ - cpu_set(smp_processor_id(), cpu_online_map); } int __devinit @@ -521,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 @@ -540,6 +539,7 @@ smp_percpu_timer_interrupt(struct pt_regs *regs) irq_exit(); } + set_irq_regs(old_regs); } int __init @@ -792,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) @@ -799,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) @@ -813,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) @@ -868,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; @@ -920,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) @@ -927,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)