Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 302773
b: refs/heads/master
c: 38498a6
h: refs/heads/master
i:
  302771: 8b76f7b
v: v3
  • Loading branch information
Thomas Gleixner committed Apr 26, 2012
1 parent 46eeb19 commit c59f35f
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8239c25f47d2b318156993b15f33900a86ea5e17
refs/heads/master: 38498a67aa2cf8c80754b8d304bfacc10bc582b5
1 change: 1 addition & 0 deletions trunk/kernel/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ obj-$(CONFIG_DEBUG_RT_MUTEXES) += rtmutex-debug.o
obj-$(CONFIG_RT_MUTEX_TESTER) += rtmutex-tester.o
obj-$(CONFIG_GENERIC_ISA_DMA) += dma.o
obj-$(CONFIG_SMP) += smp.o
obj-$(CONFIG_SMP) += smpboot.o
ifneq ($(CONFIG_SMP),y)
obj-y += up.o
endif
Expand Down
8 changes: 8 additions & 0 deletions trunk/kernel/cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
#include <linux/gfp.h>
#include <linux/suspend.h>

#include "smpboot.h"

#ifdef CONFIG_SMP
/* Serializes the updates to cpu_online_mask, cpu_present_mask */
static DEFINE_MUTEX(cpu_add_remove_lock);
Expand Down Expand Up @@ -300,6 +302,11 @@ static int __cpuinit _cpu_up(unsigned int cpu, int tasks_frozen)
return -EINVAL;

cpu_hotplug_begin();

ret = smpboot_prepare(cpu);
if (ret)
goto out;

ret = __cpu_notify(CPU_UP_PREPARE | mod, hcpu, -1, &nr_calls);
if (ret) {
nr_calls--;
Expand All @@ -320,6 +327,7 @@ static int __cpuinit _cpu_up(unsigned int cpu, int tasks_frozen)
out_notify:
if (ret != 0)
__cpu_notify(CPU_UP_CANCELED | mod, hcpu, nr_calls, NULL);
out:
cpu_hotplug_done();

return ret;
Expand Down
14 changes: 14 additions & 0 deletions trunk/kernel/smpboot.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/*
* Common SMP CPU bringup/teardown functions
*/
#include <linux/init.h>

#include "smpboot.h"

/**
* smpboot_prepare - generic smpboot preparation
*/
int __cpuinit smpboot_prepare(unsigned int cpu)
{
return 0;
}
6 changes: 6 additions & 0 deletions trunk/kernel/smpboot.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#ifndef SMPBOOT_H
#define SMPBOOT_H

int smpboot_prepare(unsigned int cpu);

#endif

0 comments on commit c59f35f

Please sign in to comment.