Commit graph

81357 commits

Author SHA1 Message Date
Linux Build Service Account
d43553d47d Merge "msm: isp: Add support to multipass offline ISP" 2016-11-29 16:18:49 -08:00
Linux Build Service Account
925ce43342 Merge "clk: Provide OF helper to mark clocks as CRITICAL" 2016-11-29 07:44:04 -08:00
Linux Build Service Account
2be8fc81c3 Merge "net: add SOCK_RCU_FREE socket flag" 2016-11-28 23:58:04 -08:00
Linux Build Service Account
52ce5dee28 Merge "clk: WARN_ON about to disable a critical clock" 2016-11-28 23:57:53 -08:00
Linux Build Service Account
a471456332 Merge "msm: mdss: hdmi: fix potential null deference errors" 2016-11-28 23:56:42 -08:00
Eric Dumazet
68610ce9d9 net: add SOCK_RCU_FREE socket flag
We want a generic way to insert an RCU grace period before socket
freeing for cases where RCU_SLAB_DESTROY_BY_RCU is adding too
much overhead.

SLAB_DESTROY_BY_RCU strict rules force us to take a reference
on the socket sk_refcnt, and it is a performance problem for UDP
encapsulation, or TCP synflood behavior, as many CPUs might
attempt the atomic operations on a shared sk_refcnt

UDP sockets and TCP listeners can set SOCK_RCU_FREE so that their
lookup can use traditional RCU rules, without refcount changes.
They can set the flag only once hashed and visible by other cpus.

CRs-Fixed: 1094434
Change-Id: Ib4967b801cc5b48c8ac4793b7a03fbfafba2234a
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Tom Herbert <tom@herbertland.com>
Tested-by: Tom Herbert <tom@herbertland.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Git-commit: a4298e4522d687a79af8f8fbb7eca68399ab2d81
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
[subashab@codeaurora.org: resolve trivial merge conflicts]
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
2016-11-28 14:42:09 -07:00
Lee Jones
077d50e6f6 clk: Provide OF helper to mark clocks as CRITICAL
This call matches clocks which have been marked as critical in DT
and sets the appropriate flag.  These flags can then be used to
mark the clock core flags appropriately prior to registration.

Legacy bindings requiring this feature must add the clock-critical
property to their binding descriptions, as it is not a part of
common-clock binding.

Cc: devicetree@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Michael Turquette <mturquette@baylibre.com>
Link: lkml.kernel.org/r/1455225554-13267-4-git-send-email-mturquette@baylibre.com
(cherry picked from commit d56f8994b6fb928f59481fabc25bcd1c2f9bd06d)
[tdas@codeaurora.org: resolve trivial conflict]
Git-commit: d56f8994b6fb928f59481fabc25bcd1c2f9bd06d
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git

Change-Id: I2bf824bd2446ca87baabd31c166119d6c5c90643
Signed-off-by: Taniya Das <tdas@codeaurora.org>
2016-11-28 10:17:41 +05:30
Lee Jones
2cb4fc7a17 clk: Allow clocks to be marked as CRITICAL
Critical clocks are those which must not be gated, else undefined
or catastrophic failure would occur.  Here we have chosen to
ensure the prepare/enable counts are correctly incremented, so as
not to confuse users with enabled clocks with no visible users.

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Michael Turquette <mturquette@baylibre.com>
Link: lkml.kernel.org/r/1455225554-13267-2-git-send-email-mturquette@baylibre.com
(cherry picked from commit 32b9b10961860860268961d9aad0c56a73018c37)
[tdas@codeaurora.org: resolve trivial merge conflict]
Git-commit: 32b9b10961860860268961d9aad0c56a73018c37
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git

Change-Id: I003abf22da8600dd90ef397d293544b4bc9e0160
Signed-off-by: Taniya Das <tdas@codeaurora.org>
2016-11-28 10:17:40 +05:30
Ray Zhang
a400e381d0 msm: mdss: add support to change HDMI PLL PPM
Add sysfs and ioctl to adjust HDMI clock rate by certain PPM.
This function is required by clock recovery in broadcast in
which HDMI PLL should be adjusted in order to reduce the clock
drift in broadcast.

CRs-Fixed: 1086894
Change-Id: I1df15dd6aec44ae3e78bd4f80dc70d0d04760687
Signed-off-by: Ray Zhang <rayz@codeaurora.org>
2016-11-27 19:16:13 -08:00
Linux Build Service Account
308d5348fe Merge "include: clock: Add audio external clock of_index extries" 2016-11-25 17:47:01 -08:00
Linux Build Service Account
57f5019a62 Merge "clk: qcom: Add support for MMCC clock for MSMFalcon" 2016-11-24 06:13:26 -08:00
Linux Build Service Account
065421c6fa Merge "tcp: fix use after free in tcp_xmit_retransmit_queue()" 2016-11-24 06:13:22 -08:00
Linux Build Service Account
aff86d3b4f Merge "cfg80211: validate beacon int as part of iface combinations" 2016-11-24 06:13:18 -08:00
Linux Build Service Account
7193fef2dc Merge "cfg80211: identically validate beacon interval for AP/MESH/IBSS" 2016-11-24 06:13:17 -08:00
Runmin Wang
1289f98375 msm: 8998: Replace cobalt with 8998
Update the code name from msmcobalt to msm8998. As a result, update
the filename containing "cobalt" and files content containing "cobalt".

CRs-Fixed: 1070840
Change-Id: I2c7b95e3e2a2fec7730724da9eeb86a39a77faf1
Signed-off-by: Runmin Wang <runminw@codeaurora.org>
Signed-off-by: Kyle Yan <kyan@codeaurora.org>
Signed-off-by: Jeevan Shriram <jshriram@codeaurora.org>
2016-11-22 13:07:05 -08:00
Taniya Das
48638ac98d clk: qcom: Add support for MMCC clock for MSMFalcon
Add support for the multimedia clock controller found on MSMFalcon
based devices. This should allow most clocks for multimedia peripherals
which includes display, video, camera etc.

Change-Id: If8aa0b094af5ff82fe66c95e3ef2f13632950d2e
Signed-off-by: Taniya Das <tdas@codeaurora.org>
2016-11-21 12:42:02 +05:30
Linux Build Service Account
f6087edb1c Merge "msm: ipa3: header file change for wdi-stats" 2016-11-18 20:31:57 -08:00
Eric Dumazet
29c1418082 tcp: fix use after free in tcp_xmit_retransmit_queue()
When tcp_sendmsg() allocates a fresh and empty skb, it puts it at the
tail of the write queue using tcp_add_write_queue_tail()

Then it attempts to copy user data into this fresh skb.

If the copy fails, we undo the work and remove the fresh skb.

Unfortunately, this undo lacks the change done to tp->highest_sack and
we can leave a dangling pointer (to a freed skb)

Later, tcp_xmit_retransmit_queue() can dereference this pointer and
access freed memory. For regular kernels where memory is not unmapped,
this might cause SACK bugs because tcp_highest_sack_seq() is buggy,
returning garbage instead of tp->snd_nxt, but with various debug
features like CONFIG_DEBUG_PAGEALLOC, this can crash the kernel.

This bug was found by Marco Grassi thanks to syzkaller.

Change-Id: Iba5975e360eb2b2729b6f958b7cb00bfc469e51b
Fixes: 6859d49475 ("[TCP]: Abstract tp->highest_sack accessing & point to next skb")
Reported-by: Marco Grassi <marco.gra@gmail.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Ilpo Järvinen <ilpo.jarvinen@helsinki.fi>
Cc: Yuchung Cheng <ycheng@google.com>
Cc: Neal Cardwell <ncardwell@google.com>
Acked-by: Neal Cardwell <ncardwell@google.com>
Reviewed-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Git-repo: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git
Git-commit: bb1fceca22492109be12640d49f5ea5a544c6bb4
Signed-off-by: Dennis Cagle <d-cagle@codeaurora.org>
2016-11-18 16:41:19 -08:00
Johannes Berg
3b64a0127c cfg80211: validate beacon int as part of iface combinations
Remove the pointless checking against interface combinations in
the initial basic beacon interval validation, that currently isn't
taking into account radar detection or channels properly. Instead,
just validate the basic range there, and then delay real checking
to the interface combination validation that drivers must do.

This means that drivers wanting to use the beacon_int_min_gcd will
now have to pass the new_beacon_int when validating the AP/mesh
start.

CRs-Fixed: 1087922
Change-Id: Iec536bcdf4ed95e3d796324fd8bf5df259b340b0
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git
Git-commit: 4c8dea638c16141adb046fd2e0cab51dfe43650c
[liord@codeaurora.org: Fix conflicts]
Signed-off-by: Lior David <liord@codeaurora.org>
2016-11-18 14:16:44 +02:00
Linux Build Service Account
b140cb0936 Merge "msm: sde: remove secure camera ctrl_id definition" 2016-11-18 01:54:57 -08:00
Linux Build Service Account
54e5bae2ed Merge "sched/hmp: Enhance co-location and scheduler boost features" 2016-11-18 01:54:54 -08:00
Linux Build Service Account
d1a64e4014 Merge "USB: Allow skipping device resume during system resume" 2016-11-18 01:54:53 -08:00
Linux Build Service Account
5d4d0ab7a7 Merge "clk: Add support to allow client to print all enabled clocks" 2016-11-18 01:54:42 -08:00
Johannes Berg
ed8559eaeb cfg80211: make wdev_list accessible to drivers
There's no harm in having drivers read the list, since they can
use RCU protection or RTNL locking; allow this to not require
each and every driver to also implement its own bookkeeping.

CRs-Fixed: 1087922
Change-Id: I2f38b8ba1ddbe6041a4189f5d9b72c982f0fb367
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git
Git-commit: 53873f134d285191ef6435882d55837093a36c53
[liord@codeaurora.org: fix conflicts]
Signed-off-by: Lior David <liord@codeaurora.org>
2016-11-18 01:20:15 +02:00
Abhishek Kondaveeti
90c3f2dedc msm: isp: Add support to multipass offline ISP
Process the input image in multiple passes using
single ISP.

Change-Id: I2b004c149b90ad03acf41d73e825976507a9a274
Signed-off-by: Abhishek Kondaveeti <akondave@codeaurora.org>
2016-11-17 03:09:12 -08:00
Syed Rameez Mustafa
30fc774235 sched/hmp: Enhance co-location and scheduler boost features
The recent introduction of the schedtune cgroup controller has provided
the scheduler with added flexibility in terms of some of it's placement
features. In particular each cgroup under the schedtune controller can
now specify:

1) Whether it needs co-location along with other cgroups
2) Whether it is eligible for scheduler boost (sched_boost_enabled)
3) Whether the kernel can override the boost eligibility when necessary
   (sched_boost_no_override)

The scheduler now creates a reserved co-location group at boot. This
group is used to co-locate all tasks that form part of any one of the
cgroups that have co-location enabled. This reserved group can neither
be destroyed nor reused for other purposes. Furthermore, cgroups are
only allowed to indicate their co-location preference once at boot.
Further updates are disallowed.

Since we are now creating co-location groups for an extended period of
time, there are a few other factors to consider when determining the
preferred cluster for the group. We first exclude any tasks in the
group that have not been observed to be running for a significant
amount of time. Secondly we introduce the notion of group up and down
migrate tunables to allow different migration policies than individual
tasks. Lastly we break co-location if a single task in a group exceeds
up-migrate but the total load of the group does not exceed group
up-migrate.

In terms of sched_boost, the scheduler now supports multiple types of
boost. These are:

1) FULL_THROTTLE : Force up-migrate tasks belonging any cgroup that
                   has the sched_boost_enabled flag turned on. Little
                   CPUs will only be used when big CPUs can no longer
                   accommodate tasks. Also up-migrate all RT tasks.

2) CONSERVATIVE : Override the sched_boost_enabled flag for all cgroups
                  except those that have the sched_boost_no_override
                  flag set. Force up-migrate all tasks belonging to only
                  those cgroups that still remain eligible for boost.
                  RT tasks do not get force up migrated.

3) RESTRAINED : Start frequency aggregation for co-located tasks. This
                type of boost does not force up-migrate any task.

Finally the boost API removes ref-counting. This means that there can
only be a single entity using boost at any given time. If multiple
entities are managing boost, they are required to be well behaved so
that they don't interfere with one another. Even for a single client,
it is not possible to switch directly from one boost type to another.
Boost must be first turned off before switching over to a new type.

Change-Id: I8d224a70cbef162f27078b62b73acaa22670861d
Signed-off-by: Syed Rameez Mustafa <rameezmustafa@codeaurora.org>
2016-11-16 17:57:56 -08:00
Hemant Kumar
7b553e1abd USB: Allow skipping device resume during system resume
This allows xHC to remain in low power mode and not
resume the bus when system wide resume happens.
Controller comes out of low power mode only when usb
device issues a remote wakeup or if there is a host
initiated bus resume.

Change-Id: I96cdcb9e3642906b4afa08d9bde07e123d9b3977
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
2016-11-16 10:58:00 -08:00
Abhijit Kulkarni
98ce3216dd msm: sde: remove secure camera ctrl_id definition
Remove the secure_camera ctrl_id unless the support is available
from the sde rotator driver. If this id is defined and functionality
is not present in the V4L2 driver it causes the rotator use cases
to fail.

CRs-Fixed: 1090525
Change-Id: I48c50bc320425c0db40cd4865e05c6b7a7fb5da3
Signed-off-by: Abhijit Kulkarni <kabhijit@codeaurora.org>
2016-11-15 20:59:22 -08:00
Taniya Das
dba9af81b8 clk: Add support for list_rates ops for clocks
Add support for clocks debugfs to be able to display
 - rates_max which indicates the frequency to voltage mapping of a clock.
 - list_rates, the list of clock frequencies supported by root clocks.
 - Also display the rate_max associated with enabled clocks list.

Change-Id: I0a202af6f46c7cf164036d65487db5c40aab4063
Signed-off-by: Taniya Das <tdas@codeaurora.org>
2016-11-16 09:16:51 +05:30
Taniya Das
770f204fbd clk: add/modify debugfs support for clocks
Update clock debugfs to support the below functionalities.
 - Allow enable/disable a clock.
 - Allow set_rate on a clock.
 - Display the list of enabled_clocks along with prepare_count,
   enable_count and rate.
 - Display the register contents of all the clocks which support
  this clock operation.

Change-Id: Ib67b3a3409c9e7d8adb710bb524f54f543abf712
Signed-off-by: Taniya Das <tdas@codeaurora.org>
2016-11-16 09:16:51 +05:30
Meng Wang
dd076b8ad2 include: clock: Add audio external clock of_index extries
Add clock of_idx entries for audio external clock registered
to the qcom clock framework.

Change-Id: Ie592d06d2e09c2e263a2e9485a42eafb368e49cc
Signed-off-by: Meng Wang <mwang@codeaurora.org>
2016-11-16 10:45:40 +08:00
Eric Dumazet
68b87a2b4a tcp: take care of truncations done by sk_filter()
With syzkaller help, Marco Grassi found a bug in TCP stack,
crashing in tcp_collapse()

Root cause is that sk_filter() can truncate the incoming skb,
but TCP stack was not really expecting this to happen.
It probably was expecting a simple DROP or ACCEPT behavior.

We first need to make sure no part of TCP header could be removed.
Then we need to adjust TCP_SKB_CB(skb)->end_seq

Many thanks to syzkaller team and Marco for giving us a reproducer.

CRs-Fixed: 1089895
Change-Id: I84185558fa6e80b13d7d0078bda9d75143680941
Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: Marco Grassi <marco.gra@gmail.com>
Reported-by: Vladis Dronov <vdronov@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Git-commit: ac6e780070e30e4c35bd395acfe9191e6268bdd3
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
[subashab@codeaurora.org: resolve trivial merge conflicts]
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
2016-11-15 14:54:51 -07:00
Willem de Bruijn
f36f22a49d rose: limit sk_filter trim to payload
Sockets can have a filter program attached that drops or trims
incoming packets based on the filter program return value.

Rose requires data packets to have at least ROSE_MIN_LEN bytes. It
verifies this on arrival in rose_route_frame and unconditionally pulls
the bytes in rose_recvmsg. The filter can trim packets to below this
value in-between, causing pull to fail, leaving the partial header at
the time of skb_copy_datagram_msg.

Place a lower bound on the size to which sk_filter may trim packets
by introducing sk_filter_trim_cap and call this for rose packets.

CRs-Fixed: 1089895
Change-Id: Idc52737bc96097a9220dfe47bb76e94ff1026a05
Signed-off-by: Willem de Bruijn <willemb@google.com>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Git-commit: f4979fcea7fd36d8e2f556abef86f80e0d5af1ba
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
[subashab@codeaurora.org: resolve trivial merge conflicts]
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
2016-11-15 14:54:51 -07:00
Linux Build Service Account
24eb8e0963 Merge "iommu/arm-smmu: support mapping before enabling S1 translations" 2016-11-15 04:07:44 -08:00
Linux Build Service Account
a8bcbb0330 Merge "msm: vidc: Allow clients to suggest I-frame sizes" 2016-11-15 04:07:42 -08:00
Linux Build Service Account
cda3134eb1 Merge "drivers: soc: increase glink tx buffer count" 2016-11-14 21:53:56 -08:00
Krishna Srinivas
99b8438d0e msm: mdss: update csc table on cdm block based on configuration
Update csc type table on cdm block based on configuration
from kernel client. Add proper validation checks in wfd
interface before updating the csc table to valid selection.

Change-Id: Id3a0f68c30919029df01e003a1bcb39ff894574c
Signed-off-by: Dhaval Patel <pdhaval@codeaurora.org>
Signed-off-by: Krishna Srinivas <krisrini@codeaurora.org>
2016-11-11 12:08:56 -08:00
Shiv Maliyappanahalli
2b39a667dc drivers: soc: increase glink tx buffer count
The number of total glink tx buffers are running out
while exercising audio concurrency usecases. Increase
the max tx count to accommodate additional buffer needs.

Signed-off-by: Shiv Maliyappanahalli <smaliyap@codeaurora.org>
Change-Id: Iab64336f8efde2778c16156c6bfcf566c4c892d3
2016-11-11 11:43:35 -08:00
Liam Mark
b40f602bfa iommu/arm-smmu: support mapping before enabling S1 translations
For performance reasons there are clients who would like to move
from stage 1 bypass to stage 1 enabled without having to stop their
device.

Currently clients need to stop their device because they have to
create the required stage 1 mappings before re-enabling the device.
Add the new DOMAIN_ATTR_EARLY_MAP domain attribute to allow clients
to create stage 1 mappings after attaching but before enabling
stage 1 translations.

If the clients set the DOMAIN_ATTR_EARLY_MAP domain attribute to 1
before attaching then then once they attach the SMMU driver won't
enable stage 1 translations. This gives the client the opportunity to
create the required early mappings (for example using iommu_map).
When the client has finished creating the necessary early mappings
the client can then set the DOMAIN_ATTR_EARLY_MAP domain attribute
to 0, this will in turn enable stage 1 translations.

Change-Id: I9e95c5d2130f1d371e201eac69dec140cc773b1f
Signed-off-by: Liam Mark <lmark@codeaurora.org>
2016-11-11 09:46:54 -08:00
Linux Build Service Account
e0181c29c3 Merge "msm: camera: Change CID array size to MAX_CID_CH_PARAM_ENTRY" 2016-11-10 22:49:33 -08:00
Linux Build Service Account
68776a1e98 Merge "NFC: Detection of NQ chip set and firmware version" 2016-11-10 15:14:34 -08:00
Linux Build Service Account
73ab51e35d Merge "ASoC: msm: refactor machine driver for msmfalcon" 2016-11-10 15:14:24 -08:00
Linux Build Service Account
c05ea068d8 Merge "spmi: pmic-arb: support show_resume_irq" 2016-11-09 16:25:04 -08:00
Linux Build Service Account
a97a6be4de Merge "sched: Ensure watchdog is enabled before disabling" 2016-11-08 11:19:07 -08:00
Linux Build Service Account
a273d731af Merge "msm: mdss: Add support for secure camera" 2016-11-08 11:18:39 -08:00
Linux Build Service Account
cb51868198 Merge "msm: mdss: add multiple partial update support" 2016-11-08 11:18:38 -08:00
Linux Build Service Account
c2760c8999 Merge "qseecom: whitelist support for kernel client and listener" 2016-11-08 11:18:29 -08:00
Abhijeet Dharmapurikar
9c08064350 spmi: pmic-arb: support show_resume_irq
show_resume_irq is used to debug interrupts that cause wakeup.
Support it for spmi arbiter's interrupt controller.

Change-Id: I52d51c09d7ff316248542c84a1cd65a28e2283da
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
2016-11-08 10:23:45 -08:00
Deepak Kushwah
b9cfe2da3d msm: vidc: Allow clients to suggest I-frame sizes
Clients that want to influence the size I-Frames emitted by the encoder
can set V4L2_CID_MPEG_VIDC_VIDEO_VENC_IFRAMESIZE_TYPE.

Change-Id: I4e6853022b558069304cde4cff7bc1445fd66213
Signed-off-by: Deepak Kushwah <dkushwah@codeaurora.org>
2016-11-08 05:42:34 -08:00
Linux Build Service Account
e6db870831 Merge "sched/hmp: Fix memory leak when task fork fails" 2016-11-07 22:29:08 -08:00