Commit graph

564043 commits

Author SHA1 Message Date
Siddartha Mohanadoss
f3ee02be6e defconfig: msm: Enable VADC_TM driver
PMIC VADC_TM driver provides clients to set
threholds on supported VADC channels such as
vph_pwr and thermistors and receive notification
on threshold crossing.

Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
2016-03-22 11:10:51 -07:00
Siddartha Mohanadoss
a2e74de28f defconfig: msm: Enable QPNP VADC driver
QPNP PMIC VADC driver provides clients ability
to read voltage channels supported by the PMIC such
as vph_pwr and board thermistors.

Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
2016-03-22 11:10:51 -07:00
Siddartha Mohanadoss
784e256994 thermal: qpnp-adc-tm: Enable VADC_TM
This snapshot is taken as of msm-3.18 commit dbdb6776f
(Merge "msm: camera: Add dummy sub module in sensor pipeline")

Fixup compilation to support int type for temperature
value as part of thermal ops API upgrade.

Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
2016-03-22 11:10:50 -07:00
Trilok Soni
e4ddf53067 soc: qcom: scm: Skip Kasan sanitization of the SCM driver
SCM (Secure Channel Manager) driver is used to communicate
with the secure world entities like trustzone and hypervisor.

As a part of the communication we expect to give certain
input, output operands and the caller of the scm_callX
API would expect that output values or return values
of the scm_callX should not get corrupted (if they depend on it).

Due to Kasan instrumentation of the SCM driver following
code is getting instrumented with Kasan __asan_store8_noabort
APIs which would internally check if the memory access is allowed
and it is the functionality of the Kasan to check/instrument
the load and stores.

if (ret1)
	*ret1 = r1;

if (ret2)
	*ret2 = r2;

if (ret3)
	*ret3 = r2;

All will be fine for the first *ret1 = r1; execution since
GCC has generated the code which saves the x1 value (r1)
into the another register but the execution of the
__asan_store8_noabort API after the saving of the register
corrupts the x2 and x3 when it returns. GCC has no knowledge
at this point to save the x2 and x3.

Due to this x2 and x3 is loaded with the Kasan shadow
offset value and Kasan shifted (>> 3) address.

Since x2 and x3 (r2 and r3 in the code above) would be used
as the ret2 and ret3 for the caller of the scm_callX API
the caller would get the wrong return values (if it needs them).

QSEECOM is one such driver which uses these ret2 and ret3 values
and due to this corruption QSEECOM driver was treating it as
SCM call failure, though the bug described above due to Kasan
instrumentation would be applicable to any caller needing
the right values of the ret2 and ret3.

SCM driver is very small and simple and we would not expect
the Out of bound or use-after-free errors for it, so it would
be fine to skip it from the Kasan instrumentation.

Change-Id: I8b2a17759295375c21abc520110f855f349faf4b
Signed-off-by: Trilok Soni <tsoni@codeaurora.org>
[satyap: trivial merge conflict resolution]
Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
2016-03-22 11:10:49 -07:00
Patrick Daly
703e9c00d7 kasan: Kconfig: Add KASAN_SANITIZE_ALL
Allow enabling KASAN on a per-directory or per-file basis rather than
for the entire kernel.

Change-Id: I9a491d3ab0df4c42302a258b9edb3b78cf4e1db0
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
[satyap: trivial merge conflict resolution]
Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
2016-03-22 11:10:48 -07:00
Patrick Daly
c836a400dd lib: Ignore kasan errors from find_next_bit and last bit
find_next_bit and find_last_bit code operates on the unsigned long *addr,
and without knowing the size of the actual buffer passed to it, Kasan
detects it as invalid Out of Bound read access.

find_next_bit and find_last_bit implementation is very generic
and it need not to be modified for the Kasan, so we are skipping
it from the sanitization.

Following is the Kasan error log for the reference.

[    1.262524] BUG: KASan: out of bounds access in find_next_bit+0xa4/0xf0 at addr ffffffc00e9af260
[    1.262534] Read of size 8 by task swapper/0/1
[    1.262546] page:ffffffbc00920d60 count:0 mapcount:0 mapping:          (null) index:0x0
[    1.262554] page flags: 0x0()
[    1.262570] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 3.10.49-gef71b0c-00348-g4f06d68-dirty #160
[    1.262577] Call trace:
[    1.262594] [<ffffffc00040a2d4>] dump_backtrace+0x0/0x1d4
[    1.262610] [<ffffffc00040a4b8>] show_stack+0x10/0x1c
[    1.262625] [<ffffffc000face70>] dump_stack+0x1c/0x28
[    1.262641] [<ffffffc000552448>] kasan_report_error+0x294/0x3e4
[    1.262656] [<ffffffc0005526a8>] kasan_report+0x68/0x78
[    1.262671] [<ffffffc00055169c>] __asan_load8+0x90/0x9c
[    1.262686] [<ffffffc00076fff8>] find_next_bit+0xa0/0xf0
[    1.262701] [<ffffffc000de37d0>] bam_pipe_set_desc_write_offset+0xc8/0x378
[    1.262716] [<ffffffc000e005e4>] sps_bam_pipe_transfer_one+0x6b8/0x70c
[    1.262730] [<ffffffc000e04f84>] sps_transfer_one+0x230/0x298
[    1.262746] [<ffffffc000da4c58>] ipa_replenish_rx_cache+0x2e8/0x430
[    1.262762] [<ffffffc000da891c>] ipa_setup_sys_pipe+0x14a8/0x22bc
[    1.262779] [<ffffffc000d8a554>] ipa_setup_apps_pipes+0x580/0x6a0
[    1.262797] [<ffffffc000d91ef0>] ipa_init.constprop.8+0x134c/0x1dd4
[    1.262814] [<ffffffc000d93038>] ipa_plat_drv_probe+0x6c0/0x720
[    1.262829] [<ffffffc0009b51e0>] platform_drv_probe+0x2c/0x3c
[    1.262842] [<ffffffc0009b32d0>] driver_probe_device+0x1f4/0x47c
[    1.262856] [<ffffffc0009b3644>] __driver_attach+0x88/0xc0
[    1.262873] [<ffffffc0009b05b4>] bus_for_each_dev+0xdc/0x11c
[    1.262886] [<ffffffc0009b2a2c>] driver_attach+0x2c/0x3c
[    1.262903] [<ffffffc0009b237c>] bus_add_driver+0x1bc/0x32c
[    1.262916] [<ffffffc0009b3eb0>] driver_register+0x10c/0x1d8
[    1.262931] [<ffffffc0009b5a28>] platform_driver_register+0x98/0xa8
[    1.262946] [<ffffffc0018422d4>] ipa_module_init+0x3c/0x48
[    1.262960] [<ffffffc000400b08>] do_one_initcall+0xcc/0x188
[    1.262978] [<ffffffc001800bd0>] kernel_init_freeable+0x1c0/0x264
[    1.262992] [<ffffffc000f9f338>] kernel_init+0x10/0xcc
[    1.263000] Memory state around the buggy address:
[    1.263012]  ffffffc00e9af100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[    1.263024]  ffffffc00e9af180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
[    1.263037] >ffffffc00e9af200: 00 00 00 00 00 00 00 00 f1 f1 f1 f1 04 f4 f4 f4
[    1.263046]                                                        ^
[    1.263058]  ffffffc00e9af280: f2 f2 f2 f2 00 00 00 00 00 00 00 00 00 00 f4 f4
[    1.263071]  ffffffc00e9af300: f3 f3 f3 f3 00 00 00 00 00 00 00 00 00 00 00 00
[    1.263079] ==================================================================

Change-Id: I7b7bde5f408dc1f04a773b7a314662ec91344a5e
Signed-off-by: Patrick Daly <pdaly@codeaurora.org>
2016-03-22 11:10:47 -07:00
Se Wang (Patrick) Oh
8bb334401c kernel: lib: allow larger stack frame size for KASan
Some functions consume more than allowed stack frame
size with KASan enabled and GCC warns it as an error.
To avoid compilation warning, allow larger stack frame
size when KASan is enabled instead of changing each file.

Below is one of the warning messages for reference.
kernel/net/wireless/nl80211.c: In function 'nl80211_send_wiphy':
kernel/net/wireless/nl80211.c:1705:1: warning: the frame size
of 5488 bytes is larger than 2048 bytes [-Wframe-larger-than=]

Change-Id: I953018f459bf048366f0ba5ff7c980edcd9bbe07
Signed-off-by: Se Wang (Patrick) Oh <sewango@codeaurora.org>
[satyap: trivial merge conflict resolution]
Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
2016-03-22 11:10:46 -07:00
Se Wang (Patrick) Oh
1ee3c679cd mm: slub: call kasan_alloc_pages before freeing pages in slub
KASan marks slub objects as redzone and free and the bitmasks for
that region are not cleared until the pages are freed. When
CONFIG_PAGE_POISONING is enabled, as the pages still have special
bitmasks, KAsan report arises during pages poisoning. So mark the
pages as alloc status before poisoning the pages.
==================================================================
BUG: KASan: use after free in memset+0x24/0x44 at addr ffffffc0bb628000
Write of size 4096 by task kworker/u8:0/6
page:ffffffbacc51d900 count:0 mapcount:0 mapping:          (null) index:0x0
flags: 0x4000000000000000()
page dumped because: kasan: bad access detected
Call trace:
[<ffffffc00008c010>] dump_backtrace+0x0/0x250
[<ffffffc00008c270>] show_stack+0x10/0x1c
[<ffffffc001b6f9e4>] dump_stack+0x74/0xfc
[<ffffffc0002debf4>] kasan_report_error+0x2b0/0x408
[<ffffffc0002dee28>] kasan_report+0x34/0x40
[<ffffffc0002de240>] __asan_storeN+0x15c/0x168
[<ffffffc0002de47c>] memset+0x20/0x44
[<ffffffc0002d77bc>] kernel_map_pages+0x2e8/0x384
[<ffffffc000266458>] free_pages_prepare+0x340/0x3a0
[<ffffffc0002694cc>] __free_pages_ok+0x20/0x12c
[<ffffffc00026a698>] __free_pages+0x34/0x44
[<ffffffc00026ab3c>] __free_kmem_pages+0x8/0x14
[<ffffffc0002dc3fc>] kfree+0x114/0x254
[<ffffffc000b05748>] devres_free+0x48/0x5c
[<ffffffc000b05824>] devres_destroy+0x10/0x28
[<ffffffc000b05958>] devm_kfree+0x1c/0x3c
Memory state around the buggy address:
 ffffffc0bb627f00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffffffc0bb627f80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 >ffffffc0bb628000: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
                    ^
 ffffffc0bb628080: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
 ffffffc0bb628100: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
==================================================================
BUG: KASan: use after free in memset+0x24/0x44 at addr ffffffc0bb2fe000
Write of size 4096 by task swapper/0/1
page:ffffffbacc4fdec0 count:0 mapcount:0 mapping:          (null) index:0xffffffc0bb2fe6a0
flags: 0x4000000000000000()
page dumped because: kasan: bad access detected
Call trace:
[<ffffffc00008c010>] dump_backtrace+0x0/0x250
[<ffffffc00008c270>] show_stack+0x10/0x1c
[<ffffffc001b6f9e4>] dump_stack+0x74/0xfc
[<ffffffc0002debf4>] kasan_report_error+0x2b0/0x408
[<ffffffc0002dee28>] kasan_report+0x34/0x40
[<ffffffc0002de240>] __asan_storeN+0x15c/0x168
[<ffffffc0002de47c>] memset+0x20/0x44
[<ffffffc0002d77bc>] kernel_map_pages+0x2e8/0x384
[<ffffffc000266458>] free_pages_prepare+0x340/0x3a0
[<ffffffc0002694cc>] __free_pages_ok+0x20/0x12c
[<ffffffc00026a698>] __free_pages+0x34/0x44
[<ffffffc0002d9c98>] __free_slab+0x15c/0x178
[<ffffffc0002d9d14>] discard_slab+0x60/0x6c
[<ffffffc0002dc034>] __slab_free+0x320/0x340
[<ffffffc0002dc224>] kmem_cache_free+0x1d0/0x25c
[<ffffffc0003bb608>] kernfs_put+0x2a0/0x3d8
Memory state around the buggy address:
 ffffffc0bb2fdf00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffffffc0bb2fdf80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
>ffffffc0bb2fe000: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fc
                   ^
 fffffc0bb2fe080: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
 ffffffc0bb2fe100: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
==================================================================

Change-Id: Id963b9439685f94a022dcdd60b59aaf126610387
Signed-off-by: Se Wang (Patrick) Oh <sewango@codeaurora.org>
[satyap: trivial merge conflict resolution]
Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
2016-03-22 11:10:45 -07:00
Se Wang (Patrick) Oh
dae9a397e1 kernel: fork: Call KASan alloc before release the thread info pages
the pages allocated for thread info is used for stack. KAsan marks
some stack memory region for guarding area and the bitmasks for
that region are not cleared until the pages are freed. When
CONFIG_PAGE_POISONING is enabled, as the pages still have special
bitmasks, a out of bound access KASan report arises during pages
poisoning. So mark the pages as alloc status before poisoning the
pages.
==================================================================
BUG: KASan: out of bounds on stack in memset+0x24/0x44 at addr ffffffc0b8e3f000
Write of size 4096 by task swapper/0/0
page:ffffffbacc38e760 count:0 mapcount:0 mapping:          (null) index:0x0
flags: 0x4000000000000000()
page dumped because: kasan: bad access detected
CPU: 0 PID: 0 Comm: swapper/0 Tainted: G        W      3.18.0-g5a4a5d5-07244-g488682c-dirty #12
Hardware name: Qualcomm Technologies, Inc. MSM 8996 v2.0 LiQUID (DT)
Call trace:
[<ffffffc00008c010>] dump_backtrace+0x0/0x250
[<ffffffc00008c270>] show_stack+0x10/0x1c
[<ffffffc001b6f9e4>] dump_stack+0x74/0xfc
[<ffffffc0002debf4>] kasan_report_error+0x2b0/0x408
[<ffffffc0002dee28>] kasan_report+0x34/0x40
[<ffffffc0002de240>] __asan_storeN+0x15c/0x168
[<ffffffc0002de47c>] memset+0x20/0x44
[<ffffffc0002d77bc>] kernel_map_pages+0x2e8/0x384
[<ffffffc000266458>] free_pages_prepare+0x340/0x3a0
[<ffffffc0002694cc>] __free_pages_ok+0x20/0x12c
[<ffffffc00026a698>] __free_pages+0x34/0x44
[<ffffffc00026abb0>] free_kmem_pages+0x68/0x80
[<ffffffc0000b0424>] free_task+0x80/0xac
[<ffffffc0000b05a8>] __put_task_struct+0x158/0x23c
[<ffffffc0000b9194>] delayed_put_task_struct+0x188/0x1cc
[<ffffffc00018586c>] rcu_process_callbacks+0x6cc/0xbb0
[<ffffffc0000bfdb0>] __do_softirq+0x368/0x750
[<ffffffc0000c0630>] irq_exit+0xd8/0x15c
[<ffffffc00016f610>] __handle_domain_irq+0x108/0x168
[<ffffffc000081af8>] gic_handle_irq+0x50/0xc0
Memory state around the buggy address:
 ffffffc0b8e3f980: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffffffc0b8e3fa00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 >ffffffc0b8e3fa80: 00 00 00 00 00 00 00 00 f1 f1 f1 f1 00 00 00 00
                                            ^
 ffffffc0b8e3fb00: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 ffffffc0b8e3fb80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

Change-Id: I90aa1c6e82a0bde58d2d5d68d84e67f932728a88
Signed-off-by: Se Wang (Patrick) Oh <sewango@codeaurora.org>
2016-03-22 11:10:44 -07:00
Jeevan Shriram
7fc60d089e net: ipv6: remove duplicate declartion of structure
Remove duplicate decalaration and initialization of a structure
with conflicting types.

Signed-off-by: Jeevan Shriram <jshriram@codeaurora.org>
2016-03-22 11:10:44 -07:00
Naveen Ramaraj
7153bcf378 dma-mapping: Exclude remap functions when arch does not use DMA
The commit 'a106f65b("dma-mapping: Add dma_remap functions")' is
defined remap functions for ARM arch only, so it will break other
architecture compilation.

So remap functions are excluded, if arch is not using DMA.

Change-Id: Id39fcbac74f30a0ab1b3ce0c780460017ea189e5
Signed-off-by: Naveen Ramaraj <nramaraj@codeaurora.org>
Signed-off-by: Lingutla Chandrasekhar <clingutla@codeaurora.org>
Signed-off-by: Jeevan Shriram <jshriram@codeaurora.org>
2016-03-22 11:10:43 -07:00
Venkat Gopalakrishnan
bdf015659d ARM: dts: msm: Drop ufs_variant property node for ufs controller on 8996
This property is no longer used in 4.4 kernel, hence remove it.

Change-Id: I8fe311d95359220fa8f44e9b39db61e01ee34f5b
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
2016-03-22 11:10:42 -07:00
Venkat Gopalakrishnan
918930b692 phy: phy-qcom-ufs: don't probe for "dev_ref_clk_ctrl_mem"
This is handled in the ufs platform init. Drop the upstream
change that was missed in the ufs driver port to 4.4 kernel.

Change-Id: Ia3305f2b4f6c6eeafe3866833f2c98e186ad6632
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
2016-03-22 11:10:41 -07:00
Nicholas Troast
b04884d194 defconfig: arm64: msm: enable fuel gauge driver
Enable the fuel gauge driver to support the fuel gauge hardware.

Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
2016-03-22 11:10:40 -07:00
Girish Mahadevan
732a601c01 defconfig: Enable slimbus driver
Enable the slimbus drivers.

Change-Id: I715b9672e863a89c3992ca3137b9b9985cc3dc88
Signed-off-by: Girish Mahadevan <girishm@codeaurora.org>
2016-03-22 11:10:39 -07:00
Girish Mahadevan
4755d545a2 defconfig: Enable SPIDEV feature
Enable the SPIDEV feature which allows userspace to talk to the
SPI framework directly.

Change-Id: I526f8763878378a7263633f98cebcb50bb829527
2016-03-22 11:10:38 -07:00
Girish Mahadevan
46e021b56e defconfig: Enable HS UART driver
Enable the HS UART driver.

Change-Id: I510b4773f76845089eef22534a8d68849df2e60c
Signed-off-by: Girish Mahadevan <girishm@codeaurora.org>
2016-03-22 11:10:38 -07:00
Girish Mahadevan
cb6c5931c8 defconfig: Enable MSM I2C and DMA engine
Enable the following MSM I2C related features:
- qcom-sps-dma driver which is the dma engine wrapper for BAM
- i2c-msm-v2 driver, the main MSM I2C driver.
- I2C CHARDEV that allows userspace to communicate with I2C framework.

Change-Id: Ibca06d935de61517ef1a927828789875fcdb7718
Signed-off-by: Girish Mahadevan <girishm@codeaurora.org>
2016-03-22 11:10:37 -07:00
Girish Mahadevan
3dae886c11 slimbus: Remove use of PM_RUNTIME feature flag
Remove the use of PM_RUNTIME feature flag which is obsoleted on newer
kernel versions. Instead use PM feature flag to condiitionally compile
RPM callbacks.

Change-Id: I775c89f79b698bf3f20fdb655216027e58e7059d
Signed-off-by: Girish Mahadevan <girishm@codeaurora.org>
2016-03-22 11:10:36 -07:00
Girish Mahadevan
1f6c29a46f slimbus: Add snapshot of slimbus driver
Add snapshot of slimbus driver from msm-3.18 branch.
Baseline:
e70ad0cd5efdd9dc91a77dcdac31d6132e1315c1

Change-Id: I82f8f91596d2c3e9ef111e26c80298d990f6c193
Signed-off-by: Girish Mahadevan <girishm@codeaurora.org>
2016-03-22 11:10:35 -07:00
Girish Mahadevan
8fb1437a05 tty: serial: Remove use of PM_RUNTIME config flag
Remove the use of PM_RUNTIME feature flag in the driver as this flag
is obsoleted on newer kernel versions. Instead use PM flag to conditionally
compile RPM callbacks.

Change-Id: I92d4b9ac15d05c6144a68ddd41f29b00aa209fd2
Signed-off-by: Girish Mahadevan <girishm@codeaurora.org>
2016-03-22 11:10:34 -07:00
Girish Mahadevan
d5baa81480 tty: serial: msm_hs: Add snapshot of msm_hs uart drivers
Snapshot of msm_hs uart driver from msm-3.18.
Baseline:
e70ad0cd5efdd9dc91a77dcdac31d6132e1315c1

Change-Id: I977d80142c2cf8df89810f1c38d523d53371cc46
Signed-off-by: Girish Mahadevan <girishm@codeaurora.org>
2016-03-22 11:10:33 -07:00
Girish Mahadevan
bb53e82716 i2c-msm-v2: Remove use of PM_RUNTIME config flag
Remove the use of the PM_RUNTIME config flag in code. This feature flag
has been obsoleted on newer kernel versions, instead use the generic
PM feature flag to conditionally compile RPM callbacks.

Change-Id: Id78a31a3cb59694d07e24ba6f762d608354d758a
Signed-off-by: Girish Mahadevan <girishm@codeaurora.org>
2016-03-22 11:10:33 -07:00
Girish Mahadevan
a4d4cbd049 i2c: Add snapshot of i2c-msm-v2 driver
This commit adds a snapshot of the i2c-msm-v2 driver from kernel-3.18.
Kernel-3.18 baseline: e70ad0cd5efdd9dc91a77dcdac31d6132e1315c1

Change-Id: I392a1761ecc324c4a229caf112b1dc4c32a3b9bf
Signed-off-by: Girish Mahadevan <girishm@codeaurora.org>
2016-03-22 11:10:32 -07:00
Girish Mahadevan
debaf5e67f dma: Modify qcom-sps-dma based on framework changes
Modify the qcom-sps-dma driver to adapt to the framework changes in
dmaengine introduced between kernel-3.18 and kernel-4.4 .

Change-Id: I000e209af6cf26e652d6937af67eb3382d2d2262
2016-03-22 11:10:31 -07:00
Girish Mahadevan
b286eb6096 dma: Add snapshot qcom-sps-dma driver
Add a snapshot of the qcom-sps-dma driver from the 3.18 kernel branch.
3.18 baseline: e70ad0cd5efdd9dc91a77dcdac31d6132e1315c1

Change-Id: Ifa64e83d25e6cca220a0435757da861e28f97480
2016-03-22 11:10:30 -07:00
Girish Mahadevan
5896e48d28 spi: Add snapshot of SPI QSD driver
This change adds a snapshot of SPI QSD driver from the 3.18 branch.
kernel-3.18 baseline: e70ad0cd5efdd9dc91a77dcdac31d6132e1315c1

Change-Id: I6e2a4be429a2681603a12e5ecb6853582cd3ffbe
Signed-off-by: Girish Mahadevan <girishm@codeaurora.org>
2016-03-22 11:10:29 -07:00
Anirudh Ghayal
137e882039 power: qpnp-smbcharger: Read the hi-power property
Read the hi-power power-supply property in the
get_property callback to avoid warnings from the
power-supply framework.

Change-Id: I5a9bb9b625ceb308afab915db9ac784a567ffbfb
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
2016-03-22 11:10:27 -07:00
Rohit Vaswani
fa9f697033 defconfig: Sync msm_defconfig and msm-perf_defconfig
Get feature parity and create clean minilimalistic defconfigs

Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
2016-03-22 11:10:27 -07:00
Siddartha Mohanadoss
a7f0097bcb defconfig: msm: Enable TSENS
Temperature sensor (TSENS) driver provides clients to
read on die temperature sensors and set temperature
thresholds for thermal mitigation.

Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
2016-03-22 11:10:26 -07:00
Siddartha Mohanadoss
2021d15137 thermal: tsens: Enable TSENS
This snapshot is taken as of msm-3.18 commit dbdb6776f
(Merge "msm: camera: Add dummy sub module in sensor pipeline")

Commit 0b46b8a7 (clocksource: arch_timer: Fix code to use
physical timers when requested) introduces the use of
physical counters and requires clients to use api
arch_counter_get_cntvct(). Accordingly update tsens_poll()
to the new API to prevent a BUG_ON() during bootup.

Fixup TSENS to use supported int type for temperature value.

Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
2016-03-22 11:10:25 -07:00
Nicholas Troast
31d2a03e6e qcom-charger: batterydata-lib: fix compilation issue
batterydata-lib.h limits function declarations to certain CONFIGs and
provides stub function definitions for everyone else. Remove the function
defintions and provide function declarations to everyone.

Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
2016-03-22 11:10:24 -07:00
Nicholas Troast
8e10bff713 power: move QTI charger drivers to a new sub-directory qcom-charger
QTI charger drivers have outgrown thier home in power and deserve their
own sub-directory. Move all QTI charger drivers and their depedencies to
a new sub-directory of power called qcom-charger.

Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
2016-03-22 11:10:23 -07:00
Nicholas Troast
a40a7640f2 power: pmic-voter: fix compilation issue
Compilation fails when required by more than one goal due to a missing
header guard. Add it.

Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
2016-03-22 11:10:22 -07:00
Nicholas Troast
c039b2275c power: cleanup and remove duplicates from Kconfig
Many of the older SMB charger drivers are no longer present therefore
remove the config entries for them.

Duplicate config entries are present. Remove them.

Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
2016-03-22 11:10:21 -07:00
Siddartha Mohanadoss
951e58906d defconfig: msm: Enable EPM
Embedded power measurement (EPM) driver allows
clients to read supported current and voltage
channels for power measurements.

Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
2016-03-22 11:10:20 -07:00
Siddartha Mohanadoss
3b820018b7 hwmon: Enable EPM driver
This snapshot is taken as of msm-3.18 commit dbdb6776f
(Merge "msm: camera: Add dummy sub module in sensor pipeline")

Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
2016-03-22 11:10:20 -07:00
Zhen Kong
b07dd296fd defconfig: arm64: msm: Enable qseecom driver
This is necessary to support qseecom functionality

Signed-off-by: Zhen Kong <zkong@codeaurora.org>
2016-03-22 11:10:19 -07:00
Zhen Kong
848e0a86b6 qseecom: add snapshot of qseecom driver
This snapshot is taken as of msm-3.18 commit e70ad0cd
(Promotion of kernel.lnx.3.18-151201.)

Signed-off-by: Zhen Kong <zkong@codeaurora.org>
2016-03-22 11:10:18 -07:00
Rohit Vaswani
ae5c867183 arm64: smp: Update the topology masks before calling CPU_STARTING notifiers
Currently, the CPU_STARTING notifiers would observe an incorrect sibling
mask since the notifier chain is called before the topology masks are
updated for the new cpu.
Update the topology masks before calling the notifier chain to fix this
problem.

Change-Id: I3f698d777af3bb8e324019619b4c1c4de85e7b2c
Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
2016-03-22 11:10:17 -07:00
Abhimanyu Kapur
dc8d0cdaf7 ARM64: Flush the caches for non panicking CPUs in case of a kernel panic
In case of a kernel panic, only the panicking CPU does an entire
cache flush. This means that certain dirty cache lines in the
caches of the other CPUs may never get flushed. This gives us
improper RAM dumps. Add cache flushing for all the online CPUs.
The outer domain is not flushed since it is already being done by
the panicking CPU.

Change-Id: I03cf14f49334e45c145a17b06d0c623575b653e8
Signed-off-by: Abhimanyu Kapur <abhimany@codeaurora.org>
[satyap: trivial merge conflict resolution]
Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
2016-03-22 11:10:16 -07:00
Abhimanyu Kapur
f237941bd1 arm64: smp: Jump back to secondary start kernel for onlined CPUs
Add a call to secondary start kernel for cpus which have been
onlined via the hotplug path for wfi based hotplug solution
where the return path from cpu_die should not return to the
idle thread. Update the cpu_die definition with a __ref to
allow referencing a __cpuinit call (secondary_start_kernel)
from it.

Change-Id: I7c083effda3928b562ea0d601833ceb8d5178d43
Signed-off-by: Abhimanyu Kapur <abhimany@codeaurora.org>
2016-03-22 11:10:15 -07:00
Joonwoo Park
e6903e45a6 arch: convert smp_mb__*()
Convert deprecated smp_mb__*() barriers.

Signed-off-by: Joonwoo Park <joonwoop@codeaurora.org>
[joshc: fixup other uses around the kernel during the 3.14 upgrade]
Signed-off-by: Josh Cartwright <joshc@codeaurora.org>
2016-03-22 11:10:15 -07:00
Rohit Vaswani
ec6b98c86d ARM64: smp: implement arch_trigger_all_cpus_backtrace using IPI
Since ARM64 doesn't have an NMI, send an IPI to all other CPUs
(current cpu prints the stack directly) to capture a backtrace.

Change-Id: Ib90494123205b3bbaa0b244ccde6c7e40a560199
Signed-off-by: Rohit Vaswani <rvaswani@codeaurora.org>
[satyap: trivial merge conflict resolution & compilation fixes]
Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
2016-03-22 11:10:14 -07:00
Siddartha Mohanadoss
99c91673ce hwmon: qpnp-adc: Update regulator api
"This snapshot is taken as of msm-3.18 commit dbdb6776f
(Merge "msm: camera: Add dummy sub module in sensor pipeline")

Use regulator_set_load() to specify the load required
while issuing VADC requests on the VADC LDO and fixup
compilation for qpnp_vadc_read() from thermal sysfs.

Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
2016-03-22 11:10:13 -07:00
Abhimanyu Kapur
e38a985cba arm64: smp: Add wakeup IPI support
Add support for IPI_WAKEUP which is used by hotplug code
path to wake up CPU from low power states.

Change-Id: I258d05e109a377613064624a5bfda21ab8ea9869
Signed-off-by: Abhimanyu Kapur <abhimany@codeaurora.org>
[satyap@codeaurora.org: trivial merge conflict resolution]
Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
2016-03-22 11:10:12 -07:00
Mayank Rana
1e97815c3d usb: gadget: Add snapshot of changes with u_serial
Squash and apply following u_serial driver changes taken from
msm-3.10 kernel as of commit
ec18e1c5aed (Merge "mmc: card: set dma_mask as the queue bounce limit")

feb56a3 usb: gadget: Fix bug in serial driver RX path
2ff1b9a USB: Gadget: u_serial: Debugfs for endpoint buffer monitoring
272d2fd USB: gadget: u_serial: free read/write requests upon queue failure
950a3a3 USB: Gadget: u_serial: Freeing usb requests as a part of gs_close
e4e6bc4 USB: u_serial: Don't allow UDC to append and send a zero length
	packet
4bd2646 usb: gadget: serial: Limit write permissions to root
13e7219 USB: Fix multiple issues found by static analysis tool
505294c USB: Debugfs: Fix compilation issues when debugfs is disabled
0e7633e usb: gadget: Fix code quality issues when accessing port
607dbeb USB: u_serial: Don't free usb_requests in gs_close and reuse them
4aebedc usb: u_serial: Fix NULL pointer dereference in u_serial tty
	callbacks

Signed-off-by: Mayank Rana <mrana@codeaurora.org>
2016-03-22 11:10:11 -07:00
Mayank Rana
43fc702790 usb: gadget: serial: Add snapshot of changes with f_serial
Squash and apply following f_serial driver changes taken
from msm-3.10 kernel as of commit
ec18e1c5aed (Merge "mmc: card: set dma_mask as the queue bounce limit")

d98217e USB: android gadget: queue the request only when serial is online
b8bd483 USB: android gadget: Add interrupt ep and modem support in f_serial
7b56862 USB: Add super speed descriptors for android functions
c5a7f7f gadget: u_serial: Add tiocmset/tiocmget functionality
2a821c8 usb: gadget: Add debug message to print the control line state
	information

Signed-off-by: Mayank Rana <mrana@codeaurora.org>
2016-03-22 11:10:10 -07:00
Jeremy Gebben
a8166e29d1 arm64: fix sparse errors from msm-rtb
Correct the the __iomem decorations in __raw_write_logged()
and __raw_read_logged().

Change-Id: If4a4f7aff09537772a5f9e386c3c6ada95512457
Signed-off-by: Jeremy Gebben <jgebben@codeaurora.org>
2016-03-22 11:10:09 -07:00
Mayank Rana
dbe778eee0 USB: f_fs: Allow epfile to be opened only once
Due to USB cable disconnect, ADBD closes its epfiles and re-opens the same.
In normal operation the sequence is:
ffs_func_eps_disable() setting epfile->error to 1
ffs_epfile_release() setting epfile->error to 1
ffs_epfile_open() setting epfile->error to 0

In some cases when above sequeunce gets changed, epfile->error is set to 1.
Hence there is no data transfer happening on ep-IN endpoint. Fix this by
not allowing opening of epfiles until it has being successfully released.

Change-Id: I26b9ec1b6218d00cc0965ce3e71fcea49f9bf567
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
2016-03-22 11:10:09 -07:00