From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joerg Roedel Subject: Re: [PATCH V6 2/7] perf/amd/iommu: Modify functions to query max banks and counters Date: Wed, 4 Jan 2017 15:48:53 +0100 Message-ID: <20170104144853.GE10632@8bytes.org> References: <1482500330-5606-1-git-send-email-Suravee.Suthikulpanit@amd.com> <1482500330-5606-3-git-send-email-Suravee.Suthikulpanit@amd.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1482500330-5606-3-git-send-email-Suravee.Suthikulpanit-5C7GfCeVMHo@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org Errors-To: iommu-bounces-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org To: Suravee Suthikulpanit Cc: peterz-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org, iommu-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, mingo-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org, bp-Gina5bIWoIWzQB+pC5nmwQ@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: iommu@lists.linux-foundation.org On Fri, Dec 23, 2016 at 08:38:45PM +0700, Suravee Suthikulpanit wrote: > --- a/arch/x86/events/amd/iommu.h > +++ b/arch/x86/events/amd/iommu.h > @@ -24,15 +24,12 @@ > #define PC_MAX_SPEC_BNKS 64 > #define PC_MAX_SPEC_CNTRS 16 > > -/* iommu pc reg masks*/ > -#define IOMMU_BASE_DEVID 0x0000 > - > /* amd_iommu_init.c external support functions */ > extern bool amd_iommu_pc_supported(void); > > -extern u8 amd_iommu_pc_get_max_banks(u16 devid); > +extern u8 amd_iommu_pc_get_max_banks(uint devid); > > -extern u8 amd_iommu_pc_get_max_counters(u16 devid); > +extern u8 amd_iommu_pc_get_max_counters(uint devid); The parameters are now iommu-indexes and not device-ids anymore. You should reflect that in the prototypes here too. > diff --git a/drivers/iommu/amd_iommu_proto.h b/drivers/iommu/amd_iommu_proto.h > index 7eb60c1..1f10b3f 100644 > --- a/drivers/iommu/amd_iommu_proto.h > +++ b/drivers/iommu/amd_iommu_proto.h > @@ -58,8 +58,8 @@ extern int amd_iommu_domain_set_gcr3(struct iommu_domain *dom, int pasid, > > /* IOMMU Performance Counter functions */ > extern bool amd_iommu_pc_supported(void); > -extern u8 amd_iommu_pc_get_max_banks(u16 devid); > -extern u8 amd_iommu_pc_get_max_counters(u16 devid); > +extern u8 amd_iommu_pc_get_max_banks(uint devid); > +extern u8 amd_iommu_pc_get_max_counters(uint devid); Same here, and why do you need to declare the prototypes in two different header files?