User space tasks will have the same semantics for hotplug and isolation.
Currently the sched_getaffinity() include isolated CPU on which user
space tasks are forbidden to run. So fix this by excluding isolated cpus
while returning cpu mask for user space tasks in sched_getaffinity().
Change-Id: Ib6a8ca864754f73bbaf809c3ceaef5f91d567ca9
Signed-off-by: Lingutla Chandrasekhar <clingutla@codeaurora.org>
Update sched_get_task_cpu_cycles trace to include pid and name of the
task to help with debug better.
Change-Id: Ic307ebcf0a44c94bf0a2aa1a02b8aeff39010b29
Signed-off-by: Puja Gupta <pujag@codeaurora.org>
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
Truncating period to u32 could lead to incorrect results. Make it u64
instead.
Change-Id: I5224a943e64bc6d64b6c8e614a01f798a6cdc796
Signed-off-by: Puja Gupta <pujag@codeaurora.org>
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
Enable tv tuner driver on MSM8996 auto defconfig
and MSM8996 perf defconfig.
Change-Id: I3791c7a375f80d1e5d159c631abc1f10235971de
Signed-off-by: Rahul Sharma <sharah@codeaurora.org>
Add device node and profile to support tv tuner device.
Change-Id: I1940c81fda91b26cc148e01b9f0b970cfc490656
Suggested-by: Suprith Shankaregowda <c_suprit@qti.qualcomm.com>
Signed-off-by: Rahul Sharma <sharah@codeaurora.org>
HQX.3.0 requires sdio dsrc support on mem8996 vplatform, so add
cnss_sdio and dsrc_vreg in this device tree for this support.
Change-Id: Ieb9e9a41ea77a41a633f11d82d2ab0fa0d08bf22
Signed-off-by: Ke Huang <keh@codeaurora.org>
The pdev suspend configuration in the WLAN firmware is specific
to the hardware version and bus interface. Add hardware param
for each wlan hardware version and use the hardware param value
during wlan pdev suspend to avoid the power leakage during
system suspend.
CRs-Fixed: 2164529
Change-Id: I020eaa43977d5726765dda1616715f519ad6e443
Signed-off-by: Sarada Prasanna Garnayak <sgarna@codeaurora.org>
snd_timer_notify1() is called outside the spinlock and it retakes the
lock after the unlock. This is rather racy, and it's safer to move
snd_timer_notify() call inside the main spinlock
The patch also contains a slight refactoring / cleanup of the code.
Now all start/stop/continue/pause look more symmetric and a bit better
readable.
Bug: 37240993
Git-commit: fe9cd48f4b3273dc1c9e52567edb4e77dafa45d8
Git-repo: https://android.googlesource.com/kernel/msm.git
Change-Id: Ib90099f88c8b04928a8cdd2808cd9e16da6d519c
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Siqi Lin <siqilin@google.com>
Signed-off-by: Srinivasa Rao Kuppala <srkupp@codeaurora.org>
Currently the blending stages of all the mixers is not
cleared when switching mixer configurations or configuring
solid fill mode.
As a result stale pipes remain connected when switching
mixer configurations causing smmu faults.
Fix the logic to clear the blend stages of all the mixers.
Change-Id: I1a3c5a020d6bc04657cb5357a2cd60c1a53ce4c7
Signed-off-by: Abhinav Kumar <abhinavk@codeaurora.org>
Glink log in tx_common uses context based logging after
wait_for_completion_timeout. This can lead to use after free
scenerio, since transport of context can be freed during wait time.
Use glink error logging.
CRs-Fixed: 2164929
Change-Id: If66bcb7cba1772c2648c143f43a3b88af0799844
Signed-off-by: Dhoat Harpal <hdhoat@codeaurora.org>
In notify_state_worker function, device handle is restored, if
it is NULL. This leads to use after free in glink_queue_rx_intent.
Do not restore device handle.
CRs-Fixed: 2162377
Change-Id: Ie1a60309889001bb38aa7975b40c7de6e9a09c7a
Signed-off-by: Dhoat Harpal <hdhoat@codeaurora.org>
Same as driver register work, driver unregister work event wait may
be woken up by signal and then exit. This is not expected for WLAN
host driver unregister and it should wait till timeout happens.
Change the work event wait to be uninterruptible.
Change-Id: I8d4af27e2f1f04c38917655e937fe8816504d860
Signed-off-by: Yue Ma <yuem@codeaurora.org>
If WLAN host driver has already been unloaded, there is no need
to handle recovery. Add the check to make sure it exits from the
recovery.
Change-Id: Ia97c4cfe4b80ed8e046d041903842655bb915714
Signed-off-by: Yue Ma <yuem@codeaurora.org>
gsi_eth_fs_function is array of pointers to set of RNDIS interface
related descriptors. gsi_eth_fs_function's first descriptor is
pointing itself instead of required RNDIS IAD descriptor. This
results into out-of-bound read access while copying these set of
descriptors with usb_copy_descriptors() API. Fix this issue by
using required RNDIS IAD descriptor here.
Change-Id: Ic604221febc43eb8a22d8de99fb8cead74e13b41
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
The exiting task's prev_window and curr_window arrays are freed
with rq->lock acquired. The kfree() may wakeup kswapd and if
kswapd wakeup needs the same rq->lock, we hit a deadlock. Fix
this issue by freeing these arrays after releasing the lock.
Since the task is already marked as exiting under lock, delaying
the freeing of the current and window arrays will not have
any side effect.
Change-Id: I3282d91ba715765e38177b9d66be32aaed989303
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
Disable iommu test device since guest os has no permission
to operate cpp_fd_smmu.
Change-Id: I9641d7ceb91f5c1bf4ee2307540730689dce7b98
Signed-off-by: Zhiqiang Tu <ztu@codeaurora.org>
Default IPA header is added or deleted from the driver
directly and not by user space application. This change
prevents adding/deleting it from user application which
may cause inconsistencies in the driver. Also the change
fixes the header reset function to skip on the correct
default header.
Change-Id: Ic813433655411f1447db8b0c15efdf64038d8c26
CRs-fixed: 2151146
Signed-off-by: Ghanim Fodi <gfodi@codeaurora.org>
enter_lazy_tlb is called when a kernel thread rides on the back of
another mm, due to a context switch or an explicit call to unuse_mm
where a call to switch_mm is elided.
In these cases, it's important to keep the saved ttbr value up to date
with the active mm, otherwise we can end up with a stale value which
points to a potentially freed page table.
This patch implements enter_lazy_tlb for arm64, so that the saved ttbr0
is kept up-to-date with the active mm for kernel threads.
Change-Id: I6e5c50542ff2645c46e8801685f7a43e6773c3d2
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Vinayak Menon <vinmenon@codeaurora.org>
Cc: <stable@vger.kernel.org>
Fixes: 39bc88e5e38e9b21 ("arm64: Disable TTBR0_EL1 during normal kernel execution")
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Reported-by: Vinayak Menon <vinmenon@codeaurora.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Git-commit: d96cc49bff5a7735576cc6f6f111f875d101cec8
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
update_saved_ttbr0 mandates that mm->pgd is not swapper, since swapper
contains kernel mappings and should never be installed into ttbr0. However,
this means that callers must avoid passing the init_mm to update_saved_ttbr0
which in turn can cause the saved ttbr0 value to be out-of-date in the context
of the idle thread. For example, EFI runtime services may leave the saved ttbr0
pointing at the EFI page table, and kernel threads may end up with stale
references to freed page tables.
This patch changes update_saved_ttbr0 so that the init_mm points the saved
ttbr0 value to the empty zero page, which always exists and never contains
valid translations. EFI and switch can then call into update_saved_ttbr0
unconditionally.
Change-Id: I664095969fbd4d0b546f30aa4c312769e708d6de
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Vinayak Menon <vinmenon@codeaurora.org>
Cc: <stable@vger.kernel.org>
Fixes: 39bc88e5e38e9b21 ("arm64: Disable TTBR0_EL1 during normal kernel execution")
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Reviewed-by: Mark Rutland <mark.rutland@arm.com>
Reported-by: Vinayak Menon <vinmenon@codeaurora.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Git-commit: 0adbdfde8cfc9415aeed2a4955d2d17b3bd9bf13
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
It is observed that the hard ID IRQ is enabled when the
threaded IRQ handler for the same is still running. In that
case, there are two issues. The ID LOW IRQ can come
consecutively which will increase the disable count of
vbus_irq. Then ID HIGH IRQ will not enable the vbus_irq and
peripheral mode detection will not work anymore. The second
issue is that ID HIGH IRQ is fired just before ID LOW IRQ.
This will mark usb->id_state from HIGH to LOW even while
threaded IRQ is running which will lead to host not getting
stopped and peripheral mode not working.
Fix both issues by maintaning a local copy of ID IRQ in
threaded IRQ handler and comparing it with previous ID state.
If same, then bail out.
Change-Id: If5da1f91ece9d1751d7002e64bab0e145623a92e
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
This changes removes the unwanted gsi dedug register reads, to which
IPA driver dont have access to.
Change-Id: I6efb1045275a9bdb238e6184ec676013ab1678bc
Acked-by: Jyothi Jayanthi <jyothij@qti.qualcomm.com>
Signed-off-by: Michael Adisumarta <madisuma@codeaurora.org>
Add new dummy tv tuner driver and its documentation.
Update Makefile, Kconfig and add new tuner id type to msm_ba.h
Change-Id: I14f822ad9fdf85ea7509067d536c49fd24cf1609
Signed-off-by: Rahul Sharma <sharah@codeaurora.org>