mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Suresh Siddha <suresh.b.siddha@intel.com>
To: dwmw2@infradead.org
Cc: jbarnes@virtuousgeek.org, len.brown@intel.com,
	linux-kernel@vger.kernel.org, rdreier@cisco.com,
	Suresh Siddha <suresh.b.siddha@intel.com>
Subject: [patch 2/4] dmar: Allocate queued invalidation structure using numa locality info
Date: Fri, 02 Oct 2009 11:01:22 -0700	[thread overview]
Message-ID: <20091002180257.695615271@sbs-t61.sc.intel.com> (raw)
In-Reply-To: <20091002180257.600389229@sbs-t61.sc.intel.com>

[-- Attachment #1: qi_use_affinity_info.patch --]
[-- Type: text/plain, Size: 1096 bytes --]

Allocate queued invalidation descriptor structures using numa locality info.

Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
---
 drivers/pci/dmar.c |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

Index: iommu-2.6/drivers/pci/dmar.c
===================================================================
--- iommu-2.6.orig/drivers/pci/dmar.c
+++ iommu-2.6/drivers/pci/dmar.c
@@ -1040,6 +1040,7 @@ static void __dmar_enable_qi(struct inte
 int dmar_enable_qi(struct intel_iommu *iommu)
 {
 	struct q_inval *qi;
+	struct page *desc_page;
 
 	if (!ecap_qis(iommu->ecap))
 		return -ENOENT;
@@ -1056,13 +1057,16 @@ int dmar_enable_qi(struct intel_iommu *i
 
 	qi = iommu->qi;
 
-	qi->desc = (void *)(get_zeroed_page(GFP_ATOMIC));
-	if (!qi->desc) {
+
+	desc_page = alloc_pages_node(iommu->node, GFP_ATOMIC | __GFP_ZERO, 0);
+	if (!desc_page) {
 		kfree(qi);
 		iommu->qi = 0;
 		return -ENOMEM;
 	}
 
+	qi->desc = page_address(desc_page);
+
 	qi->desc_status = kmalloc(QI_LENGTH * sizeof(int), GFP_ATOMIC);
 	if (!qi->desc_status) {
 		free_page((unsigned long) qi->desc);



  reply	other threads:[~2009-10-02 18:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-02 18:01 [patch 1/4] dmar: support for parsing Remapping Hardware Static Affinity structure Suresh Siddha
2009-10-02 18:01 ` Suresh Siddha [this message]
2009-10-02 18:01 ` [patch 3/4] intr_remap: Allocate intr-remapping table using numa locality info Suresh Siddha
  -- strict thread matches above, loose matches on Subject: below --
2009-10-01 23:06 [patch 1/4] dmar: support for parsing Remapping Hardware Static Affinity structure Suresh Siddha
2009-10-01 23:06 ` [patch 2/4] dmar: Allocate queued invalidation structure using numa locality info Suresh Siddha

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=20091002180257.695615271@sbs-t61.sc.intel.com \
    --to=suresh.b.siddha@intel.com \
    --cc=dwmw2@infradead.org \
    --cc=jbarnes@virtuousgeek.org \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rdreier@cisco.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

all inboxes | Powered by JetHome®