The changes modify the callback registration and dispatch
on a synx object for non-blocking wait.
The userspace callback payloads are maintained in UMD driver
and unique id passed by client is saved in callback entry
to manage the callback. These callbacks are distinguished
with the callbacks registered by kernel clients through the
default callback function registered.
This provides uniform handling (in most cases) for callbacks
registered by userspace and kernel clients.
The change also allows signaling with CANCELLED state.
Change-Id: Ic084374c63c3c09c5deccb404e81da69f1dcb70e
Signed-off-by: Sumukh Hallymysore Ravindra <shallymy@codeaurora.org>
Add the support necessary to allow secure allocations for the
TUI VMID with R/W permissions.
Change-Id: I7486d75b3d9d3f7fa29a8d4972cca671d55b3569
Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>
Add support for assigning memory to the TUI VMID.
Change-Id: Idbd8e144d7251335ba1db5bfdad7fa94394da7e5
Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>
Casting the comparison function to a different type trips indirect call
Control-Flow Integrity (CFI) checking. Remove the additional consts from
cmp_func, and the now unneeded casts.
Change-Id: Ie21cfb8bbc75632e4d96b44cf3f0c3d3331d7fa0
Fixes: 043b3f7 ("lib/list_sort: simplify and remove MAX_LIST_LENGTH_BITS")
Signed-off-by: Sami Tolvanen <samitolvanen@google.com>i
Git-commit: 5bc3f3591d783484b2e0011f3b5633c1e60e7585
Git-repo: https://github.com/samitolvanen/linux.git
Signed-off-by: Prakruthi Deepak Heragu <pheragu@codeaurora.org>
There is already a qcrypto module defined in drivers/crypto/qce so
rename this one to qcrypto-msm to avoid an error while building with
'allmodconfig'.
Change-Id: Ic0dedbadb33e28eccd952c6f9c01c8b8208ad2ec
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
qcedev.c and qcedev_smmu.c are clearly not expected to be compiled
as separate modules so bundle them together as one.
Change-Id: Ic0dedbad96baebac00448edf4cf440d1e0edd41c
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Fix an out of order definition of MODULE_DEVICE_TABLE, add missing
brackets to fix a suspect indentation warning and mark an
implcit switch fall through.
Fixes: 377c69bf3e ("crypto: msm: Add QTI crypto drivers")
Change-Id: Ic0dedbada33fd2e5c692e5f0d64fd0e7b7afb5f1
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Fix the following warning from gcc 7.4.1 with -Werror enabled:
drivers/crypto/msm/qce50.c:4668:28: error: ‘~’ on a boolean expression
[-Werror=bool-operation]
pce_dev->cadence_flag = ~pce_dev->cadence_flag;
drivers/crypto/msm/qce50.c:4668:28: note: did you mean to use logical not?.
Fixes: 377c69bf3e ("crypto: msm: Add QTI crypto drivers")
Change-Id: Ic0dedbad73c49d059d68d9412009b74583d33154
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
This reverts commit 5f563b2c24.
FSA config will be enabled after all dependent changes are merged.
Change-Id: I585fd44abe2210b6a9dc572c5dcd1b6ce426b9d8
Signed-off-by: Meng Wang <mengw@codeaurora.org>
Add and modify files to enable hdcp_qseecom driver
for Lahaina.
This implementation is based on a snapshot of the HDCP
QSEECOM module as of this commit c13c06fa4bc677f4
("hdcp_qseecom: Maintain repeater_flag appropriately")
on kernel-4.19.
Change-Id: I91a9d9c539f5ab11af7f427e907622d8391b454f
Signed-off-by: Phanindra Babu Pabba <pabba@codeaurora.org>
Updating the zone watermarks by any means, like extra_free_kbytes,
min_free_kbytes, water_mark_scale_factor, when boost_watermark(zone) is
set can result into the higher water_mark_low|min as the macro
min_wmark_pages returns by adding the zone->watermark_boost.
Set this to Zero early.
Change-Id: I5e3edd1798e46974f3df34ef750f9d08b8ff35f4
Signed-off-by: Charan Teja Reddy <charante@codeaurora.org>
Signed-off-by: Chris Goldsworthy <cgoldswo@codeaurora.org>
Rely on LMK to reclaim memory and avoid OOM, when out of memory
condition is detected in a pagefault.
pagefault_out_of_memory() may be called due to commit d1b75390beb8 ("mm:
reduce the time spend by killed tasks in alloc path"), which bails out from
alloc_pages_slowpath() if the current task has been killed.
Change-Id: Icfdaa51d7cfb0dfe9a665bcff23357101b15f421
Signed-off-by: Prakash Gupta <guptap@codeaurora.org>
Signed-off-by: Chris Goldsworthy <cgoldswo@codeaurora.org>
Enable the reaping of memory on a sigkill by default. This helps in
faster releasing of memory pages to buddy.
Change-Id: I90a508e6d16099527991674f6b4efdc55f415c59
Signed-off-by: Charan Teja Reddy <charante@codeaurora.org>
Signed-off-by: Chris Goldsworthy <cgoldswo@codeaurora.org>
Enable support for a userspace low memory killer and associated
debug options.
Change-Id: If730f1634e39b516e00b29f86260b720c33706d4
Signed-off-by: Chris Goldsworthy <cgoldswo@codeaurora.org>
If a userspace low memory killer is present, the kernel oom killer
is not expected to be invoked. Therefore, trigger a reset on any
such occurrence.
Change-Id: I7f3451e9c4deb843b3e4dfa13e9764101e90b8ae
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
Signed-off-by: Chris Goldsworthy <cgoldswo@codeaurora.org>
While ULMK is active, prevent OOM for order <= COSTLY_ORDER
pages. No special actions are taken for larger orders.
Change-Id: I4ccba1b71155947569acc3d88ae2027e3b2e0620
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
Signed-off-by: Chris Goldsworthy <cgoldswo@codeaurora.org>
Enable CONFIG_EDAC_QGKI flag in non GKI variants to use defer work
feature for EDAC.
Change-Id: I8debaa58d36988a60a346ffdaf8d736abd2384d3
Signed-off-by: Prakruthi Deepak Heragu <pheragu@codeaurora.org>
Interrupt enable register configuration is only needed for
interrupt mode, So avoid interrupt configuration
in the polling mode.
Change-Id: I0cb9f50573deb580254aebceeee3883d98f6ff85
Signed-off-by: Rishabh Bhatnagar <rishabhb@codeaurora.org>
Signed-off-by: Prakruthi Deepak Heragu <pheragu@codeaurora.org>
Haven Resource Manager API defines a simple console for VM log sharing.
This patch adds support for this console with the HVC console framework.
It is possible to use this driver as the "primary VM" to listen to other
VM console logs or as the "secondary VM" to send logs to the "primary
VM". For the latter, CONFIG_HVC_HAVEN_CONSOLE must be set to y.
Change-Id: I3606b2d373535d0f347f66e5b729a303a9513fa8
Signed-off-by: Elliot Berman <eberman@codeaurora.org>
Add console APIs to emulate virtual console mechanism between SVM and
PVM to get the SVM messages to PVM for debug purpose.
Change-Id: I24ec2c427460195c83f5975de70f4ec5c4f2f763
Signed-off-by: Elliot Berman <eberman@codeaurora.org>
RM allows VMs to lend interrupts to one another. This patch implements
the lender API.
Change-Id: I7671a2b346d2425f963631da4b8529fc9b10dc40
Signed-off-by: Elliot Berman <eberman@codeaurora.org>
Smmu driver takes a vote on CX gdsc before calling the kgsl pagefault
handler. If there is contention for device mutex in this path and the
dispatcher fault handler is holding this lock, trying to turn off CX
gdsc will fail during the reset. So to avoid blocking here, try to
lock device mutex and return if it fails.
Change-Id: Idf1726960071d66b9112f6b4abdf19a49afacefd
Signed-off-by: Akhil P Oommen <akhilpo@codeaurora.org>
Signed-off-by: Urvashi Agrawal <urvaagra@codeaurora.org>
Ensure that CM3 configuration is always set to default value
before taking CM3 out of reset. Also make sure that we
read/modify this register when we send NMI to GMU.
Change-Id: Ic9c4506c04c5e7dd1cabf12901fa53636e2ed9c7
Signed-off-by: Oleg Perelet <operelet@codeaurora.org>
Signed-off-by: Urvashi Agrawal <urvaagra@codeaurora.org>
Add support to allow usage of memory from the TUI dynamic carveout
heap.
Change-Id: I585b68215f2f5e8ab114f1c83c19b3bc77a65845
Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>
Don't set LPOVERRIDE bit when tupwr-disable is true to avoid the cpu hang
issue.
Change-Id: Ie12b6faa3a39e35fac1566690771321a79e99bae
Signed-off-by: Mao Jinlong <jinlmao@codeaurora.org>
arch_setup_dma_ops is not exported and when compiling ASoC framework
as modules, it would not found arch_setup_dma_ops. Change it to
of_dma_configure to resolve this issue.
Change-Id: I2a031373eff8a4abc212798825c9effd77bce9f7
Signed-off-by: Meng Wang <mengw@codeaurora.org>
Based on Kirill's patch [1].
Currently, faultaround code produces young pte. This can screw up
vmscan behaviour[2], as it makes vmscan think that these pages are hot
and not push them out on first round.
During sparse file access faultaround gets more pages mapped and all of
them are young. Under memory pressure, this makes vmscan swap out anon
pages instead, or to drop other page cache pages which otherwise stay
resident.
Modify faultaround to produce old ptes if sysctl 'want_old_faultaround_pte'
is set, so they can easily be reclaimed under memory pressure.
This can to some extend defeat the purpose of faultaround on machines
without hardware accessed bit as it will not help us with reducing the
number of minor page faults.
Making the faultaround ptes old results in a unixbench regression for some
architectures [3][4]. But on some architectures like arm64 it is not found
to cause any regression.
unixbench shell8 scores on arm64 v8.2 hardware with CONFIG_ARM64_HW_AFDBM
enabled (5 runs min, max, avg):
Base: (741,748,744)
With this patch: (739,748,743)
So by default produce young ptes and provide a sysctl option to make the
ptes old.
[1] https://marc.info/?l=linux-mm&m=146348837703148
[2] https://lkml.org/lkml/2016/4/18/612
[3] https://marc.info/?l=linux-kernel&m=146582237922378&w=2
[4] https://marc.info/?l=linux-mm&m=146589376909424&w=2
Change-Id: I193185cc953bc33a44fc24963a9df9e555906d95
Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Patch-mainline: linux-mm @ Fri, 19 Jan 2018 17:24:54
[vinmenon@codeaurora.org: enable by default since arm works well
with old fault_around ptes + edit the links in commit message to
fix checkpatch issues]
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
[swatsrid@codeaurora.org: Fix merge conflicts]
Signed-off-by: Swathi Sridhar <swatsrid@codeaurora.org>
Signed-off-by: Chris Goldsworthy <cgoldswo@codeaurora.org>
Accessing some of the memory of the device while the device is
resetting or suspending may cause unexpected error as the HW is still
not in a stable state. Prevent this access to guarantee successful
read/write memory operations.
Change-Id: Idbf046e21726ec8d074161f75643f34137d6ec24
Signed-off-by: Ahmad Masri <amasri@codeaurora.org>
Signed-off-by: Maya Erez <merez@codeaurora.org>
Signed-off-by: Lior David <liord@codeaurora.org>
Use the defer work mechanism to poll for errors using a callback function.
Change-Id: Id599a9159098a8b13df386290b3e46939831a4ff
Signed-off-by: Prakruthi Deepak Heragu <pheragu@codeaurora.org>
EDAC provides a mechanism to poll for errors using a callback function
and uses a delayed timer to schedule it. Provide an option to create
a deferrable timer if the error checking is not worth waking up
the cpu from idle.
Change-Id: Ia25216323eabf7fa4b894897c950414006921f3f
Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
Signed-off-by: Venkata Narendra Kumar Gutta <vnkgutta@codeaurora.org>