Stephen Boyd [Sat, 19 Sep 2015 00:52:06 +0000 (17:52 -0700)]
PM / OPP: Support adjusting OPP voltages at runtime
BugLink: http://bugs.launchpad.net/bugs/1763040
On some SoCs the Adaptive Voltage Scaling (AVS) technique is
employed to optimize the operating voltage of a device. At a
given frequency, the hardware monitors dynamic factors and either
makes a suggestion for how much to adjust a voltage for the
current frequency, or it automatically adjusts the voltage
without software intervention. Add an API to the OPP library for
the former case, so that AVS type devices can update the voltages
for an OPP when the hardware determines the voltage should
change. The assumption is that drivers like CPUfreq or devfreq
will register for the OPP notifiers and adjust the voltage
according to suggestions that AVS makes.
Cc: Nishanth Menon <nm@ti.com> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
(cherry picked from commit 8fcd0e8c8b3789274169925b30182af4698fcd9b
http://git.linaro.org/landing-teams/working/qualcomm/kernel.git release/qcomlt-4.14) Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com> Acked-by: Seth Forshee <seth.forshee@canonical.com> Acked-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
Andy Gross [Sat, 19 Sep 2015 00:52:05 +0000 (17:52 -0700)]
regulator: smd: Add floor and corner operations
BugLink: http://bugs.launchpad.net/bugs/1763040
This patch addes the Qualcomm specific functions for setting the floor and
corner voltages on the regulators.
Signed-off-by: Andy Gross <agross@codeaurora.org>
[georgi.djakov@linaro.org: Make work with struct regulator] Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
(cherry picked from commit 976dbf494c836fd009cfcad61f0947239e1ff72f
http://git.linaro.org/landing-teams/working/qualcomm/kernel.git release/qcomlt-4.14) Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com> Acked-by: Seth Forshee <seth.forshee@canonical.com> Acked-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
Georgi Djakov [Mon, 24 Apr 2017 12:17:06 +0000 (15:17 +0300)]
power: avs: cpr: Register with cpufreq-dt
BugLink: http://bugs.launchpad.net/bugs/1763040
The CPR driver currently is handling most of the dependencies including
populating the OPPs, so just register it with cpufreq-dt.
Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
(cherry picked from commit bcd483a0fb6956a7dd42c32c852b20a0919f236f
http://git.linaro.org/landing-teams/working/qualcomm/kernel.git release/qcomlt-4.14) Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com> Acked-by: Seth Forshee <seth.forshee@canonical.com> Acked-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
power: avs: cpr: fix with new reg_sequence structures
BugLink: http://bugs.launchpad.net/bugs/1763040 Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
(cherry picked from commit 9c916989b35efff5e578786accee3ef1c7de032b
http://git.linaro.org/landing-teams/working/qualcomm/kernel.git release/qcomlt-4.14) Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com> Acked-by: Seth Forshee <seth.forshee@canonical.com> Acked-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
Georgi Djakov [Sun, 14 Jun 2015 19:22:47 +0000 (22:22 +0300)]
power: avs: cpr: Use raw mem access for qfprom
BugLink: http://bugs.launchpad.net/bugs/1763040 Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
(cherry picked from commit 5ad1757e08cd53ed4bd2db884da4c6dd454dbc12
http://git.linaro.org/landing-teams/working/qualcomm/kernel.git release/qcomlt-4.14) Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com> Acked-by: Seth Forshee <seth.forshee@canonical.com> Acked-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
Stephen Boyd [Sat, 19 Sep 2015 00:52:09 +0000 (17:52 -0700)]
power: avs: Add support for CPR (Core Power Reduction)
BugLink: http://bugs.launchpad.net/bugs/1763040
CPR (Core Power Reduction) is a technology that reduces core
power on a CPU or other device. It reads voltage settings in
efuse from product test process as initial settings and populates
OPPs for the device being "monitored". Each OPP corresponds to a
"corner" that has a range of valid voltages for a particular
frequency. While the device is running at a particular frequency,
CPR monitors dynamic factors such as temperature, etc. and
adjusts the voltage for that frequency accordingly to save power
and meet silicon characteristic requirements.
This driver is based on work by others on codeaurora.org[1].
Cc: <devicetree@vger.kernel.org> Cc: David Collins <collinsd@codeaurora.org> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org> Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
(cherry picked from commit f6d8f1b702bf6a008d3cf7c69fb754310777e6ef
http://git.linaro.org/landing-teams/working/qualcomm/kernel.git release/qcomlt-4.14) Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com> Acked-by: Seth Forshee <seth.forshee@canonical.com> Acked-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
HACK: drm/msm/iommu: Remove runtime_put calls in map/unmap
BugLink: http://bugs.launchpad.net/bugs/1763040
The system hangs when we try to enable GPU with the runtime ops
as the are in msm_iommu's map/unmap. Comment out the runtime_put()
calls for now. It seems like a device links issue. Needs more debug.
Signed-off-by: Archit Taneja <architt@codeaurora.org>
(cherry picked from commit ecd376209a0c16d1dc5792151b01be2f946747d9
http://git.linaro.org/landing-teams/working/qualcomm/kernel.git release/qcomlt-4.14) Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com> Acked-by: Seth Forshee <seth.forshee@canonical.com> Acked-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
Nicolas Dechesne [Tue, 13 Mar 2018 11:35:04 +0000 (12:35 +0100)]
arm64: defconfig: enable LEDS_QCOM_LPG
BugLink: http://bugs.launchpad.net/bugs/1763040 Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
(cherry picked from commit 37cd0466aac75f20c4eb73d28293cd6d0cc5f983
http://git.linaro.org/landing-teams/working/qualcomm/kernel.git release/qcomlt-4.14) Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com> Acked-by: Seth Forshee <seth.forshee@canonical.com> Acked-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
Signed-off-by: Koen Kooi <koen.kooi@linaro.org> Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
(cherry picked from commit c2d8ececedf19f1310493698f79f4735b4c0aa1a
http://git.linaro.org/landing-teams/working/qualcomm/kernel.git release/qcomlt-4.14) Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com> Acked-by: Seth Forshee <seth.forshee@canonical.com> Acked-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
Koen Kooi [Wed, 14 Feb 2018 13:58:38 +0000 (14:58 +0100)]
kernel: distro.config: enable 'fq' and 'fq_codel' qdiscs
BugLink: http://bugs.launchpad.net/bugs/1763040
'fq_codel' is designed to fight bufferbloat, 'fq' can do similar things when coupled with the 'BBR' TCP congestion algorithm.
Signed-off-by: Koen Kooi <koen.kooi@linaro.org> Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
(cherry picked from commit e5ce8134178b920a4803dc4eb7ae87058d4dcdc1
http://git.linaro.org/landing-teams/working/qualcomm/kernel.git release/qcomlt-4.14) Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com> Acked-by: Seth Forshee <seth.forshee@canonical.com> Acked-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
BugLink: http://bugs.launchpad.net/bugs/1763040 Signed-off-by: Koen Kooi <koen.kooi@linaro.org> Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
(cherry picked from commit b451aee0904ea08d15e252c293eb2084f4080d11
http://git.linaro.org/landing-teams/working/qualcomm/kernel.git release/qcomlt-4.14) Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com> Acked-by: Seth Forshee <seth.forshee@canonical.com> Acked-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
Nicolas Dechesne [Wed, 14 Feb 2018 08:04:41 +0000 (09:04 +0100)]
kernel: configs: set USB_CONFIG_F_FS in distro.config
BugLink: http://bugs.launchpad.net/bugs/1763040
We initially add it to arch/arm64/defconfig, however USB_CONFIG_F_FS depends on
USB_CONFIGFS which is not set in arch/arm64/defconfig, so doing a savedefconfig
would prune it. Since we have USB_CONFIGFS in kernel/configs/distro.config , it
is better to set USB_CONFIG_F_FS there as well.
Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
(cherry picked from commit 3c0bd6e79736c381322e9d25e87812d97f4a7104
http://git.linaro.org/landing-teams/working/qualcomm/kernel.git release/qcomlt-4.14) Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com> Acked-by: Seth Forshee <seth.forshee@canonical.com> Acked-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
Signed-off-by: Ramon Fried <rfried@codeaurora.org> Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
(cherry picked from commit 16f323a9ef6b4ad0045a100f43cd7e503f490108
http://git.linaro.org/landing-teams/working/qualcomm/kernel.git release/qcomlt-4.14) Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com> Acked-by: Seth Forshee <seth.forshee@canonical.com> Acked-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
Signed-off-by: Ramon Fried <rfried@codeaurora.org> Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
(cherry picked from commit 4255a1c29ebea8f80621603915866723f436ecea
http://git.linaro.org/landing-teams/working/qualcomm/kernel.git release/qcomlt-4.14) Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com> Acked-by: Seth Forshee <seth.forshee@canonical.com> Acked-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
Signed-off-by: Ramon Fried <rfried@codeaurora.org> Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
(cherry picked from commit 5c4ed6e4d87964c606cc939c790cddb8760899cd
http://git.linaro.org/landing-teams/working/qualcomm/kernel.git release/qcomlt-4.14) Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com> Acked-by: Seth Forshee <seth.forshee@canonical.com> Acked-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
BugLink: http://bugs.launchpad.net/bugs/1763040 Signed-off-by: Todor Tomov <todor.tomov@linaro.org> Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
(cherry picked from commit b82b34782cabaf10c3301229b043fda976e87549
http://git.linaro.org/landing-teams/working/qualcomm/kernel.git release/qcomlt-4.14) Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com> Acked-by: Seth Forshee <seth.forshee@canonical.com> Acked-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
(cherry picked from commit c0a48d8f59ebf8abcc580cc693ea5253a06ad21a
http://git.linaro.org/landing-teams/working/qualcomm/kernel.git release/qcomlt-4.14) Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com> Acked-by: Seth Forshee <seth.forshee@canonical.com> Acked-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
(cherry picked from commit 330377d14150297921d73f962f6c634b6a11071b
http://git.linaro.org/landing-teams/working/qualcomm/kernel.git release/qcomlt-4.14) Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com> Acked-by: Seth Forshee <seth.forshee@canonical.com> Acked-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
Nicolas Dechesne [Fri, 12 Jan 2018 14:21:46 +0000 (15:21 +0100)]
arm64: configs: enable BT_QCOMSMD
BugLink: http://bugs.launchpad.net/bugs/1763040 Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
(cherry picked from commit 318690951bbfd9fbf92f0b2254b7686e03962e88
http://git.linaro.org/landing-teams/working/qualcomm/kernel.git release/qcomlt-4.14) Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com> Acked-by: Seth Forshee <seth.forshee@canonical.com> Acked-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
Nicolas Dechesne [Tue, 12 Dec 2017 09:07:34 +0000 (10:07 +0100)]
arm64: defconfig: enable CFG80211_DEFAULT_PS by default
BugLink: http://bugs.launchpad.net/bugs/1763040
WCN36xx driver issues related to power save mode have been fixed, and it is not
safe to set power save mode ON by default again.
Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
(cherry picked from commit f4bb5cdc73e88f1fbd8fc63987fc857c295164ef
http://git.linaro.org/landing-teams/working/qualcomm/kernel.git release/qcomlt-4.14) Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com> Acked-by: Seth Forshee <seth.forshee@canonical.com> Acked-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
Amit Kucheria [Mon, 11 Dec 2017 10:23:37 +0000 (15:53 +0530)]
Force the SMD regulator driver to be compiled-in
BugLink: http://bugs.launchpad.net/bugs/1763040
Allowing REGULATOR_QCOM_SMD_RPM to be a module requires solving exporting
some symbols and fixing some dependencies. Since this driver is due to be
refactored, let's take a shortcut to simply disallow modules for now.
Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
(cherry picked from commit ebe10495a722f38cd4f4cfb124e0dc301f01e54b
http://git.linaro.org/landing-teams/working/qualcomm/kernel.git release/qcomlt-4.14) Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com> Acked-by: Seth Forshee <seth.forshee@canonical.com> Acked-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
BugLink: http://bugs.launchpad.net/bugs/1763040 Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
(cherry picked from commit f7a6ea5d560bf63ae1942b1b344d97590a1c14dd
http://git.linaro.org/landing-teams/working/qualcomm/kernel.git release/qcomlt-4.14) Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com> Acked-by: Seth Forshee <seth.forshee@canonical.com> Acked-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
Amit Kucheria [Mon, 6 Nov 2017 07:08:13 +0000 (12:38 +0530)]
arm64: defconfig: enable new trigger modes for leds
BugLink: http://bugs.launchpad.net/bugs/1763040
Most development boards and devices have one or more LEDs. It is useful
during debugging if they can be wired to show different behaviours such as
disk or cpu activity or a load-average dependent heartbeat. Enable panic
and disk activity triggers so they can be tied to LED activity during
debugging as well.
Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org> Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
(cherry picked from commit cf473151158b4480420068365fd320a3ebd849c8
http://git.linaro.org/landing-teams/working/qualcomm/kernel.git release/qcomlt-4.14) Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com> Acked-by: Seth Forshee <seth.forshee@canonical.com> Acked-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
Nicolas Dechesne [Tue, 28 Nov 2017 09:49:14 +0000 (15:19 +0530)]
arm64: defconfig: enable QCOM_TSENS
BugLink: http://bugs.launchpad.net/bugs/1763040 Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org> Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
(cherry picked from commit 391ea1ed2111eb6f0d65931d30be30516af20b3e
http://git.linaro.org/landing-teams/working/qualcomm/kernel.git release/qcomlt-4.14) Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com> Acked-by: Seth Forshee <seth.forshee@canonical.com> Acked-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
Amit Kucheria [Mon, 27 Nov 2017 12:29:41 +0000 (17:59 +0530)]
arm64: defconfig: enable ondemand governor as default
BugLink: http://bugs.launchpad.net/bugs/1763040 Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
(cherry picked from commit 91644661f4e105f711d82de93cf2a027391836c3
http://git.linaro.org/landing-teams/working/qualcomm/kernel.git release/qcomlt-4.14) Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com> Acked-by: Seth Forshee <seth.forshee@canonical.com> Acked-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
Amit Kucheria [Mon, 27 Nov 2017 11:28:12 +0000 (16:58 +0530)]
arm64: defconfig: Enable a53/apcs and avs
BugLink: http://bugs.launchpad.net/bugs/1763040 Signed-off-by: Amit Kucheria <amit.kucheria@linaro.org>
(cherry picked from commit fba87646c0750af8d3cd0aca9b8d0d3df3cfe7dc
http://git.linaro.org/landing-teams/working/qualcomm/kernel.git release/qcomlt-4.14) Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com> Acked-by: Seth Forshee <seth.forshee@canonical.com> Acked-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
BugLink: http://bugs.launchpad.net/bugs/1763040 Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
(cherry picked from commit 2f28ff9bcfdddf3769b5ebd816f1d03092955e68
http://git.linaro.org/landing-teams/working/qualcomm/kernel.git release/qcomlt-4.14) Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com> Acked-by: Seth Forshee <seth.forshee@canonical.com> Acked-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
Nicolas Dechesne [Fri, 24 Nov 2017 08:56:09 +0000 (09:56 +0100)]
kernel: distro.config: enable debug friendly USB network adpater
BugLink: http://bugs.launchpad.net/bugs/1763040
The DB410c has no built in Ethernet, so let's make sure that we can at least get
USB/Ether adaptors to work without any modules.
Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
(cherry picked from commit b0746b1ec12dc9f61d8d771f9a0dcb093c21dd09
http://git.linaro.org/landing-teams/working/qualcomm/kernel.git release/qcomlt-4.14) Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com> Acked-by: Seth Forshee <seth.forshee@canonical.com> Acked-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
BugLink: http://bugs.launchpad.net/bugs/1763040
powersave is disabled by default, as it is known to cause problems on
Dragonboard 410c, with the current firmware.
Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
(cherry picked from commit dacc00ec2283a68e36cc638bc23956ca102f75b8
http://git.linaro.org/landing-teams/working/qualcomm/kernel.git release/qcomlt-4.14) Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com> Acked-by: Seth Forshee <seth.forshee@canonical.com> Acked-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
f4feb382e577 kernel: configs: distro.config: Build media as modules 26d98682451b distro.config: enable USB device class drivers 9dc089f6ba24 configs: distro.config: enable ZRAM 8f39767444e1 config: enable new trigger modes for leds 45ef9272de5d kernel: configs: distro.config: add legacy instruction support for arm64 3cfc9326cd47 kernel: configs: add more Bluetooth and WLAN options 2757af8ec7cc kernel: configs: distro.config: add NETFILTER_XT_MATCH_HASHLIMIT d4396e667fa4 distro.config: enable USB_LAN78XX c5c7d5af0fca distro.config: extend connectivity options 2bcb6580ca8e kernel: configs: enable Docker support in distro.config f90d65adbd5f configs: move DEBUG configs in their own config file 69e32eeae256 configs: add SPI_SPIDEV as module in distro.config dba8b2c42e18 kernel: configs: add CONFIG_INPUT_JOYDEV in distro.config 98ab2d98ae3c kernel: configs: add I2C_CHARDEV in distro.config 17a895de7d8b kernel: add DRM_LOAD_EDID_FIRMWARE in distro.config 84408f7db7e8 kernel: configs: Enable input misc device drivers 139a0dbd4b37 kernel: configs: update distro config from release branch a390f24b3b7e kernel: configs: improve distro.config, mostly for systemd 666238880c31 kernel: configs: update distro.config 3e2ff9ab7131 kernel: configs: move linaro distro.conf as proper %.config fragment
Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
(cherry picked from commit 83a947d5c5fd3fa66163f8a036b0c42a0fab88b9
http://git.linaro.org/landing-teams/working/qualcomm/kernel.git release/qcomlt-4.14) Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com> Acked-by: Seth Forshee <seth.forshee@canonical.com> Acked-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
(cherry picked from commit cbb9a7b290d4623e425cd3591fdf8c2a0f1dadc4
http://git.linaro.org/landing-teams/working/qualcomm/kernel.git release/qcomlt-4.14) Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com> Acked-by: Seth Forshee <seth.forshee@canonical.com> Acked-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
Nicolas Dechesne [Fri, 22 Sep 2017 09:44:14 +0000 (11:44 +0200)]
arm64: defconfig: enable REMOTEPROC
BugLink: http://bugs.launchpad.net/bugs/1763040 Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
(cherry picked from commit e0153474e81f3e75c12157066ef39311bc3895dc
http://git.linaro.org/landing-teams/working/qualcomm/kernel.git release/qcomlt-4.14) Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com> Acked-by: Seth Forshee <seth.forshee@canonical.com> Acked-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
(cherry picked from commit f3105f0ae4d9fda5b3922319dfe248cdb504c2a8) Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com> Acked-by: Seth Forshee <seth.forshee@canonical.com> Acked-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
BugLink: http://bugs.launchpad.net/bugs/1763040
Deblocking filter allows to reduce blocking artifacts and improve
visual quality. This is configurable via the V4L2 API but eventually
not applied to the encoder.
Note that alpha and beta deblocking values are 32-bit signed (-6;+6).
Signed-off-by: Loic Poulain <loic.poulain@linaro.org> Reviewed-by: Stanimir Varbanov <stanimir.varbanov@linaro.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
(cherry picked from commit f7d12fea16cbcc38d08092c6267e75fabeaa9093) Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com> Acked-by: Seth Forshee <seth.forshee@canonical.com> Acked-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
Loic Poulain [Fri, 24 Nov 2017 09:34:01 +0000 (04:34 -0500)]
media: venus: venc: configure entropy mode
BugLink: http://bugs.launchpad.net/bugs/1763040
H264 entropy mode can be selected via V4L2 API but is eventually not
applied. Configure encoder with selected mode, CALVC (def) or CABAC.
Note that hw/firmware also expects a CABAC model configuration which
currently doesn't have existing V4L2 API control. For now, use model_0
which seems always supported and so the default one.
Signed-off-by: Loic Poulain <loic.poulain@linaro.org> Reviewed-by: Stanimir Varbanov <stanimir.varbanov@linaro.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
(cherry picked from commit a7837e11679e015ef6c4b3f04ae09d17b0980c4e) Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com> Acked-by: Seth Forshee <seth.forshee@canonical.com> Acked-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
media: venus: venc: set correctly GOP size and number of B-frames
BugLink: http://bugs.launchpad.net/bugs/1763040
This change fixes the calculation of B-frames and GOP size by
adopt v4l2 controls with the firmware interface expectations.
Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
[hans.verkuil@cisco.com: fixed two small checkpatch comments] Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
(cherry picked from commit 8fc58186bb41ff8789ad9e993c03a23d67698709) Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com> Acked-by: Seth Forshee <seth.forshee@canonical.com> Acked-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
Wei Yongjun [Thu, 4 Jan 2018 06:34:43 +0000 (06:34 +0000)]
clk: qcom: msm8916: Fix return value check in qcom_apcs_msm8916_clk_probe()
BugLink: http://bugs.launchpad.net/bugs/1763040
In case of error, the function dev_get_regmap() returns NULL pointer
not ERR_PTR(). The IS_ERR() test in the return value check should be
replaced with NULL test.
Fixes: 81ac38847a1d ("clk: qcom: Add APCS clock controller support") Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Signed-off-by: Stephen Boyd <sboyd@kernel.org>
(cherry picked from commit 55c19eee3b471e7ca7e38783836f7b7137c9d14f) Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com> Acked-by: Seth Forshee <seth.forshee@canonical.com> Acked-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
Georgi Djakov [Tue, 5 Dec 2017 15:47:01 +0000 (17:47 +0200)]
clk: qcom: Add APCS clock controller support
BugLink: http://bugs.launchpad.net/bugs/1763040
Add a driver for the APCS clock controller. It is part of the APCS
hardware block, which among other things implements also a combined
mux and half integer divider functionality. It can choose between a
fixed-rate clock or the dedicated APCS (A53) PLL. The source and the
divider can be set both at the same time.
This is required for enabling CPU frequency scaling on MSM8916-based
platforms.
Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org> Acked-by: Bjorn Andersson <bjorn.andersson@linaro.org> Tested-by: Amit Kucheria <amit.kucheria@linaro.org>
[sboyd@codeaurora.org: Include rcg header for parent_map, drop
multiple unneeded includes, add COMPILE_TEST to APCS depends,
made tristate/modular] Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
(cherry picked from commit 81ac38847a1d7fdd74a232cae195ff8f0fb4ab21) Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com> Acked-by: Seth Forshee <seth.forshee@canonical.com> Acked-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
Georgi Djakov [Tue, 5 Dec 2017 15:46:59 +0000 (17:46 +0200)]
clk: qcom: Add regmap mux-div clocks support
BugLink: http://bugs.launchpad.net/bugs/1763040
Add support for hardware that can switch both parent clock and divider
at the same time. This avoids generating intermediate frequencies from
either the old parent clock and new divider or new parent clock and
old divider combinations.
Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org> Tested-by: Amit Kucheria <amit.kucheria@linaro.org>
[sboyd@codeaurora.org: Change a comment style, drop parent_map in
favor of a u32 array instead, export symbols for clk_ops and mux
function] Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
(cherry picked from commit 081bfeed5f1b8394d993afa6b0ce20ed3e868960) Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com> Acked-by: Seth Forshee <seth.forshee@canonical.com> Acked-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
Georgi Djakov [Tue, 5 Dec 2017 15:46:58 +0000 (17:46 +0200)]
clk: qcom: Add A53 PLL support
BugLink: http://bugs.launchpad.net/bugs/1763040
The CPUs on Qualcomm MSM8916-based platforms are clocked by two PLLs,
a primary (A53) CPU PLL and a secondary fixed-rate GPLL0. These sources
are connected to a mux and half-integer divider, which is feeding the
CPU cores.
This patch adds support for the primary CPU PLL which generates the
higher range of frequencies above 1GHz.
Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org> Acked-by: Bjorn Andersson <bjorn.andersson@linaro.org> Tested-by: Amit Kucheria <amit.kucheria@linaro.org>
[sboyd@codeaurora.org: Move to devm provider registration,
NUL terminate frequency table, made tristate/modular] Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
(cherry picked from commit 0c6ab1b8f8940d4ddbfff7ddff080cbfb5f32b02) Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com> Acked-by: Seth Forshee <seth.forshee@canonical.com> Acked-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
Georgi Djakov [Tue, 5 Dec 2017 15:46:57 +0000 (17:46 +0200)]
mailbox: qcom: Create APCS child device for clock controller
BugLink: http://bugs.launchpad.net/bugs/1763040
There is a clock controller functionality provided by the APCS hardware
block of msm8916 devices. The device-tree would represent an APCS node
with both mailbox and clock provider properties.
Create a platform child device for the clock controller functionality so
the driver can probe and use APCS as parent.
Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org> Acked-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
(cherry picked from commit c815d769b598196bdbd104a7e049d07ae6fba0d2) Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com> Acked-by: Seth Forshee <seth.forshee@canonical.com> Acked-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
Georgi Djakov [Tue, 5 Dec 2017 15:46:56 +0000 (17:46 +0200)]
mailbox: qcom: Convert APCS IPC driver to use regmap
BugLink: http://bugs.launchpad.net/bugs/1763040
This hardware block provides more functionalities that just IPC. Convert
it to regmap to allow other child platform devices to use the same regmap.
Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org> Acked-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
(cherry picked from commit c6a8b171ca8e338a3012420041346f0e50f7f649) Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com> Acked-by: Seth Forshee <seth.forshee@canonical.com> Acked-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
Ramon Fried [Tue, 23 Jan 2018 15:20:13 +0000 (17:20 +0200)]
wcn36xx: release DMA memory in case of error
BugLink: http://bugs.launchpad.net/bugs/1763040
wcn36xx_dxe_init() doesn't check for the return value of
wcn36xx_dxe_init_descs(), release the resources in case an error ocurred.
Signed-off-by: Ramon Fried <rfried@codeaurora.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
(cherry picked from commit d0bb950b9f5f4e5894ec3053c0d2bb24be5f8dd8) Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com> Acked-by: Seth Forshee <seth.forshee@canonical.com> Acked-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
Colin Ian King [Fri, 29 Dec 2017 09:07:31 +0000 (09:07 +0000)]
wcn36xx: fix incorrect assignment to msg_body.min_ch_time
BugLink: http://bugs.launchpad.net/bugs/1763040
The second assignment to msg_body.min_ch_time is incorrect, it
should actually be to msg_body.max_ch_time.
Thanks to Bjorn Andersson for identifying the correct way to fix
this as my original fix was incorrect.
Detected by CoverityScan, CID#1463042 ("Unused Value")
Fixes: 2f3bef4b247e ("wcn36xx: Add hardware scan offload support") Signed-off-by: Colin Ian King <colin.king@canonical.com> Acked-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
(cherry picked from commit 4c8cf8df2f42a78f9357dba71c967705c5bd98bd) Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com> Acked-by: Seth Forshee <seth.forshee@canonical.com> Acked-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
Bjorn Andersson [Sat, 9 Dec 2017 00:35:08 +0000 (16:35 -0800)]
wcn36xx: Reduce spinlock in indication handler
BugLink: http://bugs.launchpad.net/bugs/1763040
The purpose of pushing indication on a list and handle these in a
separate worker is to allow the handlers to sleep. It does therefor not
make much sense to hold the queue spinlock through the entire indication
worker function.
By removing items from the queue early we don't need to hold the lock
throughout the indication worker, allowing the individual handlers to
sleep.
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
(cherry picked from commit 6d1f37323f5b796dbba4e2d9069778fc5b9bb2a2) Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com> Acked-by: Seth Forshee <seth.forshee@canonical.com> Acked-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
Loic Poulain [Fri, 8 Dec 2017 09:35:30 +0000 (10:35 +0100)]
wcn36xx: Add hardware scan offload support
BugLink: http://bugs.launchpad.net/bugs/1763040
Current hw_scan implementation does not trigger offloaded
hardware scan and seems to only put the device in a kind of
listening mode (beacon/probe-response) for software scan.
Since no probe request are generated by the software, current
scanning method is similar to a passive scan.
This patch introduces support for 'true' hardware offloaded scan.
Hardware scan is configured and started via the start-scan-offload
firmware message. Once scan has been completed a scan indicator
message is received from firmware.
Moreover, this patch includes support for directed probe-request,
allowing connection with hidden APs. It also fixes scan issues with
band-steering AP which are not 'visible' with passive scan (due to
hidden ssid in beacons).
Let's keep the 'legacy' scanning method in case scan-offload is not
supported.
Signed-off-by: Loic Poulain <loic.poulain@linaro.org> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
(cherry picked from commit 2f3bef4b247e4843ebf81123004fa9252b948724) Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com> Acked-by: Seth Forshee <seth.forshee@canonical.com> Acked-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
Eyal Ilsar [Thu, 16 Nov 2017 08:01:26 +0000 (10:01 +0200)]
wcn36xx: set default BTLE coexistence config
BugLink: http://bugs.launchpad.net/bugs/1763040
If the value for the firmware configuration parameters
BTC_STATIC_LEN_LE_BT and BTC_STATIC_LEN_LE_WLAN are not set the duty
cycle between BT and WLAN is such that if BT (including BLE) is active
WLAN gets 0 bandwidth. When tuning these parameters having a too high
value for WLAN means that BLE performance degrades.
The "sweet" point of roughly half of the maximal values was empirically
found to achieve a balance between BLE and Wi-Fi coexistence
performance.
Signed-off-by: Eyal Ilsar <eilsar@codeaurora.org> Signed-off-by: Ramon Fried <rfried@codeaurora.org> Acked-by: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
(cherry picked from commit 4119b6160a35693655199f3e9e4a4d7b154a75b0) Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com> Acked-by: Seth Forshee <seth.forshee@canonical.com> Acked-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
Jordan Crouse [Wed, 13 Dec 2017 20:45:44 +0000 (13:45 -0700)]
drm/msm: gpu: Only sync fences on rings that exist
BugLink: http://bugs.launchpad.net/bugs/1763040
The fault recovery code tries to sync fences on all possible rings
instead of only the rings that actually exist which will fault the
kernel when the number of rings are less than the maximum amount.
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org> Signed-off-by: Rob Clark <robdclark@gmail.com>
(cherry picked from commit 7ddae82e12593ff3d44e628c02fbfa765508aa48) Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com> Acked-by: Seth Forshee <seth.forshee@canonical.com> Acked-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
Arnd Bergmann [Thu, 2 Nov 2017 11:21:32 +0000 (12:21 +0100)]
drm/msm: fix msm_rd_dump_submit prototype
BugLink: http://bugs.launchpad.net/bugs/1763040
The prototype of msm_rd_dump_submit() has recently changed. However,
we have two declarations of this functions, and the other one
remains the old version, leading to this:
drivers/gpu/drm/msm/msm_gpu.c: In function 'recover_worker':
drivers/gpu/drm/msm/msm_gpu.c:295:23: error: passing argument 1 of 'msm_rd_dump_submit' from incompatible pointer type [-Werror=incompatible-pointer-types]
This changes the second one to match the first again.
Fixes: 2165e2b9cba2 ("drm/msm: split rd debugfs file") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Rob Clark <robdclark@gmail.com>
(cherry picked from commit e6756d7c1a7ebe04def1b24b45ce01ef6c4175bc) Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com> Acked-by: Seth Forshee <seth.forshee@canonical.com> Acked-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Rob Clark <robdclark@gmail.com>
(cherry picked from commit 3a9016ba0e8f3cf4196eae99b5b18172c9b71045) Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com> Acked-by: Seth Forshee <seth.forshee@canonical.com> Acked-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com> Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@canonical.com>
BugLink: http://bugs.launchpad.net/bugs/1763062
The procfs context interface won't be a part of further LSM stacking
patches, so don't expose or carry it.
Signed-off-by: John Johansen <john.johansen@canonical.com> Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
John Johansen [Mon, 25 Sep 2017 16:21:31 +0000 (12:21 -0400)]
UBUNTU: SAUCE: LSM stacking: add configs for LSM stacking
BugLink: http://bugs.launchpad.net/bugs/1763062
Add the config options for LSM stacking. Default to only apparmor
being in the stack. Users can experiment with stacking by specifying
the
security=
John Johansen [Thu, 28 Sep 2017 17:47:13 +0000 (13:47 -0400)]
UBUNTU: SAUCE: LSM stacking: make sure LSM blob align on 64 bit boundaries
BugLink: http://bugs.launchpad.net/bugs/1763062
The security->task blob reserving the first 12 bytes means that LSM
blobs don't align on 64 byte boundaries. This is not a problem
for x86 but if an LSM stores a long or ptr in its blob, then some
architectures require it be aligned to the arch word size and
will through a fault.
Signed-off-by: John Johansen <john.johansen@canonical.com> Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
John Johansen [Wed, 27 Sep 2017 06:05:22 +0000 (02:05 -0400)]
UBUNTU: SAUCE: LSM stacking: provide a way to specify the default display lsm
BugLink: http://bugs.launchpad.net/bugs/1763062
When the system boots up the desired default display LSM maybe different
than the first LSM initialized. Allow it to be set by specifying an
LSM with
security.display=apparmor
Signed-off-by: John Johansen <john.johansen@canonical.com> Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
John Johansen [Wed, 27 Sep 2017 05:28:08 +0000 (01:28 -0400)]
UBUNTU: SAUCE: LSM stacking: verify display LSM
BugLink: http://bugs.launchpad.net/bugs/1763062
Make sure the display LSM is verified to be a registered LSM, to
avoid breakage when a bad name is passed.
Signed-off-by: John Johansen <john.johansen@canonical.com> Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
John Johansen [Tue, 26 Sep 2017 18:58:26 +0000 (14:58 -0400)]
UBUNTU: SAUCE: LSM stacking: provide prctl interface for setting context
BugLink: http://bugs.launchpad.net/bugs/1763062
Separate out the prctl interface added in the full LSM stacking patches
to allow tasks to set the display "LSM".
Signed-off-by: John Johansen <john.johansen@canonical.com> Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
BugLink: http://bugs.launchpad.net/bugs/1763062
The base stacking code does not provide a way for users to specify the
desired stack using the kernel boot parameters. Enable specifying an
LSM stack on the command line by providing a comma separated list
ie.
security=apparmor,selinux
Signed-off-by: John Johansen <john.johansen@canonical.com> Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
BugLink: http://bugs.launchpad.net/bugs/1763062
The stack configs in the base stacking patches are confusing and
separate the selinux/smack stacking from the other LSMs with an
"extreme" stacking entry which is extremely confusing.
Switch the "extreme" stacking to a select for mutually exclusive
LSMs, which provides a better explanation of what is happening.
Fixes: 6c5100029055 ("LSM: general but not extreme module stacking") Signed-off-by: John Johansen <john.johansen@canonical.com> Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Casey Schaufler [Wed, 7 Mar 2018 22:39:43 +0000 (14:39 -0800)]
UBUNTU: SAUCE: LSM stacking: LSM: General stacking
BugLink: http://bugs.launchpad.net/bugs/1763062
Leverage the infrastructure management of the security blobs
to allow stacking of security modules in all but the most
extreme case. Security modules are informed of the location
of their data within the blobs at module initialization.
Stacking is optional. If stacking is not configured the old
limit of one "major" security module applies. If stacking is
configured TOMOYO can be configured with an of the other
modules. SELinux, Smack and AppArmor use (or in the AppArmor
case, threaten to use) secids, which are not (yet) shareable.
BugLink: http://bugs.launchpad.net/bugs/1763062
Move management of the inode, ipc, key, msg_msg, sock and superblock
security blobs from the security modules to the infrastructure.
Use of the blob pointers is abstracted in the security modules.
BugLink: http://bugs.launchpad.net/bugs/1763062
Move management of task security blobs into the security
infrastructure. Modules are required to identify the space
they require. At this time there are no modules that use
task blobs.
BugLink: http://bugs.launchpad.net/bugs/1763062
Move the management of file security blobs from the individual
security modules to the security infrastructure. The security modules
using file blobs have been updated accordingly. Modules are required
to identify the space they need at module initialization. In some
cases a module no longer needs to supply a blob management hook, in
which case the hook has been removed.
BugLink: http://bugs.launchpad.net/bugs/1763062
Move the management of credential security blobs from the
individual security modules to the security infrastructure.
The security modules using credential blobs have been updated
accordingly. Modules are required to identify the space they
require at module initialization. In some cases a module no
longer needs to supply a blob management hook, in which case
the hook has been removed.
Casey Schaufler [Wed, 7 Mar 2018 22:31:19 +0000 (14:31 -0800)]
UBUNTU: SAUCE: LSM stacking: procfs: add smack subdir to attrs
BugLink: http://bugs.launchpad.net/bugs/1763062
Back in 2007 I made what turned out to be a rather serious
mistake in the implementation of the Smack security module.
The SELinux module used an interface in /proc to manipulate
the security context on processes. Rather than use a similar
interface, I used the same interface. The AppArmor team did
likewise. Now /proc/.../attr/current will tell you the
security "context" of the process, but it will be different
depending on the security module you're using.
This patch provides a subdirectory in /proc/.../attr for
Smack. Smack user space can use the "current" file in
this subdirectory and never have to worry about getting
SELinux attributes by mistake. Programs that use the
old interface will continue to work (or fail, as the case
may be) as before.
Colin Ian King [Mon, 26 Mar 2018 15:10:18 +0000 (16:10 +0100)]
RDMA/hns: ensure for-loop actually iterates and free's buffers
BugLink: https://bugs.launchpad.net/bugs/1762757
The current for-loop zeros variable i and only loops once, hence
not all the buffers are free'd. Fix this by setting i correctly.
Detected by CoverityScan, CID#1463415 ("Operands don't affect result")
Fixes: a5073d6054f7 ("RDMA/hns: Add eq support of hip08") Signed-off-by: Colin Ian King <colin.king@canonical.com> Reviewed-by: Yixian Liu <liuyixian@huawei.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
(cherry picked from commit 38759d6175d338fbf9282c8ea2b51f3b7ab9bc98) Signed-off-by: dann frazier <dann.frazier@canonical.com> Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Yixian Liu [Wed, 21 Mar 2018 06:11:18 +0000 (14:11 +0800)]
RDMA/hns: Fix cq record doorbell enable in kernel
BugLink: https://bugs.launchpad.net/bugs/1762755
Upon detecting both kernel and user space support record doorbell,
the kernel needs to enable this capability in hardware by db_en,
and it should take place before cq context configuration in
hns_roce_cq_alloc. Currently, db_en is configured after cq alloc
and db_map_user has similar problem.
Reported-by: Xiping Zhang <zhangxiping3@huawei.com> Fixes: 9b44703d0a21 ("RDMA/hns: Support cq record doorbell for the user space") Signed-off-by: Yixian Liu <liuyixian@huawei.com> Signed-off-by: Lijun Ou <oulijun@huawei.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
(cherry picked from commit e95955773d4357a0b09a43128352047afce8f35b) Signed-off-by: dann frazier <dann.frazier@canonical.com> Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Yixian Liu [Mon, 19 Mar 2018 13:36:07 +0000 (21:36 +0800)]
RDMA/hns: Fix init resp when alloc ucontext
BugLink: https://bugs.launchpad.net/bugs/1762755
The data in resp will be copied from kernel to userspace, thus it needs to
be initialized to zeros to avoid copying uninited stack memory.
Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Fixes: e088a685eae9 ("RDMA/hns: Support rq record doorbell for the user space") Signed-off-by: Yixian Liu <liuyixian@huawei.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
(cherry picked from commit df7e40425813c50cd252e6f5e348a81ef1acae56) Signed-off-by: dann frazier <dann.frazier@canonical.com> Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Yixian Liu [Thu, 15 Mar 2018 07:23:14 +0000 (15:23 +0800)]
RDMA/hns: Fix cqn type and init resp
BugLink: https://bugs.launchpad.net/bugs/1762755
This patch changes the type of cqn from u32 to u64 to keep
userspace and kernel consistent, initializes resp both for
cq and qp to zeros, and also changes the condition judgment
of outlen considering future caps extension.
Suggested-by: Jason Gunthorpe <jgg@mellanox.com> Fixes: e088a685eae9 (hns: Support rq record doorbell for the user space) Fixes: 9b44703d0a21 (hns: Support cq record doorbell for the user space) Signed-off-by: Yixian Liu <liuyixian@huawei.com> Signed-off-by: Lijun Ou <oulijun@huawei.com> Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com> Signed-off-by: Shaobo Xu <xushaobo2@huawei.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
(cherry picked from commit 7b48221cf41a90cf4bfc36e6d699b7fa4169c970) Signed-off-by: dann frazier <dann.frazier@canonical.com> Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
oulijun [Mon, 5 Feb 2018 13:14:00 +0000 (21:14 +0800)]
RDMA/hns: Fix the endian problem for hns
BugLink: https://bugs.launchpad.net/bugs/1762755
The hip06 and hip08 run on a little endian ARM, it needs to
revise the annotations to indicate that the HW uses little
endian data in the various DMA buffers, and flow the necessary
swaps throughout.
The imm_data use big endian mode. The cpu_to_le32/le32_to_cpu
swaps are no-op for this, which makes the only substantive
change the handling of imm_data which is now mandatory swapped.
This also keep match with the userspace hns driver and resolve
the warning by sparse.
Signed-off-by: Lijun Ou <oulijun@huawei.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
(cherry picked from commit 8b9b8d143b467ec9c65f87b7c2596dc2aabe6737) Signed-off-by: dann frazier <dann.frazier@canonical.com> Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
It is the responsibility of the LPC host driver to enumerate the child
devices, as the ACPI scan code will not enumerate children of "indirect IO"
hosts.
The ACPI table for the LPC host controller and the child devices is in the
following format:
Device (LPC0) {
Name (_HID, "HISI0191") // HiSi LPC
Name (_CRS, ResourceTemplate () {
Memory32Fixed (ReadWrite, 0xa01b0000, 0x1000)
})
}
Since the IO resources of the child devices need to be translated from LPC
bus addresses to logical PIO addresses, and we shouldn't modify the
resources of the devices generated in the FW scan, a per-child MFD is
created as a substitute. The MFD IO resources will be the translated bus
addresses of the ACPI child.
Tested-by: dann frazier <dann.frazier@canonical.com> Signed-off-by: John Garry <john.garry@huawei.com> Signed-off-by: Zhichang Yuan <yuanzhichang@hisilicon.com> Signed-off-by: Gabriele Paoloni <gabriele.paoloni@huawei.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
(cherry picked from commit e0aa1563f8945d9b8f472426d100bed190a4308f) Signed-off-by: dann frazier <dann.frazier@canonical.com> Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
John Garry [Wed, 14 Mar 2018 18:15:57 +0000 (02:15 +0800)]
ACPI / scan: Do not enumerate Indirect IO host children
BugLink: https://bugs.launchpad.net/bugs/1762758
Through the logical PIO framework, systems which otherwise have no IO space
access to legacy ISA/LPC devices may access these devices through so-called
"indirect IO" method. In this, IO space accesses for non-PCI hosts are
redirected to a host LLDD to manually generate the IO space (bus) accesses.
Hosts are able to register a region in logical PIO space to map to its bus
address range.
Indirect IO child devices have an associated host-specific bus address.
Special translation is required to map between a logical PIO address for a
device and its host bus address.
Since in the ACPI tables the child device IO resources would be the
host-specific values, it is required the ACPI scan code should not
enumerate these devices, and that this should be the responsibility of the
host driver so that it can "fixup" the resources so that they map to the
appropriate logical PIO addresses.
To avoid enumerating these child devices, add a check from
acpi_device_enumeration_by_parent() as to whether the parent for a device
is a member of a known list of "indirect IO" hosts. For now, the HiSilicon
LPC host controller ID is added.
Tested-by: dann frazier <dann.frazier@canonical.com> Signed-off-by: John Garry <john.garry@huawei.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
(cherry picked from commit dfda4492322ed0a1eb9c4d4715c4b90c9af57352) Signed-off-by: dann frazier <dann.frazier@canonical.com> Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
John Garry [Wed, 14 Mar 2018 18:15:56 +0000 (02:15 +0800)]
ACPI / scan: Rename acpi_is_serial_bus_slave() for more general use
BugLink: https://bugs.launchpad.net/bugs/1762758
Currently the ACPI scan has special handling for serial bus slaves, in that
it makes it the responsibility of the slave device's parent to enumerate
the device.
To support other types of slave devices which require the same special
handling but where the bus is not strictly a serial bus, such as devices on
the HiSilicon LPC controller bus, rename acpi_is_serial_bus_slave() to
acpi_device_enumeration_by_parent(), so that the name can fit the wider
purpose.
Also rename the associated device flag acpi_device_flags.serial_bus_slave
to .enumeration_by_parent.
Signed-off-by: John Garry <john.garry@huawei.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
(cherry picked from commit d87fb0917a073d71300b2b31b3773f6690bd1712) Signed-off-by: dann frazier <dann.frazier@canonical.com> Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Implement the LPC host controller driver which performs the I/O operations
on the underlying hardware. We don't want to touch existing drivers such
as ipmi-bt, so this driver applies the indirect-IO introduced in the
previous patch after registering an indirect-IO node to the indirect-IO
devices list which will be searched by the I/O accessors to retrieve the
host-local I/O port.
The driver config is set as a bool instead of a tristate. The reason here
is that, by the very nature of the driver providing a logical PIO range, it
does not make sense to have this driver as a loadable module. Another more
specific reason is that the Huawei D03 board which includes Hip06 SoC
requires the LPC bus for UART console, so should be built in.
Tested-by: dann frazier <dann.frazier@canonical.com> Signed-off-by: Zou Rongrong <zourongrong@huawei.com> Signed-off-by: Zhichang Yuan <yuanzhichang@hisilicon.com> Signed-off-by: John Garry <john.garry@huawei.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Acked-by: Rob Herring <robh@kernel.org> # dts part
(cherry picked from commit adf38bb0b5956ab5469acb1ca981a9287c7ad1d8) Signed-off-by: dann frazier <dann.frazier@canonical.com> Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Zhichang Yuan [Wed, 14 Mar 2018 18:15:54 +0000 (02:15 +0800)]
of: Add missing I/O range exception for indirect-IO devices
BugLink: https://bugs.launchpad.net/bugs/1762758
There are some special ISA/LPC devices that work on a specific I/O range
where it is not correct to specify a 'ranges' property in the DTS parent
node as CPU addresses translated from DTS node are only for memory space on
some architectures, such as ARM64. Without the parent 'ranges' property,
of_translate_address() returns an error.
Here we add special handling for this case.
During the OF address translation, some checking will be performed to
identify whether the device node is registered as indirect-IO. If it is,
the I/O translation will be done in a different way from that one of PCI
MMIO. In this way, the I/O 'reg' property of the special ISA/LPC devices
will be parsed correctly.
Tested-by: dann frazier <dann.frazier@canonical.com> Signed-off-by: Zhichang Yuan <yuanzhichang@hisilicon.com> Signed-off-by: Gabriele Paoloni <gabriele.paoloni@huawei.com> Signed-off-by: Arnd Bergmann <arnd@arndb.de> # earlier draft Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Acked-by: Rob Herring <robh@kernel.org>
(cherry picked from commit 65af618d2c559f8eb19d80d03a23029651a59de4) Signed-off-by: dann frazier <dann.frazier@canonical.com> Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Zhichang Yuan [Wed, 14 Mar 2018 18:15:53 +0000 (02:15 +0800)]
PCI: Apply the new generic I/O management on PCI IO hosts
BugLink: https://bugs.launchpad.net/bugs/1762758
After introducing the new generic I/O space management (Logical PIO), the
original PCI MMIO relevant helpers need to be updated based on the new
interfaces defined in logical PIO.
Adapt the corresponding code to match the changes introduced by logical
PIO.
Tested-by: dann frazier <dann.frazier@canonical.com> Signed-off-by: Zhichang Yuan <yuanzhichang@hisilicon.com> Signed-off-by: Gabriele Paoloni <gabriele.paoloni@huawei.com> Signed-off-by: Arnd Bergmann <arnd@arndb.de> # earlier draft Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
(cherry picked from commit 5745392e0c2b78e0d73203281d5c42cbd6993194) Signed-off-by: dann frazier <dann.frazier@canonical.com> Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Gabriele Paoloni [Wed, 14 Mar 2018 18:15:52 +0000 (02:15 +0800)]
PCI: Add fwnode handler as input param of pci_register_io_range()
BugLink: https://bugs.launchpad.net/bugs/1762758
In preparation for having the PCI MMIO helpers use the new generic I/O
space management (logical PIO) we need to add the fwnode handler as an
extra input parameter.
Changes the signature of pci_register_io_range() and its callers as
needed.
Tested-by: dann frazier <dann.frazier@canonical.com> Signed-off-by: Gabriele Paoloni <gabriele.paoloni@huawei.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Acked-by: Rob Herring <robh@kernel.org>
(cherry picked from commit fcfaab30933bd151bd8cb4dd07b3f11d885bb611) Signed-off-by: dann frazier <dann.frazier@canonical.com> Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Zhichang Yuan [Wed, 14 Mar 2018 18:15:50 +0000 (02:15 +0800)]
lib: Add generic PIO mapping method
BugLink: https://bugs.launchpad.net/bugs/1762758 41f8bba7f555 ("of/pci: Add pci_register_io_range() and
pci_pio_to_address()") added support for PCI I/O space mapped into CPU
physical memory space. With that support, the I/O ranges configured for
PCI/PCIe hosts on some architectures can be mapped to logical PIO and
converted easily between CPU address and the corresponding logical PIO.
Based on this, PCI I/O port space can be accessed via in/out accessors that
use memory read/write.
But on some platforms, there are bus hosts that access I/O port space with
host-local I/O port addresses rather than memory addresses.
Add a more generic I/O mapping method to support those devices. With this
patch, both the CPU addresses and the host-local port can be mapped into
the logical PIO space with different logical/fake PIOs. After this, all
the I/O accesses to either PCI MMIO devices or host-local I/O peripherals
can be unified into the existing I/O accessors defined in asm-generic/io.h
and be redirected to the right device-specific hooks based on the input
logical PIO.
Tested-by: dann frazier <dann.frazier@canonical.com> Signed-off-by: Zhichang Yuan <yuanzhichang@hisilicon.com> Signed-off-by: Gabriele Paoloni <gabriele.paoloni@huawei.com> Signed-off-by: John Garry <john.garry@huawei.com>
[bhelgaas: remove -EFAULT return from logic_pio_register_range() per
https://lkml.kernel.org/r/20180403143909.GA21171@ulmo, fix NULL pointer
checking per https://lkml.kernel.org/r/20180403211505.GA29612@embeddedor.com] Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
(cherry picked from commit 031e3601869c815582ca1d49d1ff73de58e446b0) Signed-off-by: dann frazier <dann.frazier@canonical.com> Signed-off-by: Seth Forshee <seth.forshee@canonical.com>