Merge branch 'x86/for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip...
[pandora-kernel.git] / arch / x86 / mach-voyager / voyager_smp.c
index 96f60c7..8dedd01 100644 (file)
@@ -59,11 +59,6 @@ __u32 voyager_quad_processors = 0;
  * activity count.  Finally exported by i386_ksyms.c */
 static int voyager_extended_cpus = 1;
 
-/* Have we found an SMP box - used by time.c to do the profiling
-   interrupt for timeslicing; do not set to 1 until the per CPU timer
-   interrupt is active */
-int smp_found_config = 0;
-
 /* Used for the invalidate map that's also checked in the spinlock */
 static volatile unsigned long smp_invalidate_needed;
 
@@ -113,7 +108,7 @@ static inline void send_QIC_CPI(__u32 cpuset, __u8 cpi)
        for_each_online_cpu(cpu) {
                if (cpuset & (1 << cpu)) {
 #ifdef VOYAGER_DEBUG
-                       if (!cpu_isset(cpu, cpu_online_map))
+                       if (!cpu_online(cpu))
                                VDEBUG(("CPU%d sending cpi %d to CPU%d not in "
                                        "cpu_online_map\n",
                                        hard_smp_processor_id(), cpi, cpu));
@@ -206,11 +201,6 @@ static struct irq_chip vic_chip = {
 /* used to count up as CPUs are brought on line (starts at 0) */
 static int cpucount = 0;
 
-/* steal a page from the bottom of memory for the trampoline and
- * squirrel its address away here.  This will be in kernel virtual
- * space */
-unsigned char *trampoline_base;
-
 /* The per cpu profile stuff - used in smp_local_timer_interrupt */
 static DEFINE_PER_CPU(int, prof_multiplier) = 1;
 static DEFINE_PER_CPU(int, prof_old_multiplier) = 1;
@@ -427,18 +417,6 @@ void __init smp_store_cpu_info(int id)
        identify_secondary_cpu(c);
 }
 
-/* set up the trampoline and return the physical address of the code */
-unsigned long __init setup_trampoline(void)
-{
-       /* these two are global symbols in trampoline.S */
-       extern const __u8 trampoline_end[];
-       extern const __u8 trampoline_data[];
-
-       memcpy(trampoline_base, trampoline_data,
-              trampoline_end - trampoline_data);
-       return virt_to_phys(trampoline_base);
-}
-
 /* Routine initially called when a non-boot CPU is brought online */
 static void __init start_secondary(void *unused)
 {
@@ -560,8 +538,8 @@ static void __init do_boot_cpu(__u8 cpu)
                hijack_source.idt.Offset, stack_start.sp));
 
        /* init lowmem identity mapping */
-       clone_pgd_range(swapper_pg_dir, swapper_pg_dir + USER_PGD_PTRS,
-                       min_t(unsigned long, KERNEL_PGD_PTRS, USER_PGD_PTRS));
+       clone_pgd_range(swapper_pg_dir, swapper_pg_dir + KERNEL_PGD_BOUNDARY,
+                       min_t(unsigned long, KERNEL_PGD_PTRS, KERNEL_PGD_BOUNDARY));
        flush_tlb_all();
 
        if (quad_boot) {
@@ -700,9 +678,9 @@ void __init smp_boot_cpus(void)
         * Code added from smpboot.c */
        {
                unsigned long bogosum = 0;
-               for (i = 0; i < NR_CPUS; i++)
-                       if (cpu_isset(i, cpu_online_map))
-                               bogosum += cpu_data(i).loops_per_jiffy;
+
+               for_each_online_cpu(i)
+                       bogosum += cpu_data(i).loops_per_jiffy;
                printk(KERN_INFO "Total of %d processors activated "
                       "(%lu.%02lu BogoMIPS).\n",
                       cpucount + 1, bogosum / (500000 / HZ),
@@ -1154,15 +1132,6 @@ void flush_tlb_all(void)
        on_each_cpu(do_flush_tlb_all, 0, 1, 1);
 }
 
-/* used to set up the trampoline for other CPUs when the memory manager
- * is sorted out */
-void __init smp_alloc_memory(void)
-{
-       trampoline_base = alloc_bootmem_low_pages(PAGE_SIZE);
-       if (__pa(trampoline_base) >= 0x93000)
-               BUG();
-}
-
 /* send a reschedule CPI to one CPU by physical CPU number*/
 static void voyager_smp_send_reschedule(int cpu)
 {
@@ -1855,7 +1824,7 @@ static int __cpuinit voyager_cpu_up(unsigned int cpu)
                return -EIO;
        /* Unleash the CPU! */
        cpu_set(cpu, smp_commenced_mask);
-       while (!cpu_isset(cpu, cpu_online_map))
+       while (!cpu_online(cpu))
                mb();
        return 0;
 }