The Remote Debugger driver allows a debugger running
on a host PC to communicate with a remotestub running
on peripheral subsystems.
This snapshot was taken as of msm-3.10 commit
("Merge "msm: msm_bus: Provide valid input pointer argument").
Change-Id: Id79ca428b311dda90467155611af3e2a0fff1fcf
Acked-by: Devender Kaushik <dkaushik@qti.qualcomm.com>
Signed-off-by: Mohammed Nayeem Ur Rahman <mohara@codeaurora.org>
Equip arm to support ARCH_SUPPORTS_DEBUG_PAGEALLOC and
enable it by default.
Having this support means all pages freed at buddy level
would be marked as read-only and would help catch any
scribbling over free page area. Allocated pages mapping
attributes is restored to read/write.
ARCH_SUPPORTS_DEBUG_PAGEALLOC needs FORCE_PAGES which
ensures all kernel mapping are populated with page
granularity and it would ensure page level accesses can
be rightly configured.
Change-Id: I9b23d1fb0b9594cc148b082c104da9a773c26057
Signed-off-by: Shiraz Hashim <shashim@codeaurora.org>
Signed-off-by: Charan Teja Reddy <charante@codeaurora.org>
Signed-off-by: Vijayanand Jitta <vjitta@codeaurora.org>
Signed-off-by: Qingqing Zhou <qqzhou@codeaurora.org>
CONFIG_RODATA allows strict kernel mapping permissions to
be followed and accordingly maps regions as read-only,
not-executable etc. correspondingly. CONFIG_RODATA however
assumes all memory regions to be SECTION_SIZE aligned and
section mapped for performance reasons.
With CONFIG_FORCE_PAGES, we force all kernel mappings as
page mapped thus breaking CONFIG_RODATA.
Provide provision to apply permissions at page (pte)
level, if CONFIG_RODATA does not find section mapping.
Change-Id: I8dbf5c3741836bc63a231d8a471cf0306662993b
Signed-off-by: Shiraz Hashim <shashim@codeaurora.org>
Signed-off-by: Charan Teja Reddy <charante@codeaurora.org>
Signed-off-by: Vijayanand Jitta <vjitta@codeaurora.org>
Signed-off-by: Qingqing Zhou <qqzhou@codeaurora.org>
In arm_iommu_map_sg, currently we map each individual link in the given
scatterlist into the SMMU individually such that they may or may not be
virtually contiguous. However, in most of our use cases we
actually want the entire sg list mapped into the SMMU as a single
contiguous range.
This was missing for arm 32bit, add it.
Change-Id: Ibf67f29a60b8d19e526c4719590f2f473ea9dca5
Signed-off-by: Chintan Pandya <cpandya@codeaurora.org>
Signed-off-by: Charan Teja Reddy <charante@codeaurora.org>
Signed-off-by: Vijayanand Jitta <vjitta@codeaurora.org>
Signed-off-by: Qingqing Zhou <qqzhou@codeaurora.org>
Currently, the decision on which page protection to use
is limited to writecombine and coherent. Expand to include
non consistent memory.
Change-Id: I7585fe3ce804cf321a5585c3d93deb7a7c95045c
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
Signed-off-by: Charan Teja Reddy <charante@codeaurora.org>
Signed-off-by: Vijayanand Jitta <vjitta@codeaurora.org>
Signed-off-by: Qingqing Zhou <qqzhou@codeaurora.org>
During early init, all dma areas are remapped to PAGE_SIZE
granularity. Since full pmd regions are cleared to be
remapped into PAGE_SIZE, ensure that address range is pmd
size aligned while not crossing memory boundaries.
This would ensure that even if address region is not pmd
aligned, its mapping would not be cleared but factored in to
PAGE_SIZE regions.
Change-Id: Iad4ad7fd6169cdc693d532821aba453465addb7c
Signed-off-by: Shiraz Hashim <shashim@codeaurora.org>
Signed-off-by: Charan Teja Reddy <charante@codeaurora.org>
Signed-off-by: Vijayanand Jitta <vjitta@codeaurora.org>
Signed-off-by: Qingqing Zhou <qqzhou@codeaurora.org>
Consider only those memory blocks with lowmem while
remapping into 4KB regions using CONFIG_FORCE_PAGES
feature.
Change-Id: Ie209fce6c310f911d8cf02d977e226660684a6ab
Signed-off-by: Shiraz Hashim <shashim@codeaurora.org>
Signed-off-by: Charan Teja Reddy <charante@codeaurora.org>
Signed-off-by: Vijayanand Jitta <vjitta@codeaurora.org>
Signed-off-by: Qingqing Zhou <qqzhou@codeaurora.org>
CONFIG_FORCE_PAGES introduces a debug option to mark free
pages as read only in order to trigger a fault if any code
attempts to write to a page on the buddy list.
In order to achieve this it splits all section mappings in
to PAGE_SIZE pages during boot. While doing this split, it
wrongly allocates a pte (of page size) for each pmd. Linux
however in armv7 short descriptor format, uses same second
level pte for 2 consecutive pmds offset by the actual second
level table size. Refer comments in kernel file
arch/arm/include/asm/pgtable-2level.h for details.
Fix this by allocating pte for a section mapped pmd while
providing required offset if pte already exists.
Change-Id: Iadbaa5e71e4b220208a7275bf039a2a413349e42
Signed-off-by: Shiraz Hashim <shashim@codeaurora.org>
Signed-off-by: Charan Teja Reddy <charante@codeaurora.org>
Signed-off-by: Vijayanand Jitta <vjitta@codeaurora.org>
Signed-off-by: Qingqing Zhou <qqzhou@codeaurora.org>
Lowmem is currently mapped with sections (1MB/2MB) whenever
possible due to TLB performance boosts. Sections cannot easily
be changed at runtime however which makes implementing certain
features annoying. Add an option to map lowmem with 4K patches.
This is intended to be used as a debugging feature and should
NOT be used for performance testing.
Change-Id: I9612a99b8e05a022f5ba7e568f21307cf66b5667
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
Signed-off-by: Susheel Khiani <skhiani@codeaurora.org>
Signed-off-by: Charan Teja Reddy <charante@codeaurora.org>
Signed-off-by: Vijayanand Jitta <vjitta@codeaurora.org>
Signed-off-by: Qingqing Zhou <qqzhou@codeaurora.org>
io-pgtable-fast was implemented to achieve
better performance for IOMMU map/un-map. Add
DMA API support that goes through io-pgtable-fast
for 32 bit targets.
Change-Id: I3d0560a4331f6b7b87c70d0885df11d12cb1d6ec
Signed-off-by: Charan Teja Reddy <charante@codeaurora.org>
[qqzhou@codeaurora.org: Reorganize codes to be more clear]
Signed-off-by: Qingqing Zhou <qqzhou@codeaurora.org>
For iommus which do not use stage1 translation, stage2 may not be aware
of the device's dma_mask requirements. Choose the dma_ops such that
allocations are made within the dma_mask region and bounce buffers are
used as necessary.
Change-Id: I63ae3ff9e5ab608892d12db7a813264d234699ee
Signed-off-by: Charan Teja Reddy <charante@codeaurora.org>
Signed-off-by: Qingqing Zhou <qqzhou@codeaurora.org>
When a device probes and arch_setup_dma_ops is called, check if the
device has an associated default iommu_domain. If it does, setup
a virtual address allocator of the type described by the
default domain's attributes.
Mark arm_iommu_create_mapping and arm_iommu_attach_device as
deprecated, since clients will no longer need to use them now that
the iommu framework will associate them with a default domain.
Change-Id: I0721c038c68f0f48b78d50f9a72418dbaed97172
Signed-off-by: Vijayanand Jitta <vjitta@codeaurora.org>
Signed-off-by: Qingqing Zhou <qqzhou@codeaurora.org>
Set correct parameter for the function 'strlcpy' and avoid kernel panic.
Change-Id: I8bf76da6022df43b630d5e66022892eadc662871
Signed-off-by: Fei Mao <feim1@codeaurora.org>
.remove need to remove apps_cmac attribute.
Change-Id: Ic636ee707e831d67059841f1d59cc00e9149ce8c
Signed-off-by: Konstantin Dorfman <kdorfman@codeaurora.org>
CTS failed on Lahaina due to absence of function name in the driver print.
This change adds function name to each driver print.
Change-Id: I2603c460e77578e7a56553a92058cc1b463c11c0
Signed-off-by: Konstantin Dorfman <kdorfman@codeaurora.org>
Add support for Camera clock controller driver for the camera
clients to be able to control clocks.
Change-Id: I6aa7a2887ece1fb80d24242d4b6ea37519e4bb3c
Signed-off-by: Jagadeesh Kona <jkona@codeaurora.org>
Update the clock ids and BCRs of Camera and Graphics Clock Controller
for SHIMA.
Change-Id: Ie1a360bd247c0f9e74b15c47677f4cef5f8c7a80
Signed-off-by: Jagadeesh Kona <jkona@codeaurora.org>
The SD card clock scaling feature has a dependency on the
MMC_SDHCI_MSM which is not defined. Remove this dependency
so that the SD card clock scaling feature can be enabled.
In addition, fix the SD cards 2.0 initialization caused
by the incorrect clock settings.
Change-Id: I3eaec3546f89b86643b1937764288b3f39578c0e
Signed-off-by: Bao D. Nguyen <nguyenb@codeaurora.org>
The number of ACL entries is currently not sanitized, which
can allow for unreasonably large ACL to be allocated for
later processing. Allowing for this to happen doesn't make much
sense, as there aren't any valid usecases that require a large
ACL, so restrict the number of ACL entries to 16. Also, while we're
here, fix up some of the error handling in a few places.
Change-Id: I5d1371ed180608486bcde1e208a36782986313af
Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>
The condition that determines if we print an error after
failing to register for the mem-buf message queue checks
the return code against EPROBE_DEFER. This is not correct, as
error codes are negative, so fix the check.
Change-Id: I4ed03bde56c6edf66e0ffed060ec23a87a46be54
Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>
The mem-buf device can handle memory from anywhere in the
system. This includes memory with a physical address above
32 bits, so configure the DMA mask for the mem-buf device
based on the system configuration.
Change-Id: If91bb6d8044e8e6f47994acd7e50633b46596808
Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>
In case DSP failed to respond to CPU command correctly, cvp driver
shall ignore the DSP error other than print error message. It shall
keep working normally.
Change-Id: Id33c0063b6326bc45527e2b4d60584045ca1e07c
Signed-off-by: George Shen <sqiao@codeaurora.org>