From: b-cousson@ti•com (Cousson, Benoit)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH 0/6] omap: iommu: hwmod support and code reorganization
Date: Mon, 8 Nov 2010 16:56:35 -0500 [thread overview]
Message-ID: <4CD87213.7050509@ti.com> (raw)
In-Reply-To: <AANLkTinzR9uj816_o+j-1121Aw8Qc_p4uBGHRA31LU7f@mail.gmail.com>
On 11/7/2010 10:43 AM, Ramirez Luna, Omar wrote:
> On Sat, Nov 6, 2010 at 1:31 PM, Cousson, Benoit<b-cousson@ti•com> wrote:
>> s/ducati/ipu/
>> s/tesla/dsp/
>>
>> Please do not use internal codename for the changelog or even for the code.
>
> I picked this terminology from the driver, I didn't want to cause
> confusion, agree to the change.
>
>> On 11/5/2010 9:19 PM, Ramirez Luna, Omar wrote:
>>>
>>> Boot tested on omap 3430 and 3630, functionality on iva2 only.
>>>
>>> Introduced hwmod data and support for omap3 (iva2 mmu& isp mmu) and
>>> omap4 (ducati mmu& tesla mmu).
>>>
>>> Minor cleanup due to this changes.
>>>
>>> There is an issue (present without patches too):
>>>
>>> Doing a cycle of insmod-rmmod to iommu module and then full
>>> insmod of bridgedriver (with all dependencies) causes the next
>>> read of iommu registers to dump an unhandled fault log; this,
>>> because when rmmod of iommu is called it tries to clean the
>>> iommu tables and flush any old entry prior to removing the driver,
>>> however these reads/writes are attempted while the MMU is under
>>> reset and will timeout on the L3 IVA target agent, which will leave
>>> MMU unusable until the proper restore sequence to clear this L3
>>> error is executed.
>>>
>>> Fix would be to move page table allocation to iommu get and its
>>> correspondent free to iommu put, however it will fall entirely
>>> under iommu user responsibility, as it needs to clear the mmu
>>> reset bit, before calling iommu functions that read/write into
>>> mmu registers (which should apply only for first boot or on
>>> baseimage reload); trading this restriction in order to keep
>>> the same generic iommu code for all omap iommu devices.
>>>
>>> This issue has been seen on omap3 iva2 mmu, same restriction should
>>
>> I'm still not really understanding that issue.
>> In theory, the reset is deasserted when the omap_device is enabled and will
>> be re-asserted when the omap_device will be disable.
>
> Probably I'm missing the bits telling hwmod to handle its reset bit, I
> will recheck.
After reading the other patches of that series, this is what I realized
as well. You need the entries with hw reset information to make that works.
>
>> Why is the mmu already under reset when the iommu is trying to clean the
>> tables?
>
> However, the driver disables the device on a call named iommu_put
> (where, from your comment, reset should be re-asserted ), and cleans
> the TLBs and page tables on removal of the driver (after iommu_put).
>
>> Could please describe the complete sequence?
>
> I'm assuming the dependencies are installed.
>
> on boot up:
> 1. insmod iommu.ko
> - device_enable is not called, unless a call to iommu_get is given,
> this will mean that the driver has one user and thus device_enable is
> called (however right now it doesn't matter if you call iommu_get or
> not)
>
> 2. rmmod iommu.ko
> - remove function will try to cleanup the TLBs writing into MMU
> registers, since MMU is on reset it will trigger a timeout on its TA.
>
> 3. insmod bridgedriver.ko
> - it is dependent on iommu.ko so it should have been installed before.
> Whenever bridge calls iommu_get, the external abort will be caused due
> to a read to MMU.
>
> As I commented, cleaning the page tables could be moved from driver's
> remove function to iommu_put, if omap device enable/disable is
> handling the reset bit probably this issue shouldn't be hit.
Yep, I think so as well.
Regards,
Benoit
next prev parent reply other threads:[~2010-11-08 21:56 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-06 1:19 [PATCH 0/6] omap: iommu: hwmod support and code reorganization Omar Ramirez Luna
2010-11-06 1:19 ` [PATCH 1/6] omap: iommu: remove redundant clock usage Omar Ramirez Luna
2010-11-06 19:11 ` Cousson, Benoit
2010-11-07 15:55 ` Ramirez Luna, Omar
2010-11-06 1:19 ` [PATCH 2/6] OMAP3: hwmod data: Add mmu for iva2 and isp Omar Ramirez Luna
2010-11-06 19:15 ` Cousson, Benoit
2010-11-07 16:00 ` Ramirez Luna, Omar
2010-11-08 23:05 ` Cousson, Benoit
2010-11-08 23:52 ` Ramirez Luna, Omar
2010-11-06 1:19 ` [PATCH 3/6] OMAP4: hwmod data: add mmu hwmod for ducati and tesla Omar Ramirez Luna
2010-11-06 20:47 ` Cousson, Benoit
2010-11-07 16:18 ` Ramirez Luna, Omar
2010-11-08 23:21 ` Cousson, Benoit
2010-11-08 23:48 ` Ramirez Luna, Omar
2010-11-09 0:03 ` Cousson, Benoit
2010-11-06 1:19 ` [PATCH 4/6] omap: iommu: intial hwmod support Omar Ramirez Luna
2010-11-06 21:05 ` Cousson, Benoit
2010-11-07 16:21 ` Ramirez Luna, Omar
2010-11-06 1:19 ` [PATCH 5/6] omap: iommu: hwmod device enable/disable routines Omar Ramirez Luna
2010-11-06 21:17 ` Cousson, Benoit
2010-11-07 16:24 ` Ramirez Luna, Omar
2010-11-06 1:19 ` [PATCH 6/6] omap: iommu: code reorganization and cleanup Omar Ramirez Luna
2010-11-06 8:34 ` Felipe Contreras
2010-11-07 16:29 ` Ramirez Luna, Omar
2010-11-06 21:28 ` Cousson, Benoit
2010-11-07 16:27 ` Ramirez Luna, Omar
2010-11-06 1:32 ` [PATCH 0/6] omap: iommu: hwmod support and code reorganization Ramirez Luna, Omar
2010-11-06 18:31 ` Cousson, Benoit
2010-11-07 15:43 ` Ramirez Luna, Omar
2010-11-08 21:56 ` Cousson, Benoit [this message]
2010-11-06 18:56 ` Cousson, Benoit
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=4CD87213.7050509@ti.com \
--to=b-cousson@ti$(echo .)com \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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