linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: joro@8bytes.org (Joerg Roedel)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v5 1/4] iommu/shmobile: Add iommu driver for Renesas IPMMU modules
Date: Thu, 10 Jan 2013 19:32:37 +0100	[thread overview]
Message-ID: <20130110183236.GG25591@8bytes.org> (raw)
In-Reply-To: <1586668.MmWlG9A4gq@avalon>

Hi,

On Mon, Jan 07, 2013 at 07:11:58PM +0100, Laurent Pinchart wrote:
> > +		l2index = (iova >> 12) & 0xff;
> > +		spin_lock(&sh_domain->map_lock);
> > +		ret = l2alloc(sh_domain, l1index);
> 
> l2alloc calls dma_pool_alloc(GFP_KERNEL), that not safe in a non-sleepable 
> context. Do we need a spinlock here, or could a mutex do ?

iommu_map should work in any context, so a mutex will not work. Also the
memory allocations in that path should be GFP_ATOMIC instead of
GFP_KERNEL.

Other than that this driver looks good from an IOMMU-API perspective.
Please Cc me on future versions of this patch-set directly.

Thanks,

	Joerg

  reply	other threads:[~2013-01-10 18:32 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-25 11:19 [PATCH v5 0/4] Renesas IPMMU driver for sh7372, sh73a0 and r8a7740 Hideki EIRAKU
2012-12-25 11:19 ` [PATCH v5 1/4] iommu/shmobile: Add iommu driver for Renesas IPMMU modules Hideki EIRAKU
2013-01-07 18:11   ` Laurent Pinchart
2013-01-10 18:32     ` Joerg Roedel [this message]
2012-12-25 11:19 ` [PATCH v5 2/4] ARM: mach-shmobile: sh7372: Add IPMMU device Hideki EIRAKU
2012-12-25 11:19 ` [PATCH v5 3/4] ARM: mach-shmobile: sh73a0: " Hideki EIRAKU
2012-12-25 11:19 ` [PATCH v5 4/4] ARM: mach-shmobile: r8a7740: " Hideki EIRAKU

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=20130110183236.GG25591@8bytes.org \
    --to=joro@8bytes.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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).