Commit Graph

859231 Commits

Author SHA1 Message Date
Ziyuan Xu
e59af08e39 ARM: configs: rv1126-battery.config: disable usb_o/ehci for low power
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Change-Id: Id3d4281ec30c9508c82c67dd9e68190a77941bee
2020-10-12 11:33:11 +08:00
Ziyuan Xu
4369eeb724 ARM: configs: rv1126-battery.config: enable ROCKCHIP_LOW_PERFORMANCE
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Change-Id: I991f7564aa3859d0063a3f9d5be46299441d8aef
2020-10-12 11:33:03 +08:00
Ziyuan Xu
584d6819a6 soc: rockchip: Add ROCKCHIP_LOW_PERFORMANCE config
This option make the SoC low power.
Default n.

Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Change-Id: I89254b09c3e0c1c1a6c7020791a440c554a95ca4
2020-10-12 11:32:52 +08:00
Elaine Zhang
ac723caa42 clk: rockchip: rk3568: Replace RKNN with NPU
Update the TRM.

Change-Id: I0fb48df339d2a2350d0e6e2efc5128be0f90a97a
Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
2020-10-12 10:35:56 +08:00
Tao Huang
0c17cc5fc3 Merge tag 'ASB-2020-10-05_4.19-stable' of https://android.googlesource.com/kernel/common
https://source.android.com/security/bulletin/2020-10-01
Fix for CVE-2020-0423 not yet public.

* tag 'ASB-2020-10-05_4.19-stable': (518 commits)
  ANDROID: use arm-linux-androidkernel- for CROSS_COMPILE_COMPAT
  ANDROID: build.config.common: enable LLVM=1
  Linux 4.19.149
  KVM: arm64: Assume write fault on S1PTW permission fault on instruction fetch
  ata: sata_mv, avoid trigerrable BUG_ON
  ata: make qc_prep return ata_completion_errors
  ata: define AC_ERR_OK
  kprobes: Fix compiler warning for !CONFIG_KPROBES_ON_FTRACE
  s390/zcrypt: Fix ZCRYPT_PERDEV_REQCNT ioctl
  mm, THP, swap: fix allocating cluster for swapfile by mistake
  kprobes: Fix to check probe enabled before disarm_kprobe_ftrace()
  s390/dasd: Fix zero write for FBA devices
  tracing: fix double free
  KVM: SVM: Add a dedicated INVD intercept routine
  KVM: x86: Reset MMU context if guest toggles CR4.SMAP or CR4.PKE
  MIPS: Add the missing 'CPU_1074K' into __get_cpu_type()
  regmap: fix page selection for noinc reads
  ALSA: asihpi: fix iounmap in error handler
  bpf: Fix a rcu warning for bpffs map pretty-print
  batman-adv: mcast: fix duplicate mcast packets from BLA backbone to mesh
  ...

Change-Id: I5af52b9921cfd8b55aba5b7705a8bc1a4f88db74

Conflicts:
	drivers/tty/serial/8250/8250_port.c
	drivers/usb/core/message.c
	drivers/usb/core/quirks.c
2020-10-10 18:38:14 +08:00
Finley Xiao
63204abfce arm64: dts: rockchip: rk3568: Add qos device node
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I2a5b04f6027e11c1607b94bbe7505aef96b28542
2020-10-10 18:28:23 +08:00
Finley Xiao
eaaea7d366 arm64: dts: rockchip: rk3568: Add pmu device node
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I719eedaf6fddc32ca14cd59757241271c38d8f58
2020-10-10 18:28:23 +08:00
Shunqing Chen
a7d0b4290f power: rk817-battery: fix dsoc jumps after resume
The units of gap_soc and sleep_soc are different.

Signed-off-by: Shunqing Chen <csq@rock-chips.com>
Change-Id: I42873f1dd4ce0543aa1e89dd91131a5c1fbfa23b
2020-10-10 18:23:04 +08:00
Ding Wei
ab0a33650a ARM: dts: rockchip: rv1126: rkvenc rates match with opp_table
Change-Id: Ic8eaaa017e121536fbdcc302a0a9631e0fca961b
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2020-10-10 17:45:51 +08:00
Shunqian Zheng
8e2845b7a9 media: i2c: Add jx_f37 driver
The jx_f37 driver is one lane and supports 2frame HDR,
the gain of short and long frame shall be the same.

Change-Id: Ic92dd76096a4467226522c15dd179c9983fc5c93
Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com>
2020-10-10 17:07:23 +08:00
Weiwen Chen
bd5f5c8282 ARM: dts: rv1109: add 38x38 v10 emmc support imx307
This board is the same as rv1126-38x38-v10-emmc.dts,
except camera sensor.

Signed-off-by: Weiwen Chen <cww@rock-chips.com>
Change-Id: Ib5e368b354b1cd04387db51e038cbc4f539ebf3e
2020-10-10 16:53:02 +08:00
Xing Zheng
92e8d9a625 ASoC: rk3308_codec: increase more delay and fix noise once in a while
To reset Codec and DAC Digital need to wait they are stable.

Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
Change-Id: Iafa48e1d16cd4749749969a07f49250b54dd4fd1
2020-10-10 16:50:16 +08:00
Xing Zheng
9e1de0748b ASoC: rk3308_codec: fix the hidden ADC MIC PGA Gains
When we name 'Volume' for TLV, the 'Volume' will be ignored
and there are some confilcts name 'ADC MIC Group X Left/Right'.
Therefore, using 'Gain' instead of 'Volume'.

Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
Change-Id: I5380cdd376dbd69ae50bee7b164a01f954df53f9
2020-10-10 16:50:10 +08:00
Mark Huang
ba0047478c ARM: dts: rv1126-ai-cam: enable monitor to restart if abnormal for ispp
Change-Id: I3956e1f2988de0f13926650b1bfd299d83483bdb
Signed-off-by: Mark Huang <huangjc@rock-chips.com>
2020-10-10 16:48:48 +08:00
Hu Kejun
119e987764 media: rockchip: isp and ispp version to v0.1.8
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
Change-Id: I37df627f420949b7a020fa35795979f098908dd8
2020-10-10 16:48:17 +08:00
Hu Kejun
0611b7575a media: i2c: gt9760s: support set dlc/t_src/mclk by dts
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
Change-Id: I2e71d559b9f6796c68ce170848589a1db85bad9d
2020-10-10 16:47:44 +08:00
Steven Liu
045dc61b0d arm64: dts: rockchip: modify uart and pwm dtsi for RK3568.
Modify uart and pwm dtsi for RK3568 according to RK3568 TRM.

Signed-off-by: Steven Liu <steven.liu@rock-chips.com>
Change-Id: Ia29916d2c63e1f92c9a6f4e30e0f8d3124895a81
2020-10-10 16:15:04 +08:00
Liang Chen
fd8173d58e arm64: dts: rockchip: add RK3568 evaluation board devicetree
Add some board files for RK3568 SoCs, rk3568-evb1-ddr4-v10-linux is
for Linux Platform, others for Android Platform.

Change-Id: I632a8504e13c4069b17c2282af702ab44dec72db
Signed-off-by: Liang Chen <cl@rock-chips.com>
2020-10-10 14:23:07 +08:00
Hu Kejun
c3b44b185e media: i2c: gt9760s: add ioctl to set vcm config
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
Change-Id: I8c4c8746ff5ddd69c4953d41f24498fec90125ad
2020-10-10 14:19:12 +08:00
Hu Kejun
3adf8acd1f media: i2c: vcm: add ioctl for iris/zoom
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
Change-Id: Ib00e28f01aa68f4463cc15c7268393f515e37efb
2020-10-10 14:19:12 +08:00
Ziyuan Xu
5b586c6dcc ARM: configs: rv1126-battery.config: enable leds_pwm and heartbeat trigger
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Change-Id: I672c2b8b9955f0d2afe8bea44b65a54a7bba1aae
2020-10-10 14:11:05 +08:00
Ziyuan Xu
b0c94bdffb ARM: dts: rv1126-bat-ipc-v10: enable pwm-leds for state-aware
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Change-Id: Ibcbeeba727085c91f85b189bfb8cbdbe15982e8a
2020-10-10 14:10:41 +08:00
Ziyuan Xu
919304ff8e ARM: configs: rv1126-battery.config: use sc210iot only
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Change-Id: I5f3ebb0ba87fcfa2ea922ae0222986ba2ebaa50a
2020-10-10 14:10:06 +08:00
Ziyuan Xu
79efb02c7d ARM: dts: rv1126-bat-ipc-v10: prefer use sc210iot for low power
Test scenario:
1080p rtsp (only video) preview
ov2718: 999.7mw
sc210iot: 793.5mw

The sc210iot is lower power dissipation about 206mw than ov2718.

Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Change-Id: Ib743f9ca85ea911385f90620431e8592b0c70444
2020-10-10 14:09:24 +08:00
Jon Lin
2542a9a36c drivers: rkflash: Fix last data block vpn has been modify issue
Change-Id: Ief1b572d6f1321b9dcdd6d8eae31ff21e2e2f57f
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2020-10-10 09:30:50 +08:00
Xing Zheng
1e5032696c ARM: dts: rv1126-bat-ipc-v10: add some optional properties
Keep 0dB for adc/dac volume, 6(18dB) for adc-pga-gain,
and using hardware loopback which is dac_l+adc_r.

Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
Change-Id: I713e25984cfe20f3e50d14d381a6825e48d5296b
2020-10-10 09:12:47 +08:00
Xing Zheng
7a2a6a332d ASoC: es8311: add handling the optional property 'adc-pga-gain'
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
Change-Id: I2da3f8f0bc310fc2c25517633f1803e9f9482a16
2020-10-10 09:12:20 +08:00
Xing Zheng
e14240a31a dt-bindings: sound: es8311: add the optional property 'adc-pga-gain'
Signed-off-by: Xing Zheng <zhengxing@rock-chips.com>
Change-Id: I59c283d5d3ddb359fa4828a53caf7e21670f19db
2020-10-10 09:12:03 +08:00
Ziyuan Xu
f8d1a6ca51 ARM: configs: rv1126-battery.config: enable sound feature
They have a minuscule impact on boot time, codec and simple-card spend a
lot of time as far as we know.

Tested on rv1126-battery-v10 board:
[   17.492609 ] probe of 4-0018 returned 1 after 2116 usecs
[   17.492915 ] initcall es8311_i2c_driver_init+0x0/0x1000 [snd_soc_es8311] returned 0 after 2405 usecs
[   17.510095 ] asoc-simple-card i2s0-sound: ES8311 HiFi <-> ff800000.i2s mapping ok
[   17.512578 ] probe of i2s0-sound returned 1 after 20870 usecs

Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
Change-Id: Ie25e9dde2cd87616cb4777b4ceeebc1083678d42
2020-10-10 09:11:48 +08:00
Hu Kejun
a52cba96f5 media: rockchip: isp: only rx mode can use when link with cif
Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
Change-Id: I6873708e4ac5cc5e90e2449f74c252d12d58d057
2020-10-09 17:36:19 +08:00
Hu Kejun
5b80188e21 media: rockchip: isp: set tmo bit in gain by tmo enable
normal mode also use tmo module now, so we should set tmo bit in gain by tmo enable

Signed-off-by: Hu Kejun <william.hu@rock-chips.com>
Change-Id: I35395cf20c53ab92645b419a5d162a23f65c5274
2020-10-09 17:35:41 +08:00
Shunqing Chen
ec1fdcdef9 power: supply: cw2015_battery: add power supply property for Android R
Signed-off-by: Shunqing Chen <csq@rock-chips.com>
Change-Id: I905e0399e61c0d51ff6b167755a6099adc2697d2
2020-10-09 16:36:06 +08:00
Shunqing Chen
d38d1406aa power: supply: rk816_battery: add power supply property for Android R
Signed-off-by: Shunqing Chen <csq@rock-chips.com>
Change-Id: I2346a76b5dc866c5e468923786c508aa7f8dc7a2
2020-10-09 16:36:06 +08:00
Shunqing Chen
a8f3d5a48a power: supply: rk817_battery: add power supply property for Android R
Signed-off-by: Shunqing Chen <csq@rock-chips.com>
Change-Id: I3621212fe6ed941d5d595fbcfd5865e1e265fdb1
2020-10-09 16:36:06 +08:00
Shunqing Chen
1dff96f5fe power: supply: rk818_battery: add power supply property for Android R
Signed-off-by: Shunqing Chen <csq@rock-chips.com>
Change-Id: I585aec225da6925bd592111c0dfcc0576f8b9968
2020-10-09 16:36:06 +08:00
Jianqun Xu
d2e366d488 arm64: dts: rockchip: rk3568 pinctrl core dts file update
Change-Id: Ic58507f7f66cfa606346dad9616e590c77b5d03d
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2020-10-09 16:27:30 +08:00
Vicent Chi
b93496804f driver: media: add sc210iot sensor support
Change-Id: Ib8bda8d9612d6dde919ff73b471ea1361653dd2c
Signed-off-by: Vicent Chi <vicent.chi@rock-chips.com>
2020-10-09 16:25:59 +08:00
Tao Huang
4c84333098 Revert "arm64: configs: rockchip_defconfig select ION_LEGENCY"
This reverts commit 1d8f622667.

Change-Id: I6ce44d77b486a7f35af306ced77a138a26f03b07
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
2020-10-09 15:52:41 +08:00
Jianqun Xu
59cab3cae5 Revert "staging: android: add ion_legency driver"
This reverts commit b53e459d52.
This reverts commit 32364c4431.

Change-Id: Ibffd99caf31e756870ac45d5e93c831a12b241bd
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2020-10-09 15:50:23 +08:00
Li Huang
403778342a RK3368 GPU: Remove ion client
Need to revert ion_legency.

Signed-off-by: Li Huang <putin.li@rock-chips.com>
Change-Id: I7a9a0dcfe0147a015db416f94c68edafb1f5632a
2020-10-09 15:50:23 +08:00
Cai YiWei
4abc0352ea media: rockchip: isp: request buf to alloc dummy buf
Change-Id: I9aea544b67ca546031234b6746552c2393b45476
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2020-10-09 15:45:50 +08:00
Huibin Hong
63031da897 ARM: dts: rockchip: rv1126: set debug-signal irq 127 for fiq debugger
Change-Id: I40a5846a197bf8b90cb9141dae0e982e68a5e2b1
Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
2020-10-09 14:18:25 +08:00
Cai YiWei
c840edbad4 media: rockchip: ispp: fix config err for tnr init off
Change-Id: I20303d777ecd2ff0db84ab289f525a4392ffedae
Signed-off-by: Cai YiWei <cyw@rock-chips.com>
2020-10-02 12:42:53 +08:00
Nick Desaulniers
141de28f95 ANDROID: use arm-linux-androidkernel- for CROSS_COMPILE_COMPAT
While ultimately resulting in the same binary being used, this allows
the arm64 compat vdso to use the same target triple as an ARCH=arm build
for Android.

This means that arm-linux-androideabi-elfedit doesn't need to be created
in: https://android.googlesource.com/platform/prebuilts/gas/linux-x86/.

Bug: 141693040
Test: BUILD_CONFIG=common/build.config.gki.aarch64 ./build/build.sh
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Change-Id: Iecebbfe2588615399c73255fd89d0c5ce42db9c0
2020-10-02 00:18:00 +00:00
Nick Desaulniers
b03349cb58 ANDROID: build.config.common: enable LLVM=1
This moves builds to all use LLVM=1 argument to make, rather than
CC=clang NM=llvm-nm OBJCOPY=llvm-objcopy ... (see also
https://www.kernel.org/doc/html/latest/kbuild/llvm.html#llvm-utilities).

Step 3 of:
https://android.googlesource.com/platform/prebuilts/clang/host/linux-x86/+/master/BINUTILS_KERNEL_DEPRECATION.md

Bug: 65987925
Bug: 141693040
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Change-Id: I0d1a4e322a76a91746f2d0888bbba1eee54a7926
2020-10-01 20:10:11 +00:00
Greg Kroah-Hartman
9ce79d9bed Merge 4.19.149 into android-4.19-stable
Changes in 4.19.149
	selinux: allow labeling before policy is loaded
	media: mc-device.c: fix memleak in media_device_register_entity
	dma-fence: Serialise signal enabling (dma_fence_enable_sw_signaling)
	ath10k: fix array out-of-bounds access
	ath10k: fix memory leak for tpc_stats_final
	mm: fix double page fault on arm64 if PTE_AF is cleared
	scsi: aacraid: fix illegal IO beyond last LBA
	m68k: q40: Fix info-leak in rtc_ioctl
	gma/gma500: fix a memory disclosure bug due to uninitialized bytes
	ASoC: kirkwood: fix IRQ error handling
	media: smiapp: Fix error handling at NVM reading
	arch/x86/lib/usercopy_64.c: fix __copy_user_flushcache() cache writeback
	x86/ioapic: Unbreak check_timer()
	ALSA: usb-audio: Add delay quirk for H570e USB headsets
	ALSA: hda/realtek - Couldn't detect Mic if booting with headset plugged
	ALSA: hda/realtek: Enable front panel headset LED on Lenovo ThinkStation P520
	lib/string.c: implement stpcpy
	leds: mlxreg: Fix possible buffer overflow
	PM / devfreq: tegra30: Fix integer overflow on CPU's freq max out
	scsi: fnic: fix use after free
	scsi: lpfc: Fix kernel crash at lpfc_nvme_info_show during remote port bounce
	net: silence data-races on sk_backlog.tail
	clk/ti/adpll: allocate room for terminating null
	drm/amdgpu/powerplay: fix AVFS handling with custom powerplay table
	mtd: cfi_cmdset_0002: don't free cfi->cfiq in error path of cfi_amdstd_setup()
	mfd: mfd-core: Protect against NULL call-back function pointer
	drm/amdgpu/powerplay/smu7: fix AVFS handling with custom powerplay table
	tpm_crb: fix fTPM on AMD Zen+ CPUs
	tracing: Adding NULL checks for trace_array descriptor pointer
	bcache: fix a lost wake-up problem caused by mca_cannibalize_lock
	dmaengine: mediatek: hsdma_probe: fixed a memory leak when devm_request_irq fails
	RDMA/qedr: Fix potential use after free
	RDMA/i40iw: Fix potential use after free
	fix dget_parent() fastpath race
	xfs: fix attr leaf header freemap.size underflow
	RDMA/iw_cgxb4: Fix an error handling path in 'c4iw_connect()'
	ubi: Fix producing anchor PEBs
	mmc: core: Fix size overflow for mmc partitions
	gfs2: clean up iopen glock mess in gfs2_create_inode
	scsi: pm80xx: Cleanup command when a reset times out
	debugfs: Fix !DEBUG_FS debugfs_create_automount
	CIFS: Properly process SMB3 lease breaks
	ASoC: max98090: remove msleep in PLL unlocked workaround
	kernel/sys.c: avoid copying possible padding bytes in copy_to_user
	KVM: arm/arm64: vgic: Fix potential double free dist->spis in __kvm_vgic_destroy()
	xfs: fix log reservation overflows when allocating large rt extents
	neigh_stat_seq_next() should increase position index
	rt_cpu_seq_next should increase position index
	ipv6_route_seq_next should increase position index
	seqlock: Require WRITE_ONCE surrounding raw_seqcount_barrier
	media: ti-vpe: cal: Restrict DMA to avoid memory corruption
	sctp: move trace_sctp_probe_path into sctp_outq_sack
	ACPI: EC: Reference count query handlers under lock
	scsi: ufs: Make ufshcd_add_command_trace() easier to read
	scsi: ufs: Fix a race condition in the tracing code
	dmaengine: zynqmp_dma: fix burst length configuration
	s390/cpum_sf: Use kzalloc and minor changes
	powerpc/eeh: Only dump stack once if an MMIO loop is detected
	Bluetooth: btrtl: Use kvmalloc for FW allocations
	tracing: Set kernel_stack's caller size properly
	ARM: 8948/1: Prevent OOB access in stacktrace
	ar5523: Add USB ID of SMCWUSBT-G2 wireless adapter
	ceph: ensure we have a new cap before continuing in fill_inode
	selftests/ftrace: fix glob selftest
	tools/power/x86/intel_pstate_tracer: changes for python 3 compatibility
	Bluetooth: Fix refcount use-after-free issue
	mm/swapfile.c: swap_next should increase position index
	mm: pagewalk: fix termination condition in walk_pte_range()
	Bluetooth: prefetch channel before killing sock
	KVM: fix overflow of zero page refcount with ksm running
	ALSA: hda: Clear RIRB status before reading WP
	skbuff: fix a data race in skb_queue_len()
	audit: CONFIG_CHANGE don't log internal bookkeeping as an event
	selinux: sel_avc_get_stat_idx should increase position index
	scsi: lpfc: Fix RQ buffer leakage when no IOCBs available
	scsi: lpfc: Fix coverity errors in fmdi attribute handling
	drm/omap: fix possible object reference leak
	clk: stratix10: use do_div() for 64-bit calculation
	crypto: chelsio - This fixes the kernel panic which occurs during a libkcapi test
	mt76: clear skb pointers from rx aggregation reorder buffer during cleanup
	ALSA: usb-audio: Don't create a mixer element with bogus volume range
	perf test: Fix test trace+probe_vfs_getname.sh on s390
	RDMA/rxe: Fix configuration of atomic queue pair attributes
	KVM: x86: fix incorrect comparison in trace event
	dmaengine: stm32-mdma: use vchan_terminate_vdesc() in .terminate_all
	media: staging/imx: Missing assignment in imx_media_capture_device_register()
	x86/pkeys: Add check for pkey "overflow"
	bpf: Remove recursion prevention from rcu free callback
	dmaengine: stm32-dma: use vchan_terminate_vdesc() in .terminate_all
	dmaengine: tegra-apb: Prevent race conditions on channel's freeing
	drm/amd/display: dal_ddc_i2c_payloads_create can fail causing panic
	firmware: arm_sdei: Use cpus_read_lock() to avoid races with cpuhp
	random: fix data races at timer_rand_state
	bus: hisi_lpc: Fixup IO ports addresses to avoid use-after-free in host removal
	media: go7007: Fix URB type for interrupt handling
	Bluetooth: guard against controllers sending zero'd events
	timekeeping: Prevent 32bit truncation in scale64_check_overflow()
	ext4: fix a data race at inode->i_disksize
	perf jevents: Fix leak of mapfile memory
	mm: avoid data corruption on CoW fault into PFN-mapped VMA
	drm/amdgpu: increase atombios cmd timeout
	drm/amd/display: Stop if retimer is not available
	ath10k: use kzalloc to read for ath10k_sdio_hif_diag_read
	scsi: aacraid: Disabling TM path and only processing IOP reset
	Bluetooth: L2CAP: handle l2cap config request during open state
	media: tda10071: fix unsigned sign extension overflow
	xfs: don't ever return a stale pointer from __xfs_dir3_free_read
	xfs: mark dir corrupt when lookup-by-hash fails
	ext4: mark block bitmap corrupted when found instead of BUGON
	tpm: ibmvtpm: Wait for buffer to be set before proceeding
	rtc: sa1100: fix possible race condition
	rtc: ds1374: fix possible race condition
	nfsd: Don't add locks to closed or closing open stateids
	RDMA/cm: Remove a race freeing timewait_info
	KVM: PPC: Book3S HV: Treat TM-related invalid form instructions on P9 like the valid ones
	drm/msm: fix leaks if initialization fails
	drm/msm/a5xx: Always set an OPP supported hardware value
	tracing: Use address-of operator on section symbols
	thermal: rcar_thermal: Handle probe error gracefully
	perf parse-events: Fix 3 use after frees found with clang ASAN
	serial: 8250_port: Don't service RX FIFO if throttled
	serial: 8250_omap: Fix sleeping function called from invalid context during probe
	serial: 8250: 8250_omap: Terminate DMA before pushing data on RX timeout
	perf cpumap: Fix snprintf overflow check
	cpufreq: powernv: Fix frame-size-overflow in powernv_cpufreq_work_fn
	tools: gpio-hammer: Avoid potential overflow in main
	nvme-multipath: do not reset on unknown status
	nvme: Fix controller creation races with teardown flow
	RDMA/rxe: Set sys_image_guid to be aligned with HW IB devices
	scsi: hpsa: correct race condition in offload enabled
	SUNRPC: Fix a potential buffer overflow in 'svc_print_xprts()'
	svcrdma: Fix leak of transport addresses
	PCI: Use ioremap(), not phys_to_virt() for platform ROM
	ubifs: Fix out-of-bounds memory access caused by abnormal value of node_len
	ALSA: usb-audio: Fix case when USB MIDI interface has more than one extra endpoint descriptor
	PCI: pciehp: Fix MSI interrupt race
	NFS: Fix races nfs_page_group_destroy() vs nfs_destroy_unlinked_subrequests()
	mm/kmemleak.c: use address-of operator on section symbols
	mm/filemap.c: clear page error before actual read
	mm/vmscan.c: fix data races using kswapd_classzone_idx
	nvmet-rdma: fix double free of rdma queue
	mm/mmap.c: initialize align_offset explicitly for vm_unmapped_area
	scsi: qedi: Fix termination timeouts in session logout
	serial: uartps: Wait for tx_empty in console setup
	KVM: Remove CREATE_IRQCHIP/SET_PIT2 race
	bdev: Reduce time holding bd_mutex in sync in blkdev_close()
	drivers: char: tlclk.c: Avoid data race between init and interrupt handler
	KVM: arm64: vgic-its: Fix memory leak on the error path of vgic_add_lpi()
	net: openvswitch: use u64 for meter bucket
	scsi: aacraid: Fix error handling paths in aac_probe_one()
	staging:r8188eu: avoid skb_clone for amsdu to msdu conversion
	sparc64: vcc: Fix error return code in vcc_probe()
	arm64: cpufeature: Relax checks for AArch32 support at EL[0-2]
	dt-bindings: sound: wm8994: Correct required supplies based on actual implementaion
	atm: fix a memory leak of vcc->user_back
	perf mem2node: Avoid double free related to realloc
	power: supply: max17040: Correct voltage reading
	phy: samsung: s5pv210-usb2: Add delay after reset
	Bluetooth: Handle Inquiry Cancel error after Inquiry Complete
	USB: EHCI: ehci-mv: fix error handling in mv_ehci_probe()
	tipc: fix memory leak in service subscripting
	tty: serial: samsung: Correct clock selection logic
	ALSA: hda: Fix potential race in unsol event handler
	powerpc/traps: Make unrecoverable NMIs die instead of panic
	fuse: don't check refcount after stealing page
	USB: EHCI: ehci-mv: fix less than zero comparison of an unsigned int
	scsi: cxlflash: Fix error return code in cxlflash_probe()
	arm64/cpufeature: Drop TraceFilt feature exposure from ID_DFR0 register
	e1000: Do not perform reset in reset_task if we are already down
	drm/nouveau/debugfs: fix runtime pm imbalance on error
	drm/nouveau: fix runtime pm imbalance on error
	drm/nouveau/dispnv50: fix runtime pm imbalance on error
	printk: handle blank console arguments passed in.
	usb: dwc3: Increase timeout for CmdAct cleared by device controller
	btrfs: don't force read-only after error in drop snapshot
	vfio/pci: fix memory leaks of eventfd ctx
	perf evsel: Fix 2 memory leaks
	perf trace: Fix the selection for architectures to generate the errno name tables
	perf stat: Fix duration_time value for higher intervals
	perf util: Fix memory leak of prefix_if_not_in
	perf metricgroup: Free metric_events on error
	perf kcore_copy: Fix module map when there are no modules loaded
	ASoC: img-i2s-out: Fix runtime PM imbalance on error
	wlcore: fix runtime pm imbalance in wl1271_tx_work
	wlcore: fix runtime pm imbalance in wlcore_regdomain_config
	mtd: rawnand: omap_elm: Fix runtime PM imbalance on error
	PCI: tegra: Fix runtime PM imbalance on error
	ceph: fix potential race in ceph_check_caps
	mm/swap_state: fix a data race in swapin_nr_pages
	rapidio: avoid data race between file operation callbacks and mport_cdev_add().
	mtd: parser: cmdline: Support MTD names containing one or more colons
	x86/speculation/mds: Mark mds_user_clear_cpu_buffers() __always_inline
	vfio/pci: Clear error and request eventfd ctx after releasing
	cifs: Fix double add page to memcg when cifs_readpages
	nvme: fix possible deadlock when I/O is blocked
	scsi: libfc: Handling of extra kref
	scsi: libfc: Skip additional kref updating work event
	selftests/x86/syscall_nt: Clear weird flags after each test
	vfio/pci: fix racy on error and request eventfd ctx
	btrfs: qgroup: fix data leak caused by race between writeback and truncate
	ubi: fastmap: Free unused fastmap anchor peb during detach
	perf parse-events: Use strcmp() to compare the PMU name
	net: openvswitch: use div_u64() for 64-by-32 divisions
	nvme: explicitly update mpath disk capacity on revalidation
	ASoC: wm8994: Skip setting of the WM8994_MICBIAS register for WM1811
	ASoC: wm8994: Ensure the device is resumed in wm89xx_mic_detect functions
	ASoC: Intel: bytcr_rt5640: Add quirk for MPMAN Converter9 2-in-1
	RISC-V: Take text_mutex in ftrace_init_nop()
	s390/init: add missing __init annotations
	lockdep: fix order in trace_hardirqs_off_caller()
	drm/amdkfd: fix a memory leak issue
	i2c: core: Call i2c_acpi_install_space_handler() before i2c_acpi_register_devices()
	objtool: Fix noreturn detection for ignored functions
	ieee802154: fix one possible memleak in ca8210_dev_com_init
	ieee802154/adf7242: check status of adf7242_read_reg
	clocksource/drivers/h8300_timer8: Fix wrong return value in h8300_8timer_init()
	mwifiex: Increase AES key storage size to 256 bits
	batman-adv: bla: fix type misuse for backbone_gw hash indexing
	atm: eni: fix the missed pci_disable_device() for eni_init_one()
	batman-adv: mcast/TT: fix wrongly dropped or rerouted packets
	mac802154: tx: fix use-after-free
	bpf: Fix clobbering of r2 in bpf_gen_ld_abs
	drm/vc4/vc4_hdmi: fill ASoC card owner
	net: qed: RDMA personality shouldn't fail VF load
	drm/sun4i: sun8i-csc: Secondary CSC register correction
	batman-adv: Add missing include for in_interrupt()
	batman-adv: mcast: fix duplicate mcast packets in BLA backbone from mesh
	batman-adv: mcast: fix duplicate mcast packets from BLA backbone to mesh
	bpf: Fix a rcu warning for bpffs map pretty-print
	ALSA: asihpi: fix iounmap in error handler
	regmap: fix page selection for noinc reads
	MIPS: Add the missing 'CPU_1074K' into __get_cpu_type()
	KVM: x86: Reset MMU context if guest toggles CR4.SMAP or CR4.PKE
	KVM: SVM: Add a dedicated INVD intercept routine
	tracing: fix double free
	s390/dasd: Fix zero write for FBA devices
	kprobes: Fix to check probe enabled before disarm_kprobe_ftrace()
	mm, THP, swap: fix allocating cluster for swapfile by mistake
	s390/zcrypt: Fix ZCRYPT_PERDEV_REQCNT ioctl
	kprobes: Fix compiler warning for !CONFIG_KPROBES_ON_FTRACE
	ata: define AC_ERR_OK
	ata: make qc_prep return ata_completion_errors
	ata: sata_mv, avoid trigerrable BUG_ON
	KVM: arm64: Assume write fault on S1PTW permission fault on instruction fetch
	Linux 4.19.149

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Idfc1b35ec63b4b464aeb6e32709102bee0efc872
2020-10-01 16:49:05 +02:00
Greg Kroah-Hartman
b09c34517e Linux 4.19.149
Tested-by: Jon Hunter <jonathanh@nvidia.com>
Tested-by: Shuah Khan <skhan@linuxfoundation.org>
Tested-by: Linux Kernel Functional Testing <lkft@linaro.org>
Link: https://lore.kernel.org/r/20200929142826.951084251@linuxfoundation.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-10-01 13:14:54 +02:00
Marc Zyngier
1fa2c32e37 KVM: arm64: Assume write fault on S1PTW permission fault on instruction fetch
commit c4ad98e4b7 upstream.

KVM currently assumes that an instruction abort can never be a write.
This is in general true, except when the abort is triggered by
a S1PTW on instruction fetch that tries to update the S1 page tables
(to set AF, for example).

This can happen if the page tables have been paged out and brought
back in without seeing a direct write to them (they are thus marked
read only), and the fault handling code will make the PT executable(!)
instead of writable. The guest gets stuck forever.

In these conditions, the permission fault must be considered as
a write so that the Stage-1 update can take place. This is essentially
the I-side equivalent of the problem fixed by 60e21a0ef5 ("arm64: KVM:
Take S1 walks into account when determining S2 write faults").

Update kvm_is_write_fault() to return true on IABT+S1PTW, and introduce
kvm_vcpu_trap_is_exec_fault() that only return true when no faulting
on a S1 fault. Additionally, kvm_vcpu_dabt_iss1tw() is renamed to
kvm_vcpu_abt_iss1tw(), as the above makes it plain that it isn't
specific to data abort.

Signed-off-by: Marc Zyngier <maz@kernel.org>
Reviewed-by: Will Deacon <will@kernel.org>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20200915104218.1284701-2-maz@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-10-01 13:14:54 +02:00
Jiri Slaby
3b69fe0d6d ata: sata_mv, avoid trigerrable BUG_ON
commit e9f691d899 upstream.

There are several reports that the BUG_ON on unsupported command in
mv_qc_prep can be triggered under some circumstances:
https://bugzilla.suse.com/show_bug.cgi?id=1110252
https://serverfault.com/questions/888897/raid-problems-after-power-outage
https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1652185
https://bugs.centos.org/view.php?id=14998

Let sata_mv handle the failure gracefully: warn about that incl. the
failed command number and return an AC_ERR_INVALID error. We can do that
now thanks to the previous patch.

Remove also the long-standing FIXME.

[v2] use %.2x as commands are defined as hexa.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: linux-ide@vger.kernel.org
Cc: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-10-01 13:14:54 +02:00
Jiri Slaby
c9a512f8fa ata: make qc_prep return ata_completion_errors
commit 95364f3670 upstream.

In case a driver wants to return an error from qc_prep, return enum
ata_completion_errors. sata_mv is one of those drivers -- see the next
patch. Other drivers return the newly defined AC_ERR_OK.

[v2] use enum ata_completion_errors and AC_ERR_OK.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: linux-ide@vger.kernel.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-10-01 13:14:54 +02:00