Commit graph

899,628 commits

Author SHA1 Message Date
Charan Teja Reddy
eed034c55c iommu/arm-smmu: Remove 'qcom,power-always-on' property for SMMU
The commit 8ffa6450ba ("iommu/arm-smmu: Add support for not removing
SMMU power votes") add the support for not removing the power votes of
smmu. It requires 'qcom,power-always-on' in smmu dt property to enable
this support which is currently enabled only for gpu smmu. And this
makes the clients of the SMMU to know If this dt property is enabled to
make decissions in their drivers which is not directly available.

Since there exists a device with atomic domain attached to apps smmu
which will make power resources always on, this separate dt property to
enable power resources for specific SMMU is not required. Thus remove
the 'qcom,power-always-on' property which makes power resources of
SMMU's as always ON when CONFIG_ARM_SMMU_POWER_ALWAYS_ON is enabled.

Change-Id: I2ee1d330f5c1c65474fea7d6b2a9389ae3cf085d
Signed-off-by: Charan Teja Reddy <charante@codeaurora.org>
2021-09-02 10:13:18 -07:00
Prateek Raj Singh
528dad421a FM: mutex changes modified
Removed unrequired mutexes, and conditions.

CRs-Fixed: 3026494
Change-Id: Ib216567e80c8bf29257d11f4565865eebb8d2585
Signed-off-by: Prateek Raj Singh <pratsing@codeaurora.org>
2021-08-31 20:19:54 +05:30
qctecmdr
af0f012029 Merge "icnss2: Enable PHY processor SSR along with WPSS SSR" 2021-08-30 16:30:45 -07:00
Raihan Haider
24557c6da1 net: stmmac: Add CONFIG_IPV6 check
Add CONFIG_IPV6 check to ipv6 specific early eth code

Change-Id: Ib1b266e6da7243e4a1b2d3507b0d19b119e2ebdc
Signed-off-by: Raihan Haider<rhaider@codeaurora.org>
2021-08-30 03:46:07 -07:00
Naman Padhiar
047f485e92 icnss2: Enable PHY processor SSR along with WPSS SSR
Register notifier to get notification for restart_level
change of WPSS and send SMP2P command to FW to enable
PHY processor SSR.

Change-Id: Id0edb6ab6a44fbca83b2dbe6bad7c86e2540d865
Signed-off-by: Naman Padhiar <npadhiar@codeaurora.org>
2021-08-30 02:25:51 -07:00
qctecmdr
8e9243189d Merge "clk: qcom: gcc: Lower the frequency for sdxlemur from 200 to 171MHz" 2021-08-27 09:16:15 -07:00
qctecmdr
187e9a162b Merge "ARM: gic: Add support for logging interrupts in RTB" 2021-08-27 09:16:15 -07:00
qctecmdr
5581c905ea Merge "drivers: thermal: Update Ibat scaling factor for Mando" 2021-08-27 09:16:14 -07:00
qctecmdr
fb84cc3a1e Merge "usb: dwc3: debugfs: Add suppot for Enabling L1 in HS through debugfs" 2021-08-27 09:16:14 -07:00
qctecmdr
8b8860e43d Merge "icnss2: Properly handle SOC_WAKE req stuck in QMI" 2021-08-27 09:16:13 -07:00
Kamal Agrawal
097e7abad2 msm: kgsl: Print map count instead of map size
/sys/kernel/debug/kgsl/proc/<pid>/mem prints incorrect map size
in some cases. Currently, memdesc size is printed as map size.
Because of this, map size shows non-zero value even for unmapped
buffers. Since kgsl buffers can be mapped multiple times, update
the print to map count instead of map size.

Change-Id: I7970580bc3b1c9a30ca0d72d9caf89af1ce09740
Signed-off-by: Kamal Agrawal <kamaagra@codeaurora.org>
2021-08-27 05:13:36 -07:00
Taniya Das
047b20cc26 clk: qcom: gcc: Lower the frequency for sdxlemur from 200 to 171MHz
Update the sdcc clock frequency from 200MHz to 171MHz.

Change-Id: Ibada53598071e84ab600aeba9d3418d41d811357
Signed-off-by: Taniya Das <tdas@codeaurora.org>
2021-08-27 01:53:03 -07:00
Gopala Krishna Nuthaki
6d64c3d3ed drivers: thermal: Update Ibat scaling factor for Mando
Update ibat conversion scaling factor for mando pmic.

Change-Id: Ie7ec584fd1205ff2ddda7848320e2ed54f14321a
Signed-off-by: Gopala Krishna Nuthaki <gnuthaki@codeaurora.org>
2021-08-26 23:42:44 +05:30
Subbaraman Narayanamurthy
6975081f29 ARM: gic: Add support for logging interrupts in RTB
To help with the debug of interrupt storms and problems during IRQ
handling, log the IRQ number in RTB for each interrupt that fires.

Change-Id: Icea5ded0f7d66ba3c7608793e7c25218e2a64e0c
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
[abhimany: resolve trivial merge conflicts]
Signed-off-by: Abhimanyu Kapur <abhimany@codeaurora.org>
[aiquny: resolve trivial merge conflicts]
Signed-off-by: Maria Yu <aiquny@codeaurora.org>
2021-08-26 08:41:08 -07:00
qctecmdr
52838777d3 Merge "msm: kgsl: Free the memory allocated for pages array in failure case" 2021-08-26 08:40:21 -07:00
Puranam V G Tejaswi
29204b2e9e msm: kgsl: Free the memory allocated for pages array in failure case
kgsl_system_alloc_pages and kgsl_pool_alloc_pages allocate memory for
pages array. This memory is not freed in kgsl_alloc_secure_pages in
some failure cases. Free the allocated memory in case of failure to
avoid memory leak issues.

Change-Id: Ifed2573506d549f60d01f8d3ba06cbabdc9878e0
Signed-off-by: Puranam V G Tejaswi <pvgtejas@codeaurora.org>
2021-08-26 13:13:49 +05:30
Fenglin Wu
5d7d9d76f6 input: qcom-hv-haptics: ignore pattern_src when checking hBoost ready
Commit b610aa2d70a3 ("input: qcom-hv-haptics: Ignore checking HBoost status
when SWR is playing") is added to ignore checking hBoost ready status when
triggering a non-FIFO play with SWR playing in the background. This should
be also applicable when triggering a FIFO play, so remove the pattern_src
check as the HBoost should be always ready when triggering the play with
SWR playing in the background.

Change-Id: If3d5ff7138e189c81991775d7814229c4d0e8c0a
Signed-off-by: Fenglin Wu <fenglinw@codeaurora.org>
2021-08-26 11:29:34 +08:00
qctecmdr
07071b6c92 Merge "PCI: Disable L0s and L1 support 0x1104" 2021-08-25 08:01:32 -07:00
qctecmdr
102be7c17f Merge "usb: f_fs: Prevent race between ep0_release & reset_work" 2021-08-25 08:01:31 -07:00
qctecmdr
149a269cff Merge "usb: gadget: gsi: Avoid accessing an uninitialized variable" 2021-08-25 08:01:31 -07:00
qctecmdr
fa98c03b65 Merge "msm: mhi-dev: Flush ereqs from dev close to avoid OOS transfers" 2021-08-25 08:01:31 -07:00
qctecmdr
e5122a163d Merge "USB: configfs: Send DISCONNECT uevent during UDC bind" 2021-08-25 08:01:30 -07:00
qctecmdr
4283f88031 Merge "fuse: fix bad inode" 2021-08-25 08:01:30 -07:00
qctecmdr
62446f7f66 Merge "msm: kgsl: Change data type for ret in kgsl_mmap" 2021-08-25 08:01:30 -07:00
qctecmdr
6934438ea2 Merge "defconfig: sdxlemur: disable panic on oom on sdxlemur" 2021-08-25 08:01:29 -07:00
Udipto Goswami
759851525d usb: dwc3: debugfs: Add suppot for Enabling L1 in HS through debugfs
Currently the kernel implementation disables L1 in HS since
there are target which does not support gadget L1.
However, implementing this leads to Ch9 compliance
failures.
Therefore implementing a debugfs parameter through which
this can be controlled, when testing for compliance it can
be set to true and carry out the tests.

Change-Id: I9cf9c49737b18ca889fcc1dbe8232a7bb999f35c
Signed-off-by: Udipto Goswami <ugoswami@codeaurora.org>
2021-08-24 21:42:01 -07:00
Thinh Nguyen
62ff8c0acd usb: dwc3: gadget: Check for disabled LPM quirk
If the device doesn't support LPM, make sure to disable the LPM
capability and don't advertise to the host that it supports it.

Change-Id: I29ceac849220b06d2a01fa14f00483b10d7acfc0
Acked-by: Felipe Balbi <balbi@kernel.org>
Signed-off-by: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
Link: https://lore.kernel.org/r/9e68527ff932b1646f92a7593d4092a903754666.1618366071.git.Thinh.Nguyen@synopsys.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Git-Commit: 475e8be53d0496f9bc6159f4abb3ff5f9b90e8de
Git-Repo: https://android.googlesource.com/kernel/common/
Signed-off-by: Udipto Goswami <ugoswami@codeaurora.org>
2021-08-24 21:38:53 -07:00
Udipto Goswami
286f4af0df Revert "usb: dwc3: Add support of disable L1 in HS mode"
This reverts commit c3de8d2179 ("usb: dwc3: Add support
of disable L1 in HS mode") since the patch had implemented
the functionality by changing the bcdUSB to 2.0.
Eventhough it solves the problem, this results in compliance
failures.
Fix this by reverting the implementation. This will allow
the compliance to detect the DUT as L1 supported device.

Change-Id: I30894618584ebedf697dd98e0c94a42c961bc49d
Signed-off-by: Udipto Goswami <ugoswami@codeaurora.org>
2021-08-24 21:38:28 -07:00
Vijayanand Jitta
c03822d0c0 defconfig: sdxlemur: disable panic on oom on sdxlemur
sdx targets rely on oom killer to kill the processes as there is
no lmk. so, disable panic_on_oom on sdxlemur.

Change-Id: I4f06a0f4d6e45384d048bb5b9c61bee76d751896
Signed-off-by: Vijayanand Jitta <vjitta@codeaurora.org>
2021-08-24 21:35:00 -07:00
Kamal Agrawal
b7e04c58bc msm: kgsl: Change data type for ret in kgsl_mmap
ret variable is meant to store the return value which can be negative.
Change the data type from unsigned int to int.

Change-Id: I6ea46c40d22dfc6474bbfda9b0e7791d39798520
Signed-off-by: Kamal Agrawal <kamaagra@codeaurora.org>
2021-08-24 19:39:53 -07:00
Gauri Joshi
1f3617efcc msm: mhi-dev: Flush ereqs from dev close to avoid OOS transfers
Currently there is a race condition where during the flushing of ereqs
the channel is closed from the client on the EP side, which is causing
the flush function to access null memory. To avoid that call the flush
from dev close which ensures all the pending ereqs are closed before
closing the channel and freeing the memory.

Change-Id: Id81d8cb8b326340d28f6cfe9d48dcd685a8038f9
Signed-off-by: Gauri Joshi <gaurjosh@codeaurora.org>
2021-08-24 10:45:55 -07:00
Krishna Kurapati
f7df4abffe usb: gadget: gsi: Avoid accessing an uninitialized variable
Prevent dereferencing an uninitialized f_gsi pointer.
Return a valid gsi context only after finding a valid
gsi_opts instance. Else return NULL.

Change-Id: I75578c0bc3f4673ec66cb80bcb7a6ae328489253
Signed-off-by: Krishna Kurapati <kriskura@codeaurora.org>
2021-08-24 07:37:55 -07:00
Udipto Goswami
f431a2bae3 usb: f_fs: Prevent race between ep0_release & reset_work
When ffs_func_disable is called the driver will call set_alt
as part of which if FFS_DEACTIVATED is set then it schedules
reset_work. It further goes and tries to call epfile_destroy
where kfree is done. If within the same time, if ep0_release
is also called, it will also go forward and call epfiles_destroy.
This is because although the driver did kfree, but did't mark NULL,
which is why the if check for epfile equals NULL will fail to prevent
and will still be able to proceed. At this point the epfile instance
is corrupted therefore when in epfile_destroy it goes into the if
check which will trigger the BUG_ON check causing crash.
Following is the illustration:

                 CPU1                      CPU2
ffs_ep0_release
ffs_data_closed
ffs->state = FFS_DEACTIVATED        (atomic context)
                                    ffs_func_disable
                                    ffs_func_set_alt
                                    schedule_work(&ffs->reset_work)
ffs_epfiles_destroy(ffs->epfiles)
(running for loop not finished)

ffs_reset_work (preempts)
ffs_data_reset
ffs_data_clear
ffs_epfiles_destroy(ffs->epfiles)

Fix this by protecting the epfile_destroy calls with mutex_lock
and also ensuring to mark epfiles NULL within it.

Change-Id: I452c61ba9f404676e08550d12cb7096b8d449706
Signed-off-by: Udipto Goswami <ugoswami@codeaurora.org>
2021-08-24 05:34:53 -07:00
Chandana Kishori Chiluveru
147ca8205d USB: configfs: Send DISCONNECT uevent during UDC bind
commit ("USB: configfs: Don't send DISCONNECT uevent during unbind")
removed sending disconnect uevent from unbind path. In normal disconnect
path kernel will notify the disconnect event from dwc3_disconnect_gadget()
function. If their is a race between composition switch and cable
disconnect dwc gadget pointers may become null from composition unbind
rules and then we end up not sending any disconnect notification to
usespace and status remains in usb connected state in
usb preferences screen.

Hence fix this issue by scheduling android work from bind path
which will send disconnect event to userspace.

Change-Id: Ic53d8d9f6e5ae19d28bb1c23722a62a38f80ec08
Signed-off-by: Chandana Kishori Chiluveru <cchiluve@codeaurora.org>
2021-08-24 05:32:34 -07:00
Vignesh Viswanathan
0ffd96a69e PCI: Disable L0s and L1 support 0x1104
QCN9000 target with device ID 0x1104 does not support L0s and L1
support.

Disable L0s and L1 support for QCN9000 in PCI quirks.

Change-Id: Ibb7b7c6e89e8076e4f7c6e32de651833e7c62c73
Signed-off-by: Vignesh Viswanathan <viswanat@codeaurora.org>
2021-08-24 03:04:19 -07:00
Miklos Szeredi
e3df45eef8 fuse: fix bad inode
Jan Kara's analysis of the syzbot report (edited):

The reproducer opens a directory on FUSE filesystem, it then attaches
dnotify mark to the open directory.  After that a fuse_do_getattr() call
finds that attributes returned by the server are inconsistent, and calls
make_bad_inode() which, among other things does:

          inode->i_mode = S_IFREG;

This then confuses dnotify which doesn't tear down its structures
properly and eventually crashes.

Avoid calling make_bad_inode() on a live inode: switch to a private flag on
the fuse inode.  Also add the test to ops which the bad_inode_ops would
have caught.

This change goes back to the initial merge of fuse in 2.6.14...

Change-Id: Iec8f3c66e1ee214e641d71cf01e6f0c2755c3cef
Reported-by: syzbot+f427adf9324b92652ccc@syzkaller.appspotmail.com
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Tested-by: Jan Kara <jack@suse.cz>
Cc: <stable@vger.kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Git-commit: 732251cabe
Git-repo: https://android.googlesource.com/kernel/common/
Signed-off-by: Pradeep P V K <pragalla@codeaurora.org>
2021-08-23 22:25:08 -07:00
Gauri Joshi
75c8d2fc98 msm: ep-pcie: Enable global IRQ after enumeration
The global irqs are being enabled before EP driver has completed
successful link enumeration. This causes a race condition where
the BME IRQ is processed before link up causing the link up to
exit before updating the link status. Any further processing results
in LINK_DISABLED error. Avoid this scenario by enabling the global
interrupts after enumeration has finished.

Change-Id: I983a35f461da5d8966cadc9918b5529d16182b47
Signed-off-by: Gauri Joshi <gaurjosh@codeaurora.org>
2021-08-23 17:57:37 -07:00
qctecmdr
1ca91eb817 Merge "drivers: thermal: tsens: Optimize logs in tsens crash path" 2021-08-22 23:06:38 -07:00
qctecmdr
77c8bda811 Merge "coresight-tmc-etr: Use vmalloc once kcalloc fail" 2021-08-22 23:06:38 -07:00
qctecmdr
7a124aaf7e Merge "sched: Improve the scheduler" 2021-08-22 23:06:38 -07:00
qctecmdr
c984db7626 Merge "msm: kgsl: Use worker to put refcount on mem entry" 2021-08-22 23:06:37 -07:00
qctecmdr
dfa162728a Merge "msm: kgsl: Keep the context alive until its fences signal" 2021-08-22 23:06:37 -07:00
qctecmdr
a1f9d9b1a3 Merge "mmc: sdhci-msm: Update pr_err condition in DLL init path" 2021-08-22 23:06:37 -07:00
qctecmdr
6eb0a487dd Merge "soc: qcom: secure_buffer: Fix types and accessors when working with __le64" 2021-08-22 23:06:36 -07:00
qctecmdr
e72c85664b Merge "msm: ADSPRPC: Fix to avoid Use after free in create_dynamic_process" 2021-08-22 23:06:36 -07:00
Mao Jinlong
5e6bbb64ec coresight-tmc-etr: Use vmalloc once kcalloc fail
Sometimes system doesn't have enough continuous pages for kcalloc.
If kcalloc fail, use vmalloc instead.

Change-Id: Ie0864224f4eeedbd01b301f59b4eb307cc1f8df2
Signed-off-by: Mao Jinlong <jinlmao@codeaurora.org>
2021-08-22 19:56:01 -07:00
qctecmdr
2ae37c23f5 Merge "msm: kgsl: Remove unused 'mapped' variable" 2021-08-22 10:36:51 -07:00
Sarthak Garg
4af8529d8d mmc: sdhci-msm: Update pr_err condition in DLL init path
eMMC device operating at 1.8 V can be run up to 100 MHz without SDCDC
(DLL) and with DLL above 100 MHz.

Change the existing pr_err condition to less than 100MHz.

Change-Id: Ia6575ddfd0e4dc57723226e3dff24ad485a1a2ea
Signed-off-by: Sarthak Garg <sartgarg@codeaurora.org>
2021-08-20 04:19:46 -07:00
Naman Padhiar
5c463f983f icnss2: Properly handle SOC_WAKE req stuck in QMI
SOC_WAKE_REQ can stuck in QMI layer for more than 500ms,
this will be considered as SOC_WAKE_REQ failure by host
driver and it will send SOC_WAKE_REL. Properly handle
SOC_WAKE_REL based on SOC_WAKE_REQ status and accordingly
update reference count.

Change-Id: Ib4a549bceb98be071e7a570a663276d2c7bea389
Signed-off-by: Naman Padhiar <npadhiar@codeaurora.org>
2021-08-20 14:00:35 +05:30
Isaac J. Manjarres
8c994bbe15 soc: qcom: secure_buffer: Fix types and accessors when working with __le64
When the kernel is compiled with the sparse static analysis tool
enabled, the following warnings are emitted:

 drivers/soc/qcom//trace_secure_buffer.h:53:1: warning: incorrect type in
 assignment (different base types)
 drivers/soc/qcom//trace_secure_buffer.h:53:1: warning: incorrect type in
 assignment (different base types)
 drivers/soc/qcom//trace_secure_buffer.h:53:1: warning: invalid
 assignment: +=

Fix this by converting the type of the addrs variable from phys_addr_t
to u64, since the value we read into it is of type__le64 will always be
64 bits, while phys_addr_t may not be. Also, use the correct accessors
when accessing variables of type __le64.

Change-Id: Ia7e2394f2dc501dbf80f9035e0177555449dcfd8
Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>
2021-08-19 20:26:03 -07:00