[RFC,for-4.5,03/12] xen/passthrough: vtd: Don't export iommu_set_pgd

Message ID 1391794991-5919-4-git-send-email-julien.grall@linaro.org
State RFC
Headers show

Commit Message

Julien Grall Feb. 7, 2014, 5:43 p.m.
iommu_set_pgd is only used internally in
xen/drivers/passthrough/vtd/iommu.c

Signed-off-by: Julien Grall <julien.grall@linaro.org>
Cc: Xiantoa Zhang <xiantao.zhang@intel.com>
Cc: Jan Beulich <jbeulich@suse.com>
---
 xen/drivers/passthrough/vtd/iommu.c |    2 +-
 xen/include/xen/iommu.h             |    1 -
 2 files changed, 1 insertion(+), 2 deletions(-)

Comments

Ian Campbell Feb. 19, 2014, 12:27 p.m. | #1
On Fri, 2014-02-07 at 17:43 +0000, Julien Grall wrote:
> iommu_set_pgd is only used internally in
> xen/drivers/passthrough/vtd/iommu.c
> 
> Signed-off-by: Julien Grall <julien.grall@linaro.org>
> Cc: Xiantoa Zhang <xiantao.zhang@intel.com>
> Cc: Jan Beulich <jbeulich@suse.com>

Acked-by: Ian Campbell <ian.campbell@citrix.com>

(could collapse with the previous patch into a "don't export unnecessary
stuff" patch)

> ---
>  xen/drivers/passthrough/vtd/iommu.c |    2 +-
>  xen/include/xen/iommu.h             |    1 -
>  2 files changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/xen/drivers/passthrough/vtd/iommu.c b/xen/drivers/passthrough/vtd/iommu.c
> index a8d33fc..d5ce5b7 100644
> --- a/xen/drivers/passthrough/vtd/iommu.c
> +++ b/xen/drivers/passthrough/vtd/iommu.c
> @@ -1826,7 +1826,7 @@ static int vtd_ept_page_compatible(struct iommu *iommu)
>  /*
>   * set VT-d page table directory to EPT table if allowed
>   */
> -void iommu_set_pgd(struct domain *d)
> +static void iommu_set_pgd(struct domain *d)
>  {
>      struct hvm_iommu *hd  = domain_hvm_iommu(d);
>      mfn_t pgd_mfn;
> diff --git a/xen/include/xen/iommu.h b/xen/include/xen/iommu.h
> index 8bb0a1d..fcbc432 100644
> --- a/xen/include/xen/iommu.h
> +++ b/xen/include/xen/iommu.h
> @@ -68,7 +68,6 @@ int iommu_map_page(struct domain *d, unsigned long gfn, unsigned long mfn,
>                     unsigned int flags);
>  int iommu_unmap_page(struct domain *d, unsigned long gfn);
>  void iommu_pte_flush(struct domain *d, u64 gfn, u64 *pte, int order, int present);
> -void iommu_set_pgd(struct domain *d);
>  void iommu_domain_teardown(struct domain *d);
>  
>  void pt_pci_init(void);

Patch

diff --git a/xen/drivers/passthrough/vtd/iommu.c b/xen/drivers/passthrough/vtd/iommu.c
index a8d33fc..d5ce5b7 100644
--- a/xen/drivers/passthrough/vtd/iommu.c
+++ b/xen/drivers/passthrough/vtd/iommu.c
@@ -1826,7 +1826,7 @@  static int vtd_ept_page_compatible(struct iommu *iommu)
 /*
  * set VT-d page table directory to EPT table if allowed
  */
-void iommu_set_pgd(struct domain *d)
+static void iommu_set_pgd(struct domain *d)
 {
     struct hvm_iommu *hd  = domain_hvm_iommu(d);
     mfn_t pgd_mfn;
diff --git a/xen/include/xen/iommu.h b/xen/include/xen/iommu.h
index 8bb0a1d..fcbc432 100644
--- a/xen/include/xen/iommu.h
+++ b/xen/include/xen/iommu.h
@@ -68,7 +68,6 @@  int iommu_map_page(struct domain *d, unsigned long gfn, unsigned long mfn,
                    unsigned int flags);
 int iommu_unmap_page(struct domain *d, unsigned long gfn);
 void iommu_pte_flush(struct domain *d, u64 gfn, u64 *pte, int order, int present);
-void iommu_set_pgd(struct domain *d);
 void iommu_domain_teardown(struct domain *d);
 
 void pt_pci_init(void);