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

« back to all changes in this revision

Viewing changes to kernel/cpu.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:
126
126
#else /* #if CONFIG_HOTPLUG_CPU */
127
127
static void cpu_hotplug_begin(void) {}
128
128
static void cpu_hotplug_done(void) {}
129
 
#endif  /* #esle #if CONFIG_HOTPLUG_CPU */
 
129
#endif  /* #else #if CONFIG_HOTPLUG_CPU */
130
130
 
131
131
/* Need to know about CPUs going up/down? */
132
132
int __ref register_cpu_notifier(struct notifier_block *nb)
160
160
{
161
161
        BUG_ON(cpu_notify(val, v));
162
162
}
163
 
 
164
163
EXPORT_SYMBOL(register_cpu_notifier);
165
164
 
166
165
void __ref unregister_cpu_notifier(struct notifier_block *nb)
205
204
                return err;
206
205
 
207
206
        cpu_notify(CPU_DYING | param->mod, param->hcpu);
208
 
 
209
207
        return 0;
210
208
}
211
209
 
227
225
                return -EINVAL;
228
226
 
229
227
        cpu_hotplug_begin();
 
228
 
230
229
        err = __cpu_notify(CPU_DOWN_PREPARE | mod, hcpu, -1, &nr_calls);
231
230
        if (err) {
232
231
                nr_calls--;
304
303
        ret = __cpu_notify(CPU_UP_PREPARE | mod, hcpu, -1, &nr_calls);
305
304
        if (ret) {
306
305
                nr_calls--;
307
 
                printk("%s: attempt to bring up CPU %u failed\n",
 
306
                printk(KERN_WARNING "%s: attempt to bring up CPU %u failed\n",
308
307
                                __func__, cpu);
309
308
                goto out_notify;
310
309
        }
450
449
        if (cpumask_empty(frozen_cpus))
451
450
                goto out;
452
451
 
453
 
        printk("Enabling non-boot CPUs ...\n");
 
452
        printk(KERN_INFO "Enabling non-boot CPUs ...\n");
454
453
 
455
454
        arch_enable_nonboot_cpus_begin();
456
455
 
457
456
        for_each_cpu(cpu, frozen_cpus) {
458
457
                error = _cpu_up(cpu, 1);
459
458
                if (!error) {
460
 
                        printk("CPU%d is up\n", cpu);
 
459
                        printk(KERN_INFO "CPU%d is up\n", cpu);
461
460
                        continue;
462
461
                }
463
462
                printk(KERN_WARNING "Error taking CPU%d up: %d\n", cpu, error);
509
508
 */
510
509
 
511
510
/* cpu_bit_bitmap[0] is empty - so we can back into it */
512
 
#define MASK_DECLARE_1(x)       [x+1][0] = 1UL << (x)
 
511
#define MASK_DECLARE_1(x)       [x+1][0] = (1UL << (x))
513
512
#define MASK_DECLARE_2(x)       MASK_DECLARE_1(x), MASK_DECLARE_1(x+1)
514
513
#define MASK_DECLARE_4(x)       MASK_DECLARE_2(x), MASK_DECLARE_2(x+2)
515
514
#define MASK_DECLARE_8(x)       MASK_DECLARE_4(x), MASK_DECLARE_4(x+4)