Commit graph

793801 commits

Author SHA1 Message Date
Laurent Dufour
ead04c98fd mm: introduce INIT_VMA()
Some VMA struct fields need to be initialized once the VMA structure is
allocated.
Currently this only concerns anon_vma_chain field but some other will be
added to support the speculative page fault.

Instead of spreading the initialization calls all over the code, let's
introduce a dedicated inline function.

Change-Id: I9f6b29dc74055354318b548e2b6b22c37d4c61bb
Signed-off-by: Laurent Dufour <ldufour@linux.vnet.ibm.com>
Patch-mainline: linux-mm @ Tue, 17 Apr 2018 16:33:13
[vinmenon@codeaurora.org: trivial merge conflict fixes]
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
[charante@codeaurora.org: merge conflict fixes]
Signed-off-by: Charan Teja Reddy <charante@codeaurora.org>
2019-03-29 03:08:28 -07:00
Laurent Dufour
976415c621 mm: make pte_unmap_same compatible with SPF
pte_unmap_same() is making the assumption that the page table are still
around because the mmap_sem is held.
This is no more the case when running a speculative page fault and
additional check must be made to ensure that the final page table are still
there.

This is now done by calling pte_spinlock() to check for the VMA's
consistency while locking for the page tables.

This is requiring passing a vm_fault structure to pte_unmap_same() which is
containing all the needed parameters.

As pte_spinlock() may fail in the case of a speculative page fault, if the
VMA has been touched in our back, pte_unmap_same() should now return 3
cases :
	1. pte are the same (0)
	2. pte are different (VM_FAULT_PTNOTSAME)
	3. a VMA's changes has been detected (VM_FAULT_RETRY)

The case 2 is handled by the introduction of a new VM_FAULT flag named
VM_FAULT_PTNOTSAME which is then trapped in cow_user_page().
If VM_FAULT_RETRY is returned, it is passed up to the callers to retry the
page fault while holding the mmap_sem.

Change-Id: Iaccfa0d877334f4343f8b0ec3400af5070ff5864
Acked-by: David Rientjes <rientjes@google.com>
Signed-off-by: Laurent Dufour <ldufour@linux.vnet.ibm.com>
Patch-mainline: linux-mm @ Tue, 17 Apr 2018 16:33:12
[vinmenon@codeaurora.org: trivial merge conflicts]
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
Signed-off-by: Charan Teja Reddy <charante@codeaurora.org>
2019-03-29 03:08:20 -07:00
Laurent Dufour
9e5b1f335f mm: introduce pte_spinlock for FAULT_FLAG_SPECULATIVE
When handling page fault without holding the mmap_sem the fetch of the
pte lock pointer and the locking will have to be done while ensuring
that the VMA is not touched in our back.

So move the fetch and locking operations in a dedicated function.

Change-Id: If93ab95b1d22b7195e1c15b57315021f6be7c394
Signed-off-by: Laurent Dufour <ldufour@linux.vnet.ibm.com>
Patch-mainline: linux-mm @ Tue, 17 Apr 2018 16:33:11
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
2019-03-29 03:08:12 -07:00
Peter Zijlstra
28c00c2a5f mm: prepare for FAULT_FLAG_SPECULATIVE
When speculating faults (without holding mmap_sem) we need to validate
that the vma against which we loaded pages is still valid when we're
ready to install the new PTE.

Therefore, replace the pte_offset_map_lock() calls that (re)take the
PTL with pte_map_lock() which can fail in case we find the VMA changed
since we started the fault.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
[Port to 4.12 kernel]
[Remove the comment about the fault_env structure which has been
 implemented as the vm_fault structure in the kernel]
[move pte_map_lock()'s definition upper in the file]
[move the define of FAULT_FLAG_SPECULATIVE later in the series]
[review error path in do_swap_page(), do_anonymous_page() and
 wp_page_copy()]
Signed-off-by: Laurent Dufour <ldufour@linux.vnet.ibm.com>
Change-Id: Id6dfae130fbfdd4bb92aa6415d6f1db7ef833266
[vinmenon@codeaurora.org: fix trivial merge conflicts]
Patch-mainline: linux-mm @ Tue, 17 Apr 2018 16:33:10
Signed-off-by: Vinayak Menon <vinmenon@codeaurora.org>
Signed-off-by: Charan Teja Reddy <charante@codeaurora.org>
2019-03-29 03:08:03 -07:00
qctecmdr
cc7a8b2dc4 Merge "drm/msm/dp: decouple static and dynamic HDR metadata" 2019-03-28 08:33:05 -07:00
qctecmdr
42227aa41d Merge "msm: vidc: Change platform to enable internal size calculation" 2019-03-28 08:33:05 -07:00
qctecmdr
88d48e524b Merge "arm64: mm: dma-mapping: Fix possible null dereference" 2019-03-28 08:33:03 -07:00
qctecmdr
a7398f5032 Merge "clk: avoid returning local variable pointers during clock registration" 2019-03-28 08:33:03 -07:00
qctecmdr
a19d4744aa Merge "ARM: dts: msm: Add dual panel support on kona" 2019-03-28 03:22:20 -07:00
qctecmdr
ce52dc3bd3 Merge "ARM: dts: msm: Enable PU on BOE WQHD,FHD CMD panels for kona" 2019-03-28 03:22:20 -07:00
qctecmdr
f83fcdfdf1 Merge "ARM: dts: msm: set non fatal atttribute for SDE iommus" 2019-03-28 01:22:42 -07:00
qctecmdr
7294e6b369 Merge "scsi:ufs: Allow ICE calls for UFS_STORAGE type" 2019-03-28 01:22:42 -07:00
qctecmdr
f1e2542374 Merge "msm: vidc: Increase the max supported video load on Kona" 2019-03-28 01:22:42 -07:00
qctecmdr
528217338e Merge "ARM: dts: msm: Enable ESD check for BOE Panel on Kona" 2019-03-28 01:22:41 -07:00
qctecmdr
785ad8733f Merge "msm: msi: add proper check before accessing variables" 2019-03-27 23:16:56 -07:00
qctecmdr
f8f06f5295 Merge "drm/msm/sde: update initial lines calculation" 2019-03-27 23:16:56 -07:00
qctecmdr
cde1d6cd68 Merge "dt-bindings: msm: arm: Add bindings for hid-qvr" 2019-03-27 23:16:55 -07:00
qctecmdr
05dad21801 Merge "Revert "msm: kgsl: Disable secure pagetable"" 2019-03-27 23:16:55 -07:00
qctecmdr
abc0e9e855 Merge "ARM: dts: msm: Add Subcache in Kona cvp dtsi" 2019-03-27 21:24:31 -07:00
qctecmdr
793e897806 Merge "qseecom: double check if app entry exists when unloading app" 2019-03-27 21:24:31 -07:00
qctecmdr
bbffe3ead4 Merge "qseecom: fix a blocked listener request issue" 2019-03-27 21:24:30 -07:00
qctecmdr
46bf9c4679 Merge "drm/msm/sde: dynamic layer mixer reservation for prim disp" 2019-03-27 21:24:29 -07:00
qctecmdr
83b24418b5 Merge "HID: external sensor driver" 2019-03-27 21:24:29 -07:00
qctecmdr
0d1da8d739 Merge "ARM: dts: msm: Add dtsi entries of QMP PHY and USB2PHY for LITO" 2019-03-27 19:09:45 -07:00
qctecmdr
5014f0f977 Merge "drivers: irqchip: pdc: check for valid GPIO interrupts" 2019-03-27 19:09:44 -07:00
qctecmdr
f8bc911cba Merge "ARM: dts: msm: Add support for low power island feature on Kona" 2019-03-27 19:09:44 -07:00
qctecmdr
7fa3f95c39 Merge "sched/fair: Don't let tasks slip away from gold to silver cluster" 2019-03-27 19:09:44 -07:00
qctecmdr
31afc3e109 Merge "ARM: dts: msm: update memory map according to v3 on lito" 2019-03-27 16:55:19 -07:00
qctecmdr
9d2bc76ae9 Merge "msm: ipa: Support Modem distinction of LE MBB and LE MHI" 2019-03-27 16:55:19 -07:00
qctecmdr
2eeee75236 Merge "ARM: dts: msm: Update NPU clock node for LITO" 2019-03-27 16:55:18 -07:00
Sudarshan Rajagopalan
80e0b348ba arm64: mm: dma-mapping: Fix possible null dereference
Check for null pointer before deferencing the dev variable.

Change-Id: I4831defe74e6c3dfd6db16493fca202ca1319513
Signed-off-by: Sudarshan Rajagopalan <sudaraja@codeaurora.org>
2019-03-27 16:17:13 -07:00
David Collins
5efc725907 clk: avoid returning local variable pointers during clock registration
Several clock drivers initialize the clk_hw init element to a
local variable before calling [devm_]clk_hw_register() on it.
This style is fine.  However, the init pointer value becomes
invalid as soon as the registration function returns.  Clear
the init pointer to avoid the possibility of accessing an
invalid memory address after registration completes.

Change-Id: I3ae72c2c7ebc30e443c7034d072591827f4342aa
Signed-off-by: David Collins <collinsd@codeaurora.org>
2019-03-27 15:38:10 -07:00
Satya Rama Aditya Pinapala
946840075a ARM: dts: msm: Enable PU on BOE WQHD,FHD CMD panels for kona
This change enables partial update on BOE WQHD and FHD+
command mode panels for kona target.

Change-Id: Ic153780c424ae80d363c3e44126d0d5f90bb6bfd
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
2019-03-27 15:12:46 -07:00
Satya Rama Aditya Pinapala
4d6e9cd4d7 ARM: dts: msm: Add dual panel support on kona
This change adds support for dual panel on kona target.

Change-Id: Ic4d69fe8fabffb56aab1c42b78e8de1078956065
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
2019-03-27 15:09:47 -07:00
Satya Rama Aditya Pinapala
1ecf20a493 drm/msm/dsi-staging: Dual Panel support in driver
Secondary  panels should use the corresponding DSI CTRL, DSI PHY0 and
Clocks. This change allows the driver to choose the PHY, CTRL index
and clock names depending on the type of panel. The probe for secondary
display should not result a probe failure in cases when only one
panel is being used.

Change-Id: Ief0863c5d3310efdcea4a36b0ec5c640ffe3970e
Signed-off-by: Satya Rama Aditya Pinapala <psraditya30@codeaurora.org>
2019-03-27 15:09:24 -07:00
Vaibhav Deshu Venkatesh
4351344487 msm: vidc: Change platform to enable internal size calculation
Currently for internal size calculation is disabled by using
AR50 as platform type. Change this to IRIS2. However, we still
want to disable this feature hence don't call this function
for both encoder and decoder.

Change-Id: I70b589c88c80b6263fbdeca8d0975d6eea1e8ae1
Signed-off-by: Vaibhav Deshu Venkatesh <vdeshuve@codeaurora.org>
2019-03-27 15:09:01 -07:00
qctecmdr
d1847eb33d Merge "ARM: dts: msm: Add hwevent node for Kona" 2019-03-27 14:42:36 -07:00
qctecmdr
d60df0d3f2 Merge "msm: ipa: Define WLAN FW SSR event" 2019-03-27 14:42:35 -07:00
qctecmdr
7e770544cf Merge "clk: qcom: Fix return value check for round rate during clock registration" 2019-03-27 14:42:35 -07:00
qctecmdr
200b3e7f01 Merge "sched/fair: use WALT signal for energy computation when WALT is enabled" 2019-03-27 14:42:34 -07:00
qctecmdr Service
13371263d3 Merge "ARM: dts: msm: Configure MPM component type for kona" 2019-03-27 12:32:07 -07:00
qctecmdr Service
86e532604d Merge "msm: cvp: Complete CVP feature support in kernel" 2019-03-27 12:32:07 -07:00
qctecmdr Service
94ceb12081 Merge "ARM: dts: msm: correct GPIO interrupt slave IDs for PM8009" 2019-03-27 12:32:06 -07:00
qctecmdr Service
0fdc292607 Merge "ARM: dts: msm: update PMIC GPIO access permissions for Kona" 2019-03-27 12:32:05 -07:00
Steve Cohen
6f150768a9 drm/msm/dp: decouple static and dynamic HDR metadata
Move the static metadata packets to an available generic SDP and
reserve the VSC extension SDP for dynamic metadata packets. The
payload for dynamic metadata comes from MEMPOOL and would
otherwise overwrite the static metadata payload. This change
ensures that both these distinct metadata packets are sent
correctly for every applicable frame.

Change-Id: Ifeb2e975ff9e7a1ce024fbdf5e72fa5422e9e709
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
2019-03-27 11:51:41 -07:00
Steve Cohen
4e7137993d drm/msm/sde: check dynamic metadata header and adjust payload
Validate the VSIF type code in the dynamic metadata payload and
adjust the payload data programmed in the memory pool to align
with the Infoframe SDP v1.3 VSIF packet type. Also reduce the
size of the static array used for caching payloads.

Change-Id: I33a7ace913c9903aeb02677722973edb2fc2739c
Signed-off-by: Steve Cohen <cohens@codeaurora.org>
2019-03-27 14:41:34 -04:00
Chinmay Sawarkar
bba045d8a2 msm: vidc: Increase the max supported video load on Kona
Maximum usecase load supported in Kona is Decode 1080p@960fps.

CRs-Fixed: 2424420
Change-Id: I9759835431805a96ffb39d4adc30b2b6d8d10f9c
Signed-off-by: Chinmay Sawarkar <chinmays@codeaurora.org>
2019-03-27 11:32:24 -07:00
Raghu Ananya Arabolu
5210bda813 Revert "msm: kgsl: Disable secure pagetable"
Enable secure page tables for Kona.
This reverts commit 35dffd7074.

Change-Id: I6a889e5df70ec1514be5904d3d7bf0e3cc599e81
Signed-off-by: Raghu Ananya Arabolu <rarabolu@codeaurora.org>
2019-03-27 11:30:51 -07:00
Raghu Ananya Arabolu
63f532d8da msm: kgsl: Enable Content Protection for A650 GPU
Enable Content Protection feature for A650 GPU. This feature allows
the user to create secure memory and to put the GPU into secure mode.

Change-Id: I7845ccca9ec0d7c7f3d04e34802ebcc62295276b
Signed-off-by: Raghu Ananya Arabolu <rarabolu@codeaurora.org>
2019-03-27 11:30:06 -07:00
Prabhanjan Kandula
55732bf9e0 ARM: dts: msm: set non fatal atttribute for SDE iommus
This change sets non fatal attribute for SDE iommus
as SDE driver prefer to handle the faults at later point
during frame done interrupt timeout.

Change-Id: I1988d554141dd02009414b8a49ce6c3826919284
Signed-off-by: Prabhanjan Kandula <pkandula@codeaurora.org>
2019-03-27 11:16:10 -07:00