lkml.org 
[lkml]   [2018]   [Mar]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v5 03/11] perf/x86/intel/pt: Introduce a new function to get the capability of Intel PT
From
Date
On 04/03/2018 13:07, Luwei Kang wrote:
> +u32 pt_cap_get_ex(u32 *caps, enum pt_capabilities cap)
> +{
> + struct pt_cap_desc *cd = &pt_caps[cap];
> + u32 c = caps[cd->leaf * PT_CPUID_REGS_NUM + cd->reg];
> + unsigned int shift = __ffs(cd->mask);
> +
> + return (c & cd->mask) >> shift;
> +}
> +EXPORT_SYMBOL_GPL(pt_cap_get_ex);
> +

You should change pt_cap_get to use this function. Also, "_ex" is not a
very common suffix, so perhaps you can call it __pt_cap_get.

I don't have any other comments on patches 1-3, so when you resend we
can ask the x86 maintainers for approval.

Thanks,

Paolo

\
 
 \ /
  Last update: 2018-03-16 18:29    [W:0.111 / U:5.980 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site