| To: | Ralf Baechle <ralf@linux-mips.org> |
|---|---|
| Subject: | Re: [PATCH] Oprofile: Loongson: Fixup of loongson2_exit() |
| From: | Wu Zhangjin <wuzhangjin@gmail.com> |
| Date: | Tue, 25 May 2010 11:51:50 +0800 |
| Cc: | linux-mips@linux-mips.org |
| Dkim-signature: | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:from:reply-to:to:cc :in-reply-to:references:content-type:organization:date:message-id :mime-version:x-mailer:content-transfer-encoding; bh=wSIM3QeOYeuFC2nQcIUAdAl5PiVobB3hc+aks++eRxg=; b=CfCR8odzlJGwgZHGhP7GDfG0sVelgGUNqRe4Pu5jGxieRbxkbKwOegS//B6xp6ZCSn UmZNsihg0E1AKozAXeXe6SyIlEJYjTP1CopHAOec7hUDRleRAOBHWsZK+W6bWoKwSK1q /JvbQ6uoCY+YerqgW63o7m+ndfGPMDojf9P3Q= |
| Domainkey-signature: | a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:reply-to:to:cc:in-reply-to:references:content-type :organization:date:message-id:mime-version:x-mailer :content-transfer-encoding; b=PQ5y4GH2XtMerZvzlASXgGfwk15fckhRfGJfyttuWej/CSB4GiBMC7+wgrWxSdB2vs fCZD5zOaDOw30wXLr89K0WgwuQvlXCroTy5fJE97b3u5b4pMn/DMCiH2ihO90m1+NbJ2 ZSLeNNvnQKVGIGIyQFekUeAfBVLn/2zaJYkK0= |
| In-reply-to: | <1273165429-29766-1-git-send-email-wuzhangjin@gmail.com> |
| Organization: | DSLab, Lanzhou University, China |
| Original-recipient: | rfc822;linux-mips@linux-mips.org |
| References: | <1273165429-29766-1-git-send-email-wuzhangjin@gmail.com> |
| Reply-to: | wuzhangjin@gmail.com |
| Sender: | linux-mips-bounce@linux-mips.org |
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);
> }
>
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: [PATCH 8/12] gdium uses different freq of mclk&m1xclk of sm501, yajin |
|---|---|
| Next by Date: | RE: Kernel unaligned access, Anoop P.A. |
| Previous by Thread: | [PATCH] Oprofile: Loongson: Fixup of loongson2_exit(), Wu Zhangjin |
| Next by Thread: | Re: [PATCH] Oprofile: Loongson: Fixup of loongson2_exit(), Ralf Baechle |
| Indexes: | [Date] [Thread] [Top] [All Lists] |