From: Ingo Molnar <mingo@elte.hu>
To: Markus Metzger <markus.t.metzger@intel.com>
Cc: linux-kernel@vger.kernel.org, tglx@linutronix.de, hpa@zytor.com,
markus.t.metzger@gmail.com, roland@redhat.com,
eranian@googlemail.com
Subject: Re: [patch 1/3] x86, bts: clear bts bits on fork
Date: Tue, 16 Dec 2008 18:18:01 +0100 [thread overview]
Message-ID: <20081216171801.GA11683@elte.hu> (raw)
In-Reply-To: <20081216154842.A29980@sedona.ch.intel.com>
* Markus Metzger <markus.t.metzger@intel.com> wrote:
> -#ifdef CONFIG_X86_DS
> +#ifdef CONFIG_X86_PTRACE_BTS
> /* Free any BTS tracers that have not been properly released. */
> if (unlikely(current->bts)) {
> ds_release_bts(current->bts);
> @@ -258,7 +258,7 @@
> current->bts_buffer = NULL;
> current->bts_size = 0;
> }
> -#endif /* CONFIG_X86_DS */
Please eliminate the #ifdef from here by introducing a helper function -
possibly inlined.
> +#ifdef CONFIG_X86_DS
> + clear_tsk_thread_flag(p, TIF_DS_AREA_MSR);
> + p->thread.ds_ctx = NULL;
> +#endif
> +#ifdef CONFIG_X86_PTRACE_BTS
> + p->thread.bts_ovfl_signal = 0;
> +#endif
ditto.
> +#ifdef CONFIG_X86_PTRACE_BTS
> + p->bts = NULL;
> + p->bts_buffer = NULL;
> + p->bts_size = 0;
> +#endif
this one too please.
There's generally little reason to put #ifdefs into .c files.
Ingo
prev parent reply other threads:[~2008-12-16 17:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-16 14:48 Markus Metzger
2008-12-16 17:18 ` Ingo Molnar [this message]
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=20081216171801.GA11683@elte.hu \
--to=mingo@elte.hu \
--cc=eranian@googlemail.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=markus.t.metzger@gmail.com \
--cc=markus.t.metzger@intel.com \
--cc=roland@redhat.com \
--cc=tglx@linutronix.de \
/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
all inboxes | Powered by JetHome®