Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 3235
b: refs/heads/master
c: 52a119f
h: refs/heads/master
i:
  3233: 1ea196b
  3231: 3bddc4c
v: v3
  • Loading branch information
Ashok Raj authored and Linus Torvalds committed Jun 25, 2005
1 parent 734f2e5 commit 26dd549
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e1367daf3eed5cd619ee88c9907e1e6ddaa58406
refs/heads/master: 52a119feaad92d44a0e97d01b22afbcbaf3fc079
9 changes: 5 additions & 4 deletions trunk/drivers/base/cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@ struct sysdev_class cpu_sysdev_class = {
EXPORT_SYMBOL(cpu_sysdev_class);

#ifdef CONFIG_HOTPLUG_CPU
#ifndef __HAVE_ARCH_SMP_PREPARE_CPU
#define smp_prepare_cpu(cpu) (0)
#endif
int __attribute__((weak)) smp_prepare_cpu (int cpu)
{
return 0;
}

static ssize_t show_online(struct sys_device *dev, char *buf)
{
Expand All @@ -41,7 +42,7 @@ static ssize_t store_online(struct sys_device *dev, const char *buf,
break;
case '1':
ret = smp_prepare_cpu(cpu->sysdev.id);
if (ret == 0)
if (!ret)
ret = cpu_up(cpu->sysdev.id);
break;
default:
Expand Down
3 changes: 0 additions & 3 deletions trunk/include/asm-i386/smp.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,6 @@ extern u8 x86_cpu_to_apicid[];
#ifdef CONFIG_HOTPLUG_CPU
extern void cpu_exit_clear(void);
extern void cpu_uninit(void);

#define __HAVE_ARCH_SMP_PREPARE_CPU
extern int smp_prepare_cpu(int cpu);
#endif

/*
Expand Down
1 change: 1 addition & 0 deletions trunk/include/linux/cpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ extern struct semaphore cpucontrol;
register_cpu_notifier(&fn##_nb); \
}
int cpu_down(unsigned int cpu);
extern int __attribute__((weak)) smp_prepare_cpu(int cpu);
#define cpu_is_offline(cpu) unlikely(!cpu_online(cpu))
#else
#define lock_cpu_hotplug() do { } while (0)
Expand Down

0 comments on commit 26dd549

Please sign in to comment.