712725 Commits

Author SHA1 Message Date
Viresh Kumar
a67f648836 hrtimer: create hrtimer_quiesce_cpu() to isolate CPU from hrtimers
To isolate CPUs (isolate from hrtimers) from sysfs using cpusets, we need some
support from the hrtimer core. i.e. A routine hrtimer_quiesce_cpu() which would
migrate away all the unpinned hrtimers, but shouldn't touch the pinned ones.

This patch creates this routine.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
[forward port to 3.18]
Signed-off-by: Santosh Shukla <santosh.shukla@linaro.org>
[ohaugan@codeaurora.org: Port to 4.4]
Git-commit: d4d50a0ddc35e58ee95137ba4d14e74fea8b682f
Git-repo: git://git.linaro.org/people/mike.holmes/santosh.shukla/lng-isol.git
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
[rameezmustafa@codeaurora.org: Port to msm-4.9]
Signed-off-by: Syed Rameez Mustafa <rameezmustafa@codeaurora.org>

Change-Id: Icf93622bdeed9c6c28eb1aca1637bc5b9522a533
Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
2018-01-22 09:09:06 -08:00
Viresh Kumar
06d4745936 hrtimer: update timer->state with 'pinned' information
'Pinned' information would be required in migrate_hrtimers() now, as we can
migrate non-pinned timers away without a hotplug (i.e. with cpuset.quiesce). And
so we may need to identify pinned timers now, as we can't migrate them.

This patch reuses the timer->state variable for setting this flag as there were
enough number of free bits available in this variable. And there is no point
increasing size of this struct by adding another field.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
[forward port to 3.18]
Signed-off-by: Santosh Shukla <santosh.shukla@linaro.org>
[ohaugan@codeaurora.org: Port to 4.4]
Git-commit: 62feaf1ed0b64c04868d143d8bdb92d60dc3189b
Git-repo: git://git.linaro.org/people/mike.holmes/santosh.shukla/lng-isol.git
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
[markivx: Port to 4.14, fix merge conflicts due to lack of timer stats code]
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>

Change-Id: Id2cdd74903598e31fab6999c4cbab9c2fd17fe23
Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
2018-01-22 09:09:03 -08:00
Viresh Kumar
ec772d58b1 timer: create timer_quiesce_cpu() to isolate CPU from timers
To isolate CPUs (isolate from timers) from sysfs using cpusets, we need some
support from the timer core. i.e. A routine timer_quiesce_cpu() which would
migrates away all the unpinned timers, but shouldn't touch the pinned ones.

This patch creates this routine.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
[forward port to 3.18]
Signed-off-by: Santosh Shukla <santosh.shukla@linaro.org>
[ohaugan@codeaurora.org: Port to 4.4. Fixes for compilation error]
Git-commit: 313910b70ea0c73f8789d9189c11e1f339080646
Git-repo: git://git.linaro.org/people/mike.holmes/santosh.shukla/lng-isol.git
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
[rameezmustafa@codeaurora.org: Port to msm-4.9 and rebase to change
					patch dependency order.]
Signed-off-by: Syed Rameez Mustafa <rameezmustafa@codeaurora.org>
[markivx: Port to 4.14, fix merge conflicts]
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>

Change-Id: I4795aeffd1be41830ac295a1e2e8f36fb05e98b7
[satyap@codeaurora.org: resolve trivial merge conflicts]
Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
2018-01-22 09:09:00 -08:00
Vikram Mulukutla
7cfe6ce3c1 sched: tune: Add schedtune+WALT snapshot
This snapshot is taken from msm-4.9 as of commit 57637bbc4fb6537
(Revert "ANDROID: sched/tune: Initialize raw_spin_lock
in boosted_groups").

Change-Id: Ie624026a428c13a6a1f9a1cee259bf5cdd59860a
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
[satyap@codeaurora.org: resolve merge conflicts & uncomment
code for compilation]
Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
2018-01-22 09:08:57 -08:00
Vikram Mulukutla
5adaa343de Revert "ANDROID: sched/tune: Initialize raw_spin_lock in boosted_groups"
This reverts commit c5616f2f874faa20b59b116177b99bf3948586df.

If we re-init the per-cpu boostgroup spinlock every time that
we add a new boosted cgroup, we can easily wipe out (reinit)
a spinlock struct while in a critical section. We should only
be setting up the per-cpu boostgroup data, and the spin_lock
initialization need only happen once - which we're already
doing in a postcore_initcall.

For example:

     -------- CPU 0 --------   | -------- CPU1 --------
cgroupX boost group added      |
schedtune_enqueue_task         |
  acquires(bg->lock)           | cgroupY boost group added
                               |  for_each_cpu()
                               |    raw_spin_lock_init(bg->lock)
  releases(bg->lock)           |
      BUG (already unlocked)   |
			       |

This results in the following BUG from the debug spinlock code:
	BUG: spinlock already unlocked on CPU#5, rcuop/6/68

Change-Id: I04f7c36cea511cd27fcaa2c762de7abbd96fcbbd
CRs-fixed: 2113062
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
2018-01-22 09:08:53 -08:00
Vikram Mulukutla
9fd5670775 sched: Add trace events for WALT
These trace events allows to track various functions
for WALT enabled platforms.

Change-Id: I446bd762584fd32b4a24515152e2a2755abed74d
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
[satyap@codeaurora.org: updated commit text to reflect the change]
Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
2018-01-22 09:08:48 -08:00
Vikram Mulukutla
95665dbc79 sched: Add schedutil snapshot
This snapshot is taken from msm-4.9 as of commit 935c3e96d14c14d
(Revert "sched/fair: Limit sync wakeup bias to waker cpu").

Change-Id: Ib66005e34e57707882e3139265c9866df306e741
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
2018-01-22 09:08:43 -08:00
Joonwoo Park
a883775305 sched: energy: calculate and update CPU capacity dynamically
One SoC can have multiple CPU speedbins which cannot be represented
with current energy model due to fixed capacity per CPU frequency
steps.

Provide CPU's all possible frequency steps instead of capacities along
with corresponding energy costs to be able to support different
speedbins.

Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
[markivx: Resolved merge-conflicts]
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>

Change-Id: Ib865fd5ca7347946cfa532ca464dba4f9c51ced5
[satyap@codeaurora.org:
1. resolve trivial merge conflicts
2. port update_cpu_capacity function from msm-4.9 commit: 5e900d488428a6a
(ANDROID: arm64: Cpu invariant scheduler load-tracking and capacity support)
]
Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
2018-01-22 09:08:39 -08:00
Vikram Mulukutla
cd35a9bc40 sched: sched_avg: Add snapshot of sched_avg
This snapshot is taken from msm-4.9 as of commit 12a64233c6b30a7
("sched: Fix for 32bit '__udivdi3' build error").

Change-Id: I2bac563ddd0985f0bc85a8d7fc6f3c9694c84264
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
[satyap@codeaurora.org:
 1. Resolve merge conflicts
 2. Fix compilation issues for ARCH=um
 3. Comment out parts of code for compilation]
Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
2018-01-22 09:02:44 -08:00
Vikram Mulukutla
bb5b6b3ec4 sched: Add snapshot of Window Assisted Load Tracking (WALT)
This snapshot is taken from msm-4.9 as of commit 935c3e96d14c14d
(Revert "sched/fair: Limit sync wakeup bias to waker cpu").

Change-Id: I53b79289b37b7a352ae2a04b03cdadb3f2e564c6
Signed-off-by: Vikram Mulukutla <markivx@codeaurora.org>
[satyap@codeaurora.org:
1. Resolve merge conflicts
2. Fix indentation issues
3. Fix compilation issues for ARCH=um & SDM855
4. Comment out parts of code for compilation
5. Remove stubs introduced by commit: d8e3774e124001f
(cpufreq: Various changes to allow sugov to compile)]
Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
2018-01-22 09:00:37 -08:00
Linux Build Service Account
b4695fbf1b Merge "nvmem: qcom-spmi-sdam: Add support for SPMI SDAM" 2018-01-21 12:12:37 -08:00
Linux Build Service Account
afa6ff3aed Merge "msm: ipa3: IPA GSI channel context state not sync with current state" 2018-01-18 06:49:43 -08:00
Linux Build Service Account
ce08a9fde1 Merge "drm/msm: update dma buf lazy unmap" 2018-01-18 06:49:42 -08:00
Anirudh Ghayal
82f2bbfc69 nvmem: qcom-spmi-sdam: Add support for SPMI SDAM
The SDAM provides scratch register space for the
PMIC clients which can be accessed over the NVMEM
framework. The memory can be used by software to
store information or communicate to/from the PBUS.

Change-Id: Ieb1b8fa296ce7250060d3c036f4ed4ae153b0359
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
2018-01-18 20:04:39 +05:30
Mohammed Javid
95f12cb1fa msm: ipa3: IPA GSI channel context state not sync with current state
IPA GSI register channel state not fully sync with gsi
channel context state during USB disconnect/suspend scenarios.
this change updates the gsi channel context state correctly.

Change-Id: If9cbae6ac64a6a18dc417dd458d842e7044eba72
Acked-by: Ashok Vuyyuru <avuyyuru@qti.qualcomm.com>
Signed-off-by: Mohammed Javid <mjavid@codeaurora.org>
2018-01-18 14:10:41 +05:30
Linux Build Service Account
ebf43a689f Merge "soc: qcom: pil: Pass the right pointer in service locator" 2018-01-18 00:12:36 -08:00
Linux Build Service Account
d368a797d6 Merge "ARM: dts: msm: Update the rumi clock freq for sdm855" 2018-01-18 00:12:35 -08:00
Linux Build Service Account
0db05aa7c4 Merge "diag: Add auto query support for diag over stm" 2018-01-18 00:12:34 -08:00
Linux Build Service Account
e1ba2552fd Merge "icnss: Do not assert if reboot requested during PDR" 2018-01-18 00:12:31 -08:00
Linux Build Service Account
1cacd8a313 Merge "icnss: Restrict MSA0 permission to HLOS only during SSR" 2018-01-18 00:12:30 -08:00
Linux Build Service Account
34eabbd69d Merge "icnss: Re-probe if driver probe returns error of defer" 2018-01-18 00:12:29 -08:00
Linux Build Service Account
8e47769c92 Merge "icnss: Check for FW_READY state before sending uevent in PD notifier" 2018-01-18 00:12:28 -08:00
Linux Build Service Account
2dfcb87d35 Merge "msm: sde: update dma buf lazy mapping for sde rotator" 2018-01-18 00:12:27 -08:00
Linux Build Service Account
5ecc1000f4 Merge "defconfig: msm: Enable Sleep driver for sdm855" 2018-01-18 00:12:26 -08:00
Linux Build Service Account
9da3747578 Merge "usb: hcd: Add USB atomic notifier callback for HC died error" 2018-01-18 00:12:24 -08:00
Runmin Wang
46e725d365 soc: qcom: pil: Pass the right pointer in service locator
Pass the correct request and response buffer pointer to the
qmi functions.

Change-Id: I5910d26471ee946118792bdb96e1e0d8af768106
Signed-off-by: Runmin Wang <runminw@codeaurora.org>
2018-01-17 17:06:11 -08:00
Linux Build Service Account
0ea83a2b1e Merge "ALSA: pcm: use lock to protect substream runtime resource" 2018-01-17 15:58:12 -08:00
Linux Build Service Account
1cf46383bc Merge "defconfig: arm64: sdm855: enable USB PD drivers" 2018-01-17 15:58:09 -08:00
Linux Build Service Account
324aba3bc1 Merge "coresight: tpdm: Check TPDM status before accessing register" 2018-01-17 15:58:08 -08:00
Runmin Wang
dec0fd7a19 ARM: dts: msm: Update the rumi clock freq for sdm855
Update the rumi clock freq for the new rumi release.

Change-Id: I1512879337035124590b14f0014c763c05e01a87
Signed-off-by: Runmin Wang <runminw@codeaurora.org>
2018-01-17 13:00:58 -08:00
Benjamin Chan
46e6ab3223 drm/msm: update dma buf lazy unmap
dma buffer lazy unmap requires the client to set the dma_map_attrs with
DMA_ATTR_DELAYED_UNMAP value when calling dma_buf_map_attachment and
dma_buf_unmap_attachment. Override gem_prime_import method with
msm_gem_prime_import to support the lazy unmap attribute setting.

Change-Id: Iff471cd5e34c5261bc32e833af622a3839bf6f0e
Signed-off-by: Benjamin Chan <bkchan@codeaurora.org>
2018-01-17 11:29:05 -08:00
Linux Build Service Account
4cad295da4 Merge "ARM: dts: msm: add third cluster support for SDM855" 2018-01-17 10:38:52 -08:00
Linux Build Service Account
ef7ccf73ff Merge "clk: qcom: gcc-sdm855: Update the GCC clock driver for SDM855" 2018-01-17 10:38:51 -08:00
Linux Build Service Account
27ee07ab50 Merge "soc: qcom: pil: Update the service-notifier to the new QMI interface" 2018-01-17 10:38:49 -08:00
Linux Build Service Account
7be1fd7f34 Merge "soc: qcom: pil: Update the service-locator to the new QMI interface" 2018-01-17 10:38:48 -08:00
Linux Build Service Account
0b74211fe2 Merge "ALSA: pcm: add locks for accessing runtime resource" 2018-01-17 10:38:47 -08:00
Linux Build Service Account
05a79a2cfd Merge "defconfig: msm: Enable PMIC5 ADC for SDM855" 2018-01-16 22:27:07 -08:00
Linux Build Service Account
9115d84941 Merge "iio: adc: Add SPMI PMIC5 ADC driver" 2018-01-16 22:27:06 -08:00
Linux Build Service Account
3e55c9a051 Merge "spmi: spmi-pmic-arb: correct duplicate APID to PPID mapping logic" 2018-01-16 22:27:05 -08:00
Linux Build Service Account
a0585d0333 Merge "defconfig: arm64: Enable BUS_SCALING RPMH option for sdm855-perf" 2018-01-16 22:27:03 -08:00
Jack Pham
26cb2e3a8e defconfig: arm64: sdm855: enable USB PD drivers
Enable the USB PD PHY and policy engine drivers. Also enable
the dual role USB class driver which is a required dependency.

Change-Id: I5cf465183fca5bb77197f5ea79462dd1a2b97b9b
Signed-off-by: Jack Pham <jackp@codeaurora.org>
2018-01-16 22:05:34 -08:00
Jack Pham
89a954ae22 usb: pd: add snapshot of qpnp-pdphy and policy_engine drivers
The qpnp-pdphy driver provides support for the PD PHY peripheral
found on Qualcomm Technologies, Inc. PMICs. This along with
the policy engine provides a protocol stack that supports
USB Power Delivery communication over a Type-C port.

This snapshot is taken as of msm-4.9 commit 11273b09e247
("usb: phy: msm: Remove phy-msm-usb driver"). This includes one
minor fixup to remove use of the extcon mutually_exclusive
field which is no longer visible outside of drivers/extcon.

Change-Id: I0a34076dee8476494dfccfe6fc807247caab8927
Signed-off-by: Jack Pham <jackp@codeaurora.org>
2018-01-16 22:04:03 -08:00
Mayank Rana
a4febd54c1 extcon: Add usage of blocking notifier chain
This change adds required APIs to register blocking notifier call
for blocking functionality using extcon framework.

Change-Id: I0e8e3b29d169ca833f85e42d2df98dd8380cbf46
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
Signed-off-by: Jack Pham <jackp@codeaurora.org>
2018-01-16 22:04:02 -08:00
Tingwei Zhang
37786c4894 coresight: tpdm: Check TPDM status before accessing register
Clock needs to be on when accessing TPDM register.  Clock is
enabled with TPDM enablement process.  Check for TPDM enablement
status before accessing register, return error if TPDM is not
enabled.

Change-Id: I3010fc8c8dc2a1c58d2b5276ab832b2e3b063f08
Signed-off-by: Tingwei Zhang <tingwei@codeaurora.org>
2018-01-16 21:13:31 -08:00
Karthikeyan Mani
02ff61a157 ALSA: pcm: use lock to protect substream runtime resource
Use a spinlock to protect runtime resource in substream
against race conditions which may lead to use-after-free.

CRs-fixed: 2112713
Change-Id: I37dee68cad5eae05b21cfade3dabc0c2b79be6b8
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
Signed-off-by: Meng Wang <mwang@codeaurora.org>
2018-01-16 20:24:03 -08:00
Karthikeyan Mani
01e5296c0e ALSA: pcm: add locks for accessing runtime resource
Add spin lock to resolve race conditions while
accessing substream runtime resource.

CRs-fixed: 2112713
Change-Id: I8db743303ceb50205d62adfc02caf6ecab635d47
Signed-off-by: Karthikeyan Mani <kmani@codeaurora.org>
2018-01-16 19:24:03 -08:00
Sreelakshmi Gownipalli
6682f30d74 diag: Add auto query support for diag over stm
Add auto query command response support for
diag over stm.

Change-Id: I3cb235f95ec9152962726a0ba7894fd6133bf945
Signed-off-by: Sreelakshmi Gownipalli <sgownipa@codeaurora.org>
2018-01-16 15:49:40 -08:00
Benjamin Chan
782305fc2d msm: sde: update dma buf lazy mapping for sde rotator
msm_dma_map_sg_lazy is deprecated. New method of enabling lazy
mapping/unmapping will require to set the dma buf attachment attribute
with DMA_ATTR_DELAYED_UNMAP when calling dma_buf_map_attachment and
dma_buf_unmap_attachment.

Change-Id: I0efd554c70d6b790d80e11fcf69d11735cd3cc24
Signed-off-by: Benjamin Chan <bkchan@codeaurora.org>
2018-01-16 15:23:43 -08:00
Satya Durga Srinivasu Prabhala
9a7990a4bf ARM: dts: msm: add third cluster support for SDM855
SDM855 supports three clusters, update cpu map to reflect the same.

Change-Id: Id8f98d3ddf7f7ec1a0fcdc19052436d61d8c1941
Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
2018-01-16 14:11:51 -08:00
Linux Build Service Account
210fe280bf Merge "Merge remote-tracking branch 'remotes/origin/tmp-9189141' into msm-4.14" 2018-01-16 10:46:02 -08:00