Commit graph

889,574 commits

Author SHA1 Message Date
Robin Murphy
9b972b90ca iommu/iova: Don't BUG on invalid PFNs
Unlike the other instances which represent a complete loss of
consistency within the rcache mechanism itself, or a fundamental
and obvious misconfiguration by an IOMMU driver, the BUG_ON() in
iova_magazine_free_pfns() can be provoked at more or less any time
in a "spooky action-at-a-distance" manner by any old device driver
passing nonsense to dma_unmap_*() which then propagates through to
queue_iova().

Not only is this well outside the IOVA layer's control, it's also
nowhere near fatal enough to justify panicking anyway - all that
really achieves is to make debugging the offending driver more
difficult. Let's simply WARN and otherwise ignore bogus PFNs.

Reported-by: Prakash Gupta <guptap@codeaurora.org>
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Reviewed-by: Prakash Gupta <guptap@codeaurora.org>
Link: https://lore.kernel.org/r/acbd2d092b42738a03a21b417ce64e27f8c91c86.1591103298.git.robin.murphy@arm.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Change-Id: Ic8118863e89547ec03a3c0a96158aa38be8f41af
Git-Commit: d3e3d2be688b4b5864538de61e750721a311e4fc
Git-Repo: git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
Signed-off-by: Vijayanand Jitta <vjitta@codeaurora.org>
2020-07-08 00:46:40 -07:00
Fenglin Wu
6c1fe6cb4f input: qcom-hv-haptics: Update sequence of reading STATUS_DATA
Per HW recommendation, when reading HAP_CFG_STATUS_DATA registers,
MOD_STATUS_XT.SEL need to be written first to select the right mux,
then update MOD_STATUS_SEL register so haptics module can present the
desired status values into STATUS_DATA registers.

Change-Id: I24205072074ff75b25b42c752333b5f99d83d067
Signed-off-by: Fenglin Wu <fenglinw@codeaurora.org>
2020-07-08 13:35:35 +08:00
Raghavendra Kakarla
dcf25bc7d2 drivers: pinctrl: Add gpio to mpm mapping for holi
Add mpm to gpio mapping for the wakeup capable gpio
interrupts.

Change-Id: I349c42fdbd378ea614aafbaa629ae772a81967b5
Signed-off-by: Raghavendra Kakarla <rkakarla@codeaurora.org>
2020-07-08 09:54:50 +05:30
Can Guo
44db484717 ufs: ufs-qcom: Fix racing caused by ufs_qcom_testbus_config()
If func ufs_qcom_testbus_config() is invoked from ufshcd_suspend/resume
and/or clk gate/ungate context, pm_runtime_get_sync() and ufshcd_hold()
will flush the contexts calling ufs_qcom_testbus_config(), causing racing
problems. Fix it by removing the unnecessary calls of pm_runtime_get_sync()
and ufshcd_hold().

Change-Id: Iada1e777de0cafaf8c9b972fcace65399ea9668d
Signed-off-by: Can Guo <cang@codeaurora.org>
2020-07-08 12:23:44 +08:00
Vivek Aknurwar
09e312d708 clk: qcom: gpucc-lahaina: Fix gpu_cc_cx_gmu_clk stuck off warning
Earlier gpu_cc_cx_gmu_clk, gpu_cc_hub_cx_int_clk are kept always on,
due to SMMU hw voting missed tying these 2 clocks.
Update gpu_cc_cx_gmu_clk flag to CLK_DONT_HOLD_STATE as this clk
is used with aon ops and should not be warned by clk framework as clk
hold off state during the kernel boot.

Change-Id: I8fcfffa8c7e4dc6e9ca66bb82cda75c855b35b74
Signed-off-by: Vivek Aknurwar <viveka@codeaurora.org>
2020-07-07 19:21:13 -07:00
Jun Li
389d1d3f26 mmc: Change locking for clk scaling from bh to irqsave
Commit 3e825f9bed299
("mmc: clk-scaling: change locking from irq_save to bh") from msm-3.18
changes the spinlock used by clock scaling logic to use the bh flavor
instead of irqsave in order to avoid the unnecessary irq disable.
Unlike the previous kernel versions, in current mmc driver, tasklet is
removed and mmc_clk_scaling_stop_busy can be invoked from IRQ context.
So, change bh back to irqsave to avoid dead lock.

Change-Id: I5c3674273e81bc89dcffd7dd6a6a4170a58bd6bd
Signed-off-by: Jun Li <liju@codeaurora.org>
2020-07-08 08:48:11 +08:00
Yu SI
cc6fc43ac8 msm: cvp: Increase delay during AXI reset pulse
increase usleep_range

Change-Id: I1eb83b83753a5e97d9ad0e8a56ffe98422c5d7c3
Signed-off-by: Yu SI <ysi@codeaurora.org>
2020-07-07 13:42:54 -07:00
Greg Kroah-Hartman
0d1215837f ANDROID: GKI: Incremental fs: move MODULE_IMPORT_NS() line
Should be right below the license, as per where the automatic tool will
place it.

Bug: 157965270
Reported-by: Matthias Maennich <maennich@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ief560ea12bb5cf21c20d8231b3188b52bc9823b8
2020-07-07 20:23:53 +02:00
Himateja Reddy
47e8913663 msm: adsprpc: Reserve contexts for all static handles
Current code has contexts reserved only for kernel calls. If the
context table is full during static handle invocation, it results
in complete feature failure and hang. Reserve contexts in the context
table for all kernel and static handle invocations.

Change-Id: I21a6de9af86129beede059a66c5b41343d2b5a51
Signed-off-by: Himateja Reddy <hmreddy@codeaurora.org>
2020-07-07 10:49:05 -07:00
Manoj Prabhu B
70fa79dd6f memshare: Move ramdump collection to AFTER_SHUTDOWN event
Collect the ramdumps of memshare clients when notified of
SUBSYS_AFTER_SHUTDOWN event instead of SUBSYS_RAMDUMP_NOTIFICATION
to align with the deprecation of the SUBSYS_RAMDUMP_NOTIFICATION
event.

Change-Id: I303ab90a39843f837547a2f817cefa52c75063f3
Signed-off-by: Manoj Prabhu B <bmanoj@codeaurora.org>
2020-07-07 23:15:10 +05:30
Greg Kroah-Hartman
7bc3e32f7f ANDROID: GKI: set vfs-only exports into their own namespace
We have namespaces, so use them for all vfs-exported namespaces so that
filesystems can use them, but not anything else.

Bug: 157965270
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ic214d31360af5f1e025a176a61e346a8ec62a735
2020-07-07 18:07:10 +02:00
zhang sanshan
dd17237d72 ANDROID: gki: build-in DMA_VIRTUAL_CHANNELS
audio driver us edma to instore data.
fsl-edma used api in virt-dma, like vchan_init to dma opt.
There is not hardware involved. build-in DMA_VIRTUAL_CHANNELS

Bug: 160627323
Change-Id: I2a6bc2281af18a99f46870ed3fc2efc1798b72f2
Signed-off-by: zhang sanshan <pete.zhang@nxp.com>
2020-07-07 14:53:10 +00:00
zhang sanshan
955057dfd7 ANDROID: GKI: make VIDEOBUF2_DMA_CONTIG under GKI_HIDDEN_MEDIA_CONFIGS
it use vb2_dma_contig_memops as default mem_ops in csi driver
drivers/media/platform/mxc/capture/mx6s_capture.c still not upstream to linux community.
q->mem_ops = &vb2_dma_contig_memops;

mem_ops is need in videobuf2-core.c to operate dma buffer.
videobuf2-dma-contig.c is common code which have no hardware involved

Bug: 160195378
Signed-off-by: zhang sanshan <pete.zhang@nxp.com>
Change-Id: Ib084ff96bd4f92aa36f8abb8d4b62a0e9be62e6c
2020-07-07 14:34:20 +00:00
Changki Kim
0c7d745990 ANDROID: PM: sleep: export device_pm_callback_start/end trace event
Export the device_pm_callback_start/end tracepoint so it can be used
in loadable modules.

Bug: 158528747

Change-Id: I31b99032b351d6a548f6c0ee4e02655aefae647f
Signed-off-by: Changki Kim <changki.kim@samsung.com>
2020-07-07 14:22:10 +00:00
Todd Kjos
eba125551f ANDROID: fix copyright notice
New vendor hook files cite Google, Inc instead of Google LLC

Fixes: 7f62740112ef ("ANDROID: add support for vendor hooks")
Signed-off-by: Todd Kjos <tkjos@google.com>
[cherry-pick of just android_vendor.h portion]
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: If42762c4bbe6d0a7ff1cc75b64a3b224902e121c
2020-07-07 13:48:49 +00:00
Todd Kjos
fda70d9fb8 ANDROID: GKI: add android_vendor.h
This header file is to be used for various macros to help add
vendor specific fields to kernel data structures to enable
value-added features implemented in vendor modules.

They are to be used before the freeze (to anticipate places where
vendor-specific data is required).

Bug: 156285741
Signed-off-by: Todd Kjos <tkjos@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ic23b2760ece93facdc51cc35718a4154aba810f9
2020-07-07 13:48:40 +00:00
Pradeep P V K
b2c127dd36 arm64: defconfig: Enable BFQ io scheduler on holi
Enable BFQ IO scheduler as a default on holi.

Change-Id: I749eeb522fe7bcb98e5d0be5b527ce2adf930783
Signed-off-by: Pradeep P V K <ppvk@codeaurora.org>
2020-07-07 19:08:22 +05:30
zhang sanshan
41107bb6ed ANDROID: GKI: enable CONFIG_V4L_PLATFORM_DRIVERS
the sensor/csi/mipi driver are in drivers/media/platform/.
need enable V4L_PLATFORM_DRIVERS by default to support camera
which is need by soc vendor.

Bug: 160192055
Signed-off-by: zhang sanshan <pete.zhang@nxp.com>
Change-Id: I38ef6c1d1dcc2101216a50ad32f7fff96fe7ea65
2020-07-07 12:29:26 +00:00
Vinayak Menon
ac80551df4 mm: reduce the time spend by killed tasks in alloc path
There are issues reported where the tasks killed by LMK
holding huge amounts of memory, loops for seconds in the
reclaim path, thus causing OOMs to happen from other
contexts or a panic when oom path finds that there are no
killable tasks. This patch brings back a change in older
kernel versions to avoid reclaim when a fatal signal is
pending. This is more improtant in our case unlike upstream,
as we loop almost forever in reclaim path when there are LMK
killable tasks (see lmk_kill_possible). Another change done
by the patch is to return without sleep in too_many_isolated
case for tasks with fatal signal pending.

Change-Id: Icd2bb7a9602ea6566425f7918e34c218bbed21cb
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
2020-07-07 05:16:51 -07:00
Nitin Rawat
bafb8fb005 arm64: defconfig: Move to upstream ufshcd core
This change will move ufshcd core to the upstream version.

Change-Id: I5344d3cd1350a9ef76c1cca18ae401972f9cd206
Signed-off-by: Nitin Rawat <nitirawa@codeaurora.org>
2020-07-07 04:54:11 -07:00
himta ram
ba5a0ba83d RTC6226: keep tuned to valid lower band channel for dwell time
While scan operation at rtc6226 driver when band limit
is reached and then we seek with WRAP_ENABLE one more
time to know if lower freq is valid, we update the
valid lower band frequency to user space without keeping
tuned to lower band frequency for specified dwell time and
this leads to tuned freq mismatch between user space and
kernel driver.keep tuned to valid lower band channel for dwell time.
Also scan the lower band frequency channel once all the frequencies
are scan in the band range.

CRs-Fixed: 2725895
Change-Id: I8efb580c495baa314ef1a162e19c52eafbc085a9
Signed-off-by: himta ram <hram@codeaurora.org>
2020-07-07 04:13:01 -07:00
Sridhar Arra
2504614ed4 uio: msm_sharedmem: shared memory region access is also given to vm-nav
If vm-nav-path dtsi property is set, then the shared memory region will
be given access to vm-nav-path also.

Change-Id: I0aef894dbee78c2e3d7d67f61a238a889050037a
Signed-off-by: Sridhar Arra <sarra@codeaurora.org>
Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>
2020-07-07 14:57:19 +05:30
Sridhar Arra
a980ed9830 soc: qcom: secure_buffer: add support for VMID_NAV
Add support for VMID_NAV and shared memory region will be given access to
vm-nav-path also.

Change-Id: I9798e095a1f8bb7a76abcc0ec0949ff26989ad6f
Signed-off-by: Sridhar Arra <sarra@codeaurora.org>
Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>
2020-07-07 14:57:18 +05:30
Sahitya Tummala
87d724a487 uio: msm_sharedmem: add guard page around shared memory
If guard_memory dtsi property is set, then the shared memory
region will be guarded by SZ_4K at the start and at the end.
This is needed to overcome the XPU limitation on few MSM HW,
so as to make this memory not contiguous with other allocations
that may possibly happen from other clients in the system.

Change-Id: I57637619cea8fe7f0f7254624e07177ea4a4fce0
Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>
2020-07-07 14:57:15 +05:30
Odelu Kukatla
daa0416f37 arm64: defconfig: Enable shima interconnect driver
Enable the shima interconnect driver so that consumers
are able to obtain their path handles properly.

Change-Id: I8d5bf9786cf67f568d59ccd45bc13909db5a4041
Signed-off-by: Odelu Kukatla <okukatla@codeaurora.org>
2020-07-07 12:49:32 +05:30
zhang sanshan
1eb60fbfac ANDROID: GKI: enable CONFIG_TYPEC_TCPM
The Type-C Port Controller Manager provides a USB PD and USB Type-C
state machine for use with Type-C Port Controllers.
No hardware involved. Vendor who enable TYPE-C need build-in it by default.

Bug: 159732196
Signed-off-by: zhang sanshan <pete.zhang@nxp.com>
Change-Id: I5453b40fd6047e4258942242259292f50419d28a
2020-07-07 14:41:44 +08:00
zhang sanshan
1b90918a6e ANDROID: GKI: support CONFIG_INPUT_TOUCHSCREEN
enable build in driver drivers/input/touchscreen in gki configure
touch screen should been enable in gki configure which is need by vendor.

Bug: 159736147
Signed-off-by: zhang sanshan <pete.zhang@nxp.com>
Change-Id: I3b1d348791aa9e762374a4965893b3a4a490394b
2020-07-07 14:41:20 +08:00
Fenglin Wu
3343f861dd input: qcom-hv-haptics: clear HW faults before enabling play
If there was any HW fault generated in previous playing, it would
be retained until writing the FAULT_CLR register. Clear the HW faults
before triggering play to make sure it won't be started with any
retained fault status.

Change-Id: Ibac0e1ed3c745efeb5048845a073605642d8407d
Signed-off-by: Fenglin Wu <fenglinw@codeaurora.org>
2020-07-07 10:50:34 +08:00
Greg Kroah-Hartman
056684c0d2 ANDROID: GKI: move abi files to android/
It's good to move the abi files out of the root kernel directory, so
move them to android/ to make it obvious these are add-on things, not
anything that is upstream.

Bug: 155573384
Cc: Matthias Maennich <maennich@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I9f6c2269a1c4e8e4233971adc805cb7584d455f9
2020-07-06 14:13:46 +02:00
Greg Kroah-Hartman
9c233e34ce ANDROID: GKI: drop unneeded "_whitelist" off of symbol filenames
No need for "_whitelist" to be on the abi symbol files, it's just a
list of abi symbols we are going to support.

Bug: 160578303
Cc: Matthias Maennich <maennich@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I0e4c449550f41ff364a09a2987e877a62b986be7
2020-07-06 14:13:26 +02:00
Deepak Kumar
52c58461b7 msm: kgsl: Add support for A660 GPU variant
Add A660 GPU variant support to deal with different
settings of A660 GPU.

Change-Id: I8dc4a5918777ca5ec2c6d14e5e26c603cd5e7390
Signed-off-by: Deepak Kumar <dkumar@codeaurora.org>
2020-07-05 05:35:45 -07:00
Odelu Kukatla
4027c201fd interconnect: qcom: Add Shima interconnect provider driver
Introduce Qualcomm Shima specific provider driver using the
interconnect framework.

Change-Id: Ia9a39344f2e6d6ecb9ed127a3e79d3b856ed3229
Signed-off-by: Odelu Kukatla <okukatla@codeaurora.org>
2020-07-05 16:45:02 +05:30
Taniya Das
adccc947a2 bindings: clock: gcc: Add support for REF clock for HOLI
Add the UFS and PCIE ref clocks to be able to vote/de-vote from client.
Also add the cdiv for DISP_GPLL0.

Change-Id: Ia8bcdc003b16f6245ef23f3188deec0669eedad6
Signed-off-by: Taniya Das <tdas@codeaurora.org>
2020-07-05 15:31:52 +05:30
Taniya Das
052e9edb23 defconfig: arm64: Enable the GPUCC clock controller
GPUCC clock controller enabled for HOLI.

Change-Id: I447b4df0a6407bf2452f3f3d14b6199565cec1d9
Signed-off-by: Taniya Das <tdas@codeaurora.org>
2020-07-05 15:31:51 +05:30
Taniya Das
89bcf859fa clk: qcom: gpucc: Add Graphics Clock controller for HOLI
Add support for Graphics clock controller clocks.

Change-Id: I123b99f1f08d1aa0a8dcc2383721ce5fa60f2416
Signed-off-by: Taniya Das <tdas@codeaurora.org>
2020-07-05 15:31:41 +05:30
qctecmdr
5ae51bab59 Merge "cnss2: Add PBL and SBL dump only for QCA6490" 2020-07-04 22:53:53 -07:00
qctecmdr
33b91930be Merge "ABI: Update internal whitelist for cnss symbols" 2020-07-04 22:53:53 -07:00
qctecmdr
5d03d9c276 Merge "scsi: ufs: Read device tree to find UFS's Vcc voltage level" 2020-07-04 22:53:52 -07:00
qctecmdr
015c94292c Merge "sound: usb: Fix check with usb_get_controller_id() for valid controller id" 2020-07-04 22:53:52 -07:00
qctecmdr
b590a1c616 Merge "soc: qcom: rpmh-rsc: Correctly handle zero active TCS for solver mode" 2020-07-04 22:53:52 -07:00
qctecmdr
ea18af1241 Merge "iommu: add a function to get MID/PID/BID info" 2020-07-04 22:53:52 -07:00
qctecmdr
3213ad6885 Merge "drivers: thermal: pe_sensor: Add code to clear victim irq status" 2020-07-04 22:53:51 -07:00
qctecmdr
b7648c3c1d Merge "cnss2: Add debug dump for Wlan FW PBL and SBL" 2020-07-04 17:22:13 -07:00
qctecmdr
a665d68f73 Merge "icc: dt-bindings: Update endpoint IDs for interconnects for SHIMA" 2020-07-04 14:21:06 -07:00
qctecmdr
3b0bb61171 Merge "mailbox: qcom-apcs: Add compatible for sdxlemur" 2020-07-04 14:21:06 -07:00
qctecmdr
7b657e9bf7 Merge "msm: adsprpc: Add support for recover session on DSP" 2020-07-04 14:21:06 -07:00
qctecmdr
125f36569a Merge "msm: kgsl: Fix datatype of count in kgsl_alloc_secure_pages" 2020-07-04 14:21:05 -07:00
qctecmdr
ea5756a89c Merge "soc: qcom: altmode-glink: Execute client callback in work" 2020-07-04 14:21:05 -07:00
qctecmdr
ccfe8e1bc9 Merge "net: qrtr: ns: Change servers radix tree to xarray" 2020-07-04 14:21:05 -07:00
qctecmdr
6ee581de55 Merge "crypto: msm: change clock operation in qcedev driver" 2020-07-04 14:21:04 -07:00