Commit Graph

1066174 Commits

Author SHA1 Message Date
Finley Xiao
66ddcf3103 arm64: dts: rockchip: rk3588s: Add clocks for cpu
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: Id9a1bfac2c1c8033afd378b429eb95dc62a0fb8e
2021-11-09 17:19:59 +08:00
Huibin Hong
b60fc71441 arm64: dts: rockchip: fix uart2 console configuration on rk3588-linux.dtsi
1. Set earlycon base address 0xfeb50000
2. Set fiq_debugger interrupts id 423

Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
Change-Id: Ia875782dd417b3d2202794293eb76bf0b59e5b13
2021-11-09 16:43:17 +08:00
Huibin Hong
6b993d226c arm64: dts: rockchip: fix uart2 console configuration on rk3588-android.dtsi
1. Set earlycon base address 0xfeb50000
2. Set fiq_debugger interrupts id 423

Signed-off-by: Huibin Hong <huibin.hong@rock-chips.com>
Change-Id: I4069d5ec5e6633c903a5e84f099c982d87c4ca36
2021-11-09 16:43:17 +08:00
Sandy Huang
91142983e6 drm/rockchip: debugfs: fix dump yuv format size error
Signed-off-by: Sandy Huang <hjc@rock-chips.com>
Change-Id: Ibec7e083c38d2b8d151f285848133e7e72310095
2021-11-09 16:20:40 +08:00
Elaine Zhang
9fd1dbb405 clk: gate: add clk_always_on for debug
use:
bootargs = "earlycon=uart8250,mmio32,0xfe660000 console=ttyFIQ0 clk_gate.always_on=y";

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: Iff38f71b31bf1de4b5e18bdaefd695d60cd2e124
2021-11-09 14:23:08 +08:00
Woogeun Lee
68a3d0062d ANDROID: ABI: update allowed list for galaxy
Leaf changes summary: 3 artifacts changed
Changed leaf types summary: 0 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 3 Added functions
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable

3 Added functions:

  [A] 'function int kern_path(const char*, unsigned int, path*)'
  [A] 'function int kstrtos16(const char*, unsigned int, s16*)'
  [A] 'function void path_put(const path*)'

Bug: 205492131

Signed-off-by: Woogeun Lee <woogeun.lee@samsung.com>
Change-Id: Ice467d47203335bccb9a3a7006e0ecfb97d01714
2021-11-09 04:44:01 +00:00
Elliot Berman
fb247ebba9 ANDROID: Add android_vh_rproc_recovery_set
Leaf changes summary: 2 artifacts changed
Changed leaf types summary: 0 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 1 Added function
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 1 Added variable

1 Added function:

  [A] 'function int __traceiter_android_vh_rproc_recovery_set(void*, rproc*)'

1 Added variable:

  [A] 'tracepoint __tracepoint_android_vh_rproc_recovery_set'

Bug: 205534894
Signed-off-by: Elliot Berman <quic_eberman@quicinc.com>
Change-Id: Ibd421d3b1b756f3c7f6283e1d697b865ea89b480
2021-11-08 20:26:32 +00:00
Elliot Berman
14eae186e4 ANDROID: rproc: Add vendor hook when setting recovery mode
Add vendor hook when setting recovery mode to notify coprocessor when
mode is changed.

Bug: 205534894
Signed-off-by: Elliot Berman <quic_eberman@quicinc.com>
Change-Id: Ie41170deb0426a7bcfeed8a51cc4e8e1a427592a
2021-11-08 20:26:18 +00:00
Bart Van Assche
56cc81bb39 BACKPORT: FROMLIST: scsi: ufs: Fix a deadlock in the error handler
The following deadlock has been observed on a test setup:
* All tags allocated.
* The SCSI error handler calls ufshcd_eh_host_reset_handler()
* ufshcd_eh_host_reset_handler() queues work that calls ufshcd_err_handler()
* ufshcd_err_handler() locks up as follows:

Workqueue: ufs_eh_wq_0 ufshcd_err_handler.cfi_jt
Call trace:
 __switch_to+0x298/0x5d8
 __schedule+0x6cc/0xa94
 schedule+0x12c/0x298
 blk_mq_get_tag+0x210/0x480
 __blk_mq_alloc_request+0x1c8/0x284
 blk_get_request+0x74/0x134
 ufshcd_exec_dev_cmd+0x68/0x640
 ufshcd_verify_dev_init+0x68/0x35c
 ufshcd_probe_hba+0x12c/0x1cb8
 ufshcd_host_reset_and_restore+0x88/0x254
 ufshcd_reset_and_restore+0xd0/0x354
 ufshcd_err_handler+0x408/0xc58
 process_one_work+0x24c/0x66c
 worker_thread+0x3e8/0xa4c
 kthread+0x150/0x1b4
 ret_from_fork+0x10/0x30

Fix this lockup by making ufshcd_exec_dev_cmd() allocate a reserved
request.

This patch is closely related to the upstream patch with the same title.

Bug: 205080886
Link: https://lore.kernel.org/linux-scsi/700f0463-23a9-8465-f712-1188cb884dea@acm.org/T/#u
Change-Id: I9e9ba3f45ba23ecf576380aa19701d3437af6cdd
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2021-11-08 10:01:41 -08:00
Bart Van Assche
ff748ee298 BACKPORT: FROMLIST: scsi: core: Reserve one tag for the UFS driver
This is a GKI-compatible version of the following patch: "scsi: core:
Add support for reserved tags".

Bug: 205080886
Link: https://lore.kernel.org/linux-scsi/20211103000529.1549411-2-bvanassche@acm.org.
Change-Id: I6273114ae8cc6c2a74c72f7bc090eb0319ec5772
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2021-11-08 10:01:41 -08:00
Bart Van Assche
94ca15ec92 BACKPORT: FROMLIST: scsi: ufs: Limit the queue depth to host->can_queue
Before reducing 'can_queue' from 32 to 31, make
ufshcd_change_queue_depth() restrict the queue depth to 'can_queue'
instead of hba->nutrs (32). This is a backport of a subset of the
following patch: "[PATCH 2/2] scsi: ufs: Fix a deadlock in the error
handler".

Bug: 205080886
Link: https://lore.kernel.org/linux-scsi/20211103000529.1549411-3-bvanassche@acm.org/
Change-Id: I6e694a9698f91293fc2987217e3f939726c397dd
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2021-11-08 10:01:41 -08:00
Andy Yan
cddd9bf436 drm/rockchip: vop2: Add check for two win mode
When cluster work at two win mode:
act_w + xoffset % 16 <= 2048

Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Change-Id: I1326b02ede58b9a96960ad0d262cb1665bd29525
2021-11-08 15:55:02 +08:00
Jianqun Xu
a75da01111 arm64: dts: rockchip: rk3588/rk3588s: fix pinctrl
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Change-Id: I15b93a9ab1bbd40fe35e1b4ed94e84ad41c2cc28
2021-11-08 15:53:47 +08:00
Steven Liu
a042d6a178 arm64: dts: rockchip: rk3588/rk3588s: fix uart default pinctrl
Signed-off-by: Steven Liu <steven.liu@rock-chips.com>
Change-Id: Ie85ec29b02d311490ccd06862ec2e2ea162ac874
2021-11-08 15:53:47 +08:00
Andy Yan
265d675c1a drm/rockchip: vop2: Add VOP_GRF and SYS_GRF support
Some clk invert(dclk invert) control in SYS_GRF
Some interface enable(hdmi/edp enable) control in VOP_GRF
hdmi_vsync/hsync_pol control in VO1_GRF

Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Change-Id: Ia3972c9d207c9385b4512c96ea8e2d66e8fa03d5
2021-11-08 14:35:37 +08:00
William Wu
bfe47a132f Revert "usb: dwc2: hcd: do not disable non-split periodic channels"
This reverts commit debf378724.
The patch a82c7abdf8 ("usb: dwc2: hcd: Fix host channel halt flow")
can fix the issue.

Change-Id: I9a014c42cf942cab22480b5faab13c802e7fd47e
Signed-off-by: William Wu <william.wu@rock-chips.com>
2021-11-08 10:07:00 +08:00
William Wu
fbc682769e usb: dwc2: hcd: Fix channel halt for isoc and int transfer
The parameters g_dma and g_dma_desc is used for gadget,
so let's use host_dma and dma_desc_enable instead of them.
And it needs to update the chan->halt_status for non-split
periodic channels rather than return immediately, otherwise,
the software will not release the channel when the channel
halt interrupt is triggered next time.

In addition, it only needs to wait for the core generates
a channel halted if halt_status is DWC2_HC_XFER_URB_DEQUEUE.

Fixes: a82c7abdf8 ("usb: dwc2: hcd: Fix host channel halt flow")
Change-Id: I455444af020ff751406295f21133ff6a950c04dd
Signed-off-by: William Wu <william.wu@rock-chips.com>
Signed-off-by: Wang Jie <dave.wang@rock-chips.com>
2021-11-08 10:06:48 +08:00
Zefa Chen
b4757ba1f9 media: i2c: imx464 support 2lane mode
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: If7a3302084e25168130f6bef8d5c72ca77f177ff
2021-11-07 18:06:58 +08:00
Zefa Chen
9aa1b6cb5d include: uapi/linux/rk-camera-module.h add exposure sync control
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I2429ea5ced06cd799795ca3edd8d3a7894015565
2021-11-07 18:06:27 +08:00
Zefa Chen
928dde65f2 media: i2c: add sensor driver ov50c40
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: Ief7b0881a93d3c4fa4c61bc50e9379e2f1f4d983
2021-11-07 17:44:06 +08:00
Greg Kroah-Hartman
5b87b8d669 ANDROID: GKI: fix up abi breakage from "cfg80211: fix management registrations locking"
Commit 4c22227e39 ("cfg80211: fix management registrations locking")
in 5.10.77, which is commit 09b1d5dc6c ("cfg80211: fix management
registrations locking") upstream, moved the mgmt_registrations_lock out
of struct wireless_dev.  This did not change the structure size, but
caused a CRC change in the structure pointer, which tripped the abi
checker.

So restore the variable, and comment that this is not used anymore.  No
driver should ever be touching this so it is safe.

Note, using a __GENKSYMS__ hack would work, as the overall structure
size remains the same when this variable is removed, BUT the warning
that the field is gone is reported by libabigail correctly, which would
require a .xml update, so it's not worth it.

Bug: 161946584
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Ibcfe743833860e6f75611d7ebed1036a77be0a69
2021-11-06 12:02:55 +00:00
Johannes Berg
a7d87a08b4 UPSTREAM: cfg80211: fix management registrations locking
The management registrations locking was broken, the list was
locked for each wdev, but cfg80211_mgmt_registrations_update()
iterated it without holding all the correct spinlocks, causing
list corruption.

Rather than trying to fix it with fine-grained locking, just
move the lock to the wiphy/rdev (still need the list on each
wdev), we already need to hold the wdev lock to change it, so
there's no contention on the lock in any case. This trivially
fixes the bug since we hold one wdev's lock already, and now
will hold the lock that protects all lists.

Cc: stable@vger.kernel.org
Reported-by: Jouni Malinen <j@w1.fi>
Fixes: 6cd536fe62 ("cfg80211: change internal management frame registration API")
Link: https://lore.kernel.org/r/20211025133111.5cf733eab0f4.I7b0abb0494ab712f74e2efcd24bb31ac33f7eee9@changeid
Signed-off-by: Johannes Berg <johannes.berg@intel.com>

Bug: 204384349
(cherry picked from commit 09b1d5dc6c)
Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: Id1bca68277be3a5f7c7329a8195018946f686bdb
2021-11-06 12:02:45 +00:00
Zefa Chen
bfbfac1045 media: i2c: otp_eeprom: support rkmodule otp
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: Ie7aafce68bac9066b6df3610839a040b94be30f1
2021-11-06 18:46:11 +08:00
Zefa Chen
4a0b595e2a media: i2c: imx464 support get channel info by ioctl
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: Ia0b7d27618e5e6cbe9b9e2f6b663d5a975fe89e2
2021-11-05 18:41:01 +08:00
Zefa Chen
7832719356 media: i2c: add camera driver imx464
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: Iae18497edac0c4fdd24bd2f74a5348aa5271f4e4
2021-11-05 18:40:11 +08:00
Zhenke Fan
add07bf1a2 media: i2c: otp_eeprom: add sensor otp eeprom driver
Signed-off-by: Zhenke Fan <fanzy.fan@rock-chips.com>
Change-Id: If08548c4613289c15947428c8468e7fb3769c60e
2021-11-05 18:29:38 +08:00
Zefa Chen
5c9a0d04e7 include: uapi/linux/rk-camera-module.h modify otp struct
1. modify af inf
2. add module info

Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I455e649c1ffe471e1b5239d95ae929ad85113248
2021-11-05 18:13:10 +08:00
Zefa Chen
139acca6dd media: i2c: imx258 sync from kernel 4.19
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I89a0f9472bbe475c9da368b09eaad0cd00fc69c6
2021-11-05 18:12:43 +08:00
Zefa Chen
9b16ff2988 include: uapi/linux/rk-camera-module.h otp support pdaf
Signed-off-by: Zefa Chen <zefa.chen@rock-chips.com>
Change-Id: I4bcd2d1ff866059821ef1ddc7248530cd37a9062
2021-11-05 17:57:42 +08:00
Zhenke Fan
3463b91879 include: uapi/linux/rk-camera-module.h modify the rkmodule_lsc_inf
Signed-off-by: Zhenke Fan <fanzy.fan@rock-chips.com>
Change-Id: I89403b779bcd6191e6fe76e1412275ad1752d414
2021-11-05 17:57:29 +08:00
Yang Yang
dd78ccadc4 ANDROID: GKI: Update symbol list for VIVO
Leaf changes summary: 6 artifacts changed
Changed leaf types summary: 0 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 3 Added functions
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 3 Added variables

3 Added functions:

  [A] 'function int __traceiter_android_vh_blk_alloc_rqs(void*, size_t*, blk_mq_tag_set*, blk_mq_tags*)'
  [A] 'function int __traceiter_android_vh_blk_rq_ctx_init(void*, request*, blk_mq_tags*, blk_mq_alloc_data*, u64)'
  [A] 'function int __traceiter_android_vh_mm_dirty_limits(void*, dirty_throttle_control* const, bool, unsigned long int, unsigned long int, unsigned long int, unsigned long int)'

3 Added variables:

  [A] 'tracepoint __tracepoint_android_vh_blk_alloc_rqs'
  [A] 'tracepoint __tracepoint_android_vh_blk_rq_ctx_init'
  [A] 'tracepoint __tracepoint_android_vh_mm_dirty_limits'

Bug: 205166460
Change-Id: Iec948f354fe142576525a2f35769077d8c63788d
Signed-off-by: Yang Yang <yang.yang@vivo.com>
2021-11-05 07:28:04 +00:00
Finley Xiao
14f5c70c6e soc: rockchip_system_monitor: Fix missing regulator_put if early_min_volt=0
Fixes: d58bcc8c2b ("soc: rockchip_system_monitor: Add support to limit volt during system startup")
Signed-off-by: Finley Xiao <finley.xiao@rock-chips.com>
Change-Id: I3ca0aa2b6563c5be9fddd9fee04145ce8e15c32c
2021-11-05 14:52:33 +08:00
Yifeng Zhao
001f34ffe4 arm64: dts: rockchip: rk3588: add sata nodes for evbs
Signed-off-by: Yifeng Zhao <yifeng.zhao@rock-chips.com>
Change-Id: I4391a3c9517897297b1e574c2235e13c7491e9f6
2021-11-05 14:33:18 +08:00
Jon Lin
7e864ae394 arm64: dts: rockchip: rk3588-evb: Enable PCIe phy
Change-Id: I213a206446cb4298bcf722094415742bf957ab08
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2021-11-05 14:23:26 +08:00
Jon Lin
be2891ed31 mtd: torturetest: Support random pattern
insmod /oem/mtd_torturetest.ko dev=5 check=0 cycles_count=10 random_pattern=1

Change-Id: I8919da8241e7d3af6925aa7a377027e0c3d7d7f8
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2021-11-05 11:59:27 +08:00
Elaine Zhang
d3a274cb5e Revert "clk: rockchip: rk3588: export clk_gmac id"
This reverts commit de8a7dc11e.

Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
Change-Id: I10be8115666498baf872a40fc9c72964744f3243
2021-11-05 11:32:52 +08:00
David Wu
d6cb203817 arm64: dts: rockchip: Remove CLK_GMAC clock for RK3588
Signed-off-by: David Wu <david.wu@rock-chips.com>
Change-Id: I4585aeb43071883d11d49b344e391d5bb7de7d41
2021-11-05 11:32:52 +08:00
David Wu
e7c0f2bf29 net: ethernet: stmmac: dwmac-rk: Fix GMAC clock setting for RK3588
Put the clock configuration of GMAC into the gmac driver and implement
corresponding functions.

Fixes: 2627dcd2c9e9("net: ethernet: stmmac: dwmac-rk: Add gmac support for rk3588")
Signed-off-by: David Wu <david.wu@rock-chips.com>
Change-Id: If9bd639db31f44602af56dc20b81688ba67702c2
2021-11-05 11:32:52 +08:00
Guochun Huang
cc761c9b6a arm64: dts: rockchip: add rk3588/rk3588s evb mipi panel info
rk3588-evb1: dsi0->dphy->1080p_panel && dsi1->dphy->1080p_panel;
rk3588-evb2: dsi1->dphy->1080p_panel;
rk3588-evb3: dsi0->dphy->1080p_panel && dsi1->cphy->cphy_panel;
rk3588-evb4: dsi0->dphy->1080p_panel;
rk3588-evb5: dsi0->dcphy->test_connector && dsi1->dcphy->test_connector;
rk3588s-evb1: dsi0->dphy->1080p_panel && dsi1->dphy->cmd_no_dsc_panel;
rk3588s-evb2: dsi0->cphy->cphy_panel & dsi1->dphy->1080p_panel;
rk3588s-evb3: dsi0->dcphy->test_connector && dsi1->dcphy->test_connector;
rk3588s-evb4: dsi0->dphy->1080p_panel && dsi1->dphy->cmd_dsc_panel;

Signed-off-by: Guochun Huang <hero.huang@rock-chips.com>
Change-Id: I4c03d8c351a605e643e4c61d3e388db09d1fa8be
2021-11-05 09:49:07 +08:00
Andy Yan
1eaccc255a drm/rockchip: vop2: Add dual channel configuration
HDMI/eDP/DP on RK3588 also support dual channel mode
like mipi dsi.

Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Change-Id: I06454d3c64bc6a283d180c57fac6e8464ff6ca19
2021-11-05 09:24:24 +08:00
Jon Lin
4c0ef01e44 spi: rockchip-test: Remove useless test code
1.It's to follow the concrete spi develop guild instead of these
rough introduction.
2.Remove useless filesystem operation

Change-Id: I0c0904720cd01bc1383f4722e9febf152e7c89e0
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
2021-11-05 09:18:34 +08:00
Wesley Cheng
8c9d9d8e44 FROMGIT: usb: gadget: f_mass_storage: Disable eps during disconnect
When receiving a disconnect event from the UDC, the mass storage
function driver currently runs the handle_exception() routine
asynchronously.  For UDCs that support runtime PM, there is a
possibility the UDC is already suspended by the time the
do_set_interface() is executed.  This can lead to HW register access
while the UDC is already suspended.

Signed-off-by: Wesley Cheng <quic_wcheng@quicinc.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>

Bug: 204343836
(cherry picked from commit 9fff139aeb
 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing)
Change-Id: I6c8011baddf02d6b0eadb5934416bc24b8a93f4a
Signed-off-by: Wesley Cheng <quic_wcheng@quicinc.com>
2021-11-04 22:42:04 +00:00
Wesley Cheng
cde1d53cc9 FROMGIT: usb: gadget: udc: core: Revise comments for USB ep enable/disable
The usb_ep_disable() and usb_ep_enable() routines are being widely
used in atomic/interrupt context by function drivers.  Hence, the
statement about it being able to only run in process context may
not be true.  Add an explicit comment mentioning that it can be used
in atomic context.

Signed-off-by: Wesley Cheng <quic_wcheng@quicinc.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>

Bug: 204343836
(cherry picked from commit b0d5d2a716
 https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git usb-testing)
Change-Id: I1adb5d074fe2f9e33ebfdb30d335283c56bc7b39
Signed-off-by: Wesley Cheng <quic_wcheng@quicinc.com>
2021-11-04 22:41:52 +00:00
Kalesh Singh
e35a305d19 UPSTREAM: tracing/cfi: Fix cmp_entries_* functions signature mismatch
If CONFIG_CFI_CLANG=y, attempting to read an event histogram will cause
the kernel to panic due to failed CFI check.

    1. echo 'hist:keys=common_pid' >> events/sched/sched_switch/trigger
    2. cat events/sched/sched_switch/hist
    3. kernel panics on attempting to read hist

This happens because the sort() function expects a generic
int (*)(const void *, const void *) pointer for the compare function.
To prevent this CFI failure, change tracing map cmp_entries_* function
signatures to match this.

Also, fix the build error reported by the kernel test robot [1].

[1] https://lore.kernel.org/r/202110141140.zzi4dRh4-lkp@intel.com/

Link: https://lkml.kernel.org/r/20211014045217.3265162-1-kaleshsingh@google.com

Signed-off-by: Kalesh Singh <kaleshsingh@google.com>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>

Bug: 204946901
(cherry picked from commit 7ce1bb83a1)
Signed-off-by: Elliot Berman <quic_eberman@quicinc.com>
Change-Id: I4a1a39b086b5e306ddecabd9a6076e2fb14c3f70
2021-11-04 21:10:25 +00:00
Avri Altman
335046583c FROMGIT: scsi: ufshpb: Do not report victim error in HCM
In host control mode, eviction is precieved as an extreme measure.
There are several conditions that both the entering and exiting regions
should meet, so that eviction will take place.

The common case however, is that those conditions are rarely met, so it
is normal that the act of eviction fails.  Therefore, Do not report an
error in host control mode if eviction fails.

Link: https://lore.kernel.org/r/20210808090024.21721-5-avri.altman@wdc.com
Fixes: 6c59cb501b (scsi: ufs: ufshpb: Make eviction depend on region's reads)
(cherry picked from commit 10163cee1f
git: //git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next)
Signed-off-by: Avri Altman <avri.altman@wdc.com>
Change-Id: Id6aa444ea5e2efd15c507bbd586c421018c75998
2021-11-04 20:28:57 +00:00
Avri Altman
e2766208d7 FROMGIT: scsi: ufshpb: Verify that num_inflight_map_req is non-negative
num_inflight_map_req should not be negative.  It is incremented and
decremented without any protection, allowing it theoretically to be
negative, should some weird unbalanced count occur.

Verify that the those calls are properly serielized.

Link: https://lore.kernel.org/r/20210808090024.21721-4-avri.altman@wdc.com
Fixes: 33845a2d84 (scsi: ufs: ufshpb: Limit the number of in-flight map requests)
(cherry picked from commit 22aede9f48
git: //git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next)
Signed-off-by: Avri Altman <avri.altman@wdc.com>
Change-Id: I8a8252c919e6678752b60bcd950cb08e765e6aed
2021-11-04 20:28:51 +00:00
Avri Altman
193f33d061 FROMGIT: scsi: ufshpb: Use a correct max multi chunk
In HPB2.0, if pre_req_min_tr_len < transfer_len < pre_req_max_tr_len
the driver is expected to send a HPB-WRITE-BUFFER companion to HPB-READ.

The upper bound should fit into a single byte, regardless of
bMAX_ DATA_SIZE_FOR_HPB_SINGLE_CMD which being an attribute (u32) can
be significantly larger.

To further illustrate the issue let us consider the following scenario:
 - SCSI_DEFAULT_MAX_SECTORS is 1024 limiting the IO chunks to 512KB
 - The OEM changes scsi_host_template .max_sectors to be 2048, which
   allows a 1M requests: transfer_len = 256
 - pre_req_max_tr_len = HPB_MULTI_CHUNK_HIGH = 256
 - ufshpb_is_supported_chunk returns true (256 <= 256)
 - WARN_ON_ONCE(transfer_len > HPB_MULTI_CHUNK_HIGH) doesn't warn
 - ufshpb_set_hpb_read_to_upiu cast transfer_len to u8: transfer_len = 0
 - the command is failing with illegal request

Link: https://lore.kernel.org/r/20210808090024.21721-3-avri.altman@wdc.com
Fixes: 41d8a9333c (scsi: ufs: ufshpb: Add HPB 2.0 support)
(cherry picked from commit 07106f86ae
git: //git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next)
Signed-off-by: Avri Altman <avri.altman@wdc.com>
Change-Id: I0dc568020a0fe6c4ddf6952f89ad5230770fd7f3
2021-11-04 20:28:46 +00:00
Avri Altman
d054108519 FROMGIT: scsi: ufshpb: rewind the read timeout on every read
The "cold"-timer purpose is not to hang-on to active regions with no
reads.  Therefore the read-timeout should be re-wind on every read, and
not just when the region is activated.

Link: https://lore.kernel.org/r/20210808090024.21721-2-avri.altman@wdc.com
Fixes: 13c044e916 (scsi: ufs: ufshpb: Add "cold" regions timer)
(cherry picked from commit 283e61c5a9
git: //git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next)
Signed-off-by: Avri Altman <avri.altman@wdc.com>
Change-Id: If174a161028cf2382538d69e30181cda979a12de
2021-11-04 20:28:41 +00:00
JianMin Liu
8c2c4d12bb ANDROID: sched: Add vendor hooks for sync_entity_load_avg
Add vendor hooks to monitor more update load-avg point
where tasks on the run-queue will go through.

Bug: 204857484

Signed-off-by: JianMin Liu <jian-min.liu@mediatek.com>
Change-Id: I440d7b9686a37508bd7568454472ab014ba0d0c9
2021-11-04 18:49:18 +00:00
Liujie Xie
2cfefe22b9 ANDROID: GKI: Add symbols to abi_gki_aarch64_oplus
Add some file nodes to control and tune the memcg status in the memory
cgroup, need add some symbols to abi_gki_aarch64_oplus.

Leaf changes summary: 5 artifacts changed
Changed leaf types summary: 0 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 3 Added functions
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 2 Added variables

3 Added functions:

  [A] 'function int cgroup_add_legacy_cftypes(cgroup_subsys*, cftype*)'
  [A] 'function mem_cgroup* mem_cgroup_from_id(unsigned short int)'
  [A] 'function void unregister_memory_notifier(notifier_block*)'

2 Added variables:

  [A] 'cgroup_subsys memory_cgrp_subsys'
  [A] 'static_key_true memory_cgrp_subsys_enabled_key'

Bug: 204860045
Signed-off-by: Liujie Xie <xieliujie@oppo.com>
Change-Id: I69805dcdfbe363c13031ae0a9556761b71a67428
2021-11-04 16:48:18 +00:00