Commit Graph

1165241 Commits

Author SHA1 Message Date
Yangtao Li
8fd3f0784d UPSTREAM: i2c: qcom-geni: Convert to devm_platform_ioremap_resource()
Use devm_platform_ioremap_resource() to simplify code.

Signed-off-by: Yangtao Li <frank.li@vivo.com>
Reviewed-by: Andi Shyti <andi.shyti@kernel.org>
Signed-off-by: Wolfram Sang <wsa@kernel.org>

Bug: 370629635
Change-Id: I7d5087c66ff6c9799cb43190156b6149c89c0bbd
(cherry picked from commit 02ebc01dde)
Signed-off-by: Praveen Talari <quic_ptalari@quicinc.com>
2024-10-16 19:38:37 +00:00
Uwe Kleine-König
02b20eb4bc UPSTREAM: i2c: Convert to platform remove callback returning void
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is (mostly) ignored
and this typically results in resource leaks. To improve here there is a
quest to make the remove callback return void. In the first step of this
quest all drivers are converted to .remove_new() which already returns
void.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Alain Volmat <alain.volmat@foss.st.com>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Acked-by: Baruch Siach <baruch@tkos.co.il>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Acked-by: Heiko Stuebner <heiko@sntech.de>
Acked-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Acked-by: Jochen Friedrich <jochen@scram.de>
Acked-by: Peter Rosin <peda@axentia.se>
Acked-by: Vadim Pasternak <vadimp@nvidia.com>
Reviewed-by: Asmaa Mnebhi <asnaa@nvidia.com>
Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Reviewed-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
Reviewed-by: Chris Pringle <chris.pringle@phabrix.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Jean Delvare <jdelvare@suse.de>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>
Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com>
Reviewed-by: Tali Perry <tali.perry@nuvoton.com>
Reviewed-by: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Wolfram Sang <wsa@kernel.org>

Bug: 370629635
Change-Id: I47c4e41ec0dc6dd719fd4416219875116bcf94e6
(cherry picked from commit e190a0c389)
Signed-off-by: Praveen Talari <quic_ptalari@quicinc.com>
2024-10-16 19:38:37 +00:00
Yang Yingliang
a650b9fb29 UPSTREAM: i2c: qcom-geni: change i2c_master_hub to static
i2c_master_hub is only used in i2c-qcom-geni.c now,
change it to static.

Fixes: cacd9643ec ("i2c: qcom-geni: add support for I2C Master Hub variant")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Reviewed-by: Bjorn Andersson <andersson@kernel.org>
Signed-off-by: Wolfram Sang <wsa@kernel.org>

Bug: 370629635
Change-Id: If191b6b205f111c9b54590859438c75235e2bd0a
(cherry picked from commit 597688792c)
Signed-off-by: Praveen Talari <quic_ptalari@quicinc.com>
2024-10-16 19:38:37 +00:00
Neil Armstrong
aa4151b832 UPSTREAM: i2c: qcom-geni: add support for I2C Master Hub variant
The I2C Master Hub is a stripped down version of the GENI Serial Engine
QUP Wrapper Controller but only supporting I2C serial engines without
DMA support.

Add the I2C Master Hub serial engine compatible along the specific
requirements in a new desc struct passed through the device match data.

Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Wolfram Sang <wsa@kernel.org>

Bug: 370629635
Change-Id: I161a19650cd69595e0829411a2dd12a58de23615
(cherry picked from commit cacd9643ec)
Signed-off-by: Praveen Talari <quic_ptalari@quicinc.com>
2024-10-16 19:38:37 +00:00
Neil Armstrong
47d1f8edd6 UPSTREAM: i2c: qcom-geni: add desc struct to prepare support for I2C Master Hub variant
The I2C Master Hub is a stripped down version of the GENI Serial Engine
QUP Wrapper Controller but only supporting I2C serial engines without
DMA support.

Those I2C serial engines variants have some requirements:
- a separate "core" clock
- doesn't support DMA, thus no memory interconnect path
- fixed FIFO size not discoverable in the HW_PARAM_0 register

Add a desc struct specifying all those requirements which will be used in
a next change when adding the I2C Master Hub serial engine compatible.

Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Wolfram Sang <wsa@kernel.org>

Bug: 370629635
Change-Id: I9f007f3f4f435e59e41849d357fe0ed72b81c63d
(cherry picked from commit 14d02fbadb)
Signed-off-by: Praveen Talari <quic_ptalari@quicinc.com>
2024-10-16 19:38:37 +00:00
Veerendranath Jakkam
752034bc87 UPSTREAM: wifi: cfg80211: fix reporting failed MLO links status with cfg80211_connect_done
Individual MLO links connection status is not copied to
EVENT_CONNECT_RESULT data while processing the connect response
information in cfg80211_connect_done(). Due to this failed links
are wrongly indicated with success status in EVENT_CONNECT_RESULT.

To fix this, copy the individual MLO links status to the
EVENT_CONNECT_RESULT data.

Bug: 254441685
Fixes: 53ad07e982 ("wifi: cfg80211: support reporting failed links")
Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
Reviewed-by: Carlos Llamas <cmllamas@google.com>
Link: https://patch.msgid.link/20240724125327.3495874-1-quic_vjakkam@quicinc.com
[commit message editorial changes]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
(cherry picked from commit baeaabf970b9a90999f62ae27edf63f6cb86c023)
Signed-off-by: Lee Jones <joneslee@google.com>
Change-Id: I0a1aacb180914e8d5509eab44aa27bd82272bbf7
2024-10-15 14:12:46 +01:00
Manivannan Sadhasivam
40c204b003 UPSTREAM: scsi: ufs: core: Do not set link to OFF state while waking up from hibernation
UFS link is just put into hibern8 state during the 'freeze' process of the
hibernation. Afterwards, the system may get powered down. But that doesn't
matter during wakeup. Because during wakeup from hibernation, UFS link is
again put into hibern8 state by the restore kernel and then the control is
handed over to the to image kernel.

So in both the places, UFS link is never turned OFF. But
ufshcd_system_restore() just assumes that the link will be in OFF state and
sets the link state accordingly. And this breaks hibernation wakeup:

[ 2445.371335] phy phy-1d87000.phy.3: phy_power_on was called before phy_init
[ 2445.427883] ufshcd-qcom 1d84000.ufshc: Controller enable failed
[ 2445.427890] ufshcd-qcom 1d84000.ufshc: ufshcd_host_reset_and_restore: Host init failed -5
[ 2445.427906] ufs_device_wlun 0:0:0:49488: ufshcd_wl_resume failed: -5
[ 2445.427918] ufs_device_wlun 0:0:0:49488: PM: dpm_run_callback(): scsi_bus_restore returns -5
[ 2445.427973] ufs_device_wlun 0:0:0:49488: PM: failed to restore async: error -5

So fix the issue by removing the code that sets the link to OFF state.

Bug: 254441685
Cc: Anjana Hari <quic_ahari@quicinc.com>
Cc: stable@vger.kernel.org # 6.3
Fixes: 88441a8d35 ("scsi: ufs: core: Add hibernation callbacks")
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Link: https://lore.kernel.org/r/20240718170659.201647-1-manivannan.sadhasivam@linaro.org
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
(cherry picked from commit ac6efb12ca64156f4a94e964acdb96ee7d59630d)
Signed-off-by: Lee Jones <joneslee@google.com>
Change-Id: Ie855c205e39a182050f2080929977e4246eb49e1
2024-10-15 14:12:46 +01:00
Yu Zhao
2589c7fa08 UPSTREAM: mm/mglru: fix overshooting shrinker memory
set_initial_priority() tries to jump-start global reclaim by estimating
the priority based on cold/hot LRU pages.  The estimation does not account
for shrinker objects, and it cannot do so because their sizes can be in
different units other than page.

If shrinker objects are the majority, e.g., on TrueNAS SCALE 24.04.0 where
ZFS ARC can use almost all system memory, set_initial_priority() can
vastly underestimate how much memory ARC shrinker can evict and assign
extreme low values to scan_control->priority, resulting in overshoots of
shrinker objects.

To reproduce the problem, using TrueNAS SCALE 24.04.0 with 32GB DRAM, a
test ZFS pool and the following commands:

  fio --name=mglru.file --numjobs=36 --ioengine=io_uring \
      --directory=/root/test-zfs-pool/ --size=1024m --buffered=1 \
      --rw=randread --random_distribution=random \
      --time_based --runtime=1h &

  for ((i = 0; i < 20; i++))
  do
    sleep 120
    fio --name=mglru.anon --numjobs=16 --ioengine=mmap \
      --filename=/dev/zero --size=1024m --fadvise_hint=0 \
      --rw=randrw --random_distribution=random \
      --time_based --runtime=1m
  done

To fix the problem:
1. Cap scan_control->priority at or above DEF_PRIORITY/2, to prevent
   the jump-start from being overly aggressive.
2. Account for the progress from mm_account_reclaimed_pages(), to
   prevent kswapd_shrink_node() from raising the priority
   unnecessarily.

Bug: 254441685
Link: https://lkml.kernel.org/r/20240711191957.939105-2-yuzhao@google.com
Fixes: e4dde56cd2 ("mm: multi-gen LRU: per-node lru_gen_folio lists")
Signed-off-by: Yu Zhao <yuzhao@google.com>
Reported-by: Alexander Motin <mav@ixsystems.com>
Cc: Wei Xu <weixugc@google.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
(cherry picked from commit 3f74e6bd3b84a8b6bb3cc51609c89e5b9d58eed7)
Signed-off-by: Lee Jones <joneslee@google.com>
Change-Id: I4ae651a8f945c7115da48205dbfea04e66032a68
2024-10-15 14:12:46 +01:00
Willem de Bruijn
4d8187d2c8 UPSTREAM: gso: fix udp gso fraglist segmentation after pull from frag_list
Detect gso fraglist skbs with corrupted geometry (see below) and
pass these to skb_segment instead of skb_segment_list, as the first
can segment them correctly.

Valid SKB_GSO_FRAGLIST skbs
- consist of two or more segments
- the head_skb holds the protocol headers plus first gso_size
- one or more frag_list skbs hold exactly one segment
- all but the last must be gso_size

Optional datapath hooks such as NAT and BPF (bpf_skb_pull_data) can
modify these skbs, breaking these invariants.

In extreme cases they pull all data into skb linear. For UDP, this
causes a NULL ptr deref in __udpv4_gso_segment_list_csum at
udp_hdr(seg->next)->dest.

Detect invalid geometry due to pull, by checking head_skb size.
Don't just drop, as this may blackhole a destination. Convert to be
able to pass to regular skb_segment.

Link: https://lore.kernel.org/netdev/20240428142913.18666-1-shiming.cheng@mediatek.com/
Fixes: 9fd1ff5d2a ("udp: Support UDP fraglist GRO/GSO.")
Signed-off-by: Willem de Bruijn <willemb@google.com>
Cc: stable@vger.kernel.org
Link: https://patch.msgid.link/20241001171752.107580-1-willemdebruijn.kernel@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

Bug: 373245346
Bug: 333849117
Change-Id: I5a317e002f149cf9d399dce9bf87cd649a24da19
(cherry picked from commit a1e40ac5b5e9077fe1f7ae0eb88034db0f9ae1ab)
Signed-off-by: Lena Wang <lena.wang@mediatek.corp-partner.google.com>
(cherry picked from commit 42c2d1ea7c1bf984372f0ca1711d91165cbb87a6)
(cherry picked from commit 7376b8e51c4ddaa8e36b2b33d6ac3392135183b1)
2024-10-14 17:27:09 +00:00
Vijaya Krishna Nivarthi
b11f74b6c1 UPSTREAM: soc: qcom: geni-se: Do not bother about enable/disable of interrupts in secondary sequencer
The select_fifo/dma_mode() functions in geni driver enable/disable
interrupts (secondary included) conditionally for non-uart modes, while
uart is supposed to manage this internally.
However, only uart uses secondary IRQs while spi, i2c do not care about
these at all making their enablement (or disablement) totally unnecessary
for these protos.
Similarly, select_gpi_mode() also does disable s_irq and its useless again.

Drop enabling/disabling secondary IRQs.
This doesn't solve any observed problem but only gets rid of code pieces
that are not required.

Signed-off-by: Vijaya Krishna Nivarthi <quic_vnivarth@quicinc.com>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/1686742087-30731-1-git-send-email-quic_vnivarth@quicinc.com

Bug: 370629635
Change-Id: Id35fae83b7628cf583e4cdd6307862da08d07a9c
(cherry picked from commit 5d85ea2c87)
Signed-off-by: Praveen Talari <quic_ptalari@quicinc.com>
2024-10-14 17:22:48 +00:00
Vijaya Krishna Nivarthi
f9d2a8a3bf UPSTREAM: soc: qcom: geni-se: Add interfaces geni_se_tx_init_dma() and geni_se_rx_init_dma()
The geni_se_xx_dma_prep() interfaces necessarily do DMA mapping before
initiating DMA transfers. This is not suitable for spi where framework
is expected to handle map/unmap.

Expose new interfaces geni_se_xx_init_dma() which do only DMA transfer.

Signed-off-by: Vijaya Krishna Nivarthi <quic_vnivarth@quicinc.com>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Link: https://lore.kernel.org/r/1684325894-30252-2-git-send-email-quic_vnivarth@quicinc.com
Signed-off-by: Mark Brown <broonie@kernel.org>

Bug: 370629635
Change-Id: I14cc6034fe404cd0777482965c98c30456547d57
(cherry picked from commit 6d6e575949)
Signed-off-by: Praveen Talari <quic_ptalari@quicinc.com>
2024-10-14 17:22:48 +00:00
Gabriel Krisman Bertazi
8097478ae8 UPSTREAM: unicode: Don't special case ignorable code points
We don't need to handle them separately. Instead, just let them
decompose/casefold to themselves.

Change-Id: I01c3f2c98ae4d84269586cec09f18239cbee0abb
Signed-off-by: Gabriel Krisman Bertazi <krisman@suse.de>
(cherry picked from commit 5c26d2f1d3f5e4be3e196526bead29ecb139cf91)
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2024-10-14 10:04:19 +00:00
Chao Yu
d41d398db6 BACKPORT: f2fs: fix to handle segment allocation failure correctly
If CONFIG_F2FS_CHECK_FS is off, and for very rare corner case that
we run out of free segment, we should not panic kernel, instead,
let's handle such error correctly in its caller.

Signed-off-by: Chao Yu <chao@kernel.org>
Tested-by: Zhiguo Niu <zhiguo.niu@unisoc.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>

Change-Id: I4e7d90895d82687ae6ec6b64b2de222f1ee2ee9e
Bug: 361829529
(cherry picked from commit 7d009e048d7cfcc21d400f2aba4c8bacbdebbd47)
Signed-off-by: Daeho Jeong <daehojeong@google.com>
2024-10-11 18:08:33 +00:00
Zhiguo Niu
751a02f798 UPSTREAM: f2fs: stop checkpoint when get a out-of-bounds segment
There is low probability that an out-of-bounds segment will be got
on a small-capacity device. In order to prevent subsequent write requests
allocating block address from this invalid segment, which may cause
unexpected issue, stop checkpoint should be performed.

Also introduce a new stop cp reason: STOP_CP_REASON_NO_SEGMENT.

Note, f2fs_stop_checkpoint(, false) is complex and it may sleep, so we should
move it outside segmap_lock spinlock coverage in get_new_segment().

Signed-off-by: Zhiguo Niu <zhiguo.niu@unisoc.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>

Change-Id: Ie5a83b05851a0b5c0c75fa74dbcf9261065724fa
Bug: 361829529
(cherry picked from commit f9e28904e6442019043a8e94ec6747a064d06003)
Signed-off-by: Daeho Jeong <daehojeong@google.com>
2024-10-11 18:08:33 +00:00
Jaegeuk Kim
acc7335e1f BACKPORT: f2fs: kill heap-based allocation
No one uses this feature. Let's kill it.

Reviewed-by: Daeho Jeong <daehojeong@google.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>

Change-Id: I3bd733b0535d4c18f0eb8eb1a8692fb31462e2c8
Bug: 361829529
(cherry picked from commit 4e0197f9932f70cc7be8744aa0ed4dd9b5d97d85)
Signed-off-by: Daeho Jeong <daehojeong@google.com>
2024-10-11 18:08:33 +00:00
Greg Kroah-Hartman
19e119d2d0 Reapply "io_uring: drop any code related to SCM_RIGHTS"
This reverts commit 81cc178d7c which was a
revert of commit a3812a47a3 which is
commit 6e5e6d274956305f1fc0340522b38f5f5be74bdb upstream.

It brings it back in an abi-safe way.

Bug: 338889538
Change-Id: I5e2fd45fb4d972056728fb9963a9ef9f86e9a6ca
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2024-10-09 13:05:14 +00:00
Bao D. Nguyen
80e851bf0d FROMGIT: scsi: ufs: core: Support Updating UIC Command Timeout
The default UIC command timeout still remains 500ms.
Allow platform drivers to override the UIC command
timeout if desired.

In a real product, the 500ms timeout value is probably good enough.
However, during the product development where there are a lot of
logging and debug messages being printed to the uart console,
interrupt starvations happen occasionally because the uart may
print long debug messages from different modules in the system.
While printing, the uart may have interrupts disabled for more
than 500ms, causing UIC command timeout.
The UIC command timeout would trigger more printing from
the UFS driver, and eventually a watchdog timeout may
occur unnecessarily.

Add support for overriding the UIC command timeout value
with the newly created uic_cmd_timeout kernel module parameter.
Default value is 500ms. Supported values range from 500ms
to 2 seconds.

Signed-off-by: Bao D. Nguyen <quic_nguyenb@quicinc.com>
Link: https://lore.kernel.org/r/e4e1c87f3f867f270a3d4b5d57a00139ff0e9741.1721792309.git.quic_nguyenb@quicinc.com
Suggested-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Reviewed-by: Peter Wang <peter.wang@mediatek.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

Bug: 358022094
Bug: 361419350
Change-Id: I3778a26aa82805591454f3771f727d30f92286d9
(cherry picked from commit 88e6804fb323d1dbe477f002a89755f8b034e890
 https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git 6.12/scsi-staging)
Signed-off-by: Ziqi Chen <quic_ziqichen@quicinc.com>
(cherry picked from commit 0c95462c9112873df5ceeeaff13cbfcf05136480)
Signed-off-by: Blagovest Kolenichev <quic_c_bkolen@quicinc.com>
(cherry picked from commit 5414728d5721e0ad3921e45083ebf8cff8d757ac)
Signed-off-by: Shreyas K K <quic_shrekk@quicinc.com>
2024-10-09 00:39:29 +00:00
Seiya Wang
0d60f50b9d ANDROID: GKI: Update symbol list for mtk
ABI impact

1 function symbol(s) added
  'void dev_pm_opp_remove_table(struct device*)'

Add following symbols

arc4_crypt
arc4_setkey
dev_pm_opp_remove_table

Bug: 372142936
Change-Id: I594ae04403c547a51aba873cf3703819a27d6531
Signed-off-by: Seiya Wang <seiya.wang@mediatek.com>
2024-10-08 22:16:28 +00:00
Xu Yang
0ff444ed0b UPSTREAM: Revert "usb: typec: tcpm: clear pd_event queue in PORT_RESET"
This reverts commit bf20c69cf3cf9c6445c4925dd9a8a6ca1b78bfdf.

During tcpm_init() stage, if the VBUS is still present after
tcpm_reset_port(), then we assume that VBUS will off and goto safe0v
after a specific discharge time. Following a TCPM_VBUS_EVENT event if
VBUS reach to off state. TCPM_VBUS_EVENT event may be set during
PORT_RESET handling stage. If pd_events reset to 0 after TCPM_VBUS_EVENT
set, we will lost this VBUS event. Then the port state machine may stuck
at one state.

Before:

[    2.570172] pending state change PORT_RESET -> PORT_RESET_WAIT_OFF @ 100 ms [rev1 NONE_AMS]
[    2.570179] state change PORT_RESET -> PORT_RESET_WAIT_OFF [delayed 100 ms]
[    2.570182] pending state change PORT_RESET_WAIT_OFF -> SNK_UNATTACHED @ 920 ms [rev1 NONE_AMS]
[    3.490213] state change PORT_RESET_WAIT_OFF -> SNK_UNATTACHED [delayed 920 ms]
[    3.490220] Start toggling
[    3.546050] CC1: 0 -> 0, CC2: 0 -> 2 [state TOGGLING, polarity 0, connected]
[    3.546057] state change TOGGLING -> SRC_ATTACH_WAIT [rev1 NONE_AMS]

After revert this patch, we can see VBUS off event and the port will goto
expected state.

[    2.441992] pending state change PORT_RESET -> PORT_RESET_WAIT_OFF @ 100 ms [rev1 NONE_AMS]
[    2.441999] state change PORT_RESET -> PORT_RESET_WAIT_OFF [delayed 100 ms]
[    2.442002] pending state change PORT_RESET_WAIT_OFF -> SNK_UNATTACHED @ 920 ms [rev1 NONE_AMS]
[    2.442122] VBUS off
[    2.442125] state change PORT_RESET_WAIT_OFF -> SNK_UNATTACHED [rev1 NONE_AMS]
[    2.442127] VBUS VSAFE0V
[    2.442351] CC1: 0 -> 0, CC2: 0 -> 0 [state SNK_UNATTACHED, polarity 0, disconnected]
[    2.442357] Start toggling
[    2.491850] CC1: 0 -> 0, CC2: 0 -> 2 [state TOGGLING, polarity 0, connected]
[    2.491858] state change TOGGLING -> SRC_ATTACH_WAIT [rev1 NONE_AMS]
[    2.491863] pending state change SRC_ATTACH_WAIT -> SNK_TRY @ 200 ms [rev1 NONE_AMS]
[    2.691905] state change SRC_ATTACH_WAIT -> SNK_TRY [delayed 200 ms]

Fixes: bf20c69cf3cf ("usb: typec: tcpm: clear pd_event queue in PORT_RESET")
Cc: stable@vger.kernel.org
Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20240809112901.535072-1-xu.yang_2@nxp.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 21ea1ce37fc267dc45fe27517bbde926211683df)

Test: Verify 100 reboot loop, device not stuck in SRC_ATTACH_WAIT
Bug: 320466108
Change-Id: I334497dc94d3011079d5d3208c9355dc2374c4ff
Signed-off-by: RD Babiera <rdbabiera@google.com>
2024-10-08 20:09:22 +00:00
hao lv
311457e823 ANDROID: GKI: update symbol list for transsion
INFO: 49 function symbol(s) added
  'int __percpu_counter_init(struct percpu_counter*, s64, gfp_t, struct lock_class_key*)'
  'int __traceiter_android_rvh_delayacct_init(void*, void*)'
  'int __traceiter_android_rvh_delayacct_tsk_free(void*, struct task_struct*)'
  'int __traceiter_android_rvh_delayacct_tsk_init(void*, struct task_struct*)'
  'int __traceiter_android_vh_delayacct_add_tsk(void*, struct taskstats*, struct task_struct*, int*)'
  'int __traceiter_android_vh_delayacct_blkio_end(void*, struct task_struct*)'
  'int __traceiter_android_vh_delayacct_blkio_start(void*, void*)'
  'int __traceiter_android_vh_delayacct_blkio_ticks(void*, struct task_struct*, __u64*)'
  'int __traceiter_android_vh_delayacct_compact_end(void*, void*)'
  'int __traceiter_android_vh_delayacct_compact_start(void*, void*)'
  'int __traceiter_android_vh_delayacct_freepages_end(void*, void*)'
  'int __traceiter_android_vh_delayacct_freepages_start(void*, void*)'
  'int __traceiter_android_vh_delayacct_swapin_end(void*, void*)'
  'int __traceiter_android_vh_delayacct_swapin_start(void*, void*)'
  'int __traceiter_android_vh_delayacct_thrashing_end(void*, bool*)'
  'int __traceiter_android_vh_delayacct_thrashing_start(void*, bool*)'
  'int __traceiter_android_vh_delayacct_wpcopy_end(void*, void*)'
  'int __traceiter_android_vh_delayacct_wpcopy_start(void*, void*)'
  'int __traceiter_android_vh_exit_mm(void*, struct mm_struct*)'
  'int _atomic_dec_and_lock_irqsave(atomic_t*, spinlock_t*, unsigned long*)'
  'void add_disk_randomness(struct gendisk*)'
  'void bio_uninit(struct bio*)'
  'struct gendisk* blk_mq_alloc_disk_for_queue(struct request_queue*, struct lock_class_key*)'
  'int block_read_full_folio(struct folio*, get_block_t*)'
  'struct bsg_device* bsg_register_queue(struct request_queue*, struct device*, const char*, bsg_sg_io_fn*)'
  'void bsg_unregister_queue(struct bsg_device*)'
  'void buffer_check_dirty_writeback(struct folio*, bool*, bool*)'
  'void call_rcu_hurry(struct callback_head*, rcu_callback_t)'
  'unsigned long clock_t_to_jiffies(unsigned long)'
  'int devcgroup_check_permission(short, u32, u32, short)'
  'int filemap_fdatawait_keep_errors(struct address_space*)'
  'bool folio_mark_dirty(struct folio*)'
  'void folio_unlock(struct folio*)'
  'void invalidate_bh_lrus()'
  'void mempool_exit(mempool_t*)'
  'int mempool_init(mempool_t*, int, mempool_alloc_t*, mempool_free_t*, void*)'
  'void percpu_counter_destroy(struct percpu_counter*)'
  'void percpu_ref_exit(struct percpu_ref*)'
  'int percpu_ref_init(struct percpu_ref*, percpu_ref_func_t*, unsigned int, gfp_t)'
  'bool percpu_ref_is_zero(struct percpu_ref*)'
  'void percpu_ref_kill_and_confirm(struct percpu_ref*, percpu_ref_func_t*)'
  'void percpu_ref_resurrect(struct percpu_ref*)'
  'void percpu_ref_switch_to_atomic_sync(struct percpu_ref*)'
  'void percpu_ref_switch_to_percpu(struct percpu_ref*)'
  'struct folio* read_cache_folio(struct address_space*, unsigned long, filler_t*, struct file*)'
  'int register_tracepoint_module_notifier(struct notifier_block*)'
  'int scsi_register_driver(struct device_driver*)'
  'void set_delayacct_enabled(bool)'
  'void trace_seq_puts(struct trace_seq*, const char*)'

19 variable symbol(s) added
  'struct tracepoint __tracepoint_android_rvh_delayacct_init'
  'struct tracepoint __tracepoint_android_rvh_delayacct_tsk_free'
  'struct tracepoint __tracepoint_android_rvh_delayacct_tsk_init'
  'struct tracepoint __tracepoint_android_vh_delayacct_add_tsk'
  'struct tracepoint __tracepoint_android_vh_delayacct_blkio_end'
  'struct tracepoint __tracepoint_android_vh_delayacct_blkio_start'
  'struct tracepoint __tracepoint_android_vh_delayacct_blkio_ticks'
  'struct tracepoint __tracepoint_android_vh_delayacct_compact_end'
  'struct tracepoint __tracepoint_android_vh_delayacct_compact_start'
  'struct tracepoint __tracepoint_android_vh_delayacct_freepages_end'
  'struct tracepoint __tracepoint_android_vh_delayacct_freepages_start'
  'struct tracepoint __tracepoint_android_vh_delayacct_swapin_end'
  'struct tracepoint __tracepoint_android_vh_delayacct_swapin_start'
  'struct tracepoint __tracepoint_android_vh_delayacct_thrashing_end'
  'struct tracepoint __tracepoint_android_vh_delayacct_thrashing_start'
  'struct tracepoint __tracepoint_android_vh_delayacct_wpcopy_end'
  'struct tracepoint __tracepoint_android_vh_delayacct_wpcopy_start'
  'struct tracepoint __tracepoint_android_vh_exit_mm'
  'struct cgroup_subsys io_cgrp_subsys'

Bug: 372173984

Change-Id: Iba231c44acd0d1e5c6c8c19259ed3a3c4f8cb190
Signed-off-by: hao lv <hao.lv5@transsion.com>
2024-10-08 19:03:31 +00:00
Mukesh Ojha
8d29837471 UPSTREAM: firmware_loader: Abort all upcoming firmware load request once reboot triggered
There could be following scenario where there is a ongoing reboot
is going from processA which tries to call all the reboot notifier
callback and one of them is firmware reboot call which tries to
abort all the ongoing firmware userspace request under fw_lock but
there could be another processB which tries to do request firmware,
which came just after abort done from ProcessA and ask for userspace
to load the firmware and this can stop the ongoing reboot ProcessA
to stall for next 60s(default timeout) which may not be expected
behaviour everyone like to see, instead we should abort any firmware
load request which came once firmware knows about the reboot through
notification.

      ProcessA                             ProcessB

kernel_restart_prepare
  blocking_notifier_call_chain
   fw_shutdown_notify
     kill_pending_fw_fallback_reqs
      __fw_load_abort
       fw_state_aborted                request_firmware
         __fw_state_set                 firmware_fallback_sysfs
...                                       fw_load_from_user_helper
..                                         ...
.                                          ..
                                            usermodehelper_read_trylock
                                             fw_load_sysfs_fallback
                                              fw_sysfs_wait_timeout
usermodehelper_disable
 __usermodehelper_disable
  down_write()

Signed-off-by: Mukesh Ojha <quic_mojha@quicinc.com>
Acked-by: Luis Chamberlain <mcgrof@kernel.org>
Link: https://lore.kernel.org/r/1698330459-31776-2-git-send-email-quic_mojha@quicinc.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

Bug: 309378049
Change-Id: I61eb91f21a01460f340f890b25c60de7597a87ff
Signed-off-by: Mukesh Ojha <quic_mojha@quicinc.com>
Acked-by: Luis Chamberlain <mcgrof@kernel.org>
Link: https://lore.kernel.org/r/1698330459-31776-2-git-send-email-quic_mojha@quicinc.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit effd7c70eaa0440688b60b9d419243695ede3c45)
Signed-off-by: Srinivasarao Pathipati <quic_c_spathi@quicinc.com>
Signed-off-by: Mukesh Ojha <quic_mojha@quicinc.com>
2024-10-08 14:27:15 +05:30
Mukesh Ojha
a9d791a2b2 UPSTREAM: firmware_loader: Refactor kill_pending_fw_fallback_reqs()
Rename 'only_kill_custom' and refactor logic related to it
to be more meaningful.

Bug: 309378049
Change-Id: I119d2f8c29b9b624e6c1d8546c1533d76a2cc51d
Signed-off-by: Mukesh Ojha <quic_mojha@quicinc.com>
Acked-by: Luis Chamberlain <mcgrof@kernel.org>
Link: https://lore.kernel.org/r/1698330459-31776-1-git-send-email-quic_mojha@quicinc.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 87ffa98eeee8d62a56afdad80ea697e7a6e5c354)
Signed-off-by: Srinivasarao Pathipati <quic_c_spathi@quicinc.com>
Signed-off-by: Mukesh Ojha <quic_mojha@quicinc.com>
2024-10-08 14:26:59 +05:30
Rick Yiu
0e8b65e41f ANDROID: sched: Make uclamp changes depend on CAP_SYS_NICE
There is currently nothing preventing tasks from changing their per-task
clamp values in anyway that they like. The rationale is probably that
system administrators are still able to limit those clamps thanks to the
cgroup interface. However, this causes pain in a system where both
per-task and per-cgroup clamp values are expected to be under the
control of core system components (as is the case for Android).

To fix this, let's require CAP_SYS_NICE to change per-task clamp values.
There are ongoing discussions upstream about more flexible approaches
than this using the RLIMIT API -- see [1]. But the upstream discussion
has not converged yet, and this is way too late for UAPI changes in
android12-5.10 anyway, so let's apply this change which provides the
behaviour we want without actually impacting UAPIs.

[1] https://lore.kernel.org/lkml/20210623123441.592348-4-qperret@google.com/

Bug: 187186685
Signed-off-by: Quentin Perret <qperret@google.com>
Signed-off-by: Rick Yiu <rickyiu@google.com>
Change-Id: I749312a77306460318ac5374cf243d00b78120dd
2024-10-07 06:38:08 +00:00
Chao Yu
d4dab27b9d UPSTREAM: f2fs: fix to update i_ctime in __f2fs_setxattr()
generic/728       - output mismatch (see /media/fstests/results//generic/728.out.bad)
    --- tests/generic/728.out	2023-07-19 07:10:48.362711407 +0000
    +++ /media/fstests/results//generic/728.out.bad	2023-07-19 08:39:57.000000000 +0000
     QA output created by 728
    +Expected ctime to change after setxattr.
    +Expected ctime to change after removexattr.
     Silence is golden
    ...
    (Run 'diff -u /media/fstests/tests/generic/728.out /media/fstests/results//generic/728.out.bad'  to see the entire diff)
generic/729        1s

It needs to update i_ctime after {set,remove}xattr, fix it.
Bug: 369150601
Signed-off-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>

Change-Id: I06ecb39a14703efe711bfceef6b52790405b9d2f
(cherry picked from commit 8874ad7dae)
Signed-off-by: Daeho Jeong <daehojeong@google.com>
2024-10-03 20:50:04 +00:00
Chao Yu
d645f73da1 UPSTREAM: f2fs: atomic: fix to truncate pagecache before on-disk metadata truncation
We should always truncate pagecache while truncating on-disk data.

Fixes: a46bebd502 ("f2fs: synchronize atomic write aborts")
Signed-off-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>

Bug: 369150601
Change-Id: Id26fbc5e80b87ca4334b9cd556885900b507ce4a
(cherry picked from commit ebd3309aec6271c4616573b0cb83ea25e623070a)
Signed-off-by: Daeho Jeong <daehojeong@google.com>
2024-10-03 20:50:04 +00:00
Yeongjin Gil
693980c220 BACKPORT: f2fs: Create COW inode from parent dentry for atomic write
The i_pino in f2fs_inode_info has the previous parent's i_ino when inode
was renamed, which may cause f2fs_ioc_start_atomic_write to fail.
If file_wrong_pino is true and i_nlink is 1, then to find a valid pino,
we should refer to the dentry from inode.

To resolve this issue, let's get parent inode using parent dentry
directly.

Fixes: 3db1de0e58 ("f2fs: change the current atomic write way")
Reviewed-by: Sungjong Seo <sj1557.seo@samsung.com>
Reviewed-by: Sunmin Jeong <s_min.jeong@samsung.com>
Signed-off-by: Yeongjin Gil <youngjin.gil@samsung.com>
Reviewed-by: Daeho Jeong <daehojeong@google.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>

Bug: 369150601
Change-Id: I0a32c0a9f67b57ba02e6600ca22e96806ee5470d
(cherry picked from commit 8c1b787938fd86bab27a1492fa887408c75fec2b)
Signed-off-by: Daeho Jeong <daehojeong@google.com>
2024-10-03 20:50:04 +00:00
Chao Yu
e35539a5ac BACKPORT: f2fs: atomic: fix to avoid racing w/ GC
Case #1:
SQLite App		GC Thread		Kworker		Shrinker
- f2fs_ioc_start_atomic_write

- f2fs_ioc_commit_atomic_write
 - f2fs_commit_atomic_write
  - filemap_write_and_wait_range
  : write atomic_file's data to cow_inode
								echo 3 > drop_caches
								to drop atomic_file's
								cache.
			- f2fs_gc
			 - gc_data_segment
			  - move_data_page
			   - set_page_dirty

						- writepages
						 - f2fs_do_write_data_page
						 : overwrite atomic_file's data
						   to cow_inode
  - f2fs_down_write(&fi->i_gc_rwsem[WRITE])
  - __f2fs_commit_atomic_write
  - f2fs_up_write(&fi->i_gc_rwsem[WRITE])

Case #2:
SQLite App		GC Thread		Kworker
- f2fs_ioc_start_atomic_write

						- __writeback_single_inode
						 - do_writepages
						  - f2fs_write_cache_pages
						   - f2fs_write_single_data_page
						    - f2fs_do_write_data_page
						    : write atomic_file's data to cow_inode
			- f2fs_gc
			 - gc_data_segment
			  - move_data_page
			   - set_page_dirty

						- writepages
						 - f2fs_do_write_data_page
						 : overwrite atomic_file's data to cow_inode
- f2fs_ioc_commit_atomic_write

In above cases racing in between atomic_write and GC, previous
data in atomic_file may be overwrited to cow_file, result in
data corruption.

This patch introduces PAGE_PRIVATE_ATOMIC_WRITE bit flag in page.private,
and use it to indicate that there is last dirty data in atomic file,
and the data should be writebacked into cow_file, if the flag is not
tagged in page, we should never write data across files.

Fixes: 3db1de0e58 ("f2fs: change the current atomic write way")
Cc: Daeho Jeong <daehojeong@google.com>
Signed-off-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>

Bug: 369150601
Change-Id: I79e87d74a3a7eaea23490a9ee6da0f832c99abd3
(cherry picked from commit 1a0bd289a5db1df8df8fab949633a0b8d3f235ee)
Signed-off-by: Daeho Jeong <daehojeong@google.com>
2024-10-03 20:50:04 +00:00
Sunmin Jeong
9de4353ca0 UPSTREAM: f2fs: use meta inode for GC of COW file
In case of the COW file, new updates and GC writes are already
separated to page caches of the atomic file and COW file. As some cases
that use the meta inode for GC, there are some race issues between a
foreground thread and GC thread.

To handle them, we need to take care when to invalidate and wait
writeback of GC pages in COW files as the case of using the meta inode.
Also, a pointer from the COW inode to the original inode is required to
check the state of original pages.

For the former, we can solve the problem by using the meta inode for GC
of COW files. Then let's get a page from the original inode in
move_data_block when GCing the COW file to avoid race condition.

Fixes: 3db1de0e58 ("f2fs: change the current atomic write way")
Cc: stable@vger.kernel.org #v5.19+
Reviewed-by: Sungjong Seo <sj1557.seo@samsung.com>
Reviewed-by: Yeongjin Gil <youngjin.gil@samsung.com>
Signed-off-by: Sunmin Jeong <s_min.jeong@samsung.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>

Bug: 369150601
Change-Id: Ibebf5ecb100b23680ef320586d83e74c41339377
(cherry picked from commit f18d0076933689775fe7faeeb10ee93ff01be6ab)
Signed-off-by: Daeho Jeong <daehojeong@google.com>
2024-10-03 20:50:04 +00:00
Sunmin Jeong
9b5ee2f2b1 BACKPORT: f2fs: use meta inode for GC of atomic file
The page cache of the atomic file keeps new data pages which will be
stored in the COW file. It can also keep old data pages when GCing the
atomic file. In this case, new data can be overwritten by old data if a
GC thread sets the old data page as dirty after new data page was
evicted.

Also, since all writes to the atomic file are redirected to COW inodes,
GC for the atomic file is not working well as below.

f2fs_gc(gc_type=FG_GC)
  - select A as a victim segment
  do_garbage_collect
    - iget atomic file's inode for block B
    move_data_page
      f2fs_do_write_data_page
        - use dn of cow inode
        - set fio->old_blkaddr from cow inode
    - seg_freed is 0 since block B is still valid
  - goto gc_more and A is selected as victim again

To solve the problem, let's separate GC writes and updates in the atomic
file by using the meta inode for GC writes.

Fixes: 3db1de0e58 ("f2fs: change the current atomic write way")
Cc: stable@vger.kernel.org #v5.19+
Reviewed-by: Sungjong Seo <sj1557.seo@samsung.com>
Reviewed-by: Yeongjin Gil <youngjin.gil@samsung.com>
Signed-off-by: Sunmin Jeong <s_min.jeong@samsung.com>
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>

Bug: 369150601
Change-Id: I0bcc1da7a59df3254d736ba3fb1d81a6d31bbbcd
(cherry picked from commit b40a2b00370931b0c50148681dd7364573e52e6b)
Signed-off-by: Daeho Jeong <daehojeong@google.com>
2024-10-03 20:50:04 +00:00
Monish Chunara
30f8a76da5 ANDROID: abi_gki_aarch64_qcom: Add missing symbol to QCOM list
Add the following symbol for power_supply_core driver to be used in
bq27xxx_battery driver.

1 function symbol(s) added
  'struct power_supply *__must_check power_supply_register_no_ws(struct
          device *, const struct power_supply_desc *, const struct
          power_supply_config *)'

Bug: 370695775
Change-Id: Ie47064f9724b52ef260c33f12e7681e0eee74a1e
Signed-off-by: Monish Chunara <quic_mchunara@quicinc.com>
2024-10-03 14:43:20 +00:00
Victor Shutemov
6f2e0215d7 ANDROID: GKI: Add KMI symbols for virtio-audio
virtio-audio is used in Haleytek and Volvo Cars audio.
Symbols added:
  snd_device_new
  snd_pcm_hw_limit_rates
  _snd_pcm_stream_lock_irqsave
  snd_pcm_stream_unlock_irqrestore

Bug: 370896645
Change-Id: I741aa41e4ecb873994e567734ebe6728e1de2a69
Signed-off-by: Victor Shutemov <victor@haleytek.com>
2024-10-03 14:34:54 +00:00
Giuliano Procida
ba06e1f121 ANDROID: fix up ABI with change to private struct geni_wrapper
Commit 63fc9af83c ("soc: qcom: geni-se:
add desc struct to specify clocks from device match data") modifies a
structure in drivers/soc/qcom/qcom-geni-se.c as follows.

type 'struct geni_wrapper' changed
  byte size changed from 48 to 56
  member 'struct clk_bulk_data ahb_clks[2]' was removed
  member 'struct clk_bulk_data clks[2]' was added
  member 'unsigned int num_clks' was added

The Android 14 ABI tooling does not exclude this type definition.
This commit updates the ABI representation with the apparent break.
This is safe because the type is not visible to any other code.

Bug: 370629635
Change-Id: I9caeba4a48c4485e209352fa8fe56244e7859ea7
Signed-off-by: Giuliano Procida <gprocida@google.com>
2024-10-03 11:55:35 +00:00
Neil Armstrong
e0de5c9e33 UPSTREAM: soc: qcom: geni-se: add desc struct to specify clocks from device match data
The I2C Master Hub is a stripped down version of the GENI Serial Engine
QUP Wrapper Controller but only supporting I2C serial engines without
DMA support.

Prepare support for the I2C Master Hub variant by moving the required
clocks list to a new desc struct then passing it through the compatible
match data.

Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Signed-off-by: Wolfram Sang <wsa@kernel.org>

Bug: 370629635
Change-Id: I3dacf29d5a1c630b676bf35644222fd96b399446
(cherry picked from commit 63fc9af83c)
Signed-off-by: Praveen Talari <quic_ptalari@quicinc.com>
2024-10-03 11:55:35 +00:00
Greg Kroah-Hartman
fcfc7a6d64 Merge 6.1.112 into android14-6.1-lts
Changes in 6.1.112
	ASoC: SOF: mediatek: Add missing board compatible
	ASoC: allow module autoloading for table db1200_pids
	ASoC: allow module autoloading for table board_ids
	ALSA: hda/realtek - Fixed ALC256 headphone no sound
	ALSA: hda/realtek - FIxed ALC285 headphone no sound
	scsi: lpfc: Fix overflow build issue
	pinctrl: at91: make it work with current gpiolib
	hwmon: (asus-ec-sensors) remove VRM temp X570-E GAMING
	microblaze: don't treat zero reserved memory regions as error
	net: ftgmac100: Ensure tx descriptor updates are visible
	LoongArch: Define ARCH_IRQ_INIT_FLAGS as IRQ_NOPROBE
	wifi: iwlwifi: lower message level for FW buffer destination
	wifi: iwlwifi: mvm: fix iwl_mvm_scan_fits() calculation
	wifi: iwlwifi: mvm: pause TCM when the firmware is stopped
	wifi: iwlwifi: mvm: don't wait for tx queues if firmware is dead
	wifi: mac80211: free skb on error path in ieee80211_beacon_get_ap()
	wifi: iwlwifi: clear trans->state earlier upon error
	can: mcp251xfd: mcp251xfd_ring_init(): check TX-coalescing configuration
	ASoC: Intel: soc-acpi-cht: Make Lenovo Yoga Tab 3 X90F DMI match less strict
	ASoC: intel: fix module autoloading
	ASoC: tda7419: fix module autoloading
	spi: spidev: Add an entry for elgin,jg10309-01
	drm: komeda: Fix an issue related to normalized zpos
	spi: bcm63xx: Enable module autoloading
	smb: client: fix hang in wait_for_response() for negproto
	x86/hyperv: Set X86_FEATURE_TSC_KNOWN_FREQ when Hyper-V provides frequency
	tools: hv: rm .*.cmd when make clean
	block: Fix where bio IO priority gets set
	spi: spidev: Add missing spi_device_id for jg10309-01
	ocfs2: add bounds checking to ocfs2_xattr_find_entry()
	ocfs2: strict bound check before memcmp in ocfs2_xattr_find_entry()
	xfs: dquot shrinker doesn't check for XFS_DQFLAG_FREEING
	xfs: Fix deadlock on xfs_inodegc_worker
	xfs: fix extent busy updating
	xfs: don't use BMBT btree split workers for IO completion
	xfs: fix low space alloc deadlock
	xfs: prefer free inodes at ENOSPC over chunk allocation
	xfs: block reservation too large for minleft allocation
	xfs: fix uninitialized variable access
	xfs: quotacheck failure can race with background inode inactivation
	xfs: fix BUG_ON in xfs_getbmap()
	xfs: buffer pins need to hold a buffer reference
	xfs: defered work could create precommits
	xfs: fix AGF vs inode cluster buffer deadlock
	xfs: collect errors from inodegc for unlinked inode recovery
	xfs: fix ag count overflow during growfs
	xfs: remove WARN when dquot cache insertion fails
	xfs: fix the calculation for "end" and "length"
	xfs: load uncached unlinked inodes into memory on demand
	xfs: fix negative array access in xfs_getbmap
	xfs: fix unlink vs cluster buffer instantiation race
	xfs: correct calculation for agend and blockcount
	xfs: use i_prev_unlinked to distinguish inodes that are not on the unlinked list
	xfs: reload entire unlinked bucket lists
	xfs: make inode unlinked bucket recovery work with quotacheck
	xfs: fix reloading entire unlinked bucket lists
	xfs: set bnobt/cntbt numrecs correctly when formatting new AGs
	xfs: journal geometry is not properly bounds checked
	netfilter: nft_socket: make cgroupsv2 matching work with namespaces
	netfilter: nft_socket: Fix a NULL vs IS_ERR() bug in nft_socket_cgroup_subtree_level()
	netfilter: nft_set_pipapo: walk over current view on netlink dump
	netfilter: nf_tables: missing iterator type in lookup walk
	Revert "wifi: cfg80211: check wiphy mutex is held for wdev mutex"
	gpiolib: cdev: Ignore reconfiguration without direction
	gpio: prevent potential speculation leaks in gpio_device_get_desc()
	can: mcp251xfd: properly indent labels
	can: mcp251xfd: move mcp251xfd_timestamp_start()/stop() into mcp251xfd_chip_start/stop()
	selftests: mptcp: join: restrict fullmesh endp on 1st sf
	btrfs: calculate the right space for delayed refs when updating global reserve
	powercap: RAPL: fix invalid initialization for pl4_supported field
	x86/mm: Switch to new Intel CPU model defines
	USB: serial: pl2303: add device id for Macrosilicon MS3020
	USB: usbtmc: prevent kernel-usb-infoleak
	Linux 6.1.112

Change-Id: Iaa071658c42ce95ef06571de3232cfa7ddc96689
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2024-10-02 15:11:38 +00:00
Greg Kroah-Hartman
8fe68de869 Merge 6.1.111 into android14-6.1-lts
Changes in 6.1.111
	ksmbd: override fsids for share path check
	ksmbd: override fsids for smb2_query_info()
	usbnet: ipheth: fix carrier detection in modes 1 and 4
	net: ethernet: use ip_hdrlen() instead of bit shift
	drm: panel-orientation-quirks: Add quirk for Ayn Loki Zero
	drm: panel-orientation-quirks: Add quirk for Ayn Loki Max
	net: phy: vitesse: repair vsc73xx autonegotiation
	powerpc/mm: Fix boot warning with hugepages and CONFIG_DEBUG_VIRTUAL
	btrfs: update target inode's ctime on unlink
	Input: ads7846 - ratelimit the spi_sync error message
	Input: synaptics - enable SMBus for HP Elitebook 840 G2
	HID: multitouch: Add support for GT7868Q
	scripts: kconfig: merge_config: config files: add a trailing newline
	platform/surface: aggregator_registry: Add Support for Surface Pro 10
	platform/surface: aggregator_registry: Add support for Surface Laptop Go 3
	drm/msm/adreno: Fix error return if missing firmware-name
	Input: i8042 - add Fujitsu Lifebook E756 to i8042 quirk table
	smb/server: fix return value of smb2_open()
	NFSv4: Fix clearing of layout segments in layoutreturn
	NFS: Avoid unnecessary rescanning of the per-server delegation list
	platform/x86: panasonic-laptop: Fix SINF array out of bounds accesses
	platform/x86: panasonic-laptop: Allocate 1 entry extra in the sinf array
	mptcp: pm: Fix uaf in __timer_delete_sync
	arm64: dts: rockchip: fix eMMC/SPI corruption when audio has been used on RK3399 Puma
	arm64: dts: rockchip: override BIOS_DISABLE signal via GPIO hog on RK3399 Puma
	minmax: reduce min/max macro expansion in atomisp driver
	net: tighten bad gso csum offset check in virtio_net_hdr
	dm-integrity: fix a race condition when accessing recalc_sector
	mm: avoid leaving partial pfn mappings around in error case
	net: xilinx: axienet: Fix race in axienet_stop
	pmdomain: ti: Add a null pointer check to the omap_prm_domain_init
	fs/ntfs3: Use kvfree to free memory allocated by kvmalloc
	arm64: dts: rockchip: fix PMIC interrupt pin in pinctrl for ROCK Pi E
	eeprom: digsy_mtc: Fix 93xx46 driver probe failure
	cxl/core: Fix incorrect vendor debug UUID define
	selftests/bpf: Support SOCK_STREAM in unix_inet_redir_to_connected()
	hwmon: (pmbus) Conditionally clear individual status bits for pmbus rev >= 1.2
	ice: fix accounting for filters shared by multiple VSIs
	igb: Always call igb_xdp_ring_update_tail() under Tx lock
	net/mlx5: Update the list of the PCI supported devices
	net/mlx5e: Add missing link modes to ptys2ethtool_map
	net/mlx5: Explicitly set scheduling element and TSAR type
	net/mlx5: Add missing masks and QoS bit masks for scheduling elements
	net/mlx5: Correct TASR typo into TSAR
	net/mlx5: Verify support for scheduling element and TSAR type
	net/mlx5: Fix bridge mode operations when there are no VFs
	fou: fix initialization of grc
	octeontx2-af: Set XOFF on other child transmit schedulers during SMQ flush
	octeontx2-af: Modify SMQ flush sequence to drop packets
	net: ftgmac100: Enable TX interrupt to avoid TX timeout
	netfilter: nft_socket: fix sk refcount leaks
	net: dpaa: Pad packets to ETH_ZLEN
	spi: nxp-fspi: fix the KASAN report out-of-bounds bug
	soundwire: stream: Revert "soundwire: stream: fix programming slave ports for non-continous port maps"
	dma-buf: heaps: Fix off-by-one in CMA heap fault handler
	drm/amdgpu/atomfirmware: Silence UBSAN warning
	spi: geni-qcom: Convert to platform remove callback returning void
	spi: geni-qcom: Undo runtime PM changes at driver exit time
	spi: geni-qcom: Fix incorrect free_irq() sequence
	drm/i915/guc: prevent a possible int overflow in wq offsets
	pinctrl: meteorlake: Add Arrow Lake-H/U ACPI ID
	ASoC: meson: axg-card: fix 'use-after-free'
	Linux 6.1.111

Change-Id: I797d56398f40448fc26f301327ab9500346f4eee
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2024-10-02 15:10:46 +00:00
Greg Kroah-Hartman
8b7627ad15 Merge 6.1.110 into android14-6.1-lts
Changes in 6.1.110
	sch/netem: fix use after free in netem_dequeue
	ASoC: dapm: Fix UAF for snd_soc_pcm_runtime object
	KVM: x86: Acquire kvm->srcu when handling KVM_SET_VCPU_EVENTS
	KVM: SVM: fix emulation of msr reads/writes of MSR_FS_BASE and MSR_GS_BASE
	KVM: SVM: Don't advertise Bus Lock Detect to guest if SVM support is missing
	ALSA: hda/conexant: Add pincfg quirk to enable top speakers on Sirius devices
	ALSA: hda/realtek: add patch for internal mic in Lenovo V145
	ALSA: hda/realtek: Support mute LED on HP Laptop 14-dq2xxx
	ksmbd: unset the binding mark of a reused connection
	ksmbd: Unlock on in ksmbd_tcp_set_interfaces()
	ata: libata: Fix memory leak for error path in ata_host_alloc()
	x86/tdx: Fix data leak in mmio_read()
	perf/x86/intel: Limit the period on Haswell
	irqchip/gic-v2m: Fix refcount leak in gicv2m_of_init()
	x86/kaslr: Expose and use the end of the physical memory address space
	rtmutex: Drop rt_mutex::wait_lock before scheduling
	nvme-pci: Add sleep quirk for Samsung 990 Evo
	Revert "Bluetooth: MGMT/SMP: Fix address type when using SMP over BREDR/LE"
	Bluetooth: MGMT: Ignore keys being loaded with invalid type
	mmc: core: apply SD quirks earlier during probe
	mmc: dw_mmc: Fix IDMAC operation with pages bigger than 4K
	mmc: sdhci-of-aspeed: fix module autoloading
	mmc: cqhci: Fix checking of CQHCI_HALT state
	fuse: update stats for pages in dropped aux writeback list
	fuse: use unsigned type for getxattr/listxattr size truncation
	clk: qcom: clk-alpha-pll: Fix the pll post div mask
	clk: qcom: clk-alpha-pll: Fix the trion pll postdiv set rate API
	can: mcp251x: fix deadlock if an interrupt occurs during mcp251x_open
	spi: rockchip: Resolve unbalanced runtime PM / system PM handling
	tracing: Avoid possible softlockup in tracing_iter_reset()
	net: mctp-serial: Fix missing escapes on transmit
	x86/fpu: Avoid writing LBR bit to IA32_XSS unless supported
	Revert "drm/amdgpu: align pp_power_profile_mode with kernel docs"
	tcp_bpf: fix return value of tcp_bpf_sendmsg()
	ila: call nf_unregister_net_hooks() sooner
	sched: sch_cake: fix bulk flow accounting logic for host fairness
	nilfs2: fix missing cleanup on rollforward recovery error
	nilfs2: protect references to superblock parameters exposed in sysfs
	nilfs2: fix state management in error path of log writing function
	ALSA: control: Apply sanity check of input values for user elements
	ALSA: hda: Add input value sanity checks to HDMI channel map controls
	smack: unix sockets: fix accept()ed socket label
	ELF: fix kernel.randomize_va_space double read
	irqchip/armada-370-xp: Do not allow mapping IRQ 0 and 1
	af_unix: Remove put_pid()/put_cred() in copy_peercred().
	x86/kmsan: Fix hook for unaligned accesses
	iommu: sun50i: clear bypass register
	netfilter: nf_conncount: fix wrong variable type
	udf: Avoid excessive partition lengths
	fs/ntfs3: One more reason to mark inode bad
	media: vivid: fix wrong sizeimage value for mplane
	leds: spi-byte: Call of_node_put() on error path
	wifi: brcmsmac: advertise MFP_CAPABLE to enable WPA3
	usb: uas: set host status byte on data completion error
	usb: gadget: aspeed_udc: validate endpoint index for ast udc
	drm/amd/display: Check HDCP returned status
	drm/amdgpu: Fix smatch static checker warning
	drm/amdgpu: clear RB_OVERFLOW bit when enabling interrupts
	media: vivid: don't set HDMI TX controls if there are no HDMI outputs
	PCI: keystone: Add workaround for Errata #i2037 (AM65x SR 1.0)
	Input: ili210x - use kvmalloc() to allocate buffer for firmware update
	media: qcom: camss: Add check for v4l2_fwnode_endpoint_parse
	pcmcia: Use resource_size function on resource object
	drm/amd/display: Check denominator pbn_div before used
	drm/amdgpu: check for LINEAR_ALIGNED correctly in check_tiling_flags_gfx6
	can: bcm: Remove proc entry when dev is unregistered.
	can: m_can: Release irq on error in m_can_open
	can: mcp251xfd: fix ring configuration when switching from CAN-CC to CAN-FD mode
	rust: Use awk instead of recent xargs
	rust: kbuild: fix export of bss symbols
	cifs: Fix FALLOC_FL_ZERO_RANGE to preflush buffered part of target region
	igb: Fix not clearing TimeSync interrupts for 82580
	ice: Add netif_device_attach/detach into PF reset flow
	platform/x86: dell-smbios: Fix error path in dell_smbios_init()
	regulator: Add of_regulator_bulk_get_all
	regulator: core: Stub devm_regulator_bulk_get_const() if !CONFIG_REGULATOR
	igc: Unlock on error in igc_io_resume()
	ice: Use ice_max_xdp_frame_size() in ice_xdp_setup_prog()
	ice: allow hot-swapping XDP programs
	ice: do not bring the VSI up, if it was down before the XDP setup
	usbnet: modern method to get random MAC
	bareudp: Fix device stats updates.
	fou: Fix null-ptr-deref in GRO.
	net: bridge: br_fdb_external_learn_add(): always set EXT_LEARN
	net: dsa: vsc73xx: fix possible subblocks range of CAPT block
	firmware: cs_dsp: Don't allow writes to read-only controls
	phy: zynqmp: Take the phy mutex in xlate
	ASoC: topology: Properly initialize soc_enum values
	dm init: Handle minors larger than 255
	iommu/vt-d: Handle volatile descriptor status read
	cgroup: Protect css->cgroup write under css_set_lock
	um: line: always fill *error_out in setup_one_line()
	devres: Initialize an uninitialized struct member
	pci/hotplug/pnv_php: Fix hotplug driver crash on Powernv
	crypto: qat - fix unintentional re-enabling of error interrupts
	hwmon: (adc128d818) Fix underflows seen when writing limit attributes
	hwmon: (lm95234) Fix underflows seen when writing limit attributes
	hwmon: (nct6775-core) Fix underflows seen when writing limit attributes
	hwmon: (w83627ehf) Fix underflows seen when writing limit attributes
	libbpf: Add NULL checks to bpf_object__{prev_map,next_map}
	drm/amdgpu: Set no_hw_access when VF request full GPU fails
	ext4: fix possible tid_t sequence overflows
	dma-mapping: benchmark: Don't starve others when doing the test
	wifi: mwifiex: Do not return unused priv in mwifiex_get_priv_by_id()
	smp: Add missing destroy_work_on_stack() call in smp_call_on_cpu()
	fs/ntfs3: Check more cases when directory is corrupted
	btrfs: replace BUG_ON with ASSERT in walk_down_proc()
	btrfs: clean up our handling of refs == 0 in snapshot delete
	btrfs: replace BUG_ON() with error handling at update_ref_for_cow()
	riscv: set trap vector earlier
	PCI: Add missing bridge lock to pci_bus_lock()
	tcp: Don't drop SYN+ACK for simultaneous connect().
	net: dpaa: avoid on-stack arrays of NR_CPUS elements
	i3c: mipi-i3c-hci: Error out instead on BUG_ON() in IBI DMA setup
	kselftests: dmabuf-heaps: Ensure the driver name is null-terminated
	btrfs: initialize location to fix -Wmaybe-uninitialized in btrfs_lookup_dentry()
	s390/vmlinux.lds.S: Move ro_after_init section behind rodata section
	HID: cougar: fix slab-out-of-bounds Read in cougar_report_fixup
	HID: amd_sfh: free driver_data after destroying hid device
	Input: uinput - reject requests with unreasonable number of slots
	usbnet: ipheth: race between ipheth_close and error handling
	Squashfs: sanity check symbolic link size
	of/irq: Prevent device address out-of-bounds read in interrupt map walk
	lib/generic-radix-tree.c: Fix rare race in __genradix_ptr_alloc()
	MIPS: cevt-r4k: Don't call get_c0_compare_int if timer irq is installed
	ata: pata_macio: Use WARN instead of BUG
	NFSv4: Add missing rescheduling points in nfs_client_return_marked_delegations
	selftests: mptcp: fix backport issues
	selftests: mptcp: join: validate event numbers
	selftests: mptcp: join: check re-re-adding ID 0 signal
	io_uring/io-wq: stop setting PF_NO_SETAFFINITY on io-wq workers
	io_uring/sqpoll: Do not set PF_NO_SETAFFINITY on sqpoll threads
	tcp: process the 3rd ACK with sk_socket for TFO/MPTCP
	staging: iio: frequency: ad9834: Validate frequency parameter value
	iio: buffer-dmaengine: fix releasing dma channel on error
	iio: fix scale application in iio_convert_raw_to_processed_unlocked
	iio: adc: ad7124: fix config comparison
	iio: adc: ad7606: remove frstdata check for serial mode
	iio: adc: ad7124: fix chip ID mismatch
	usb: dwc3: core: update LC timer as per USB Spec V3.2
	binder: fix UAF caused by offsets overwrite
	nvmem: Fix return type of devm_nvmem_device_get() in kerneldoc
	uio_hv_generic: Fix kernel NULL pointer dereference in hv_uio_rescind
	Drivers: hv: vmbus: Fix rescind handling in uio_hv_generic
	VMCI: Fix use-after-free when removing resource in vmci_resource_remove()
	clocksource/drivers/imx-tpm: Fix return -ETIME when delta exceeds INT_MAX
	clocksource/drivers/imx-tpm: Fix next event not taking effect sometime
	clocksource/drivers/timer-of: Remove percpu irq related code
	uprobes: Use kzalloc to allocate xol area
	perf/aux: Fix AUX buffer serialization
	fuse: add "expire only" mode to FUSE_NOTIFY_INVAL_ENTRY
	fuse: allow non-extending parallel direct writes on the same file
	fuse: add request extension
	fuse: fix memory leak in fuse_create_open
	net: mana: Fix error handling in mana_create_txq/rxq's NAPI cleanup
	workqueue: wq_watchdog_touch is always called with valid CPU
	workqueue: Improve scalability of workqueue watchdog touch
	ACPI: processor: Return an error if acpi_processor_get_info() fails in processor_add()
	ACPI: processor: Fix memory leaks in error paths of processor_add()
	arm64: acpi: Move get_cpu_for_acpi_id() to a header
	arm64: acpi: Harden get_cpu_for_acpi_id() against missing CPU entry
	can: mcp251xfd: mcp251xfd_handle_rxif_ring_uinc(): factor out in separate function
	can: mcp251xfd: rx: prepare to workaround broken RX FIFO head index erratum
	can: mcp251xfd: clarify the meaning of timestamp
	can: mcp251xfd: rx: add workaround for erratum DS80000789E 6 of mcp2518fd
	drm/amd: Add gfx12 swizzle mode defs
	drm/amdgpu: handle gfx12 in amdgpu_display_verify_sizes
	powerpc/64e: remove unused IBM HTW code
	powerpc/64e: split out nohash Book3E 64-bit code
	powerpc/64e: Define mmu_pte_psize static
	ASoC: tegra: Fix CBB error during probe()
	nvmet-tcp: fix kernel crash if commands allocation fails
	ASoc: SOF: topology: Clear SOF link platform name upon unload
	ASoC: sunxi: sun4i-i2s: fix LRCLK polarity in i2s mode
	drm/i915/fence: Mark debug_fence_init_onstack() with __maybe_unused
	drm/i915/fence: Mark debug_fence_free() with __maybe_unused
	gpio: rockchip: fix OF node leak in probe()
	gpio: modepin: Enable module autoloading
	ublk_drv: fix NULL pointer dereference in ublk_ctrl_start_recovery()
	x86/mm: Fix PTI for i386 some more
	btrfs: fix race between direct IO write and fsync when using same fd
	bpf: Silence a warning in btf_type_id_size()
	memcg: protect concurrent access to mem_cgroup_idr
	regulator: of: fix a NULL vs IS_ERR() check in of_regulator_bulk_get_all()
	fuse: add feature flag for expire-only
	Linux 6.1.110

Change-Id: I58340d95835bd9cb4da4dd8ce1d0e49c5070ea2e
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2024-10-02 15:09:39 +00:00
Greg Kroah-Hartman
b3fe05ecd2 Merge 5e20208dfe ("fuse: fix memory leak in fuse_create_open") into android14-6.1-lts
Steps on the way to 6.1.110

Resolves merge conflicts in:
	fs/fuse/fuse_i.h

Change-Id: Iee80d4790e074e54560b9c6cb9949474e4217346
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2024-10-02 11:27:02 +00:00
Greg Kroah-Hartman
99de38240f Revert "perf/aux: Fix AUX buffer serialization"
This reverts commit 9dc7ad2b67 which is
commit 2ab9d830262c132ab5db2f571003d80850d56b2a upstream.

It breaks the Android kernel abi and can be brought back in the future
in an abi-safe way if it is really needed.

Bug: 161946584
Change-Id: Id119523c115b8a3aec08978e22bdb4e894701923
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2024-10-02 09:40:08 +00:00
Greg Kroah-Hartman
2fa599b850 Revert "clocksource/drivers/timer-of: Remove percpu irq related code"
This reverts commit b62c4a07a3 which is
commit 471ef0b5a8aaca4296108e756b970acfc499ede4 upstream.

It breaks the Android kernel abi and can be brought back in the future
in an abi-safe way if it is really needed.

Bug: 161946584
Change-Id: I9569403775730bf2219ee35aaf361371a0e961f4
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2024-10-02 09:39:00 +00:00
Greg Kroah-Hartman
ad793062e0 Merge 9dc7ad2b67 ("perf/aux: Fix AUX buffer serialization") into android14-6.1-lts
Steps on the way to 6.1.110

Resolves merge conflicts in:
	io_uring/sqpoll.c

Change-Id: Ic3cb865b98eb20277b5d566683e5c1f53a0d5e76
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2024-10-02 08:56:19 +00:00
Greg Kroah-Hartman
a8d720c192 Merge ae7b2bd3d4 ("mmc: cqhci: Fix checking of CQHCI_HALT state") into android14-6.1-lts
Steps on the way to 6.10.110

Change-Id: I1216c9bbd000b12d4527001399684236d905b6b6
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2024-10-02 06:11:12 +00:00
Seiya Wang
1cdc168f1e ANDROID: GKI: Update symbol list for mtk
2 function symbol(s) added
  'int alloc_contig_range(unsigned long start, unsigned long end, unsigned migratetype, gfp_t gfp_mask)'
  'void free_contig_range(unsigned long pfn, unsigned long nr_pages)'

Bug: 370415608
Change-Id: I6ed58458b26364c07779d4b4f662444f14e9a146
Signed-off-by: Seiya Wang <seiya.wang@mediatek.com>
2024-10-01 22:33:24 +00:00
Greg Kroah-Hartman
eccb72fb65 Revert "hwspinlock: Introduce hwspin_lock_bust()"
This reverts commit 1227a242dd which is
commit 7c327d56597d8de1680cf24e956b704270d3d84a upstream.

It breaks the Android kernel abi and can be brought back in the future
in an abi-safe way if it is really needed.

Bug: 161946584
Change-Id: Iaf3c3ada1531c0d19e2f0825f33e125acbbbfbea
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2024-10-01 18:28:53 +00:00
Mark Rutland
7c49c3acea UPSTREAM: arm64: cputype: Add Neoverse-V3 definitions
[ Upstream commit 0ce85db6c2141b7ffb95709d76fc55a27ff3cdc1 ]

Add cputype definitions for Neoverse-V3. These will be used for errata
detection in subsequent patches.

These values can be found in Table B-249 ("MIDR_EL1 bit descriptions")
in issue 0001-04 of the Neoverse-V3 TRM, which can be found at:

  https://developer.arm.com/documentation/107734/0001/?lang=en

Bug: 342491759
Change-Id: Ia2aefecb1f4e0b9c9ae613884f07dfd7d4961fa4
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: James Morse <james.morse@arm.com>
Cc: Will Deacon <will@kernel.org>
Link: https://lore.kernel.org/r/20240508081400.235362-4-mark.rutland@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
[ Mark: trivial backport ]
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Chunhui Li <chunhui.li@mediatek.com>
2024-10-01 16:48:05 +00:00
Mark Rutland
53769a60e3 UPSTREAM: arm64: cputype: Add Cortex-X4 definitions
[ Upstream commit 02a0a04676fa7796d9cbc9eb5ca120aaa194d2dd ]

Add cputype definitions for Cortex-X4. These will be used for errata
detection in subsequent patches.

These values can be found in Table B-249 ("MIDR_EL1 bit descriptions")
in issue 0002-05 of the Cortex-X4 TRM, which can be found at:

  https://developer.arm.com/documentation/102484/0002/?lang=en

Bug: 342491759
Change-Id: I0c13397cb6b2220dc511a039bf18f462d70ba08d
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: James Morse <james.morse@arm.com>
Cc: Will Deacon <will@kernel.org>
Link: https://lore.kernel.org/r/20240508081400.235362-3-mark.rutland@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
[ Mark: fix conflict (dealt with upstream via a later merge) ]
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Chunhui Li <chunhui.li@mediatek.com>
2024-10-01 16:48:05 +00:00
Mark Rutland
ecc82c7e71 UPSTREAM: arm64: barrier: Restore spec_bar() macro
[ Upstream commit ebfc726eae3f31bdb5fae1bbd74ef235d71046ca ]

Upcoming errata workarounds will need to use SB from C code. Restore the
spec_bar() macro so that we can use SB.

This is effectively a revert of commit:

  4f30ba1cce ("arm64: barrier: Remove spec_bar() macro")

Bug: 342491759
Change-Id: Ib62a0e6c1934c61d6cc46ea412a342dd002bcb5c
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: James Morse <james.morse@arm.com>
Cc: Will Deacon <will@kernel.org>
Link: https://lore.kernel.org/r/20240508081400.235362-2-mark.rutland@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
[ Mark: trivial backport ]
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Chunhui Li <chunhui.li@mediatek.com>
2024-10-01 16:47:55 +00:00
Greg Kroah-Hartman
d0af2ae8d5 Merge 6.1.109 into android14-6.1-lts
Changes in 6.1.109
	drm: panel-orientation-quirks: Add quirk for OrangePi Neo
	scsi: ufs: core: Bypass quick recovery if force reset is needed
	ALSA: hda/generic: Add a helper to mute speakers at suspend/shutdown
	ALSA: hda/conexant: Mute speakers at suspend / shutdown
	i2c: Fix conditional for substituting empty ACPI functions
	dma-debug: avoid deadlock between dma debug vs printk and netconsole
	net: usb: qmi_wwan: add MeiG Smart SRM825L
	ASoC: amd: yc: Support mic on Lenovo Thinkpad E14 Gen 6
	mptcp: make pm_remove_addrs_and_subflows static
	mptcp: pm: fix RM_ADDR ID for the initial subflow
	PCI/MSI: Fix UAF in msi_capability_init
	f2fs: fix to truncate preallocated blocks in f2fs_file_open()
	mptcp: pm: fullmesh: select the right ID later
	mptcp: pm: avoid possible UaF when selecting endp
	mptcp: pm: reuse ID 0 after delete and re-add
	mptcp: pm: fix ID 0 endp usage after multiple re-creations
	selftests: mptcp: join: validate fullmesh endp on 1st sf
	selftests: mptcp: join: check re-using ID of closed subflow
	selftests: mptcp: add explicit test case for remove/readd
	selftests: mptcp: join: test for flush/re-add endpoints
	selftests: mptcp: join: check re-using ID of unused ADD_ADDR
	selftests: mptcp: join: check re-adding init endp with != id
	mptcp: pr_debug: add missing \n at the end
	mptcp: avoid duplicated SUB_CLOSED events
	selftests: mptcp: join: check removing ID 0 endpoint
	selftests: mptcp: join: no extra msg if no counter
	selftests: mptcp: join: check re-re-adding ID 0 endp
	selftests: mptcp: join: cannot rm sf if closed
	drm/amdgpu: Fix uninitialized variable warning in amdgpu_afmt_acr
	drm/amd/display: Assign linear_pitch_alignment even for VM
	drm/amdgpu: fix overflowed array index read warning
	drm/amdgpu/pm: Check the return value of smum_send_msg_to_smc
	drm/amd/pm: fix uninitialized variable warning
	drm/amd/pm: fix uninitialized variable warning for smu8_hwmgr
	drm/amd/pm: fix warning using uninitialized value of max_vid_step
	drm/amd/pm: Fix negative array index read
	drm/amd/pm: fix the Out-of-bounds read warning
	drm/amd/pm: fix uninitialized variable warnings for vega10_hwmgr
	drm/amdgpu: avoid reading vf2pf info size from FB
	drm/amd/display: Check gpio_id before used as array index
	drm/amd/display: Stop amdgpu_dm initialize when stream nums greater than 6
	drm/amd/display: Add array index check for hdcp ddc access
	drm/amd/display: Check num_valid_sets before accessing reader_wm_sets[]
	drm/amd/display: Check msg_id before processing transcation
	drm/amd/display: Fix Coverity INTEGER_OVERFLOW within dal_gpio_service_create
	drm/amd/display: Spinlock before reading event
	drm/amd/display: Ensure index calculation will not overflow
	drm/amd/display: Skip inactive planes within ModeSupportAndSystemConfiguration
	drm/amd/amdgpu: Check tbo resource pointer
	drm/amd/pm: fix uninitialized variable warnings for vangogh_ppt
	drm/amdgpu/pm: Fix uninitialized variable warning for smu10
	drm/amdgpu/pm: Fix uninitialized variable agc_btc_response
	drm/amdgpu: Fix out-of-bounds write warning
	drm/amdgpu: Fix out-of-bounds read of df_v1_7_channel_number
	drm/amdgpu: fix ucode out-of-bounds read warning
	drm/amdgpu: fix mc_data out-of-bounds read warning
	drm/amdkfd: Reconcile the definition and use of oem_id in struct kfd_topology_device
	apparmor: fix possible NULL pointer dereference
	wifi: ath11k: initialize 'ret' in ath11k_qmi_load_file_target_mem()
	drm/amdgpu/pm: Check input value for CUSTOM profile mode setting on legacy SOCs
	drm/amdgpu: fix dereference after null check
	drm/amdgpu: fix the waring dereferencing hive
	drm/amd/pm: check specific index for aldebaran
	drm/amdgpu: the warning dereferencing obj for nbio_v7_4
	drm/amd/pm: check negtive return for table entries
	wifi: rtw89: ser: avoid multiple deinit on same CAM
	drm/amdgpu: update type of buf size to u32 for eeprom functions
	wifi: iwlwifi: remove fw_running op
	cpufreq: scmi: Avoid overflow of target_freq in fast switch
	PCI: al: Check IORESOURCE_BUS existence during probe
	hwspinlock: Introduce hwspin_lock_bust()
	RDMA/efa: Properly handle unexpected AQ completions
	ionic: fix potential irq name truncation
	pwm: xilinx: Fix u32 overflow issue in 32-bit width PWM mode.
	rcu/nocb: Remove buggy bypass lock contention mitigation
	usbip: Don't submit special requests twice
	usb: typec: ucsi: Fix null pointer dereference in trace
	fsnotify: clear PARENT_WATCHED flags lazily
	regmap: spi: Fix potential off-by-one when calculating reserved size
	smack: tcp: ipv4, fix incorrect labeling
	net/mlx5e: SHAMPO, Fix incorrect page release
	drm/meson: plane: Add error handling
	drm/bridge: tc358767: Check if fully initialized before signalling HPD event via IRQ
	dmaengine: altera-msgdma: use irq variant of spin_lock/unlock while invoking callbacks
	dmaengine: altera-msgdma: properly free descriptor in msgdma_free_descriptor
	hwmon: (k10temp) Check return value of amd_smn_read()
	wifi: cfg80211: make hash table duplicates more survivable
	driver: iio: add missing checks on iio_info's callback access
	block: remove the blk_flush_integrity call in blk_integrity_unregister
	drm/amd/display: added NULL check at start of dc_validate_stream
	drm/amd/display: Correct the defined value for AMDGPU_DMUB_NOTIFICATION_MAX
	drm/amd/display: Skip wbscl_set_scaler_filter if filter is null
	media: uvcvideo: Enforce alignment of frame and interval
	virtio_net: Fix napi_skb_cache_put warning
	Bluetooth: SCO: Fix possible circular locking dependency on sco_connect_cfm
	Bluetooth: SCO: fix sco_conn related locking and validity issues
	ext4: fix inode tree inconsistency caused by ENOMEM
	udf: Limit file size to 4TB
	ext4: reject casefold inode flag without casefold feature
	ext4: handle redirtying in ext4_bio_write_page()
	i2c: Use IS_REACHABLE() for substituting empty ACPI functions
	Linux 6.1.109

Change-Id: If689bfd671fb92d4092b9221d742121d3f3d669e
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2024-10-01 16:27:04 +00:00
Greg Kroah-Hartman
c59cc7f298 Merge 6.1.108 into android14-6.1-lts
Changes in 6.1.108
	drm/amdgpu: Using uninitialized value *size when calling amdgpu_vce_cs_reloc
	LoongArch: Remove the unused dma-direct.h
	btrfs: run delayed iputs when flushing delalloc
	smb/client: avoid dereferencing rdata=NULL in smb2_new_read_req()
	pinctrl: rockchip: correct RK3328 iomux width flag for GPIO2-B pins
	pinctrl: single: fix potential NULL dereference in pcs_get_function()
	of: Add cleanup.h based auto release via __free(device_node) markings
	wifi: wfx: repair open network AP mode
	wifi: mwifiex: duplicate static structs used in driver instances
	net: mana: Fix race of mana_hwc_post_rx_wqe and new hwc response
	mptcp: close subflow when receiving TCP+FIN
	mptcp: sched: check both backup in retrans
	mptcp: pm: skip connecting to already established sf
	mptcp: pm: reset MPC endp ID when re-added
	mptcp: pm: send ACK on an active subflow
	mptcp: pm: do not remove already closed subflows
	mptcp: pm: ADD_ADDR 0 is not a new address
	drm/amdgpu: align pp_power_profile_mode with kernel docs
	drm/amdgpu/swsmu: always force a state reprogram on init
	ata: libata-core: Fix null pointer dereference on error
	usb: typec: fix up incorrectly backported "usb: typec: tcpm: unregister existing source caps before re-registration"
	mmc: Avoid open coding by using mmc_op_tuning()
	mmc: mtk-sd: receive cmd8 data when hs400 tuning fail
	mptcp: unify pm get_local_id interfaces
	mptcp: pm: remove mptcp_pm_remove_subflow()
	mptcp: pm: only mark 'subflow' endp as available
	mptcp: pm: check add_addr_accept_max before accepting new ADD_ADDR
	of: Introduce for_each_*_child_of_node_scoped() to automate of_node_put() handling
	thermal: of: Fix OF node leak in thermal_of_trips_init() error path
	thermal: of: Fix OF node leak in of_thermal_zone_find() error paths
	ASoC: amd: acp: fix module autoloading
	ASoC: SOF: amd: Fix for acp init sequence
	pinctrl: mediatek: common-v2: Fix broken bias-disable for PULL_PU_PD_RSEL_TYPE
	mm: Fix missing folio invalidation calls during truncation
	btrfs: fix extent map use-after-free when adding pages to compressed bio
	soundwire: stream: fix programming slave ports for non-continous port maps
	phy: xilinx: add runtime PM support
	phy: xilinx: phy-zynqmp: dynamic clock support for power-save
	phy: xilinx: phy-zynqmp: Fix SGMII linkup failure on resume
	dmaengine: dw: Add peripheral bus width verification
	dmaengine: dw: Add memory bus width verification
	Bluetooth: hci_core: Fix not handling hibernation actions
	iommu: Do not return 0 from map_pages if it doesn't do anything
	netfilter: nf_tables: restore IP sanity checks for netdev/egress
	wifi: iwlwifi: fw: fix wgds rev 3 exact size
	ethtool: check device is present when getting link settings
	netfilter: nf_tables_ipv6: consider network offset in netdev/egress validation
	selftests: forwarding: no_forwarding: Down ports on cleanup
	selftests: forwarding: local_termination: Down ports on cleanup
	bonding: implement xdo_dev_state_free and call it after deletion
	gtp: fix a potential NULL pointer dereference
	sctp: fix association labeling in the duplicate COOKIE-ECHO case
	drm/amd/display: avoid using null object of framebuffer
	net: busy-poll: use ktime_get_ns() instead of local_clock()
	nfc: pn533: Add poll mod list filling check
	soc: qcom: cmd-db: Map shared memory as WC, not WB
	cdc-acm: Add DISABLE_ECHO quirk for GE HealthCare UI Controller
	USB: serial: option: add MeiG Smart SRM825L
	usb: dwc3: omap: add missing depopulate in probe error path
	usb: dwc3: core: Prevent USB core invalid event buffer address access
	usb: dwc3: st: fix probed platform device ref count on probe error path
	usb: dwc3: st: add missing depopulate in probe error path
	usb: core: sysfs: Unmerge @usb3_hardware_lpm_attr_group in remove_power_attributes()
	usb: cdnsp: fix incorrect index in cdnsp_get_hw_deq function
	usb: cdnsp: fix for Link TRB with TC
	phy: zynqmp: Enable reference clock correctly
	igc: Fix reset adapter logics when tx mode change
	igc: Fix qbv tx latency by setting gtxoffset
	scsi: aacraid: Fix double-free on probe failure
	apparmor: fix policy_unpack_test on big endian systems
	fbdev: offb: fix up missing cleanup.h
	Linux 6.1.108

Change-Id: I8ef0e85c12e4e2ecccaf467f40d86c559db7d007
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2024-10-01 14:30:35 +00:00
Greg Kroah-Hartman
db06d215a8 Revert "posix-timers: Ensure timer ID search-loop limit is valid"
This reverts commit 6a0ac84501 which is
commit 8ce8849dd1 upstream.

It breaks the Android kernel abi and can be brought back in the future
in an abi-safe way if it is really needed.

Bug: 161946584
Change-Id: Ie271fbc9312fe3c85aa472ecad68db55985fd96c
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2024-10-01 12:57:15 +00:00
Greg Kroah-Hartman
3e3e85a2c0 Revert "pid: Replace struct pid 1-element array with flex-array"
This reverts commit 5ea9dcfcd9 which is
commit b69f0aeb06 upstream.

It breaks the Android kernel abi and can be brought back in the future
in an abi-safe way if it is really needed.

Bug: 161946584
Change-Id: Id78fddc05ab98cf79beff0adc409fbc588f7499f
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2024-10-01 12:56:11 +00:00