From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: Re: [PATCH v4 07/21] xen/passthrough: amd: rename iommu_has_feature into amd_iommu_has_feature Date: Fri, 02 May 2014 14:11:58 +0100 Message-ID: <5363999E.6050905@linaro.org> References: <1398172475-27873-1-git-send-email-julien.grall@linaro.org> <1398172475-27873-8-git-send-email-julien.grall@linaro.org> <535E8417.8000907@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WgDFz-0006ND-AQ for xen-devel@lists.xenproject.org; Fri, 02 May 2014 13:12:03 +0000 Received: by mail-ee0-f41.google.com with SMTP id d49so420294eek.0 for ; Fri, 02 May 2014 06:12:01 -0700 (PDT) In-Reply-To: <535E8417.8000907@linaro.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Suravee Suthikulpanit , sherry.hurwitz@amd.com, Aravind Gopalakrishnan Cc: ian.campbell@citrix.com, Julien Grall , tim@xen.org, stefano.stabellini@citrix.com, Jan Beulich , xen-devel@lists.xenproject.org List-Id: xen-devel@lists.xenproject.org (Adding Aravind) Ping? On 04/28/2014 05:38 PM, Julien Grall wrote: > Hello Sherry and Suravee, > > Can one of you ack this change in the AMD IOMMU drivers? > > Regards, > > On 04/22/2014 02:14 PM, Julien Grall wrote: >> This function is AMD specific and the name will clash with a newly function >> added in the IOMMU framework. >> >> Signed-off-by: Julien Grall >> Cc: Suravee Suthikulpanit >> Cc: Jan Beulich >> --- >> xen/drivers/passthrough/amd/iommu_detect.c | 2 +- >> xen/drivers/passthrough/amd/iommu_init.c | 16 ++++++++-------- >> xen/include/asm-x86/hvm/svm/amd-iommu-proto.h | 2 +- >> 3 files changed, 10 insertions(+), 10 deletions(-) >> >> diff --git a/xen/drivers/passthrough/amd/iommu_detect.c b/xen/drivers/passthrough/amd/iommu_detect.c >> index be1b761..98e5cc2 100644 >> --- a/xen/drivers/passthrough/amd/iommu_detect.c >> +++ b/xen/drivers/passthrough/amd/iommu_detect.c >> @@ -95,7 +95,7 @@ void __init get_iommu_features(struct amd_iommu *iommu) >> >> while ( feature_str[i] ) >> { >> - if ( iommu_has_feature(iommu, i) ) >> + if ( amd_iommu_has_feature(iommu, i) ) >> printk( " %s\n", feature_str[i]); >> i++; >> } >> diff --git a/xen/drivers/passthrough/amd/iommu_init.c b/xen/drivers/passthrough/amd/iommu_init.c >> index 6ae44d9..b2f74ef 100644 >> --- a/xen/drivers/passthrough/amd/iommu_init.c >> +++ b/xen/drivers/passthrough/amd/iommu_init.c >> @@ -884,7 +884,7 @@ static void enable_iommu(struct amd_iommu *iommu) >> register_iommu_event_log_in_mmio_space(iommu); >> register_iommu_exclusion_range(iommu); >> >> - if ( iommu_has_feature(iommu, IOMMU_EXT_FEATURE_PPRSUP_SHIFT) ) >> + if ( amd_iommu_has_feature(iommu, IOMMU_EXT_FEATURE_PPRSUP_SHIFT) ) >> register_iommu_ppr_log_in_mmio_space(iommu); >> >> desc = irq_to_desc(iommu->msi.irq); >> @@ -898,15 +898,15 @@ static void enable_iommu(struct amd_iommu *iommu) >> set_iommu_command_buffer_control(iommu, IOMMU_CONTROL_ENABLED); >> set_iommu_event_log_control(iommu, IOMMU_CONTROL_ENABLED); >> >> - if ( iommu_has_feature(iommu, IOMMU_EXT_FEATURE_PPRSUP_SHIFT) ) >> + if ( amd_iommu_has_feature(iommu, IOMMU_EXT_FEATURE_PPRSUP_SHIFT) ) >> set_iommu_ppr_log_control(iommu, IOMMU_CONTROL_ENABLED); >> >> - if ( iommu_has_feature(iommu, IOMMU_EXT_FEATURE_GTSUP_SHIFT) ) >> + if ( amd_iommu_has_feature(iommu, IOMMU_EXT_FEATURE_GTSUP_SHIFT) ) >> set_iommu_guest_translation_control(iommu, IOMMU_CONTROL_ENABLED); >> >> set_iommu_translation_control(iommu, IOMMU_CONTROL_ENABLED); >> >> - if ( iommu_has_feature(iommu, IOMMU_EXT_FEATURE_IASUP_SHIFT) ) >> + if ( amd_iommu_has_feature(iommu, IOMMU_EXT_FEATURE_IASUP_SHIFT) ) >> amd_iommu_flush_all_caches(iommu); >> >> iommu->enabled = 1; >> @@ -1009,7 +1009,7 @@ static int __init amd_iommu_init_one(struct amd_iommu *iommu) >> if ( allocate_event_log(iommu) == NULL ) >> goto error_out; >> >> - if ( iommu_has_feature(iommu, IOMMU_EXT_FEATURE_PPRSUP_SHIFT) ) >> + if ( amd_iommu_has_feature(iommu, IOMMU_EXT_FEATURE_PPRSUP_SHIFT) ) >> if ( allocate_ppr_log(iommu) == NULL ) >> goto error_out; >> >> @@ -1283,10 +1283,10 @@ static void disable_iommu(struct amd_iommu *iommu) >> set_iommu_command_buffer_control(iommu, IOMMU_CONTROL_DISABLED); >> set_iommu_event_log_control(iommu, IOMMU_CONTROL_DISABLED); >> >> - if ( iommu_has_feature(iommu, IOMMU_EXT_FEATURE_PPRSUP_SHIFT) ) >> + if ( amd_iommu_has_feature(iommu, IOMMU_EXT_FEATURE_PPRSUP_SHIFT) ) >> set_iommu_ppr_log_control(iommu, IOMMU_CONTROL_DISABLED); >> >> - if ( iommu_has_feature(iommu, IOMMU_EXT_FEATURE_GTSUP_SHIFT) ) >> + if ( amd_iommu_has_feature(iommu, IOMMU_EXT_FEATURE_GTSUP_SHIFT) ) >> set_iommu_guest_translation_control(iommu, IOMMU_CONTROL_DISABLED); >> >> set_iommu_translation_control(iommu, IOMMU_CONTROL_DISABLED); >> @@ -1356,7 +1356,7 @@ void amd_iommu_resume(void) >> } >> >> /* flush all cache entries after iommu re-enabled */ >> - if ( !iommu_has_feature(iommu, IOMMU_EXT_FEATURE_IASUP_SHIFT) ) >> + if ( !amd_iommu_has_feature(iommu, IOMMU_EXT_FEATURE_IASUP_SHIFT) ) >> { >> invalidate_all_devices(); >> invalidate_all_domain_pages(); >> diff --git a/xen/include/asm-x86/hvm/svm/amd-iommu-proto.h b/xen/include/asm-x86/hvm/svm/amd-iommu-proto.h >> index b5abc8f..cf43e29 100644 >> --- a/xen/include/asm-x86/hvm/svm/amd-iommu-proto.h >> +++ b/xen/include/asm-x86/hvm/svm/amd-iommu-proto.h >> @@ -210,7 +210,7 @@ static inline int iommu_has_cap(struct amd_iommu *iommu, uint32_t bit) >> return !!(iommu->cap.header & (1u << bit)); >> } >> >> -static inline int iommu_has_feature(struct amd_iommu *iommu, uint32_t bit) >> +static inline int amd_iommu_has_feature(struct amd_iommu *iommu, uint32_t bit) >> { >> if ( !iommu_has_cap(iommu, PCI_CAP_EFRSUP_SHIFT) ) >> return 0; >> > > -- Julien Grall