linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Joerg.Roedel@amd.com (Roedel, Joerg)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/7] omap: iommu: migrate to the generic IOMMU API
Date: Tue, 23 Aug 2011 16:07:46 +0200	[thread overview]
Message-ID: <20110823140746.GP2079@amd.com> (raw)
In-Reply-To: <1313622608-30397-2-git-send-email-ohad@wizery.com>

On Wed, Aug 17, 2011 at 07:10:02PM -0400, Ohad Ben-Cohen wrote:
> +/**
> + * omap_iommu_attach() - attach iommu device to an iommu domain
> + * @dev:       target omap iommu device
> + * @iopgd:     page table
>   **/
> -struct iommu *iommu_get(const char *name)
> +static struct iommu *omap_iommu_attach(struct device *dev, u32 *iopgd)
>  {
>         int err = -ENOMEM;
> -       struct device *dev;
> -       struct iommu *obj;
> -
> -       dev = driver_find_device(&omap_iommu_driver.driver, NULL, (void *)name,
> -                                device_match_by_alias);
> -       if (!dev)
> -               return ERR_PTR(-ENODEV);
> -
> -       obj = to_iommu(dev);
> +       struct iommu *obj = to_iommu(dev);
> 
>         mutex_lock(&obj->iommu_lock);

I don't think using a mutex here is a good idea. This prevents this
function to be called from atomic context. The iommu_map and _unmap
functions need to allowed in atomic-context and I don't want different
context constraints within the iommu-api. Can this be easily converted
to a spin_lock?

	Joerg

-- 
AMD Operating System Research Center

Advanced Micro Devices GmbH Einsteinring 24 85609 Dornach
General Managers: Alberto Bozzo, Andrew Bowd
Registration: Dornach, Landkr. Muenchen; Registerger. Muenchen, HRB Nr. 43632

  parent reply	other threads:[~2011-08-23 14:07 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-17 23:10 [PATCH 0/7] omap: iommu migration, relocation and cleanups Ohad Ben-Cohen
2011-08-17 23:10 ` [PATCH 1/7] omap: iommu: migrate to the generic IOMMU API Ohad Ben-Cohen
2011-08-18  9:01   ` Laurent Pinchart
2011-08-18  9:05     ` Ohad Ben-Cohen
2011-08-18 13:35     ` Arnd Bergmann
2011-08-23 14:07   ` Roedel, Joerg [this message]
2011-08-23 14:59     ` Ohad Ben-Cohen
2011-08-24 12:46       ` Ohad Ben-Cohen
2011-08-24 13:15         ` Roedel, Joerg
2011-08-24 14:46           ` Ohad Ben-Cohen
2011-08-17 23:10 ` [PATCH 2/7] omap: iommu/iovmm: move to dedicated iommu folder Ohad Ben-Cohen
2011-08-18 13:38   ` Arnd Bergmann
2011-08-18 13:53     ` Ohad Ben-Cohen
2011-08-17 23:10 ` [PATCH 3/7] omap: iommu: stop exporting local functions Ohad Ben-Cohen
2011-08-17 23:10 ` [PATCH 4/7] omap: iommu: PREFETCH_IOTLB cleanup Ohad Ben-Cohen
2011-08-18  5:27   ` Hiroshi DOYU
2011-08-18  6:33     ` Ohad Ben-Cohen
2011-08-17 23:10 ` [PATCH 5/7] omap: iovmm: remove unused functionality Ohad Ben-Cohen
2011-08-18 10:19   ` Hiroshi DOYU
2011-08-18 10:23     ` Ohad Ben-Cohen
2011-08-18 12:45       ` Hiroshi DOYU
2011-08-17 23:10 ` [PATCH 6/7] omap: iommu: remove unused exported API Ohad Ben-Cohen
2011-08-18 10:49   ` Hiroshi DOYU
2011-08-18 11:01     ` Ohad Ben-Cohen
2011-08-18 13:40       ` David Cohen
2011-08-18 13:45         ` Ohad Ben-Cohen
2011-08-17 23:10 ` [PATCH 7/7] omap: iommu: omapify 'struct iommu' and exposed API Ohad Ben-Cohen
2011-08-18  9:12 ` [PATCH 0/7] omap: iommu migration, relocation and cleanups Laurent Pinchart
2011-08-18 10:50   ` Hiroshi DOYU
2011-08-23 14:26 ` Roedel, Joerg
2011-08-23 15:15   ` Ohad Ben-Cohen

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=20110823140746.GP2079@amd.com \
    --to=joerg.roedel@amd.com \
    --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).