Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sshtylyov@mvista.com>
To: John Crispin <blogic@openwrt.org>
Cc: Ralf Baechle <ralf@linux-mips.org>,
	linux-mips@linux-mips.org, Felix Fietkau <nbd@openwrt.org>
Subject: Re: [PATCH RESEND 16/17] MIPS: make oprofile use cp0_perfcount_irq if it is set
Date: Thu, 12 Jan 2012 18:38:22 +0300	[thread overview]
Message-ID: <4F0EFE6E.3080503@mvista.com> (raw)
In-Reply-To: <1326314674-9899-16-git-send-email-blogic@openwrt.org>

Hello.

On 01/11/2012 11:44 PM, John Crispin wrote:

> The patch makes the oprofile code use the performance counters irq.

> This patch is written by Felix Fietkau.

> Signed-off-by: Felix Fietkau<nbd@openwrt.org>
> Signed-off-by: John Crispin<blogic@openwrt.org>

> @@ -374,6 +379,10 @@ static int __init mipsxx_init(void)
>   	save_perf_irq = perf_irq;
>   	perf_irq = mipsxx_perfcount_handler;
>
> +	if (cp0_perfcount_irq>= 0)

    BTW, I just noticed. IRQ0 is not a valid IRQ in Linux, request_irq() should 
fail when passed 0, so this and following check should be '> 0'.

> +		return request_irq(cp0_perfcount_irq, mipsxx_perfcount_int,
> +			IRQF_SHARED, "Perfcounter", save_perf_irq);
> +
>   	return 0;
>   }
>
> @@ -381,6 +390,9 @@ static void mipsxx_exit(void)
>   {
>   	int counters = op_model_mipsxx_ops.num_counters;
>
> +	if (cp0_perfcount_irq>= 0)
> +		free_irq(cp0_perfcount_irq, save_perf_irq);
> +
>   	counters = counters_per_cpu_to_total(counters);
>   	on_each_cpu(reset_counters, (void *)(long)counters, 1);
>

WBR, Sergei

  parent reply	other threads:[~2012-01-12 14:39 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-11 20:44 [PATCH RESEND 01/17] MIPS: lantiq: reorganize xway code John Crispin
2012-01-11 20:44 ` [PATCH RESEND 02/17] MIPS: lantiq: change ltq_request_gpio() call signature John Crispin
2012-01-17 14:19   ` Ralf Baechle
2012-01-11 20:44 ` [PATCH RESEND 03/17] MIPS: lantiq: make irq.c support the FALC-ON John Crispin
2012-01-17 14:19   ` Ralf Baechle
2012-01-11 20:44 ` [PATCH RESEND 04/17] MIPS: lantiq: add basic support for FALC-ON John Crispin
2012-01-11 20:44 ` [PATCH RESEND 05/17] MIPS: lantiq: add support for FALC-ON GPIOs John Crispin
2012-01-11 20:44 ` [PATCH RESEND 06/17] MIPS: lantiq: add support for the EASY98000 evaluation board John Crispin
2012-01-17 14:20   ` Ralf Baechle
2012-01-11 20:44 ` [PATCH RESEND 07/17] MIPS: lantiq: fix early printk John Crispin
2012-01-17 14:20   ` Ralf Baechle
2012-01-11 20:44 ` [PATCH RESEND 08/17] MIPS: lantiq: fix cmdline parsing John Crispin
2012-01-17 14:20   ` Ralf Baechle
2012-01-11 20:44 ` [PATCH RESEND 09/17] MIPS: lantiq: fix STP gpio groups John Crispin
2012-01-17 14:20   ` Ralf Baechle
2012-01-11 20:44 ` [PATCH RESEND 10/17] MIPS: lantiq: fix pull gpio up resistors usage John Crispin
2012-01-17 14:20   ` Ralf Baechle
2012-01-11 20:44 ` [PATCH RESEND 11/17] MIPS: lantiq: add default configs John Crispin
2012-01-17 14:20   ` Ralf Baechle
2012-01-11 20:44 ` [PATCH RESEND 12/17] MAINTAINERS: add entry for Lantiq related files John Crispin
2012-01-11 20:44 ` [PATCH RESEND 13/17] NET: MIPS: lantiq: make etop ethernet work on ase/ar9 John Crispin
2012-01-17 14:21   ` Ralf Baechle
2012-01-11 20:44 ` [PATCH RESEND 14/17] NET: MIPS: lantiq: non existing phy was not handled gracefully John Crispin
2012-01-11 20:44 ` [PATCH RESEND 15/17] NET: MIPS: lantiq: return value of request_irq " John Crispin
2012-01-12 11:33   ` Sergei Shtylyov
2012-01-11 20:44 ` [PATCH RESEND 16/17] MIPS: make oprofile use cp0_perfcount_irq if it is set John Crispin
2012-01-12 11:37   ` Sergei Shtylyov
2012-01-12 15:38   ` Sergei Shtylyov [this message]
2012-01-12 14:49     ` Guenter Roeck
2012-01-12 17:02     ` Ralf Baechle
2012-01-11 20:44 ` [PATCH RESEND 17/17] MIPS: lantiq: enable oprofile support on lantiq targets John Crispin
2012-01-17 14:22   ` Ralf Baechle
2012-01-13 12:38 ` [PATCH RESEND 01/17] MIPS: lantiq: reorganize xway code 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=4F0EFE6E.3080503@mvista.com \
    --to=sshtylyov@mvista.com \
    --cc=blogic@openwrt.org \
    --cc=linux-mips@linux-mips.org \
    --cc=nbd@openwrt.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox