firefly-linux-kernel-4.4.55.git
7 years agoarm: dts: rk3288-evb: use rockchip_key to replace adc_key
Jianqun Xu [Mon, 27 Mar 2017 00:58:14 +0000 (08:58 +0800)]
arm: dts: rk3288-evb: use rockchip_key to replace adc_key

Change-Id: I46df35c489bf15a159eb64a2d5e3d0b3510f6bef
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
7 years agoInput: add document for rockchip keys
Jianqun Xu [Mon, 27 Mar 2017 01:36:20 +0000 (09:36 +0800)]
Input: add document for rockchip keys

Change-Id: I3f8f4522e6279e3f5faf3f293936c835ce8fc6b7
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
7 years agoARM: rockchip_defconfig: update defconfig
Huang, Tao [Fri, 24 Mar 2017 11:03:00 +0000 (19:03 +0800)]
ARM: rockchip_defconfig: update defconfig

Change-Id: I594981b15c098d78313c4c17572cfbab643dbc9a
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
7 years agovideo/rockchip: rga2: fix compilation warning
Huang, Tao [Sat, 25 Mar 2017 05:09:38 +0000 (13:09 +0800)]
video/rockchip: rga2: fix compilation warning

Change-Id: I92c2034da63cc8db2dac9a55cb654d4af21a7cf8
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
7 years agork: Makefile set default CROSS_COMPILE for arm
Huang, Tao [Sat, 25 Mar 2017 05:10:27 +0000 (13:10 +0800)]
rk: Makefile set default CROSS_COMPILE for arm

Change-Id: I44a0dfe1a1f3bbad6f6c21001d2e4d668ff0db8a
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
7 years agousb: otg: modify default to n for usb2.0
Jianqun Xu [Thu, 23 Mar 2017 10:35:04 +0000 (18:35 +0800)]
usb: otg: modify default to n for usb2.0

Change-Id: I6dc85a9fbf89b35afe67fc119f0d60a130691317
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
7 years agoarm64: dts: rk3399-box: fix dp and hdmi dclk parents
Mark Yao [Fri, 24 Mar 2017 14:26:20 +0000 (22:26 +0800)]
arm64: dts: rk3399-box: fix dp and hdmi dclk parents

Change-Id: Iebe0bfe248bf4ca6f61dafe1eb86a34dc6346e6f
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
7 years agoarm64: dts: rk3368: modify rksdmmc to dwmmc
Jianqun Xu [Fri, 24 Mar 2017 09:25:13 +0000 (17:25 +0800)]
arm64: dts: rk3368: modify rksdmmc to dwmmc

Modify rksdmmc to dwmmc, sync with upstream.

Change-Id: I0aabcf47a5fe1b1f564bde2f719d8c1c48debc90
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
7 years agostaging: ion: dup sg_table when map_dma_buffer
Mark Yao [Fri, 24 Mar 2017 06:31:22 +0000 (14:31 +0800)]
staging: ion: dup sg_table when map_dma_buffer

Change-Id: Ib57df4e7f972a8e46b6c8e8c82e314e04cc3b349
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
7 years agoarm64: dts: rockchip: rk3399: add aclk/hclk_vop init freq
Elaine Zhang [Fri, 24 Mar 2017 07:01:55 +0000 (15:01 +0800)]
arm64: dts: rockchip: rk3399: add aclk/hclk_vop init freq

to fix up the display error when no uboot logo show.

Change-Id: I6227391a3c0d015a5fa6ae916d849659d5957077
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
7 years agovideo/rga: fix rga support flip
Zikim,Wei [Tue, 11 Oct 2016 03:25:21 +0000 (11:25 +0800)]
video/rga: fix rga support flip

Change-Id: Ib5283779e08d1e58ff8a1fb5e3eb662aa8f0d130
Signed-off-by: Zikim,Wei <wzq@rock-chips.com>
(cherry picked from commit 7318eabddc3799460319181f9ffd34f2116a9e46)

7 years agovideo/rockchip: rga: replace system_nrt_wq with system_wq
Jianqun Xu [Wed, 22 Mar 2017 05:06:13 +0000 (13:06 +0800)]
video/rockchip: rga: replace system_nrt_wq with system_wq

Change-Id: Id79ba17575b5844c329391a6e33e0f2f0c4353ff
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
7 years agovideo: rockchip: vpu: alloc & mmap iova inside drm allocator
Jung Zhao [Tue, 21 Mar 2017 01:14:55 +0000 (09:14 +0800)]
video: rockchip: vpu: alloc & mmap iova inside drm allocator

since on 3368 platform, hevc & vpu share the same hardware
resource, but have two independent mmu. and only one mmu can
be attached at the same time. I have to alloc and mmap iova
outside mmu attached status, otherwise it will cause mmu reset
error.

fix bugs:
1. hevc & vpu can work at the same time now. on 3368 platform,
vpu_mmu and hevc_mmu share the same irq with their respective
master device, we can not detach mmu during irq context.
2. fix copy_sgt offset and lenght invalide value

Change-Id: I9d02aa0b85a6d0690832c7869a260953f5a5baab
Signed-off-by: Jung Zhao <jung.zhao@rock-chips.com>
7 years agommc: rm rk_sdmmc.c
Huang, Tao [Thu, 23 Mar 2017 13:35:01 +0000 (21:35 +0800)]
mmc: rm rk_sdmmc.c

Change-Id: Id48880a140a8055d30dafb42ad3e1aef973ae5c6
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
7 years agovideo: rockchip: vpu: add rk3368 support
Jung Zhao [Mon, 20 Mar 2017 03:27:04 +0000 (11:27 +0800)]
video: rockchip: vpu: add rk3368 support

3368 is vpu & hevc combo platform which have a virtual master device
and two sub devcie - vpu_service & hevc_service. There is a flag in
grf, driver need write or erase this flag when switch mode.

since shutdown function only be called on virtual master device, we
need to call into both vpu and hevc device.

Change-Id: I56ad28dbbc7cc380204fb7d0da11d93b5ace9469
Signed-off-by: Jung Zhao <jung.zhao@rock-chips.com>
7 years agoARM64: dts: rk3368-android: enable vpu_combo default
Jung Zhao [Thu, 23 Mar 2017 09:42:46 +0000 (09:42 +0000)]
ARM64: dts: rk3368-android: enable vpu_combo default

Change-Id: I7b130e3d0787c441f862030f8a935063af818e01
Signed-off-by: Jung Zhao <jung.zhao@rock-chips.com>
7 years agoARM64: dts: rk3368: add vpu & hevc node
Jung Zhao [Mon, 20 Mar 2017 03:14:27 +0000 (11:14 +0800)]
ARM64: dts: rk3368: add vpu & hevc node

Change-Id: Iee8fb808ad0c929be8fa5db8164fd6e05321b352
Signed-off-by: Jung Zhao <jung.zhao@rock-chips.com>
7 years agoarm: dts: rk3288-evb: disable uart 1/3/4
Jianqun Xu [Fri, 24 Mar 2017 02:37:46 +0000 (10:37 +0800)]
arm: dts: rk3288-evb: disable uart 1/3/4

Uart3 has been iomux to gpio, for vcc_3g regulator, which is designed
on rk3288 evb main board.

Disable unused uarts to fix gpio request blaim during system booting.

Change-Id: I2eb79ae63a6f226255c12fc3da9ba95ec4219d32
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
7 years agoarm: dts: rk3288-evb: fix regulator 'No configuration' error
Jianqun Xu [Fri, 24 Mar 2017 03:13:17 +0000 (11:13 +0800)]
arm: dts: rk3288-evb: fix regulator 'No configuration' error

SYR827/SYR828 regulators complain "No configuration", which caused by
lacking of regulator-state-mem.

Change-Id: Id113c05abb8fb095bf09979b5eb8ea1c4891037b
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
7 years agostaging: ion: add dma_map_sg/dma_umap_sg to map_dma_buf
Mark Yao [Fri, 26 Jun 2015 00:42:30 +0000 (08:42 +0800)]
staging: ion: add dma_map_sg/dma_umap_sg to map_dma_buf

Change-Id: Ibb1da3afd35a4411f096e8cbd7a17d35fc216cba
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
7 years agoiommu/rockchip: add multi irq support
Jung Zhao [Mon, 20 Mar 2017 03:23:29 +0000 (11:23 +0800)]
iommu/rockchip: add multi irq support

there are two irq in vpu_mmu on 3368 platform.

Change-Id: I81d869c1ee536e31334a401a2ddb0e7f2226d4b2
Signed-off-by: Jung Zhao <jung.zhao@rock-chips.com>
7 years agoarm: dts: rk3288-evb: remove memory node
Jianqun Xu [Wed, 22 Mar 2017 09:16:31 +0000 (17:16 +0800)]
arm: dts: rk3288-evb: remove memory node

Change-Id: I84b2397dea92eb0e7cc926c17515c16f98854ad4
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
7 years agoarm: dts: rk3288-evb: add copyright
Jianqun Xu [Wed, 22 Mar 2017 04:35:59 +0000 (12:35 +0800)]
arm: dts: rk3288-evb: add copyright

Change-Id: I4a68728a38d725a39bfefc51a3b188be94ffe87c
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
7 years agoarm: dts: rk3288-evb: add earlycon to args of cmdline
Jianqun Xu [Wed, 22 Mar 2017 04:34:25 +0000 (12:34 +0800)]
arm: dts: rk3288-evb: add earlycon to args of cmdline

Change-Id: I4a7ce913deac9e88a9660c960c9fed746226db78
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
7 years agodrm/drm-prime: cache dma_buf import context
Mark Yao [Mon, 20 Mar 2017 02:31:02 +0000 (10:31 +0800)]
drm/drm-prime: cache dma_buf import context

Change-Id: Ia39a3d4691f0b545039efb880c999a35886178a0
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
7 years agodma-buf: add release callback support
Mark Yao [Mon, 20 Mar 2017 01:46:47 +0000 (09:46 +0800)]
dma-buf: add release callback support

Change-Id: Ibfb4ffe3d97fae0a27f20032fdfbc3cc561aa375
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
7 years agodrm/rockchip: fixup display reference count
Mark Yao [Wed, 22 Mar 2017 08:40:05 +0000 (16:40 +0800)]
drm/rockchip: fixup display reference count

Change-Id: I9ae0699f26e3971e1f01cf36aa7a2f64dcade8dc
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
7 years agodrm/rockchip: add support for src1
Jacob Chen [Mon, 13 Mar 2017 10:09:56 +0000 (18:09 +0800)]
drm/rockchip: add support for src1

Although libdrm didn't implment src1, we should support it in driver in advance.

Change-Id: I7da051d1376ded63750f3363f9dd37fe6937a81c
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
7 years agoarm64: dts: rk3368-android: remove dumplicated node
Xu Jianqun [Thu, 23 Mar 2017 06:07:58 +0000 (14:07 +0800)]
arm64: dts: rk3368-android: remove dumplicated node

Change-Id: If5675877c29fbc7f29568cfe2c482f98d9d62608
Signed-off-by: Xu Jianqun <jay.xu@rock-chips.com>
7 years agoclk: rockchip: rk3368: Add CLK_IGNORE_UNUSED flag for mipi phy refclk
WeiYong Bi [Tue, 21 Mar 2017 03:41:04 +0000 (11:41 +0800)]
clk: rockchip: rk3368: Add CLK_IGNORE_UNUSED flag for mipi phy refclk

If this flag is not specified, will cause loader display abnormal.

Change-Id: I8ecfc2a6f55c8437e7c30d1cf099ae8cc93a0150
Signed-off-by: WeiYong Bi <bivvy.bi@rock-chips.com>
7 years agodrm/rockchip: vop: report error when check resource error
Mark Yao [Wed, 22 Mar 2017 11:05:00 +0000 (19:05 +0800)]
drm/rockchip: vop: report error when check resource error

Change-Id: If59ea4f7344931795cadcfec1cae4d2ab95ab4c3
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
7 years agoarm64: rockchip_linux_defconfig: enable rtl8188eu
zzc [Wed, 22 Mar 2017 08:08:41 +0000 (16:08 +0800)]
arm64: rockchip_linux_defconfig: enable rtl8188eu

CONFIG_WIFI_LOAD_DRIVER_WHEN_KERNEL_BOOTUP=y
CONFIG_RTL8188EU=y

Change-Id: I5d19e92280f0fb91701a3f2547251069380593ef
Signed-off-by: zzc <zzc@rock-chips.com>
7 years agovideo/rockchip: rga2: enable rga power when read rga version
Mark Yao [Wed, 22 Mar 2017 02:10:32 +0000 (10:10 +0800)]
video/rockchip: rga2: enable rga power when read rga version

Change-Id: Ib2a704b8f75f4b792dc5a70ed58c0b9306c2793c
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
7 years agoarm64: dts: rockchip: rk3399: remove some unnecessary assigned-clocks node
Elaine Zhang [Wed, 22 Mar 2017 02:41:38 +0000 (10:41 +0800)]
arm64: dts: rockchip: rk3399: remove some unnecessary assigned-clocks node

keep aclk_vop hclk_vop freq the same as uboot,
to slove shaking for uboot logo to kernel show.

Change-Id: Id0b86fc583024482f16f40b2f1ec6f9189eac160
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
7 years agoarm64: dts: rk3328-evb: set fiq-debugger signal-irq to 145
Huang, Tao [Wed, 22 Mar 2017 06:31:46 +0000 (14:31 +0800)]
arm64: dts: rk3328-evb: set fiq-debugger signal-irq to 145

Before is 135, which is conflict with arm-pmu irq.

Change-Id: Ib17928f3e3854b8ff1a0571e1639ca362ef2e190
Signed-off-by: Huang, Tao <huangtao@rock-chips.com>
7 years agoahci: Add Device ID for ASMedia 1061R and 1062R
Shawn Lin [Wed, 22 Mar 2017 03:21:35 +0000 (11:21 +0800)]
ahci: Add Device ID for ASMedia 1061R and 1062R

Change-Id: Idecc85eb9af85dbb7e6fcca95aa63762bcf1c2b4
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
7 years agoarm64: dts: rockchip: config pwm polarity on rk3399-mid
Zhou weixin [Mon, 13 Mar 2017 06:39:00 +0000 (14:39 +0800)]
arm64: dts: rockchip: config pwm polarity on rk3399-mid

Change-Id: Icbc406cb737c8ee00fd63b218bde3751611acc19
Signed-off-by: Zhou weixin <zwx@rock-chips.com>
7 years agoarm64: dts: rk3368-android: enable isp
dalon.zhang [Sun, 19 Mar 2017 03:43:55 +0000 (11:43 +0800)]
arm64: dts: rk3368-android: enable isp

Change-Id: Ib658fb798bb24b9686a78b4a2b64ab9fcc1a92f6
Signed-off-by: dalon.zhang <dalon.zhang@rock-chips.com>
7 years agoarm64: dts: rk3368: add isp config
dalon.zhang [Sun, 19 Mar 2017 03:41:06 +0000 (11:41 +0800)]
arm64: dts: rk3368: add isp config

Change-Id: I279afac575d17f534ce028ec13fbec7798b117d9
Signed-off-by: dalon.zhang <dalon.zhang@rock-chips.com>
7 years agodrm: bridge: dw-hdmi: enable 3d mode
algea.cao [Tue, 14 Mar 2017 01:28:46 +0000 (09:28 +0800)]
drm: bridge: dw-hdmi: enable 3d mode

Change-Id: I45c4b0ded4aeaf24122d5cc6eb49b6bc72afc060
Signed-off-by: algea.cao <algea.cao@rock-chips.com>
7 years agocamera: rockchip: camsys v0.0x21.0xa
dalon.zhang [Sun, 19 Mar 2017 03:50:59 +0000 (11:50 +0800)]
camera: rockchip: camsys v0.0x21.0xa

Change-Id: Ic9c5661ba76eaf8aee36e1a1822aa9bcd288e0ac
Signed-off-by: dalon.zhang <dalon.zhang@rock-chips.com>
7 years agoarm64: dts: rockchip: update thermal config for rk3368
Rocky Hao [Tue, 21 Mar 2017 02:54:12 +0000 (10:54 +0800)]
arm64: dts: rockchip: update thermal config for rk3368

add cpus' dynamic power coefficient and update alert temperature

Change-Id: I502e49d52268b63625e01103b50e6c18fb8da8b0
Signed-off-by: Rocky Hao <rocky.hao@rock-chips.com>
7 years agoarm64: dts: rockchip: enable tsadc node for rk3368 p9 board
Zorro Liu [Tue, 21 Mar 2017 08:33:40 +0000 (16:33 +0800)]
arm64: dts: rockchip: enable tsadc node for rk3368 p9 board

Change-Id: I5d8b84248b0c713068143df303427ef31cb78963
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
7 years agoarm64: dts: rk3368-android: debug uart id change to uart3
Jianqun Xu [Tue, 21 Mar 2017 07:10:58 +0000 (15:10 +0800)]
arm64: dts: rk3368-android: debug uart id change to uart3

Change earlycon and console to uart3.

Change-Id: I7c6d7322e077b605b209dce4cf51afb26b9147dc
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
7 years agoarm64: dts: rk3368: hdmi disabled default and remove hdmi node from p9 board
Zorro Liu [Fri, 17 Mar 2017 08:11:56 +0000 (16:11 +0800)]
arm64: dts: rk3368: hdmi disabled default and remove hdmi node from p9 board

Change-Id: I034f119de02a04841b8b70746ef63c73a170988f
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
7 years agoarm64: dts: rockchip: rk3368: xin32k use the fixed clk
Elaine Zhang [Tue, 21 Mar 2017 07:09:17 +0000 (15:09 +0800)]
arm64: dts: rockchip: rk3368: xin32k use the fixed clk

If xin32k use the rk808_clkout1, rk808 init is too late,
xin32k enable count and prepare count is not match with it's child clk.

Change-Id: I314776c5024fdf3373619968582497e0e2d5666f
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
7 years agoarm64: dts: rockchip: enable tsadc node for rk3368 sheep board
Rocky Hao [Fri, 17 Mar 2017 02:27:09 +0000 (10:27 +0800)]
arm64: dts: rockchip: enable tsadc node for rk3368 sheep board

Change-Id: I82c8ef62f5e149d07c76e3a3d971e4222d9b8ecf
Signed-off-by: Rocky Hao <rocky.hao@rock-chips.com>
7 years agoarm64: dts: rockchip: update tsadc node for rk3368
Rocky Hao [Fri, 17 Mar 2017 02:19:05 +0000 (10:19 +0800)]
arm64: dts: rockchip: update tsadc node for rk3368

Change-Id: I0c99dcc6b5515639a496b915832542c3b844f4c8
Signed-off-by: Rocky Hao <rocky.hao@rock-chips.com>
7 years agoarm64: configs: rockchip_defconfig: enable rk3368 thermal
Rocky Hao [Fri, 17 Mar 2017 02:05:44 +0000 (10:05 +0800)]
arm64: configs: rockchip_defconfig: enable rk3368 thermal

Change-Id: Ied2658479d5cccc404623af39da2c6cbe028bae0
Signed-off-by: Rocky Hao <rocky.hao@rock-chips.com>
7 years agothermal: rockchip: add rk3368 support
Rocky Hao [Fri, 17 Mar 2017 01:50:30 +0000 (09:50 +0800)]
thermal: rockchip: add rk3368 support

Change-Id: I970fedca9542c724d777c0bac788300c4fa21303
Signed-off-by: Rocky Hao <rocky.hao@rock-chips.com>
7 years agonvmem: rockchip-efuse: Fix dependencies
Finley Xiao [Mon, 20 Mar 2017 03:18:31 +0000 (11:18 +0800)]
nvmem: rockchip-efuse: Fix dependencies

Not every rockchip efuse depends on ROCKCHIP_SIP, so delete
dependencies in Kconfig. It is more appropriate to add
dependencies for sip_smc_secure_reg_read/write.

Change-Id: I7f551f9fe71ced847657531e3c3cf418766fa3a4
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
7 years agoarm64: dts: rockchip: add RK3399 Firefly Board for Linux Opensource
hero.huang [Wed, 8 Mar 2017 14:41:45 +0000 (22:41 +0800)]
arm64: dts: rockchip: add RK3399 Firefly Board for Linux Opensource

Add Firefly board dts file for Linux Opensource project

Change-Id: Ia525b7ff17f4d74990625e2e02c764996f57e520
Signed-off-by: hero.huang <hero.huang@rock-chips.com>
7 years agoarm64: dts: rk3368-p9: add usb host
Zorro Liu [Fri, 17 Mar 2017 09:29:56 +0000 (17:29 +0800)]
arm64: dts: rk3368-p9: add usb host

Change-Id: Ief0045ac99d3af4db22042d468b67609d6fddf2f
Signed-off-by: Zorro Liu <lyx@rock-chips.com>
7 years agoarm64: dts: rk3368-p9&sheep: disable uart2
Jianqun Xu [Mon, 20 Mar 2017 06:23:19 +0000 (14:23 +0800)]
arm64: dts: rk3368-p9&sheep: disable uart2

Disable uart2 since gpio mux on uart with sdmmc, and rk3368 use
fiq debugger, the uart2 could set to be disabled.

Change-Id: I2d784ccd6cf7526afc0f3bae54914e05febf91a6
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
7 years agoarm64: dts: rk3368-p9: enable sdmmc
Jianqun Xu [Mon, 20 Mar 2017 06:27:45 +0000 (14:27 +0800)]
arm64: dts: rk3368-p9: enable sdmmc

Change-Id: Ib2849e2af020c744e33f0ab1baefbe50cecaa80b
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
7 years agoMerge branch 'linux-linaro-lsk-v4.4' into linux-linaro-lsk-v4.4-android
Alex Shi [Mon, 20 Mar 2017 04:03:10 +0000 (12:03 +0800)]
Merge branch 'linux-linaro-lsk-v4.4' into linux-linaro-lsk-v4.4-android

7 years ago Merge tag 'v4.4.55' into linux-linaro-lsk-v4.4
Alex Shi [Mon, 20 Mar 2017 04:03:07 +0000 (12:03 +0800)]
 Merge tag 'v4.4.55' into linux-linaro-lsk-v4.4

 This is the 4.4.55 stable release

7 years agoFROMLIST: drm/core: Reuse the reserved member in drm_event_vblank for crtc_id.
Maarten Lankhorst [Wed, 10 Aug 2016 10:46:23 +0000 (12:46 +0200)]
FROMLIST: drm/core: Reuse the reserved member in drm_event_vblank for crtc_id.

When doing a atomic commit affecting multiple crtc's, multiple events
are generated. The user_data member does not allow you to distinguish,
because they all have the same pointer.

I've chosen to use crtc_id, because using pipe would create ambiguity
when pipe = 0. A test for != 0 is easier to implement, and crtc_id
will never be 0.

Change-Id: Ie2daba50f711f298872f15498b8d46dedb38c0ff
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Stone <daniels@collabora.com>
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
(am from https://patchwork.kernel.org/patch/9272895/)

7 years agoarm64: dts: rk3368-android: enable rga
Zikim,Wei [Sat, 18 Mar 2017 04:18:09 +0000 (12:18 +0800)]
arm64: dts: rk3368-android: enable rga

Change-Id: I869f4bae54f72dc384c644fe3a0a499db2af3dbf
Signed-off-by: Zikim,Wei <wzq@rock-chips.com>
7 years agoarm64: dts: rk3368-sheep: fix sheep backlight
Mark Yao [Fri, 17 Mar 2017 09:49:00 +0000 (17:49 +0800)]
arm64: dts: rk3368-sheep: fix sheep backlight

Change-Id: Ief2603afd33a65158bf6e86f08e53f96573ce486
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
7 years agovideo: backlight: pwm_bl: fix backlight polarity
Mark Yao [Fri, 17 Mar 2017 09:31:33 +0000 (17:31 +0800)]
video: backlight: pwm_bl: fix backlight polarity

Backlight polarity not works without pwm_adjust_config.

Change-Id: I11e5eefe340f758b6721021f13238306b3721270
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
7 years agoarm64: dts: rk3368: enable uboot loader logo
Mark Yao [Fri, 17 Mar 2017 09:18:40 +0000 (17:18 +0800)]
arm64: dts: rk3368: enable uboot loader logo

Change-Id: I4807ac2aafd9cf319e37eacd184c1eae3ea36242
Signed-off-by: Mark Yao <mark.yao@rock-chips.com>
7 years agoLinux 4.4.55
Greg Kroah-Hartman [Sat, 18 Mar 2017 11:10:23 +0000 (19:10 +0800)]
Linux 4.4.55

7 years agoext4: don't BUG when truncating encrypted inodes on the orphan list
Theodore Ts'o [Tue, 14 Feb 2017 16:31:15 +0000 (11:31 -0500)]
ext4: don't BUG when truncating encrypted inodes on the orphan list

commit 0d06863f903ac5f4f6efb0273079d27de3e53a28 upstream.

Fix a BUG when the kernel tries to mount a file system constructed as
follows:

echo foo > foo.txt
mke2fs -Fq -t ext4 -O encrypt foo.img 100
debugfs -w foo.img << EOF
write foo.txt a
set_inode_field a i_flags 0x80800
set_super_value s_last_orphan 12
quit
EOF

root@kvm-xfstests:~# mount -o loop foo.img /mnt
[  160.238770] ------------[ cut here ]------------
[  160.240106] kernel BUG at /usr/projects/linux/ext4/fs/ext4/inode.c:3874!
[  160.240106] invalid opcode: 0000 [#1] SMP
[  160.240106] Modules linked in:
[  160.240106] CPU: 0 PID: 2547 Comm: mount Tainted: G        W       4.10.0-rc3-00034-gcdd33b941b67 #227
[  160.240106] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.10.1-1 04/01/2014
[  160.240106] task: f4518000 task.stack: f47b6000
[  160.240106] EIP: ext4_block_zero_page_range+0x1a7/0x2b4
[  160.240106] EFLAGS: 00010246 CPU: 0
[  160.240106] EAX: 00000001 EBX: f7be4b50 ECX: f47b7dc0 EDX: 00000007
[  160.240106] ESI: f43b05a8 EDI: f43babec EBP: f47b7dd0 ESP: f47b7dac
[  160.240106]  DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
[  160.240106] CR0: 80050033 CR2: bfd85b08 CR3: 34a00680 CR4: 000006f0
[  160.240106] Call Trace:
[  160.240106]  ext4_truncate+0x1e9/0x3e5
[  160.240106]  ext4_fill_super+0x286f/0x2b1e
[  160.240106]  ? set_blocksize+0x2e/0x7e
[  160.240106]  mount_bdev+0x114/0x15f
[  160.240106]  ext4_mount+0x15/0x17
[  160.240106]  ? ext4_calculate_overhead+0x39d/0x39d
[  160.240106]  mount_fs+0x58/0x115
[  160.240106]  vfs_kern_mount+0x4b/0xae
[  160.240106]  do_mount+0x671/0x8c3
[  160.240106]  ? _copy_from_user+0x70/0x83
[  160.240106]  ? strndup_user+0x31/0x46
[  160.240106]  SyS_mount+0x57/0x7b
[  160.240106]  do_int80_syscall_32+0x4f/0x61
[  160.240106]  entry_INT80_32+0x2f/0x2f
[  160.240106] EIP: 0xb76b919e
[  160.240106] EFLAGS: 00000246 CPU: 0
[  160.240106] EAX: ffffffda EBX: 08053838 ECX: 08052188 EDX: 080537e8
[  160.240106] ESI: c0ed0000 EDI: 00000000 EBP: 080537e8 ESP: bfa13660
[  160.240106]  DS: 007b ES: 007b FS: 0000 GS: 0033 SS: 007b
[  160.240106] Code: 59 8b 00 a8 01 0f 84 09 01 00 00 8b 07 66 25 00 f0 66 3d 00 80 75 61 89 f8 e8 3e e2 ff ff 84 c0 74 56 83 bf 48 02 00 00 00 75 02 <0f> 0b 81 7d e8 00 10 00 00 74 02 0f 0b 8b 43 04 8b 53 08 31 c9
[  160.240106] EIP: ext4_block_zero_page_range+0x1a7/0x2b4 SS:ESP: 0068:f47b7dac
[  160.317241] ---[ end trace d6a773a375c810a5 ]---

The problem is that when the kernel tries to truncate an inode in
ext4_truncate(), it tries to clear any on-disk data beyond i_size.
Without the encryption key, it can't do that, and so it triggers a
BUG.

E2fsck does *not* provide this service, and in practice most file
systems have their orphan list processed by e2fsck, so to avoid
crashing, this patch skips this step if we don't have access to the
encryption key (which is the case when processing the orphan list; in
all other cases, we will have the encryption key, or the kernel
wouldn't have allowed the file to be opened).

An open question is whether the fact that e2fsck isn't clearing the
bytes beyond i_size causing problems --- and if we've lived with it
not doing it for so long, can we drop this from the kernel replay of
the orphan list in all cases (not just when we don't have the key for
encrypted inodes).

Addresses-Google-Bug: #35209576

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agodm: flush queued bios when process blocks to avoid deadlock
Mikulas Patocka [Wed, 15 Feb 2017 16:26:10 +0000 (11:26 -0500)]
dm: flush queued bios when process blocks to avoid deadlock

commit d67a5f4b5947aba4bfe9a80a2b86079c215ca755 upstream.

Commit df2cb6daa4 ("block: Avoid deadlocks with bio allocation by
stacking drivers") created a workqueue for every bio set and code
in bio_alloc_bioset() that tries to resolve some low-memory deadlocks
by redirecting bios queued on current->bio_list to the workqueue if the
system is low on memory.  However other deadlocks (see below **) may
happen, without any low memory condition, because generic_make_request
is queuing bios to current->bio_list (rather than submitting them).

** the related dm-snapshot deadlock is detailed here:
https://www.redhat.com/archives/dm-devel/2016-July/msg00065.html

Fix this deadlock by redirecting any bios on current->bio_list to the
bio_set's rescue workqueue on every schedule() call.  Consequently,
when the process blocks on a mutex, the bios queued on
current->bio_list are dispatched to independent workqueus and they can
complete without waiting for the mutex to be available.

The structure blk_plug contains an entry cb_list and this list can contain
arbitrary callback functions that are called when the process blocks.
To implement this fix DM (ab)uses the onstack plug's cb_list interface
to get its flush_current_bio_list() called at schedule() time.

This fixes the snapshot deadlock - if the map method blocks,
flush_current_bio_list() will be called and it redirects bios waiting
on current->bio_list to appropriate workqueues.

Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1267650
Depends-on: df2cb6daa4 ("block: Avoid deadlocks with bio allocation by stacking drivers")
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agonfit, libnvdimm: fix interleave set cookie calculation
Dan Williams [Wed, 1 Mar 2017 02:32:48 +0000 (18:32 -0800)]
nfit, libnvdimm: fix interleave set cookie calculation

commit 86ef58a4e35e8fa66afb5898cf6dec6a3bb29f67 upstream.

The interleave-set cookie is a sum that sanity checks the composition of
an interleave set has not changed from when the namespace was initially
created.  The checksum is calculated by sorting the DIMMs by their
location in the interleave-set. The comparison for the sort must be
64-bit wide, not byte-by-byte as performed by memcmp() in the broken
case.

Fix the implementation to accept correct cookie values in addition to
the Linux "memcmp" order cookies, but only allow correct cookies to be
generated going forward. It does mean that namespaces created by
third-party-tooling, or created by newer kernels with this fix, will not
validate on older kernels. However, there are a couple mitigating
conditions:

    1/ platforms with namespace-label capable NVDIMMs are not widely
       available.

    2/ interleave-sets with a single-dimm are by definition not affected
       (nothing to sort). This covers the QEMU-KVM NVDIMM emulation case.

The cookie stored in the namespace label will be fixed by any write the
namespace label, the most straightforward way to achieve this is to
write to the "alt_name" attribute of a namespace in sysfs.

Fixes: eaf961536e16 ("libnvdimm, nfit: add interleave-set state-tracking infrastructure")
Reported-by: Nicholas Moulin <nicholas.w.moulin@linux.intel.com>
Tested-by: Nicholas Moulin <nicholas.w.moulin@linux.intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agos390/kdump: Use "LINUX" ELF note name instead of "CORE"
Michael Holzheu [Tue, 7 Feb 2017 17:09:14 +0000 (18:09 +0100)]
s390/kdump: Use "LINUX" ELF note name instead of "CORE"

commit a4a81d8eebdc1d209d034f62a082a5131e4242b5 upstream.

In binutils/libbfd (bfd/elf.c) it is enforced that all s390 specific ELF
notes like e.g. NT_S390_PREFIX or NT_S390_CTRS have "LINUX" specified
as note name. Otherwise the notes are ignored.

For /proc/vmcore we currently use "CORE" for these notes.

Up to now this has not been a real problem because the dump analysis tool
"crash" does not check the note name. But it will break all programs that
use libbfd for processing ELF notes.

So fix this and use "LINUX" for all s390 specific notes to comply with
libbfd.

Reported-by: Philipp Rudo <prudo@linux.vnet.ibm.com>
Reviewed-by: Philipp Rudo <prudo@linux.vnet.ibm.com>
Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agoKVM: s390: Fix guest migration for huge guests resulting in panic
Janosch Frank [Thu, 2 Mar 2017 14:23:42 +0000 (15:23 +0100)]
KVM: s390: Fix guest migration for huge guests resulting in panic

commit 2e4d88009f57057df7672fa69a32b5224af54d37 upstream.

While we can technically not run huge page guests right now, we can
setup a guest with huge pages. Trying to migrate it will trigger a
VM_BUG_ON and, if the kernel is not configured to panic on a BUG, it
will happily try to work on non-existing page table entries.

With this patch, we always return "dirty" if we encounter a large page
when migrating. This at least fixes the immediate problem until we
have proper handling for both kind of pages.

Fixes: 15f36eb ("KVM: s390: Add proper dirty bitmap support to S390 kvm.")
Cc: <stable@vger.kernel.org> # 3.16+
Signed-off-by: Janosch Frank <frankja@linux.vnet.ibm.com>
Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agomvsas: fix misleading indentation
Luis de Bethencourt [Mon, 30 Nov 2015 14:32:17 +0000 (14:32 +0000)]
mvsas: fix misleading indentation

commit 7789cd39274c51bf475411fe22a8ee7255082809 upstream.

Fix a smatch warning:
drivers/scsi/mvsas/mv_sas.c:740 mvs_task_prep() warn: curly braces intended?

The code is correct, the indention is misleading. When the device is not
ready we want to return SAS_PHY_DOWN. But current indentation makes it
look like we only do so in the else branch of if (mvi_dev).

Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agoserial: samsung: Continue to work if DMA request fails
Krzysztof Kozlowski [Sat, 25 Feb 2017 16:36:44 +0000 (18:36 +0200)]
serial: samsung: Continue to work if DMA request fails

commit f98c7bce570bdbe344b74ff5daa7dfeef3f22929 upstream.

If DMA is not available (even when configured in DeviceTree), the driver
will fail the startup procedure thus making serial console not
available.

For example this causes boot failure on QEMU ARMv7 (Exynos4210, SMDKC210):
    [ Â  Â 1.302575] OF: amba_device_add() failed (-19) for /amba/pdma@12680000
    ...
    [ Â  11.435732] samsung-uart 13800000.serial: DMA request failed
    [ Â  72.963893] samsung-uart 13800000.serial: DMA request failed
    [ Â  73.143361] Kernel panic - not syncing: Attempted to kill init! exitcode=0x00000000

DMA is not necessary for serial to work, so continue with UART startup
after emitting a warning.

Fixes: 62c37eedb74c ("serial: samsung: add dma reqest/release functions")
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agoUSB: serial: io_ti: fix information leak in completion handler
Johan Hovold [Mon, 6 Mar 2017 16:36:40 +0000 (17:36 +0100)]
USB: serial: io_ti: fix information leak in completion handler

commit 654b404f2a222f918af9b0cd18ad469d0c941a8e upstream.

Add missing sanity check to the bulk-in completion handler to avoid an
integer underflow that can be triggered by a malicious device.

This avoids leaking 128 kB of memory content from after the URB transfer
buffer to user space.

Fixes: 8c209e6782ca ("USB: make actual_length in struct urb field u32")
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agoUSB: serial: io_ti: fix NULL-deref in interrupt callback
Johan Hovold [Mon, 6 Mar 2017 16:36:37 +0000 (17:36 +0100)]
USB: serial: io_ti: fix NULL-deref in interrupt callback

commit 0b1d250afb8eb9d65afb568bac9b9f9253a82b49 upstream.

Fix a NULL-pointer dereference in the interrupt callback should a
malicious device send data containing a bad port number by adding the
missing sanity check.

Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agoUSB: iowarrior: fix NULL-deref in write
Johan Hovold [Tue, 7 Mar 2017 15:11:04 +0000 (16:11 +0100)]
USB: iowarrior: fix NULL-deref in write

commit de46e56653de7b3b54baa625bd582635008b8d05 upstream.

Make sure to verify that we have the required interrupt-out endpoint for
IOWarrior56 devices to avoid dereferencing a NULL-pointer in write
should a malicious device lack such an endpoint.

Fixes: 946b960d13c1 ("USB: add driver for iowarrior devices.")
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agoUSB: iowarrior: fix NULL-deref at probe
Johan Hovold [Tue, 7 Mar 2017 15:11:03 +0000 (16:11 +0100)]
USB: iowarrior: fix NULL-deref at probe

commit b7321e81fc369abe353cf094d4f0dc2fe11ab95f upstream.

Make sure to check for the required interrupt-in endpoint to avoid
dereferencing a NULL-pointer should a malicious device lack such an
endpoint.

Note that a fairly recent change purported to fix this issue, but added
an insufficient test on the number of endpoints only, a test which can
now be removed.

Fixes: 4ec0ef3a8212 ("USB: iowarrior: fix oops with malicious USB descriptors")
Fixes: 946b960d13c1 ("USB: add driver for iowarrior devices.")
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agoUSB: serial: omninet: fix reference leaks at open
Johan Hovold [Mon, 6 Mar 2017 16:36:38 +0000 (17:36 +0100)]
USB: serial: omninet: fix reference leaks at open

commit 30572418b445d85fcfe6c8fe84c947d2606767d8 upstream.

This driver needlessly took another reference to the tty on open, a
reference which was then never released on close. This lead to not just
a leak of the tty, but also a driver reference leak that prevented the
driver from being unloaded after a port had once been opened.

Fixes: 4a90f09b20f4 ("tty: usb-serial krefs")
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agoUSB: serial: safe_serial: fix information leak in completion handler
Johan Hovold [Mon, 6 Mar 2017 16:36:41 +0000 (17:36 +0100)]
USB: serial: safe_serial: fix information leak in completion handler

commit 8c76d7cd520ebffc1ea9ea0850d87a224a50c7f2 upstream.

Add missing sanity check to the bulk-in completion handler to avoid an
integer underflow that could be triggered by a malicious device.

This avoids leaking up to 56 bytes from after the URB transfer buffer to
user space.

Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agousb: host: xhci-plat: Fix timeout on removal of hot pluggable xhci controllers
Guenter Roeck [Thu, 9 Mar 2017 13:39:37 +0000 (15:39 +0200)]
usb: host: xhci-plat: Fix timeout on removal of hot pluggable xhci controllers

commit dcc7620cad5ad1326a78f4031a7bf4f0e5b42984 upstream.

Upstream commit 98d74f9ceaef ("xhci: fix 10 second timeout on removal of
PCI hotpluggable xhci controllers") fixes a problem with hot pluggable PCI
xhci controllers which can result in excessive timeouts, to the point where
the system reports a deadlock.

The same problem is seen with hot pluggable xhci controllers using the
xhci-plat driver, such as the driver used for Type-C ports on rk3399.
Similar to hot-pluggable PCI controllers, the driver for this chip
removes the xhci controller from the system when the Type-C cable is
disconnected.

The solution for PCI devices works just as well for non-PCI devices
and avoids the problem.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agousb: host: xhci-dbg: HCIVERSION should be a binary number
Peter Chen [Thu, 9 Mar 2017 13:39:36 +0000 (15:39 +0200)]
usb: host: xhci-dbg: HCIVERSION should be a binary number

commit f95e60a7dbecd2de816bb3ad517b3d4fbc20b507 upstream.

According to xHCI spec, HCIVERSION containing a BCD encoding
of the xHCI specification revision number, 0100h corresponds
to xHCI version 1.0. Change "100" as "0x100".

Cc: Lu Baolu <baolu.lu@linux.intel.com>
Fixes: 04abb6de2825 ("xhci: Read and parse new xhci 1.1 capability register")
Signed-off-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agousb: gadget: function: f_fs: pass companion descriptor along
Felipe Balbi [Tue, 31 Jan 2017 12:54:45 +0000 (14:54 +0200)]
usb: gadget: function: f_fs: pass companion descriptor along

commit 2bfa0719ac2a9b2f3c91345873d3cdebd0296ba9 upstream.

If we're dealing with SuperSpeed endpoints, we need
to make sure to pass along the companion descriptor
and initialize fields needed by the Gadget
API. Eventually, f_fs.c should be converted to use
config_ep_by_speed() like all other functions,
though.

Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agousb: dwc3: gadget: make Set Endpoint Configuration macros safe
Felipe Balbi [Tue, 31 Jan 2017 11:24:54 +0000 (13:24 +0200)]
usb: dwc3: gadget: make Set Endpoint Configuration macros safe

commit 7369090a9fb57c3fc705ce355d2e4523a5a24716 upstream.

Some gadget drivers are bad, bad boys. We notice
that ADB was passing bad Burst Size which caused top
bits of param0 to be overwritten which confused DWC3
when running this command.

In order to avoid future issues, we're going to make
sure values passed by macros are always safe for the
controller. Note that ADB still needs a fix to *not*
pass bad values.

Reported-by: Mohamed Abbas <mohamed.abbas@intel.com>
Sugested-by: Adam Andruszak <adam.andruszak@intel.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agousb: gadget: dummy_hcd: clear usb_gadget region before registration
Peter Chen [Tue, 28 Feb 2017 06:25:45 +0000 (14:25 +0800)]
usb: gadget: dummy_hcd: clear usb_gadget region before registration

commit 5bbc852676ae08e818241cf66a3ffe4be44225c4 upstream.

When the user does device unbind and rebind test, the kernel will
show below dump due to usb_gadget memory region is dirty after unbind.
Clear usb_gadget region for every new probe.

root@imx6qdlsolo:/sys/bus/platform/drivers/dummy_udc# echo dummy_udc.0 > bind
[  102.523312] kobject (eddd78b0): tried to init an initialized object, something is seriously wrong.
[  102.532447] CPU: 0 PID: 734 Comm: sh Not tainted 4.10.0-rc7-00872-g1b2b8e9 #1298
[  102.539866] Hardware name: Freescale i.MX6 SoloX (Device Tree)
[  102.545717] Backtrace:
[  102.548225] [<c010d090>] (dump_backtrace) from [<c010d338>] (show_stack+0x18/0x1c)
[  102.555822]  r7:ede34000 r6:60010013 r5:00000000 r4:c0f29418
[  102.561512] [<c010d320>] (show_stack) from [<c040c2a4>] (dump_stack+0xb4/0xe8)
[  102.568764] [<c040c1f0>] (dump_stack) from [<c040e6d4>] (kobject_init+0x80/0x9c)
[  102.576187]  r10:0000001f r9:eddd7000 r8:eeaf8c10 r7:eddd78a8 r6:c177891c r5:c0f3b060
[  102.584036]  r4:eddd78b0 r3:00000000
[  102.587641] [<c040e654>] (kobject_init) from [<c05359a4>] (device_initialize+0x28/0xf8)
[  102.595665]  r5:eebc4800 r4:eddd78a8
[  102.599268] [<c053597c>] (device_initialize) from [<c05382ac>] (device_register+0x14/0x20)
[  102.607556]  r7:eddd78a8 r6:00000000 r5:eebc4800 r4:eddd78a8
[  102.613256] [<c0538298>] (device_register) from [<c0668ef4>] (usb_add_gadget_udc_release+0x8c/0x1ec)
[  102.622410]  r5:eebc4800 r4:eddd7860
[  102.626015] [<c0668e68>] (usb_add_gadget_udc_release) from [<c0669068>] (usb_add_gadget_udc+0x14/0x18)
[  102.635351]  r10:0000001f r9:eddd7000 r8:eddd788c r7:bf003770 r6:eddd77f8 r5:eddd7818
[  102.643198]  r4:eddd785c r3:eddd7b24
[  102.646834] [<c0669054>] (usb_add_gadget_udc) from [<bf003428>] (dummy_udc_probe+0x170/0x1c4 [dummy_hcd])
[  102.656458] [<bf0032b8>] (dummy_udc_probe [dummy_hcd]) from [<c053d114>] (platform_drv_probe+0x54/0xb8)
[  102.665881]  r10:00000008 r9:c1778960 r8:bf004128 r7:fffffdfb r6:bf004128 r5:eeaf8c10
[  102.673727]  r4:eeaf8c10
[  102.676293] [<c053d0c0>] (platform_drv_probe) from [<c053b160>] (driver_probe_device+0x264/0x474)
[  102.685186]  r7:00000000 r6:00000000 r5:c1778960 r4:eeaf8c10
[  102.690876] [<c053aefc>] (driver_probe_device) from [<c05397c4>] (bind_store+0xb8/0x14c)
[  102.698994]  r10:eeb3bb4c r9:ede34000 r8:0000000c r7:eeaf8c44 r6:bf004128 r5:c0f3b668
[  102.706840]  r4:eeaf8c10
[  102.709402] [<c053970c>] (bind_store) from [<c0538ca8>] (drv_attr_store+0x28/0x34)
[  102.716998]  r9:ede34000 r8:00000000 r7:ee3863c0 r6:ee3863c0 r5:c0538c80 r4:c053970c
[  102.724776] [<c0538c80>] (drv_attr_store) from [<c029c930>] (sysfs_kf_write+0x50/0x54)
[  102.732711]  r5:c0538c80 r4:0000000c
[  102.736313] [<c029c8e0>] (sysfs_kf_write) from [<c029be84>] (kernfs_fop_write+0x100/0x214)
[  102.744599]  r7:ee3863c0 r6:eeb3bb40 r5:00000000 r4:00000000
[  102.750287] [<c029bd84>] (kernfs_fop_write) from [<c0222dd8>] (__vfs_write+0x34/0x120)
[  102.758231]  r10:00000000 r9:ede34000 r8:c0108bc4 r7:0000000c r6:ede35f80 r5:c029bd84
[  102.766077]  r4:ee223780
[  102.768638] [<c0222da4>] (__vfs_write) from [<c0224678>] (vfs_write+0xa8/0x170)
[  102.775974]  r9:ede34000 r8:c0108bc4 r7:ede35f80 r6:01861cb0 r5:ee223780 r4:0000000c
[  102.783743] [<c02245d0>] (vfs_write) from [<c0225498>] (SyS_write+0x4c/0xa8)
[  102.790818]  r9:ede34000 r8:c0108bc4 r7:0000000c r6:01861cb0 r5:ee223780 r4:ee223780
[  102.798595] [<c022544c>] (SyS_write) from [<c0108a20>] (ret_fast_syscall+0x0/0x1c)
[  102.806188]  r7:00000004 r6:b6e83d58 r5:01861cb0 r4:0000000c

Fixes: 90fccb529d24 ("usb: gadget: Gadget directory cleanup - group UDC drivers")
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
Tested-by: Xiaolong Ye <xiaolong.ye@intel.com>
Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agopowerpc: Emulation support for load/store instructions on LE
Ravi Bangoria [Tue, 14 Feb 2017 09:16:42 +0000 (14:46 +0530)]
powerpc: Emulation support for load/store instructions on LE

commit e148bd17f48bd17fca2f4f089ec879fa6e47e34c upstream.

emulate_step() uses a number of underlying kernel functions that were
initially not enabled for LE. This has been rectified since. So, fix
emulate_step() for LE for the corresponding instructions.

Reported-by: Anton Blanchard <anton@samba.org>
Signed-off-by: Ravi Bangoria <ravi.bangoria@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agotracing: Add #undef to fix compile error
Rik van Riel [Thu, 29 Sep 2016 02:55:54 +0000 (22:55 -0400)]
tracing: Add #undef to fix compile error

commit bf7165cfa23695c51998231c4efa080fe1d3548d upstream.

There are several trace include files that define TRACE_INCLUDE_FILE.

Include several of them in the same .c file (as I currently have in
some code I am working on), and the compile will blow up with a
"warning: "TRACE_INCLUDE_FILE" redefined #define TRACE_INCLUDE_FILE syscalls"

Every other include file in include/trace/events/ avoids that issue
by having a #undef TRACE_INCLUDE_FILE before the #define; syscalls.h
should have one, too.

Link: http://lkml.kernel.org/r/20160928225554.13bd7ac6@annuminas.surriel.com
Fixes: b8007ef74222 ("tracing: Separate raw syscall from syscall tracer")
Signed-off-by: Rik van Riel <riel@redhat.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agoMIPS: Netlogic: Fix CP0_EBASE redefinition warnings
James Hogan [Thu, 28 Apr 2016 16:06:16 +0000 (17:06 +0100)]
MIPS: Netlogic: Fix CP0_EBASE redefinition warnings

commit 32eb6e8bee147b45e5e59230630d59541ccbb6e5 upstream.

A couple of netlogic assembly files define CP0_EBASE to $15, the same as
CP0_PRID in mipsregs.h, and use it for accessing both CP0_PRId and
CP0_EBase registers. However commit 609cf6f2291a ("MIPS: CPS: Early
debug using an ns16550-compatible UART") added a different definition of
CP0_EBASE to mipsregs.h, which included a register select of 1. This
causes harmless build warnings like the following:

  arch/mips/netlogic/common/reset.S:53:0: warning: "CP0_EBASE" redefined
  #define CP0_EBASE $15
  ^
  In file included from arch/mips/netlogic/common/reset.S:41:0:
  ./arch/mips/include/asm/mipsregs.h:63:0: note: this is the location of the previous definition
  #define CP0_EBASE $15, 1
  ^

Update the code to use the definitions from mipsregs.h for accessing
both registers.

Fixes: 609cf6f2291a ("MIPS: CPS: Early debug using an ns16550-compatible UART")
Signed-off-by: James Hogan <james.hogan@imgtec.com>
Acked-by: Jayachandran C <jchandra@broadcom.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/13183/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agoMIPS: DEC: Avoid la pseudo-instruction in delay slots
Ralf Baechle [Tue, 20 Sep 2016 12:33:01 +0000 (14:33 +0200)]
MIPS: DEC: Avoid la pseudo-instruction in delay slots

commit 3021773c7c3e75e20b693931a19362681e744ea9 upstream.

When expanding the la or dla pseudo-instruction in a delay slot the GNU
assembler will complain should the pseudo-instruction expand to multiple
actual instructions, since only the first of them will be in the delay
slot leading to the pseudo-instruction being only partially executed if
the branch is taken. Use of PTR_LA in the dec int-handler.S leads to
such warnings:

  arch/mips/dec/int-handler.S: Assembler messages:
  arch/mips/dec/int-handler.S:149: Warning: macro instruction expanded into multiple instructions in a branch delay slot
  arch/mips/dec/int-handler.S:198: Warning: macro instruction expanded into multiple instructions in a branch delay slot

Avoid this by open coding the PTR_LA macros.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agomm: memcontrol: avoid unused function warning
Arnd Bergmann [Thu, 25 Aug 2016 22:17:08 +0000 (15:17 -0700)]
mm: memcontrol: avoid unused function warning

commit 358c07fcc3b60ab08d77f1684de8bd81bcf49a1a upstream.

A bugfix in v4.8-rc2 introduced a harmless warning when
CONFIG_MEMCG_SWAP is disabled but CONFIG_MEMCG is enabled:

  mm/memcontrol.c:4085:27: error: 'mem_cgroup_id_get_online' defined but not used [-Werror=unused-function]
   static struct mem_cgroup *mem_cgroup_id_get_online(struct mem_cgroup *memcg)

This moves the function inside of the #ifdef block that hides the
calling function, to avoid the warning.

Fixes: 1f47b61fb407 ("mm: memcontrol: fix swap counter leak on swapout from offline cgroup")
Link: http://lkml.kernel.org/r/20160824113733.2776701-1-arnd@arndb.de
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Michal Hocko <mhocko@suse.com>
Acked-by: Vladimir Davydov <vdavydov@virtuozzo.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agocpmac: remove hopeless #warning
Arnd Bergmann [Mon, 16 Jan 2017 13:20:54 +0000 (14:20 +0100)]
cpmac: remove hopeless #warning

commit d43e6fb4ac4abfe4ef7c102833ed02330ad701e0 upstream.

The #warning was present 10 years ago when the driver first got merged.
As the platform is rather obsolete by now, it seems very unlikely that
the warning will cause anyone to fix the code properly.

kernelci.org reports the warning for every build in the meantime, so
I think it's better to just turn it into a code comment to reduce
noise.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agoMIPS: ralink: Remove unused rt*_wdt_reset functions
Arnd Bergmann [Tue, 17 Jan 2017 15:18:43 +0000 (16:18 +0100)]
MIPS: ralink: Remove unused rt*_wdt_reset functions

commit 886f9c69fc68f56ddea34d3de51ac1fc2ac8dfbc upstream.

All pointers to these functions were removed, so now they produce
warnings:

arch/mips/ralink/rt305x.c:92:13: error: 'rt305x_wdt_reset' defined but not used [-Werror=unused-function]

This removes the functions. If we need them again, the patch can be
reverted later.

Fixes: f576fb6a0700 ("MIPS: ralink: cleanup the soc specific pinmux data")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: John Crispin <john@phrozen.org>
Cc: Colin Ian King <colin.king@canonical.com>
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/15044/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agoMIPS: ralink: Cosmetic change to prom_init().
John Crispin [Tue, 20 Dec 2016 18:12:46 +0000 (19:12 +0100)]
MIPS: ralink: Cosmetic change to prom_init().

commit 9c48568b3692f1a56cbf1935e4eea835e6b185b1 upstream.

Over the years the code has been changed various times leading to
argc/argv being defined in a different function to where we actually
use the variables. Clean this up by moving them to prom_init_cmdline().

Signed-off-by: John Crispin <john@phrozen.org>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/14902/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agomtd: pmcmsp: use kstrndup instead of kmalloc+strncpy
Arnd Bergmann [Fri, 3 Feb 2017 09:49:17 +0000 (10:49 +0100)]
mtd: pmcmsp: use kstrndup instead of kmalloc+strncpy

commit 906b268477bc03daaa04f739844c120fe4dbc991 upstream.

kernelci.org reports a warning for this driver, as it copies a local
variable into a 'const char *' string:

    drivers/mtd/maps/pmcmsp-flash.c:149:30: warning: passing argument 1 of 'strncpy' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]

Using kstrndup() simplifies the code and avoids the warning.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Marek Vasut <marek.vasut@gmail.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agoMIPS: Update lemote2f_defconfig for CPU_FREQ_STAT change
Arnd Bergmann [Wed, 11 Jan 2017 14:29:49 +0000 (15:29 +0100)]
MIPS: Update lemote2f_defconfig for CPU_FREQ_STAT change

commit b3f6046186ef45acfeebc5a59c9fb45cefc685e7 upstream.

Since linux-4.8, CPU_FREQ_STAT is a bool symbol, causing a warning in
kernelci.org:

arch/mips/configs/lemote2f_defconfig:42:warning: symbol value 'm' invalid for CPU_FREQ_STAT

This updates the defconfig to have the feature built-in.

Fixes: 1aefc75b2449 ("cpufreq: stats: Make the stats code non-modular")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/15000/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agoMIPS: ip22: Fix ip28 build for modern gcc
Arnd Bergmann [Tue, 17 Jan 2017 15:18:46 +0000 (16:18 +0100)]
MIPS: ip22: Fix ip28 build for modern gcc

commit 23ca9b522383d3b9b7991d8586db30118992af4a upstream.

kernelci reports a failure of the ip28_defconfig build after upgrading its
gcc version:

arch/mips/sgi-ip22/Platform:29: *** gcc doesn't support needed option -mr10k-cache-barrier=store.  Stop.

The problem apparently is that the -mr10k-cache-barrier=store option is now
rejected for CPUs other than r10k. Explicitly including the CPU in the
check fixes this and is safe because both options were introduced in
gcc-4.4.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/15049/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agoMIPS: Update ip27_defconfig for SCSI_DH change
Arnd Bergmann [Wed, 11 Jan 2017 14:29:50 +0000 (15:29 +0100)]
MIPS: Update ip27_defconfig for SCSI_DH change

commit ea58fca1842a5dc410cae4167b01643db971a4e2 upstream.

Since linux-4.3, SCSI_DH is a bool symbol, causing a warning in
kernelci.org:

arch/mips/configs/ip27_defconfig:136:warning: symbol value 'm' invalid for SCSI_DH

This updates the defconfig to have the feature built-in.

Fixes: 086b91d052eb ("scsi_dh: integrate into the core SCSI code")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/15001/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agoMIPS: ip27: Disable qlge driver in defconfig
Arnd Bergmann [Fri, 3 Feb 2017 16:43:50 +0000 (17:43 +0100)]
MIPS: ip27: Disable qlge driver in defconfig

commit b617649468390713db1515ea79fc772d2eb897a8 upstream.

One of the last remaining failures in kernelci.org is for a gcc bug:

drivers/net/ethernet/qlogic/qlge/qlge_main.c:4819:1: error: insn does not satisfy its constraints:
drivers/net/ethernet/qlogic/qlge/qlge_main.c:4819:1: internal compiler error: in extract_constrain_insn, at recog.c:2190

This is apparently broken in gcc-6 but fixed in gcc-7, and I cannot
reproduce the problem here. However, it is clear that ip27_defconfig
does not actually need this driver as the platform has only PCI-X but
not PCIe, and the qlge adapter in turn is PCIe-only.

The driver was originally enabled in 2010 along with lots of other
drivers.

Fixes: 59d302b342e5 ("MIPS: IP27: Make defconfig useful again.")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/15197/
Signed-off-by: James Hogan <james.hogan@imgtec.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agoMIPS: Update defconfigs for NF_CT_PROTO_DCCP/UDPLITE change
Arnd Bergmann [Wed, 11 Jan 2017 14:29:48 +0000 (15:29 +0100)]
MIPS: Update defconfigs for NF_CT_PROTO_DCCP/UDPLITE change

commit 9ddc16ad8e0bc7742fc96d5aaabc5b8698512cd1 upstream.

In linux-4.10-rc, NF_CT_PROTO_UDPLITE and NF_CT_PROTO_DCCP are bool
symbols instead of tristate, and kernelci.org reports a bunch of
warnings for this, like:

arch/mips/configs/malta_kvm_guest_defconfig:63:warning: symbol value 'm' invalid for NF_CT_PROTO_UDPLITE
arch/mips/configs/malta_defconfig:62:warning: symbol value 'm' invalid for NF_CT_PROTO_DCCP
arch/mips/configs/malta_defconfig:63:warning: symbol value 'm' invalid for NF_CT_PROTO_UDPLITE
arch/mips/configs/ip22_defconfig:70:warning: symbol value 'm' invalid for NF_CT_PROTO_DCCP
arch/mips/configs/ip22_defconfig:71:warning: symbol value 'm' invalid for NF_CT_PROTO_UDPLITE

This changes all the MIPS defconfigs with these symbols to have them
built-in.

Fixes: 9b91c96c5d1f ("netfilter: conntrack: built-in support for UDPlite")
Fixes: c51d39010a1b ("netfilter: conntrack: built-in support for DCCP")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/14999/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agocrypto: improve gcc optimization flags for serpent and wp512
Arnd Bergmann [Fri, 3 Feb 2017 22:33:23 +0000 (23:33 +0100)]
crypto: improve gcc optimization flags for serpent and wp512

commit 7d6e9105026788c497f0ab32fa16c82f4ab5ff61 upstream.

An ancient gcc bug (first reported in 2003) has apparently resurfaced
on MIPS, where kernelci.org reports an overly large stack frame in the
whirlpool hash algorithm:

crypto/wp512.c:987:1: warning: the frame size of 1112 bytes is larger than 1024 bytes [-Wframe-larger-than=]

With some testing in different configurations, I'm seeing large
variations in stack frames size up to 1500 bytes for what should have
around 300 bytes at most. I also checked the reference implementation,
which is essentially the same code but also comes with some test and
benchmarking infrastructure.

It seems that recent compiler versions on at least arm, arm64 and powerpc
have a partial fix for this problem, but enabling "-fsched-pressure", but
even with that fix they suffer from the issue to a certain degree. Some
testing on arm64 shows that the time needed to hash a given amount of
data is roughly proportional to the stack frame size here, which makes
sense given that the wp512 implementation is doing lots of loads for
table lookups, and the problem with the overly large stack is a result
of doing a lot more loads and stores for spilled registers (as seen from
inspecting the object code).

Disabling -fschedule-insns consistently fixes the problem for wp512,
in my collection of cross-compilers, the results are consistently better
or identical when comparing the stack sizes in this function, though
some architectures (notable x86) have schedule-insns disabled by
default.

The four columns are:
default: -O2
press:  -O2 -fsched-pressure
nopress: -O2 -fschedule-insns -fno-sched-pressure
nosched: -O2 -no-schedule-insns (disables sched-pressure)

default press nopress nosched
alpha-linux-gcc-4.9.3 1136 848 1136 176
am33_2.0-linux-gcc-4.9.3 2100 2076 2100 2104
arm-linux-gnueabi-gcc-4.9.3 848 848 1048 352
cris-linux-gcc-4.9.3 272 272 272 272
frv-linux-gcc-4.9.3 1128 1000 1128 280
hppa64-linux-gcc-4.9.3 1128 336 1128 184
hppa-linux-gcc-4.9.3 644 308 644 276
i386-linux-gcc-4.9.3 352 352 352 352
m32r-linux-gcc-4.9.3 720 656 720 268
microblaze-linux-gcc-4.9.3 1108 604 1108 256
mips64-linux-gcc-4.9.3 1328 592 1328 208
mips-linux-gcc-4.9.3 1096 624 1096 240
powerpc64-linux-gcc-4.9.3 1088 432 1088 160
powerpc-linux-gcc-4.9.3 1080 584 1080 224
s390-linux-gcc-4.9.3 456 456 624 360
sh3-linux-gcc-4.9.3 292 292 292 292
sparc64-linux-gcc-4.9.3 992 240 992 208
sparc-linux-gcc-4.9.3 680 592 680 312
x86_64-linux-gcc-4.9.3 224 240 272 224
xtensa-linux-gcc-4.9.3 1152 704 1152 304

aarch64-linux-gcc-7.0.0 224 224 1104 208
arm-linux-gnueabi-gcc-7.0.1 824 824 1048 352
mips-linux-gcc-7.0.0 1120 648 1120 272
x86_64-linux-gcc-7.0.1 240 240 304 240

arm-linux-gnueabi-gcc-4.4.7 840 392
arm-linux-gnueabi-gcc-4.5.4 784 728 784 320
arm-linux-gnueabi-gcc-4.6.4 736 728 736 304
arm-linux-gnueabi-gcc-4.7.4 944 784 944 352
arm-linux-gnueabi-gcc-4.8.5 464 464 760 352
arm-linux-gnueabi-gcc-4.9.3 848 848 1048 352
arm-linux-gnueabi-gcc-5.3.1 824 824 1064 336
arm-linux-gnueabi-gcc-6.1.1 808 808 1056 344
arm-linux-gnueabi-gcc-7.0.1 824 824 1048 352

Trying the same test for serpent-generic, the picture is a bit different,
and while -fno-schedule-insns is generally better here than the default,
-fsched-pressure wins overall, so I picked that instead.

default press nopress nosched
alpha-linux-gcc-4.9.3 1392 864 1392 960
am33_2.0-linux-gcc-4.9.3 536 524 536 528
arm-linux-gnueabi-gcc-4.9.3 552 552 776 536
cris-linux-gcc-4.9.3 528 528 528 528
frv-linux-gcc-4.9.3 536 400 536 504
hppa64-linux-gcc-4.9.3 524 208 524 480
hppa-linux-gcc-4.9.3 768 472 768 508
i386-linux-gcc-4.9.3 564 564 564 564
m32r-linux-gcc-4.9.3 712 576 712 532
microblaze-linux-gcc-4.9.3 724 392 724 512
mips64-linux-gcc-4.9.3 720 384 720 496
mips-linux-gcc-4.9.3 728 384 728 496
powerpc64-linux-gcc-4.9.3 704 304 704 480
powerpc-linux-gcc-4.9.3 704 296 704 480
s390-linux-gcc-4.9.3 560 560 592 536
sh3-linux-gcc-4.9.3 540 540 540 540
sparc64-linux-gcc-4.9.3 544 352 544 496
sparc-linux-gcc-4.9.3 544 344 544 496
x86_64-linux-gcc-4.9.3 528 536 576 528
xtensa-linux-gcc-4.9.3 752 544 752 544

aarch64-linux-gcc-7.0.0 432 432 656 480
arm-linux-gnueabi-gcc-7.0.1 616 616 808 536
mips-linux-gcc-7.0.0 720 464 720 488
x86_64-linux-gcc-7.0.1 536 528 600 536

arm-linux-gnueabi-gcc-4.4.7 592 440
arm-linux-gnueabi-gcc-4.5.4 776 448 776 544
arm-linux-gnueabi-gcc-4.6.4 776 448 776 544
arm-linux-gnueabi-gcc-4.7.4 768 448 768 544
arm-linux-gnueabi-gcc-4.8.5 488 488 776 544
arm-linux-gnueabi-gcc-4.9.3 552 552 776 536
arm-linux-gnueabi-gcc-5.3.1 552 552 776 536
arm-linux-gnueabi-gcc-6.1.1 560 560 776 536
arm-linux-gnueabi-gcc-7.0.1 616 616 808 536

I did not do any runtime tests with serpent, so it is possible that stack
frame size does not directly correlate with runtime performance here and
it actually makes things worse, but it's more likely to help here, and
the reduced stack frame size is probably enough reason to apply the patch,
especially given that the crypto code is often used in deep call chains.

Link: https://kernelci.org/build/id/58797d7559b5149efdf6c3a9/logs/
Link: http://www.larc.usp.br/~pbarreto/WhirlpoolPage.html
Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=11488
Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79149
Cc: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agoUSB: serial: digi_acceleport: fix OOB-event processing
Johan Hovold [Fri, 24 Feb 2017 18:11:28 +0000 (19:11 +0100)]
USB: serial: digi_acceleport: fix OOB-event processing

commit 2e46565cf622dd0534a9d8bffe152a577b48d7aa upstream.

A recent change claimed to fix an off-by-one error in the OOB-port
completion handler, but instead introduced such an error. This could
specifically led to modem-status changes going unnoticed, effectively
breaking TIOCMGET.

Note that the offending commit fixes a loop-condition underflow and is
marked for stable, but should not be backported without this fix.

Reported-by: Ben Hutchings <ben@decadent.org.uk>
Fixes: 2d380889215f ("USB: serial: digi_acceleport: fix OOB data sanity
check")
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agoUSB: serial: digi_acceleport: fix OOB data sanity check
Johan Hovold [Tue, 31 Jan 2017 16:17:27 +0000 (17:17 +0100)]
USB: serial: digi_acceleport: fix OOB data sanity check

commit 2d380889215fe20b8523345649dee0579821800c upstream.

Make sure to check for short transfers to avoid underflow in a loop
condition when parsing the receive buffer.

Also fix an off-by-one error in the incomplete sanity check which could
lead to invalid data being parsed.

Fixes: 8c209e6782ca ("USB: make actual_length in struct urb field u32")
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
7 years agoARM64: dts: rk3368: p9: fix dc detect failed
Zhou weixin [Fri, 17 Mar 2017 02:19:12 +0000 (10:19 +0800)]
ARM64: dts: rk3368: p9: fix dc detect failed

Change-Id: Ia4cd3528725dd4de250b9417295e7705eb16c412
Signed-off-by: Weixin Zhou <zwx@rock-chips.com>
7 years agoarm64: dts: rk3368-sheep: support mipi display
Jianqun Xu [Fri, 17 Mar 2017 07:17:22 +0000 (15:17 +0800)]
arm64: dts: rk3368-sheep: support mipi display

Change-Id: Ibeadd258ccbcd68a6c96fb08e7bfbcea79e5e6c6
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>