Messages in this thread | | | Subject | Re: [PATCH V5 02/10] perf/amd/iommu: Consolidate and move perf_event_amd_iommu header | From | Suravee Suthikulpanit <> | Date | Fri, 18 Mar 2016 14:07:25 +0700 |
| |
Hi
On 03/15/2016 05:53 PM, Peter Zijlstra wrote: > On Tue, Mar 15, 2016 at 11:40:17AM +0100, Borislav Petkov wrote: >> On Tue, Mar 15, 2016 at 07:39:31AM +0700, Suravee Suthikulpanit wrote: >>> What if I just merge the newly introduced arch/x86/include/perf/amd/iommu.h >>> into the include/linux/amd-iommu.h? I do not see the point of having to >>> separate things out into two files. >> >> Except that this header has x86-specific stuff and include/linux/ is >> arch-agnostic. > > Which would suggest that header is placed wrong, because I would expect > the amd-iommu to really be rather x86 specific. Or is AMD making ARM > parts for which this is useful too? >
Actually the exposed APIs (in both files) are from the AMD IOMMU driver, which is not necessary x86-specific. They mostly use struct pci_dev, which is also arch-agnostic. It is correct that the current IOMMU IP is only available in x86 systems. However, if AMD plans to use the IOMMU IP in the ARM-based processors in the future, putting these into include/linux/amd-iommu.h would work better.
Thanks, Suravee
| |