Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 32222
b: refs/heads/master
c: f86bf9b
h: refs/heads/master
v: v3
  • Loading branch information
Ingo Molnar authored and Linus Torvalds committed Jul 10, 2006
1 parent 50ac5ab commit a0cc442
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 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: d6d897cec29252b8d0785198cfa6ca16d30c739d
refs/heads/master: f86bf9b7bcc5d325687a8b80da8ee3eb56e02da7
4 changes: 1 addition & 3 deletions trunk/arch/x86_64/kernel/smpboot.c
Original file line number Diff line number Diff line change
Expand Up @@ -771,12 +771,10 @@ static int __cpuinit do_boot_cpu(int cpu, int apicid)
unsigned long start_rip;
struct create_idle c_idle = {
.cpu = cpu,
.done = COMPLETION_INITIALIZER(c_idle.done),
.done = COMPLETION_INITIALIZER_ONSTACK(c_idle.done),
};
DECLARE_WORK(work, do_fork_idle, &c_idle);

lockdep_set_class(&c_idle.done.wait.lock, &waitqueue_lock_key);

/* allocate memory for gdts of secondary cpus. Hotplug is considered */
if (!cpu_gdt_descr[cpu].address &&
!(cpu_gdt_descr[cpu].address = get_zeroed_page(GFP_KERNEL))) {
Expand Down
5 changes: 4 additions & 1 deletion trunk/include/linux/completion.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ struct completion {
#define COMPLETION_INITIALIZER(work) \
{ 0, __WAIT_QUEUE_HEAD_INITIALIZER((work).wait) }

#define COMPLETION_INITIALIZER_ONSTACK(work) \
({ init_completion(&work); work; })

#define DECLARE_COMPLETION(work) \
struct completion work = COMPLETION_INITIALIZER(work)

Expand All @@ -28,7 +31,7 @@ struct completion {
*/
#ifdef CONFIG_LOCKDEP
# define DECLARE_COMPLETION_ONSTACK(work) \
struct completion work = ({ init_completion(&work); work; })
struct completion work = COMPLETION_INITIALIZER_ONSTACK(work)
#else
# define DECLARE_COMPLETION_ONSTACK(work) DECLARE_COMPLETION(work)
#endif
Expand Down

0 comments on commit a0cc442

Please sign in to comment.