Commit graph

564027 commits

Author SHA1 Message Date
Shiju Mathew
14b0886b04 thermal-core: Add separate threads for sysfs notify
Add separate threads for sysfs notify. This is required
so that any thermal trip is not blocked while handling
sysfs notify.

Change-Id: Ifee206c29fd1b3c226a342b7f048250d5062397e
Signed-off-by: Shiju Mathew <shijum@codeaurora.org>
[imaund@codeaurora.org: Resolved context conflicts and updated a call
  of INIT_COMPLETION to reinit_completion]
Signed-off-by: Ian Maund <imaund@codeaurora.org>
2016-03-22 11:08:26 -07:00
Jeff Bernard
6a0a9b4bbf thermal-core: Re-program the thresholds every time
Program the thresholds every time regardless so we guarantee
the threshold is programmed.  Previous code didn't reprogram
the threshold if it was already believed to be set.  This
check can be wrong is some cornor cases.

Change-Id: Ie94cb40302c585b2b779da57ad70d32cc2445c96
Signed-off-by: Jeff Bernard <jbernard@codeaurora.org>
2016-03-22 11:08:25 -07:00
Jeff Bernard
5059c6fe71 thermal-core: Add a lock to tz_notify_trip()
Lock the sensor threshold list during notifications so it
isn't updated until notifications are sent out nor can
something else update thresholds until all notifications
are sent out.

Change-Id: Iafce75fa7fceda3de867044861e4a2e3eef47c95
Signed-off-by: Jeff Bernard <jbernard@codeaurora.org>
2016-03-22 11:08:24 -07:00
Ram Chandrasekar
c6fb5b4539 thermal_core: Add sysfs notification support for userspace
Add support to notify the userspace through sysfs
notification when a userspace threshold is crossed.

Change-Id: Ifdea7f15f288d1dca5365aedad16d1bdbc80be6c
Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
2016-03-22 11:08:24 -07:00
Archana Sathyakumar
7ca5e48173 thermal-core: Add API to get temperature
Currently, there is no API to query the current temperature
in sensor framework. Add a generic API to get it.

Change-Id: I038e9a118e77eb6a3599b7d45a0cc8757990d2ef
Signed-off-by: Archana Sathyakumar <asathyak@codeaurora.org>

Conflicts:
	include/linux/thermal.h
2016-03-22 11:08:23 -07:00
Ram Chandrasekar
b48731b306 thermal-core: Fix to send correct trip type to get trip temperature
Fix the thermal sys code to pass the proper trip type
expected by tsens driver to get the tsens trip
temperature.

CRs-Fixed: 608753
Change-Id: I527af21bf13d8c5a93b92b34fa5f05c527a08bcd
Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
2016-03-22 11:08:22 -07:00
Anji Jonnala
939a7bbf7f thermal-core: Fix invalid sensor request not accounted correctly
Add NULL check for sensor name before using it in sensor_get_id and
return NULL explicitly when sensor id is not valid in get_sensor of
thermal core.

Change-Id: I4200a5691183aa2d40ef8ed64554f0beb8ce6d0d
Signed-off-by: Anji Jonnala <anjir@codeaurora.org>
2016-03-22 11:08:21 -07:00
Ram Chandrasekar
9e0b2db23b thermal: Add Support for enabling and disabling tsens trip
Add new API to enable or disable the kernel client's trip
threshold request. The enable or disable trip threshold requests
from different kernel clients and userspace client will
activate/deactivate the corresponding clients threshold request.

Modify thermal sys framework to include only the active
thresholds from clients to determine the current trip
thresholds for tsens.

CRs-Fixed: 561775
Change-Id: I304ac00daa8a0a1a68b60153c29ee6cb5c3507b1
Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
[joshc: drop msm_thermal chunk]
Signed-off-by: Josh Cartwright <joshc@codeaurora.org>
2016-03-22 11:08:20 -07:00
Praveen Chidambaram
6ed698c759 thermal: Fix sensor thresholds not accounted correctly
Sensor threshold min and max are calculated to be binding around the
current temp, but they fail if there no thresholds available with the
min < curr_temp and the max > curr_temp.

Fix negative temperatures handling.

Change-Id: I124d2a9249f705d41469b8e0efffe2dfdf05e292
Signed-off-by: Praveen Chidambaram <pchidamb@codeaurora.org>
2016-03-22 11:08:19 -07:00
Siddartha Mohanadoss
655ad70145 thermal: thermal-core: Change temp type from unsigned to int
Negative temperature values can be set by thermal clients
to the TSENS driver. Having unsgined long type prevents
clients using the set_trip_temp() thermal api to set
negative temperature values. On msm-3.4 kernel this api
had support to set negative temperature. Change the type
to support the negative temperature.

Change-Id: I987aed5a291b76d8360a9256cad0ff0c1adb06c8
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
2016-03-22 11:08:18 -07:00
Praveen Chidambaram
eb00c793d7 thermal: Add sensor API to allow any driver to set thresholds
Sensor API allow drivers to set min or max thresholds and get
notified when the corresponding sensor crosses these thresholds.
The sensor API, uses the THERMAL_TRIP_CONFIGURABLE_HI and
THERMAL_TRIP_CONFIGURABLE_LOW, to set the threshold. The existing
sysfs interfaces will not be affected by the newly added API.

Change-Id: I85d2ae132fc3b7b6d157faf0a7390e31fdc7e6da
Signed-off-by: Praveen Chidambaram <pchidamb@codeaurora.org>

Conflicts:
	include/linux/thermal.h
2016-03-22 11:08:17 -07:00
Siddartha Mohanadoss
0637fa244f thermal: thermal_sys: Add support for configurable trip points.
Add functionality for configurable hi, low and critical low.
Change the trip point attributes to allow userspace clients
with root access to set temperature for configurable hi and
low temperature.

Change-Id: I25c9c3bcfd58e44da5369187d1095559062f1860
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
Signed-off-by: David Brown <davidb@codeaurora.org>

Conflicts:
	drivers/thermal/thermal_core.c
2016-03-22 11:08:17 -07:00
Siddartha Mohanadoss
9b74895842 thermal: tsens: TSENS driver fixups
Add TSENS Thermal driver. Include support to activate
a trip type and mode.

This snapshot is taken as of msm-3.14 commit 3bc54cf86b
(Merge "msm: camera: Add dummy sub module in sensor pipeline")

Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>

Conflicts:
	drivers/thermal/Kconfig
	drivers/thermal/Makefile
	include/linux/thermal.h

Change-Id: Ie8a089afc0cf9e45ac000dff425a3e6206c1b9b1
2016-03-22 11:08:16 -07:00
Mohit Aggarwal
5950e6010f defconfig: arm: msm: Enable memshare config flag
Memshare driver is required to provide memory from HLOS
to clients present on Modem.

Signed-off-by: Mohit Aggarwal <maggarwa@codeaurora.org>
2016-03-22 11:08:15 -07:00
Katish Paran
4f3f0f26a7 memshare: Release the memory only if no allocation is done
Currently, memshare relies on the system monitor only for
releasing memory for the allocated clients. It may happen that
XPU is still intact on the modem side while driver tries to
release the memory. This patch ensures that memory release only
happens if XPU is released.

Change-Id: I45716c0abe6bc08559854782ff73a332e148a7cb
Signed-off-by: Katish Paran <kparan@codeaurora.org>
2016-03-22 11:08:14 -07:00
Mohit Aggarwal
3565c0340c memshare: Port and add snapshot of changes from msm-3.10
Port the memshare driver and apply the following memshare driver
changes taken from msm-3.10 kernel branch as of msm-3.10 commit
4493220f	memshare: Boot time allocation and handling
		multiple clients
2ae4997a	memshare: Donot re-allocate the memory for the
		clients
059dcd59	memshare: Do not overwrite the response for the
		failure case
ed6d183f	memshare: Change the compatible property field
		for child node
b473fc4e2	memshare: Free the memory after XPU unlocking is
		done
95c114c39	memshare: Add query size api support for clients
60f310d4e	memshare: Change dma attribute to
		DMA_ATTR_NO_KERNEL_MAPPING
73075545	memshare: Remove local connection status variable
98dd2908	memshare: Place error check to prevent out of
		bound access

Change-Id: Iecf0a9828efd1d56c309a2af882c13ce36e7fc06
Signed-off-by: Katish Paran <kparan@codeaurora.org>
Signed-off-by: Mohit Aggarwal <maggarwa@codeaurora.org>
2016-03-22 11:08:13 -07:00
Rohit Vaswani
fbde4188a5 defconfig: msm: Enable CONFIG_UIO and CONFIG_MSM_SHAREDMEM
Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
2016-03-22 11:08:12 -07:00
Prasad Sodagudi
73283bb3b8 uio: msm_sharedmem: Use proper format to print phys_addr_t
Use proper printk format specifier to print phys_addr_t
type variable.

Change-Id: I7c55e44e813d8d41e1ead03280044c8542a24922
Signed-off-by: Prasad Sodagudi <psodagud@codeaurora.org>
2016-03-22 11:08:11 -07:00
Nikhilesh Reddy
060c1d5d23 uio: msm_sharedmem: Add support for HYP call
Add support for HYP call to setup the sharedmem permissions
for the MPSS client.

Change-Id: I3b48ae962865d8d0a0ea6e3fbb8e21278b59c690
Signed-off-by: Nikhilesh Reddy <reddyn@codeaurora.org>
2016-03-22 11:08:11 -07:00
Nikhilesh Reddy
d21221f75a uio: Add snapshot of MSM sharedmem driver
This is a snapshot of the MSM sharedmem driver as of msm-3.14
commit:

149717c082aab8168283b7e0c23d8bd5a45b1999
( uio: msm_sharedmem: Add custom mmap )

The following changes are included:
02d55287 uio: msm_sharedmem: Restrict debugfs write to root.
de961fc7 uio: msm_sharedmem: Return ENOMEM if the shared mem addr
	 is zero.
b974ce64 uio: msm_sharedmem: Add addtional information to debugfs
c46af547 uio: msm_sharedmem: Add support for dynamic shared memory
	 allocation

Change-Id: I49902f018bde1d59d41027b7e46268cc17231a3e
Signed-off-by: Nikhilesh Reddy <reddyn@codeaurora.org>
2016-03-22 11:08:10 -07:00
Karthikeyan Ramasubramanian
8d72914ac3 defconfig: arm64: msm: Enable kernel QMI Interface
The kernel QMI interface permits QMI communication to/from kernel
drivers.

Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
2016-03-22 11:08:09 -07:00
Karthikeyan Ramasubramanian
cdb2ce4239 soc: qcom: Add snapshot of QMI
This snapshot is taken as of msm-3.18 commit e70ad0cd (Promotion of
kernel.lnx.3.18-151201.)

Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
2016-03-22 11:08:08 -07:00
Karthikeyan Ramasubramanian
7c45a7bcfa defconfig: arm64: msm: Enable IPC Router G-Link Transport
The IPC Router G-Link Transport permits IPC Router communication over
G-Link to the other processors in the SoC.

Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
2016-03-22 11:08:07 -07:00
Karthikeyan Ramasubramanian
e6668df1e5 soc: qcom: Add snapshot of ipc_router_glink_xprt
This snapshot is taken as of msm-3.18 commit e70ad0cd (Promotion of
kernel.lnx.3.18-151201.)

Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
2016-03-22 11:08:06 -07:00
Karthikeyan Ramasubramanian
963de66884 soc: qcom: Add snapshot of ipc_router_mhi_xprt
This snapshot is taken as of msm-3.18 commit e70ad0cd (Promotion of
kernel.lnx.3.18-151201.)

Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
2016-03-22 11:08:05 -07:00
Karthikeyan Ramasubramanian
95c936f334 soc: qcom: Add snapshot of ipc_router_hsic_xprt
This snapshot is taken as of msm-3.18 commit e70ad0cd (Promotion of
kernel.lnx.3.18-151201.)

Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
2016-03-22 11:08:05 -07:00
Karthikeyan Ramasubramanian
647a60748a soc: qcom: Add snapshot of ipc_router_smd_xprt
This snapshot is taken as of msm-3.18 commit e70ad0cd (Promotion of
kernel.lnx.3.18-151201.)

Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
2016-03-22 11:08:03 -07:00
Karthikeyan Ramasubramanian
36dd48dbf2 defconfig: arm64: msm: Enable IPC Router, IPC Router Security
IPC Router is a peer-to-peer, message oriented router that supports name
service and limited multihop routing for interprocessor messages in the
SoC.

Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
2016-03-22 11:08:02 -07:00
Karthikeyan Ramasubramanian
16d16b9e26 net: ipc_router: Use iov_iter accessor functions
The networking module uses iov_iter library to manage the vector buffers
from user-space. Use iov_iter accessor functions to copy the data from/to
the user-space vector buffers.

Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
2016-03-22 11:08:02 -07:00
Karthikeyan Ramasubramanian
bb3068325b net: ipc_router: Fix to handle the socket framework updates
Update the function signature of sendmsg and recvmsg operations.
Pass the kernel socket flag to the updated socket object allocation
function.

Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
2016-03-22 11:08:01 -07:00
Karthikeyan Ramasubramanian
3f03fc9a6a net: ipc_router: Remove including unused header file
qmi_encdec.h header file is no longer required in IPC Router. Remove
including that header file.

Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
2016-03-22 11:08:00 -07:00
Karthikeyan Ramasubramanian
016c030cc6 net: ipc_router: Add snapshot of IPC Router
This snapshot is taken as of msm-3.18 commit e70ad0cd (Promotion of
kernel.lnx.3.18-151201.)

Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
2016-03-22 11:07:59 -07:00
Karthikeyan Ramasubramanian
9b066e0981 defconfig: arm64: msm: Enable IPC Logging
IPC Logging is a low latency and minimal overhead logging framework used
by many interprocessor communication drivers such as GLink.

Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
2016-03-22 11:07:58 -07:00
Karthikeyan Ramasubramanian
e9deb36997 trace: ipc_logging: Use virtual counter
Using the physical counter leads to a kernel BUG_ON(). Update the
IPC Logging Driver to use virtual counter.

Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
2016-03-22 11:07:57 -07:00
Karthikeyan Ramasubramanian
42e7b9ac7c trace: Add snapshot of ipc_logging driver
This snapshot is taken as of msm-3.18 commit e70ad0cd (Promotion of
kernel.lnx.3.18-151201.)

Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
2016-03-22 11:07:56 -07:00
Karthikeyan Ramasubramanian
749efcfb0f defconfig: arm64: msm: Enable SMEM log
The SMEM log allows certain log events to be synchronized between
multiple processors in the SoC.

Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
2016-03-22 11:07:56 -07:00
Karthikeyan Ramasubramanian
29b6603c1e soc: qcom: Add snapshot of SMEM_LOG Driver
This snapshot is taken as of msm-3.18 commit e70ad0cd (Promotion of
kernel.lnx.3.18-151201.)

Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
2016-03-22 11:07:55 -07:00
Rohit Vaswani
7d3fb3c99c defconfig: msm-perf: Bring it up-to-date with missing features during upgrade
Also run savedefconfig to remove any diff on both defconfigs.

Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
2016-03-22 11:07:54 -07:00
Rohit Vaswani
d8e295377d defconfig: Enable CONFIG_SYNC for Android
Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
2016-03-22 11:07:53 -07:00
Jeremy Gebben
b28215f001 ion: msm: fix Makefile dependencies
ion_cma_heap.o, ion_cma_secure_heap.o, and ion_system_secure_heap.o
all call functions which are only available if CONFIG_MSM_ION
is enabled.

Signed-off-by: Jeremy Gebben <jgebben@codeaurora.org>
2016-03-22 11:07:52 -07:00
Jeremy Gebben
74bcc31ab9 uapi: scsi: add missing header dependencies
Add #include dependencies to pick up definitions of __u32 and HZ.

Signed-off-by: Jeremy Gebben <jgebben@codeaurora.org>
2016-03-22 11:07:51 -07:00
Jeremy Gebben
be3345a032 uapi: fix export of msm_ion.h
Make this file be exported via symlink like the rest
of the android staging uapi headers.

Signed-off-by: Jeremy Gebben <jgebben@codeaurora.org>
2016-03-22 11:07:51 -07:00
Jeremy Gebben
bfa70fb909 msm: secure_buffer: fix stub functions
All of these need to be 'static inline' to avoid multiple
definition problems when MSM_SECURE_BUFFER=n.

Signed-off-by: Jeremy Gebben <jgebben@codeaurora.org>
2016-03-22 11:07:50 -07:00
Abhimanyu Kapur
94fe94c1eb defconfig: arm64: Add msmcortex defconfigs
Add defconfig for supporting msmcobalt debug, perf
and other similar targets.

Change-Id: I3a55fea53cbfe65131fc4ccd505bc684cda9b2fa
Signed-off-by: Abhimanyu Kapur <abhimany@codeaurora.org>
2016-03-22 11:07:49 -07:00
Stepan Moskovchenko
1ca3decb1b smp: Allow booting a specific subset of CPUs
In a heterogenous multiprocessor system, specifying the
'maxcpus' parameter on the kernel command line does not
provide sufficient control over which CPUs are brought
online at kernel boot time, since CPUs may have nonuniform
performance characteristics. Thus, we introduce a
'boot_cpus' command line argument, allowing the user to
explicitly specify the list of CPUs that shall be brought
online during kernel boot.

Change-Id: I5f119e23202660941fa7be8c4e6dd91a82365451
Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
[abhimany: resolve trivial merge conflicts]
Signed-off-by: Abhimanyu Kapur <abhimany@codeaurora.org>
2016-03-22 11:07:48 -07:00
Abhimanyu Kapur
77228fba61 arm64: Split out MSM8996 from generic ARCH_QCOM platform Kconfig
Add support for CONFIG_MSM89986 and split it out from generic
ARCH_QCOM platform.

Change-Id: Ibc287ffb76e5599ba63449534b264e4f31c98ec6
Signed-off-by: Abhimanyu Kapur <abhimany@codeaurora.org>
2016-03-22 11:07:47 -07:00
Abhimanyu Kapur
a42ed83c2f pinctrl: qcom: Snapshot pinctrl driver for msmcobalt
Snapshot pinctrl driver and corresponding makefiles
and Kconfig from msm-3.18@b6a638f8795ee77ca
("Merge "msm: mdss: add support to send dcs cmds by
 left port only in video mode")

Change-Id: I129bb9bd4b7edd252550e6851332867be6fa0423
Signed-off-by: Abhimanyu Kapur <abhimany@codeaurora.org>
2016-03-22 11:07:46 -07:00
Abhimanyu Kapur
e074730c2c ARM: dts: qcom: Snapshot all device tree files for MSMCOBALT
Snapshot all device tree files from msm-3.18@b6a638f8795ee77ca
("Merge "msm: mdss: add support to send dcs cmds by
 left port only in video mode")

Change-Id: I631047dffa019c6d2ee731ead328d332f1c7f3b8
Signed-off-by: Abhimanyu Kapur <abhimany@codeaurora.org>
2016-03-22 11:07:45 -07:00
Rohit Vaswani
5851f30830 Revert "defconfig: arm64: msm: Enable USB DWC3 and PHY drivers"
This reverts commit 52bfd76cadb4bcc4371ea83429d9de0dab981eb7.
2016-03-22 11:07:45 -07:00
David Keitel
571f0ec333 defconfig: enable subsystem restart, MSM_PIL_GENERIC and PIL_MSS_QDSP6V5
Enable subsystem restart and relevant PIL drivers to allow secure
peripheral image loading and QDSP6V5 loading to work.

Change-Id: I899382d04e6a348cde2d46e9e0e6f3faadab2c5d
Signed-off-by: David Keitel <dkeitel@codeaurora.org>
2016-03-22 11:07:44 -07:00