linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: chaiw.fnst@cn.fujitsu.com (Chai Wen)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/2] ARM: perf: armv7: wrap unsupported arch init functions via micro
Date: Wed, 22 Oct 2014 19:22:52 +0800	[thread overview]
Message-ID: <5447938C.5010304@cn.fujitsu.com> (raw)
In-Reply-To: <20141022110128.GE22642@leverpostej>

On 10/22/2014 07:01 PM, Mark Rutland wrote:

> Hi,
> 
> On Wed, Oct 22, 2014 at 09:21:47AM +0100, chai wen wrote:
>> Signed-off-by: chai wen <chaiw.fnst@cn.fujitsu.com>
>> ---
>>  arch/arm/kernel/perf_event_v7.c |   52 +++++++++-----------------------------
>>  1 files changed, 13 insertions(+), 39 deletions(-)
> 
> I'm currently in the process of decoupling perf_event_{xscale,v6,v7}.c,
> which will result in the removal of these stubs and for the ARMv7,
> ARMv6, and XScale perf backends.
> 
> I haven't yet posted all the patches, but the basic idea is to make the
> arm_pmu code stateless and turn it into a library used by each of the
> three backends mentioned above. Each would have their own pmu_probe_info
> table (introduced in [1]), and would support the platform device IDs
> introduced in commit 253d8c3d2518ca6f (arm: perf: add more specific
> platform device IDs). The stubs would no longer be necessary.
> 
> [1] http://lists.infradead.org/pipermail/linux-arm-kernel/2014-October/295822.html


Hi Mark

Got it.

Thanks for your information.
Your patches looks reasonable, I am OK with it.

thanks
chai wen

> 
> Thanks,
> Mark.
> 
>>
>> diff --git a/arch/arm/kernel/perf_event_v7.c b/arch/arm/kernel/perf_event_v7.c
>> index f66a9b8..6c088e8 100644
>> --- a/arch/arm/kernel/perf_event_v7.c
>> +++ b/arch/arm/kernel/perf_event_v7.c
>> @@ -1459,43 +1459,17 @@ static int krait_pmu_init(struct arm_pmu *cpu_pmu)
>>  	return 0;
>>  }
>>  #else
>> -static inline int armv7_a8_pmu_init(struct arm_pmu *cpu_pmu)
>> -{
>> -	return -ENODEV;
>> -}
>> -
>> -static inline int armv7_a9_pmu_init(struct arm_pmu *cpu_pmu)
>> -{
>> -	return -ENODEV;
>> -}
>> -
>> -static inline int armv7_a5_pmu_init(struct arm_pmu *cpu_pmu)
>> -{
>> -	return -ENODEV;
>> -}
>> -
>> -static inline int armv7_a15_pmu_init(struct arm_pmu *cpu_pmu)
>> -{
>> -	return -ENODEV;
>> -}
>> -
>> -static inline int armv7_a7_pmu_init(struct arm_pmu *cpu_pmu)
>> -{
>> -	return -ENODEV;
>> -}
>> -
>> -static inline int armv7_a12_pmu_init(struct arm_pmu *cpu_pmu)
>> -{
>> -	return -ENODEV;
>> -}
>> -
>> -static inline int armv7_a17_pmu_init(struct arm_pmu *cpu_pmu)
>> -{
>> -	return -ENODEV;
>> -}
>> -
>> -static inline int krait_pmu_init(struct arm_pmu *cpu_pmu)
>> -{
>> -	return -ENODEV;
>> -}
>> +#define WRAP_UNSUPPORTED_INIT(__FUNC)                           \
>> +static inline int __FUNC(struct arm_pmu *cpu_pmu)               \
>> +{                                                               \
>> +        return -ENODEV;                                         \
>> +}
>> +WRAP_UNSUPPORTED_INIT(armv7_a8_pmu_init);
>> +WRAP_UNSUPPORTED_INIT(armv7_a9_pmu_init);
>> +WRAP_UNSUPPORTED_INIT(armv7_a5_pmu_init);
>> +WRAP_UNSUPPORTED_INIT(armv7_a15_pmu_init);
>> +WRAP_UNSUPPORTED_INIT(armv7_a7_pmu_init);
>> +WRAP_UNSUPPORTED_INIT(armv7_a12_pmu_init);
>> +WRAP_UNSUPPORTED_INIT(armv7_a17_pmu_init);
>> +WRAP_UNSUPPORTED_INIT(krait_pmu_init);
>>  #endif	/* CONFIG_CPU_V7 */
>> -- 
>> 1.7.1
>>
>>
>> _______________________________________________
>> linux-arm-kernel mailing list
>> linux-arm-kernel at lists.infradead.org
>> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>>
> .
> 



-- 
Regards

Chai Wen

  reply	other threads:[~2014-10-22 11:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-22  8:21 [PATCH 1/2] ARM: perf: armv7 remove useless return and check of idx in counter handling chai wen
2014-10-22  8:21 ` [PATCH 2/2] ARM: perf: armv7: wrap unsupported arch init functions via micro chai wen
2014-10-22 11:01   ` Mark Rutland
2014-10-22 11:22     ` Chai Wen [this message]
2014-10-22 10:47 ` [PATCH 1/2] ARM: perf: armv7 remove useless return and check of idx in counter handling Mark Rutland
2014-10-22 11:26   ` Chai Wen

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=5447938C.5010304@cn.fujitsu.com \
    --to=chaiw.fnst@cn.fujitsu.com \
    --cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).