linux-mips
[Top] [All Lists]

Re: [PATCH v3 1/4] MIPS/Oprofile: extract PMU defines/helper functions f

To: Deng-Cheng Zhu <dengcheng.zhu@gmail.com>
Subject: Re: [PATCH v3 1/4] MIPS/Oprofile: extract PMU defines/helper functions for sharing
From: Wu Zhangjin <wuzhangjin@gmail.com>
Date: Fri, 07 May 2010 00:21:49 +0800
Cc: linux-mips@linux-mips.org, ralf@linux-mips.org, a.p.zijlstra@chello.nl, paulus@samba.org, mingo@elte.hu, acme@redhat.com, jamie.iles@picochip.com
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=dfGiwAWOqR0JTkj38atc6a/e0X28YbVhk1erfMtZcvc=; b=eK6Vhov3iCaupFMLFcEnvg1Mz2lrIGRI11QJ3/fDe4o/KnA1jzHYekq6eQeLKj34aD rLpsgL90GMcyMRY024gsrYu93OMI6zeUVBYqC9Rz6eq4YALFO1qx99WpAj10tJyjy1M/ TkRxtWqF09Lpb/S71J4FK/QQ25Q93LzN27P4U=
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=BFyoU7143AugJsH/mqlydLc9ZuXKItMhRd7fFPSjOn+QwDSW59iIb44hc5Jkv5D6as c2AkGbf5N1RpvsT9k3qK1FEGumPJ9fPIJvhSu/LER/T2JW7QG4pmKBw7B/IUCVw/eS1d W2xNzi76ONL5HogC2Lo3mGDw3Us0Fgl8p9HKc=
In-reply-to: <1273067734-4758-2-git-send-email-dengcheng.zhu@gmail.com>
Organization: DSLab, Lanzhou University, China
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <1273067734-4758-1-git-send-email-dengcheng.zhu@gmail.com> <1273067734-4758-2-git-send-email-dengcheng.zhu@gmail.com>
Reply-to: wuzhangjin@gmail.com
Sender: linux-mips-bounce@linux-mips.org
Hi,

On Wed, 2010-05-05 at 21:55 +0800, Deng-Cheng Zhu wrote:
> Moving performance counter/control defines/helper functions into a single
> header file, so that software using the MIPS PMU can share the code.
> 
> Signed-off-by: Deng-Cheng Zhu <dengcheng.zhu@gmail.com>
> ---
>  arch/mips/include/asm/pmu.h             |  244 
> +++++++++++++++++++++++++++++++
>  arch/mips/oprofile/op_model_loongson2.c |   23 +---
>  arch/mips/oprofile/op_model_mipsxx.c    |  164 +---------------------
>  arch/mips/oprofile/op_model_rm9000.c    |   16 +--
>  4 files changed, 247 insertions(+), 200 deletions(-)
>  create mode 100644 arch/mips/include/asm/pmu.h
> 
> diff --git a/arch/mips/include/asm/pmu.h b/arch/mips/include/asm/pmu.h
[...]
> +
> +#ifndef __MIPS_PMU_H__
> +#define __MIPS_PMU_H__
> +
> +#if defined(CONFIG_CPU_MIPS32) || defined(CONFIG_CPU_MIPS64) || \
> +    defined(CONFIG_CPU_R10000) || defined(CONFIG_CPU_SB1)
[...]
> +static int (*save_perf_irq)(void);

For we will use the save_perf_irq in the common function:
mipspmu_get_irq() of the next patch, so, we need to move the definition
of it out of the #if ... and put it before the #if:

...
+static int (*save_perf_irq)(void);

#if defined(CONFIG_CPU_MIPS32)
...

Regards,
        Wu Zhangjin


<Prev in Thread] Current Thread [Next in Thread>