Commit Graph

651733 Commits

Author SHA1 Message Date
Mauro (mdrjr) Ribeiro
2c4b8b98f2 Merge tag 'v4.9.163' of git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable into odroidn2-4.9.y
This is the 4.9.163 stable release

Change-Id: I09b88b7e992eff33b41bb8872cd9d06fe9d65a75
2019-04-16 11:34:40 -03:00
Dongjin Kim
fc1027b324 Merge "ODROID-N2: config: add built-in drivers of a few USB/SCSI devices" into odroidn2-4.9.y 2019-04-16 15:48:59 +09:00
Dongjin Kim
84b76466a0 ODROID-N2: config: add built-in drivers of a few USB/SCSI devices
Change-Id: Ieda6ccafaedb65a8428839db87f60ffd7f26be85
Signed-off-by: Dongjin Kim <tobetter@gmail.com>
2019-04-16 10:58:12 +09:00
Kevin Kim
04e27e3488 ODROID-N2:Add CONFIG_USB_ANNOUNCE_NEW_DEVICES
Change-Id: Ia27893c415cabbf17e6cd3d1bde255caafdd989d
2019-04-16 10:58:00 +09:00
Joy Cho
700f27fef6 xen: Remove -fshort-wchar gcc flag
- This commit fixes a error message generated by Make in case of distclean
drivers/xen/Makefile:13: *** Recursive variable 'LDFLAGS' references itself (eventually).  Stop.

- Since the later sublevel of kernel 4.9.y, this options have been removed.

Change-Id: Ia80dbe6c45434fd6325ee4c39a67c047e1a27b45
2019-04-16 09:31:54 +09:00
Joy Cho
efca4b5948 ODROID-N2: vout: Fix hdmi display hotplug issue
Change-Id: Ia2a5cb027eb6bb24705da09875f79a97d6daef41
2019-04-11 16:22:08 +09:00
Joy Cho
8e798bcb21 ODROID-N2 BIOS: dts: Adjust fb option to support 4k display on spi bios
Change-Id: Iddc8f715f7cbddffbefd87d376e2944796b528ab
2019-04-08 09:45:23 +09:00
Kevin Kim
ffc1697972 Merge "hwmon: pwm-fan: add sys attribute to control active cooling" into odroidn2-4.9.y 2019-04-02 15:03:59 +09:00
Joy Cho
74f7463b03 ODROID-N2: display: Support hdmi phy control using osd blank ioctl
1. control with env 'monitor_onoff' in boot.ini
2. blank_mode
  - FB_BLANK_POWERDOWN - hdmi phy off
  - FB_BLANK_UNBLANK - hdmi phy on

Change-Id: I00411be529fe80f19d9a1e4b17eed3583934ff4a
2019-03-28 15:42:18 +09:00
Anand Moon
564116e28e hwmon: pwm-fan: add sys attribute to control active cooling
update fan_speed sys attribute to update the cooling level
for pwm-fan.

Change-Id: I67b0d047dbe0cb0cfa81896ec6226e8e6d79fd1e
(cherry picked from commit c2e92581da)
2019-03-28 11:54:40 +09:00
Kevin Kim
9a4a1f4b14 ODROID-COMMON: Removed mono sound channel, as it currently doesn't work and has issues
Change-Id: I7959e3c2b4f28b998ca2300e9c59fcef77d92854
4.9.162-22 4.9.162-21
2019-03-25 12:04:11 +09:00
Mauro Ribeiro
b457f6db31 Merge "ODROID-N2: config: disable 'CONFIG_AMLOGIC_PAGE_TRACE'" into odroidn2-4.9.y 4.9.162-20 2019-03-22 20:42:30 +09:00
Mauro Ribeiro
66c954deda Merge "ODROID-N2: config: disable 'CONFIG_AMLOGIC_VMAP'" into odroidn2-4.9.y 2019-03-22 20:42:03 +09:00
Dongjin Kim
eedc06cdd6 ODROID-N2: config: disable 'CONFIG_AMLOGIC_PAGE_TRACE'
This patch is to remove the logs below:

	[    0.000000] can't find symbol:arm_dma_alloc
	[    0.000000] can't find symbol:__alloc_from_contiguous
	[    0.000000] can't find symbol:cma_allocator_alloc
	[    0.000000]  0, addr:ffffff80099a15f0 +  140, aml_cma_alloc_post_hook
	[    0.000000]  1, addr:ffffff800957eb88 +   78, dma_alloc_from_contiguous
	[    0.000000]  2, addr:ffffff800922ebc8 +  2b8, cma_alloc
	[    0.000000]  3, addr:ffffff800921f638 +  300, __kmalloc_track_caller
	[    0.000000]  4, addr:ffffff800921c788 +  300, __kmalloc
	[    0.000000]  5, addr:ffffff800921c430 +  290, kmem_cache_alloc_trace
	[    0.000000]  6, addr:ffffff800921c1b0 +  280, kmem_cache_alloc
	[    0.000000]  7, addr:ffffff800921c138 +   78, __slab_alloc.isra.23.constprop.27
	[    0.000000]  8, addr:ffffff800921bdc0 +  378, ___slab_alloc.constprop.28
	[    0.000000]  9, addr:ffffff80092198d0 +  580, new_slab
	[    0.000000] 10, addr:ffffff800920c940 +   70, vmalloc
	[    0.000000] 11, addr:ffffff800920c858 +   70, vzalloc
	[    0.000000] 12, addr:ffffff800920c308 +  2a0, __vmalloc_node_range
	[    0.000000] 13, addr:ffffff80091f0070 +  110, kmalloc_order_trace
	[    0.000000] 14, addr:ffffff80091eff00 +  170, kmalloc_order
	[    0.000000] 15, addr:ffffff80091cf638 +  168, __alloc_page_frag
	[    0.000000] 16, addr:ffffff80091cf5d0 +   68, alloc_pages_exact
	[    0.000000] 17, addr:ffffff80091cf5a0 +   30, get_zeroed_page
	[    0.000000] 18, addr:ffffff80091cf548 +   58, __get_free_pages
	[    0.000000] 19, addr:ffffff80091ce738 +  e10, __alloc_pages_nodemask
	[    0.000000] 20, addr:ffffff800909d8a0 +  258, __dma_alloc

Change-Id: Ib81bd3617a47b60472aab2cf4adc4beb1a2643aa
Signed-off-by: Dongjin Kim <tobetter@gmail.com>
2019-03-22 16:34:49 +09:00
Dongjin Kim
163fc91f2d ODROID-N2: config: disable 'CONFIG_AMLOGIC_VMAP'
This patch is to remove the error below.

	[    0.282128] VMAP:handle_vmap_fault address ffffff80200c4000 out of range
	[    0.282152] VMAP:handle_vmap_fault PC is:ffffff800925db6c, copy_mount_options, LR is:ffffff800925dad8 copy_mount_options
	[    0.282159] VMAP:handle_vmap_fault task:44 kdevtmpfs, stack:ffffff80200c0000, ffffffc0cf308960
	[    0.282167] CPU: 0 PID: 44 Comm: kdevtmpfs Not tainted 4.9.162+ #1
	[    0.282172] Hardware name: Hardkernel ODROID-N2 (DT)
	[    0.282178] Call trace:
	[    0.282189] [ffffffc0cf308880+ 128][<ffffff800908b908>] dump_backtrace+0x0/0x288
	[    0.282198] [ffffffc0cf308900+  32][<ffffff800908bc14>] show_stack+0x24/0x30
	[    0.282207] [ffffffc0cf308920+  64][<ffffff800944d560>] dump_stack+0xb0/0xe0
	[    0.282218] [ffffffc0cf308960+  64][<ffffff80099a0544>] handle_vmap_fault+0x1e4/0x218
	[    0.282226] [ffffffc0cf3089a0+   0][<ffffff8009082f68>] el1_da+0x14/0x148
	[    0.282234] [ffffff80200c3d20+  80][<ffffff800925dad8>] copy_mount_options+0xb8/0x1b0
	[    0.282241] [ffffff80200c3d70+  64][<ffffff800925eba8>] SyS_mount+0x70/0x108
	[    0.282251] [ffffff80200c3db0+ 112][<ffffff800957d0f8>] devtmpfsd+0x80/0x190
	[    0.282260] [ffffff80200c3e20+   0][<ffffff80090cd298>] kthread+0xf8/0x110
	[    0.282268] [0000000000000000+   0][<ffffff8009083ad0>] ret_from_fork+0x10/0x40

Change-Id: If59066c6e094be7f25ba33f1978acde03975700c
Signed-off-by: Dongjin Kim <tobetter@gmail.com>
2019-03-22 16:34:24 +09:00
Kevin Kim
ba7624d44f ODROID-COMMON:alsa-default-sink set to HDMI-output
Change-Id: I6165eed22baca6150b4dfc79e9108ba344385d0d
2019-03-22 15:21:55 +09:00
Joy Cho
739dc21a18 osd: Fix an overscan issue in case of missing the value
Change-Id: If830d1efa02eeef3d74af7554345a3f71f0c1ded
2019-03-22 14:02:18 +09:00
Joy Cho
2c85c1f633 osd: Update overscan logic at booting stage
Change-Id: I0df7d807e55452604b228a46df9e83027ef19211
2019-03-20 15:53:12 +09:00
Joy Cho
f7300ee716 osd: Fix a wrong fb window axis issue
Change-Id: I591510797a03c69648c3da38d03b60fc46fa38dd
2019-03-19 08:23:58 +09:00
Dongjin Kim
06e6a318b5 Merge "BACKPORT: ALSA: usb-audio: Eliminate noise at the start of DSD playback." into odroidn2-4.9.y 2019-03-18 15:31:53 +09:00
Dongjin Kim
50f67111e2 ODROID-COMMON: net/ethernet: fix compilation error of implicit delcaration
Change-Id: I054510f2d0671563b42575c60e5441ed3351347d
Signed-off-by: Dongjin Kim <tobetter@gmail.com>
2019-03-18 13:48:33 +09:00
Dongjin Kim
a79ad488a8 ODROID-COMMON: net/ethernet: MAC address from eFuse memory
Change-Id: Ic7c01dba43300c8fb507fbfcc87404585a09e220
Signed-off-by: Dongjin Kim <tobetter@gmail.com>
2019-03-18 13:19:48 +09:00
Nobutaka Okabe
e265143c2d BACKPORT: ALSA: usb-audio: Eliminate noise at the start of DSD playback.
[Problem]
In some USB DACs, a terrible pop noise comes to be heard
at the start of DSD playback (in the following situations).

- play first DSD track
- change from PCM track to DSD track
- change from DSD64 track to DSD128 track (and etc...)
- seek DSD track
- Fast-Forward/Rewind DSD track

[Cause]
At the start of playback, there is a little silence.
The silence bit pattern "0x69" is required on DSD mode,
but it is not like that.

[Solution]
This patch adds DSD silence pattern to the endpoint settings.

Change-Id: I173538b84978d4136eb0dca31f12738814375604
Signed-off-by: Nobutaka Okabe <nob77413@gmail.com>
Signed-off-by: Dongjin Kim <tobetter@gmail.com>
2019-03-18 12:31:49 +09:00
Kevin Kim
4b79a61ce3 odroid-common:pwm-fan device enabled for active cooling.
Change-Id: I1dcdfa4c22ab72cd24b1be870727420683073f9a
2019-03-15 11:13:10 +09:00
Joy Cho
5d01c3b7ee remote: Add a setup of user remote wakeup decode type
Change-Id: Ib7bb759dfec67433b596ed64997f6894d1c7ec27
2019-03-14 15:43:25 +09:00
Joy Cho
4a534ab482 Merge "media: rc: Add lirc helper to support user remote wakeup" into odroidn2-4.9.y 2019-03-14 15:42:48 +09:00
Dongjin Kim
22d698f4d2 ODROID-N2: phy/realtek: add to support Wake On Lan enable
Adding new kernel command line "enable_wol=<1|0>" will configure the WOL
features on next power off.

Change-Id: I4830aeb1651e90d4699887199000def1163fb6db
Signed-off-by: Dongjin Kim <tobetter@gmail.com>
2019-03-14 00:10:05 -04:00
Greg Kroah-Hartman
b834331609 Linux 4.9.163 2019-03-13 14:05:02 -07:00
Peter Zijlstra (Intel)
3596b45859 x86: Add TSX Force Abort CPUID/MSR
commit 52f6490940 upstream

Skylake systems will receive a microcode update to address a TSX
errata. This microcode will (by default) clobber PMC3 when TSX
instructions are (speculatively or not) executed.

It also provides an MSR to cause all TSX transaction to abort and
preserve PMC3.

Add the CPUID enumeration and MSR definition.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-03-13 14:05:02 -07:00
Peter Zijlstra (Intel)
c34730d7e6 perf/x86/intel: Generalize dynamic constraint creation
commit 11f8b2d65c upstream

Such that we can re-use it.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-03-13 14:05:02 -07:00
Peter Zijlstra (Intel)
0ac343a528 perf/x86/intel: Make cpuc allocations consistent
commit d01b1f96a8 upstream

The cpuc data structure allocation is different between fake and real
cpuc's; use the same code to init/free both.

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-03-13 14:05:02 -07:00
Krzysztof Kozlowski
dd25a761bf ARM: dts: exynos: Do not ignore real-world fuse values for thermal zone 0 on Exynos5420
commit 28928a3ce1 upstream.

In Odroid XU3 Lite board, the temperature levels reported for thermal
zone 0 were weird. In warm room:
	/sys/class/thermal/thermal_zone0/temp:32000
	/sys/class/thermal/thermal_zone1/temp:51000
	/sys/class/thermal/thermal_zone2/temp:55000
	/sys/class/thermal/thermal_zone3/temp:54000
	/sys/class/thermal/thermal_zone4/temp:51000

Sometimes after booting the value was even equal to ambient temperature
which is highly unlikely to be a real temperature of sensor in SoC.

The thermal sensor's calibration (trimming) is based on fused values.
In case of the board above, the fused values are: 35, 52, 43, 58 and 43
(corresponding to each TMU device).  However driver defined a minimum value
for fused data as 40 and for smaller values it was using a hard-coded 55
instead.  This lead to mapping data from sensor to wrong temperatures
for thermal zone 0.

Various vendor 3.10 trees (Hardkernel's based on Samsung LSI, Artik 10)
do not impose any limits on fused values.  Since we do not have any
knowledge about these limits, use 0 as a minimum accepted fused value.
This should essentially allow accepting any reasonable fused value thus
behaving like vendor driver.

The exynos5420-tmu-sensor-conf.dtsi is copied directly from existing
exynos4412 with one change - the samsung,tmu_min_efuse_value.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Acked-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Acked-by: Eduardo Valentin <edubezval@gmail.com>
Reviewed-by: Javier Martinez Canillas <javier@osg.samsung.com>
Tested-by: Javier Martinez Canillas <javier@osg.samsung.com>
Reviewed-by: Anand Moon <linux.amoon@gmail.com>
Tested-by: Anand Moon <linux.amoon@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-03-13 14:05:02 -07:00
Vincent Whitchurch
88bc59cff5 ARM: 8781/1: Fix Thumb-2 syscall return for binutils 2.29+
[ Upstream commit afc9f65e01 ]

When building the kernel as Thumb-2 with binutils 2.29 or newer, if the
assembler has seen the .type directive (via ENDPROC()) for a symbol, it
automatically handles the setting of the lowest bit when the symbol is
used with ADR.  The badr macro on the other hand handles this lowest bit
manually.  This leads to a jump to a wrong address in the wrong state
in the syscall return path:

 Internal error: Oops - undefined instruction: 0 [#2] SMP THUMB2
 Modules linked in:
 CPU: 0 PID: 652 Comm: modprobe Tainted: G      D           4.18.0-rc3+ #8
 PC is at ret_fast_syscall+0x4/0x62
 LR is at sys_brk+0x109/0x128
 pc : [<80101004>]    lr : [<801c8a35>]    psr: 60000013
 Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment none
 Control: 50c5387d  Table: 9e82006a  DAC: 00000051
 Process modprobe (pid: 652, stack limit = 0x(ptrval))

 80101000 <ret_fast_syscall>:
 80101000:       b672            cpsid   i
 80101002:       f8d9 2008       ldr.w   r2, [r9, #8]
 80101006:       f1b2 4ffe       cmp.w   r2, #2130706432 ; 0x7f000000

 80101184 <local_restart>:
 80101184:       f8d9 a000       ldr.w   sl, [r9]
 80101188:       e92d 0030       stmdb   sp!, {r4, r5}
 8010118c:       f01a 0ff0       tst.w   sl, #240        ; 0xf0
 80101190:       d117            bne.n   801011c2 <__sys_trace>
 80101192:       46ba            mov     sl, r7
 80101194:       f5ba 7fc8       cmp.w   sl, #400        ; 0x190
 80101198:       bf28            it      cs
 8010119a:       f04f 0a00       movcs.w sl, #0
 8010119e:       f3af 8014       nop.w   {20}
 801011a2:       f2af 1ea2       subw    lr, pc, #418    ; 0x1a2

To fix this, add a new symbol name which doesn't have ENDPROC used on it
and use that with badr.  We can't remove the badr usage since that would
would cause breakage with older binutils.

Signed-off-by: Vincent Whitchurch <vincent.whitchurch@axis.com>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-03-13 14:05:01 -07:00
Ard Biesheuvel
660e1bf847 drm: disable uncached DMA optimization for ARM and arm64
[ Upstream commit e02f5c1bb2 ]

The DRM driver stack is designed to work with cache coherent devices
only, but permits an optimization to be enabled in some cases, where
for some buffers, both the CPU and the GPU use uncached mappings,
removing the need for DMA snooping and allocation in the CPU caches.

The use of uncached GPU mappings relies on the correct implementation
of the PCIe NoSnoop TLP attribute by the platform, otherwise the GPU
will use cached mappings nonetheless. On x86 platforms, this does not
seem to matter, as uncached CPU mappings will snoop the caches in any
case. However, on ARM and arm64, enabling this optimization on a
platform where NoSnoop is ignored results in loss of coherency, which
breaks correct operation of the device. Since we have no way of
detecting whether NoSnoop works or not, just disable this
optimization entirely for ARM and arm64.

Cc: Christian Koenig <christian.koenig@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: David Zhou <David1.Zhou@amd.com>
Cc: Huang Rui <ray.huang@amd.com>
Cc: Junwei Zhang <Jerry.Zhang@amd.com>
Cc: Michel Daenzer <michel.daenzer@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Maxime Ripard <maxime.ripard@bootlin.com>
Cc: Sean Paul <sean@poorly.run>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Robin Murphy <robin.murphy@arm.com>
Cc: amd-gfx list <amd-gfx@lists.freedesktop.org>
Cc: dri-devel <dri-devel@lists.freedesktop.org>
Reported-by: Carsten Haitzler <Carsten.Haitzler@arm.com>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Link: https://patchwork.kernel.org/patch/10778815/
Signed-off-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-03-13 14:05:01 -07:00
Marek Szyprowski
a844f7910c ARM: dts: exynos: Add minimal clkout parameters to Exynos3250 PMU
commit a66352e005 upstream.

Add minimal parameters needed by the Exynos CLKOUT driver to Exynos3250
PMU node. This fixes the following warning on boot:

exynos_clkout_init: failed to register clkout clock

Fixes: d19bb397e1 ("ARM: dts: exynos: Update PMU node with CLKOUT related data")
Cc: <stable@vger.kernel.org>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-03-13 14:05:01 -07:00
Marek Szyprowski
cf0488350d ARM: dts: exynos: Fix pinctrl definition for eMMC RTSN line on Odroid X2/U3
commit ec33745bcc upstream.

Commit 225da7e65a ("ARM: dts: add eMMC reset line for
exynos4412-odroid-common") added MMC power sequence for eMMC card of
Odroid X2/U3. It reused generic sd1_cd pin control configuration node
and only disabled pull-up. However that time the pinctrl configuration
was not applied during MMC power sequence driver initialization. This
has been changed later by commit d97a1e5d7c ("mmc: pwrseq: convert to
proper platform device").

It turned out then, that the provided pinctrl configuration is not
correct, because the eMMC_RTSN line is being re-configured as 'special
function/card detect function for mmc1 controller' not the simple
'output', thus the power sequence driver doesn't really set the pin
value. This in effect broke the reboot of Odroid X2/U3 boards. Fix this
by providing separate node with eMMC_RTSN pin configuration.

Cc: <stable@vger.kernel.org>
Reported-by: Markus Reichl <m.reichl@fivetechno.de>
Suggested-by: Ulf Hansson <ulf.hansson@linaro.org>
Fixes: 225da7e65a ("ARM: dts: add eMMC reset line for exynos4412-odroid-common")
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-03-13 14:05:01 -07:00
Peter Zijlstra
ce81355231 futex,rt_mutex: Restructure rt_mutex_finish_proxy_lock()
commit 38d589f2fd upstream.

With the ultimate goal of keeping rt_mutex wait_list and futex_q waiters
consistent it's necessary to split 'rt_mutex_futex_lock()' into finer
parts, such that only the actual blocking can be done without hb->lock
held.

Split split_mutex_finish_proxy_lock() into two parts, one that does the
blocking and one that does remove_waiter() when the lock acquire failed.

When the rtmutex was acquired successfully the waiter can be removed in the
acquisiton path safely, since there is no concurrency on the lock owner.

This means that, except for futex_lock_pi(), all wait_list modifications
are done with both hb->lock and wait_lock held.

[bigeasy@linutronix.de: fix for futex_requeue_pi_signal_restart]

Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Cc: juri.lelli@arm.com
Cc: bigeasy@linutronix.de
Cc: xlpang@redhat.com
Cc: rostedt@goodmis.org
Cc: mathieu.desnoyers@efficios.com
Cc: jdesfossez@efficios.com
Cc: dvhart@infradead.org
Cc: bristot@redhat.com
Link: http://lkml.kernel.org/r/20170322104152.001659630@infradead.org
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Zubin Mithra <zsm@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-03-13 14:05:01 -07:00
Gustavo A. R. Silva
1dd5254782 scsi: aacraid: Fix missing break in switch statement
commit 5e420fe635 upstream.

Add missing break statement and fix identation issue.

This bug was found thanks to the ongoing efforts to enable
-Wimplicit-fallthrough.

Fixes: 9cb62fa24e ("aacraid: Log firmware AIF messages")
Cc: stable@vger.kernel.org
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-03-13 14:05:01 -07:00
Gustavo A. R. Silva
6263e82643 iscsi_ibft: Fix missing break in switch statement
commit df997abeeb upstream.

Add missing break statement in order to prevent the code from falling
through to case ISCSI_BOOT_TGT_NAME, which is unnecessary.

This bug was found thanks to the ongoing efforts to enable
-Wimplicit-fallthrough.

Fixes: b33a84a384 ("ibft: convert iscsi_ibft module to iscsi boot lib")
Cc: stable@vger.kernel.org
Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-03-13 14:05:01 -07:00
Vincent Batts
3b5ed2ceeb Input: elan_i2c - add id for touchpad found in Lenovo s21e-20
commit e154ab6932 upstream.

Lenovo s21e-20 uses ELAN0601 in its ACPI tables for the Elan touchpad.

Signed-off-by: Vincent Batts <vbatts@hashbangbash.com>
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-03-13 14:05:01 -07:00
Jason Gerecke
1a2403a279 Input: wacom_serial4 - add support for Wacom ArtPad II tablet
commit 44fc95e218 upstream.

Tablet initially begins communicating at 9600 baud, so this command
should be used to connect to the device:

    $ inputattach --daemon --baud 9600 --wacom_iv /dev/ttyS0

https://github.com/linuxwacom/xf86-input-wacom/issues/40

Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-03-13 14:05:01 -07:00
Tetsuo Handa
579acdaef9 fs: ratelimit __find_get_block_slow() failure message.
[ Upstream commit 43636c804d ]

When something let __find_get_block_slow() hit all_mapped path, it calls
printk() for 100+ times per a second. But there is no need to print same
message with such high frequency; it is just asking for stall warning, or
at least bloating log files.

  [  399.866302][T15342] __find_get_block_slow() failed. block=1, b_blocknr=8
  [  399.873324][T15342] b_state=0x00000029, b_size=512
  [  399.878403][T15342] device loop0 blocksize: 4096
  [  399.883296][T15342] __find_get_block_slow() failed. block=1, b_blocknr=8
  [  399.890400][T15342] b_state=0x00000029, b_size=512
  [  399.895595][T15342] device loop0 blocksize: 4096
  [  399.900556][T15342] __find_get_block_slow() failed. block=1, b_blocknr=8
  [  399.907471][T15342] b_state=0x00000029, b_size=512
  [  399.912506][T15342] device loop0 blocksize: 4096

This patch reduces frequency to up to once per a second, in addition to
concatenating three lines into one.

  [  399.866302][T15342] __find_get_block_slow() failed. block=1, b_blocknr=8, b_state=0x00000029, b_size=512, device loop0 blocksize: 4096

Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Reviewed-by: Jan Kara <jack@suse.cz>
Cc: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-03-13 14:05:01 -07:00
Jun-Ru Chang
a189410b3f MIPS: Remove function size check in get_frame_info()
[ Upstream commit 2b424cfc69 ]

Patch (b6c7a324df "MIPS: Fix get_frame_info() handling of
microMIPS function size.") introduces additional function size
check for microMIPS by only checking insn between ip and ip + func_size.
However, func_size in get_frame_info() is always 0 if KALLSYMS is not
enabled. This causes get_frame_info() to return immediately without
calculating correct frame_size, which in turn causes "Can't analyze
schedule() prologue" warning messages at boot time.

This patch removes func_size check, and let the frame_size check run
up to 128 insns for both MIPS and microMIPS.

Signed-off-by: Jun-Ru Chang <jrjang@realtek.com>
Signed-off-by: Tony Wu <tonywu@realtek.com>
Signed-off-by: Paul Burton <paul.burton@mips.com>
Fixes: b6c7a324df ("MIPS: Fix get_frame_info() handling of microMIPS function size.")
Cc: <ralf@linux-mips.org>
Cc: <jhogan@kernel.org>
Cc: <macro@mips.com>
Cc: <yamada.masahiro@socionext.com>
Cc: <peterz@infradead.org>
Cc: <mingo@kernel.org>
Cc: <linux-mips@vger.kernel.org>
Cc: <linux-kernel@vger.kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-03-13 14:05:01 -07:00
Jiri Olsa
ce42bb1d2b perf symbols: Filter out hidden symbols from labels
[ Upstream commit 59a1770691 ]

When perf is built with the annobin plugin (RHEL8 build) extra symbols
are added to its binary:

  # nm perf | grep annobin | head -10
  0000000000241100 t .annobin_annotate.c
  0000000000326490 t .annobin_annotate.c
  0000000000249255 t .annobin_annotate.c_end
  00000000003283a8 t .annobin_annotate.c_end
  00000000001bce18 t .annobin_annotate.c_end.hot
  00000000001bce18 t .annobin_annotate.c_end.hot
  00000000001bc3e2 t .annobin_annotate.c_end.unlikely
  00000000001bc400 t .annobin_annotate.c_end.unlikely
  00000000001bce18 t .annobin_annotate.c.hot
  00000000001bce18 t .annobin_annotate.c.hot
  ...

Those symbols have no use for report or annotation and should be
skipped.  Moreover they interfere with the DWARF unwind test on the PPC
arch, where they are mixed with checked symbols and then the test fails:

  # perf test dwarf -v
  59: Test dwarf unwind                                     :
  --- start ---
  test child forked, pid 8515
  unwind: .annobin_dwarf_unwind.c:ip = 0x10dba40dc (0x2740dc)
  ...
  got: .annobin_dwarf_unwind.c 0x10dba40dc, expecting test__arch_unwind_sample
  unwind: failed with 'no error'

The annobin symbols are defined as NOTYPE/LOCAL/HIDDEN:

  # readelf -s ./perf | grep annobin | head -1
    40: 00000000001bce4f     0 NOTYPE  LOCAL  HIDDEN    13 .annobin_init.c

They can still pass the check for the label symbol. Adding check for
HIDDEN and INTERNAL (as suggested by Nick below) visibility and filter
out such symbols.

>   Just to be awkward, if you are going to ignore STV_HIDDEN
>   symbols then you should probably also ignore STV_INTERNAL ones
>   as well...  Annobin does not generate them, but you never know,
>   one day some other tool might create some.

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Michael Petlan <mpetlan@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Nick Clifton <nickc@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20190128133526.GD15461@krava
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-03-13 14:05:01 -07:00
Julian Wiedmann
78335ed001 s390/qeth: fix use-after-free in error path
[ Upstream commit afa0c5904b ]

The error path in qeth_alloc_qdio_buffers() that takes care of
cleaning up the Output Queues is buggy. It first frees the queue, but
then calls qeth_clear_outq_buffers() with that very queue struct.

Make the call to qeth_clear_outq_buffers() part of the free action
(in the correct order), and while at it fix the naming of the helper.

Fixes: 0da9581ddb ("qeth: exploit asynchronous delivery of storage blocks")
Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Reviewed-by: Alexandra Winter <wintera@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-03-13 14:05:01 -07:00
Martynas Pumputis
92044928a9 netfilter: nf_nat: skip nat clash resolution for same-origin entries
[ Upstream commit 4e35c1cb94 ]

It is possible that two concurrent packets originating from the same
socket of a connection-less protocol (e.g. UDP) can end up having
different IP_CT_DIR_REPLY tuples which results in one of the packets
being dropped.

To illustrate this, consider the following simplified scenario:

1. Packet A and B are sent at the same time from two different threads
   by same UDP socket.  No matching conntrack entry exists yet.
   Both packets cause allocation of a new conntrack entry.
2. get_unique_tuple gets called for A.  No clashing entry found.
   conntrack entry for A is added to main conntrack table.
3. get_unique_tuple is called for B and will find that the reply
   tuple of B is already taken by A.
   It will allocate a new UDP source port for B to resolve the clash.
4. conntrack entry for B cannot be added to main conntrack table
   because its ORIGINAL direction is clashing with A and the REPLY
   directions of A and B are not the same anymore due to UDP source
   port reallocation done in step 3.

This patch modifies nf_conntrack_tuple_taken so it doesn't consider
colliding reply tuples if the IP_CT_DIR_ORIGINAL tuples are equal.

[ Florian: simplify patch to not use .allow_clash setting
  and always ignore identical flows ]

Signed-off-by: Martynas Pumputis <martynas@weave.works>
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-03-13 14:05:00 -07:00
Florian Westphal
9b060e08ef selftests: netfilter: add simple masq/redirect test cases
[ Upstream commit 98bfc3414b ]

Check basic nat/redirect/masquerade for ipv4 and ipv6.

Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-03-13 14:05:00 -07:00
Naresh Kamboju
78dbfc5d25 selftests: netfilter: fix config fragment CONFIG_NF_TABLES_INET
[ Upstream commit 952b72f89a ]

In selftests the config fragment for netfilter was added as
NF_TABLES_INET=y and this patch correct it as CONFIG_NF_TABLES_INET=y

Signed-off-by: Naresh Kamboju <naresh.kamboju@linaro.org>
Acked-by: Florian Westphal <fw@strlen.de>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-03-13 14:05:00 -07:00
Andy Shevchenko
ad3039362b dmaengine: dmatest: Abort test in case of mapping error
[ Upstream commit 6454368a80 ]

In case of mapping error the DMA addresses are invalid and continuing
will screw system memory or potentially something else.

[  222.480310] dmatest: dma0chan7-copy0: summary 1 tests, 3 failures 6 iops 349 KB/s (0)
...
[  240.912725] check: Corrupted low memory at 00000000c7c75ac9 (2940 phys) = 5656000000000000
[  240.921998] check: Corrupted low memory at 000000005715a1cd (2948 phys) = 279f2aca5595ab2b
[  240.931280] check: Corrupted low memory at 000000002f4024c0 (2950 phys) = 5e5624f349e793cf
...

Abort any test if mapping failed.

Fixes: 4076e755db ("dmatest: convert to dmaengine_unmap_data")
Cc: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-03-13 14:05:00 -07:00
Stefano Garzarella
4c870d3c4b vsock/virtio: reset connected sockets on device removal
[ Upstream commit 85965487ab ]

When the virtio transport device disappear, we should reset all
connected sockets in order to inform the users.

Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-03-13 14:05:00 -07:00