From f837a7b5847c39761bf9f1f81b74c8bb5cb3174b Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 27 Nov 2023 12:43:06 +0000 Subject: [PATCH] 5.10-stable patches added patches: interconnect-qcom-add-support-for-mask-based-bcms.patch --- ...qcom-add-support-for-mask-based-bcms.patch | 61 +++++++++++++ ...ly-config-change-callback-invocation.patch | 88 ------------------- queue-5.10/series | 2 +- 3 files changed, 62 insertions(+), 89 deletions(-) create mode 100644 queue-5.10/interconnect-qcom-add-support-for-mask-based-bcms.patch delete mode 100644 queue-5.10/s390-ap-fix-ap-bus-crash-on-early-config-change-callback-invocation.patch diff --git a/queue-5.10/interconnect-qcom-add-support-for-mask-based-bcms.patch b/queue-5.10/interconnect-qcom-add-support-for-mask-based-bcms.patch new file mode 100644 index 00000000000..dbfb5563196 --- /dev/null +++ b/queue-5.10/interconnect-qcom-add-support-for-mask-based-bcms.patch @@ -0,0 +1,61 @@ +From d8630f050d3fd2079f8617dd6c00c6509109c755 Mon Sep 17 00:00:00 2001 +From: Mike Tipton +Date: Fri, 23 Jun 2023 14:50:42 +0200 +Subject: interconnect: qcom: Add support for mask-based BCMs + +From: Mike Tipton + +commit d8630f050d3fd2079f8617dd6c00c6509109c755 upstream. + +Some BCMs aren't directly associated with the data path (i.e. ACV) and +therefore don't communicate using BW. Instead, they are simply +enabled/disabled with a simple bit mask. Add support for these. + +Origin commit retrieved from: +https://git.codelinaro.org/clo/la/kernel/msm-5.15/-/commit/2d1573e0206998151b342e6b52a4c0f7234d7e36 + +Signed-off-by: Mike Tipton +[narmstrong: removed copyright change from original commit] +Signed-off-by: Neil Armstrong +Reviewed-by: Konrad Dybcio +Link: https://lore.kernel.org/r/20230619-topic-sm8550-upstream-interconnect-mask-vote-v2-1-709474b151cc@linaro.org +Fixes: fafc114a468e ("interconnect: qcom: Add SM8450 interconnect provider driver") +Signed-off-by: Georgi Djakov +Signed-off-by: Greg Kroah-Hartman +--- + drivers/interconnect/qcom/bcm-voter.c | 5 +++++ + drivers/interconnect/qcom/icc-rpmh.h | 2 ++ + 2 files changed, 7 insertions(+) + +--- a/drivers/interconnect/qcom/bcm-voter.c ++++ b/drivers/interconnect/qcom/bcm-voter.c +@@ -90,6 +90,11 @@ static void bcm_aggregate(struct qcom_ic + + temp = agg_peak[bucket] * bcm->vote_scale; + bcm->vote_y[bucket] = bcm_div(temp, bcm->aux_data.unit); ++ ++ if (bcm->enable_mask && (bcm->vote_x[bucket] || bcm->vote_y[bucket])) { ++ bcm->vote_x[bucket] = 0; ++ bcm->vote_y[bucket] = bcm->enable_mask; ++ } + } + + if (bcm->keepalive && bcm->vote_x[QCOM_ICC_BUCKET_AMC] == 0 && +--- a/drivers/interconnect/qcom/icc-rpmh.h ++++ b/drivers/interconnect/qcom/icc-rpmh.h +@@ -81,6 +81,7 @@ struct qcom_icc_node { + * @vote_x: aggregated threshold values, represents sum_bw when @type is bw bcm + * @vote_y: aggregated threshold values, represents peak_bw when @type is bw bcm + * @vote_scale: scaling factor for vote_x and vote_y ++ * @enable_mask: optional mask to send as vote instead of vote_x/vote_y + * @dirty: flag used to indicate whether the bcm needs to be committed + * @keepalive: flag used to indicate whether a keepalive is required + * @aux_data: auxiliary data used when calculating threshold values and +@@ -97,6 +98,7 @@ struct qcom_icc_bcm { + u64 vote_x[QCOM_ICC_NUM_BUCKETS]; + u64 vote_y[QCOM_ICC_NUM_BUCKETS]; + u64 vote_scale; ++ u32 enable_mask; + bool dirty; + bool keepalive; + struct bcm_db aux_data; diff --git a/queue-5.10/s390-ap-fix-ap-bus-crash-on-early-config-change-callback-invocation.patch b/queue-5.10/s390-ap-fix-ap-bus-crash-on-early-config-change-callback-invocation.patch deleted file mode 100644 index d354d066492..00000000000 --- a/queue-5.10/s390-ap-fix-ap-bus-crash-on-early-config-change-callback-invocation.patch +++ /dev/null @@ -1,88 +0,0 @@ -From e14aec23025eeb1f2159ba34dbc1458467c4c347 Mon Sep 17 00:00:00 2001 -From: Harald Freudenberger -Date: Mon, 23 Oct 2023 09:57:10 +0200 -Subject: s390/ap: fix AP bus crash on early config change callback invocation - -From: Harald Freudenberger - -commit e14aec23025eeb1f2159ba34dbc1458467c4c347 upstream. - -Fix kernel crash in AP bus code caused by very early invocation of the -config change callback function via SCLP. - -After a fresh IML of the machine the crypto cards are still offline and -will get switched online only with activation of any LPAR which has the -card in it's configuration. A crypto card coming online is reported -to the LPAR via SCLP and the AP bus offers a callback function to get -this kind of information. However, it may happen that the callback is -invoked before the AP bus init function is complete. As the callback -triggers a synchronous AP bus scan, the scan may already run but some -internal states are not initialized by the AP bus init function resulting -in a crash like this: - - [ 11.635859] Unable to handle kernel pointer dereference in virtual kernel address space - [ 11.635861] Failing address: 0000000000000000 TEID: 0000000000000887 - [ 11.635862] Fault in home space mode while using kernel ASCE. - [ 11.635864] AS:00000000894c4007 R3:00000001fece8007 S:00000001fece7800 P:000000000000013d - [ 11.635879] Oops: 0004 ilc:1 [#1] SMP - [ 11.635882] Modules linked in: - [ 11.635884] CPU: 5 PID: 42 Comm: kworker/5:0 Not tainted 6.6.0-rc3-00003-g4dbf7cdc6b42 #12 - [ 11.635886] Hardware name: IBM 3931 A01 751 (LPAR) - [ 11.635887] Workqueue: events_long ap_scan_bus - [ 11.635891] Krnl PSW : 0704c00180000000 0000000000000000 (0x0) - [ 11.635895] R:0 T:1 IO:1 EX:1 Key:0 M:1 W:0 P:0 AS:3 CC:0 PM:0 RI:0 EA:3 - [ 11.635897] Krnl GPRS: 0000000001000a00 0000000000000000 0000000000000006 0000000089591940 - [ 11.635899] 0000000080000000 0000000000000a00 0000000000000000 0000000000000000 - [ 11.635901] 0000000081870c00 0000000089591000 000000008834e4e2 0000000002625a00 - [ 11.635903] 0000000081734200 0000038000913c18 000000008834c6d6 0000038000913ac8 - [ 11.635906] Krnl Code:>0000000000000000: 0000 illegal - [ 11.635906] 0000000000000002: 0000 illegal - [ 11.635906] 0000000000000004: 0000 illegal - [ 11.635906] 0000000000000006: 0000 illegal - [ 11.635906] 0000000000000008: 0000 illegal - [ 11.635906] 000000000000000a: 0000 illegal - [ 11.635906] 000000000000000c: 0000 illegal - [ 11.635906] 000000000000000e: 0000 illegal - [ 11.635915] Call Trace: - [ 11.635916] [<0000000000000000>] 0x0 - [ 11.635918] [<000000008834e4e2>] ap_queue_init_state+0x82/0xb8 - [ 11.635921] [<000000008834ba1c>] ap_scan_domains+0x6fc/0x740 - [ 11.635923] [<000000008834c092>] ap_scan_adapter+0x632/0x8b0 - [ 11.635925] [<000000008834c3e4>] ap_scan_bus+0xd4/0x288 - [ 11.635927] [<00000000879a33ba>] process_one_work+0x19a/0x410 - [ 11.635930] Discipline DIAG cannot be used without z/VM - [ 11.635930] [<00000000879a3a2c>] worker_thread+0x3fc/0x560 - [ 11.635933] [<00000000879aea60>] kthread+0x120/0x128 - [ 11.635936] [<000000008792afa4>] __ret_from_fork+0x3c/0x58 - [ 11.635938] [<00000000885ebe62>] ret_from_fork+0xa/0x30 - [ 11.635942] Last Breaking-Event-Address: - [ 11.635942] [<000000008834c6d4>] ap_wait+0xcc/0x148 - -This patch improves the ap_bus_force_rescan() function which is -invoked by the config change callback by checking if a first -initial AP bus scan has been done. If not, the force rescan request -is simple ignored. Anyhow it does not make sense to trigger AP bus -re-scans even before the very first bus scan is complete. - -Cc: stable@vger.kernel.org -Reviewed-by: Holger Dengler -Signed-off-by: Harald Freudenberger -Signed-off-by: Vasily Gorbik -Signed-off-by: Greg Kroah-Hartman ---- - drivers/s390/crypto/ap_bus.c | 4 ++++ - 1 file changed, 4 insertions(+) - ---- a/drivers/s390/crypto/ap_bus.c -+++ b/drivers/s390/crypto/ap_bus.c -@@ -787,6 +787,10 @@ EXPORT_SYMBOL(ap_driver_unregister); - - void ap_bus_force_rescan(void) - { -+ /* Only trigger AP bus scans after the initial scan is done */ -+ if (atomic64_read(&ap_scan_bus_count) <= 0) -+ return; -+ - /* processing a asynchronous bus rescan */ - del_timer(&ap_config_timer); - queue_work(system_long_wq, &ap_scan_work); diff --git a/queue-5.10/series b/queue-5.10/series index 4662bfdb2cc..577baa357b5 100644 --- a/queue-5.10/series +++ b/queue-5.10/series @@ -158,7 +158,6 @@ revert-ncsi-propagate-carrier-gain-loss-events-to-the-ncsi-controller.patch lsm-fix-default-return-value-for-vm_enough_memory.patch lsm-fix-default-return-value-for-inode_getsecctx.patch i2c-designware-disable-tx_empty-irq-while-waiting-for-block-length-byte.patch -s390-ap-fix-ap-bus-crash-on-early-config-change-callback-invocation.patch net-dsa-lan9303-consequently-nested-lock-physical-mdio.patch net-phylink-initialize-carrier-state-at-creation.patch i2c-i801-fix-potential-race-in-i801_block_transaction_byte_by_byte.patch @@ -185,3 +184,4 @@ tracing-have-trace_event_file-have-ref-counters.patch netfilter-nftables-update-table-flags-from-the-commit-phase.patch netfilter-nf_tables-fix-table-flag-updates.patch netfilter-nf_tables-disable-toggling-dormant-table-state-more-than-once.patch +interconnect-qcom-add-support-for-mask-based-bcms.patch -- 2.47.3