From: Rusty Russell <[email protected]>
Impact: use new cpumask API.
Convert misc driver functions to use struct cpumask.
To Do:
- Convert iucv_buffer_cpumask to cpumask_var_t.
Signed-off-by: Rusty Russell <[email protected]>
Signed-off-by: Mike Travis <[email protected]>
Acked-by: Dean Nelson <[email protected]>
Cc: Robert Richter <[email protected]>
Cc: [email protected]
Cc: Jeremy Fitzhardinge <[email protected]>
Cc: Chris Wright <[email protected]>
Cc: [email protected]
Cc: [email protected]
Cc: Ursula Braun <[email protected]>
Cc: [email protected]
Cc: [email protected]
---
drivers/base/cpu.c | 2 +-
drivers/misc/sgi-xp/xpc_main.c | 2 +-
drivers/oprofile/buffer_sync.c | 22 ++++++++++++++++++----
drivers/oprofile/buffer_sync.h | 4 ++++
drivers/oprofile/oprof.c | 9 ++++++++-
drivers/xen/manage.c | 2 +-
net/iucv/iucv.c | 28 ++++++++++++++++++----------
7 files changed, 51 insertions(+), 18 deletions(-)
--- linux-2.6-for-ingo.orig/drivers/base/cpu.c
+++ linux-2.6-for-ingo/drivers/base/cpu.c
@@ -107,7 +107,7 @@ static SYSDEV_ATTR(crash_notes, 0400, sh
/*
* Print cpu online, possible, present, and system maps
*/
-static ssize_t print_cpus_map(char *buf, cpumask_t *map)
+static ssize_t print_cpus_map(char *buf, const struct cpumask *map)
{
int n = cpulist_scnprintf(buf, PAGE_SIZE-2, map);
--- linux-2.6-for-ingo.orig/drivers/misc/sgi-xp/xpc_main.c
+++ linux-2.6-for-ingo/drivers/misc/sgi-xp/xpc_main.c
@@ -318,7 +318,7 @@ xpc_hb_checker(void *ignore)
/* this thread was marked active by xpc_hb_init() */
- set_cpus_allowed_ptr(current, &cpumask_of_cpu(XPC_HB_CHECK_CPU));
+ set_cpus_allowed_ptr(current, cpumask_of(XPC_HB_CHECK_CPU));
/* set our heartbeating to other partitions into motion */
xpc_hb_check_timeout = jiffies + (xpc_hb_check_interval * HZ);
--- linux-2.6-for-ingo.orig/drivers/oprofile/buffer_sync.c
+++ linux-2.6-for-ingo/drivers/oprofile/buffer_sync.c
@@ -37,7 +37,7 @@
static LIST_HEAD(dying_tasks);
static LIST_HEAD(dead_tasks);
-static cpumask_t marked_cpus = CPU_MASK_NONE;
+static cpumask_var_t marked_cpus;
static DEFINE_SPINLOCK(task_mortuary);
static void process_task_mortuary(void);
@@ -489,10 +489,10 @@ static void mark_done(int cpu)
{
int i;
- cpu_set(cpu, marked_cpus);
+ cpumask_set_cpu(cpu, marked_cpus);
for_each_online_cpu(i) {
- if (!cpu_isset(i, marked_cpus))
+ if (!cpumask_test_cpu(i, marked_cpus))
return;
}
@@ -501,7 +501,7 @@ static void mark_done(int cpu)
*/
process_task_mortuary();
- cpus_clear(marked_cpus);
+ cpumask_clear(marked_cpus);
}
@@ -595,6 +595,20 @@ void sync_buffer(int cpu)
mutex_unlock(&buffer_mutex);
}
+int __init buffer_sync_init(void)
+{
+ if (!alloc_cpumask_var(&marked_cpus, GFP_KERNEL))
+ return -ENOMEM;
+
+ cpumask_clear(marked_cpus);
+ return 0;
+}
+
+void __exit buffer_sync_cleanup(void)
+{
+ free_cpumask_var(marked_cpus);
+}
+
/* The function can be used to add a buffer worth of data directly to
* the kernel buffer. The buffer is assumed to be a circular buffer.
* Take the entries from index start and end at index end, wrapping
--- linux-2.6-for-ingo.orig/drivers/oprofile/buffer_sync.h
+++ linux-2.6-for-ingo/drivers/oprofile/buffer_sync.h
@@ -19,4 +19,8 @@ void sync_stop(void);
/* sync the given CPU's buffer */
void sync_buffer(int cpu);
+/* initialize/destroy the buffer system. */
+int buffer_sync_init(void);
+void buffer_sync_cleanup(void);
+
#endif /* OPROFILE_BUFFER_SYNC_H */
--- linux-2.6-for-ingo.orig/drivers/oprofile/oprof.c
+++ linux-2.6-for-ingo/drivers/oprofile/oprof.c
@@ -183,6 +183,10 @@ static int __init oprofile_init(void)
{
int err;
+ err = buffer_sync_init();
+ if (err)
+ return err;
+
err = oprofile_arch_init(&oprofile_ops);
if (err < 0 || timer) {
@@ -191,8 +195,10 @@ static int __init oprofile_init(void)
}
err = oprofilefs_register();
- if (err)
+ if (err) {
oprofile_arch_exit();
+ buffer_sync_cleanup();
+ }
return err;
}
@@ -202,6 +208,7 @@ static void __exit oprofile_exit(void)
{
oprofilefs_unregister();
oprofile_arch_exit();
+ buffer_sync_cleanup();
}
--- linux-2.6-for-ingo.orig/drivers/xen/manage.c
+++ linux-2.6-for-ingo/drivers/xen/manage.c
@@ -100,7 +100,7 @@ static void do_suspend(void)
/* XXX use normal device tree? */
xenbus_suspend();
- err = stop_machine(xen_suspend, &cancelled, &cpumask_of_cpu(0));
+ err = stop_machine(xen_suspend, &cancelled, cpumask_of(0));
if (err) {
printk(KERN_ERR "failed to start xen_suspend: %d\n", err);
goto out;
--- linux-2.6-for-ingo.orig/net/iucv/iucv.c
+++ linux-2.6-for-ingo/net/iucv/iucv.c
@@ -492,15 +492,14 @@ static void iucv_setmask_mp(void)
*
* Allow iucv interrupts on a single cpu.
*/
-static void iucv_setmask_up(void)
+static void iucv_setmask_up(struct cpumask *cpumask)
{
- cpumask_t cpumask;
int cpu;
/* Disable all cpu but the first in cpu_irq_cpumask. */
- cpumask = iucv_irq_cpumask;
- cpu_clear(first_cpu(iucv_irq_cpumask), cpumask);
- for_each_cpu_mask_nr(cpu, cpumask)
+ cpumask_copy(cpumask, iucv_irq_cpumask);
+ cpumask_clear_cpu(cpumask_first(iucv_irq_cpumask), cpumask);
+ for_each_cpu(cpu, cpumask)
smp_call_function_single(cpu, iucv_block_cpu, NULL, 1);
}
@@ -558,7 +557,7 @@ static void iucv_disable(void)
static int __cpuinit iucv_cpu_notify(struct notifier_block *self,
unsigned long action, void *hcpu)
{
- cpumask_t cpumask;
+ cpumask_var_t cpumask;
long cpu = (long) hcpu;
switch (action) {
@@ -593,15 +592,20 @@ static int __cpuinit iucv_cpu_notify(str
break;
case CPU_DOWN_PREPARE:
case CPU_DOWN_PREPARE_FROZEN:
- cpumask = iucv_buffer_cpumask;
- cpu_clear(cpu, cpumask);
- if (cpus_empty(cpumask))
+ if (!alloc_cpumask_var(&cpumask, GFP_KERNEL))
+ return NOTIFY_BAD;
+ cpumask_copy(cpumask, &iucv_buffer_cpumask);
+ cpumask_clear_cpu(cpu, cpumask);
+ if (cpumask_empty(cpumask)) {
/* Can't offline last IUCV enabled cpu. */
+ free_cpumask_var(cpumask);
return NOTIFY_BAD;
+ }
smp_call_function_single(cpu, iucv_retrieve_cpu, NULL, 1);
if (cpus_empty(iucv_irq_cpumask))
smp_call_function_single(first_cpu(iucv_buffer_cpumask),
iucv_allow_cpu, NULL, 1);
+ free_cpumask_var(cpumask);
break;
}
return NOTIFY_OK;
@@ -686,9 +690,12 @@ static void iucv_cleanup_queue(void)
int iucv_register(struct iucv_handler *handler, int smp)
{
int rc;
+ cpumask_var_t scratch;
if (!iucv_available)
return -ENOSYS;
+ if (!alloc_cpumask_var(&scratch, GFP_KERNEL))
+ return -ENOMEM;
mutex_lock(&iucv_register_mutex);
if (!smp)
iucv_nonsmp_handler++;
@@ -697,7 +704,7 @@ int iucv_register(struct iucv_handler *h
if (rc)
goto out_mutex;
} else if (!smp && iucv_nonsmp_handler == 1)
- iucv_setmask_up();
+ iucv_setmask_up(scratch);
INIT_LIST_HEAD(&handler->paths);
spin_lock_bh(&iucv_table_lock);
@@ -706,6 +713,7 @@ int iucv_register(struct iucv_handler *h
rc = 0;
out_mutex:
mutex_unlock(&iucv_register_mutex);
+ free_cpumask_var(scratch);
return rc;
}
EXPORT_SYMBOL(iucv_register);
--
On Thursday 08 January 2009 06:28:35 Mike Travis wrote:
> From: Rusty Russell <[email protected]>
>
> Impact: use new cpumask API.
>
> Convert misc driver functions to use struct cpumask.
...
> @@ -593,15 +592,20 @@ static int __cpuinit iucv_cpu_notify(str
> break;
> case CPU_DOWN_PREPARE:
> case CPU_DOWN_PREPARE_FROZEN:
> - cpumask = iucv_buffer_cpumask;
> - cpu_clear(cpu, cpumask);
> - if (cpus_empty(cpumask))
> + if (!alloc_cpumask_var(&cpumask, GFP_KERNEL))
> + return NOTIFY_BAD;
> + cpumask_copy(cpumask, &iucv_buffer_cpumask);
> + cpumask_clear_cpu(cpu, cpumask);
> + if (cpumask_empty(cpumask)) {
> /* Can't offline last IUCV enabled cpu. */
> + free_cpumask_var(cpumask);
> return NOTIFY_BAD;
> + }
> smp_call_function_single(cpu, iucv_retrieve_cpu, NULL, 1);
> if (cpus_empty(iucv_irq_cpumask))
> smp_call_function_single(first_cpu(iucv_buffer_cpumask),
> iucv_allow_cpu, NULL, 1);
> + free_cpumask_var(cpumask);
> break;
Minor nit: this can be done better, actually:
@@ -596,9 +594,7 @@ static int __cpuinit iucv_cpu_notify(str
case CPU_DOWN_PREPARE_FROZEN:
if (!iucv_path_table)
break;
- cpumask = iucv_buffer_cpumask;
- cpu_clear(cpu, cpumask);
- if (cpus_empty(cpumask))
+ if (cpumask_any_but(&iucv_buffer_cpumask, cpu) >= nr_cpu_ids)
/* Can't offline last IUCV enabled cpu. */
return NOTIFY_BAD;
smp_call_function_single(cpu, iucv_retrieve_cpu, NULL, 1);
Cheers,
Rusty.
+void __exit buffer_sync_cleanup(void)
+{
+ free_cpumask_var(marked_cpus);
+}
This breaks ia64 with CONFIG_OPROFILE=y
`buffer_sync_cleanup' referenced in section `.init.text' of
arch/ia64/oprofile/built-in.o: defined in discarded section
`.exit.text' of arch/ia64/oprofile/built-in.o
make: *** [.tmp_vmlinux1] Error 1
-Tony
Tony Luck wrote:
> +void __exit buffer_sync_cleanup(void)
> +{
> + free_cpumask_var(marked_cpus);
> +}
>
> This breaks ia64 with CONFIG_OPROFILE=y
>
> `buffer_sync_cleanup' referenced in section `.init.text' of
> arch/ia64/oprofile/built-in.o: defined in discarded section
> `.exit.text' of arch/ia64/oprofile/built-in.o
> make: *** [.tmp_vmlinux1] Error 1
>
> -Tony
Hi Tony,
Hmm, that is a tricky error. I'll see what can be done to
eliminate it.
Thanks!
Mike
Tony Luck wrote:
> +void __exit buffer_sync_cleanup(void)
> +{
> + free_cpumask_var(marked_cpus);
> +}
>
> This breaks ia64 with CONFIG_OPROFILE=y
>
> `buffer_sync_cleanup' referenced in section `.init.text' of
> arch/ia64/oprofile/built-in.o: defined in discarded section
> `.exit.text' of arch/ia64/oprofile/built-in.o
> make: *** [.tmp_vmlinux1] Error 1
>
> -Tony
Hi,
It's a bit hackish but I couldn't think of another workaround.
And curiously, it doesn't affect x86?
Also, CPUMASK_OFFSTACK=n for ia64 so this is really a nop.
(I haven't been able to turn it on for ia64.)
Thanks,
Mike
---
Subject: ia64: fix build error when OPROFILE enabled.
Impact: Fix build error.
Add a buffer_sync_cleanup_init() which duplicates the
buffer_sync_cleanup() function but is placed in the
.init.text section. This eliminates this build error:
`buffer_sync_cleanup' referenced in section `.init.text' of
arch/ia64/oprofile/built-in.o: defined in discarded section
`.exit.text' of arch/ia64/oprofile/built-in.o
Signed-off-by: Mike Travis <[email protected]>
Cc: Tony Luck <[email protected]>
Cc: Robert Richter <[email protected]>
Cc: <[email protected]>
---
drivers/oprofile/buffer_sync.c | 6 ++++++
drivers/oprofile/buffer_sync.h | 1 +
drivers/oprofile/oprof.c | 2 +-
3 files changed, 8 insertions(+), 1 deletion(-)
--- linux-2.6-for-ingo.orig/drivers/oprofile/buffer_sync.c
+++ linux-2.6-for-ingo/drivers/oprofile/buffer_sync.c
@@ -579,6 +579,12 @@ void __exit buffer_sync_cleanup(void)
free_cpumask_var(marked_cpus);
}
+/* same as above but in the __init section */
+void __init buffer_sync_cleanup_init(void)
+{
+ free_cpumask_var(marked_cpus);
+}
+
/* The function can be used to add a buffer worth of data directly to
* the kernel buffer. The buffer is assumed to be a circular buffer.
* Take the entries from index start and end at index end, wrapping
--- linux-2.6-for-ingo.orig/drivers/oprofile/buffer_sync.h
+++ linux-2.6-for-ingo/drivers/oprofile/buffer_sync.h
@@ -22,5 +22,6 @@ void sync_buffer(int cpu);
/* initialize/destroy the buffer system. */
int buffer_sync_init(void);
void buffer_sync_cleanup(void);
+void buffer_sync_cleanup_init(void);
#endif /* OPROFILE_BUFFER_SYNC_H */
--- linux-2.6-for-ingo.orig/drivers/oprofile/oprof.c
+++ linux-2.6-for-ingo/drivers/oprofile/oprof.c
@@ -197,7 +197,7 @@ static int __init oprofile_init(void)
err = oprofilefs_register();
if (err) {
oprofile_arch_exit();
- buffer_sync_cleanup();
+ buffer_sync_cleanup_init();
}
return err;
On 07.01.09 11:58:35, Mike Travis wrote:
> From: Rusty Russell <[email protected]>
>
> Impact: use new cpumask API.
>
> Convert misc driver functions to use struct cpumask.
>
> To Do:
> - Convert iucv_buffer_cpumask to cpumask_var_t.
>
> Signed-off-by: Rusty Russell <[email protected]>
> Signed-off-by: Mike Travis <[email protected]>
> Acked-by: Dean Nelson <[email protected]>
> Cc: Robert Richter <[email protected]>
> Cc: [email protected]
> Cc: Jeremy Fitzhardinge <[email protected]>
> Cc: Chris Wright <[email protected]>
> Cc: [email protected]
> Cc: [email protected]
> Cc: Ursula Braun <[email protected]>
> Cc: [email protected]
> Cc: [email protected]
> ---
> drivers/base/cpu.c | 2 +-
> drivers/misc/sgi-xp/xpc_main.c | 2 +-
> drivers/oprofile/buffer_sync.c | 22 ++++++++++++++++++----
> drivers/oprofile/buffer_sync.h | 4 ++++
> drivers/oprofile/oprof.c | 9 ++++++++-
Acked-by: Robert Richter <[email protected]>
I will send out a delta patch that changes the initialization.
-Robert
> drivers/xen/manage.c | 2 +-
> net/iucv/iucv.c | 28 ++++++++++++++++++----------
> 7 files changed, 51 insertions(+), 18 deletions(-)
--
Advanced Micro Devices, Inc.
Operating System Research Center
email: [email protected]
Delta patch to f7df8ed164996cd2c6aca9674388be6ef78d8b37 for
tip/cpus4096.
Moved initialization to sync_start()/sync_stop(). No changes needed in
buffer_sync.h and oprof.c anymore.
Cc: Rusty Russell <[email protected]>
Cc: Mike Travis <[email protected]>
Signed-off-by: Robert Richter <[email protected]>
---
drivers/oprofile/buffer_sync.c | 20 ++++++--------------
drivers/oprofile/buffer_sync.h | 4 ----
drivers/oprofile/oprof.c | 9 +--------
3 files changed, 7 insertions(+), 26 deletions(-)
diff --git a/drivers/oprofile/buffer_sync.c b/drivers/oprofile/buffer_sync.c
index c3ea5fa..8574622 100644
--- a/drivers/oprofile/buffer_sync.c
+++ b/drivers/oprofile/buffer_sync.c
@@ -154,6 +154,10 @@ int sync_start(void)
{
int err;
+ if (!alloc_cpumask_var(&marked_cpus, GFP_KERNEL))
+ return -ENOMEM;
+ cpumask_clear(marked_cpus);
+
start_cpu_work();
err = task_handoff_register(&task_free_nb);
@@ -179,6 +183,7 @@ out2:
task_handoff_unregister(&task_free_nb);
out1:
end_sync();
+ free_cpumask_var(marked_cpus);
goto out;
}
@@ -190,6 +195,7 @@ void sync_stop(void)
profile_event_unregister(PROFILE_TASK_EXIT, &task_exit_nb);
task_handoff_unregister(&task_free_nb);
end_sync();
+ free_cpumask_var(marked_cpus);
}
@@ -565,20 +571,6 @@ void sync_buffer(int cpu)
mutex_unlock(&buffer_mutex);
}
-int __init buffer_sync_init(void)
-{
- if (!alloc_cpumask_var(&marked_cpus, GFP_KERNEL))
- return -ENOMEM;
-
- cpumask_clear(marked_cpus);
- return 0;
-}
-
-void __exit buffer_sync_cleanup(void)
-{
- free_cpumask_var(marked_cpus);
-}
-
/* The function can be used to add a buffer worth of data directly to
* the kernel buffer. The buffer is assumed to be a circular buffer.
* Take the entries from index start and end at index end, wrapping
diff --git a/drivers/oprofile/buffer_sync.h b/drivers/oprofile/buffer_sync.h
index 0ebf5db..3110732 100644
--- a/drivers/oprofile/buffer_sync.h
+++ b/drivers/oprofile/buffer_sync.h
@@ -19,8 +19,4 @@ void sync_stop(void);
/* sync the given CPU's buffer */
void sync_buffer(int cpu);
-/* initialize/destroy the buffer system. */
-int buffer_sync_init(void);
-void buffer_sync_cleanup(void);
-
#endif /* OPROFILE_BUFFER_SYNC_H */
diff --git a/drivers/oprofile/oprof.c b/drivers/oprofile/oprof.c
index ced39f6..3cffce9 100644
--- a/drivers/oprofile/oprof.c
+++ b/drivers/oprofile/oprof.c
@@ -183,10 +183,6 @@ static int __init oprofile_init(void)
{
int err;
- err = buffer_sync_init();
- if (err)
- return err;
-
err = oprofile_arch_init(&oprofile_ops);
if (err < 0 || timer) {
@@ -195,10 +191,8 @@ static int __init oprofile_init(void)
}
err = oprofilefs_register();
- if (err) {
+ if (err)
oprofile_arch_exit();
- buffer_sync_cleanup();
- }
return err;
}
@@ -208,7 +202,6 @@ static void __exit oprofile_exit(void)
{
oprofilefs_unregister();
oprofile_arch_exit();
- buffer_sync_cleanup();
}
--
1.6.1
* Robert Richter <[email protected]> wrote:
> Delta patch to f7df8ed164996cd2c6aca9674388be6ef78d8b37 for
> tip/cpus4096.
>
> Moved initialization to sync_start()/sync_stop(). No changes needed in
> buffer_sync.h and oprof.c anymore.
>
> Cc: Rusty Russell <[email protected]>
> Cc: Mike Travis <[email protected]>
> Signed-off-by: Robert Richter <[email protected]>
> ---
> drivers/oprofile/buffer_sync.c | 20 ++++++--------------
> drivers/oprofile/buffer_sync.h | 4 ----
> drivers/oprofile/oprof.c | 9 +--------
> 3 files changed, 7 insertions(+), 26 deletions(-)
applied to tip/cpus4096, thanks Robert!
Ingo
Robert Richter wrote:
> Delta patch to f7df8ed164996cd2c6aca9674388be6ef78d8b37 for
> tip/cpus4096.
>
> Moved initialization to sync_start()/sync_stop(). No changes needed in
> buffer_sync.h and oprof.c anymore.
Great, thanks Robert!
Are you pushing this via some upstream queue so I can drop it from mine?
Thanks,
Mike
>
> Cc: Rusty Russell <[email protected]>
> Cc: Mike Travis <[email protected]>
> Signed-off-by: Robert Richter <[email protected]>
> ---
> drivers/oprofile/buffer_sync.c | 20 ++++++--------------
> drivers/oprofile/buffer_sync.h | 4 ----
> drivers/oprofile/oprof.c | 9 +--------
> 3 files changed, 7 insertions(+), 26 deletions(-)
>
> diff --git a/drivers/oprofile/buffer_sync.c b/drivers/oprofile/buffer_sync.c
> index c3ea5fa..8574622 100644
> --- a/drivers/oprofile/buffer_sync.c
> +++ b/drivers/oprofile/buffer_sync.c
> @@ -154,6 +154,10 @@ int sync_start(void)
> {
> int err;
>
> + if (!alloc_cpumask_var(&marked_cpus, GFP_KERNEL))
> + return -ENOMEM;
> + cpumask_clear(marked_cpus);
> +
> start_cpu_work();
>
> err = task_handoff_register(&task_free_nb);
> @@ -179,6 +183,7 @@ out2:
> task_handoff_unregister(&task_free_nb);
> out1:
> end_sync();
> + free_cpumask_var(marked_cpus);
> goto out;
> }
>
> @@ -190,6 +195,7 @@ void sync_stop(void)
> profile_event_unregister(PROFILE_TASK_EXIT, &task_exit_nb);
> task_handoff_unregister(&task_free_nb);
> end_sync();
> + free_cpumask_var(marked_cpus);
> }
>
>
> @@ -565,20 +571,6 @@ void sync_buffer(int cpu)
> mutex_unlock(&buffer_mutex);
> }
>
> -int __init buffer_sync_init(void)
> -{
> - if (!alloc_cpumask_var(&marked_cpus, GFP_KERNEL))
> - return -ENOMEM;
> -
> - cpumask_clear(marked_cpus);
> - return 0;
> -}
> -
> -void __exit buffer_sync_cleanup(void)
> -{
> - free_cpumask_var(marked_cpus);
> -}
> -
> /* The function can be used to add a buffer worth of data directly to
> * the kernel buffer. The buffer is assumed to be a circular buffer.
> * Take the entries from index start and end at index end, wrapping
> diff --git a/drivers/oprofile/buffer_sync.h b/drivers/oprofile/buffer_sync.h
> index 0ebf5db..3110732 100644
> --- a/drivers/oprofile/buffer_sync.h
> +++ b/drivers/oprofile/buffer_sync.h
> @@ -19,8 +19,4 @@ void sync_stop(void);
> /* sync the given CPU's buffer */
> void sync_buffer(int cpu);
>
> -/* initialize/destroy the buffer system. */
> -int buffer_sync_init(void);
> -void buffer_sync_cleanup(void);
> -
> #endif /* OPROFILE_BUFFER_SYNC_H */
> diff --git a/drivers/oprofile/oprof.c b/drivers/oprofile/oprof.c
> index ced39f6..3cffce9 100644
> --- a/drivers/oprofile/oprof.c
> +++ b/drivers/oprofile/oprof.c
> @@ -183,10 +183,6 @@ static int __init oprofile_init(void)
> {
> int err;
>
> - err = buffer_sync_init();
> - if (err)
> - return err;
> -
> err = oprofile_arch_init(&oprofile_ops);
>
> if (err < 0 || timer) {
> @@ -195,10 +191,8 @@ static int __init oprofile_init(void)
> }
>
> err = oprofilefs_register();
> - if (err) {
> + if (err)
> oprofile_arch_exit();
> - buffer_sync_cleanup();
> - }
>
> return err;
> }
> @@ -208,7 +202,6 @@ static void __exit oprofile_exit(void)
> {
> oprofilefs_unregister();
> oprofile_arch_exit();
> - buffer_sync_cleanup();
> }
>
>
Ingo Molnar wrote:
> * Robert Richter <[email protected]> wrote:
>
>> Delta patch to f7df8ed164996cd2c6aca9674388be6ef78d8b37 for
>> tip/cpus4096.
>>
>> Moved initialization to sync_start()/sync_stop(). No changes needed in
>> buffer_sync.h and oprof.c anymore.
>>
>> Cc: Rusty Russell <[email protected]>
>> Cc: Mike Travis <[email protected]>
>> Signed-off-by: Robert Richter <[email protected]>
>> ---
>> drivers/oprofile/buffer_sync.c | 20 ++++++--------------
>> drivers/oprofile/buffer_sync.h | 4 ----
>> drivers/oprofile/oprof.c | 9 +--------
>> 3 files changed, 7 insertions(+), 26 deletions(-)
>
> applied to tip/cpus4096, thanks Robert!
>
> Ingo
Hi Ingo,
Doesn't this need to be pushed upstream as the error was
discovered in linux-next on ia64?
Thanks,
Mike
* Mike Travis <[email protected]> wrote:
> Ingo Molnar wrote:
> > * Robert Richter <[email protected]> wrote:
> >
> >> Delta patch to f7df8ed164996cd2c6aca9674388be6ef78d8b37 for
> >> tip/cpus4096.
> >>
> >> Moved initialization to sync_start()/sync_stop(). No changes needed in
> >> buffer_sync.h and oprof.c anymore.
> >>
> >> Cc: Rusty Russell <[email protected]>
> >> Cc: Mike Travis <[email protected]>
> >> Signed-off-by: Robert Richter <[email protected]>
> >> ---
> >> drivers/oprofile/buffer_sync.c | 20 ++++++--------------
> >> drivers/oprofile/buffer_sync.h | 4 ----
> >> drivers/oprofile/oprof.c | 9 +--------
> >> 3 files changed, 7 insertions(+), 26 deletions(-)
> >
> > applied to tip/cpus4096, thanks Robert!
> >
> > Ingo
>
> Hi Ingo,
>
> Doesn't this need to be pushed upstream as the error was discovered in
> linux-next on ia64?
no, upstream -git does not have these changes yet, they came into
linux-next via tip:cpus4096.
Ingo
Ingo Molnar wrote:
> * Robert Richter <[email protected]> wrote:
>
>> Delta patch to f7df8ed164996cd2c6aca9674388be6ef78d8b37 for
>> tip/cpus4096.
>>
>> Moved initialization to sync_start()/sync_stop(). No changes needed in
>> buffer_sync.h and oprof.c anymore.
>>
>> Cc: Rusty Russell <[email protected]>
>> Cc: Mike Travis <[email protected]>
>> Signed-off-by: Robert Richter <[email protected]>
>> ---
>> drivers/oprofile/buffer_sync.c | 20 ++++++--------------
>> drivers/oprofile/buffer_sync.h | 4 ----
>> drivers/oprofile/oprof.c | 9 +--------
>> 3 files changed, 7 insertions(+), 26 deletions(-)
>
> applied to tip/cpus4096, thanks Robert!
>
> Ingo
Built and tested on an Altix 4700.
Cheers,
Mike
On 22.01.09 08:56:51, Mike Travis wrote:
> Robert Richter wrote:
> > Delta patch to f7df8ed164996cd2c6aca9674388be6ef78d8b37 for
> > tip/cpus4096.
> >
> > Moved initialization to sync_start()/sync_stop(). No changes needed in
> > buffer_sync.h and oprof.c anymore.
>
> Great, thanks Robert!
>
> Are you pushing this via some upstream queue so I can drop it from mine?
Mike, it is in the tip tree commit id 4c50d9e (tip/cpus4096).
-Robert
--
Advanced Micro Devices, Inc.
Operating System Research Center
email: [email protected]