diff options
author | David Howells <dhowells@redhat.com> | 2006-11-22 09:57:56 -0500 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2006-11-22 09:57:56 -0500 |
commit | c4028958b6ecad064b1a6303a6a5906d4fe48d73 (patch) | |
tree | 1c4c89652c62a75da09f9b9442012007e4ac6250 /drivers/oprofile | |
parent | 65f27f38446e1976cc98fd3004b110fedcddd189 (diff) |
WorkStruct: make allyesconfig
Fix up for make allyesconfig.
Signed-Off-By: David Howells <dhowells@redhat.com>
Diffstat (limited to 'drivers/oprofile')
-rw-r--r-- | drivers/oprofile/cpu_buffer.c | 9 | ||||
-rw-r--r-- | drivers/oprofile/cpu_buffer.h | 2 |
2 files changed, 6 insertions, 5 deletions
diff --git a/drivers/oprofile/cpu_buffer.c b/drivers/oprofile/cpu_buffer.c index fc4bc9b94c74..a83c3db7d18f 100644 --- a/drivers/oprofile/cpu_buffer.c +++ b/drivers/oprofile/cpu_buffer.c | |||
@@ -29,7 +29,7 @@ | |||
29 | 29 | ||
30 | struct oprofile_cpu_buffer cpu_buffer[NR_CPUS] __cacheline_aligned; | 30 | struct oprofile_cpu_buffer cpu_buffer[NR_CPUS] __cacheline_aligned; |
31 | 31 | ||
32 | static void wq_sync_buffer(void *); | 32 | static void wq_sync_buffer(struct work_struct *work); |
33 | 33 | ||
34 | #define DEFAULT_TIMER_EXPIRE (HZ / 10) | 34 | #define DEFAULT_TIMER_EXPIRE (HZ / 10) |
35 | static int work_enabled; | 35 | static int work_enabled; |
@@ -65,7 +65,7 @@ int alloc_cpu_buffers(void) | |||
65 | b->sample_received = 0; | 65 | b->sample_received = 0; |
66 | b->sample_lost_overflow = 0; | 66 | b->sample_lost_overflow = 0; |
67 | b->cpu = i; | 67 | b->cpu = i; |
68 | INIT_WORK(&b->work, wq_sync_buffer, b); | 68 | INIT_DELAYED_WORK(&b->work, wq_sync_buffer); |
69 | } | 69 | } |
70 | return 0; | 70 | return 0; |
71 | 71 | ||
@@ -282,9 +282,10 @@ void oprofile_add_trace(unsigned long pc) | |||
282 | * By using schedule_delayed_work_on and then schedule_delayed_work | 282 | * By using schedule_delayed_work_on and then schedule_delayed_work |
283 | * we guarantee this will stay on the correct cpu | 283 | * we guarantee this will stay on the correct cpu |
284 | */ | 284 | */ |
285 | static void wq_sync_buffer(void * data) | 285 | static void wq_sync_buffer(struct work_struct *work) |
286 | { | 286 | { |
287 | struct oprofile_cpu_buffer * b = data; | 287 | struct oprofile_cpu_buffer * b = |
288 | container_of(work, struct oprofile_cpu_buffer, work.work); | ||
288 | if (b->cpu != smp_processor_id()) { | 289 | if (b->cpu != smp_processor_id()) { |
289 | printk("WQ on CPU%d, prefer CPU%d\n", | 290 | printk("WQ on CPU%d, prefer CPU%d\n", |
290 | smp_processor_id(), b->cpu); | 291 | smp_processor_id(), b->cpu); |
diff --git a/drivers/oprofile/cpu_buffer.h b/drivers/oprofile/cpu_buffer.h index 09abb80e0570..49900d9e3235 100644 --- a/drivers/oprofile/cpu_buffer.h +++ b/drivers/oprofile/cpu_buffer.h | |||
@@ -43,7 +43,7 @@ struct oprofile_cpu_buffer { | |||
43 | unsigned long sample_lost_overflow; | 43 | unsigned long sample_lost_overflow; |
44 | unsigned long backtrace_aborted; | 44 | unsigned long backtrace_aborted; |
45 | int cpu; | 45 | int cpu; |
46 | struct work_struct work; | 46 | struct delayed_work work; |
47 | } ____cacheline_aligned; | 47 | } ____cacheline_aligned; |
48 | 48 | ||
49 | extern struct oprofile_cpu_buffer cpu_buffer[]; | 49 | extern struct oprofile_cpu_buffer cpu_buffer[]; |