Commit Graph

604 Commits

Author SHA1 Message Date
Finley Xiao
3e0f904b83 PM / devfreq: rockchip-dfi: build depends on CPU config
This optimizes the size of rockchip-otp.o, details as follows.

./scripts/bloat-o-meter rockchip-dfi-old.o rockchip-dfi.o
add/remove: 0/20 grow/shrink: 0/1 up/down: 0/-3564 (-3564)
Function                                     old     new   delta
rk3368_dfi_set_event                           8       -      -8
rk3288_dfi_set_event                           8       -      -8
rk3128_dfi_set_event                           8       -      -8
rk3368_dfi_ops                                20       -     -20
rk3288_dfi_ops                                20       -     -20
rk3128_dfi_ops                                20       -     -20
rk3368_dfi_disable                            36       -     -36
rk3288_dfi_disable                            36       -     -36
rk3128_dfi_disable                            36       -     -36
rk3368_dfi_enable                             40       -     -40
rk3288_dfi_enable                             40       -     -40
rk3128_dfi_enable                             40       -     -40
rk3368_dfi_init                               76       -     -76
rk3128_dfi_init                               76       -     -76
rk3328_dfi_init                              212       -    -212
rk3128_dfi_get_event                         212       -    -212
rk3288_dfi_init                              240       -    -240
rockchip_dfi_init                            256       -    -256
rk3368_dfi_get_event                         260       -    -260
rk3288_dfi_get_event                         352       -    -352
rockchip_dfi_id_match                       1960     392   -1568
Total: Before=5144, After=1580, chg -69.28%

Change-Id: Ibb2b001fb9afdcb6fec5db9d075c71b3abb6fbf3
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2022-03-10 11:42:20 +08:00
Finley Xiao
3b2f4c277f PM / devfreq: rockchip_dmc: Fix WARNING when remove static OPP
Only dynamic OPPs can be removed by dev_pm_opp_remove.

[    2.484575][    T9] ------------[ cut here ]------------
[    2.485095][    T9] WARNING: CPU: 1 PID: 9 at drivers/opp/core.c:1205 dev_pm_opp_put_opp_table+0x130/0x138
[    2.487307][    T9] Modules linked in:
[    2.488411][    T9] CPU: 1 PID: 9 Comm: kworker/u16:1 Not tainted 5.10.66 #1871
[    2.489755][    T9] Hardware name: Rockchip RK3588 EVB1 LP4 V10 Board (DT)
[    2.491020][    T9] Workqueue: events_unbound deferred_probe_work_func
[    2.492845][    T9] pstate: 20800009 (nzCv daif -PAN +UAO -TCO BTYPE=--)
[    2.494247][    T9] pc : dev_pm_opp_put_opp_table+0x130/0x138
[    2.494759][    T9] lr : dev_pm_opp_put_opp_table+0x88/0x138
[    2.494767][    T9] sp : ffffffc01220b990
[    2.496151][    T9] x29: ffffffc01220b990
[    2.497399][    T9] x28: ffffff8102cc1488
[    2.498665][    T9]
[    2.498668][    T9] x27: 0000000000000000 x26: 00000000ffffffea
[    2.498675][    T9] x25: ffffffc0118d3536 x24: ffffff8103da5810
[    2.502111][    T9] x23: ffffff8103febf00 x22: dead000000000100
[    2.502680][    T9] x21: ffffff8101058010 x20: ffffff8102cc1800
[    2.503211][    T9] x19: ffffff8102cc1878 x18: ffffffc0120b5088
[    2.503742][    T9] x17: 0000000000000000 x16: 00000000000000d8
[    2.504273][    T9] x15: 0000000000000004 x14: 0000000000003fff
[    2.504812][    T9] x13: ffffffc011bec968 x12: 0000000000000003
[    2.506346][    T9] x11: 0000000000000000 x10: ffffffc1ed335000
[    2.507322][    T9] x9 : ffffff8103febe00 x8 : ffffff8102cc1868
[    2.507853][    T9] x7 : 342e32202020205b x6 : ffffffc011fc9db8
[    2.508385][    T9] x5 : ffffffffffffffff x4 : ffffff81fee890a0
[    2.508918][    T9] x3 : 0000000000000c59 x2 : ffffff8103da5500
[    2.509454][    T9] x1 : 0000000000000000 x0 : 0000000000000000
[    2.509988][    T9] Call trace:
[    2.510269][    T9]  dev_pm_opp_put_opp_table+0x130/0x138
[    2.510746][    T9]  dev_pm_opp_remove+0xe0/0xe4
[    2.511161][    T9]  rockchip_get_freq_info+0xd4/0x294
[    2.511614][    T9]  rk3588_dmc_init+0x148/0x234
[    2.512024][    T9]  rockchip_dmcfreq_probe+0x2f0/0x1498
[    2.512489][    T9]  platform_drv_probe+0x9c/0xc4
[    2.512910][    T9]  really_probe+0x204/0x510
[    2.513331][    T9]  driver_probe_device+0x80/0xc0
[    2.513788][    T9]  __device_attach_driver+0x118/0x140
[    2.514249][    T9]  bus_for_each_drv+0x84/0xd4
[    2.514654][    T9]  __device_attach+0xc0/0x158
[    2.515059][    T9]  device_initial_probe+0x18/0x28
[    2.515486][    T9]  bus_probe_device+0x38/0xa0
[    2.515891][    T9]  deferred_probe_work_func+0x80/0xe0
[    2.516352][    T9]  process_one_work+0x1f4/0x490
[    2.516768][    T9]  worker_thread+0x324/0x4dc
[    2.517164][    T9]  kthread+0x13c/0x344
[    2.517516][    T9]  ret_from_fork+0x10/0x30

Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I5638b51e1e1f651c0a6755cebf9529fe64be4419
2022-02-09 20:22:34 +08:00
YouMin Chen
5c4f1d6e3d PM / devfreq: rockchip_dmc: add support for rk3588
Signed-off-by: YouMin Chen <cym@rock-chips.com>
Change-Id: I2869e9a9afa3531d8300ef04393f0e6ea61626d2
2021-12-24 20:23:13 +08:00
Zhihuan He
d932640623 PM / devfreq: rockchip-dfi: add rk3588 dfi support
Signed-off-by: Zhihuan He <huan.he@rock-chips.com>
Change-Id: I0bebfd16aa4897f770f70aca70b0e9a88808446f
2021-12-24 20:16:47 +08:00
Tao Huang
f6909c028f Merge tag 'ASB-2021-12-05_12-5.10' of https://android.googlesource.com/kernel/common
https://source.android.com/security/bulletin/2021-12-01
CVE-2021-33909
CVE-2021-38204
CVE-2021-0961

* tag 'ASB-2021-12-05_12-5.10': (3010 commits)
  ANDROID: workqueue: export symbol of the function wq_worker_comm()
  ANDROID: GKI: Update symbols to symbol list
  ANDROID: vendor_hooks: Add hooks for binder proc transaction
  ANDROID: GKI: Add symbols abi for USB IP kernel modules.
  ANDROID: GKI: Fix file mode on mtk abi file
  UPSTREAM: erofs: fix deadlock when shrink erofs slab
  ANDROID: init_task: Init android vendor and oem data
  UPSTREAM: sched/core: Mitigate race cpus_share_cache()/update_top_cache_domain()
  ANDROID: Update symbol list for mtk
  UPSTREAM: erofs: fix unsafe pagevec reuse of hooked pclusters
  UPSTREAM: erofs: remove the occupied parameter from z_erofs_pagevec_enqueue()
  UPSTREAM: usb: dwc3: gadget: Fix null pointer exception
  ANDROID: fips140: support "evaluation testing" builds via build.sh
  FROMGIT: sched/scs: Reset task stack state in bringup_cpu()
  ANDROID: dma-buf: heaps: fix dma-buf heap pool pages stat
  ANDROID: ABI: Add several spi_mem related symbols
  UPSTREAM: spi: spi-mem: add spi_mem_dtr_supports_op()
  ANDROID: gki_defconfig: enable CONFIG_SPI_MEM
  ANDROID: ABI: Add several iio related symbols
  ANDROID: ABI: Update symbol list for IMX
  ...

Change-Id: I09cddc92fa34553b944e62cc5cbbba94a84e5437

Conflicts:
	arch/arm/boot/dts/rk322x.dtsi
	arch/arm64/boot/dts/rockchip/rk3399.dtsi
	drivers/dma-buf/heaps/system_heap.c
	drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c
	drivers/gpu/drm/rockchip/rockchip_drm_vop.c
	drivers/gpu/drm/rockchip/rockchip_lvds.c
	drivers/gpu/drm/rockchip/rockchip_vop_reg.c
	drivers/mtd/nand/spi/core.c
	drivers/pci/controller/pcie-rockchip-host.c
	drivers/soc/rockchip/Kconfig
	drivers/usb/dwc3/core.c
	drivers/usb/dwc3/core.h
2021-12-14 17:09:02 +08:00
Finley Xiao
f1123f2aab PM / devfreq: rockchip_dmc: Change frequency according to vop frame bandwidth
Sometimes the vop line bandwidth is not high, the vop also report
buf empty err, and the frame bandwidth is high at this time, so change
ddr frequency according to frame bandwidth can fix the error.

Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: Ia893a07def99aaaa4da421b6d619a8fd3eec9745
2021-10-29 19:00:34 +08:00
Sandy Huang
a3d4f6e0df drm/rockchip: vop: add calculate current frame data size
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: Ie9c92c651b8c379c77aac941d03bf3f772ed7eea
2021-10-29 19:00:34 +08:00
Finley Xiao
1400843a24 PM / devfreq: rockchip_dmc: Change frequency according to cpu bandwidth
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I69376a2e620292642b1118f770c50f9002c450b4
2021-10-27 15:28:30 +08:00
Finley Xiao
4ad4f153e4 PM / devfreq: rockchip-nocp: Add support for rk3568
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I2d311d48a54a1f254eda749aa6d9d157d106e02b
2021-10-27 15:28:30 +08:00
Finley Xiao
c2636d3312 PM / devfreq: rockchip_dmc: Add sysfs interface for ondemand_data
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I399a78aa2f63b266824a5cd302328a0d3e2aadcd
2021-10-27 15:28:30 +08:00
Finley Xiao
23333b7bbf PM / devfreq: Remove DEVFREQ_GOV_SIMPLE_ONDEMAND dependency for dmc
Change-Id: Ie08689996ee4f3554c2d0e6bef61d23029bc5d07
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2021-10-27 15:28:30 +08:00
Finley Xiao
4def68e21f PM / devfreq: rockchip_dmc: Add rockchip_simple_ondemand_data
Add a new struct rockchip_simple_ondemand_data so that rockchip_dmc.c
does not need to depend on CONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND.

Change-Id: Iafe7ec8bbc9a36aaf3dffbe669a8ee927f45d3a1
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2021-10-27 15:28:30 +08:00
YouMin Chen
7252791b6d PM / devfreq: rockchip_dmc: remove of_get_rk3568_timings
For rk3568, ddr timings adjustment is no longer supported in dmc drive.

Signed-off-by: YouMin Chen <cym@rock-chips.com>
Change-Id: I63f0c5fea8c5acf8e6ef8f44b62968deb7bd823e
2021-10-26 10:45:45 +08:00
Finley Xiao
369abda7d1 PM / devfreq: rockchip_dmc: Split out some functions into separate file
Fix the depmod error as follows.
depmod: ERROR: Cycle detected: rockchip_dmc -> rockchipdrm -> rockchip_dmc

Change-Id: I99c2a959e9220836b78ef48a2d43f37b56ecedf1
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2021-08-06 20:11:06 +08:00
Finley Xiao
990b7b2229 PM / devfreq: rk3399_dmc: rename driver to 'rockchip_dmc'
In future it will be modified to support more rockchip platforms.

Change-Id: I5cd7ce555eefe08b12fbfcda8ef445c4b169e8c6
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2021-07-28 14:38:18 +08:00
YouMin Chen
c50f99f2f3 PM / devfreq: rockchip_dmc: use rockchip_drm_get_sub_dev_type to get lcdc_type
Change-Id: Ic1eb21c6b6b45a2c8c36d3666a987a32f3b50f05
Signed-off-by: YouMin Chen <cym@rock-chips.com>
2021-07-28 14:20:43 +08:00
YouMin Chen
a02f4a7f2e PM / devfreq: rockchip_dmc: rk3568: add rockchip_ddr_set_rate
Add rockchip_ddr_set_rate to support ddr frequency switching.
This function wraps the SMC call and frequency switching is
implemented in ATF. Afterwards it will call clk_get_rate to
update the rate in clock framework.
Set dmcfreq->is_set_rate_in_dmc=true to enable this process.

Change-Id: I9349a2e8413751360bf105a70e46d1453791194c
Signed-off-by: YouMin Chen <cym@rock-chips.com>
2021-07-27 18:48:07 +08:00
YouMin Chen
55821a0836 PM / devfreq: rockchip_dmc: rk3568: get available frequencies from ATF
Add the function of rockchip_get_freq_info to get available ddr
frequencies info via SMC call. The frequency info include available
frequencies count and frequencies table(sort by rate from low to high).
Afterwards it will update the dmc_opp_table base on frequencies info.

If have "system-status-level" property in dmc, the function of
rockchip_get_system_status_level will get the frequency for
system-status base on frequency level and available frequencies table.

Change-Id: I73d0f999e718ba9426ad75e48ac2a4ec3fe5f496
Signed-off-by: YouMin Chen <cym@rock-chips.com>
2021-07-27 18:48:07 +08:00
Finley Xiao
3e45580f16 PM / devfreq: rockchip_dmc: Fix rate when enter isp and dulaview statuses
As the frequency can't be changed in isp and dulaview statuses,
the target frequency should be the bigger one, both in isp status
or in dulaview status.

Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: Id9182d591f615304f24ccba5816424a876046dc3
2021-07-16 16:29:11 +08:00
Finley Xiao
823b966dcf PM / devfreq: rockchip_dmc: Fix misused IS_ERR_OR_NULL checks
Fixes the following warning:
drivers/devfreq/rockchip_dmc.c:2914
rockchip_dmcfreq_register_cooling_device() warn: passing zero to 'PTR_ERR'

Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: Ia8b0811d0e27394e420b862305917314189f94be
2021-07-16 16:23:58 +08:00
Liang Chen
a26f8c19dd PM / devfreq: rockchip_bus: support soc bus devfreq
Change-Id: Iba750d4522b99e88c16c8e4a77d3367fbb2a0d82
Signed-off-by: Tony Xie <tony.xie@rock-chips.com>
Signed-off-by: Liang Chen <cl@rock-chips.com>
2021-07-16 16:23:54 +08:00
Liang Chen
87e27bcaf0 PM / devfreq: rockchip_bus: add support for rk3568
Add support for rk3568 and init opp-table with rockchip_init_opp_table()
so that rockchip_bus can support pvtm and leakage.

Change-Id: Ief17dba8264906f987d4dac93b2e7344c98bc8fa
Signed-off-by: Liang Chen <cl@rock-chips.com>
2021-07-16 16:22:45 +08:00
Finley Xiao
aacc268cae PM / devfreq: rockchip_bus: Fix invalid member dereference of cpufreq_freqs
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I45521ebb19283f3e14a75974b25b8a8d4c64bde1
2021-07-16 16:22:45 +08:00
YouMin Chen
a97e2d456d PM / devfreq: rockchip-dfi: add support lpddr4x
Change-Id: Icd86a458dc9843e80d9206d620a1da6a71adf799
Signed-off-by: YouMin Chen <cym@rock-chips.com>
2021-07-15 10:56:20 +08:00
Finley Xiao
f35cf18299 PM / devfreq: event: Add new Rockchip NoC probe driver
This patch adds NoC (Network on Chip) Probe driver which provides
the primitive values to get the performance data. For example, RK3399
has multiple NoC probes to monitor traffic statistics for analyzing
the transaction flow.

Change-Id: I66f6708f0d244488ca08f0f1f1cb36b19c7a2d0a
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2021-07-15 10:55:00 +08:00
YouMin Chen
e0603b1c99 PM / devfreq: rockchip-dfi: add support for rk3568 dfi
Change-Id: I62d21e31cd56e82c04de675be502b261ba3740da
Signed-off-by: YouMin Chen <cym@rock-chips.com>
2021-07-15 10:54:59 +08:00
YouMin Chen
0369dd4ab2 PM / devfreq: rockchip-dfi: add support for rv1126 dfi
Change-Id: I65a403424b68804022025309f9af82b55c044192
Signed-off-by: YouMin Chen <cym@rock-chips.com>
2021-07-15 10:54:59 +08:00
YouMin Chen
354584ddce PM / devfreq: rockchip-dfi: fix lpddr4 calculation error
Fix lpddr4 calculation error about access.
LPDDR4 BL(burst length) = 16,other DDR type BL(burst length) = 8.

Change-Id: Icc1b4f6764fa0b23ec1f7722bda8ffeff1da4ab7
Signed-off-by: YouMin Chen <cym@rock-chips.com>
2021-07-15 10:54:59 +08:00
YouMin Chen
b949c38cbd PM / devfreq: rockchip-dfi: add support for rk1808 dfi
Change-Id: Id95eca244c666b103ce4f9676e2abbeb304196ac
Signed-off-by: YouMin Chen <cym@rock-chips.com>
2021-07-15 10:54:59 +08:00
YouMin Chen
eefc791ec8 PM / devfreq: event: add support for px30 dfi
Change-Id: Ib6808d961b65d993fea05ab15d648d814d14a4a2
Signed-off-by: YouMin Chen <cym@rock-chips.com>
2021-07-15 10:54:59 +08:00
CanYang He
8d4209ee06 PM / devfreq: event: add support for rk3328 dfi
This adds the necessary data for handling dfi on the rk3328.

Change-Id: Id870f78dad3ddd6cb5771674a4e8905322f9e8ef
Signed-off-by: CanYang He <hcy@rock-chips.com>
2021-07-15 10:54:59 +08:00
CanYang He
0873229b24 PM / devfreq: event: make dfi more extension
after modify, rockchip_dfi_ops can apply to other platform use such
version ddr monitor. regardless of channel count, only one channel
of rk3288,rk3399,rk3328 can work. and regardless of monitor clk,
some platform like rk3328 monitor clk is always on.

Change-Id: Ia1c02a89116546ded385c5a6a3e36d020d66b7f3
Signed-off-by: CanYang He <hcy@rock-chips.com>
2021-07-15 10:54:52 +08:00
Liang Chen
7d494650c3 PM / devfreq: event: add support for rk3128 dfi
This adds the necessary data for handling dfi on the rk3128.
Access the dfi via registers provided by GRF (general register
files) module.

Change-Id: Ife9e9987224088434e878102b7d1c3b132e761ad
Signed-off-by: Liang Chen <cl@rock-chips.com>
2021-07-15 10:49:09 +08:00
Tang Yun ping
0519cdf40c PM / devfreq: event: add support for rk3288 dfi
This adds the necessary data for handling dfi on the rk3288.
Access the dfi via registers provided by GRF (general register
files) module.

Change-Id: Ic7241af3c20a269ab362055dea04d260e01c50de
Signed-off-by: Tang Yun ping <typ@rock-chips.com>
2021-07-15 10:49:09 +08:00
Finley Xiao
b495cbf359 PM / devfreq: event: add support for rk3368 dfi
This adds the necessary data for handling dfi on the rk3368.
Access the dfi via registers provided by GRF (general register
files) module.

Change-Id: I96c2b4dcd34d90731b749ebdbe6922f01559d8e6
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2021-07-15 10:49:09 +08:00
YueHaibing
4dcb59d6a2 PM / devfreq: Add missing error code in devfreq_add_device()
[ Upstream commit 18b380ed61 ]

Set err code in the error path before jumping to the end of the function.

Fixes: 4dc3bab868 ("PM / devfreq: Add support delayed timer for polling mode")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-07-14 16:56:11 +02:00
Jianqun Xu
6e488e859f PM / devfreq: add to show current load of device
Calculate current load with busytime / totaltime from status,
also show the current frequency.

Change-Id: Ic310035db9c5478aa3d0b1e526b47c451fe09d23
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2021-06-30 18:26:24 +08:00
Jianqun Xu
d85e70122d PM / devfreq: rockchip-dfi: disable irqs during accessing ddr monitor
Change-Id: Ie4817a77fcb1283f37f41ab097f02ed7dc9cd18c
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
2021-06-30 18:22:28 +08:00
Tao Huang
582f79266f Merge remote branch 'android12-5.10' of https://android.googlesource.com/kernel/common
* android12-5.10: (2274 commits)
  FROMGIT: mm: slub: move sysfs slab alloc/free interfaces to debugfs
  ANDROID: gki - CONFIG_NET_SCH_FQ=y
  ANDROID: GKI: Kconfig.gki: Add GKI_HIDDEN_ETHERNET_CONFIGS
  FROMLIST: media: Kconfig: Fix DVB_CORE can't be selected as module
  ANDROID: Update ABI and symbol list
  Revert "net: usb: cdc_ncm: don't spew notifications"
  ANDROID: Fips 140: move fips symbols entirely in own list
  ANDROID: core of xt_IDLETIMER send_nl_msg support
  ANDROID: start to re-add xt_IDLETIMER send_nl_msg support
  ANDROID: add fips140.ko symbols to module ABI
  ANDROID: inject correct HMAC digest into fips140.ko at build time
  ANDROID: crypto: fips140 - perform load time integrity check
  FROMLIST: crypto: shash - stop comparing function pointers to avoid breaking CFI
  ANDROID: arm64: module: preserve RELA sections for FIPS140 integrity selfcheck
  ANDROID: arm64: simd: omit capability check in may_use_simd()
  ANDROID: kbuild: lto: permit the use of .a archives in LTO modules
  ANDROID: arm64: only permit certain alternatives in the FIPS140 module
  ANDROID: crypto: lib/aes - add vendor hooks for AES library routines
  ANDROID: crypto: lib/sha256 - add vendor hook for sha256() routine
  UPSTREAM: KVM: arm64: Mark the host stage-2 memory pools static
  ...

Conflicts:
	drivers/mmc/core/mmc_ops.c
	drivers/usb/gadget/function/f_uac1.c
	drivers/usb/gadget/function/f_uac2.c
	drivers/usb/gadget/function/f_uvc.c
2021-06-25 11:32:04 +08:00
Dong Aisheng
0681c62d1e PM / devfreq: Use more accurate returned new_freq as resume_freq
[ Upstream commit 62453f1ba5 ]

Use the more accurate returned new_freq as resume_freq.
It's the same as how devfreq->previous_freq was updated.

Fixes: 83f8ca45af ("PM / devfreq: add support for suspend/resume of a devfreq device")
Signed-off-by: Dong Aisheng <aisheng.dong@nxp.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-05-14 09:50:15 +02:00
Lukasz Luba
2f2d444ac4 PM / devfreq: Unlock mutex and free devfreq struct in error path
commit 8b50a79957 upstream.

The devfreq->lock is held for time of setup. Release the lock in the
error path, before jumping to the end of the function.

Change the goto destination which frees the allocated memory.

Cc: v5.9+ <stable@vger.kernel.org> # v5.9+
Fixes: 4dc3bab868 ("PM / devfreq: Add support delayed timer for polling mode")
Signed-off-by: Lukasz Luba <lukasz.luba@arm.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-05-14 09:49:58 +02:00
Tao Huang
bc69b758ef Merge remote branch 'android12-5.10' of https://android.googlesource.com/kernel/common
* android12-5.10: (176331 commits)
  ANDROID: GKI: Enable bounds sanitizer
  ANDROID: Allow HAS_LTO_CLANG with KASAN_HW_TAGS
  ANDROID: abi_gki_aarch64_qcom: Add cpufreq related symbols
  ANDROID: cpufreq: Add a restricted vendor hook for freq transition
  ANDROID: scsi: ufs: add hooks to track ufs commands
  ANDROID: Fix compilation error when CPU_FREQ is disabled
  BACKPORT: kasan, arm64: allow using KUnit tests with HW_TAGS mode
  Revert "FROMGIT: kasan, arm64: allow using KUnit tests with HW_TAGS mode"
  Revert "BACKPORT: kasan: remove redundant config option"
  UPSTREAM: arm/kasan: fix the array size of kasan_early_shadow_pte[]
  FROMGIT: KVM: arm64: Workaround firmware wrongly advertising GICv2-on-v3 compatibility
  FROMGIT: KVM: arm64: Rename __vgic_v3_get_ich_vtr_el2() to __vgic_v3_get_gic_config()
  FROMGIT: KVM: arm64: Don't access PMSELR_EL0/PMUSERENR_EL0 when no PMU is available
  FROMGIT: KVM: arm64: Turn kvm_arm_support_pmu_v3() into a static key
  FROMGIT: KVM: arm64: Fix nVHE hyp panic host context restore
  FROMGIT: KVM: arm64: Avoid corrupting vCPU context register in guest exit
  FROMLIST: arm64: cpufeatures: Fix handling of CONFIG_CMDLINE for idreg overrides
  ANDROID: sched: Add vendor hook for uclamp_eff_value
  ANDROID: abi_gki_aarch64_qcom: Add CFS scheduler symbols
  ANDROID: GKI: Add mempool APIs to the symbol list
  ...

Change-Id: I4ed13984b97bc531d1dae61920457f31b84190e9

Conflicts:
	Documentation/devicetree/bindings/nvmem/rockchip-otp.txt
	arch/arm64/boot/dts/rockchip/px30.dtsi
	arch/arm64/boot/dts/rockchip/rk3308.dtsi
	arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dts
	drivers/clk/rockchip/Kconfig
	drivers/clk/rockchip/clk-rk3308.c
	drivers/gpu/drm/rockchip/rk3066_hdmi.c
	drivers/gpu/drm/rockchip/rockchip_rgb.c
	drivers/media/i2c/imx219.c
	drivers/nvmem/rockchip-otp.c
	drivers/power/supply/cw2015_battery.c
	sound/soc/codecs/cx2072x.c
	sound/soc/codecs/cx2072x.h
	sound/soc/codecs/rk3328_codec.c
2021-03-17 18:07:51 +08:00
Tao Huang
251c226c35 rk: revert to v4.19
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: I502dce68b639df4ebf5a1688e0dc2e5c5763ebc2
2021-03-17 18:05:39 +08:00
Finley Xiao
c472f79a09 PM / devfreq: rockchip_dmc: Add SYS_STATUS_CIF0/1 system status support
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: Ie683ed0cc49b21ec95765396a73e2e7a3f7cbb04
2021-03-16 17:16:12 +08:00
Tao Huang
29c90bf3e9 PM / devfreq: rockchip_dmc: Introduce rockchip_dmcfreq_lock_nested()
After commit c95036feef ("PM / devfreq: rockchip_dmc: Fix deadlock between dmcfreq and vop on/off"),
rockchip_dmcfreq_sem support down read recursive.
Try to avoid lockdep warning:

======================================================
WARNING: possible circular locking dependency detected
4.19.172 #9 Not tainted
------------------------------------------------------
composer@2.1-se/221 is trying to acquire lock:
00000000a1c9588b (&genpd->mlock){+.+.}, at: genpd_lock_mtx+0x14/0x1c

but task is already holding lock:
00000000cc938c9c (rockchip_dmcfreq_sem){++++}, at: rockchip_dmcfreq_lock+0x14/0x1c

which lock already depends on the new lock.

the existing dependency chain (in reverse order) is:

-> #2 (rockchip_dmcfreq_sem){++++}:
       down_read+0x50/0x94
       rockchip_dmcfreq_lock+0x14/0x1c
       rockchip_pd_power+0x3c/0x200
       rockchip_pd_power_off+0x24/0x2c
       genpd_power_off+0x168/0x27c
       genpd_power_off_work_fn+0x34/0x50
       process_one_work+0x300/0x66c
       worker_thread+0x238/0x4c0
       kthread+0x148/0x158
       ret_from_fork+0x10/0x18

-> #1 (&pmu->mutex){+.+.}:
       __mutex_lock_common+0xc8/0x1014
       mutex_lock_nested+0x28/0x30
       rockchip_pd_power+0x38/0x200
       rockchip_pd_power_off+0x24/0x2c
       genpd_power_off+0x168/0x27c
       genpd_power_off_work_fn+0x34/0x50
       process_one_work+0x300/0x66c
       worker_thread+0x238/0x4c0
       kthread+0x148/0x158
       ret_from_fork+0x10/0x18

-> #0 (&genpd->mlock){+.+.}:
       lock_acquire+0x124/0x1ec
       __mutex_lock_common+0xc8/0x1014
       mutex_lock_nested+0x28/0x30
       genpd_lock_mtx+0x14/0x1c
       genpd_runtime_suspend+0x1d8/0x21c
       __rpm_callback+0x150/0x24c
       rpm_suspend+0x278/0x7b0
       rpm_idle+0x6c/0x444
       __pm_runtime_idle+0x78/0x9c
       vop2_crtc_atomic_disable+0x5ac/0x6b4
       drm_atomic_helper_commit_modeset_disables+0x234/0x440
       rockchip_atomic_commit_complete+0x140/0x378
       rockchip_drm_atomic_commit+0x1c4/0x224
       drm_atomic_connector_commit_dpms+0x110/0x128
       drm_mode_obj_set_property_ioctl+0x144/0x2b4
       drm_connector_property_set_ioctl+0x3c/0x60
       drm_ioctl+0x2c0/0x454
       do_vfs_ioctl+0x4dc/0x794
       __arm64_sys_ioctl+0x70/0x98
       el0_svc_common+0x9c/0x16c
       el0_svc_handler+0x28/0x60
       el0_svc+0x8/0xc

other info that might help us debug this:

Chain exists of:
  &genpd->mlock --> &pmu->mutex --> rockchip_dmcfreq_sem

 Possible unsafe locking scenario:

       CPU0                    CPU1
       ----                    ----
  lock(rockchip_dmcfreq_sem);
                               lock(&pmu->mutex);
                               lock(rockchip_dmcfreq_sem);
  lock(&genpd->mlock);

 *** DEADLOCK ***

4 locks held by composer@2.1-se/221:
 #0: 0000000079852c0e (crtc_ww_class_acquire){+.+.}, at: drm_mode_obj_set_property_ioctl+0xe4/0x2b4
 #1: 00000000a8d2d1f1 (crtc_ww_class_mutex){+.+.}, at: drm_modeset_backoff+0x118/0x230
 #2: 000000008d649114 (&vop2->vop2_lock){+.+.}, at: vop2_crtc_atomic_disable+0x3c/0x6b4
 #3: 00000000cc938c9c (rockchip_dmcfreq_sem){++++}, at: rockchip_dmcfreq_lock+0x14/0x1c

stack backtrace:
CPU: 0 PID: 221 Comm: composer@2.1-se Not tainted 4.19.172 #9
Hardware name: Rockchip RK3566 EVB2 LP4X V10 Board (DT)
Call trace:
 dump_backtrace+0x0/0x160
 show_stack+0x14/0x1c
 dump_stack+0xd8/0x128
 print_circular_bug+0x580/0x588
 __lock_acquire+0x1bc4/0x1bd0
 lock_acquire+0x124/0x1ec
 __mutex_lock_common+0xc8/0x1014
 mutex_lock_nested+0x28/0x30
 genpd_lock_mtx+0x14/0x1c
 genpd_runtime_suspend+0x1d8/0x21c
 __rpm_callback+0x150/0x24c
 rpm_suspend+0x278/0x7b0
 rpm_idle+0x6c/0x444
 __pm_runtime_idle+0x78/0x9c
 vop2_crtc_atomic_disable+0x5ac/0x6b4
 drm_atomic_helper_commit_modeset_disables+0x234/0x440
 rockchip_atomic_commit_complete+0x140/0x378
 rockchip_drm_atomic_commit+0x1c4/0x224
 drm_atomic_connector_commit_dpms+0x110/0x128
 drm_mode_obj_set_property_ioctl+0x144/0x2b4
 drm_connector_property_set_ioctl+0x3c/0x60
 drm_ioctl+0x2c0/0x454
 do_vfs_ioctl+0x4dc/0x794
 __arm64_sys_ioctl+0x70/0x98
 el0_svc_common+0x9c/0x16c
 el0_svc_handler+0x28/0x60
 el0_svc+0x8/0xc

Signed-off-by: Tao Huang <huangtao@rock-chips.com>
Change-Id: Ic743189e335b0e9ae7fed9c3d542bf1d57f5d33a
2021-02-18 09:46:39 +08:00
Finley Xiao
168b90d38d Revert "ANDROID: GKI: PM/devfreq: Do not switch governors from sysfs when device is suspended"
This reverts commit 4f9183cc24.

Conflicts:
	include/linux/devfreq.h

Change-Id: I8bf76eb9113d1a1b564b396cd66a15bc4fd8e672
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
2021-01-22 20:13:00 +08:00
YouMin Chen
ad4ff95560 PM / devfreq: rockchip_dmc: add support for rk3568
Change-Id: I64f11fefb6227805031e911910a0123e4c0f9d78
Signed-off-by: YouMin Chen <cym@rock-chips.com>
2020-12-22 15:37:47 +08:00
YouMin Chen
f07627c47a PM / devfreq: rockchip-dfi: add support for rk3568 dfi
Change-Id: I62d21e31cd56e82c04de675be502b261ba3740da
Signed-off-by: YouMin Chen <cym@rock-chips.com>
2020-12-22 15:24:11 +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
Greg Kroah-Hartman
9ce79d9bed This is the 4.19.149 stable release
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAl91ulMACgkQONu9yGCS
 aT7ezhAArTOQxPGkhktgdGfCMYgjvIHdny8o4pNGumnxW6TG7FCiJHoZuj8OLkdx
 2x5brOOvSGgcGTOwJXyUjL6opQzD5syTCuzbgEpGB2Tyd1x5q8vgqvI2XPxZeYHy
 x+mUDgacT+4m7FNbFDhNMZoTS4KCiJ3IcTevjeQexDtIs6R38HhxNl0Ee67gkqxZ
 p7c6L3kbUuR5T9EWGE1DPPLhOFGeOMk592qzkFsCGERsuswQOpXrxyw6zkik/0UG
 6Losmo2i+OtQFeiDz0WYJZNO9ySI511j+7R2Ewch/nFuTp6yFzy9kJZnP0YWK/KE
 U4BLmopgzCs9q+TQ/QNjxlCltl4eOrrjkFXF3Zz8o5ddbKwrugEsJUdUUDIpva71
 qEUgSw7vguGKoCttBenCDwyYOcjIVJRBFSWTVDzkgw5pXrz3m7qePF1Kj+KzG0pN
 8gTqosXPlYPzH1mh+2vRVntiCpZRMJYo18CX+ifqN20dHH3dsM4vA5NiWwjTJVY8
 JddRXfujxBQ0jxs2jFKvPZNrgqeY3Mh51L0a5G+HbHCIb+4kgD+2jl+C/X38TKch
 osTM1/qQriFVxtlH9TkTa8opYvrYBWO+G+XhNVc2tSpmd8T2EaKokMAVVvGiK3l9
 ZPq06SytJyKDPsSLvk4BKxCUv5CY0VT18k6mCYd1fq4oxTR92A4=
 =5bC5
 -----END PGP SIGNATURE-----

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