idle_tick is a periodic timer which sends the interrupt to cpu
for every jiffy. If next event is read before stopping the cpu
idle_tick it gives the next tick expiry time as the next event.
Current logic reading the cpu next event time before stopping
the idle tick gives shallower sleep length recorded. This prevents
cluster low power mode to get selected since next wakeup is seen
either very near to current time or as already expired.
Fix this to read next event after idle_tick has been stopped.
Change-Id: I8016c7911dc48450668a8a6bc7a6d01d4423da32
Signed-off-by: Raghavendra Kakarla <rkakarla@codeaurora.org>
As part of v4l2_fh_open call at rtc6226 driver
open time memory is allocated via kzalloc() and
the same memory is not released at the time of
rtc6226 driver open failure case.
Remove the open and release v4l2_fh file as
it not required for rtc6226 driver.
Change-Id: I98195b9b0731d5392b82c3d12e393c6ffaad702c
Signed-off-by: himta ram <hram@codeaurora.org>
Add missing export symbol for wdog trigger available API.
Change-Id: Ib9fa8de3c8fa906bc8d09073e1df5509aa0c55e2
Signed-off-by: Siddharth Gupta <sidgup@codeaurora.org>
Currently, ucsi_qti_notify() is checking the received data from
charger firmware (PPM) to see if there is any connector status
response with partner accessory information (e.g. analog audio).
It does this based on setting a flag (cmd_requested_flags) when
UCSI_GET_CONNECTOR_STATUS command is sent from UCSI framework to
PPM so that the response for that command can be read and clients
registered for getting notification on partner accessory can get
notified. However, in a certain scenario, multiple response for
different commands can be received from PPM. See a possible
example below.
1. UCSI framework sends UCSI_GET_CONNECTOR_STATUS command
2. ucsi_glink driver sets cmd_requested_flags, waits for response
3. UCSI framework sends UCSI_GET_CURRENT_CAM command
4. ucsi_glink driver gets a response for UCSI_GET_CONNECTOR_STATUS
and schedules notify_work since ucsi_qti_notify() is called
with cmd_requested_flags set.
5. ucsi_glink driver gets a response for UCSI_GET_CURRENT_CAM and
this can end up reading "flags" because cmd_requested_flags is
not cleared yet. However, this causes a buffer overflow because
ucsi_qti_read() passes "val" pointer passed from UCSI framework
which is of 1 byte length and ucsi_qti_notify() ends up reading
"flags" which is at an offset 2 of length 9 bytes.
6. ucsi_qti_notify_work() clears cmd_requested_flags.
Fix this by checking the message length in ucsi_qti_notify()
to ensure that status->flags is read only when a response is
received for UCSI_GET_CONNECTOR_STATUS. Also, relocate the
clearing of "cmd_requested_flags" flag.
CRs-Fixed: 2678391
Change-Id: Iac1d5c58e1ed2fd0f3bc153da23cddf0700cc097
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
Presently, clients must re-register to receive IRQ lend notification.
Every client presently must do this and there is no use-case to require
clients to re-register to receive IRQ lend notification. Return the
internal IRQ lend state to WAIT_LEND after release, instead of
unregistered.
Change-Id: I17504e2850ae60e68d755b587ff6d0c3e78926d9
Signed-off-by: Elliot Berman <eberman@codeaurora.org>
Presently, hh_irq_wait_for_lend translates supplied vm_name to vmid.
However, if this function is called prior to RM populating this table,
then wait_for_lend call fails with -EINVAL. Translating vm_name to vmid
in wait_for_lend is unnecessary, and only done because it was convenient
in private data structure. Thus, add vm_name to the private data
structure and translate vm_names upon receiving a lend notification.
Change-Id: Iaa51aaab42508ffa121a550afa0568a048327dca
Signed-off-by: Elliot Berman <eberman@codeaurora.org>
Clean up compiler warnings in haven control driver.
Change-Id: I6246a108f2e30c812071df9e5c1adbce12853fbf
Signed-off-by: Elliot Berman <eberman@codeaurora.org>
Register driver work handler will only power up device, resume PCIe
link and start MHI to download firmware. It may only block there
for a timeout, so there is no need to post it as killable event.
Change-Id: Ib82050358dc8df4a8163ecb43702aa86ed34f23d
Signed-off-by: Yue Ma <yuem@codeaurora.org>
For uniprocessor systems, add a NULL definition of tick_broadcast to
add support for tick broadcast.
Change-Id: I7dc47984cb6b60c9814171888f6adbc480a1e990
Signed-off-by: Mahesh Sivasubramanian <msivasub@codeaurora.org>