From: Baoquan He <bhe@redhat.com>
To: Bill Sumner <bill.sumner@hp.com>
Cc: dwmw2@infradead.org, indou.takao@jp.fujitsu.com, joro@8bytes.org,
iommu@lists.linux-foundation.org, kexec@lists.infradead.org,
alex.williamson@redhat.com, linux-pci@vger.kernel.org,
linux-kernel@vger.kernel.org, ddutile@redhat.com,
ishii.hironobu@jp.fujitsu.com, bhelgaas@google.com,
doug.hatch@hp.com, zhenhua@hp.com
Subject: Re: [PATCH 2/8] Consolidate all .h lines at front of intel-iommu.c file
Date: Sat, 19 Apr 2014 22:05:27 +0800 [thread overview]
Message-ID: <20140419140444.GA1565@dhcp-17-102.nay.redhat.com> (raw)
In-Reply-To: <1397603349-30930-3-git-send-email-bill.sumner@hp.com>
Hi Bill,
Could you rebase on latest linus's kernel tree, since there are several
changes in intel-iommu.c. This patch can't be applied because of below
commits. I think patch need be reabsed on latest linus's tree before
post, people will apply your patch without conflict.
commit b94e4117f8c4ffb591b1e462364d725e3a1c63c4
Author: Jiang Liu <jiang.liu@linux.intel.com>
Date: Wed Feb 19 14:07:25 2014 +0800
iommu/vt-d: Move private structures and variables into intel-iommu.c
Move private structures and variables into intel-iommu.c, which will
help to simplify locking policy for hotplug. Also delete redundant
declarations.
Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com>
Signed-off-by: Joerg Roedel <joro@8bytes.org>
Thanks
Baoquan
On 04/15/14 at 05:09pm, Bill Sumner wrote:
> In intel-iommu.c, move downward the few lines near the
> front that should not move to an intel-iommu-private.h
> file (mostly data-item definitions) This leaves a
> consolidated block of the lines that would move to an
> intel-iommu-private.h file at the front of the file.
>
>
> Signed-off-by: Bill Sumner <bill.sumner@hp.com>
> ---
> drivers/iommu/intel-iommu.c | 74 +++++++++++++++++++++++----------------------
> 1 file changed, 38 insertions(+), 36 deletions(-)
>
> diff --git a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c
> index 8abcb6c..22298e9 100644
> --- a/drivers/iommu/intel-iommu.c
> +++ b/drivers/iommu/intel-iommu.c
> @@ -165,17 +165,6 @@ static inline unsigned long virt_to_dma_pfn(void *p)
> return page_to_dma_pfn(virt_to_page(p));
> }
>
> -/* global iommu list, set NULL for ignored DMAR units */
> -static struct intel_iommu **g_iommus;
> -
> -static void __init check_tylersburg_isoch(void);
> -static int rwbf_quirk;
> -
> -/*
> - * set to 1 to panic kernel if can't successfully enable VT-d
> - * (used when kernel is launched w/ TXT)
> - */
> -static int force_on;
>
> /*
> * 0: Present
> @@ -314,15 +303,6 @@ static inline int first_pte_in_page(struct dma_pte *pte)
> return !((unsigned long)pte & ~VTD_PAGE_MASK);
> }
>
> -/*
> - * This domain is a statically identity mapping domain.
> - * 1. This domain creats a static 1:1 mapping to all usable memory.
> - * 2. It maps to each iommu if successful.
> - * 3. Each iommu mapps to this domain if successful.
> - */
> -static struct dmar_domain *si_domain;
> -static int hw_pass_through = 1;
> -
> /* devices under the same p2p bridge are owned in one domain */
> #define DOMAIN_FLAG_P2P_MULTIPLE_DEVICES (1 << 0)
>
> @@ -380,6 +360,44 @@ struct device_domain_info {
> struct dmar_domain *domain; /* pointer to domain */
> };
>
> +static inline void *alloc_pgtable_page(int node)
> +{
> + struct page *page;
> + void *vaddr = NULL;
> +
> + page = alloc_pages_node(node, GFP_ATOMIC | __GFP_ZERO, 0);
> + if (page)
> + vaddr = page_address(page);
> + return vaddr;
> +}
> +
> +static inline void free_pgtable_page(void *vaddr)
> +{
> + free_page((unsigned long)vaddr);
> +}
> +
> +
> +static void __init check_tylersburg_isoch(void);
> +
> +/* global iommu list, set NULL for ignored DMAR units */
> +static struct intel_iommu **g_iommus;
> +static int rwbf_quirk;
> +
> +/*
> + * set to 1 to panic kernel if can't successfully enable VT-d
> + * (used when kernel is launched w/ TXT)
> + */
> +static int force_on;
> +
> +/*
> + * This domain is a statically identity mapping domain.
> + * 1. This domain creats a static 1:1 mapping to all usable memory.
> + * 2. It maps to each iommu if successful.
> + * 3. Each iommu mapps to this domain if successful.
> + */
> +static struct dmar_domain *si_domain;
> +static int hw_pass_through = 1;
> +
> static void flush_unmaps_timeout(unsigned long data);
>
> static DEFINE_TIMER(unmap_timer, flush_unmaps_timeout, 0, 0);
> @@ -468,22 +486,6 @@ static struct kmem_cache *iommu_domain_cache;
> static struct kmem_cache *iommu_devinfo_cache;
> static struct kmem_cache *iommu_iova_cache;
>
> -static inline void *alloc_pgtable_page(int node)
> -{
> - struct page *page;
> - void *vaddr = NULL;
> -
> - page = alloc_pages_node(node, GFP_ATOMIC | __GFP_ZERO, 0);
> - if (page)
> - vaddr = page_address(page);
> - return vaddr;
> -}
> -
> -static inline void free_pgtable_page(void *vaddr)
> -{
> - free_page((unsigned long)vaddr);
> -}
> -
> static inline void *alloc_domain_mem(void)
> {
> return kmem_cache_alloc(iommu_domain_cache, GFP_ATOMIC);
> --
> Bill Sumner <bill.sumner@hp.com>
>
next prev parent reply other threads:[~2014-04-19 14:06 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-15 23:09 [PATCH 0/8] Fix crashdump failure caused by legacy DMA/IO Bill Sumner
2014-04-15 23:09 ` [PATCH 1/8] Fix a few existing lines that checkpatch.pl will complain about later Bill Sumner
2014-04-15 23:09 ` [PATCH 2/8] Consolidate all .h lines at front of intel-iommu.c file Bill Sumner
2014-04-19 14:05 ` Baoquan He [this message]
2014-04-15 23:09 ` [PATCH 3/8] Create intel-iommu-private.h Bill Sumner
2014-04-15 23:09 ` [PATCH 4/8] Update iommu_attach_domain() and its callers Bill Sumner
2014-04-15 23:09 ` [PATCH 5/8] Add new definitions & prototypes to intel-iommu-private.h Bill Sumner
2014-04-15 23:09 ` [PATCH 6/8] Create intel-iommu-kdump.c Bill Sumner
2014-04-15 23:09 ` [PATCH 7/8] Add domain-id functions to intel-iommu-kdump.c Bill Sumner
2014-04-15 23:09 ` [PATCH 8/8] Add remaining changes to intel-iommu.c to fix crashdump Bill Sumner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140419140444.GA1565@dhcp-17-102.nay.redhat.com \
--to=bhe@redhat.com \
--cc=alex.williamson@redhat.com \
--cc=bhelgaas@google.com \
--cc=bill.sumner@hp.com \
--cc=ddutile@redhat.com \
--cc=doug.hatch@hp.com \
--cc=dwmw2@infradead.org \
--cc=indou.takao@jp.fujitsu.com \
--cc=iommu@lists.linux-foundation.org \
--cc=ishii.hironobu@jp.fujitsu.com \
--cc=joro@8bytes.org \
--cc=kexec@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=zhenhua@hp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).