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>
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>
Return proper value when DEBUG_FS is disabled.
Change-Id: I6d46dcac6c6321e1a19468a81906e5f98976d29b
Signed-off-by: Prakruthi Deepak Heragu <pheragu@codeaurora.org>
Add A619 GPU variant support to deal with different
feature set of A619 GPU.
Change-Id: I4df945af138d03868fc0b26d915145e564d056ad
Signed-off-by: Hareesh Gundu <hareeshg@codeaurora.org>
If a request is dequeued, the transfer is cancelled. Give back all
the started requests.
In most scenarios, the function driver dequeues all requests of a
transfer when there's a failure. If the function driver follows this,
then it's fine. If not, then we'd be skipping TRBs at different points
within the dequeue and enqueue pointers, making dequeue/enqueue pointers
useless. To enforce and make sure that we're properly skipping TRBs,
cancel all the started requests and give back all the cancelled requests
to the function drivers.
Change-Id: Ia344a480048383f3fd7c16afbc9f7b0062492879
Signed-off-by: Thinh Nguyen <thinhn@synopsys.com>
Patch-mainline: linux-usb @ 05/03/20, 13:24
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
The value printed on cpu idle exit is a return value from the PSCI call.
To avoid confusion, let's change the text to match the return value.
Change-Id: I8938287fb4d2887aa190af835618d1d0e9f18a99
Signed-off-by: Lina Iyer <ilina@codeaurora.org>
As a part of sysfs reading of descriptors/attributes/flags,
query commands should only be executed when hba's
power runtime status is active.
To guarantee this, add pm_runtime_get/put_sync()
to those paths where query commands are sent.
Change-Id: Ieb924efd3159c7422e50bb69ecf70b369ec72d89
Signed-off-by: Nitin Rawat <nitirawa@codeaurora.org>
Signed-off-by: Asutosh Das <asutoshd@codeaurora.org>
Gaurd the rule to re generate vmlinux only when CONFIG_TRIM_UNUSED_KSYMS
is set. Without this change, the vmlinux was generated twice as opposed to
Image generating only once.
Change-Id: I8370f64553b0ed7cb6536aabb1c68d77e5b58bf1
Signed-off-by: Prakruthi Deepak Heragu <pheragu@codeaurora.org>
HFI error, stream corrupt, will not cause functionality issue.
Do not handle it as error case.
Change-Id: Ieebf003e2fc7bd76dc197e8ff5b8eea8d1a917b3
Signed-off-by: George Shen <sqiao@codeaurora.org>
Add error checks in place to catch the errors returned by the API,
instead of assuming success and proceeding.
Change-Id: I8cd8b826f22a9406e934afaedc88e630695fb187
Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
Allow the subsystem to use some extra memory allocated
after the end of the image, for the subsystem to use.
This is porting from Kona of commit SHA:1279fb070282.
Change-Id: I79d19c9e48b7893d10ac814fb42e5783651417b4
Signed-off-by: Nurit Lichtenstein <nuritl@codeaurora.org>