]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit - include/linux/perf_event.h
x86/events/amd/iommu: Add IOMMU-specific hw_perf_event struct
authorSuravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Fri, 24 Feb 2017 08:48:21 +0000 (02:48 -0600)
committerIngo Molnar <mingo@kernel.org>
Thu, 30 Mar 2017 07:55:35 +0000 (09:55 +0200)
commitcf25f904ef75aa7c25097eb4981bbc634bf5ff9e
tree72f34eed6b1b5612e31f2e8917b3c04f2f4ab8a5
parent51686546304fd7f778bb31bf7e2ae9bad6b1d21c
x86/events/amd/iommu: Add IOMMU-specific hw_perf_event struct

Current AMD IOMMU perf PMU inappropriately uses the hardware struct
inside the union in struct hw_perf_event, extra_reg in particular.

Instead, introduce an AMD IOMMU-specific struct with required parameters
to be programmed into the IOMMU performance counter control register.

Update the pasid field from 16 to 20 bits while at it.

Signed-off-by: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
[ Fixup macros, shorten get_next_avail_iommu_bnk_cntr() local vars, massage commit message. ]
Signed-off-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Jörg Rödel <joro@8bytes.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Vince Weaver <vincent.weaver@maine.edu>
Cc: iommu@lists.linux-foundation.org
Link: http://lkml.kernel.org/r/1487926102-13073-10-git-send-email-Suravee.Suthikulpanit@amd.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
arch/x86/events/amd/iommu.c
include/linux/perf_event.h