~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise

« back to all changes in this revision

Viewing changes to arch/powerpc/platforms/85xx/smp.c

  • Committer: Bazaar Package Importer
  • Author(s): Paolo Pisati
  • Date: 2011-06-29 15:23:51 UTC
  • mfrom: (26.1.1 natty-proposed)
  • Revision ID: james.westby@ubuntu.com-20110629152351-xs96tm303d95rpbk
Tags: 3.0.0-1200.2
* Rebased against 3.0.0-6.7
* BSP from TI based on 3.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
41
41
#define NUM_BOOT_ENTRY          8
42
42
#define SIZE_BOOT_ENTRY         (NUM_BOOT_ENTRY * sizeof(u32))
43
43
 
44
 
static void __init
 
44
static int __init
45
45
smp_85xx_kick_cpu(int nr)
46
46
{
47
47
        unsigned long flags;
60
60
 
61
61
        if (cpu_rel_addr == NULL) {
62
62
                printk(KERN_ERR "No cpu-release-addr for cpu %d\n", nr);
63
 
                return;
 
63
                return -ENOENT;
64
64
        }
65
65
 
66
66
        /*
91
91
        while ((__secondary_hold_acknowledge != nr) && (++n < 1000))
92
92
                mdelay(1);
93
93
#else
 
94
        smp_generic_kick_cpu(nr);
 
95
 
94
96
        out_be64((u64 *)(bptr_vaddr + BOOT_ENTRY_ADDR_UPPER),
95
97
                __pa((u64)*((unsigned long long *) generic_secondary_smp_init)));
96
98
 
97
 
        smp_generic_kick_cpu(nr);
 
99
        if (!ioremappable)
 
100
                flush_dcache_range((ulong)bptr_vaddr,
 
101
                                (ulong)(bptr_vaddr + SIZE_BOOT_ENTRY));
98
102
#endif
99
103
 
100
104
        local_irq_restore(flags);
103
107
                iounmap(bptr_vaddr);
104
108
 
105
109
        pr_debug("waited %d msecs for CPU #%d.\n", n, nr);
 
110
 
 
111
        return 0;
106
112
}
107
113
 
108
114
static void __init
229
235
                smp_85xx_ops.message_pass = smp_mpic_message_pass;
230
236
        }
231
237
 
232
 
        if (cpu_has_feature(CPU_FTR_DBELL))
233
 
                smp_85xx_ops.message_pass = doorbell_message_pass;
 
238
        if (cpu_has_feature(CPU_FTR_DBELL)) {
 
239
                smp_85xx_ops.message_pass = smp_muxed_ipi_message_pass;
 
240
                smp_85xx_ops.cause_ipi = doorbell_cause_ipi;
 
241
        }
234
242
 
235
243
        BUG_ON(!smp_85xx_ops.message_pass);
236
244