Commit Graph

91 Commits

Author SHA1 Message Date
LuK1337 fc9499e55a Import latest Samsung release
* Package version: T713XXU2BQCO

Change-Id: I293d9e7f2df458c512d59b7a06f8ca6add610c99
2017-04-18 03:43:52 +02:00
Prakash Gupta c8e54b69dc iommu: msm: fix attach_count in case of iommu_attach failure
In msm_iommu_attach_dev call, post incrementing ctx_drvdata->attach_count
in case of any failure attach_count will remain incremented.
This causes subsequent attach attempts to incorrectly take
the path of already_attached.

[ 9646.705235] msm_iommu_sec: scm call IOMMU_SECURE_CFG failed
[ 9646.710840] kgsl kgsl-3d0: |kgsl_attach_pagetable_iommu_domain|
Failed to attach device, err -12

(struct msm_iommu_drvdata *)0xFFFFFFC0AF2A7998 = 0xFFFFFFC0AF2A7998 =
__bss_stop+0xAD50E228 ->
[D:0xFFFFFFC0AF2A7A10] sec_id = 18 = 0x12,
[D:0xFFFFFFC0AF2A7A18] dev = 0xFFFFFFC0AF78C210 = __bss_stop+0xAD9F2AA0,
[D:0xFFFFFFC0AF2A7A3C] ctx_attach_count = 0 = 0x0, --> no context attached
[D:0xFFFFFFC0AF2A7A44] needs_rem_spinlock = 0 = 0x0,
[D:0xFFFFFFC0AF2A7A48] powered_on = 0 = 0x0,
[D:0xFFFFFFC0AF2A7A4C] model = 500 = 0x01F4)

(struct msm_iommu_ctx_drvdata *)0xFFFFFFC0ADC87218 = 0xFFFFFFC0ADC87218 =
__bss_stop+0xABEEDAA
[D:0xFFFFFFC0ADC87218] num = 0 = 0x0,
[D:0xFFFFFFC0ADC87220] pdev = 0xFFFFFFC0AE5CB180 = __bss_stop+0xAC831A10,
[D:0xFFFFFFC0ADC87238] attached_domain = 0x0 = ,
[D:0xFFFFFFC0ADC87240] name = 0xFFFFFFC001E06CF0 = __bss_stop+0x6D580,
[D:0xFFFFFFC0ADC87454] attach_count = 2 = 0x2, --> a Context attached.
[D:0xFFFFFFC0ADC8765C] report_error_on_fault = FALSE)

Change-Id: Ib6405ea1cab0ee87978271308a0891d66edbaf61
Signed-off-by: Prakash Gupta <guptap@codeaurora.org>
2016-11-28 23:16:29 -08:00
Linux Build Service Account fb8c53ef68 Merge "iommu: msm: add notifier calling for sync_tlb issues" 2015-07-23 02:41:08 -07:00
Chintan Pandya 3e4c4c738c iommu: msm: do tight polling for TLBSTATUS checking
Delay of 50us between successive TLBSTATUS check is too
huge when we call map/unmap quite frequently. This reduces
the performance. So instead use very minimal delay (1us)
between 2 successive checks.

Change-Id: Iaa7d9d2bae93bd7004a1f42e8d2936f28f8f11a8
Signed-off-by: Chintan Pandya <cpandya@codeaurora.org>
2015-07-21 05:29:47 -07:00
Chintan Pandya 80e991ebfb iommu: msm: add notifier calling for sync_tlb issues
When sync_tlb gets timeout, respective client needs some
notification to get debug info from their device  point
of view. So, add the notifier calling routine and not
just limit it to some debug defconfig.

Change-Id: I532022e38af0f4db9d12048c02e19663cd284a8e
Signed-off-by: Chintan Pandya <cpandya@codeaurora.org>
2015-07-21 04:53:51 -07:00
Chintan Pandya 9cc42a5570 iommu: msm: Use TLBIVA for unmapping exactly 1 PTE
This SMMU driver now supports use-cases where large
numbers of buffers each being 4K in size getting
mapped and unmapped very frequently. Doing TLBIASID
is costly for every such unmap. So, provide support
for TLBIVA again.

Change-Id: I58d04d91231c5da0dc3e0b92082eb515630a69ce
Signed-off-by: Chintan Pandya <cpandya@codeaurora.org>
2015-06-13 16:12:46 +05:30
Chintan Pandya 5ab7ef8486 iommu: msm: flush page tables at the end after map/unmap
Flushing the cache for each PTE update could be very time
consuming if the number of PTEs getting updated are in
order of few thousands. Instead, don't perform cache ops
for each PTE update and flush the updated page table once
at the end of map/unmap routine. This saves roughly 60%
of the total time spent by map/unmap calls. Few numbers
with/without this optimization applied.

Numebrs are taken at Cortex-A53 single core clocked at
1.2 GHz.

AARCH64 (without optimization)
    size iommu_map_range  iommu_unmap
     64K           14 us         9 us
      2M          176 us        16 us
     12M         1016 us        54 us
     20M         1809 us       100 us

AARCH64 (with optimization)
    size iommu_map_range  iommu_unmap
     64K           18 us        12 us
      2M           77 us        18 us
     12M          396 us        47 us
     20M          648 us        73 us

Change-Id: I5c5f9e5cec5a7aed5b478be52d943fcaa1c0ed84
Signed-off-by: Chintan Pandya <cpandya@codeaurora.org>
2015-06-13 16:10:18 +05:30
Linux Build Service Account 8e98f6d5b5 Merge "iommu: msm: Introduce AARCH64 page table format" 2015-06-04 04:37:42 -07:00
Chintan Pandya f879574c6c iommu: msm: Introduce AARCH64 page table format
Some clients can generate 48/49 bit virtual address.
Support those clients by AARCH64 page table format.

Change-Id: Ic8d9a12e990f13ffebd6be6c81506d6bcc421f05
Signed-off-by: Chintan Pandya <cpandya@codeaurora.org>
2015-06-03 18:49:21 +05:30
Chintan Pandya 9f4508f124 iommu: msm: allow CBs to report an error when faults
Some clients of IOMMU treats the CB fault as non-recoverable
and they may want to trap the fault for debug purpose. Provide
that provision via context bank DT property.

Change-Id: Icb9cb67ed3dac44e144fcd7bc85deca833bf941c
Signed-off-by: Chintan Pandya <cpandya@codeaurora.org>
2015-05-20 12:56:31 +05:30
Chintan Pandya c35ff72562 iommu: msm: consider only fault indicators from FSR
Bit[9] and Bit[10] of an FSR register indicates the
page table format of the context bank and can be
non-zero even if there is no fault recorded into FSR.
Only first 9 bits [8:0] indicates type of fault 'at'
the time of fault. So, fix the false positive by just
checking over fault indicator bits only.

Change-Id: Id7c37d8d0b26002156ae3b829e3a11fb7a631fed
Signed-off-by: Chintan Pandya <cpandya@codeaurora.org>
2015-05-04 16:36:46 +05:30
Vinayak Menon 9a109614b4 iommu: msm: make iommu map and unmap atomic
Certain use cases require iommu map and unmap functions
to be called from atomic context. Remove all sleeping
calls and fix the locks to make these functions atomic.
The secure map and unmap functions are still non-atomic
since they have to invoke smc calls which are sleeping
functions right now.

Change-Id: I802b1aed98d30bf75b381fadcb5fc68978618a3f
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
2015-04-24 20:06:03 +05:30
Vinayak Menon ab38a29dff iommu: msm: remove CONFIG_MSM_IOMMU_TLBINVAL_ON_MAP
Remove CONFIG_MSM_IOMMU_TLBINVAL_ON_MAP and the code
protected by it, since there is no known case now,
which requires a tlb invalidate during a map.

Change-Id: Ia9566dfadbb24345e4bcc66111dd0013a53e1b1c
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
2015-04-24 18:58:04 +05:30
Chintan Pandya e42549ecd2 iommu: msm: Correct the data type mis-matches in VA
MSM IOMMU driver presently supports mapping of virtual
addresses of 32-bit long only. Because of this, 32-bit
long virtual address was okay and some mis-matches were
silent. This is harmless but still buggy. Also, for
64-bit virtual address mapping, some API needs update.

Make input virtual address always 'unsigned long' and
trunk (if necessary) based on the page table format.

Change-Id: I5d761246b0e150d9a0d22a9ae25581b5205e0594
Signed-off-by: Chintan Pandya <cpandya@codeaurora.org>
2015-03-25 18:08:39 +05:30
Chintan Pandya 8be859ed7f iommu: msm: Invalidate properly from iommu_unmap
TLB invalidation by VA will work for the given VA and
not the range of VA. So, for a region that spreads
across multiple PTEs, that need to call TLBIVA multiple
times. This is un-optimized.

Anyways, the present implementation also support single
TLBIVA only for the first VA and rest may be kept in
TLB as is. This is a problem. Fix this by upgrading
TLBIVA with TLBIASID which will do invalidation for
all the VAs for matching ASID.

We may still skip fixing this in iommu_map as iommu_map
is still indeed mapping one VA at a time.

Change-Id: I6c833e62fd47d9c11457ef90cdd322b6f751c698
Signed-off-by: Chintan Pandya <cpandya@codeaurora.org>
2015-03-23 13:16:05 +05:30
Laura Abbott b7c64d2138 drivers: iommu: Add iommu_map_sg for msm_iommu
iommu_map_sg is the newer, preferred API. Add a wrapper around
the existing map_range API for map_sg. Once all clients have been
successfully converted map_range can be removed.

Change-Id: Ib77c86f6b12b00b2bd83a4938465dc685faea624
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
2015-03-12 16:58:54 -07:00
Jeremy Gebben c95cd8e218 msm: iommu: add support for DOMAIN_ATTR_PT_BASE_ADDR
Allow clients to querey pagetable addresses via this
attribute instead of the non-standard iommu_get_pt_base_addr()
function.

Change-Id: Ide61f4cb5cec4b2e67fd035aa59e154b5dfca8d0
Signed-off-by: Jeremy Gebben <jgebben@codeaurora.org>
2015-02-17 13:30:52 -08:00
Linux Build Service Account 4f45200567 Merge "iommu: msm: Do not flush tlb on detach" 2015-01-31 05:18:11 -08:00
Shubhraprakash Das ea1dacf87b iommu: msm: Do not flush tlb on detach
When detaching the IOMMU device there is no need to flush the
TLB. The detach can be called from drivers to recover from IOMMU
pipe lockups, if IOMMU pipe is stuck then the flush will not
complete which prevents client drivers from resetting IOMMU.

Change-Id: I03d99398692b2942497b50c3b6367a1dd1d63cfc
Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
2015-01-19 15:14:02 -08:00
Linux Build Service Account 5e07ddb66f Merge "iommu: msm: move msm_iommu_register_notify" 2015-01-17 04:31:07 -08:00
Mitchel Humpherys 6689076f96 iommu: msm: move msm_iommu_register_notify
It's currently inside an `#ifdef CONFIG_MSM_IOMMU_VBIF_CHECK', which is
incorrect since it doesn't actually depend on that config.  Drivers that
want to use it fail to link when CONFIG_MSM_IOMMU_V1=y &&
CONFIG_MSM_IOMMU_VBIF_CHECK=n.  Move it out and export it while we're at
it.

Change-Id: I48dc655fbd1558871704aa40e065e1002e836308
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
2015-01-14 15:12:06 -08:00
Ujwal Patel 3970faaedb iommu: msm: fix vbif base address during tlb sync operation
If tlb sync is not complete to due some reason, recovery sequence is
performed on a client vbif. However vbif base address to perform this
recovery sequence is incorrect and leads to xpu violation. Fix the vbif
base address to prevent unintentional register access.

Change-Id: I8cffffa1f0f3e30116fd245c7b6e8f2c61ce847e
Signed-off-by: Ujwal Patel <ujwalp@codeaurora.org>
Signed-off-by: Siddhartha Agrawal <agrawals@codeaurora.org>
2015-01-13 10:01:47 -08:00
Mitchel Humpherys 76f6a85762 iommu: msm: add notifier chain for IOMMU events
There are some events that IOMMU client drivers might like to be
notified about.  Add a notifier chain for this purpose.  Currently the
only supported event is TLB sync timeout.

Change-Id: I4f04e856c9a809f49afb857de8047a8ac2d02a92
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
2015-01-06 19:27:15 -08:00
Mitchel Humpherys 55f4a14f62 iommu: msm: actually disable L2 redirect when CONFIG_IOMMU_PGTABLES_L2=n
We recently moved the L2 redirect configuration to a domain attribute
[dffd6f05e94f: "iommu: msm: move L2 redirect to a domain attribute"].
This allows us to do away with some divergence in the generic IOMMU
APIs.  However, that commit botched the case when
CONFIG_IOMMU_PGTABLES_L2 is disabled.  In that case we actually always
set the page tables to be shared, exactly the opposite of what we want.
Fix this.

Change-Id: I47837584ae88fbc0be578500d20c2a62a9b33bca
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
2014-12-03 15:45:23 -08:00
Mitchel Humpherys 27df4148a6 iommu: msm: move L2 redirect to a domain attribute
We will soon be removing the `flags' parameter from iommu_domain_alloc
and iommu_ops.domain_init. In preparation for this, move the L2 redirect
flag to a domain attribute.

We now no longer need the extra parameter to iommu_domain_alloc which
was added in [8984b0e30df: "drivers: iommu: Add flags to
iommu_domain_alloc"] since we're changing the way L2 redirect is
configured. Remove it.

Change-Id: Ie0d15767ca08211740d22568683fae01e8123a26
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
2014-12-03 15:45:23 -08:00
Shiraz Hashim 57baf4b344 iommu: msm: perform tlb sync after invalidate
For SMMU, invalidation operation consist of 3 steps.

1) Give invalidation command
2) Give SYNC command
3) Check the status bit and confirm whether TLB operation
  has completed or not.

Fix this sequence in the driver.

Change-Id: I60cefb313b359134367a48528bebe554487d436a
Signed-off-by: Chintan Pandya <cpandya@codeaurora.org>
2014-10-27 17:59:34 +05:30
Chintan Pandya e0e807df91 iommu: msm: Use CB index as ASID
ASID conflict between 2 CBs can lead to some odd behavior
of SMMU. Present way of ASID allotment can conflict with
the ASID being used by secure world. Use the CB number
as ASID. That will ensure that we will not use any other
ASID which secure world may think of using it.

Change-Id: I622d5c1aee7dac5913706588ae7ff1c490a2981c
Signed-off-by: Chintan Pandya <cpandya@codeaurora.org>
2014-10-27 17:40:58 +05:30
Neeti Desai 21e5bca71b msm_iommu: Check for NULL pointer in msm_detach_dev
The device struct may be passed as NULL into the msm_detach_dev
function. Add check to prevent NULL pointer dereferencing.

Change-Id: I4123b60969358cd4ff9ad20b76257405aacc4257
Signed-off-by: Neeti Desai <neetid@codeaurora.org>
2014-08-18 16:57:36 -07:00
Neeti Desai 704097123c iommu: msm: Do not invalidate the TLB during iommu map
Due to a hardware bug the TLB has to be invalidated
during map and map_range operations. Newer targets
no longer see this issue. Add config option
to invalidate the TLB only for older targets.

Change-Id: I5bbe84e9dde23bcf960cf5409eed41c6cea41c16
Signed-off-by: Neeti Desai <neetid@codeaurora.org>
2014-07-28 12:36:59 -07:00
Linux Build Service Account e1dfe27e49 Merge "iommu: msm: Fix potential page table use after free" 2014-05-23 06:39:23 -07:00
Olav Haugan e941a9106f iommu: msm: Fix potential page table use after free
When an address is unmapped from the page tables there is a short period
of time between the code freeing the page table back to the memory
subsystem and the code issuing a TLB invalidate on the IOMMU hardware
when the IOMMU could be accessing the page table that has been freed.
This can cause the IOMMU to translate a virtual address to a bogus
physical address which can cause system instability.

Instead of freeing the page before doing a TLB invalidate we keep a
shadow table that keeps track of the pointers to the page tables and the
number of outstanding mappings. We can thus zero out the real page
table, do a TLB invalidate, and then free the pages through the shadow
page table entries.

Change-Id: Ifb677ea8033fb35d8a98c1f00c9aaa9bcfe0b2d0
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
2014-05-22 17:11:08 -07:00
Linux Build Service Account 2ef85ef4a1 Merge "msm: iommu: Add support for updating mask register for smmu" 2014-05-21 21:24:40 -07:00
Neeti Desai b28a099edd msm: iommu: Add support for updating mask register for smmu
For some of the smmus's the number of unique stream
ids is more than the number of Stream Mapping
Table entries. The mask field of the SMRn register
needs to updated to handle the correct mapping
behaviour.

Change-Id: I72a2ffe538a6078320c65575d1b007e4114401a4
Signed-off-by: Neeti Desai <neetid@codeaurora.org>
2014-05-20 11:38:09 -07:00
Chintan Pandya 3da99d7102 iommu: msm: Apply register offset with proper base address
Now we are dumping both global space registers and context
bank registers as a part of page fault handler. Pass
proper base addresses for both of them.

Change-Id: I4d5cbdc508100cbcb5f5960a209d01cadac3904b
Signed-off-by: Chintan Pandya <cpandya@codeaurora.org>
2014-05-08 17:46:18 +05:30
Chintan Pandya 4df11675c4 iommu: msm: Re-enable Context caching for MMU-500
Original intent:

MMU-500 implements context caching in TLBs and prefetch
buffers of IOMMU. Enabling them would boost performance.
But this implementation is different from what present
SMMU driver expects. So, configure auxiliary registers
for MMU-500.

Reason for re-enable:

Context caching was reverted due to strange issues of
Permission faults at SMMU when this was enabled. Now,
that issue is fixed. Re-enable this feature for
performance needs.

Change-Id: I63829358e501d4c6f7526d5b59a31ab23b1cd0d8
Signed-off-by: Chintan Pandya <cpandya@codeaurora.org>
2014-04-16 21:05:05 +05:30
Chintan Pandya 62bdcef825 iommu: msm: Verify page table corruption when page fault happens
Page faults often leads to doubt of either page table corruption
in DDR or the malfunctioning of the IOMMU. To rule out that, we
can walk through the page tables and get actual translation with
the faulty VA. If physical address from the page table is expected,
we can doubt IOMMU malfunctioning, or otherwise, page table
corruption.

Change-Id: Icef69e7a50ce3110fc83ca75b4a984057336b5bb
Signed-off-by: Chintan Pandya <cpandya@codeaurora.org>
2014-04-16 21:04:57 +05:30
Chintan Pandya e44f54f63a Revert "iommu: msm: Enable Context caching for MMU-500"
This reverts commit 0f2211398a.

Context caching is resulting into page faults at SMMU.
Disable context caching until we find proper fix for
those faults.

Change-Id: I21bade2795be1649c18bbc75800e57683999c2a8
Signed-off-by: Chintan Pandya <cpandya@codeaurora.org>
2014-04-08 16:06:15 +05:30
Chintan Pandya 0f2211398a iommu: msm: Enable Context caching for MMU-500
MMU-500 implements context caching in TLBs and prefetch
buffers of IOMMU. Enabling them would boost performance.
But this implementation is different from what present
SMMU driver expects. So, configure auxiliary registers
for MMU-500.

Change-Id: Ife23428315ccec01cf40d4d2409b3640a38c20bb
Signed-off-by: Chintan Pandya <cpandya@codeaurora.org>
2014-04-01 17:58:24 +05:30
Chintan Pandya 68d9da8026 iommu: msm: Support different implementations
Within SMMUv2, different implementation have
different Software interface. Support IOMMU
driver to be compatible with MMU-500.

Change-Id: I7d18c5aad82acafa317fe95b021e29b992a082be
Signed-off-by: Chintan Pandya <cpandya@codeaurora.org>
2014-04-01 17:54:58 +05:30
Olav Haugan 8e15c56806 iommu: msm: Move location of local iommu halt
During iommu detach we do a local iommu halt to ensure certain
registers are atomically updated. However, the local iommu halt
is taken at a larger scope than needed. Reduce the scope of this
halt. This will help with performance when detaching a context bank
from an iommu that has another context bank in use.

Change-Id: Id7630bd73a71d38ee987bd0f19cc8e06c725a7c1
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
2014-03-27 16:21:17 -07:00
Chintan Pandya 0624c3128e iommu: msm: Enable aggregated CB interrupts for secure SMMUs also
Present logic of enabling aggregated CB interrupts works only
for non-secure SMMUs. Improvise that logic to enable interrupts
for secure SMMUs also.

Change-Id: I77f914de760562ce30b7ade512a12639eb84af6d
Signed-off-by: Chintan Pandya <cpandya@codeaurora.org>
2014-03-12 07:19:30 +05:30
Shiraz Hashim 3bf1903518 iommu: fix header file inclusion due to movement
Header files are no longer allowed in the directory
arch/arm/mach-msm/include/mach/ and they have
been moved to their right places. Fix all header
inclusion impacted by this in iommu driver.

Change-Id: I36b8ba5d32f27ce9290edc840478214e4e8929c4
Signed-off-by: Chintan Pandya <cpandya@codeaurora.org>
2014-03-08 04:11:00 +05:30
Larry Bassel 9435beaa25 iommu: move iommu header files to new locations
Header files are no longer allowed in the directory
arch/arm/mach-msm/include/mach/ .

Move the iommu related header files to a more suitable place.

Change-Id: Ib7bbce1485d6185f669935b507040cac75368985
Signed-off-by: Larry Bassel <lbassel@codeaurora.org>
2014-03-03 12:28:12 -08:00
Larry Bassel 76c5d9e1d9 iommu: clean up includes
The file mach/msm_bus.h should not be included,
instead the file linux/msm-bus.h should be.
Also remove an unneeded include.

Change-Id: I6e060739977f8604409f660c72c9a983eaddfa45
Signed-off-by: Larry Bassel <lbassel@codeaurora.org>
2014-02-25 16:24:17 -08:00
Olav Haugan 9916f48440 iommu: msm: Make VFE SMMU conditionally secure
VFE SMMU needs to be secure for new secure camera use
cases. Change the VFE to be secure and designate the
last context bank (CB) as secure. Also ensure backwards
compatability so that when running with old secure environment
we fall back to VFE SMMU being non-secure.

Change-Id: I25f31b0350ef0c1b16ebb0db531cc0e6bc556fcf
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
2014-02-19 17:20:53 -08:00
Mitchel Humpherys 854878cbfc iommu: msm: allow partial register dumps to be printed
If we get back a partial register dump from TZ we should go ahead and
print as much as we can, rather than bailing out and not printing
anything.

Change-Id: Idcc8b14a76bf1f23bdf00b52879b3ce0ca9afdcc
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
2014-02-11 17:41:33 -08:00
Mitchel Humpherys b6cc994641 iommu: msm: dump some global registers on page faults
Add support for dumping registers from the global register space. Dump
CBAR_N and CBFRSYNRA_N.

Change-Id: If20605968fac75ad791d4e63e4d089ecaf8f7ebd
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
2014-02-11 17:00:19 -08:00
Mitchel Humpherys eea2a9eaa1 iommu: msm: simplify address discovery in secure register dump code
Currently in the secure register dump code, we try to determine the
register in question by doing some reverse arithmetic on the full
address that TZ returns and matching that against known register
offsets. However, support was recently added for storing the base
physical address of the Iommu in `struct msm_iommu_drvdata'. Simplify
the code by calculating the offset of the registers being returned by TZ
by subtracting their values from the base address of the Iommu.

Change-Id: Icd6e4a35a48b808b0523ab4971cb9fb5b00125f5
Signed-off-by: Mitchel Humpherys <mitchelh@codeaurora.org>
2014-02-11 16:07:16 -08:00
Olav Haugan 7a34b607f8 iommu: msm: Check VBIF state during IOMMU access timeout
Check whether halting the VBIF XIN when the TLB sync or IOMMU halt
times out clears the issue indicating an issue with the master not clearing
the VBIF FIFO.

Change-Id: I552f72db17e31a174ab2725bbecbf4ad98a9d378
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
2014-02-11 13:26:59 -08:00
Olav Haugan 6a233e66ad iommu: msm: Do not sleep for 10 ms when TLB sync does not complete
TLB sync might take longer than expected to complete and we wait for 10 ms
to recheck. This is causing jitter in some applications. Instead of waiting
too long to check whether TLB sync has completed we use function
readl_tight_poll_timeout to quickly poll the status without incurring sleep
delay.

We also ensure that if we do eventually time out on the TLB sync or iommu
halt we cause a crash to indicate that something has gone wrong.

CRs-fixed: 608971
Change-Id: I6b3e5155ab7aafa80432f95554d25cf0e2b753f9
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
2014-02-11 13:26:50 -08:00