[Top] [All Lists]

Re: [PATCH v2 4/4] MIPS: perf: Add support for 64-bit perf counters.

To: Deng-Cheng Zhu <>
Subject: Re: [PATCH v2 4/4] MIPS: perf: Add support for 64-bit perf counters.
From: David Daney <>
Date: Thu, 17 Feb 2011 11:23:51 -0800
Cc:,, Peter Zijlstra <>, Paul Mackerras <>, Ingo Molnar <>, Arnaldo Carvalho de Melo <>
In-reply-to: <>
Original-recipient: rfc822;
References: <> <> <> <> <> <> <> <>
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20101027 Fedora/3.0.10-1.fc12 Thunderbird/3.0.10
On 02/17/2011 02:46 AM, Deng-Cheng Zhu wrote:
Hi, David

And here's a general comment: You are putting the majority of the
implementation in perf_event_mipsxx.c. This will require other CPUs like
Loongson2 to replicate quite a lot code in their corresponding files.

There is no such implementation. But if someone were to create one, I would suggest they move common code to a separate file that would be shared among the implementations that need it.

personally think the original "skeleton + #include perf_event_$cpu.c" is a
better choice. I understand you prefer not using code like
"#if defined(CONFIG_CPU_MIPS32)" on the top of perf_event_$cpu.c, but that
is what other architectures (X86/ARM etc) are doing.

Existing poor practice is not a good reason to do this.

David Daney

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