Linux on ARM based TI OMAP SoCs
 help / color / mirror / Atom feed
From: "Guzman Lugo, Fernando" <fernando.lugo@ti.com>
To: "Kanigeri, Hari" <h-kanigeri2@ti.com>,
	"linux-omap@vger.kernel.org" <linux-omap@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Cc: "ohad@wizery.com" <ohad@wizery.com>,
	Hiroshi DOYU <Hiroshi.DOYU@nokia.com>,
	"ameya.palande@nokia.com" <ameya.palande@nokia.com>,
	"felipe.contreras@nokia.com" <felipe.contreras@nokia.com>
Subject: RE: [PATCHv3 5/9] dspbridge: add mmufault support
Date: Thu, 1 Jul 2010 12:54:30 -0500	[thread overview]
Message-ID: <496565EC904933469F292DDA3F1663E602CBDD373C@dlee06.ent.ti.com> (raw)
In-Reply-To: <8F7AF80515AF0D4D93307E594F3CB40E4CA563BC@dlee03.ent.ti.com>



Hi Hari,

> -----Original Message-----
> From: Kanigeri, Hari
> Sent: Thursday, July 01, 2010 12:17 PM
> To: Guzman Lugo, Fernando; linux-omap@vger.kernel.org; linux-
> kernel@vger.kernel.org
> Cc: ohad@wizery.com; hiroshi.doyo@nokia.com; ameya.palande@nokia.com;
> felipe.contreras@nokia.com; Guzman Lugo, Fernando
> Subject: RE: [PATCHv3 5/9] dspbridge: add mmufault support
> 
> Hi Fernando,
> 
> > +int mmu_fault_isr(struct iommu *mmu)
> >
> > -/*
> > - *  ======== mmu_check_if_fault =======
> > - *      Check to see if MMU Fault is valid TLB miss from DSP
> > - *  Note: This function is called from an ISR
> > - */
> > -static bool mmu_check_if_fault(struct bridge_dev_context *dev_context)
> >  {
> > +	struct deh_mgr *dm;
> > +	u32 da;
> > +
> > +	dev_get_deh_mgr(dev_get_first(), &dm);
> > +
> > +	if (!dm)
> > +		return -EPERM;
> > +
> > +	da = iommu_read_reg(mmu, MMU_FAULT_AD);
> > +	iommu_write_reg(mmu, 0, MMU_IRQENABLE);
> 
> -- Isn't the MMU already enabled at this point when the function callback
> is called by iommu ?

This line is actually disabling the interrupts. I am writing "0x0" in the MMU_IRQENABLE.

> 
> > +	dm->err_info.dw_val1 = da;
> > +	tasklet_schedule(&dm->dpc_tasklet);
> 
> -- The iommu fault isr disables the IOMMU at the end of the fault handler,
> so by the time your tasklet is scheduled you might have the MMU in a
> disabled state. Looks to me either this requires change in iommu to remove
> the disable part or enable the MMU in the tasklet instead of doing it
> early in mmu_fault_isr.

I am returning 0 in the callback function, that means the callback function has managed the fault and the mmu_fault_isr does not do anything else


	if (obj->isr)
		err = obj->isr(obj);

	if (!err)
		return IRQ_HANDLED;

it is working for me without not modifications in the iommu_fault_handler function.

Thanks for the comments,
Fernando.

> 
> Thank you,
> Best regards,
> Hari

  reply	other threads:[~2010-07-01 17:54 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-30 23:59 [PATCHv3 0/9] dspbridge: iommu migration Fernando Guzman Lugo
2010-06-30 23:59 ` [PATCHv3 1/9] dspbridge: replace iommu custom for opensource implementation Fernando Guzman Lugo
2010-06-30 23:59   ` [PATCHv3 2/9] dspbridge: move shared memory iommu maps to tiomap3430.c Fernando Guzman Lugo
2010-06-30 23:59     ` [PATCHv3 3/9] dspbridge: rename bridge_brd_mem_map/unmap to a proper name Fernando Guzman Lugo
2010-06-30 23:59       ` [PATCHv3 4/9] dspbridge: remove custom mmu code from tiomap3430.c Fernando Guzman Lugo
2010-06-30 23:59         ` [PATCHv3 5/9] dspbridge: add mmufault support Fernando Guzman Lugo
2010-06-30 23:59           ` [PATCHv3 6/9] dspbridge: remove hw directory Fernando Guzman Lugo
2010-06-30 23:59             ` [PATCHv3 7/9] dspbridge: move all iommu related code to a new file Fernando Guzman Lugo
2010-07-01  0:00               ` [PATCHv3 8/9] dspbridge: add map support for big buffers Fernando Guzman Lugo
2010-07-01  0:00                 ` [PATCHv3 9/9] dspbridge: cleanup bridge_dev_context and cfg_hostres structures Fernando Guzman Lugo
2010-07-01 17:16           ` [PATCHv3 5/9] dspbridge: add mmufault support Kanigeri, Hari
2010-07-01 17:54             ` Guzman Lugo, Fernando [this message]
2010-07-01 18:04               ` Kanigeri, Hari
2010-07-01 18:26                 ` Guzman Lugo, Fernando
2010-07-01  0:09 ` [PATCHv3 0/9] dspbridge: iommu migration 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=496565EC904933469F292DDA3F1663E602CBDD373C@dlee06.ent.ti.com \
    --to=fernando.lugo@ti.com \
    --cc=Hiroshi.DOYU@nokia.com \
    --cc=ameya.palande@nokia.com \
    --cc=felipe.contreras@nokia.com \
    --cc=h-kanigeri2@ti.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=ohad@wizery.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