Re: [PATCH V3 1/5] perf/amd/iommu: Consolidate and move perf_event_amd_iommu header

From: Borislav Petkov
Date: Wed Feb 10 2016 - 13:51:55 EST


On Thu, Feb 11, 2016 at 01:42:52AM +0700, Suravee Suthikulpanit wrote:
> The reason I picked this location to place the header file is because
> there is already an existing include/linux/perf/arm_pmu.h file there.

I don't think anything arch-specific belongs in generic kernel header
paths.

> So, I thought it might be alright to put the perf_event_amd_iommu.h
> here.
>
> Having the information in the file arch/x86/events/amd/iommu.h seems
> strange for having to specify ../../arch/x86/events/amd/iommu.h in the
> IOMMU driver.
>
> So, you think it would be alright if move
>
> include/linux/perf/perf_event_amd_iommu.h
> to
> arch/x86/include/perf/perf_event_amd_iommu.h

If it feels strange to you, you can move it to arch/x86/include/asm/
There we put the arch-specific stuff.

Then you can do

#include <asm/perf/amd/iommu.h>

or so. I've moved it to arch/x86/events/amd/iommu.h already anyway.

--
Regards/Gruss,
Boris.

ECO tip #101: Trim your mails when you reply.