Commit graph

581216 commits

Author SHA1 Message Date
Patrick Fay
377c09d738 perf: Fix NULL pointer ref in exclude_idle update
Commit 573979dee2 ("perf: Add support for exclude_idle attribute")
registers an idle callback routine armv8pmu_idle_update. Currently
the idle update routine might be called before the pmu has allocated
all the per_cpu structures. This can result in a null pointer
reference. Change arm_pmu_device_probe to allocate the structures
via cpu_pmu_init() before the init_fn() call (which eventually does the
idle_notify_register call). Change a branch to out_free to
out_destroy as out_free doesn't cleanup what was allocated in
cpu_pmu_init(). Also have armv8pmu_idle_update check that the
structure is not null before using it.

Change-Id: Ie1198fc1783804c61467889c68656d6e8c9c9edf
Signed-off-by: Patrick Fay <pfay@codeaurora.org>
2017-01-16 11:52:33 -08:00
Hemant Kumar
c179cf3889 sound: usb: Map interface context information to interface number
Driver is dynamically allocating memory based on bNumInterface from
device configuration descriptor and stores interface context
information using bInterfaceNum. Device can advertise
bInterfaceNum >= bNumInterface which results into out of bound memory
access. Hence create a mapping between interface context index and
interface number. Use this mapping to find unused context index or
load the context information of an interface.

Change-Id: Ic99b10abe662088c2c030526135689f7c78c595a
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
2017-01-16 11:30:09 -08:00
Satya Durga Srinivasu Prabhala
06a774048f soc: qcom: service-notifier: fix object corruption
Below object corruption observed from service-notifier while executing
WLAN PDR tests. While executing WLAN PDR tests, Modem crashed, which
resulted into use after free condition. Add mutex lock to fix the issue.

   ===============================================
   BUG kmalloc-1024 (Tainted: G        W  O   ): \
                              Poison overwritten
   -----------------------------------------------

   INFO: 0xffffffc0ba5c4d30-0xffffffc0ba5c4d3a. \
                   First byte 0xff instead of 0x6b
   INFO: Allocated in qmi_handle_create+0x4c/0x320 \
                      age=80203 cpu=0 pid=27134
        alloc_debug_processing+0x124/0x178
        ___slab_alloc.constprop.62+0x4ec/0x5d0
        __slab_alloc.isra.59.constprop.61+0x48/0x74
        kmem_cache_alloc_trace+0xd4/0x25c
        qmi_handle_create+0x4c/0x320
        root_service_service_arrive+0x3c/0x1e8
        process_one_work+0x234/0x40c
        worker_thread+0x2e0/0x410
        kthread+0xf4/0xfc
        ret_from_fork+0x10/0x40
   INFO: Freed in qmi_handle_destroy+0x154/0x16c \
                              age=50 cpu=1 pid=22765
        free_debug_processing+0x27c/0x354
        __slab_free+0x74/0x3ac
        kfree+0x21c/0x290
        qmi_handle_destroy+0x154/0x16c
        root_service_service_exit+0xf0/0x110
        ssr_event_notify+0x74/0x84
        notifier_call_chain+0x58/0x8c
        __srcu_notifier_call_chain+0x9c/0xc0
        srcu_notifier_call_chain+0x38/0x44
        subsys_notif_queue_notification+0x40/0x54
        notify_each_subsys_device.isra.9+0x18c/0x1b0
        subsystem_restart_wq_func+0x2f4/0x5a8
        process_one_work+0x234/0x40c
        worker_thread+0x2e0/0x410
        kthread+0xf4/0xfc
        ret_from_fork+0x10/0x40

Change-Id: Iebc0871220547c2d6f026db1dffafe30b854b199
Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
2017-01-16 10:37:08 -08:00
Ram Chandrasekar
823b91650d drivers: thermal: lmh_dcvs: Update Low threshold with high threshold
LMH DCVS driver doesn't change the low threshold from HLOS. When there is
new request to lower the high threshold, the low threshold will be
modified if the new high threshold is lower than the existing low
threshold. But the low threshold is not increased when the high
threshold is moved back again.

Update the LMH DCVSh driver to always update the low threshold value
when there is a new high threshold request. The new low threshold will
be 0.5C less than the high threshold.

Change-Id: I356e47de585ae81bd27859f790f673b31ae5ba72
Signed-off-by: Ram Chandrasekar <rkumbako@codeaurora.org>
2017-01-16 10:33:00 -07:00
Manaf Meethalavalappu Pallikunhi
31f4d79f79 ARM: dts: msm: Add BCL mitigation configuration for sdm660
Add battery voltage, current and low SoC thresholds for sdm660.
The BCL module will mitigate the CPU's, when battery reaches
the low voltage threshold, high current threshold or low
state of Charge.

Change-Id: Ie6cf0498bd7ad869640efc602d2573b6def7d5b7
Signed-off-by: Manaf Meethalavalappu Pallikunhi <manafm@codeaurora.org>
2017-01-16 22:36:39 +05:30
Rajesh Kemisetti
761d7536e1 msm: kgsl: Enable HW clockgating and preemption for SDM660 GPU
Enable HW clockgating and preemption for A512 GPU to save power
and for better context switching.

Also update proper size for CP MERCIU size.

Change-Id: If3e5101c2695b1f06d650d320bc8d3bebac29f6f
Signed-off-by: Rajesh Kemisetti <rajeshk@codeaurora.org>
2017-01-16 21:55:02 +05:30
Rajesh Kemisetti
a2434b9ba0 ARM: dts: msm: Vote for BIMC GFX clock for SDM660 GPU
Enable BIMC GFX clock when A512 GPU is ready to access data
from DDR on SDM660.

Change-Id: Ib76ef7a4fd5362f8cb972f1e4e070157a59c2c27
Signed-off-by: Rajesh Kemisetti <rajeshk@codeaurora.org>
2017-01-16 21:48:09 +05:30
Hardik Kantilal Patel
a4a0e6c661 ARM: dts: msm: Enable icnss device node for SDM660
Enable icnss device node for SDM660 and add SMMU sid for
wlan.

CRs-Fixed: 1111861
Change-Id: Id32285c346167c4a0bf1ab9101d336fa664febbf
Signed-off-by: Hardik Kantilal Patel <hkpatel@codeaurora.org>
2017-01-16 18:51:58 +05:30
Linux Build Service Account
37c5f804a2 Merge "spss_utils: select spss test/prod/hybrid firmware to load" 2017-01-16 04:29:08 -08:00
Linux Build Service Account
1e5081e1b2 Merge "sched: Initialize variables" 2017-01-16 04:29:07 -08:00
Linux Build Service Account
9f0ae8e606 Merge "clk: qcom: Add support to set rcg parent src for dp_pixel clock" 2017-01-16 04:29:06 -08:00
Linux Build Service Account
a0d62ae120 Merge "ARM: dts: msm: increase VDD_GFX Fmax CPR ceiling voltage for MSM8998v2" 2017-01-16 04:29:06 -08:00
Linux Build Service Account
a963750b83 Merge "sched: Fix compilation errors when CFS_BANDWIDTH && !SCHED_HMP" 2017-01-16 04:29:04 -08:00
Linux Build Service Account
05030ff7a0 Merge "ARM: dts: msm: Add alias information for tsens in msm8998" 2017-01-16 04:29:03 -08:00
Linux Build Service Account
c410ee8d5c Merge "ARM: dts: msm: Program slimbus bam offset address for SDM660" 2017-01-16 04:29:03 -08:00
Linux Build Service Account
72591d47f4 Merge "ASoC: wcd-mbhc: add null pointer check" 2017-01-16 04:29:02 -08:00
Linux Build Service Account
7ff850a1d4 Merge "ARM: dts: msm: Add I2C, SPI, UART and slimbus devices for SDM630" 2017-01-16 04:29:01 -08:00
Linux Build Service Account
a295b7196b Merge "msm: mdss: Fix equation to calculate prefill count for amortization" 2017-01-16 04:29:00 -08:00
Linux Build Service Account
a2dbdc2c6e Merge "perf: don't leave group_entry on sibling list (use-after-free)" 2017-01-16 04:29:00 -08:00
Linux Build Service Account
686a509ed0 Merge "KEYS: Fix short sprintf buffer in /proc/keys show function" 2017-01-16 04:28:59 -08:00
Linux Build Service Account
20dcab7b2d Merge "ion: Fix use after free during ION_IOC_ALLOC" 2017-01-16 04:28:58 -08:00
Linux Build Service Account
63e23a6cfe Merge "ASoC: msm: qdsp6v2: DAP: Enable non DAP modules on DAP disable" 2017-01-16 04:28:57 -08:00
Linux Build Service Account
e638fbdb05 Merge "ASoC: wcd-mbhc: fix inconsistent detection of euro headset" 2017-01-16 04:28:57 -08:00
Shiraz Hashim
086dd2c4a8 ARM: dts: msm: configure default CMA region for sdm660
Configure the size of the default CMA region to 32 MB in
DT for sdm660.

Configuring the default CMA region in the DT is cleaner
than using CONFIG_CMA_SIZE_MBYTES since it is easier to
configure per target and the alloc ranges can be specified
in DT.

Change-Id: I64d4e1ee379b2a3110ecd403e7ed838948df6ca3
Signed-off-by: Shiraz Hashim <shashim@codeaurora.org>
2017-01-16 17:55:56 +05:30
Pengfei Liu
7c3aa14602 ARM: dts: msm: Add support for msm8998 QRD SKUK EVT3 board
Add camera node, include rear aux and front camera, also
include corresponding eeprom actuator ois flash and torch node.

Change-Id: I45d5e45ea82bafa78ef83638f1b374e03bb43145
Signed-off-by: Pengfei Liu <pengfeiliu@codeaurora.org>
2017-01-16 16:54:03 +08:00
Abhishek Kondaveeti
e189653cfc msm: isp: Fix duplicate overflow requests
Synchronize overflow requests sending to user space.

Change-Id: I5e112487d8460550890fa004a461388b2ae004b2
Signed-off-by: Abhishek Kondaveeti <akondave@codeaurora.org>
2017-01-16 00:45:19 -08:00
Vijayavardhan Vennapusa
3759fd1701 USB: dwc3-msm: Set speed as high speed if no speed information
Speed is not notified in case of platforms having micro USB connector
instead of USB type C connector. In this case, set speed as High speed
only as by default only high speed is supported over micro USB ports.

Change-Id: I6f29914ca9e2345157330651464b7a0c151f1f97
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
2017-01-16 13:39:17 +05:30
Utkarsh Saxena
4b8e68eab4 ARM: dts: msm: Add support of IPA for SDM630
Enable IPA in SDM660.
IPA shunt data between apps, modem and USB.

Change-Id: I09aa16138d643b17b793162ca0591c143ad8da1f
Acked-by: Mohammed Javid <mjavid@qti.qualcomm.com>
Signed-off-by: Utkarsh Saxena <usaxena@codeaurora.org>
2017-01-16 12:54:38 +05:30
Utkarsh Saxena
15ae5b7344 ARM: dts: msm: Disable IPA in SDA658/660
IPA needs to be kept disabled in SDA 658/660 APQ platforms.

Change-Id: I1fd4ff9d50b7ad2c429bf8a180a6612d5ed3497f
Acked-by: Mohammed Javid <mjavid@qti.qualcomm.com>
Signed-off-by: Utkarsh Saxena <usaxena@codeaurora.org>
2017-01-16 12:49:11 +05:30
Amir Samuelov
3763023d7d spss_utils: select spss test/prod/hybrid firmware to load
Select which SPSS firmware to load based on 2 fuses.

Change-Id: I7080cc0b58c38965ed7e58808431cf487008de9e
Signed-off-by: Amir Samuelov <amirs@codeaurora.org>
2017-01-15 21:54:58 -08:00
Shankar Ravi
8d53ed1fb0 ARM: dts: msm: Update Camera CSIPHY clock for SDM660
Use the proper clock for CSIPHY2 for SDM660.

CRs-Fixed: 1111640
Change-Id: If9eaa19a0ee837dbbe335597259a62287a1620d5
Signed-off-by: Shankar Ravi <rshankar@codeaurora.org>
2017-01-15 21:48:25 -08:00
Manish Poddar
33f34cd021 msm: camera: fix Information leak
In msm_buf_mngr_sd_shutdown bufs is a pointer defined
in kernel, and it is printed to userspace using %lx.
changed it to %pK.

Change-Id: Ic2cb1a2ff109364ac2da1bbb3253a2253a0c6be9
Signed-off-by: Manish Poddar <mpoddar@codeaurora.org>
2017-01-15 21:43:44 -08:00
Mohit Aggarwal
19f7e40250 diag: Change CDSP socket instance id
Currently, CDSP socket instance id on APPS is not
matching with instance id on CDSP peripheral due
to which APPS is thinking that channel has been
opened with WDSP. This patch fixes this discrepancy.

CRs-Fixed: 1111626
Change-Id: I990ae8fd23c95f16be72b4fe207926444244c23e
Signed-off-by: Mohit Aggarwal <maggarwa@codeaurora.org>
2017-01-16 10:21:57 +05:30
Linux Build Service Account
2326bcf687 Merge "clk: qcom: Move prepare enable parent sources for FORCE_ENABLE_RCGR" 2017-01-15 19:55:54 -08:00
Linux Build Service Account
da942ab82a Merge "ARM: dts: msm: Enable OSM CPU clocks for SDM660" 2017-01-15 19:55:53 -08:00
Linux Build Service Account
242e8667ed Merge "ARM: dts: msm: Update voltage and interrupt details of sdhc2 for sdm660" 2017-01-15 07:06:03 -08:00
Linux Build Service Account
f34742edd2 Merge "ASoC: wcd-mbhc: set moisture thresholds for NO jack" 2017-01-15 07:06:01 -08:00
Linux Build Service Account
5c470dc1df Merge "mmc: mmc: Don't send CMD13 after switch command while switching speed modes" 2017-01-15 07:06:01 -08:00
Linux Build Service Account
4ee892e235 Merge "ARM: dts: msm: Change SVS clock rate for VFE on msm8998" 2017-01-15 07:06:00 -08:00
Taniya Das
956eaf60d6 clk: qcom: Move prepare enable parent sources for FORCE_ENABLE_RCGR
Move preparing/unpreparing the clock source parents from the clk set rate.
This is required as invoking prepare from clk enable with disable irqs and
prepare would take a mutex resulting in sleeping from invalid context.

Change-Id: I90d8a346f684747f635bd9e7254ceb8d45841b05
Signed-off-by: Taniya Das <tdas@codeaurora.org>
2017-01-15 13:00:30 +05:30
Linux Build Service Account
2bb237c91a Merge "ARM: dts: msm: Update audio WDSP entries for sdm660" 2017-01-14 22:18:07 -08:00
Taniya Das
5e14d7b53f ARM: dts: msm: Enable OSM CPU clocks for SDM660
Update the 'apm-threshold-voltage' as per recommendation and also enable
the OSM cpu clocks.

Change-Id: I8074699b1ea9e5182a136d4935ffd2938972a91b
Signed-off-by: Taniya Das <tdas@codeaurora.org>
2017-01-14 21:52:12 -08:00
Linux Build Service Account
2e830e63e4 Merge "defconfig: msm: Enable MSM_TIMER_LEAP" 2017-01-14 12:24:45 -08:00
Sameer Thalappil
5ab1f567c4 icnss: Increase QMI timeout value
There are cases where IPC router read worker not getting scheduled
because of other high priority tasks. And when this happens there could
be a delay in receiving messages from WLAN firmware. So increase the
timeout delay to 10 seconds.

CRs-Fixed: 1110268
Change-Id: I4b3420a91108eca844206789d8f1e478526afd62
Signed-off-by: Sameer Thalappil <sameert@codeaurora.org>
2017-01-14 06:57:15 -08:00
Johannes Berg
addecbfb2b mac80211: discard multicast and 4-addr A-MSDUs
In mac80211, multicast A-MSDUs are accepted in many cases that
they shouldn't be accepted in:
 * drop A-MSDUs with a multicast A1 (RA), as required by the
   spec in 9.11 (802.11-2012 version)
 * drop A-MSDUs with a 4-addr header, since the fourth address
   can't actually be useful for them; unless 4-address frame
   format is actually requested, even though the fourth address
   is still not useful in this case, but ignored

Accepting the first case, in particular, is very problematic
since it allows anyone else with possession of a GTK to send
unicast frames encapsulated in a multicast A-MSDU, even when
the AP has client isolation enabled.

Cc: stable@vger.kernel.org
Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next.git
Git-commit: ea720935cf6686f72def9d322298bf7e9bd53377
CRs-fixed: 1105600
Change-Id: I9ae3066872858748779999a89c4d983858d4a2d3
Signed-off-by: Rajeev Kumar Sirasanagandla <rsirasan@codeaurora.org>
2017-01-14 06:51:10 -08:00
Michal Kazior
b9a785c74b mac80211: expose txq queue depth and size to drivers
This will allow drivers to make more educated
decisions whether to defer transmission or not.

Relying on wake_tx_queue() call count implicitly
was not possible because it could be called
without queued frame count actually changing on
software tx aggregation start/stop code paths.

It was also not possible to know how long
byte-wise queue was without dequeueing.

Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next.git
Git-commit: f2ac7e301ae6397669ff3f79e691942a9b5d2f39
CRs-Fixed: 1111521
Change-Id: I7b94a9ba2d68ce526a4421cc253829298d1a7620
Signed-off-by: Rajeev Kumar Sirasanagandla <rsirasan@codeaurora.org>
2017-01-14 20:15:43 +05:30
Grzegorz Bajorski
a61cc187f7 mac80211: allow drivers to report (non-)monitor frames
Some drivers offload some frames internally (e.g.
AddBa). Reporting such frames to mac80211 would
only confuse MLME. However it would be useful to
be able to pass such frames to monitor interfaces
for sniffing purposes, e.g. when running AP +
monitor.

To do that allow drivers to tell mac80211 whether
a given frame should be:
 - processed but not delivered to any monitor vif
 - not processed but delievered to monitor vifs
   only

Signed-off-by: Grzegorz Bajorski <grzegorz.bajorski@tieto.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next.git
Git-commit: 178830481eee5eea147a1c8fab67a96e09d80345
CRs-fixed: 1111520
Change-Id: Id55b750d5fad913ce0bafd317c4a31edff89f545
Signed-off-by: Rajeev Kumar Sirasanagandla <rsirasan@codeaurora.org>
2017-01-14 20:06:25 +05:30
Linux Build Service Account
7366c63969 Merge "cfg80211: Reset beacon interval when stop AP fails" 2017-01-14 03:43:01 -08:00
Linux Build Service Account
a0b1e8d4ef Merge "Revert "USB: rndis: Free the rndis response queue during rndis reset msg"" 2017-01-14 03:43:00 -08:00
Linux Build Service Account
49decc6726 Merge "usb: gadget: gsi: Improve notify_req handling" 2017-01-14 03:43:00 -08:00