mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Hiroshi DOYU <Hiroshi.DOYU@nokia.com>
To: x0095840@ti.com
Cc: linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org,
	ohad@wizery.com, ameya.palande@nokia.com,
	felipe.contreras@nokia.com
Subject: Re: [PATCH 1/9] dspbridge: replace iommu custom for opensource implementation
Date: Fri, 02 Jul 2010 09:32:05 +0300 (EEST)	[thread overview]
Message-ID: <20100702.093205.59662898.Hiroshi.DOYU@nokia.com> (raw)
In-Reply-To: <1277943660-4112-2-git-send-email-x0095840@ti.com>

Hi Fernando,

From: ext Fernando Guzman Lugo <x0095840@ti.com>
Subject: [PATCH 1/9] dspbridge: replace iommu custom for opensource implementation
Date: Thu, 1 Jul 2010 02:20:52 +0200

> This patch replace the call to custom dsp mmu implemenation
> for the once on iommu module.
> 
> Signed-off-by: Fernando Guzman Lugo <x0095840@ti.com>
> ---
>  drivers/dsp/bridge/core/_tiomap.h    |   16 +
>  drivers/dsp/bridge/core/io_sm.c      |  114 ++------
>  drivers/dsp/bridge/core/tiomap3430.c |  501 +++++-----------------------------
>  drivers/dsp/bridge/core/ue_deh.c     |   10 -
>  4 files changed, 118 insertions(+), 523 deletions(-)
> 
> diff --git a/drivers/dsp/bridge/core/_tiomap.h b/drivers/dsp/bridge/core/_tiomap.h
> index bf0164e..d13677a 100644
> --- a/drivers/dsp/bridge/core/_tiomap.h
> +++ b/drivers/dsp/bridge/core/_tiomap.h
> @@ -23,6 +23,8 @@
>  #include <plat/clockdomain.h>
>  #include <mach-omap2/prm-regbits-34xx.h>
>  #include <mach-omap2/cm-regbits-34xx.h>
> +#include <plat/iommu.h>
> +#include <plat/iovmm.h>
>  #include <dspbridge/devdefs.h>
>  #include <hw_defs.h>
>  #include <dspbridge/dspioctl.h>        /* for bridge_ioctl_extproc defn */
> @@ -330,6 +332,7 @@ struct bridge_dev_context {
>         u32 dw_internal_size;   /* Internal memory size */
> 
>         struct omap_mbox *mbox;         /* Mail box handle */
> +       struct iommu *dsp_mmu;          /* iommu for iva2 handler */
> 
>         struct cfg_hostres *resources;  /* Host Resources */
> 
> @@ -374,4 +377,17 @@ extern s32 dsp_debug;
>   */
>  int sm_interrupt_dsp(struct bridge_dev_context *dev_context, u16 mb_val);
> 
> +static inline void dsp_iotlb_init(struct iotlb_entry *e, u32 da, u32 pa,
> +                                                       u32 pgsz)
> +{
> +       e->da = da;
> +       e->pa = pa;
> +       e->valid = 1;
> +       e->prsvd = 1;
> +       e->pgsz = pgsz & MMU_CAM_PGSZ_MASK;
> +       e->endian = MMU_RAM_ENDIAN_LITTLE;
> +       e->elsz = MMU_RAM_ELSZ_32;
> +       e->mixed = 0;
> +}
> +
>  #endif /* _TIOMAP_ */
> diff --git a/drivers/dsp/bridge/core/io_sm.c b/drivers/dsp/bridge/core/io_sm.c
> index 7fb840d..1f47f8b 100644
> --- a/drivers/dsp/bridge/core/io_sm.c
> +++ b/drivers/dsp/bridge/core/io_sm.c
> @@ -290,6 +290,8 @@ int bridge_io_on_loaded(struct io_mgr *hio_mgr)
>         struct cod_manager *cod_man;
>         struct chnl_mgr *hchnl_mgr;
>         struct msg_mgr *hmsg_mgr;
> +       struct iommu *mmu;
> +       struct iotlb_entry e;
>         u32 ul_shm_base;
>         u32 ul_shm_base_offset;
>         u32 ul_shm_limit;
> @@ -312,7 +314,6 @@ int bridge_io_on_loaded(struct io_mgr *hio_mgr)
>         struct bridge_ioctl_extproc ae_proc[BRDIOCTL_NUMOFMMUTLB];
>         struct cfg_hostres *host_res;
>         struct bridge_dev_context *pbridge_context;
> -       u32 map_attrs;
>         u32 shm0_end;
>         u32 ul_dyn_ext_base;
>         u32 ul_seg1_size = 0;
> @@ -336,6 +337,21 @@ int bridge_io_on_loaded(struct io_mgr *hio_mgr)
>                 status = -EFAULT;
>                 goto func_end;
>         }
> +
> +       mmu = pbridge_context->dsp_mmu;
> +
> +       if (mmu)
> +               iommu_put(mmu);
> +       mmu = iommu_get("iva2");

+       mmu = iommu_get("iva2", mmu_fault_isr);

I'm considering that it might be better to pass a mmu fault callback
at this iommu_get.

What do you think?

  parent reply	other threads:[~2010-07-02  6:32 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-01  0:20 [PATCH 0/9] dspbridge: iommu migration Fernando Guzman Lugo
2010-07-01  0:20 ` [PATCH 1/9] dspbridge: replace iommu custom for opensource implementation Fernando Guzman Lugo
2010-07-01  0:20   ` [PATCH 2/9] dspbridge: move shared memory iommu maps to tiomap3430.c Fernando Guzman Lugo
2010-07-01  0:20     ` [PATCH 3/9] dspbridge: rename bridge_brd_mem_map/unmap to a proper name Fernando Guzman Lugo
2010-07-01  0:20       ` [PATCH 4/9] dspbridge: remove custom mmu code from tiomap3430.c Fernando Guzman Lugo
2010-07-01  0:20         ` [PATCH 5/9] dspbridge: add mmufault support Fernando Guzman Lugo
2010-07-01  0:20           ` [PATCH 6/9] dspbridge: remove hw directory Fernando Guzman Lugo
2010-07-01  0:20             ` [PATCH 7/9] dspbridge: move all iommu related code to a new file Fernando Guzman Lugo
2010-07-01  0:20               ` [PATCH 8/9] dspbridge: add map support for big buffers Fernando Guzman Lugo
2010-07-01  0:21                 ` [PATCH 9/9] dspbridge: cleanup bridge_dev_context and cfg_hostres structures Fernando Guzman Lugo
2010-07-01 23:36                 ` [PATCH 8/9] dspbridge: add map support for big buffers Kanigeri, Hari
2010-07-02 16:27                   ` Guzman Lugo, Fernando
2010-07-02 17:02                     ` Kanigeri, Hari
2010-07-02 18:39                       ` Guzman Lugo, Fernando
2010-08-24 10:09                         ` Felipe Contreras
2010-08-24 16:31                           ` Guzman Lugo, Fernando
2010-08-24 17:46                             ` Felipe Contreras
2010-08-24 18:44                               ` Guzman Lugo, Fernando
2010-08-24 18:55                                 ` Felipe Contreras
2010-08-24 19:05                                   ` Guzman Lugo, Fernando
2010-08-24 19:13                                     ` Felipe Contreras
2010-08-24 19:30                                       ` Guzman Lugo, Fernando
2010-08-24 21:17                                         ` Felipe Contreras
2010-08-24 21:55                                           ` Guzman Lugo, Fernando
2010-08-25  6:05                                             ` Felipe Contreras
2010-08-25 16:00                                               ` Guzman Lugo, Fernando
2010-08-25 19:18                                                 ` Felipe Contreras
2010-08-25 19:42                                                   ` Guzman Lugo, Fernando
2010-08-26 10:04                                                     ` Felipe Contreras
2010-08-26 13:00                                                       ` Guzman Lugo, Fernando
2010-08-26  6:55                 ` FUJITA Tomonori
2010-08-26 12:38                   ` Guzman Lugo, Fernando
2010-08-26 12:56                     ` FUJITA Tomonori
2010-08-26 13:16                       ` Guzman Lugo, Fernando
2010-08-26 14:03                         ` FUJITA Tomonori
2010-08-26 14:13                           ` Guzman Lugo, Fernando
2010-07-02  6:27           ` [PATCH 5/9] dspbridge: add mmufault support Hiroshi DOYU
2010-07-02 16:37             ` Guzman Lugo, Fernando
2010-07-02  6:32   ` Hiroshi DOYU [this message]
2010-07-02 16:40     ` [PATCH 1/9] dspbridge: replace iommu custom for opensource implementation Guzman Lugo, Fernando

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=20100702.093205.59662898.Hiroshi.DOYU@nokia.com \
    --to=hiroshi.doyu@nokia.com \
    --cc=ameya.palande@nokia.com \
    --cc=felipe.contreras@nokia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=ohad@wizery.com \
    --cc=x0095840@ti.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®