From: Wu Zhangjin <wuzhangjin@gmail.com>
To: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org
Subject: Re: [PATCH] Oprofile: Loongson: Fixup of loongson2_exit()
Date: Tue, 25 May 2010 11:51:50 +0800 [thread overview]
Message-ID: <1274759510.10746.3.camel@localhost> (raw)
In-Reply-To: <1273165429-29766-1-git-send-email-wuzhangjin@gmail.com>
Hi, Ralf
Seems you have accepted this patch but forgot to apply it, could you
please apply it, thanks ;)
Best Regards,
Wu Zhangjin
On Fri, 2010-05-07 at 01:03 +0800, Wu Zhangjin wrote:
> When exiting from loongson2_exit(), we need to reset the counter
> register too, this patch adds a function reset_counters() to do it, by
> the way, this function will be shared by Perf.
>
> Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com>
> ---
> arch/mips/oprofile/op_model_loongson2.c | 8 +++++++-
> 1 files changed, 7 insertions(+), 1 deletions(-)
>
> diff --git a/arch/mips/oprofile/op_model_loongson2.c b/arch/mips/oprofile/op_model_loongson2.c
> index fa3bf66..01f91a3 100644
> --- a/arch/mips/oprofile/op_model_loongson2.c
> +++ b/arch/mips/oprofile/op_model_loongson2.c
> @@ -51,6 +51,12 @@ static char *oprofid = "LoongsonPerf";
> static irqreturn_t loongson2_perfcount_handler(int irq, void *dev_id);
> /* Compute all of the registers in preparation for enabling profiling. */
>
> +static void reset_counters(void *arg)
> +{
> + write_c0_perfctrl(0);
> + write_c0_perfcnt(0);
> +}
> +
> static void loongson2_reg_setup(struct op_counter_config *cfg)
> {
> unsigned int ctrl = 0;
> @@ -157,7 +163,7 @@ static int __init loongson2_init(void)
>
> static void loongson2_exit(void)
> {
> - write_c0_perfctrl(0);
> + reset_counters(NULL);
> free_irq(LOONGSON2_PERFCNT_IRQ, oprofid);
> }
>
next prev parent reply other threads:[~2010-05-25 3:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-06 17:03 [PATCH] Oprofile: Loongson: Fixup of loongson2_exit() Wu Zhangjin
2010-05-25 3:51 ` Wu Zhangjin [this message]
2010-05-27 16:37 ` Ralf Baechle
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=1274759510.10746.3.camel@localhost \
--to=wuzhangjin@gmail.com \
--cc=linux-mips@linux-mips.org \
--cc=ralf@linux-mips.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.