From: Mike Travis <travis@sgi.com>
To: Tony Luck <tony.luck@gmail.com>
Cc: Ingo Molnar <mingo@redhat.com>,
Rusty Russell <rusty@rustcorp.com.au>,
Thomas Gleixner <tglx@linutronix.de>,
"H. Peter Anvin" <hpa@zytor.com>, Jack Steiner <steiner@sgi.com>,
linux-kernel@vger.kernel.org, Dean Nelson <dcn@sgi.com>,
Robert Richter <robert.richter@amd.com>,
oprofile-list@lists.sf.net
Subject: Re: [PATCH 3/5] cpumask: convert misc driver functions
Date: Fri, 16 Jan 2009 14:02:18 -0800 [thread overview]
Message-ID: <497103EA.9020704@sgi.com> (raw)
In-Reply-To: <12c511ca0901161042x5aab46edy70d0d89c84792cd9@mail.gmail.com>
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 <travis@sgi.com>
Cc: Tony Luck <tony.luck@gmail.com>
Cc: Robert Richter <robert.richter@amd.com>
Cc: <oprofile-list@lists.sf.net>
---
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;
next prev parent reply other threads:[~2009-01-16 22:02 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-07 19:58 [PATCH 0/5] cpumask: more cpumask updates Mike Travis
2009-01-07 19:58 ` [PATCH 1/5] cpumask: update irq_desc to use cpumask_var_t Mike Travis
2009-01-07 20:27 ` Yinghai Lu
2009-01-07 22:32 ` Mike Travis
2009-01-08 3:15 ` Yinghai Lu
2009-01-08 15:45 ` Mike Travis
2009-01-08 19:31 ` Yinghai Lu
2009-01-08 18:40 ` [PATCH 1/5] cpumask: update irq_desc to use cpumask_var_t: fix Mike Travis
2009-01-07 19:58 ` [PATCH 2/5] cpumask: Use topology_core_cpumask()/topology_thread_cpumask() Mike Travis
2009-01-19 17:11 ` Ben Hutchings
2009-01-07 19:58 ` [PATCH 3/5] cpumask: convert misc driver functions Mike Travis
2009-01-10 10:57 ` Rusty Russell
2009-01-16 18:42 ` Tony Luck
2009-01-16 18:55 ` Mike Travis
2009-01-16 22:02 ` Mike Travis [this message]
2009-01-22 13:11 ` Robert Richter
2009-01-22 13:14 ` [PATCH] cpumask: modifiy oprofile initialization Robert Richter
2009-01-22 13:37 ` Ingo Molnar
2009-01-22 17:20 ` Mike Travis
2009-01-22 17:40 ` Ingo Molnar
2009-01-22 19:41 ` Mike Travis
2009-01-22 16:56 ` Mike Travis
2009-01-23 14:12 ` Robert Richter
2009-01-07 19:58 ` [PATCH 4/5] cpumask: convert drivers/net/sfc Mike Travis
2009-01-19 17:08 ` Ben Hutchings
[not found] ` <200901201209.34854.rusty@rustcorp.com.au>
2009-01-20 18:26 ` [PATCH 4/5] cpumask: convert drivers/net/sfc [PATCH supplied] Mike Travis
2009-01-26 15:04 ` [PATCH] sfc: modify allocation error message Mike Travis
2009-01-27 12:13 ` Ben Hutchings
2009-01-07 19:58 ` [PATCH 5/5] cpumask: convert other misc kernel functions Mike Travis
2009-01-07 20:52 ` [PATCH 0/5] cpumask: more cpumask updates Ingo Molnar
2009-01-07 21:20 ` Mike Travis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=497103EA.9020704@sgi.com \
--to=travis@sgi.com \
--cc=dcn@sgi.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=oprofile-list@lists.sf.net \
--cc=robert.richter@amd.com \
--cc=rusty@rustcorp.com.au \
--cc=steiner@sgi.com \
--cc=tglx@linutronix.de \
--cc=tony.luck@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome