Re: [PATCH v5 03/11] perf/x86/intel/pt: Introduce a new function to get the capability of Intel PT

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux