Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1550876

Re: [PATCH V6 2/7] perf/amd/iommu: Modify functions to query max banks and counters

From Joerg Roedel <joro@8bytes.org>
Newsgroups linux.kernel
Subject Re: [PATCH V6 2/7] perf/amd/iommu: Modify functions to query max banks and counters
Date 2017-01-04 15:50 +0100
Message-ID <sVV34-5Z1-5@gated-at.bofh.it> (permalink)
References <sVV34-5Z1-7@gated-at.bofh.it> <sVV34-5Z1-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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?

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

Re: [PATCH V6 2/7] perf/amd/iommu: Modify functions to query max  banks and counters Joerg Roedel <joro@8bytes.org> - 2017-01-04 15:50 +0100

csiph-web