6.6.76-rc1 review
Subsystems (6)
Greg Kroah-Hartman
maintainerPATCH 131/393 cpufreq: ACPI: Fix max-frequency computation
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Gautham R. Shenoy <[email protected]>
[ Upstream commit 0834667545962ef1c5e8684ed32b45d9c574acd3 ]
Commit 3c55e94c0ade ("cpufreq: ACPI: Extend frequency tables to cover boost frequencies") introduced an assumption in acpi_cpufreq_cpu_init() that the first entry in the P-state table was the nominal frequency. This assumption is incorrect. The frequency corresponding to the P0 P-State need not be the same as the nominal frequency advertised via CPPC.
Since the driver is using the CPPC.highest_perf and CPPC.nominal_perf to compute the boost-ratio, it makes sense to use CPPC.nominal_freq to compute the max-frequency. CPPC.nominal_freq is advertised on platforms supporting CPPC revisions 3 or higher.
Hence, fallback to using the first entry in the P-State table only on platforms that do not advertise CPPC.nominal_freq.
--- drivers/cpufreq/acpi-cpufreq.c | 36 +++++++++++++++++++++++++--------- 1 file changed, 27 insertions(+), 9 deletions(-)
drivers/cpufreq/acpi-cpufreq.c +27 -9
@@ -628,7 +628,14 @@ static int acpi_cpufreq_blacklist(struct cpuinfo_x86 *c)#endif #ifdef CONFIG_ACPI_CPPC_LIB -static u64 get_max_boost_ratio (unsigned int cpu) +/* +* get_max_boost_ratio: Computes the max_boost_ratio as the ratio +* between the highest_perf and the nominal_perf. +* +* Returns the max_boost_ratio for @cpu. Returns the CPPC nominal +* frequency via @nominal_freq if it is non-NULL pointer. +*/ +static u64 get_max_boost_ratio (unsigned int cpu,u64 *nominal_freq) {struct cppc_perf_caps perf_caps;u64 highest_perf, nominal_perf;
@@ -651,6 +658,9 @@ static u64 get_max_boost_ratio(unsigned int cpu) nominal_perf = perf_caps.nominal_perf; +if (nominal_freq) + *nominal_freq = perf_caps.nominal_freq; +if (!highest_perf || !nominal_perf) {pr_debug ("CPU%d: highest or nominal performance missing\n" , cpu);return 0 ;
@@ -663,8 +673,12 @@ static u64 get_max_boost_ratio(unsigned int cpu) return div_u64(highest_perf << SCHED_CAPACITY_SHIFT, nominal_perf); } +#else -static inline u64 get_max_boost_ratio (unsigned int cpu) {return 0 ; } +static inline u64 get_max_boost_ratio (unsigned int cpu,u64 *nominal_freq) +{ +return 0 ; +}#endif static int acpi_cpufreq_cpu_init (struct cpufreq_policy *policy)
@@ -674,9 +688,9 @@ static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy)struct acpi_cpufreq_data *data;unsigned int cpu = policy->cpu;struct cpuinfo_x86 *c = &cpu_data (cpu); +u64 max_boost_ratio, nominal_freq =0 ;unsigned int valid_states =0 ;unsigned int result =0 ; -u64 max_boost_ratio;unsigned int i;#ifdef CONFIG_SMP static int blacklisted;
@@ -826,16 +840,20 @@ static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy) } freq_table[valid_states].frequency =CPUFREQ_TABLE_END ; - max_boost_ratio =get_max_boost_ratio (cpu); + max_boost_ratio =get_max_boost_ratio (cpu, &nominal_freq);if (max_boost_ratio) { -unsigned int freq = freq_table[0 ].frequency; +unsigned int freq = nominal_freq;/* -* Because the loop above sorts the freq_table entries in the -* descending order, freq is the maximum frequency in the table. -* Assume that it corresponds to the CPPC nominal frequency and -* use it to set cpuinfo.max_freq. +* The loop above sorts the freq_table entries in the +* descending order. If ACPI CPPC has not advertised +* the nominal frequency (this is possible in CPPC +* revisions prior to 3), then use the first entry in +* the pstate table as a proxy for nominal frequency. */ +if (!freq) + freq = freq_table[0 ].frequency; + policy->cpuinfo.max_freq = freq * max_boost_ratio >>SCHED_CAPACITY_SHIFT ; }else {/*
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 132/393 selftests: timers: clocksource-switch: Adapt progress to kselftest framework
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Geert Uytterhoeven <[email protected]>
[ Upstream commit 8694e6a7f7dba23d3abd9f5a96f64d161704c7b1 ]
When adapting the test to the kselftest framework, a few printf() calls indicating test progress were not updated.
Fix this by replacing these printf() calls by ksft_print_msg() calls.
--- tools/testing/selftests/timers/clocksource-switch.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
tools/testing/selftests/timers/clocksource-switch.c +3 -3
@@ -156,8 +156,8 @@ int main(int argc, char **argv)/* Check everything is sane before we start switching asynchronously */ if (do_sanity_check) {for (i =0 ; i < count; i++) { -printf ("Validating clocksource %s\n" , - clocksource_list[i]); +ksft_print_msg ("Validating clocksource %s\n" , + clocksource_list[i]);if (change_clocksource (clocksource_list[i])) { status =-1 ; goto out;
@@ -169,7 +169,7 @@ int main(int argc, char **argv) } } -printf ("Running Asynchronous Switching Tests...\n" ); +ksft_print_msg ("Running Asynchronous Switching Tests...\n" ); pid =fork ();if (!pid)return run_tests (runtime);
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 133/393 selftests: harness: fix printing of mismatch values in __EXPECT()
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dmitry V. Levin <[email protected]>
[ Upstream commit 02bc220dc6dc7c56edc4859bc5dd2c08b95d5fb5 ]
intptr_t and uintptr_t are not big enough types on 32-bit architectures when printing 64-bit values, resulting to the following incorrect diagnostic output:
# get_syscall_info.c:209:get_syscall_info:Expected exp_args[2] (3134324433) == info.entry.args[1] (3134324433)
Replace intptr_t and uintptr_t with intmax_t and uintmax_t, respectively. With this fix, the same test produces more usable diagnostic output:
# get_syscall_info.c:209:get_syscall_info:Expected exp_args[2] (3134324433) == info.entry.args[1] (18446744072548908753)
--- tools/testing/selftests/kselftest_harness.h | 24 ++++++++++----------- 1 file changed, 12 insertions(+), 12 deletions(-)
tools/testing/selftests/kselftest_harness.h +12 -12
@@ -710,33 +710,33 @@/* Report with actual signedness to avoid weird output. */ \switch (is_signed_type (__exp) *2 +is_signed_type (__seen)) { \case 0 : { \ -unsigned long long __exp_print = (uintptr_t )__exp; \ -unsigned long long __seen_print = (uintptr_t )__seen; \ -__TH_LOG ("Expected %s (%llu) %s %s (%llu)" , \ +uintmax_t __exp_print = (uintmax_t )__exp; \ +uintmax_t __seen_print = (uintmax_t )__seen; \ +__TH_LOG ("Expected %s (%ju) %s %s (%ju)" , \ _expected_str, __exp_print, #_t, \ _seen_str, __seen_print); \break ; \ } \case 1 : { \ -unsigned long long __exp_print = (uintptr_t )__exp; \ -long long __seen_print = (intptr_t )__seen; \ -__TH_LOG ("Expected %s (%llu) %s %s (%lld)" , \ +uintmax_t __exp_print = (uintmax_t )__exp; \ +intmax_t __seen_print = (intmax_t )__seen; \ +__TH_LOG ("Expected %s (%ju) %s %s (%jd)" , \ _expected_str, __exp_print, #_t, \ _seen_str, __seen_print); \break ; \ } \case 2 : { \ -long long __exp_print = (intptr_t )__exp; \ -unsigned long long __seen_print = (uintptr_t )__seen; \ -__TH_LOG ("Expected %s (%lld) %s %s (%llu)" , \ +intmax_t __exp_print = (intmax_t )__exp; \ +uintmax_t __seen_print = (uintmax_t )__seen; \ +__TH_LOG ("Expected %s (%jd) %s %s (%ju)" , \ _expected_str, __exp_print, #_t, \ _seen_str, __seen_print); \break ; \ } \case 3 : { \ -long long __exp_print = (intptr_t )__exp; \ -long long __seen_print = (intptr_t )__seen; \ -__TH_LOG ("Expected %s (%lld) %s %s (%lld)" , \ +intmax_t __exp_print = (intmax_t )__exp; \ +intmax_t __seen_print = (intmax_t )__seen; \ +__TH_LOG ("Expected %s (%jd) %s %s (%jd)" , \ _expected_str, __exp_print, #_t, \ _seen_str, __seen_print); \break ; \
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 134/393 wifi: cfg80211: Handle specific BSSID in 6GHz scanning
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ilan Peer <[email protected]>
[ Upstream commit 0fca7784b7a14d4ede64f479662afb98876ec7f8 ]
When the scan parameters for a 6GHz scan specify a unicast BSSID address, and the corresponding AP is found in the scan list, add a corresponding entry in the collocated AP list, so this AP would be directly probed even if it was not advertised as a collocated AP.
This is needed for handling a scan request that is intended for a ML probe flow, where user space can requests a scan to retrieve information for other links in the AP MLD.
Stable-dep-of: 1a0d24775cde ("wifi: cfg80211: adjust allocation of colocated AP data")
--- net/wireless/scan.c | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+)
net/wireless/scan.c +37 -0
@@ -831,10 +831,47 @@ static int cfg80211_scan_6ghz(struct cfg80211_registered_device *rdev)list_for_each_entry (intbss, &rdev->bss_list, list) {struct cfg80211_bss *res = &intbss->pub;const struct cfg80211_bss_ies *ies; +const struct element *ssid_elem; +struct cfg80211_colocated_ap *entry; +u32 s_ssid_tmp; +int ret; ies =rcu_access_pointer (res->ies); count +=cfg80211_parse_colocated_ap (ies, &coloc_ap_list); + +/* In case the scan request specified a specific BSSID +* and the BSS is found and operating on 6GHz band then +* add this AP to the collocated APs list. +* This is relevant for ML probe requests when the lower +* band APs have not been discovered. +*/ +if (is_broadcast_ether_addr (rdev_req->bssid) || + !ether_addr_equal (rdev_req->bssid, res->bssid) || + res->channel->band !=NL80211_BAND_6GHZ ) +continue ; + + ret =cfg80211_calc_short_ssid (ies, &ssid_elem, + &s_ssid_tmp); +if (ret) +continue ; + + entry =kzalloc (sizeof (*entry) +IEEE80211_MAX_SSID_LEN , +GFP_ATOMIC ); + +if (!entry) +continue ; + +memcpy (entry->bssid, res->bssid,ETH_ALEN ); + entry->short_ssid = s_ssid_tmp; +memcpy (entry->ssid, ssid_elem->data, + ssid_elem->datalen); + entry->ssid_len = ssid_elem->datalen; + entry->short_ssid_valid = true; + entry->center_freq = res->channel->center_freq; + +list_add_tail (&entry->list, &coloc_ap_list); + count++; }spin_unlock_bh (&rdev->bss_lock); }
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 135/393 wifi: cfg80211: adjust allocation of colocated AP data
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dmitry Antipov <[email protected]>
[ Upstream commit 1a0d24775cdee2b8dc14bfa4f4418c930ab1ac57 ]
In 'cfg80211_scan_6ghz()', an instances of 'struct cfg80211_colocated_ap' are allocated as if they would have 'ssid' as trailing VLA member. Since this is not so, extra IEEE80211_MAX_SSID_LEN bytes are not needed. Briefly tested with KUnit.
--- net/wireless/scan.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
net/wireless/scan.c +1 -3
@@ -856,9 +856,7 @@ static int cfg80211_scan_6ghz(struct cfg80211_registered_device *rdev)if (ret)continue ; - entry =kzalloc (sizeof (*entry) +IEEE80211_MAX_SSID_LEN , -GFP_ATOMIC ); - + entry =kzalloc (sizeof (*entry),GFP_ATOMIC );if (!entry)continue ;
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 136/393 inet: ipmr: fix data-races
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Eric Dumazet <[email protected]>
[ Upstream commit 3440fa34ad99d471f1085bc2f4dedeaebc310261 ]
Following fields of 'struct mr_mfc' can be updated concurrently (no lock protection) from ip_mr_forward() and ip6_mr_forward()
- bytes
- pkt
- wrong_if
- lastuse
They also can be read from other functions.
Convert bytes, pkt and wrong_if to atomic_long_t, and use READ_ONCE()/WRITE_ONCE() for lastuse.
--- .../net/ethernet/mellanox/mlxsw/spectrum_mr.c | 8 +++--- include/linux/mroute_base.h | 6 ++-- net/ipv4/ipmr.c | 28 +++++++++---------- net/ipv4/ipmr_base.c | 6 ++-- net/ipv6/ip6mr.c | 28 +++++++++---------- 5 files changed, 38 insertions(+), 38 deletions(-)
drivers/net/ethernet/mellanox/mlxsw/spectrum_mr.c +4 -4
@@ -1003,10 +1003,10 @@ static void mlxsw_sp_mr_route_stats_update(struct mlxsw_sp *mlxsw_sp, mr->mr_ops->route_stats (mlxsw_sp, mr_route->route_priv, &packets, &bytes); -if (mr_route->mfc->mfc_un.res.pkt != packets) - mr_route->mfc->mfc_un.res.lastuse = jiffies; - mr_route->mfc->mfc_un.res.pkt = packets; - mr_route->mfc->mfc_un.res.bytes = bytes; +if (atomic_long_read (&mr_route->mfc->mfc_un.res.pkt) != packets) +WRITE_ONCE (mr_route->mfc->mfc_un.res.lastuse, jiffies); +atomic_long_set (&mr_route->mfc->mfc_un.res.pkt, packets); +atomic_long_set (&mr_route->mfc->mfc_un.res.bytes, bytes); }static void mlxsw_sp_mr_stats_update (struct work_struct *work)
include/linux/mroute_base.h +3 -3
@@ -146,9 +146,9 @@ struct mr_mfc {unsigned long last_assert;int minvif;int maxvif; -unsigned long bytes; -unsigned long pkt; -unsigned long wrong_if; +atomic_long_t bytes; +atomic_long_t pkt; +atomic_long_t wrong_if;unsigned long lastuse;unsigned char ttls[MAXVIFS ];refcount_t refcount;
net/ipv4/ipmr.c +14 -14
@@ -816,7 +816,7 @@ static void ipmr_update_thresholds(struct mr_table *mrt, struct mr_mfc *cache, cache->mfc_un.res.maxvif = vifi +1 ; } } - cache->mfc_un.res.lastuse = jiffies; +WRITE_ONCE (cache->mfc_un.res.lastuse, jiffies); } static int vif_add(struct net *net, struct mr_table *mrt,
@@ -1666,9 +1666,9 @@ int ipmr_ioctl(struct sock *sk, int cmd, void *arg)rcu_read_lock (); c =ipmr_cache_find (mrt, sr->src.s_addr, sr->grp.s_addr);if (c) { - sr->pktcnt = c->_c.mfc_un.res.pkt; - sr->bytecnt = c->_c.mfc_un.res.bytes; - sr->wrong_if = c->_c.mfc_un.res.wrong_if; + sr->pktcnt =atomic_long_read (&c->_c.mfc_un.res.pkt); + sr->bytecnt =atomic_long_read (&c->_c.mfc_un.res.bytes); + sr->wrong_if =atomic_long_read (&c->_c.mfc_un.res.wrong_if);rcu_read_unlock ();return 0 ; }
@@ -1738,9 +1738,9 @@ int ipmr_compat_ioctl(struct sock *sk, unsigned int cmd, void __user *arg)rcu_read_lock (); c =ipmr_cache_find (mrt, sr.src.s_addr, sr.grp.s_addr);if (c) { - sr.pktcnt = c->_c.mfc_un.res.pkt; - sr.bytecnt = c->_c.mfc_un.res.bytes; - sr.wrong_if = c->_c.mfc_un.res.wrong_if; + sr.pktcnt =atomic_long_read (&c->_c.mfc_un.res.pkt); + sr.bytecnt =atomic_long_read (&c->_c.mfc_un.res.bytes); + sr.wrong_if =atomic_long_read (&c->_c.mfc_un.res.wrong_if);rcu_read_unlock ();if (copy_to_user (arg, &sr,sizeof (sr)))
@@ -1973,9 +1973,9 @@ static void ip_mr_forward(struct net *net, struct mr_table *mrt,int vif, ct; vif = c->_c.mfc_parent; - c->_c.mfc_un.res.pkt++; - c->_c.mfc_un.res.bytes += skb->len; - c->_c.mfc_un.res.lastuse = jiffies; +atomic_long_inc (&c->_c.mfc_un.res.pkt); +atomic_long_add (skb->len, &c->_c.mfc_un.res.bytes); +WRITE_ONCE (c->_c.mfc_un.res.lastuse, jiffies);if (c->mfc_origin ==htonl (INADDR_ANY ) && true_vifi >=0 ) {struct mfc_cache *cache_proxy;
@@ -2006,7 +2006,7 @@ static void ip_mr_forward(struct net *net, struct mr_table *mrt, goto dont_forward; } - c->_c.mfc_un.res.wrong_if++; +atomic_long_inc (&c->_c.mfc_un.res.wrong_if); if (true_vifi >= 0 && mrt->mroute_do_assert &&/* pimsm uses asserts, when switching from RPT to SPT,
@@ -3013,9 +3013,9 @@ static int ipmr_mfc_seq_show(struct seq_file *seq, void *v)if (it->cache != &mrt->mfc_unres_queue) {seq_printf (seq," %8lu %8lu %8lu" , - mfc->_c.mfc_un.res.pkt, - mfc->_c.mfc_un.res.bytes, - mfc->_c.mfc_un.res.wrong_if); +atomic_long_read (&mfc->_c.mfc_un.res.pkt), +atomic_long_read (&mfc->_c.mfc_un.res.bytes), +atomic_long_read (&mfc->_c.mfc_un.res.wrong_if));for (n = mfc->_c.mfc_un.res.minvif; n < mfc->_c.mfc_un.res.maxvif; n++) { if (VIF_EXISTS(mrt, n) &&
net/ipv4/ipmr_base.c +3 -3
@@ -263,9 +263,9 @@ int mr_fill_mroute(struct mr_table *mrt, struct sk_buff *skb, lastuse =READ_ONCE (c->mfc_un.res.lastuse); lastuse =time_after_eq (jiffies, lastuse) ? jiffies - lastuse :0 ; - mfcs.mfcs_packets = c->mfc_un.res.pkt; - mfcs.mfcs_bytes = c->mfc_un.res.bytes; - mfcs.mfcs_wrong_if = c->mfc_un.res.wrong_if; + mfcs.mfcs_packets =atomic_long_read (&c->mfc_un.res.pkt); + mfcs.mfcs_bytes =atomic_long_read (&c->mfc_un.res.bytes); + mfcs.mfcs_wrong_if =atomic_long_read (&c->mfc_un.res.wrong_if);if (nla_put_64bit (skb,RTA_MFC_STATS ,sizeof (mfcs), &mfcs,RTA_PAD ) ||nla_put_u64_64bit (skb,RTA_EXPIRES ,jiffies_to_clock_t (lastuse),RTA_PAD ))
net/ipv6/ip6mr.c +14 -14
@@ -506,9 +506,9 @@ static int ipmr_mfc_seq_show(struct seq_file *seq, void *v)if (it->cache != &mrt->mfc_unres_queue) {seq_printf (seq," %8lu %8lu %8lu" , - mfc->_c.mfc_un.res.pkt, - mfc->_c.mfc_un.res.bytes, - mfc->_c.mfc_un.res.wrong_if); +atomic_long_read (&mfc->_c.mfc_un.res.pkt), +atomic_long_read (&mfc->_c.mfc_un.res.bytes), +atomic_long_read (&mfc->_c.mfc_un.res.wrong_if));for (n = mfc->_c.mfc_un.res.minvif; n < mfc->_c.mfc_un.res.maxvif; n++) { if (VIF_EXISTS(mrt, n) &&
@@ -870,7 +870,7 @@ static void ip6mr_update_thresholds(struct mr_table *mrt, cache->mfc_un.res.maxvif = vifi +1 ; } } - cache->mfc_un.res.lastuse = jiffies; +WRITE_ONCE (cache->mfc_un.res.lastuse, jiffies); } static int mif6_add(struct net *net, struct mr_table *mrt,
@@ -1931,9 +1931,9 @@ int ip6mr_ioctl(struct sock *sk, int cmd, void *arg) c =ip6mr_cache_find (mrt, &sr->src.sin6_addr, &sr->grp.sin6_addr);if (c) { - sr->pktcnt = c->_c.mfc_un.res.pkt; - sr->bytecnt = c->_c.mfc_un.res.bytes; - sr->wrong_if = c->_c.mfc_un.res.wrong_if; + sr->pktcnt =atomic_long_read (&c->_c.mfc_un.res.pkt); + sr->bytecnt =atomic_long_read (&c->_c.mfc_un.res.bytes); + sr->wrong_if =atomic_long_read (&c->_c.mfc_un.res.wrong_if);rcu_read_unlock ();return 0 ; }
@@ -2003,9 +2003,9 @@ int ip6mr_compat_ioctl(struct sock *sk, unsigned int cmd, void __user *arg)rcu_read_lock (); c =ip6mr_cache_find (mrt, &sr.src.sin6_addr, &sr.grp.sin6_addr);if (c) { - sr.pktcnt = c->_c.mfc_un.res.pkt; - sr.bytecnt = c->_c.mfc_un.res.bytes; - sr.wrong_if = c->_c.mfc_un.res.wrong_if; + sr.pktcnt =atomic_long_read (&c->_c.mfc_un.res.pkt); + sr.bytecnt =atomic_long_read (&c->_c.mfc_un.res.bytes); + sr.wrong_if =atomic_long_read (&c->_c.mfc_un.res.wrong_if);rcu_read_unlock ();if (copy_to_user (arg, &sr,sizeof (sr)))
@@ -2128,9 +2128,9 @@ static void ip6_mr_forward(struct net *net, struct mr_table *mrt,int true_vifi =ip6mr_find_vif (mrt, dev); vif = c->_c.mfc_parent; - c->_c.mfc_un.res.pkt++; - c->_c.mfc_un.res.bytes += skb->len; - c->_c.mfc_un.res.lastuse = jiffies; +atomic_long_inc (&c->_c.mfc_un.res.pkt); +atomic_long_add (skb->len, &c->_c.mfc_un.res.bytes); +WRITE_ONCE (c->_c.mfc_un.res.lastuse, jiffies);if (ipv6_addr_any (&c->mf6c_origin) && true_vifi >=0 ) {struct mfc6_cache *cache_proxy;
@@ -2148,7 +2148,7 @@ static void ip6_mr_forward(struct net *net, struct mr_table *mrt,* Wrong interface: drop packet and (maybe) send PIM assert. */ if (rcu_access_pointer (mrt->vif_table[vif].dev) != dev) { - c->_c.mfc_un.res.wrong_if++; +atomic_long_inc (&c->_c.mfc_un.res.wrong_if); if (true_vifi >= 0 && mrt->mroute_do_assert &&/* pimsm uses asserts, when switching from RPT to SPT,
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 137/393 clk: analogbits: Fix incorrect calculation of vco rate delta
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Bo Gan <[email protected]>
[ Upstream commit d7f12857f095ef38523399d47e68787b357232f6 ]
In wrpll_configure_for_rate() we try to determine the best PLL configuration for a target rate. However, in the loop where we try values of R, we should compare the derived vco with target_vco_rate. However, we were in fact comparing it with target_rate, which is actually after Q shift. This is incorrect, and sometimes can result in suboptimal clock rates. Fix it.
--- drivers/clk/analogbits/wrpll-cln28hpc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/clk/analogbits/wrpll-cln28hpc.c +1 -1
@@ -291,7 +291,7 @@ int wrpll_configure_for_rate(struct wrpll_cfg *c, u32 target_rate, vco = vco_pre * f; } - delta =abs (target_rate - vco); + delta =abs (target_vco_rate - vco);if (delta < best_delta) { best_delta = delta; best_r = r;
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 138/393 pwm: stm32: Add check for clk_enable()
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mingwei Zheng <[email protected]>
[ Upstream commit e8c59791ebb60790c74b2c3ab520f04a8a57219a ]
Add check for the return value of clk_enable() to catch the potential error.
--- drivers/pwm/pwm-stm32.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
drivers/pwm/pwm-stm32.c +5 -2
@@ -635,8 +635,11 @@ static int stm32_pwm_probe(struct platform_device *pdev) priv->chip.npwm =stm32_pwm_detect_channels (priv, &num_enabled);/* Initialize clock refcount to number of enabled PWM channels. */ -for (i =0 ; i < num_enabled; i++) -clk_enable (priv->clk); +for (i =0 ; i < num_enabled; i++) { + ret =clk_enable (priv->clk); +if (ret) +return ret; + } ret =devm_pwmchip_add (dev, &priv->chip);if (ret <0 )
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 139/393 selftests/landlock: Fix error message
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mickaël Salaün <[email protected]>
[ Upstream commit 2107c35128ad751b201eb92fe91443450d9e5c37 ]
The global variable errno may not be set in test_execute(). Do not use it in related error message.
--- tools/testing/selftests/landlock/fs_test.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
tools/testing/selftests/landlock/fs_test.c +1 -2
@@ -1861,8 +1861,7 @@ static void test_execute(struct __test_metadata *const _metadata, const int err,ASSERT_EQ (1 ,WIFEXITED (status)); ASSERT_EQ(err ? 2 : 0, WEXITSTATUS(status)) { -TH_LOG ("Unexpected return code for \"%s\": %s" , path, -strerror (errno)); +TH_LOG ("Unexpected return code for \"%s\"" , path); }; }
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 140/393 net: let net.core.dev_weight always be non-zero
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Liu Jian <[email protected]>
[ Upstream commit d1f9f79fa2af8e3b45cffdeef66e05833480148a ]
The following problem was encountered during stability test:
(NULL net_device): NAPI poll function process_backlog+0x0/0x530 \
returned 1, exceeding its budget of 0.
------------[ cut here ]------------ list_add double add: new=ffff88905f746f48, prev=ffff88905f746f48, \ next=ffff88905f746e40. WARNING: CPU: 18 PID: 5462 at lib/list_debug.c:35 \ __list_add_valid_or_report+0xf3/0x130 CPU: 18 UID: 0 PID: 5462 Comm: ping Kdump: loaded Not tainted 6.13.0-rc7+ RIP: 0010:__list_add_valid_or_report+0xf3/0x130 Call Trace: ? __warn+0xcd/0x250 ? __list_add_valid_or_report+0xf3/0x130 enqueue_to_backlog+0x923/0x1070 netif_rx_internal+0x92/0x2b0 __netif_rx+0x15/0x170 loopback_xmit+0x2ef/0x450 dev_hard_start_xmit+0x103/0x490 __dev_queue_xmit+0xeac/0x1950 ip_finish_output2+0x6cc/0x1620 ip_output+0x161/0x270 ip_push_pending_frames+0x155/0x1a0 raw_sendmsg+0xe13/0x1550 __sys_sendto+0x3bf/0x4e0 __x64_sys_sendto+0xdc/0x1b0 do_syscall_64+0x5b/0x170 entry_SYSCALL_64_after_hwframe+0x76/0x7e
The reproduction command is as follows:
sysctl -w net.core.dev_weight=0
ping 127.0.0.1
This is because when the napi's weight is set to 0, process_backlog() may return 0 and clear the NAPI_STATE_SCHED bit of napi->state, causing this napi to be re-polled in net_rx_action() until __do_softirq() times out. Since the NAPI_STATE_SCHED bit has been cleared, napi_schedule_rps() can be retriggered in enqueue_to_backlog(), causing this issue.
Making the napi's weight always non-zero solves this problem.
Triggering this issue requires system-wide admin (setting is not namespaced).
--- net/core/sysctl_net_core.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
net/core/sysctl_net_core.c +4 -1
@@ -297,7 +297,7 @@ static int proc_do_dev_weight(struct ctl_table *table, int write,int ret, weight;mutex_lock (&dev_weight_mutex); - ret =proc_dointvec (table, write, buffer, lenp, ppos); + ret =proc_dointvec_minmax (table, write, buffer, lenp, ppos);if (!ret && write) { weight =READ_ONCE (weight_p);WRITE_ONCE (dev_rx_weight, weight * dev_weight_rx_bias);
@@ -422,6 +422,7 @@ static struct ctl_table net_core_table[] = { .maxlen = sizeof(int), .mode = 0644, .proc_handler = proc_do_dev_weight, + .extra1 = SYSCTL_ONE, }, { .procname = "dev_weight_rx_bias",
@@ -429,6 +430,7 @@ static struct ctl_table net_core_table[] = { .maxlen = sizeof(int), .mode = 0644, .proc_handler = proc_do_dev_weight, + .extra1 = SYSCTL_ONE, }, { .procname = "dev_weight_tx_bias",
@@ -436,6 +438,7 @@ static struct ctl_table net_core_table[] = { .maxlen = sizeof(int), .mode = 0644, .proc_handler = proc_do_dev_weight, + .extra1 = SYSCTL_ONE, }, { .procname = "netdev_max_backlog",
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 141/393 net/mlxfw: Drop hard coded max FW flash image size
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Maher Sanalla <[email protected]>
[ Upstream commit 70d81f25cc92cc4e914516c9935ae752f27d78ad ]
Currently, mlxfw kernel module limits FW flash image size to be 10MB at most, preventing the ability to burn recent BlueField-3 FW that exceeds the said size limit.
Thus, drop the hard coded limit. Instead, rely on FW's max_component_size threshold that is reported in MCQI register as the size limit for FW image.
--- drivers/net/ethernet/mellanox/mlxfw/mlxfw_fsm.c | 2 -- 1 file changed, 2 deletions(-)
drivers/net/ethernet/mellanox/mlxfw/mlxfw_fsm.c +0 -2
@@ -14,7 +14,6 @@#define MLXFW_FSM_STATE_WAIT_TIMEOUT_MS 30000#define MLXFW_FSM_STATE_WAIT_ROUNDS \ (MLXFW_FSM_STATE_WAIT_TIMEOUT_MS / MLXFW_FSM_STATE_WAIT_CYCLE_MS) -#define MLXFW_FSM_MAX_COMPONENT_SIZE (10 * (1 << 20))static const int mlxfw_fsm_state_errno[] = { [MLXFW_FSM_STATE_ERR_ERROR ] = -EIO ,
@@ -229,7 +228,6 @@ static int mlxfw_flash_component(struct mlxfw_dev *mlxfw_dev,return err; } - comp_max_size =min_t (u32, comp_max_size,MLXFW_FSM_MAX_COMPONENT_SIZE );if (comp->data_size > comp_max_size) {MLXFW_ERR_MSG (mlxfw_dev, extack,"Component size is bigger than limit" , -EINVAL );
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 142/393 octeon_ep: remove firmware stats fetch in ndo_get_stats64
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Shinas Rasheed <[email protected]>
[ Upstream commit 1f64255bb76c11d0c41a7d81d7cec68e49d5362d ]
The firmware stats fetch call that happens in ndo_get_stats64() is currently not required, and causes a warning to issue.
The warn log is given below:
[ 123.316837] ------------[ cut here ]------------ [ 123.316840] Voluntary context switch within RCU read-side critical section! [ 123.316917] pc : rcu_note_context_switch+0x2e4/0x300 [ 123.316919] lr : rcu_note_context_switch+0x2e4/0x300 [ 123.316947] Call trace: [ 123.316949] rcu_note_context_switch+0x2e4/0x300 [ 123.316952] __schedule+0x84/0x584 [ 123.316955] schedule+0x38/0x90 [ 123.316956] schedule_timeout+0xa0/0x1d4 [ 123.316959] octep_send_mbox_req+0x190/0x230 [octeon_ep] [ 123.316966] octep_ctrl_net_get_if_stats+0x78/0x100 [octeon_ep] [ 123.316970] octep_get_stats64+0xd4/0xf0 [octeon_ep] [ 123.316975] dev_get_stats+0x4c/0x114 [ 123.316977] dev_seq_printf_stats+0x3c/0x11c [ 123.316980] dev_seq_show+0x1c/0x40 [ 123.316982] seq_read_iter+0x3cc/0x4e0 [ 123.316985] seq_read+0xc8/0x110 [ 123.316987] proc_reg_read+0x9c/0xec [ 123.316990] vfs_read+0xc8/0x2ec [ 123.316993] ksys_read+0x70/0x100 [ 123.316995] __arm64_sys_read+0x20/0x30 [ 123.316997] invoke_syscall.constprop.0+0x7c/0xd0 [ 123.317000] do_el0_svc+0xb4/0xd0 [ 123.317002] el0_svc+0xe8/0x1f4 [ 123.317005] el0t_64_sync_handler+0x134/0x150 [ 123.317006] el0t_64_sync+0x17c/0x180 [ 123.317008] ---[ end trace 63399811432ab69b ]---
--- drivers/net/ethernet/marvell/octeon_ep/octep_main.c | 10 ---------- 1 file changed, 10 deletions(-)
drivers/net/ethernet/marvell/octeon_ep/octep_main.c +0 -10
@@ -761,12 +761,6 @@ static void octep_get_stats64(struct net_device *netdev,struct octep_device *oct =netdev_priv (netdev);int q; -if (netif_running (netdev)) -octep_ctrl_net_get_if_stats (oct, -OCTEP_CTRL_NET_INVALID_VFID , - &oct->iface_rx_stats, - &oct->iface_tx_stats); - tx_packets =0 ; tx_bytes =0 ; rx_packets =0 ;
@@ -784,10 +778,6 @@ static void octep_get_stats64(struct net_device *netdev, stats->tx_bytes = tx_bytes; stats->rx_packets = rx_packets; stats->rx_bytes = rx_bytes; - stats->multicast = oct->iface_rx_stats.mcast_pkts; - stats->rx_errors = oct->iface_rx_stats.err_pkts; - stats->collisions = oct->iface_tx_stats.xscol; - stats->tx_fifo_errors = oct->iface_tx_stats.undflw; }/**
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 143/393 net: avoid race between device unregistration and ethnl ops
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Antoine Tenart <[email protected]>
[ Upstream commit 12e070eb6964b341b41677fd260af5a305316a1f ]
The following trace can be seen if a device is being unregistered while its number of channels are being modified.
DEBUG_LOCKS_WARN_ON(lock->magic != lock)
WARNING: CPU: 3 PID: 3754 at kernel/locking/mutex.c:564 __mutex_lock+0xc8a/0x1120 CPU: 3 UID: 0 PID: 3754 Comm: ethtool Not tainted 6.13.0-rc6+ #771 RIP: 0010:__mutex_lock+0xc8a/0x1120 Call Trace: <TASK> ethtool_check_max_channel+0x1ea/0x880 ethnl_set_channels+0x3c3/0xb10 ethnl_default_set_doit+0x306/0x650 genl_family_rcv_msg_doit+0x1e3/0x2c0 genl_rcv_msg+0x432/0x6f0 netlink_rcv_skb+0x13d/0x3b0 genl_rcv+0x28/0x40 netlink_unicast+0x42e/0x720 netlink_sendmsg+0x765/0xc20 __sys_sendto+0x3ac/0x420 __x64_sys_sendto+0xe0/0x1c0 do_syscall_64+0x95/0x180 entry_SYSCALL_64_after_hwframe+0x76/0x7e
This is because unregister_netdevice_many_notify might run before the rtnl lock section of ethnl operations, eg. set_channels in the above example. In this example the rss lock would be destroyed by the device unregistration path before being used again, but in general running ethnl operations while dismantle has started is not a good idea.
Fix this by denying any operation on devices being unregistered. A check was already there in ethnl_ops_begin, but not wide enough.
Note that the same issue cannot be seen on the ioctl version (__dev_ethtool) because the device reference is retrieved from within the rtnl lock section there. Once dismantle started, the net device is unlisted and no reference will be found.
--- net/ethtool/netlink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/ethtool/netlink.c +1 -1
@@ -41,7 +41,7 @@ int ethnl_ops_begin(struct net_device *dev)pm_runtime_get_sync (dev->dev.parent);if (!netif_device_present (dev) || - dev->reg_state ==NETREG_UNREGISTERING ) { + dev->reg_state >=NETREG_UNREGISTERING ) { ret = -ENODEV ; goto err; }
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 144/393 net: sched: Disallow replacing of child qdisc from one parent to another
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jamal Hadi Salim <[email protected]>
[ Upstream commit bc50835e83f60f56e9bec2b392fb5544f250fb6f ]
Lion Ackermann was able to create a UAF which can be abused for privilege escalation with the following script
Step 1. create root qdisc
tc qdisc add dev lo root handle 1:0 drr
step2. a class for packet aggregation do demonstrate uaf tc class add dev lo classid 1:1 drr
step3. a class for nesting
tc class add dev lo classid 1:2 drr
step4. a class to graft qdisc to
tc class add dev lo classid 1:3 drr
step5.
tc qdisc add dev lo parent 1:1 handle 2:0 plug limit 1024
step6.
tc qdisc add dev lo parent 1:2 handle 3:0 drr
step7.
tc class add dev lo classid 3:1 drr
step 8.
tc qdisc add dev lo parent 3:1 handle 4:0 pfifo
step 9. Display the class/qdisc layout
tc class ls dev lo
class drr 1:1 root leaf 2: quantum 64Kb
class drr 1:2 root leaf 3: quantum 64Kb
class drr 3:1 root leaf 4: quantum 64Kb
tc qdisc ls
qdisc drr 1: dev lo root refcnt 2
qdisc plug 2: dev lo parent 1:1
qdisc pfifo 4: dev lo parent 3:1 limit 1000p
qdisc drr 3: dev lo parent 1:2
step10. trigger the bug <=== prevented by this patch tc qdisc replace dev lo parent 1:3 handle 4:0
step 11. Redisplay again the qdiscs/classes
tc class ls dev lo
class drr 1:1 root leaf 2: quantum 64Kb
class drr 1:2 root leaf 3: quantum 64Kb
class drr 1:3 root leaf 4: quantum 64Kb
class drr 3:1 root leaf 4: quantum 64Kb
tc qdisc ls
qdisc drr 1: dev lo root refcnt 2
qdisc plug 2: dev lo parent 1:1
qdisc pfifo 4: dev lo parent 3:1 refcnt 2 limit 1000p qdisc drr 3: dev lo parent 1:2
Observe that a) parent for 4:0 does not change despite the replace request. There can only be one parent. b) refcount has gone up by two for 4:0 and
c) both class 1:3 and 3:1 are pointing to it.
Step 12. send one packet to plug
echo "" | socat -u STDIN UDP4-DATAGRAM:127.0.0.1:8888,priority=$((0x10001)) step13. send one packet to the grafted fifo
echo "" | socat -u STDIN UDP4-DATAGRAM:127.0.0.1:8888,priority=$((0x10003))
step14. lets trigger the uaf
tc class delete dev lo classid 1:3
tc class delete dev lo classid 1:1
The semantics of "replace" is for a del/add _on the same node_ and not a delete from one node(3:1) and add to another node (1:3) as in step10. While we could "fix" with a more complex approach there could be consequences to expectations so the patch takes the preventive approach of "disallow such config".
Joint work with Lion Ackermann <[email protected]>
--- net/sched/sch_api.c | 4 ++++ 1 file changed, 4 insertions(+)
net/sched/sch_api.c +4 -0
@@ -1635,6 +1635,10 @@ static int tc_modify_qdisc(struct sk_buff *skb, struct nlmsghdr *n, q =qdisc_lookup (dev, tcm->tcm_handle);if (!q) goto create_n_graft; +if (q->parent != tcm->tcm_parent) { +NL_SET_ERR_MSG (extack,"Cannot move an existing qdisc to a different parent" ); +return -EINVAL ; + }if (n->nlmsg_flags &NLM_F_EXCL ) {NL_SET_ERR_MSG (extack,"Exclusivity flag on, cannot override" );return -EEXIST ;
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 145/393 netfilter: nf_tables: de-constify set commit ops function argument
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Florian Westphal <[email protected]>
[ Upstream commit 256001672153af5786c6ca148114693d7d76d836 ]
The set backend using this already has to work around this via ugly cast, don't spread this pattern.
Stable-dep-of: 8d738c1869f6 ("netfilter: nf_tables: fix set size with rbtree backend")
--- include/net/netfilter/nf_tables.h | 2 +- net/netfilter/nft_set_pipapo.c | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-)
include/net/netfilter/nf_tables.h +1 -1
@@ -481,7 +481,7 @@ struct nft_set_ops {const struct nft_set *set, const struct nft_set_elem *elem, unsigned int flags); -void (*commit)(const struct nft_set *set); +void (*commit)(struct nft_set *set);void (*abort)(const struct nft_set *set);u64 (*privsize)(const struct nlattr *const nla[],const struct nft_set_desc *desc);
net/netfilter/nft_set_pipapo.c +3 -4
@@ -1574,12 +1574,11 @@ static void nft_pipapo_gc_deactivate(struct net *net, struct nft_set *set,/** * pipapo_gc() - Drop expired entries from set, destroy start and end elements -* @_set: nftables API set representation +* @set: nftables API set representation * @m: Matching data */ -static void pipapo_gc (const struct nft_set *_set,struct nft_pipapo_match *m) +static void pipapo_gc (struct nft_set *set,struct nft_pipapo_match *m) { -struct nft_set *set = (struct nft_set *) _set;struct nft_pipapo *priv =nft_set_priv (set);struct net *net =read_pnet (&set->net);int rules_f0, first_rule =0 ;
@@ -1693,7 +1692,7 @@ static void pipapo_reclaim_match(struct rcu_head *rcu)* We also need to create a new working copy for subsequent insertions and * deletions. */ -static void nft_pipapo_commit (const struct nft_set *set) +static void nft_pipapo_commit (struct nft_set *set) {struct nft_pipapo *priv =nft_set_priv (set);struct nft_pipapo_match *new_clone, *old;
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 146/393 netfilter: nft_set_rbtree: rename gc deactivate+erase function
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Florian Westphal <[email protected]>
[ Upstream commit 8079fc30f79799e59d9602e7e080d434936a482d ]
Next patch adds a cllaer that doesn't hold the priv->write lock and will need a similar function.
Rename the existing function to make it clear that it can only be used for opportunistic gc during insertion.
Stable-dep-of: 8d738c1869f6 ("netfilter: nf_tables: fix set size with rbtree backend")
--- net/netfilter/nft_set_rbtree.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)
net/netfilter/nft_set_rbtree.c +6 -5
@@ -221,14 +221,15 @@ static void *nft_rbtree_get(const struct net *net, const struct nft_set *set,return rbe; } -static void nft_rbtree_gc_remove (struct net *net,struct nft_set *set, -struct nft_rbtree *priv, -struct nft_rbtree_elem *rbe) +static void nft_rbtree_gc_elem_remove (struct net *net,struct nft_set *set, +struct nft_rbtree *priv, +struct nft_rbtree_elem *rbe) {struct nft_set_elem elem = { .priv = rbe, }; +lockdep_assert_held_write (&priv->lock);nft_setelem_data_deactivate (net, set, &elem);rb_erase (&rbe->node, &priv->root); }
@@ -263,7 +264,7 @@ nft_rbtree_gc_elem(const struct nft_set *__set, struct nft_rbtree *priv, rbe_prev =NULL ;if (prev) { rbe_prev = rb_entry(prev, struct nft_rbtree_elem, node); -nft_rbtree_gc_remove (net, set, priv, rbe_prev); +nft_rbtree_gc_elem_remove (net, set, priv, rbe_prev);/* There is always room in this trans gc for this element, * memory allocation never actually happens, hence, the warning
@@ -277,7 +278,7 @@ nft_rbtree_gc_elem(const struct nft_set *__set, struct nft_rbtree *priv,nft_trans_gc_elem_add (gc, rbe_prev); } -nft_rbtree_gc_remove (net, set, priv, rbe); +nft_rbtree_gc_elem_remove (net, set, priv, rbe); gc =nft_trans_gc_queue_sync (gc,GFP_ATOMIC );if (WARN_ON_ONCE (!gc))return ERR_PTR (-ENOMEM );
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 147/393 netfilter: nft_set_rbtree: prefer sync gc to async worker
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Florian Westphal <[email protected]>
[ Upstream commit 7d259f021aaa78904b6c836d975e8e00d83a182a ]
There is no need for asynchronous garbage collection, rbtree inserts can only happen from the netlink control plane.
We already perform on-demand gc on insertion, in the area of the tree where the insertion takes place, but we don't do a full tree walk there for performance reasons.
Do a full gc walk at the end of the transaction instead and remove the async worker.
Stable-dep-of: 8d738c1869f6 ("netfilter: nf_tables: fix set size with rbtree backend")
--- net/netfilter/nft_set_rbtree.c | 124 +++++++++++++++++---------------- 1 file changed, 65 insertions(+), 59 deletions(-)
net/netfilter/nft_set_rbtree.c +65 -59
@@ -19,7 +19,7 @@ struct nft_rbtree {struct rb_root root;rwlock_t lock;seqcount_rwlock_t count; -struct delayed_work gc_work; +unsigned long last_gc; };struct nft_rbtree_elem {
@@ -48,8 +48,7 @@ static int nft_rbtree_cmp(const struct nft_set *set,static bool nft_rbtree_elem_expired (const struct nft_rbtree_elem *rbe) { -return nft_set_elem_expired (&rbe->ext) || -nft_set_elem_is_dead (&rbe->ext); +return nft_set_elem_expired (&rbe->ext); } static bool __nft_rbtree_lookup(const struct net *net, const struct nft_set *set,
@@ -508,6 +507,15 @@ static int nft_rbtree_insert(const struct net *net, const struct nft_set *set,return err; } +static void nft_rbtree_erase (struct nft_rbtree *priv,struct nft_rbtree_elem *rbe) +{ +write_lock_bh (&priv->lock); +write_seqcount_begin (&priv->count); +rb_erase (&rbe->node, &priv->root); +write_seqcount_end (&priv->count); +write_unlock_bh (&priv->lock); +} +static void nft_rbtree_remove (const struct net *net,const struct nft_set *set,const struct nft_set_elem *elem)
@@ -515,11 +523,7 @@ static void nft_rbtree_remove(const struct net *net,struct nft_rbtree *priv =nft_set_priv (set);struct nft_rbtree_elem *rbe = elem->priv; -write_lock_bh (&priv->lock); -write_seqcount_begin (&priv->count); -rb_erase (&rbe->node, &priv->root); -write_seqcount_end (&priv->count); -write_unlock_bh (&priv->lock); +nft_rbtree_erase (priv, rbe); } static void nft_rbtree_activate(const struct net *net,
@@ -611,45 +615,40 @@ static void nft_rbtree_walk(const struct nft_ctx *ctx,read_unlock_bh (&priv->lock); } -static void nft_rbtree_gc (struct work_struct *work) +static void nft_rbtree_gc_remove (struct net *net,struct nft_set *set, +struct nft_rbtree *priv, +struct nft_rbtree_elem *rbe) { +struct nft_set_elem elem = { + .priv = rbe, + }; + +nft_setelem_data_deactivate (net, set, &elem); +nft_rbtree_erase (priv, rbe); +} + +static void nft_rbtree_gc (struct nft_set *set) +{ +struct nft_rbtree *priv =nft_set_priv (set);struct nft_rbtree_elem *rbe, *rbe_end =NULL ;struct nftables_pernet *nft_net; -struct nft_rbtree *priv; +struct rb_node *node, *next;struct nft_trans_gc *gc; -struct rb_node *node; -struct nft_set *set; -unsigned int gc_seq;struct net *net; - priv = container_of(work, struct nft_rbtree, gc_work.work); set =nft_set_container_of (priv); net =read_pnet (&set->net); nft_net =nft_pernet (net); - gc_seq =READ_ONCE (nft_net->gc_seq); -if (nft_set_gc_is_pending (set)) - goto done; - - gc =nft_trans_gc_alloc (set, gc_seq,GFP_KERNEL ); + gc =nft_trans_gc_alloc (set,0 ,GFP_KERNEL );if (!gc) - goto done; - -read_lock_bh (&priv->lock); -for (node =rb_first (&priv->root); node !=NULL ; node =rb_next (node)) { +return ; -/* Ruleset has been updated, try later. */ -if (READ_ONCE (nft_net->gc_seq) != gc_seq) { -nft_trans_gc_destroy (gc); - gc =NULL ; - goto try_later; - } +for (node =rb_first (&priv->root); node ; node = next) { + next =rb_next (node); rbe = rb_entry(node, struct nft_rbtree_elem, node); -if (nft_set_elem_is_dead (&rbe->ext)) - goto dead_elem; -/* elements are reversed in the rbtree for historical reasons, * from highest to lowest value, that is why end element is * always visited before the start element.
@@ -661,37 +660,34 @@ static void nft_rbtree_gc(struct work_struct *work)if (!nft_set_elem_expired (&rbe->ext))continue ; -nft_set_elem_dead (&rbe->ext); - -if (!rbe_end) -continue ; - -nft_set_elem_dead (&rbe_end->ext); - - gc =nft_trans_gc_queue_async (gc, gc_seq,GFP_ATOMIC ); + gc =nft_trans_gc_queue_sync (gc,GFP_KERNEL );if (!gc) goto try_later; -nft_trans_gc_elem_add (gc, rbe_end); - rbe_end =NULL ; -dead_elem: - gc =nft_trans_gc_queue_async (gc, gc_seq,GFP_ATOMIC ); +/* end element needs to be removed first, it has +* no timeout extension. +*/ +if (rbe_end) { +nft_rbtree_gc_remove (net, set, priv, rbe_end); +nft_trans_gc_elem_add (gc, rbe_end); + rbe_end =NULL ; + } + + gc =nft_trans_gc_queue_sync (gc,GFP_KERNEL );if (!gc) goto try_later; +nft_rbtree_gc_remove (net, set, priv, rbe);nft_trans_gc_elem_add (gc, rbe); } - gc =nft_trans_gc_catchall_async (gc, gc_seq); - try_later: -read_unlock_bh (&priv->lock); -if (gc) -nft_trans_gc_queue_async_done (gc); -done: -queue_delayed_work (system_power_efficient_wq, &priv->gc_work, -nft_set_gc_interval (set)); +if (gc) { + gc =nft_trans_gc_catchall_sync (gc); +nft_trans_gc_queue_sync_done (gc); + priv->last_gc = jiffies; + } } static u64 nft_rbtree_privsize(const struct nlattr * const nla[],
@@ -710,11 +706,6 @@ static int nft_rbtree_init(const struct nft_set *set,seqcount_rwlock_init (&priv->count, &priv->lock); priv->root =RB_ROOT ; -INIT_DEFERRABLE_WORK (&priv->gc_work, nft_rbtree_gc); -if (set->flags &NFT_SET_TIMEOUT ) -queue_delayed_work (system_power_efficient_wq, &priv->gc_work, -nft_set_gc_interval (set)); -return 0 ; }
@@ -725,8 +716,6 @@ static void nft_rbtree_destroy(const struct nft_ctx *ctx,struct nft_rbtree_elem *rbe;struct rb_node *node; -cancel_delayed_work_sync (&priv->gc_work); -rcu_barrier ();while ((node = priv->root.rb_node) !=NULL ) {rb_erase (node, &priv->root); rbe = rb_entry(node, struct nft_rbtree_elem, node);
@@ -752,6 +741,21 @@ static bool nft_rbtree_estimate(const struct nft_set_desc *desc, u32 features,return true; } +static void nft_rbtree_commit (struct nft_set *set) +{ +struct nft_rbtree *priv =nft_set_priv (set); + +if (time_after_eq (jiffies, priv->last_gc +nft_set_gc_interval (set))) +nft_rbtree_gc (set); +} + +static void nft_rbtree_gc_init (const struct nft_set *set) +{ +struct nft_rbtree *priv =nft_set_priv (set); + + priv->last_gc = jiffies; +} +const struct nft_set_type nft_set_rbtree_type = { .features =NFT_SET_INTERVAL |NFT_SET_MAP |NFT_SET_OBJECT |NFT_SET_TIMEOUT , .ops = {
@@ -765,6 +769,8 @@ const struct nft_set_type nft_set_rbtree_type = { .deactivate = nft_rbtree_deactivate, .flush = nft_rbtree_flush, .activate = nft_rbtree_activate, + .commit = nft_rbtree_commit, + .gc_init = nft_rbtree_gc_init, .lookup = nft_rbtree_lookup, .walk = nft_rbtree_walk, .get = nft_rbtree_get,
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 148/393 netfilter: nf_tables: fix set size with rbtree backend
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Pablo Neira Ayuso <[email protected]>
[ Upstream commit 8d738c1869f611955d91d8d0fd0012d9ef207201 ]
The existing rbtree implementation uses singleton elements to represent ranges, however, userspace provides a set size according to the number of ranges in the set.
Adjust provided userspace set size to the number of singleton elements in the kernel by multiplying the range by two.
Check if the no-match all-zero element is already in the set, in such case release one slot in the set size.
--- include/net/netfilter/nf_tables.h | 6 ++++ net/netfilter/nf_tables_api.c | 49 +++++++++++++++++++++++++++++-- net/netfilter/nft_set_rbtree.c | 43 +++++++++++++++++++++++++++ 3 files changed, 96 insertions(+), 2 deletions(-)
include/net/netfilter/nf_tables.h +6 -0
@@ -429,6 +429,9 @@ struct nft_set_ext;* @remove: remove element from set * @walk: iterate over all set elements * @get: get set elements +* @ksize: kernel set size +* @usize: userspace set size +* @adjust_maxsize: delta to adjust maximum set size * @commit: commit set elements * @abort: abort set elements * @privsize: function to return size of set private data
@@ -481,6 +484,9 @@ struct nft_set_ops {const struct nft_set *set, const struct nft_set_elem *elem, unsigned int flags); +u32 (*ksize)(u32 size); +u32 (*usize)(u32 size); +u32 (*adjust_maxsize)(const struct nft_set *set);void (*commit)(struct nft_set *set);void (*abort)(const struct nft_set *set); u64 (*privsize)(const struct nlattr * const nla[],
net/netfilter/nf_tables_api.c +47 -2
91 lines not on this page · raw message
net/netfilter/nft_set_rbtree.c +43 -0
54 lines not on this page · raw message
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 149/393 netfilter: nft_flow_offload: update tcp state flags under lock
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Florian Westphal <[email protected]>
[ Upstream commit 7a4b61406395291ffb7220a10e8951a9a8684819 ]
The conntrack entry is already public, there is a small chance that another CPU is handling a packet in reply direction and racing with the tcp state update.
Move this under ct spinlock.
This is done once, when ct is about to be offloaded, so this should not result in a noticeable performance hit.
--- net/netfilter/nft_flow_offload.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-)
net/netfilter/nft_flow_offload.c +11 -5
@@ -288,6 +288,15 @@ static bool nft_flow_offload_skip(struct sk_buff *skb, int family)return false; } +static void flow_offload_ct_tcp (struct nf_conn *ct) +{ +/* conntrack will not see all packets, disable tcp window validation. */ +spin_lock_bh (&ct->lock); + ct->proto.tcp.seen[0 ].flags |=IP_CT_TCP_FLAG_BE_LIBERAL ; + ct->proto.tcp.seen[1 ].flags |=IP_CT_TCP_FLAG_BE_LIBERAL ; +spin_unlock_bh (&ct->lock); +} +static void nft_flow_offload_eval (const struct nft_expr *expr,struct nft_regs *regs,const struct nft_pktinfo *pkt)
@@ -355,11 +364,8 @@ static void nft_flow_offload_eval(const struct nft_expr *expr, goto err_flow_alloc;flow_offload_route_init (flow, &route); - -if (tcph) { - ct->proto.tcp.seen[0 ].flags |=IP_CT_TCP_FLAG_BE_LIBERAL ; - ct->proto.tcp.seen[1 ].flags |=IP_CT_TCP_FLAG_BE_LIBERAL ; - } +if (tcph) +flow_offload_ct_tcp (ct); ret =flow_offload_add (flowtable, flow);if (ret <0 )
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 150/393 net: ethernet: ti: am65-cpsw: fix freeing IRQ in am65_cpsw_nuss_remove_tx_chns()
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Roger Quadros <[email protected]>
[ Upstream commit 4395a44acb15850e492dd1de9ec4b6479d96bc80 ]
When getting the IRQ we use k3_udma_glue_tx_get_irq() which returns negative error value on error. So not NULL check is not sufficient to deteremine if IRQ is valid. Check that IRQ is greater then zero to ensure it is valid.
There is no issue at probe time but at runtime user can invoke .set_channels which results in the following call chain. am65_cpsw_set_channels()
am65_cpsw_nuss_update_tx_rx_chns()
am65_cpsw_nuss_remove_tx_chns() am65_cpsw_nuss_init_tx_chns()
At this point if am65_cpsw_nuss_init_tx_chns() fails due to k3_udma_glue_tx_get_irq() then tx_chn->irq will be set to a negative value.
Then, at subsequent .set_channels with higher channel count we will attempt to free an invalid IRQ in am65_cpsw_nuss_remove_tx_chns() leading to a kernel warning.
The issue is present in the original commit that introduced this driver, although there, am65_cpsw_nuss_update_tx_rx_chns() existed as am65_cpsw_nuss_update_tx_chns().
--- drivers/net/ethernet/ti/am65-cpsw-nuss.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/ti/am65-cpsw-nuss.c +1 -1
@@ -1651,7 +1651,7 @@ void am65_cpsw_nuss_remove_tx_chns(struct am65_cpsw_common *common)for (i =0 ; i < common->tx_ch_num; i++) {struct am65_cpsw_tx_chn *tx_chn = &common->tx_chns[i]; -if (tx_chn->irq) +if (tx_chn->irq >0 )devm_free_irq (dev, tx_chn->irq, tx_chn);netif_napi_del (&tx_chn->napi_tx);
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 151/393 tcp_cubic: fix incorrect HyStart round start detection
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mahdi Arghavani <[email protected]>
[ Upstream commit 25c1a9ca53db5780757e7f53e688b8f916821baa ]
I noticed that HyStart incorrectly marks the start of rounds, leading to inaccurate measurements of ACK train lengths and resetting the ca->sample_cnt variable. This inaccuracy can impact HyStart's functionality in terminating exponential cwnd growth during Slow-Start, potentially degrading TCP performance.
The issue arises because the changes introduced in commit 4e1fddc98d25 ("tcp_cubic: fix spurious Hystart ACK train detections for not-cwnd-limited flows") moved the caller of the bictcp_hystart_reset function inside the hystart_update function. This modification added an additional condition for triggering the caller, requiring that (tcp_snd_cwnd(tp) >= hystart_low_window) must also
be satisfied before invoking bictcp_hystart_reset.
This fix ensures that bictcp_hystart_reset is correctly called at the start of a new round, regardless of the congestion window size. This is achieved by moving the condition
(tcp_snd_cwnd(tp) >= hystart_low_window)
from before calling bictcp_hystart_reset to after it.
I tested with a client and a server connected through two Linux software routers. In this setup, the minimum RTT was 150 ms, the bottleneck bandwidth was 50 Mbps, and the bottleneck buffer size was 1 BDP, calculated as (50M / 1514 / 8) * 0.150 = 619 packets. I conducted the test twice, transferring data from the server to the client for 1.5 seconds. Before the patch was applied, HYSTART-DELAY stopped the exponential growth of cwnd when cwnd = 516, and the bottleneck link was not yet saturated (516 < 619).
After the patch was applied, HYSTART-ACK-TRAIN stopped the exponential growth of cwnd when cwnd = 632, and the bottleneck link was saturated (632 > 619).
In this test, applying the patch resulted in 300 KB more data delivered.
--- net/ipv4/tcp_cubic.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
net/ipv4/tcp_cubic.c +5 -3
@@ -392,6 +392,10 @@ static void hystart_update(struct sock *sk, u32 delay)if (after (tp->snd_una, ca->end_seq))bictcp_hystart_reset (sk); +/* hystart triggers when cwnd is larger than some threshold */ +if (tcp_snd_cwnd (tp) < hystart_low_window) +return ; +if (hystart_detect &HYSTART_ACK_TRAIN ) {u32 now =bictcp_clock_us (sk);
@@ -467,9 +471,7 @@ __bpf_kfunc static void cubictcp_acked(struct sock *sk, const struct ack_sampleif (ca->delay_min ==0 || ca->delay_min > delay) ca->delay_min = delay; -/* hystart triggers when cwnd is larger than some threshold */ -if (!ca->found &&tcp_in_slow_start (tp) && hystart && -tcp_snd_cwnd (tp) >= hystart_low_window) +if (!ca->found &&tcp_in_slow_start (tp) && hystart)hystart_update (sk, delay); }
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 152/393 net/rose: prevent integer overflows in rose_setsockopt()
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Nikita Zhandarovich <[email protected]>
[ Upstream commit d640627663bfe7d8963c7615316d7d4ef60f3b0b ]
In case of possible unpredictably large arguments passed to rose_setsockopt() and multiplied by extra values on top of that, integer overflows may occur.
Do the safest minimum and fix these issues by checking the contents of 'opt' and returning -EINVAL if they are too large. Also, switch to unsigned int and remove useless check for negative 'opt' in ROSE_IDLE case.
--- net/rose/af_rose.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
net/rose/af_rose.c +8 -8
@@ -397,15 +397,15 @@ static int rose_setsockopt(struct socket *sock, int level, int optname, {struct sock *sk = sock->sk;struct rose_sock *rose =rose_sk (sk); -int opt; +unsigned int opt;if (level !=SOL_ROSE )return -ENOPROTOOPT ; -if (optlen <sizeof (int )) +if (optlen <sizeof (unsigned int ))return -EINVAL ; -if (copy_from_sockptr (&opt, optval,sizeof (int ))) +if (copy_from_sockptr (&opt, optval,sizeof (unsigned int )))return -EFAULT ;switch (optname) {
@@ -414,31 +414,31 @@ static int rose_setsockopt(struct socket *sock, int level, int optname,return 0 ;case ROSE_T1 : -if (opt <1 ) +if (opt <1 || opt >UINT_MAX /HZ )return -EINVAL ; rose->t1 = opt *HZ ;return 0 ;case ROSE_T2 : -if (opt <1 ) +if (opt <1 || opt >UINT_MAX /HZ )return -EINVAL ; rose->t2 = opt *HZ ;return 0 ;case ROSE_T3 : -if (opt <1 ) +if (opt <1 || opt >UINT_MAX /HZ )return -EINVAL ; rose->t3 = opt *HZ ;return 0 ;case ROSE_HOLDBACK : -if (opt <1 ) +if (opt <1 || opt >UINT_MAX /HZ )return -EINVAL ; rose->hb = opt *HZ ;return 0 ;case ROSE_IDLE : -if (opt <0 ) +if (opt >UINT_MAX / (60 *HZ ))return -EINVAL ; rose->idle = opt *60 *HZ ;return 0 ;
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 153/393 libbpf: dont adjust USDT semaphore address if .stapsdt.base addr is missing
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Andrii Nakryiko <[email protected]>
[ Upstream commit 98ebe5ef6f5c4517ba92fb3e56f95827ebea83fd ]
USDT ELF note optionally can record an offset of .stapsdt.base, which is used to make adjustments to USDT target attach address. Currently, libbpf will do this address adjustment unconditionally if it finds .stapsdt.base ELF section in target binary. But there is a corner case where .stapsdt.base ELF section is present, but specific USDT note doesn't reference it. In such case, libbpf will basically just add base address and end up with absolutely incorrect USDT target address.
This adjustment has to be done only if both .stapsdt.sema section is present and USDT note is recording a reference to it.
--- tools/lib/bpf/usdt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/lib/bpf/usdt.c +1 -1
@@ -659,7 +659,7 @@ static int collect_usdt_targets(struct usdt_manager *man, Elf *elf, const char ** [0] https://sourceware.org/systemtap/wiki/UserSpaceProbeImplementation */ usdt_abs_ip = note.loc_addr; -if (base_addr) +if (base_addr && note.base_addr) usdt_abs_ip += base_addr - note.base_addr;/* When attaching uprobes (which is what USDTs basically are)
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 154/393 tools/testing/selftests/bpf/test_tc_tunnel.sh: Fix wait for server bind
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Marco Leogrande <[email protected]>
[ Upstream commit e2f0791124a1b6ca8d570110cbd487969d9d41ef ]
Commit f803bcf9208a ("selftests/bpf: Prevent client connect before server bind in test_tc_tunnel.sh") added code that waits for the netcat server to start before the netcat client attempts to connect to it. However, not all calls to 'server_listen' were guarded.
This patch adds the existing 'wait_for_port' guard after the remaining call to 'server_listen'.
--- tools/testing/selftests/bpf/test_tc_tunnel.sh | 1 + 1 file changed, 1 insertion(+)
tools/testing/selftests/bpf/test_tc_tunnel.sh +1 -0
@@ -305,6 +305,7 @@ else client_connect verify_data server_listen + wait_for_port ${port} ${netcat_opt} fi # serverside, use BPF for decap
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 155/393 libbpf: Fix segfault due to libelf functions not setting errno
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Quentin Monnet <[email protected]>
[ Upstream commit e10500b69c3f3378f3dcfc8c2fe4cdb74fc844f5 ]
Libelf functions do not set errno on failure. Instead, it relies on its internal _elf_errno value, that can be retrieved via elf_errno (or the corresponding message via elf_errmsg()). From "man libelf":
If a libelf function encounters an error it will set an internal error code that can be retrieved with elf_errno. Each thread maintains its own separate error code. The meaning of each error code can be determined with elf_errmsg, which returns a string describing the error.
As a consequence, libbpf should not return -errno when a function from libelf fails, because an empty value will not be interpreted as an error and won't prevent the program to stop. This is visible in bpf_linker__add_file(), for example, where we call a succession of functions that rely on libelf:
err = err ?: linker_load_obj_file(linker, filename, opts, &obj);
err = err ?: linker_append_sec_data(linker, &obj);
err = err ?: linker_append_elf_syms(linker, &obj);
err = err ?: linker_append_elf_relos(linker, &obj);
err = err ?: linker_append_btf(linker, &obj);
err = err ?: linker_append_btf_ext(linker, &obj);If the object file that we try to process is not, in fact, a correct object file, linker_load_obj_file() may fail with errno not being set, and return 0. In this case we attempt to run linker_append_elf_sysms() and may segfault.
This can happen (and was discovered) with bpftool:
$ bpftool gen object output.o sample_ret0.bpf.c
libbpf: failed to get ELF header for sample_ret0.bpf.c: invalid `Elf' handle
zsh: segmentation fault (core dumped) bpftool gen object output.o sample_ret0.bpf.cFix the issue by returning a non-null error code (-EINVAL) when libelf functions fail.
--- tools/lib/bpf/linker.c | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-)
tools/lib/bpf/linker.c +8 -14
@@ -567,17 +567,15 @@ static int linker_load_obj_file(struct bpf_linker *linker, const char *filename, } obj->elf =elf_begin (obj->fd,ELF_C_READ_MMAP ,NULL );if (!obj->elf) { - err = -errno;pr_warn_elf ("failed to parse ELF file '%s'" , filename); -return err; +return -EINVAL ; }/* Sanity check ELF file high-level properties */ ehdr =elf64_getehdr (obj->elf);if (!ehdr) { - err = -errno;pr_warn_elf ("failed to get ELF header for %s" , filename); -return err; +return -EINVAL ; }if (ehdr->e_ident[EI_DATA ] != host_endianness) { err = -EOPNOTSUPP ;
@@ -593,9 +591,8 @@ static int linker_load_obj_file(struct bpf_linker *linker, const char *filename, }if (elf_getshdrstrndx (obj->elf, &obj->shstrs_sec_idx)) { - err = -errno;pr_warn_elf ("failed to get SHSTRTAB section index for %s" , filename); -return err; +return -EINVAL ; } scn =NULL ;
@@ -605,26 +602,23 @@ static int linker_load_obj_file(struct bpf_linker *linker, const char *filename, shdr =elf64_getshdr (scn);if (!shdr) { - err = -errno;pr_warn_elf ("failed to get section #%zu header for %s" , sec_idx, filename); -return err; +return -EINVAL ; } sec_name =elf_strptr (obj->elf, obj->shstrs_sec_idx, shdr->sh_name);if (!sec_name) { - err = -errno;pr_warn_elf ("failed to get section #%zu name for %s" , sec_idx, filename); -return err; +return -EINVAL ; } data =elf_getdata (scn,0 );if (!data) { - err = -errno;pr_warn_elf ("failed to get section #%zu (%s) data from %s" , sec_idx, sec_name, filename); -return err; +return -EINVAL ; } sec =add_src_sec (obj, sec_name);
@@ -2602,14 +2596,14 @@ int bpf_linker__finalize(struct bpf_linker *linker)/* Finalize ELF layout */ if (elf_update (linker->elf,ELF_C_NULL ) <0 ) { - err = -errno; + err = -EINVAL ;pr_warn_elf ("failed to finalize ELF layout" );return libbpf_err (err); }/* Write out final ELF contents */ if (elf_update (linker->elf,ELF_C_WRITE ) <0 ) { - err = -errno; + err = -EINVAL ;pr_warn_elf ("failed to write ELF contents" );return libbpf_err (err); }
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 156/393 ASoC: sun4i-spdif: Add clock multiplier settings
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: George Lander <[email protected]>
[ Upstream commit 0a2319308de88b9e819c0b43d0fccd857123eb31 ]
There have been intermittent issues with the SPDIF output on H3 and H2+ devices which has been fixed by setting the s_clk to 4 times the audio pll.
Add a quirk for the clock multiplier as not every supported SoC requires it. Without the multiplier, the audio at normal sampling rates was distorted and did not play at higher sampling rates.
--- sound/soc/sunxi/sun4i-spdif.c | 7 +++++++ 1 file changed, 7 insertions(+)
sound/soc/sunxi/sun4i-spdif.c +7 -0
@@ -177,6 +177,7 @@ struct sun4i_spdif_quirks {unsigned int reg_dac_txdata;bool has_reset;unsigned int val_fctl_ftx; +unsigned int mclk_multiplier; };struct sun4i_spdif_dev {
@@ -314,6 +315,7 @@ static int sun4i_spdif_hw_params(struct snd_pcm_substream *substream,default :return -EINVAL ; } + mclk *= host->quirks->mclk_multiplier; ret =clk_set_rate (host->spdif_clk, mclk);if (ret <0 ) {
@@ -348,6 +350,7 @@ static int sun4i_spdif_hw_params(struct snd_pcm_substream *substream,default :return -EINVAL ; } + mclk_div *= host->quirks->mclk_multiplier; reg_val =0 ; reg_val |=SUN4I_SPDIF_TXCFG_ASS ;
@@ -541,24 +544,28 @@ static struct snd_soc_dai_driver sun4i_spdif_dai = {static const struct sun4i_spdif_quirks sun4i_a10_spdif_quirks = { .reg_dac_txdata =SUN4I_SPDIF_TXFIFO , .val_fctl_ftx =SUN4I_SPDIF_FCTL_FTX , + .mclk_multiplier =1 , };static const struct sun4i_spdif_quirks sun6i_a31_spdif_quirks = { .reg_dac_txdata =SUN4I_SPDIF_TXFIFO , .val_fctl_ftx =SUN4I_SPDIF_FCTL_FTX , .has_reset = true, + .mclk_multiplier =1 , };static const struct sun4i_spdif_quirks sun8i_h3_spdif_quirks = { .reg_dac_txdata =SUN8I_SPDIF_TXFIFO , .val_fctl_ftx =SUN4I_SPDIF_FCTL_FTX , .has_reset = true, + .mclk_multiplier =4 , };static const struct sun4i_spdif_quirks sun50i_h6_spdif_quirks = { .reg_dac_txdata =SUN8I_SPDIF_TXFIFO , .val_fctl_ftx =SUN50I_H6_SPDIF_FCTL_FTX , .has_reset = true, + .mclk_multiplier =1 , };static const struct of_device_id sun4i_spdif_of_match[] = {
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 157/393 selftests/bpf: Fix fill_link_info selftest on powerpc
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Saket Kumar Bhaskar <[email protected]>
[ Upstream commit 4d33dc1bc31df80356c49e40dbd3ddff19500bcb ]
With CONFIG_KPROBES_ON_FTRACE enabled on powerpc, ftrace_location_range returns ftrace location for bpf_fentry_test1 at offset of 4 bytes from function entry. This is because branch to _mcount function is at offset of 4 bytes in function profile sequence.
To fix this, add entry_offset of 4 bytes while verifying the address for kprobe entry address of bpf_fentry_test1 in verify_perf_link_info in selftest, when CONFIG_KPROBES_ON_FTRACE is enabled.
Disassemble of bpf_fentry_test1:
c000000000e4b080 <bpf_fentry_test1>:
c000000000e4b080: a6 02 08 7c mflr r0 c000000000e4b084: b9 e2 22 4b bl c00000000007933c <_mcount> c000000000e4b088: 01 00 63 38 addi r3,r3,1 c000000000e4b08c: b4 07 63 7c extsw r3,r3 c000000000e4b090: 20 00 80 4e blr
When CONFIG_PPC_FTRACE_OUT_OF_LINE [1] is enabled, these function profile sequence is moved out of line with an unconditional branch at offset 0. So, the test works without altering the offset for 'CONFIG_KPROBES_ON_FTRACE && CONFIG_PPC_FTRACE_OUT_OF_LINE' case.
Disassemble of bpf_fentry_test1:
c000000000f95190 <bpf_fentry_test1>:
c000000000f95190: 00 00 00 60 nop c000000000f95194: 01 00 63 38 addi r3,r3,1 c000000000f95198: b4 07 63 7c extsw r3,r3 c000000000f9519c: 20 00 80 4e blr
[1] https://lore.kernel.org/all/[email protected]/
--- .../selftests/bpf/prog_tests/fill_link_info.c | 4 ++++ .../selftests/bpf/progs/test_fill_link_info.c | 13 ++++++++++--- 2 files changed, 14 insertions(+), 3 deletions(-)
tools/testing/selftests/bpf/prog_tests/fill_link_info.c +4 -0
@@ -164,6 +164,10 @@ static void test_kprobe_fill_link_info(struct test_fill_link_info *skel,/* See also arch_adjust_kprobe_addr(). */ if (skel->kconfig->CONFIG_X86_KERNEL_IBT) entry_offset =4 ; +if (skel->kconfig->CONFIG_PPC64 && + skel->kconfig->CONFIG_KPROBES_ON_FTRACE && + !skel->kconfig->CONFIG_PPC_FTRACE_OUT_OF_LINE) + entry_offset =4 ; err =verify_perf_link_info (link_fd, type, kprobe_addr,0 , entry_offset);ASSERT_OK (err,"verify_perf_link_info" ); }else {
tools/testing/selftests/bpf/progs/test_fill_link_info.c +10 -3
@@ -6,13 +6,20 @@#include <stdbool.h> extern bool CONFIG_X86_KERNEL_IBT __kconfig __weak; +extern bool CONFIG_PPC_FTRACE_OUT_OF_LINE __kconfig __weak; +extern bool CONFIG_KPROBES_ON_FTRACE __kconfig __weak; +extern bool CONFIG_PPC64 __kconfig __weak; -/* This function is here to have CONFIG_X86_KERNEL_IBT -* used and added to object BTF. +/* This function is here to have CONFIG_X86_KERNEL_IBT, +* CONFIG_PPC_FTRACE_OUT_OF_LINE, CONFIG_KPROBES_ON_FTRACE, +* CONFIG_PPC6 used and added to object BTF. */ int unused (void ) { -return CONFIG_X86_KERNEL_IBT ?0 :1 ; +return CONFIG_X86_KERNEL_IBT || +CONFIG_PPC_FTRACE_OUT_OF_LINE || +CONFIG_KPROBES_ON_FTRACE || +CONFIG_PPC64 ?0 :1 ; }SEC ("kprobe" )
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 158/393 crypto: api - Fix boot-up self-test race
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Herbert Xu <[email protected]>
[ Upstream commit 8dd458cbc5be9ce4427ffce7a9dcdbff4dfc4ac9 ]
During the boot process self-tests are postponed so that all algorithms are registered when the test starts. In the event that algorithms are still being registered during these tests, which can occur either because the algorithm is registered at late_initcall, or because a self-test itself triggers the creation of an instance, some self-tests may never start at all.
Fix this by setting the flag at the start of crypto_start_tests.
Note that this race is theoretical and has never been observed in practice.
--- crypto/algapi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
crypto/algapi.c +2 -2
@@ -1059,6 +1059,8 @@ static void __init crypto_start_tests(void)if (IS_ENABLED (CONFIG_CRYPTO_MANAGER_DISABLE_TESTS ))return ; +set_crypto_boot_test_finished (); +for (;;) {struct crypto_larval *larval =NULL ;struct crypto_alg *q;
@@ -1091,8 +1093,6 @@ static void __init crypto_start_tests(void)crypto_wait_for_test (larval); } - -set_crypto_boot_test_finished (); }static int __init crypto_algapi_init (void )
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 159/393 crypto: caam - use JobRs space to access page 0 regs
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Gaurav Jain <[email protected]>
[ Upstream commit 73a7496c218b7ca19ba276f54758e7f0adf269c5 ]
On iMX8DXL/QM/QXP(SECO) & iMX8ULP(ELE) SoCs, access to controller region(CAAM page 0) is not permitted from non secure world. use JobR's register space to access page 0 registers.
--- drivers/crypto/caam/blob_gen.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/crypto/caam/blob_gen.c +2 -1
@@ -2,6 +2,7 @@/* * Copyright (C) 2015 Pengutronix, Steffen Trumtrar <[email protected]> * Copyright (C) 2021 Pengutronix, Ahmad Fatoum <[email protected]> +* Copyright 2024 NXP */ #define pr_fmt (fmt) "caam blob_gen: " fmt
@@ -104,7 +105,7 @@ int caam_process_blob(struct caam_blob_priv *priv, } ctrlpriv =dev_get_drvdata (jrdev->parent); - moo =FIELD_GET (CSTA_MOO ,rd_reg32 (&ctrlpriv->ctrl->perfmon.status)); + moo =FIELD_GET (CSTA_MOO ,rd_reg32 (&ctrlpriv->jr[0 ]->perfmon.status));if (moo !=CSTA_MOO_SECURE && moo !=CSTA_MOO_TRUSTED )dev_warn (jrdev,"using insecure test key, enable HAB to use unique device key!\n" );
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 160/393 perf header: Fix one memory leakage in process_bpf_btf()
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Zhongqiu Han <[email protected]>
[ Upstream commit 875d22980a062521beed7b5df71fb13a1af15d83 ]
If __perf_env__insert_btf() returns false due to a duplicate btf node insertion, the temporary node will leak. Add a check to ensure the memory is freed if the function returns false.
--- tools/perf/util/header.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
tools/perf/util/header.c +2 -1
@@ -3224,7 +3224,8 @@ static int process_bpf_btf(struct feat_fd *ff, void *data __maybe_unused)if (__do_read (ff, node->data, data_size)) goto out; -__perf_env__insert_btf (env, node); +if (!__perf_env__insert_btf (env, node)) +free (node); node =NULL ; }
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 161/393 perf header: Fix one memory leakage in process_bpf_prog_info()
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Zhongqiu Han <[email protected]>
[ Upstream commit a7da6c7030e1aec32f0a41c7b4fa70ec96042019 ]
Function __perf_env__insert_bpf_prog_info() will return without inserting bpf prog info node into perf env again due to a duplicate bpf prog info node insertion, causing the temporary info_linear and info_node memory to leak. Modify the return type of this function to bool and add a check to ensure the memory is freed if the function returns false.
--- tools/perf/util/env.c | 5 +++-- tools/perf/util/env.h | 2 +- tools/perf/util/header.c | 5 ++++- 3 files changed, 8 insertions(+), 4 deletions(-)
tools/perf/util/env.c +3 -2
@@ -28,7 +28,7 @@ void perf_env__insert_bpf_prog_info(struct perf_env *env,up_write (&env->bpf_progs.lock); } -void __perf_env__insert_bpf_prog_info (struct perf_env *env,struct bpf_prog_info_node *info_node) +bool __perf_env__insert_bpf_prog_info (struct perf_env *env,struct bpf_prog_info_node *info_node) {__u32 prog_id = info_node->info_linear->info.id;struct bpf_prog_info_node *node;
@@ -46,13 +46,14 @@ void __perf_env__insert_bpf_prog_info(struct perf_env *env, struct bpf_prog_info p = &(*p)->rb_right; }else {pr_debug ("duplicated bpf prog info %u\n" , prog_id); -return ; +return false; } }rb_link_node (&info_node->rb_node, parent, p);rb_insert_color (&info_node->rb_node, &env->bpf_progs.infos); env->bpf_progs.infos_cnt++; +return true; } struct bpf_prog_info_node *perf_env__find_bpf_prog_info(struct perf_env *env,
tools/perf/util/env.h +1 -1
@@ -164,7 +164,7 @@ const char *perf_env__raw_arch(struct perf_env *env);int perf_env__nr_cpus_avail (struct perf_env *env);void perf_env__init (struct perf_env *env); -void __perf_env__insert_bpf_prog_info (struct perf_env *env, +bool __perf_env__insert_bpf_prog_info (struct perf_env *env,struct bpf_prog_info_node *info_node);void perf_env__insert_bpf_prog_info (struct perf_env *env,struct bpf_prog_info_node *info_node);
tools/perf/util/header.c +4 -1
@@ -3177,7 +3177,10 @@ static int process_bpf_prog_info(struct feat_fd *ff, void *data __maybe_unused)/* after reading from file, translate offset to address */ bpil_offs_to_addr (info_linear); info_node->info_linear = info_linear; -__perf_env__insert_bpf_prog_info (env, info_node); +if (!__perf_env__insert_bpf_prog_info (env, info_node)) { +free (info_linear); +free (info_node); + } }up_write (&env->bpf_progs.lock);
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 162/393 perf bpf: Fix two memory leakages when calling perf_env__insert_bpf_prog_info()
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Zhongqiu Han <[email protected]>
[ Upstream commit 03edb7020bb920f1935c3f30acad0bb27fdb99af ]
If perf_env__insert_bpf_prog_info() returns false due to a duplicate bpf prog info node insertion, the temporary info_node and info_linear memory will leak. Add a check to ensure the memory is freed if the function returns false.
--- tools/perf/util/bpf-event.c | 10 ++++++++-- tools/perf/util/env.c | 8 ++++++-- tools/perf/util/env.h | 2 +- 3 files changed, 15 insertions(+), 5 deletions(-)
tools/perf/util/bpf-event.c +8 -2
@@ -288,7 +288,10 @@ static int perf_event__synthesize_one_bpf_prog(struct perf_session *session, } info_node->info_linear = info_linear; -perf_env__insert_bpf_prog_info (env, info_node); +if (!perf_env__insert_bpf_prog_info (env, info_node)) { +free (info_linear); +free (info_node); + } info_linear =NULL ;/*
@@ -476,7 +479,10 @@ static void perf_env__add_bpf_info(struct perf_env *env, u32 id) info_node =malloc (sizeof (struct bpf_prog_info_node ));if (info_node) { info_node->info_linear = info_linear; -perf_env__insert_bpf_prog_info (env, info_node); +if (!perf_env__insert_bpf_prog_info (env, info_node)) { +free (info_linear); +free (info_node); + } }else free (info_linear);
tools/perf/util/env.c +6 -2
@@ -20,12 +20,16 @@ struct perf_env perf_env;#include "bpf-utils.h" #include <bpf/libbpf.h> -void perf_env__insert_bpf_prog_info (struct perf_env *env, +bool perf_env__insert_bpf_prog_info (struct perf_env *env,struct bpf_prog_info_node *info_node) { +bool ret; +down_write (&env->bpf_progs.lock); -__perf_env__insert_bpf_prog_info (env, info_node); + ret =__perf_env__insert_bpf_prog_info (env, info_node);up_write (&env->bpf_progs.lock); + +return ret; }bool __perf_env__insert_bpf_prog_info (struct perf_env *env,struct bpf_prog_info_node *info_node)
tools/perf/util/env.h +1 -1
@@ -166,7 +166,7 @@ int perf_env__nr_cpus_avail(struct perf_env *env);void perf_env__init (struct perf_env *env);bool __perf_env__insert_bpf_prog_info (struct perf_env *env,struct bpf_prog_info_node *info_node); -void perf_env__insert_bpf_prog_info (struct perf_env *env, +bool perf_env__insert_bpf_prog_info (struct perf_env *env,struct bpf_prog_info_node *info_node);struct bpf_prog_info_node *perf_env__find_bpf_prog_info (struct perf_env *env,__u32 prog_id);
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 163/393 ASoC: renesas: rz-ssi: Use only the proper amount of dividers
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Claudiu Beznea <[email protected]>
[ Upstream commit 55c209cd4318c701e6e88e0b2512a0f12dd02a7d ]
There is no need to populate the ckdv[] with invalid dividers as that part will not be indexed anyway. The ssi->audio_mck/bclk_rate should always be >= 0. While at it, change the ckdv type as u8, as the divider 128 was previously using the s8 sign bit.
--- sound/soc/sh/rz-ssi.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
sound/soc/sh/rz-ssi.c +1 -2
@@ -245,8 +245,7 @@ static void rz_ssi_stream_quit(struct rz_ssi_priv *ssi,static int rz_ssi_clk_setup (struct rz_ssi_priv *ssi,unsigned int rate,unsigned int channels) { -static s8 ckdv[16 ] = {1 ,2 ,4 ,8 ,16 ,32 ,64 ,128 , -6 ,12 ,24 ,48 ,96 ,-1 ,-1 ,-1 }; +static u8 ckdv[] = {1 ,2 ,4 ,8 ,16 ,32 ,64 ,128 ,6 ,12 ,24 ,48 ,96 };unsigned int channel_bits =32 ;/* System Word Length */ unsigned long bclk_rate = rate * channels * channel_bits;unsigned int div;
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 164/393 perf expr: Initialize is_test value in expr__ctx_new()
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Levi Yun <[email protected]>
[ Upstream commit 1d18ebcfd302a2005b83ae5f13df223894d19902 ]
When expr_parse_ctx is allocated by expr_ctx_new(), expr_scanner_ctx->is_test isn't initialize, so it has garbage value. this can affects the result of expr__parse() return when it parses non-exist event literal according to garbage value.
Use calloc instead of malloc in expr_ctx_new() to fix this.
--- tools/perf/util/expr.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
tools/perf/util/expr.c +1 -4
@@ -292,7 +292,7 @@ struct expr_parse_ctx *expr__ctx_new(void) {struct expr_parse_ctx *ctx; - ctx =malloc (sizeof (struct expr_parse_ctx )); + ctx =calloc (1 ,sizeof (struct expr_parse_ctx ));if (!ctx)return NULL ;
@@ -301,9 +301,6 @@ struct expr_parse_ctx *expr__ctx_new(void)free (ctx);return NULL ; } - ctx->sctx.user_requested_cpu_list =NULL ; - ctx->sctx.runtime =0 ; - ctx->sctx.system_wide = false;return ctx; }
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 165/393 ktest.pl: Remove unused declarations in run_bisect_test function
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ba Jing <[email protected]>
[ Upstream commit 776735b954f49f85fd19e1198efa421fae2ad77c ]
Since $output and $ret are not used in the subsequent code, the declarations should be removed.
--- tools/testing/ktest/ktest.pl | 2 -- 1 file changed, 2 deletions(-)
tools/testing/ktest/ktest.pl +0 -2
@@ -2946,8 +2946,6 @@ sub run_bisect_test { my $failed = 0; my $result; - my $output; - my $ret; $in_bisect = 1;
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 166/393 bpf: bpf_local_storage: Always use bpf_mem_alloc in PREEMPT_RT
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Martin KaFai Lau <[email protected]>
[ Upstream commit 8eef6ac4d70eb1f0099fff93321d90ce8fa49ee1 ]
In PREEMPT_RT, kmalloc(GFP_ATOMIC) is still not safe in non preemptible context. bpf_mem_alloc must be used in PREEMPT_RT. This patch is to enforce bpf_mem_alloc in the bpf_local_storage when CONFIG_PREEMPT_RT is enabled.
[ 35.118559] BUG: sleeping function called from invalid context at kernel/locking/spinlock_rt.c:48
[ 35.118566] in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 1832, name: test_progs
[ 35.118569] preempt_count: 1, expected: 0
[ 35.118571] RCU nest depth: 1, expected: 1
[ 35.118577] INFO: lockdep is turned off.
...
[ 35.118647] __might_resched+0x433/0x5b0
[ 35.118677] rt_spin_lock+0xc3/0x290
[ 35.118700] ___slab_alloc+0x72/0xc40
[ 35.118723] __kmalloc_noprof+0x13f/0x4e0
[ 35.118732] bpf_map_kzalloc+0xe5/0x220
[ 35.118740] bpf_selem_alloc+0x1d2/0x7b0
[ 35.118755] bpf_local_storage_update+0x2fa/0x8b0
[ 35.118784] bpf_sk_storage_get_tracing+0x15a/0x1d0
[ 35.118791] bpf_prog_9a118d86fca78ebb_trace_inet_sock_set_state+0x44/0x66
[ 35.118795] bpf_trace_run3+0x222/0x400
[ 35.118820] __bpf_trace_inet_sock_set_state+0x11/0x20
[ 35.118824] trace_inet_sock_set_state+0x112/0x130
[ 35.118830] inet_sk_state_store+0x41/0x90
[ 35.118836] tcp_set_state+0x3b3/0x640There is no need to adjust the gfp_flags passing to the bpf_mem_cache_alloc_flags() which only honors the GFP_KERNEL. The verifier has ensured GFP_KERNEL is passed only in sleepable context.
It has been an old issue since the first introduction of the bpf_local_storage ~5 years ago, so this patch targets the bpf-next.
bpf_mem_alloc is needed to solve it, so the Fixes tag is set to the commit when bpf_mem_alloc was first used in the bpf_local_storage.
--- kernel/bpf/bpf_local_storage.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
kernel/bpf/bpf_local_storage.c +6 -2
@@ -823,8 +823,12 @@ bpf_local_storage_map_alloc(union bpf_attr *attr, smap->elem_size = offsetof(struct bpf_local_storage_elem , sdata.data[attr->value_size]); - smap->bpf_ma = bpf_ma; -if (bpf_ma) { +/* In PREEMPT_RT, kmalloc(GFP_ATOMIC) is still not safe in non +* preemptible context. Thus, enforce all storages to use +* bpf_mem_alloc when CONFIG_PREEMPT_RT is enabled. +*/ + smap->bpf_ma =IS_ENABLED (CONFIG_PREEMPT_RT ) ? true : bpf_ma; +if (smap->bpf_ma) { err =bpf_mem_alloc_init (&smap->selem_ma, smap->elem_size, false);if (err) goto free_smap;
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 167/393 crypto: hisilicon/sec2 - optimize the error return process
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chenghai Huang <[email protected]>
[ Upstream commit 1bed82257b1881b689ee41f14ecb4c20a273cac0 ]
Add the printf of an error message and optimized the handling process of ret.
Stable-dep-of: fd337f852b26 ("crypto: hisilicon/sec2 - fix for aead icv error")
--- drivers/crypto/hisilicon/sec2/sec_crypto.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
drivers/crypto/hisilicon/sec2/sec_crypto.c +5 -2
@@ -849,6 +849,7 @@ static int sec_skcipher_setkey(struct crypto_skcipher *tfm, const u8 *key, ret =sec_skcipher_aes_sm4_setkey (c_ctx, keylen, c_mode);break ;default : +dev_err (dev,"sec c_alg err!\n" );return -EINVAL ; }
@@ -1174,7 +1175,8 @@ static int sec_aead_setkey(struct crypto_aead *tfm, const u8 *key,return 0 ; } -if (crypto_authenc_extractkeys (&keys, key, keylen)) + ret =crypto_authenc_extractkeys (&keys, key, keylen); +if (ret) goto bad_key; ret =sec_aead_aes_set_key (c_ctx, &keys);
@@ -1191,6 +1193,7 @@ static int sec_aead_setkey(struct crypto_aead *tfm, const u8 *key,if ((ctx->a_ctx.mac_len &SEC_SQE_LEN_RATE_MASK ) || (ctx->a_ctx.a_key_len &SEC_SQE_LEN_RATE_MASK )) { + ret = -EINVAL ;dev_err (dev,"MAC or AUTH key length error!\n" ); goto bad_key; }
@@ -1199,7 +1202,7 @@ static int sec_aead_setkey(struct crypto_aead *tfm, const u8 *key, bad_key:memzero_explicit (&keys,sizeof (struct crypto_authenc_keys )); -return -EINVAL ; +return ret; }
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 168/393 crypto: hisilicon/sec2 - fix for aead icv error
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Wenkai Lin <[email protected]>
[ Upstream commit fd337f852b2677b53d0859a47b58e6e6bd189f30 ]
When the AEAD algorithm is used for encryption or decryption, the input authentication length varies, the hardware needs to obtain the input length to pass the integrity check verification. Currently, the driver uses a fixed authentication length,which causes decryption failure, so the length configuration is modified. In addition, the step of setting the auth length is unnecessary, so it was deleted from the setkey function.
--- drivers/crypto/hisilicon/sec2/sec.h | 1 - drivers/crypto/hisilicon/sec2/sec_crypto.c | 101 +++++++++------------ drivers/crypto/hisilicon/sec2/sec_crypto.h | 11 --- 3 files changed, 44 insertions(+), 69 deletions(-)
drivers/crypto/hisilicon/sec2/sec.h +0 -1
@@ -90,7 +90,6 @@ struct sec_auth_ctx {dma_addr_t a_key_dma;u8 *a_key;u8 a_key_len; -u8 mac_len;u8 a_alg;bool fallback;struct crypto_shash *hash_tfm;
drivers/crypto/hisilicon/sec2/sec_crypto.c +44 -57
233 lines not on this page · raw message
drivers/crypto/hisilicon/sec2/sec_crypto.h +0 -11
@@ -23,17 +23,6 @@ enum sec_hash_alg { SEC_A_HMAC_SHA512 = 0x15, }; -enum sec_mac_len { -SEC_HMAC_CCM_MAC =16 , -SEC_HMAC_GCM_MAC =16 , -SEC_SM3_MAC =32 , -SEC_HMAC_SM3_MAC =32 , -SEC_HMAC_MD5_MAC =16 , -SEC_HMAC_SHA1_MAC =20 , -SEC_HMAC_SHA256_MAC =32 , -SEC_HMAC_SHA512_MAC =64 , -}; -enum sec_cmode {SEC_CMODE_ECB =0x0 ,SEC_CMODE_CBC =0x1 ,
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 169/393 crypto: hisilicon/sec2 - fix for aead invalid authsize
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Wenkai Lin <[email protected]>
[ Upstream commit a5a9d959936499a3106a1bf3b9070875d0d3dec4 ]
When the digest alg is HMAC-SHAx or another, the authsize may be less than 4 bytes and mac_len of the BD is set to zero, the hardware considers it a BD configuration error and reports a ras error, so the sec driver needs to switch to software calculation in this case, this patch add a check for it and remove unnecessary check that has been done by crypto.
--- drivers/crypto/hisilicon/sec2/sec.h | 2 +- drivers/crypto/hisilicon/sec2/sec_crypto.c | 64 +++++++++++----------- 2 files changed, 34 insertions(+), 32 deletions(-)
drivers/crypto/hisilicon/sec2/sec.h +1 -1
@@ -37,6 +37,7 @@ struct sec_aead_req {u8 *a_ivin;dma_addr_t a_ivin_dma;struct aead_request *aead_req; +bool fallback; };/* SEC request of Crypto */
@@ -91,7 +92,6 @@ struct sec_auth_ctx {u8 *a_key;u8 a_key_len;u8 a_alg; -bool fallback;struct crypto_shash *hash_tfm;struct crypto_aead *fallback_aead_tfm; };
drivers/crypto/hisilicon/sec2/sec_crypto.c +33 -31
142 lines not on this page · raw message
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 170/393 crypto: ixp4xx - fix OF node reference leaks in init_ixp_crypto()
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Joe Hattori <[email protected]>
[ Upstream commit 472a989029aac2b78ef2f0b18b27c568bf76d104 ]
init_ixp_crypto() calls of_parse_phandle_with_fixed_args() multiple times, but does not release all the obtained refcounts. Fix it by adding of_node_put() calls.
This bug was found by an experimental static analysis tool that I am developing.
--- drivers/crypto/intel/ixp4xx/ixp4xx_crypto.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/crypto/intel/ixp4xx/ixp4xx_crypto.c +3 -0
@@ -471,6 +471,7 @@ static int init_ixp_crypto(struct device *dev)return -ENODEV ; } npe_id = npe_spec.args[0 ]; +of_node_put (npe_spec.np); ret =of_parse_phandle_with_fixed_args (np,"queue-rx" ,1 ,0 , &queue_spec);
@@ -479,6 +480,7 @@ static int init_ixp_crypto(struct device *dev)return -ENODEV ; } recv_qid = queue_spec.args[0 ]; +of_node_put (queue_spec.np); ret =of_parse_phandle_with_fixed_args (np,"queue-txready" ,1 ,0 , &queue_spec);
@@ -487,6 +489,7 @@ static int init_ixp_crypto(struct device *dev)return -ENODEV ; } send_qid = queue_spec.args[0 ]; +of_node_put (queue_spec.np); }else {/* * Hardcoded engine when using platform data, this goes away
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 171/393 ALSA: seq: remove redundant tristate for SND_SEQ_UMP_CLIENT
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Masahiro Yamada <[email protected]>
[ Upstream commit 8e8bc5000328a1ba8f93d43faf427e8ac31fb416 ]
'def_tristate' is a shorthand for 'default' + 'tristate'.
Another 'tristate' is redundant.
Stable-dep-of: 9001d5154435 ("ALSA: seq: Make dependency on UMP clearer")
--- sound/core/seq/Kconfig | 1 - 1 file changed, 1 deletion(-)
sound/core/seq/Kconfig +0 -1
@@ -71,7 +71,6 @@ config SND_SEQ_UMP among legacy and UMP clients. config SND_SEQ_UMP_CLIENT - tristate def_tristate SND_UMP endif # SND_SEQUENCER
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 172/393 ALSA: seq: Make dependency on UMP clearer
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Takashi Iwai <[email protected]>
[ Upstream commit 9001d515443518d72222ba4d58e247696b625071 ]
CONFIG_SND_SEQ_UMP_CLIENT is a Kconfig for a sequencer client corresponding to the UMP rawmidi, while we have another major knob CONFIG_SND_SEQ_UMP that specifies whether the sequencer core supports UMP packets or not. Strictly speaking both of them are independent, but practically seen, it makes no sense to enable CONFIG_SND_SEQ_UMP_CLIENT without UMP support itself.
This patch makes such an implicit dependency clearer. Now CONFIG_SND_SEQ_UMP_CLIENT depends on both CONFIG_SND_UMP and CONFIG_SND_SEQ_UMP. Meanwhile, CONFIG_SND_SEQ_UMP is enabled as default when CONFIG_SND_UMP is set.
--- sound/core/seq/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
sound/core/seq/Kconfig +2 -2
@@ -62,7 +62,7 @@ config SND_SEQ_VIRMIDI config SND_SEQ_UMP bool "Support for UMP events" - default y if SND_SEQ_UMP_CLIENT + default SND_UMP help Say Y here to enable the support for handling UMP (Universal MIDI Packet) events via ALSA sequencer infrastructure, which is an
@@ -71,6 +71,6 @@ config SND_SEQ_UMP among legacy and UMP clients. config SND_SEQ_UMP_CLIENT - def_tristate SND_UMP + def_tristate SND_UMP && SND_SEQ_UMP endif # SND_SEQUENCER
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 173/393 padata: fix sysfs store callback check
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Thomas Weißschuh <[email protected]>
[ Upstream commit 9ff6e943bce67d125781fe4780a5d6f072dc44c0 ]
padata_sysfs_store() was copied from padata_sysfs_show() but this check was not adapted. Today there is no attribute which can fail this check, but if there is one it may as well be correct.
--- kernel/padata.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/padata.c +1 -1
@@ -967,7 +967,7 @@ static ssize_t padata_sysfs_store(struct kobject *kobj, struct attribute *attr, pinst =kobj2pinst (kobj); pentry =attr2pentry (attr); -if (pentry->show) +if (pentry->store) ret = pentry->store (pinst, attr, buf, count);return ret;
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 174/393 perf top: Dont complain about lack of vmlinux when not resolving some kernel samples
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Arnaldo Carvalho de Melo <[email protected]>
[ Upstream commit 058b38ccd2af9e5c95590b018e8425fa148d7aca ]
Recently we got a case where a kernel sample wasn't being resolved due to a bug that was not setting the end address on kernel functions implemented in assembly (see Link: tag), and then those were not being found by machine__resolve() -> map__find_symbol().
So we ended up with:
# perf top --stdio PerfTop: 0 irqs/s kernel: 0% exact: 0% lost: 0/0 drop: 0/0 [cycles/P] -----------------------------------------------------------------------
Warning:
A vmlinux file was not found.
Kernel samples will not be resolved.
^Z
[1]+ Stopped perf top --stdio
#
But then resolving all other kernel symbols.
So just fixup the logic to only print that warning when there are no symbols in the kernel map.
--- tools/perf/builtin-top.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/builtin-top.c +1 -1
@@ -809,7 +809,7 @@ static void perf_event__process_sample(struct perf_tool *tool,* invalid --vmlinux ;-) */ if (!machine->kptr_restrict_warned && !top->vmlinux_warned && -__map__is_kernel (al.map) &&map__has_symbols (al.map)) { +__map__is_kernel (al.map) && !map__has_symbols (al.map)) {if (symbol_conf.vmlinux_name) {char serr[256 ];
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 175/393 perf machine: Dont ignore _etext when not a text symbol
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Christophe Leroy <[email protected]>
[ Upstream commit 7a93786c306296f15e728b1dbd949a319e4e3d19 ]
Depending on how vmlinux.lds is written, _etext might be the very first data symbol instead of the very last text symbol.
Don't require it to be a text symbol, accept any symbol type.
Comitter notes:
See the first Link for further discussion, but it all boils down to this:
---
# grep -e _stext -e _etext -e _edata /proc/kallsyms c0000000 T _stext c08b8000 D _etext
So there is no _edata and _etext is not text
$ ppc-linux-objdump -x vmlinux | grep -e _stext -e _etext -e _edata c0000000 g .head.text 00000000 _stext c08b8000 g .rodata 00000000 _etext c1378000 g .sbss 00000000 _edata ---
--- tools/perf/util/machine.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/util/machine.c +1 -1
@@ -1217,7 +1217,7 @@ static int machine__get_running_kernel_start(struct machine *machine, err =kallsyms__get_symbol_start (filename,"_edata" , &addr);if (err) - err =kallsyms__get_function_start (filename,"_etext" , &addr); + err =kallsyms__get_symbol_start (filename,"_etext" , &addr);if (!err) *end = addr;
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 176/393 perf namespaces: Introduce nsinfo__set_in_pidns()
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Arnaldo Carvalho de Melo <[email protected]>
[ Upstream commit 9c6a585d257f6845731f4e36b45fe42b5c3162f5 ]
When we're processing a perf.data file we will, for every thread in that file do a machine__findnew_thread(machine, pid, tid) that when that pid is seen for the first time will create a 'struct thread' representing it.
That in turn will call nsinfo__new() -> nsinfo__init() and there it will assume we're running live, which is wrong and will need to be addressed in a followup patch.
The nsinfo__new() assumes that if we can't access that thread it has already finished and will ignore the -1 return from nsinfo__init(), just taking notes to avoid trying to enter in that namespace, since it isn't there anymore, a race.
When doing this from 'perf inject', tho, we can fill in parts of that nsinfo from what we get from the PERF_RECORD_MMAP2 (pid, tid) and in the jitdump file name, that has the form of jit-<PID>.dump.
So if the pid in the jitdump file name is not the one in the PERF_RECORD_MMAP2, we can assume that its the pid of the process _inside_ the namespace, and that perf was runing outside that namespace.
This will be done in the following patch.
Stable-dep-of: 64a7617efd5a ("perf namespaces: Fixup the nsinfo__in_pidns() return type, its bool")
--- tools/perf/util/namespaces.c | 5 +++++ tools/perf/util/namespaces.h | 1 + 2 files changed, 6 insertions(+)
tools/perf/util/namespaces.c +5 -0
@@ -271,6 +271,11 @@ pid_t nsinfo__in_pidns(const struct nsinfo *nsi)return RC_CHK_ACCESS (nsi)->in_pidns; } +void nsinfo__set_in_pidns (struct nsinfo *nsi) +{ +RC_CHK_ACCESS (nsi)->in_pidns = true; +} +void nsinfo__mountns_enter (struct nsinfo *nsi,struct nscookie *nc) {
tools/perf/util/namespaces.h +1 -0
@@ -59,6 +59,7 @@ pid_t nsinfo__tgid(const struct nsinfo *nsi);pid_t nsinfo__nstgid (const struct nsinfo *nsi);pid_t nsinfo__pid (const struct nsinfo *nsi);pid_t nsinfo__in_pidns (const struct nsinfo *nsi); +void nsinfo__set_in_pidns (struct nsinfo *nsi);void nsinfo__mountns_enter (struct nsinfo *nsi,struct nscookie *nc);void nsinfo__mountns_exit (struct nscookie *nc);
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 177/393 perf namespaces: Fixup the nsinfo__in_pidns() return type, its bool
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Arnaldo Carvalho de Melo <[email protected]>
[ Upstream commit 64a7617efd5ae1d57a75e464d7134eec947c3fe3 ]
When adding support for refconunt checking a cut'n'paste made this function, that is just an accessor to a bool member of 'struct nsinfo', return a pid_t, when that member is a boolean, fix it.
--- tools/perf/util/namespaces.c | 2 +- tools/perf/util/namespaces.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
tools/perf/util/namespaces.c +1 -1
@@ -266,7 +266,7 @@ pid_t nsinfo__pid(const struct nsinfo *nsi)return RC_CHK_ACCESS (nsi)->pid; } -pid_t nsinfo__in_pidns (const struct nsinfo *nsi) +bool nsinfo__in_pidns (const struct nsinfo *nsi) {return RC_CHK_ACCESS (nsi)->in_pidns; }
tools/perf/util/namespaces.h +1 -1
@@ -58,7 +58,7 @@ void nsinfo__clear_need_setns(struct nsinfo *nsi);pid_t nsinfo__tgid (const struct nsinfo *nsi);pid_t nsinfo__nstgid (const struct nsinfo *nsi);pid_t nsinfo__pid (const struct nsinfo *nsi); -pid_t nsinfo__in_pidns (const struct nsinfo *nsi); +bool nsinfo__in_pidns (const struct nsinfo *nsi);void nsinfo__set_in_pidns (struct nsinfo *nsi);void nsinfo__mountns_enter (struct nsinfo *nsi,struct nscookie *nc);
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 178/393 ASoC: Intel: avs: Prefix SKL/APL-specific members
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Cezary Rojewski <[email protected]>
[ Upstream commit a8f858d98f016a0209edaf1518fd45a5e5c62d47 ]
Prefix members that are platform-specific with 'avs_' to improve code cohesiveness and reduce the chance for naming-conflics with other drivers.
Stable-dep-of: bca0fa5f6b5e ("ASoC: Intel: avs: Do not readq() u32 registers")
--- sound/soc/intel/avs/apl.c | 51 +++++++++++++++++----------------- sound/soc/intel/avs/avs.h | 18 ++++++------ sound/soc/intel/avs/core.c | 4 +-- sound/soc/intel/avs/messages.h | 10 +++---- sound/soc/intel/avs/skl.c | 30 ++++++++++---------- 5 files changed, 56 insertions(+), 57 deletions(-)
sound/soc/intel/avs/apl.c +26 -25
@@ -14,10 +14,10 @@#include "topology.h" static int __maybe_unused -apl_enable_logs (struct avs_dev *adev,enum avs_log_enable enable,u32 aging_period, -u32 fifo_full_period,unsigned long resource_mask,u32 *priorities) +avs_apl_enable_logs (struct avs_dev *adev,enum avs_log_enable enable,u32 aging_period, +u32 fifo_full_period,unsigned long resource_mask,u32 *priorities) { -struct apl_log_state_info *info; +struct avs_apl_log_state_info *info;u32 size, num_cores = adev->hw_cfg.dsp_cores;int ret, i;
@@ -48,9 +48,9 @@ apl_enable_logs(struct avs_dev *adev, enum avs_log_enable enable, u32 aging_perireturn 0 ; } -static int apl_log_buffer_status (struct avs_dev *adev,union avs_notify_msg *msg) +static int avs_apl_log_buffer_status (struct avs_dev *adev,union avs_notify_msg *msg) { -struct apl_log_buffer_layout layout; +struct avs_apl_log_buffer_layout layout;void __iomem *addr, *buf; addr =avs_log_buffer_addr (adev, msg->log.core);
@@ -63,11 +63,11 @@ static int apl_log_buffer_status(struct avs_dev *adev, union avs_notify_msg *msg/* consume the logs regardless of consumer presence */ goto update_read_ptr; - buf =apl_log_payload_addr (addr); + buf =avs_apl_log_payload_addr (addr);if (layout.read_ptr > layout.write_ptr) {avs_dump_fw_log (adev, buf + layout.read_ptr, -apl_log_payload_size (adev) - layout.read_ptr); +avs_apl_log_payload_size (adev) - layout.read_ptr); layout.read_ptr =0 ; }avs_dump_fw_log_wakeup (adev, buf + layout.read_ptr, layout.write_ptr - layout.read_ptr);
@@ -77,7 +77,8 @@ static int apl_log_buffer_status(struct avs_dev *adev, union avs_notify_msg *msgreturn 0 ; } -static int apl_wait_log_entry (struct avs_dev *adev,u32 core,struct apl_log_buffer_layout *layout) +static int avs_apl_wait_log_entry (struct avs_dev *adev,u32 core, +struct avs_apl_log_buffer_layout *layout) {unsigned long timeout;void __iomem *addr;
@@ -99,11 +100,11 @@ static int apl_wait_log_entry(struct avs_dev *adev, u32 core, struct apl_log_buf }/* reads log header and tests its type */ -#define apl_is_entry_stackdump (addr) ((readl(addr) >> 30) & 0x1) +#define avs_apl_is_entry_stackdump (addr) ((readl(addr) >> 30) & 0x1) -static int apl_coredump (struct avs_dev *adev,union avs_notify_msg *msg) +static int avs_apl_coredump (struct avs_dev *adev,union avs_notify_msg *msg) { -struct apl_log_buffer_layout layout; +struct avs_apl_log_buffer_layout layout;void __iomem *addr, *buf;size_t dump_size;u16 offset =0 ;
@@ -124,9 +125,9 @@ static int apl_coredump(struct avs_dev *adev, union avs_notify_msg *msg)if (!addr) goto exit; - buf =apl_log_payload_addr (addr); + buf =avs_apl_log_payload_addr (addr);memcpy_fromio (&layout, addr,sizeof (layout)); -if (!apl_is_entry_stackdump (buf + layout.read_ptr)) { +if (!avs_apl_is_entry_stackdump (buf + layout.read_ptr)) {union avs_notify_msg lbs_msg =AVS_NOTIFICATION (LOG_BUFFER_STATUS );/*
@@ -142,11 +143,11 @@ static int apl_coredump(struct avs_dev *adev, union avs_notify_msg *msg) do { u32 count; - if (apl_wait_log_entry(adev, msg->ext.coredump.core_id, &layout)) + if (avs_apl_wait_log_entry(adev, msg->ext.coredump.core_id, &layout)) break; if (layout.read_ptr > layout.write_ptr) { - count = apl_log_payload_size(adev) - layout.read_ptr; + count = avs_apl_log_payload_size(adev) - layout.read_ptr; memcpy_fromio(pos + offset, buf + layout.read_ptr, count); layout.read_ptr = 0; offset += count;
@@ -165,7 +166,7 @@ static int apl_coredump(struct avs_dev *adev, union avs_notify_msg *msg)return 0 ; } -static bool apl_lp_streaming (struct avs_dev *adev) +static bool avs_apl_lp_streaming (struct avs_dev *adev) {struct avs_path *path;
@@ -201,7 +202,7 @@ static bool apl_lp_streaming(struct avs_dev *adev)return true; } -static bool apl_d0ix_toggle (struct avs_dev *adev,struct avs_ipc_msg *tx,bool wake) +static bool avs_apl_d0ix_toggle (struct avs_dev *adev,struct avs_ipc_msg *tx,bool wake) {/* wake in all cases */ if (wake)
@@ -215,10 +216,10 @@ static bool apl_d0ix_toggle(struct avs_dev *adev, struct avs_ipc_msg *tx, bool w* Note: for cAVS 1.5+ and 1.8, D0IX is LP-firmware transition, * not the power-gating mechanism known from cAVS 2.0. */ -return apl_lp_streaming (adev); +return avs_apl_lp_streaming (adev); } -static int apl_set_d0ix (struct avs_dev *adev,bool enable) +static int avs_apl_set_d0ix (struct avs_dev *adev,bool enable) {bool streaming = false;int ret;
@@ -231,7 +232,7 @@ static int apl_set_d0ix(struct avs_dev *adev, bool enable)return AVS_IPC_RET (ret); } -const struct avs_dsp_ops apl_dsp_ops = { +const struct avs_dsp_ops avs_apl_dsp_ops = { .power = avs_dsp_core_power, .reset = avs_dsp_core_reset, .stall = avs_dsp_core_stall,
@@ -241,10 +242,10 @@ const struct avs_dsp_ops apl_dsp_ops = { .load_basefw = avs_hda_load_basefw, .load_lib = avs_hda_load_library, .transfer_mods = avs_hda_transfer_modules, - .log_buffer_offset = skl_log_buffer_offset, - .log_buffer_status = apl_log_buffer_status, - .coredump = apl_coredump, - .d0ix_toggle = apl_d0ix_toggle, - .set_d0ix = apl_set_d0ix, + .log_buffer_offset = avs_skl_log_buffer_offset, + .log_buffer_status = avs_apl_log_buffer_status, + .coredump = avs_apl_coredump, + .d0ix_toggle = avs_apl_d0ix_toggle, + .set_d0ix = avs_apl_set_d0ix, AVS_SET_ENABLE_LOGS_OP(apl) };
sound/soc/intel/avs/avs.h +9 -9
@@ -64,8 +64,8 @@ struct avs_dsp_ops {#define avs_dsp_op (adev, op, ...) \ ((adev)->spec->dsp_ops->op(adev, ## __VA_ARGS__)) -extern const struct avs_dsp_ops skl_dsp_ops; -extern const struct avs_dsp_ops apl_dsp_ops; +extern const struct avs_dsp_ops avs_skl_dsp_ops; +extern const struct avs_dsp_ops avs_apl_dsp_ops;#define AVS_PLATATTR_CLDMA BIT_ULL(0)#define AVS_PLATATTR_IMR BIT_ULL(1)
@@ -264,7 +264,7 @@ void avs_ipc_block(struct avs_ipc *ipc);int avs_dsp_disable_d0ix (struct avs_dev *adev);int avs_dsp_enable_d0ix (struct avs_dev *adev); -int skl_log_buffer_offset (struct avs_dev *adev,u32 core); +int avs_skl_log_buffer_offset (struct avs_dev *adev,u32 core);/* Firmware resources management */
@@ -358,21 +358,21 @@ static inline int avs_log_buffer_status_locked(struct avs_dev *adev, union avs_nreturn ret; } -struct apl_log_buffer_layout { +struct avs_apl_log_buffer_layout {u32 read_ptr;u32 write_ptr;u8 buffer[]; } __packed; -#define apl_log_payload_size (adev) \ - (avs_log_buffer_size(adev) - sizeof(struct apl_log_buffer_layout)) +#define avs_apl_log_payload_size (adev) \ + (avs_log_buffer_size(adev) - sizeof(struct avs_apl_log_buffer_layout)) -#define apl_log_payload_addr (addr) \ - (addr + sizeof(struct apl_log_buffer_layout)) +#define avs_apl_log_payload_addr (addr) \ + (addr + sizeof(struct avs_apl_log_buffer_layout))#ifdef CONFIG_DEBUG_FS #define AVS_SET_ENABLE_LOGS_OP (name) \ - .enable_logs = name##_enable_logs + .enable_logs = avs_##name##_enable_logsbool avs_logging_fw (struct avs_dev *adev);void avs_dump_fw_log (struct avs_dev *adev,const void __iomem *src,unsigned int len);
sound/soc/intel/avs/core.c +2 -2
@@ -720,7 +720,7 @@ static const struct avs_spec skl_desc = { .hotfix = 0, .build = 4732, }, - .dsp_ops = &skl_dsp_ops, + .dsp_ops = &avs_skl_dsp_ops, .core_init_mask = 1, .attributes = AVS_PLATATTR_CLDMA, .sram_base_offset = SKL_ADSP_SRAM_BASE_OFFSET,
@@ -736,7 +736,7 @@ static const struct avs_spec apl_desc = { .hotfix = 1, .build = 4323, }, - .dsp_ops = &apl_dsp_ops, + .dsp_ops = &avs_apl_dsp_ops, .core_init_mask = 3, .attributes = AVS_PLATATTR_IMR, .sram_base_offset = APL_ADSP_SRAM_BASE_OFFSET,
sound/soc/intel/avs/messages.h +5 -5
@@ -357,21 +357,21 @@ enum avs_skl_log_priority { AVS_SKL_LOG_VERBOSE, }; -struct skl_log_state { +struct avs_skl_log_state {u32 enable;u32 min_priority; } __packed; -struct skl_log_state_info { +struct avs_skl_log_state_info {u32 core_mask; -struct skl_log_state logs_core[]; +struct avs_skl_log_state logs_core[]; } __packed; -struct apl_log_state_info { +struct avs_apl_log_state_info {u32 aging_timer_period;u32 fifo_full_timer_period;u32 core_mask; -struct skl_log_state logs_core[]; +struct avs_skl_log_state logs_core[]; } __packed;int avs_ipc_set_enable_logs (struct avs_dev *adev,u8 *log_info,size_t size);
sound/soc/intel/avs/skl.c +14 -16
@@ -13,10 +13,10 @@#include "messages.h" static int __maybe_unused -skl_enable_logs (struct avs_dev *adev,enum avs_log_enable enable,u32 aging_period, -u32 fifo_full_period,unsigned long resource_mask,u32 *priorities) +avs_skl_enable_logs (struct avs_dev *adev,enum avs_log_enable enable,u32 aging_period, +u32 fifo_full_period,unsigned long resource_mask,u32 *priorities) { -struct skl_log_state_info *info; +struct avs_skl_log_state_info *info;u32 size, num_cores = adev->hw_cfg.dsp_cores;int ret, i;
@@ -45,7 +45,7 @@ skl_enable_logs(struct avs_dev *adev, enum avs_log_enable enable, u32 aging_perireturn 0 ; } -int skl_log_buffer_offset (struct avs_dev *adev,u32 core) +int avs_skl_log_buffer_offset (struct avs_dev *adev,u32 core) {return core *avs_log_buffer_size (adev); }
@@ -53,8 +53,7 @@ int skl_log_buffer_offset(struct avs_dev *adev, u32 core)/* fw DbgLogWp registers */ #define FW_REGS_DBG_LOG_WP (core) (0x30 + 0x4 * core) -static int -skl_log_buffer_status (struct avs_dev *adev,union avs_notify_msg *msg) +static int avs_skl_log_buffer_status (struct avs_dev *adev,union avs_notify_msg *msg) {void __iomem *buf;u16 size, write, offset;
@@ -74,7 +73,7 @@ skl_log_buffer_status(struct avs_dev *adev, union avs_notify_msg *msg)return 0 ; } -static int skl_coredump (struct avs_dev *adev,union avs_notify_msg *msg) +static int avs_skl_coredump (struct avs_dev *adev,union avs_notify_msg *msg) {u8 *dump;
@@ -88,20 +87,19 @@ static int skl_coredump(struct avs_dev *adev, union avs_notify_msg *msg)return 0 ; } -static bool -skl_d0ix_toggle (struct avs_dev *adev,struct avs_ipc_msg *tx,bool wake) +static bool avs_skl_d0ix_toggle (struct avs_dev *adev,struct avs_ipc_msg *tx,bool wake) {/* unsupported on cAVS 1.5 hw */ return false; } -static int skl_set_d0ix (struct avs_dev *adev,bool enable) +static int avs_skl_set_d0ix (struct avs_dev *adev,bool enable) {/* unsupported on cAVS 1.5 hw */ return 0 ; } -const struct avs_dsp_ops skl_dsp_ops = { +const struct avs_dsp_ops avs_skl_dsp_ops = { .power = avs_dsp_core_power, .reset = avs_dsp_core_reset, .stall = avs_dsp_core_stall,
@@ -111,10 +109,10 @@ const struct avs_dsp_ops skl_dsp_ops = { .load_basefw = avs_cldma_load_basefw, .load_lib = avs_cldma_load_library, .transfer_mods = avs_cldma_transfer_modules, - .log_buffer_offset = skl_log_buffer_offset, - .log_buffer_status = skl_log_buffer_status, - .coredump = skl_coredump, - .d0ix_toggle = skl_d0ix_toggle, - .set_d0ix = skl_set_d0ix, + .log_buffer_offset = avs_skl_log_buffer_offset, + .log_buffer_status = avs_skl_log_buffer_status, + .coredump = avs_skl_coredump, + .d0ix_toggle = avs_skl_d0ix_toggle, + .set_d0ix = avs_skl_set_d0ix, AVS_SET_ENABLE_LOGS_OP(skl) };
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 179/393 ASoC: Intel: avs: Abstract IPC handling
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Cezary Rojewski <[email protected]>
[ Upstream commit 7576e2f4d99df6efabb77f52b9539fd345233aee ]
Servicing IPCs on CNL platforms and onward differs from the existing one. To make room for these, enrich platform descriptor with fields representing crucial IPC registers and utilize them throughout the code.
While cleaning up device descriptors, reduce the number of code lines by assigning 'min_fw_version' within a single line.
Stable-dep-of: bca0fa5f6b5e ("ASoC: Intel: avs: Do not readq() u32 registers")
--- sound/soc/intel/avs/avs.h | 22 ++++++++++++--- sound/soc/intel/avs/core.c | 47 ++++++++++++++++++++------------- sound/soc/intel/avs/ipc.c | 36 ++++++++++++++----------- sound/soc/intel/avs/loader.c | 2 +- sound/soc/intel/avs/registers.h | 6 ++--- 5 files changed, 72 insertions(+), 41 deletions(-)
sound/soc/intel/avs/avs.h +19 -3
@@ -73,6 +73,23 @@ extern const struct avs_dsp_ops avs_apl_dsp_ops;#define avs_platattr_test (adev, attr) \ ((adev)->spec->attributes & AVS_PLATATTR_##attr) +struct avs_sram_spec { +const u32 base_offset; +const u32 window_size; +const u32 rom_status_offset; +}; + +struct avs_hipc_spec { +const u32 req_offset; +const u32 req_ext_offset; +const u32 req_busy_mask; +const u32 ack_offset; +const u32 ack_done_mask; +const u32 rsp_offset; +const u32 rsp_busy_mask; +const u32 ctl_offset; +}; +/* Platform specific descriptor */ struct avs_spec {const char *name;
@@ -82,9 +99,8 @@ struct avs_spec {const u32 core_init_mask;/* used during DSP boot */ const u64 attributes;/* bitmask of AVS_PLATATTR_* */ -const u32 sram_base_offset; -const u32 sram_window_size; -const u32 rom_status; +const struct avs_sram_spec *sram; +const struct avs_hipc_spec *hipc; };struct avs_fw_entry {
sound/soc/intel/avs/core.c +29 -18
65 lines not on this page · raw message
sound/soc/intel/avs/ipc.c +20 -16
@@ -305,6 +305,7 @@ irqreturn_t avs_dsp_irq_handler(int irq, void *dev_id) {struct avs_dev *adev = dev_id;struct avs_ipc *ipc = adev->ipc; +const struct avs_spec *const spec = adev->spec;u32 adspis, hipc_rsp, hipc_ack;irqreturn_t ret =IRQ_NONE ;
@@ -312,35 +313,35 @@ irqreturn_t avs_dsp_irq_handler(int irq, void *dev_id)if (adspis ==UINT_MAX || !(adspis &AVS_ADSP_ADSPIS_IPC ))return ret; - hipc_ack =snd_hdac_adsp_readl (adev,SKL_ADSP_REG_HIPCIE ); - hipc_rsp =snd_hdac_adsp_readl (adev,SKL_ADSP_REG_HIPCT ); + hipc_ack =snd_hdac_adsp_readl (adev, spec->hipc->ack_offset); + hipc_rsp =snd_hdac_adsp_readl (adev, spec->hipc->rsp_offset);/* DSP acked host's request */ -if (hipc_ack &SKL_ADSP_HIPCIE_DONE ) { +if (hipc_ack & spec->hipc->ack_done_mask) {/* * As an extra precaution, mask done interrupt. Code executed * due to complete() found below does not assume any masking. */ -snd_hdac_adsp_updatel (adev,SKL_ADSP_REG_HIPCCTL , +snd_hdac_adsp_updatel (adev, spec->hipc->ctl_offset,AVS_ADSP_HIPCCTL_DONE ,0 );complete (&ipc->done_completion);/* tell DSP it has our attention */ -snd_hdac_adsp_updatel (adev,SKL_ADSP_REG_HIPCIE , -SKL_ADSP_HIPCIE_DONE , -SKL_ADSP_HIPCIE_DONE ); +snd_hdac_adsp_updatel (adev, spec->hipc->ack_offset, + spec->hipc->ack_done_mask, + spec->hipc->ack_done_mask);/* unmask done interrupt */ -snd_hdac_adsp_updatel (adev,SKL_ADSP_REG_HIPCCTL , +snd_hdac_adsp_updatel (adev, spec->hipc->ctl_offset,AVS_ADSP_HIPCCTL_DONE ,AVS_ADSP_HIPCCTL_DONE ); ret =IRQ_HANDLED ; }/* DSP sent new response to process */ -if (hipc_rsp &SKL_ADSP_HIPCT_BUSY ) { +if (hipc_rsp & spec->hipc->rsp_busy_mask) {/* mask busy interrupt */ -snd_hdac_adsp_updatel (adev,SKL_ADSP_REG_HIPCCTL , +snd_hdac_adsp_updatel (adev, spec->hipc->ctl_offset,AVS_ADSP_HIPCCTL_BUSY ,0 ); ret =IRQ_WAKE_THREAD ;
@@ -379,10 +380,11 @@ irqreturn_t avs_dsp_irq_thread(int irq, void *dev_id)static bool avs_ipc_is_busy (struct avs_ipc *ipc) {struct avs_dev *adev =to_avs_dev (ipc->dev); +const struct avs_spec *const spec = adev->spec;u32 hipc_rsp; - hipc_rsp =snd_hdac_adsp_readl (adev,SKL_ADSP_REG_HIPCT ); -return hipc_rsp &SKL_ADSP_HIPCT_BUSY ; + hipc_rsp =snd_hdac_adsp_readl (adev, spec->hipc->rsp_offset); +return hipc_rsp & spec->hipc->rsp_busy_mask; }static int avs_ipc_wait_busy_completion (struct avs_ipc *ipc,int timeout)
@@ -440,9 +442,10 @@ static void avs_ipc_msg_init(struct avs_ipc *ipc, struct avs_ipc_msg *reply)static void avs_dsp_send_tx (struct avs_dev *adev,struct avs_ipc_msg *tx,bool read_fwregs) { +const struct avs_spec *const spec = adev->spec;u64 reg =ULONG_MAX ; - tx->header |=SKL_ADSP_HIPCI_BUSY ; + tx->header |= spec->hipc->req_busy_mask;if (read_fwregs) reg =readq (avs_sram_addr (adev,AVS_FW_REGS_WINDOW ));
@@ -450,8 +453,8 @@ static void avs_dsp_send_tx(struct avs_dev *adev, struct avs_ipc_msg *tx, bool rif (tx->size)memcpy_toio (avs_downlink_addr (adev), tx->data, tx->size); -snd_hdac_adsp_writel (adev,SKL_ADSP_REG_HIPCIE , tx->header >>32 ); -snd_hdac_adsp_writel (adev,SKL_ADSP_REG_HIPCI , tx->header &UINT_MAX ); +snd_hdac_adsp_writel (adev, spec->hipc->req_ext_offset, tx->header >>32 ); +snd_hdac_adsp_writel (adev, spec->hipc->req_offset, tx->header &UINT_MAX ); } static int avs_dsp_do_send_msg(struct avs_dev *adev, struct avs_ipc_msg *request,
@@ -586,6 +589,7 @@ int avs_dsp_send_rom_msg(struct avs_dev *adev, struct avs_ipc_msg *request)void avs_dsp_interrupt_control (struct avs_dev *adev,bool enable) { +const struct avs_spec *const spec = adev->spec;u32 value, mask;/*
@@ -597,7 +601,7 @@ void avs_dsp_interrupt_control(struct avs_dev *adev, bool enable) mask =AVS_ADSP_HIPCCTL_DONE |AVS_ADSP_HIPCCTL_BUSY ; value = enable ? mask :0 ; -snd_hdac_adsp_updatel (adev,SKL_ADSP_REG_HIPCCTL , mask, value); +snd_hdac_adsp_updatel (adev, spec->hipc->ctl_offset, mask, value); }int avs_ipc_init (struct avs_ipc *ipc,struct device *dev)
sound/soc/intel/avs/loader.c +1 -1
@@ -306,7 +306,7 @@ avs_hda_init_rom(struct avs_dev *adev, unsigned int dma_id, bool purge) }/* await ROM init */ - ret =snd_hdac_adsp_readq_poll (adev, spec->rom_status, reg, + ret =snd_hdac_adsp_readq_poll (adev, spec->sram->rom_status_offset, reg, (reg &0xF ) ==AVS_ROM_INIT_DONE || (reg &0xF ) ==APL_ROM_FW_ENTERED ,AVS_ROM_INIT_POLLING_US ,APL_ROM_INIT_TIMEOUT_US );
sound/soc/intel/avs/registers.h +3 -3
@@ -55,7 +55,7 @@#define APL_ADSP_SRAM_WINDOW_SIZE 0x20000/* Constants used when accessing SRAM, space shared with firmware */ -#define AVS_FW_REG_BASE (adev) ((adev)->spec->sram_base_offset) +#define AVS_FW_REG_BASE (adev) ((adev)->spec->sram->base_offset)#define AVS_FW_REG_STATUS (adev) (AVS_FW_REG_BASE(adev) + 0x0)#define AVS_FW_REG_ERROR_CODE (adev) (AVS_FW_REG_BASE(adev) + 0x4)
@@ -70,8 +70,8 @@/* registry I/O helpers */ #define avs_sram_offset (adev, window_idx) \ - ((adev)->spec->sram_base_offset + \ - (adev)->spec->sram_window_size * (window_idx)) + ((adev)->spec->sram->base_offset + \ + (adev)->spec->sram->window_size * (window_idx))#define avs_sram_addr (adev, window_idx) \ ((adev)->dsp_ba + avs_sram_offset(adev, window_idx))
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 180/393 ASoC: Intel: avs: Do not readq() u32 registers
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Cezary Rojewski <[email protected]>
[ Upstream commit bca0fa5f6b5e96c03daac1ed62b1e5c5057a2048 ]
Register reporting ROM status is 4-bytes wide.
--- sound/soc/intel/avs/loader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/intel/avs/loader.c +1 -1
@@ -306,7 +306,7 @@ avs_hda_init_rom(struct avs_dev *adev, unsigned int dma_id, bool purge) }/* await ROM init */ - ret =snd_hdac_adsp_readq_poll (adev, spec->sram->rom_status_offset, reg, + ret =snd_hdac_adsp_readl_poll (adev, spec->sram->rom_status_offset, reg, (reg &0xF ) ==AVS_ROM_INIT_DONE || (reg &0xF ) ==APL_ROM_FW_ENTERED ,AVS_ROM_INIT_POLLING_US ,APL_ROM_INIT_TIMEOUT_US );
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 181/393 ASoC: Intel: avs: Fix theoretical infinite loop
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Cezary Rojewski <[email protected]>
[ Upstream commit cf4d74256fe103ece7b2647550e6c063048e5682 ]
While 'stack_dump_size' is a u32 bitfield of 16 bits, u32 has a bigger upper bound than the type u16 of loop counter 'offset' what in theory may lead to infinite loop condition.
Found out by Coverity static analyzer.
--- sound/soc/intel/avs/apl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
sound/soc/intel/avs/apl.c +1 -1
@@ -107,7 +107,7 @@ static int avs_apl_coredump(struct avs_dev *adev, union avs_notify_msg *msg)struct avs_apl_log_buffer_layout layout;void __iomem *addr, *buf;size_t dump_size; -u16 offset =0 ; +u32 offset =0 ;u8 *dump, *pos; dump_size =AVS_FW_REGS_SIZE + msg->ext.coredump.stack_dump_size;
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 182/393 perf report: Fix misleading help message about --demangle
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jiachen Zhang <[email protected]>
[ Upstream commit ac0ac75189a4d6a29a2765a7adbb62bc6cc650c7 ]
The wrong help message may mislead users. This commit fixes it.
--- tools/perf/builtin-report.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/builtin-report.c +1 -1
@@ -1352,7 +1352,7 @@ int cmd_report(int argc, const char **argv)OPT_STRING (0 ,"addr2line" , &addr2line_path,"path" ,"addr2line binary to use for line numbers" ),OPT_BOOLEAN (0 ,"demangle" , &symbol_conf.demangle, -"Disable symbol demangling" ), +"Symbol demangling. Enabled by default, use --no-demangle to disable." ),OPT_BOOLEAN (0 ,"demangle-kernel" , &symbol_conf.demangle_kernel,"Enable kernel symbol demangling" ), OPT_BOOLEAN(0, "mem-mode", &report.mem_mode, "mem access profile"),
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 183/393 pinctrl: stm32: Add check for clk_enable()
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mingwei Zheng <[email protected]>
[ Upstream commit 451bc9aea9a1a6fe53969e81a5cb1bd785c0d989 ]
Convert the driver to clk_bulk*() API.
Add check for the return value of clk_bulk_enable() to catch the potential error.
--- drivers/pinctrl/stm32/pinctrl-stm32.c | 76 +++++++++++++-------------- 1 file changed, 38 insertions(+), 38 deletions(-)
drivers/pinctrl/stm32/pinctrl-stm32.c +38 -38
@@ -86,7 +86,6 @@ struct stm32_pinctrl_group {struct stm32_gpio_bank {void __iomem *base; -struct clk *clk;struct reset_control *rstc;spinlock_t lock;struct gpio_chip gpio_chip;
@@ -108,6 +107,7 @@ struct stm32_pinctrl {unsigned ngroups;const char **grp_names;struct stm32_gpio_bank *banks; +struct clk_bulk_data *clks;unsigned nbanks;const struct stm32_pinctrl_match_data *match_data;struct irq_domain *domain;
@@ -1321,12 +1321,6 @@ static int stm32_gpiolib_register_bank(struct stm32_pinctrl *pctl, struct fwnodeif (IS_ERR (bank->base))return PTR_ERR (bank->base); - err =clk_prepare_enable (bank->clk); -if (err) { -dev_err (dev,"failed to prepare_enable clk (%d)\n" , err); -return err; - } - bank->gpio_chip = stm32_gpio_template;fwnode_property_read_string (fwnode,"st,bank-name" , &bank->gpio_chip.label);
@@ -1373,26 +1367,20 @@ static int stm32_gpiolib_register_bank(struct stm32_pinctrl *pctl, struct fwnode bank->fwnode, &stm32_gpio_domain_ops, bank); -if (!bank->domain) { - err = -ENODEV ; - goto err_clk; - } +if (!bank->domain) +return -ENODEV ; } names =devm_kcalloc (dev, npins,sizeof (char *),GFP_KERNEL ); -if (!names) { - err = -ENOMEM ; - goto err_clk; - } +if (!names) +return -ENOMEM ;for (i =0 ; i < npins; i++) { stm32_pin =stm32_pctrl_get_desc_pin_from_gpio (pctl, bank, i);if (stm32_pin && stm32_pin->pin.name) { names[i] =devm_kasprintf (dev,GFP_KERNEL ,"%s" , stm32_pin->pin.name); -if (!names[i]) { - err = -ENOMEM ; - goto err_clk; - } +if (!names[i]) +return -ENOMEM ; }else { names[i] =NULL ; }
@@ -1403,15 +1391,11 @@ static int stm32_gpiolib_register_bank(struct stm32_pinctrl *pctl, struct fwnode err =gpiochip_add_data (&bank->gpio_chip, bank);if (err) {dev_err (dev,"Failed to add gpiochip(%d)!\n" , bank_nr); - goto err_clk; +return err; }dev_info (dev,"%s bank added\n" , bank->gpio_chip.label);return 0 ; - -err_clk: -clk_disable_unprepare (bank->clk); -return err; }static struct irq_domain *stm32_pctrl_get_irq_domain (struct platform_device *pdev)
@@ -1634,6 +1618,11 @@ int stm32_pctl_probe(struct platform_device *pdev)if (!pctl->banks)return -ENOMEM ; + pctl->clks =devm_kcalloc (dev, banks,sizeof (*pctl->clks), +GFP_KERNEL ); +if (!pctl->clks) +return -ENOMEM ; + i =0 ;for_each_gpiochip_node (dev, child) {struct stm32_gpio_bank *bank = &pctl->banks[i];
@@ -1645,24 +1634,27 @@ int stm32_pctl_probe(struct platform_device *pdev)return -EPROBE_DEFER ; } - bank->clk =of_clk_get_by_name (np,NULL ); -if (IS_ERR (bank->clk)) { + pctl->clks[i].clk =of_clk_get_by_name (np,NULL ); +if (IS_ERR (pctl->clks[i].clk)) {fwnode_handle_put (child); -return dev_err_probe (dev,PTR_ERR (bank->clk), +return dev_err_probe (dev,PTR_ERR (pctl->clks[i].clk),"failed to get clk\n" ); } + pctl->clks[i].id ="pctl" ; i++; } + ret =clk_bulk_prepare_enable (banks, pctl->clks); +if (ret) { +dev_err (dev,"failed to prepare_enable clk (%d)\n" , ret); +return ret; + } +for_each_gpiochip_node (dev, child) { ret =stm32_gpiolib_register_bank (pctl, child);if (ret) {fwnode_handle_put (child); - -for (i =0 ; i < pctl->nbanks; i++) -clk_disable_unprepare (pctl->banks[i].clk); - -return ret; + goto err_register; } pctl->nbanks++;
@@ -1671,6 +1663,15 @@ int stm32_pctl_probe(struct platform_device *pdev)dev_info (dev,"Pinctrl STM32 initialized\n" );return 0 ; +err_register: +for (i =0 ; i < pctl->nbanks; i++) { +struct stm32_gpio_bank *bank = &pctl->banks[i]; + +gpiochip_remove (&bank->gpio_chip); + } + +clk_bulk_disable_unprepare (banks, pctl->clks); +return ret; } static int __maybe_unused stm32_pinctrl_restore_gpio_regs(
@@ -1739,10 +1740,8 @@ static int __maybe_unused stm32_pinctrl_restore_gpio_regs(int __maybe_unused stm32_pinctrl_suspend (struct device *dev) {struct stm32_pinctrl *pctl =dev_get_drvdata (dev); -int i; -for (i =0 ; i < pctl->nbanks; i++) -clk_disable (pctl->banks[i].clk); +clk_bulk_disable (pctl->nbanks, pctl->clks);return 0 ; }
@@ -1751,10 +1750,11 @@ int __maybe_unused stm32_pinctrl_resume(struct device *dev) {struct stm32_pinctrl *pctl =dev_get_drvdata (dev);struct stm32_pinctrl_group *g = pctl->groups; -int i; +int i, ret; -for (i =0 ; i < pctl->nbanks; i++) -clk_enable (pctl->banks[i].clk); + ret =clk_bulk_enable (pctl->nbanks, pctl->clks); +if (ret) +return ret;for (i =0 ; i < pctl->ngroups; i++, g++)stm32_pinctrl_restore_gpio_regs (pctl, g->pin);
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 184/393 pinctrl: amd: Take suspend type into consideration which pins are non-wake
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Maciej S. Szmigiero <[email protected]>
[ Upstream commit f31f33dbb3bab572bad9fe7b849ab0dcbe6fd279 ]
Some laptops have pins which are a wake source for S0i3/S3 but which aren't a wake source for S4/S5 and which cause issues when left unmasked during hibernation (S4).
For example HP EliteBook 855 G7 has pin #24 that causes instant wakeup (hibernation failure) if left unmasked (it is a wake source only for S0i3/S3).
GPIO pin #24 on this platform is likely dedicated to WWAN XMM7360 modem since this pin triggers wake notify to WWAN modem's parent PCIe port.
Fix this by considering a pin a wake source only if it is marked as one for the current suspend type (S0i3/S3 vs S4/S5).
Since Z-wake pins only make sense at runtime these were excluded from both of suspend categories, so pins with only the Z-wake flag set are effectively treated as non-wake pins.
--- drivers/pinctrl/pinctrl-amd.c | 27 +++++++++++++++++++++------ drivers/pinctrl/pinctrl-amd.h | 7 +++---- 2 files changed, 24 insertions(+), 10 deletions(-)
drivers/pinctrl/pinctrl-amd.c +21 -6
@@ -908,12 +908,13 @@ static bool amd_gpio_should_save(struct amd_gpio *gpio_dev, unsigned int pin)return false; } -static int amd_gpio_suspend (struct device *dev) +static int amd_gpio_suspend_hibernate_common (struct device *dev,bool is_suspend) {struct amd_gpio *gpio_dev =dev_get_drvdata (dev);struct pinctrl_desc *desc = gpio_dev->pctrl->desc;unsigned long flags;int i; +u32 wake_mask = is_suspend ?WAKE_SOURCE_SUSPEND :WAKE_SOURCE_HIBERNATE ;for (i =0 ; i < desc->npins; i++) {int pin = desc->pins[i].number;
@@ -925,11 +926,11 @@ static int amd_gpio_suspend(struct device *dev) gpio_dev->saved_regs[i] =readl (gpio_dev->base + pin *4 ) & ~PIN_IRQ_PENDING ;/* mask any interrupts not intended to be a wake source */ -if (!(gpio_dev->saved_regs[i] &WAKE_SOURCE )) { +if (!(gpio_dev->saved_regs[i] & wake_mask)) {writel (gpio_dev->saved_regs[i] & ~BIT (INTERRUPT_MASK_OFF ), gpio_dev->base + pin *4 ); -pm_pr_dbg ("Disabling GPIO #%d interrupt for suspend.\n" , - pin); +pm_pr_dbg ("Disabling GPIO #%d interrupt for %s.\n" , + pin, is_suspend ?"suspend" :"hibernate" ); }raw_spin_unlock_irqrestore (&gpio_dev->lock, flags);
@@ -938,6 +939,16 @@ static int amd_gpio_suspend(struct device *dev)return 0 ; } +static int amd_gpio_suspend (struct device *dev) +{ +return amd_gpio_suspend_hibernate_common (dev, true); +} + +static int amd_gpio_hibernate (struct device *dev) +{ +return amd_gpio_suspend_hibernate_common (dev, false); +} +static int amd_gpio_resume (struct device *dev) {struct amd_gpio *gpio_dev =dev_get_drvdata (dev);
@@ -961,8 +972,12 @@ static int amd_gpio_resume(struct device *dev) }static const struct dev_pm_ops amd_gpio_pm_ops = { -SET_LATE_SYSTEM_SLEEP_PM_OPS (amd_gpio_suspend, - amd_gpio_resume) + .suspend_late = amd_gpio_suspend, + .resume_early = amd_gpio_resume, + .freeze_late = amd_gpio_hibernate, + .thaw_early = amd_gpio_resume, + .poweroff_late = amd_gpio_hibernate, + .restore_early = amd_gpio_resume, };#endif
drivers/pinctrl/pinctrl-amd.h +3 -4
@@ -80,10 +80,9 @@#define FUNCTION_MASK GENMASK(1, 0)#define FUNCTION_INVALID GENMASK(7, 0) -#define WAKE_SOURCE (BIT(WAKE_CNTRL_OFF_S0I3) | \ - BIT(WAKE_CNTRL_OFF_S3) | \ - BIT(WAKE_CNTRL_OFF_S4) | \ - BIT(WAKECNTRL_Z_OFF)) +#define WAKE_SOURCE_SUSPEND (BIT(WAKE_CNTRL_OFF_S0I3) | \ + BIT(WAKE_CNTRL_OFF_S3)) +#define WAKE_SOURCE_HIBERNATE BIT(WAKE_CNTRL_OFF_S4)struct amd_function {const char *name;
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 185/393 bpf: Send signals asynchronously if !preemptible
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Puranjay Mohan <[email protected]>
[ Upstream commit 87c544108b612512b254c8f79aa5c0a8546e2cc4 ]
BPF programs can execute in all kinds of contexts and when a program running in a non-preemptible context uses the bpf_send_signal() kfunc, it will cause issues because this kfunc can sleep.
Change irqs_disabled() to !preemptible().
--- kernel/trace/bpf_trace.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
kernel/trace/bpf_trace.c +1 -1
@@ -853,7 +853,7 @@ static int bpf_send_signal_common(u32 sig, enum pid_type type)if (unlikely (is_global_init (current)))return -EPERM ; -if (irqs_disabled ()) { +if (!preemptible ()) {/* Do an early check on signal validity. Otherwise, * the error is lost in deferred irq_work. */
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 186/393 bpf: tcp: Mark bpf_load_hdr_opt() arg2 as read-write
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Daniel Xu <[email protected]>
[ Upstream commit 8ac412a3361173e3000b16167af3d1f6f90af613 ]
MEM_WRITE attribute is defined as: "Non-presence of MEM_WRITE means that MEM is only being read". bpf_load_hdr_opt() both reads and writes from its arg2 - void *search_res.
This matters a lot for the next commit where we more precisely track stack accesses. Without this annotation, the verifier will make false assumptions about the contents of memory written to by helpers and possibly prune valid branches.
--- net/core/filter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/core/filter.c +1 -1
@@ -7604,7 +7604,7 @@ static const struct bpf_func_proto bpf_sock_ops_load_hdr_opt_proto = { .gpl_only = false, .ret_type = RET_INTEGER, .arg1_type = ARG_PTR_TO_CTX, - .arg2_type = ARG_PTR_TO_MEM, + .arg2_type = ARG_PTR_TO_MEM | MEM_WRITE, .arg3_type = ARG_CONST_SIZE, .arg4_type = ARG_ANYTHING, };
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 187/393 ALSA: hda/realtek - Fixed headphone distorted sound on Acer Aspire A115-31 laptop
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Kailang Yang <[email protected]>
[ Upstream commit 5cb4e5b056772e341b590755a976081776422053 ]
Sound played through headphones is distorted.
--- sound/pci/hda/patch_realtek.c | 1 + 1 file changed, 1 insertion(+)
sound/pci/hda/patch_realtek.c +1 -0
@@ -9726,6 +9726,7 @@ static const struct hda_quirk alc269_fixup_tbl[] = {SND_PCI_QUIRK (0x1025 ,0x1308 ,"Acer Aspire Z24-890" ,ALC286_FIXUP_ACER_AIO_HEADSET_MIC ),SND_PCI_QUIRK (0x1025 ,0x132a ,"Acer TravelMate B114-21" ,ALC233_FIXUP_ACER_HEADSET_MIC ),SND_PCI_QUIRK (0x1025 ,0x1330 ,"Acer TravelMate X514-51T" ,ALC255_FIXUP_ACER_HEADSET_MIC ), +SND_PCI_QUIRK (0x1025 ,0x1360 ,"Acer Aspire A115" ,ALC255_FIXUP_ACER_MIC_NO_PRESENCE ),SND_PCI_QUIRK (0x1025 ,0x141f ,"Acer Spin SP513-54N" ,ALC255_FIXUP_ACER_MIC_NO_PRESENCE ),SND_PCI_QUIRK (0x1025 ,0x142b ,"Acer Swift SF314-42" ,ALC255_FIXUP_ACER_MIC_NO_PRESENCE ), SND_PCI_QUIRK(0x1025, 0x1430, "Acer TravelMate B311R-31", ALC256_FIXUP_ACER_MIC_NO_PRESENCE),
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 188/393 perf lock: Fix parse_lock_type which only retrieve one lock flag
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chun-Tse Shao <[email protected]>
[ Upstream commit 1be9264158ef4818393e5d8144887a1a5d3cc480 ]
parse_lock_type can only add the first lock flag in lock_type_table given input str. For example, for Y rwlock, it only adds rwlock:R into this perf session. Another example is for -Y mutex, it only adds the mutex without LCB_F_SPIN flag. The patch fixes this issue, makes sure both rwlock:R and rwlock:W will be added with -Y rwlock, and so on.
Testing:
$ ./perf lock con -ab -Y mutex,rwlock -- perf bench sched pipe # Running 'sched/pipe' benchmark: # Executed 1000000 pipe operations between two processes
Total time: 9.313 [sec]
9.313976 usecs/op
107365 ops/seccontended total wait max wait avg wait type caller
176 1.65 ms 19.43 us 9.38 us mutex pipe_read+0x57
34 180.14 us 10.93 us 5.30 us mutex pipe_write+0x50
7 77.48 us 16.09 us 11.07 us mutex do_epoll_wait+0x24d
7 74.70 us 13.50 us 10.67 us mutex do_epoll_wait+0x24d
3 35.97 us 14.44 us 11.99 us rwlock:W ep_done_scan+0x2d
3 35.00 us 12.23 us 11.66 us rwlock:W do_epoll_wait+0x255
2 15.88 us 11.96 us 7.94 us rwlock:W do_epoll_wait+0x47c
1 15.23 us 15.23 us 15.23 us rwlock:W do_epoll_wait+0x4d0
1 14.26 us 14.26 us 14.26 us rwlock:W ep_done_scan+0x2d
2 14.00 us 7.99 us 7.00 us mutex pipe_read+0x282
1 12.29 us 12.29 us 12.29 us rwlock:R ep_poll_callback+0x35
1 12.02 us 12.02 us 12.02 us rwlock:W do_epoll_ctl+0xb65
1 10.25 us 10.25 us 10.25 us rwlock:R ep_poll_callback+0x35
1 7.86 us 7.86 us 7.86 us mutex do_epoll_ctl+0x6c1
1 5.04 us 5.04 us 5.04 us mutex do_epoll_ctl+0x3d4[namhyung: Add a comment and rename to 'mutex:spin' for consistency
--- tools/perf/builtin-lock.c | 66 ++++++++++++++++++++++++--------------- 1 file changed, 41 insertions(+), 25 deletions(-)
tools/perf/builtin-lock.c +41 -25
@@ -1591,8 +1591,8 @@ static const struct { { LCB_F_PERCPU | LCB_F_WRITE, "pcpu-sem:W", "percpu-rwsem" }, { LCB_F_MUTEX, "mutex", "mutex" }, { LCB_F_MUTEX | LCB_F_SPIN, "mutex", "mutex" }, -/* alias for get_type_flag() */ - { LCB_F_MUTEX | LCB_F_SPIN, "mutex-spin", "mutex" }, +/* alias for optimistic spinning only */ + { LCB_F_MUTEX | LCB_F_SPIN, "mutex:spin", "mutex-spin" }, };static const char *get_type_str (unsigned int flags)
@@ -1617,19 +1617,6 @@ static const char *get_type_name(unsigned int flags)return "unknown" ; } -static unsigned int get_type_flag (const char *str) -{ -for (unsigned int i =0 ; i <ARRAY_SIZE (lock_type_table); i++) { -if (!strcmp (lock_type_table[i].name, str)) -return lock_type_table[i].flags; - } -for (unsigned int i =0 ; i <ARRAY_SIZE (lock_type_table); i++) { -if (!strcmp (lock_type_table[i].str, str)) -return lock_type_table[i].flags; - } -return UINT_MAX ; -} -static void lock_filter_finish (void ) {zfree (&filters.types);
@@ -2321,29 +2308,58 @@ static int parse_lock_type(const struct option *opt __maybe_unused, const char * int unset __maybe_unused) {char *s, *tmp, *tok; -int ret =0 ; s =strdup (str);if (s ==NULL )return -1 ;for (tok =strtok_r (s,", " , &tmp); tok; tok =strtok_r (NULL ,", " , &tmp)) { -unsigned int flags =get_type_flag (tok); +bool found = false; -if (flags ==-1U ) { -pr_err ("Unknown lock flags: %s\n" , tok); - ret =-1 ; -break ; +/* `tok` is `str` in `lock_type_table` if it contains ':'. */ +if (strchr (tok,':' )) { +for (unsigned int i =0 ; i <ARRAY_SIZE (lock_type_table); i++) { +if (!strcmp (lock_type_table[i].str, tok) && +add_lock_type (lock_type_table[i].flags)) { + found = true; +break ; + } + } + +if (!found) { +pr_err ("Unknown lock flags name: %s\n" , tok); +free (s); +return -1 ; + } + +continue ; } -if (!add_lock_type (flags)) { - ret =-1 ; -break ; +/* +* Otherwise `tok` is `name` in `lock_type_table`. +* Single lock name could contain multiple flags. +*/ +for (unsigned int i =0 ; i <ARRAY_SIZE (lock_type_table); i++) { +if (!strcmp (lock_type_table[i].name, tok)) { +if (add_lock_type (lock_type_table[i].flags)) { + found = true; + }else { +free (s); +return -1 ; + } + } } + +if (!found) { +pr_err ("Unknown lock name: %s\n" , tok); +free (s); +return -1 ; + } + }free (s); -return ret; +return 0 ; }static bool add_lock_addr (unsigned long addr)
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 189/393 padata: fix UAF in padata_reorder
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chen Ridong <[email protected]>
[ Upstream commit e01780ea4661172734118d2a5f41bc9720765668 ]
A bug was found when run ltp test:
BUG: KASAN: slab-use-after-free in padata_find_next+0x29/0x1a0 Read of size 4 at addr ffff88bbfe003524 by task kworker/u113:2/3039206 CPU: 0 PID: 3039206 Comm: kworker/u113:2 Kdump: loaded Not tainted 6.6.0+ Workqueue: pdecrypt_parallel padata_parallel_worker Call Trace: <TASK> dump_stack_lvl+0x32/0x50 print_address_description.constprop.0+0x6b/0x3d0 print_report+0xdd/0x2c0 kasan_report+0xa5/0xd0 padata_find_next+0x29/0x1a0 padata_reorder+0x131/0x220 padata_parallel_worker+0x3d/0xc0 process_one_work+0x2ec/0x5a0
If 'mdelay(10)' is added before calling 'padata_find_next' in the 'padata_reorder' function, this issue could be reproduced easily with ltp test (pcrypt_aead01).
This can be explained as bellow:
pcrypt_aead_encrypt
...padata_do_parallelrefcount_inc(&pd->refcnt); // add refcnt
...padata_do_serialpadata_reorder // pd
while (1) {padata_find_next(pd, true); // using pdqueue_work_on
...padata_serial_worker crypto_del_algpadata_put_pd_cnt // sub refcnt
padata_free_shell padata_put_pd(ps->pd); // pd is freed
// loop again, but pd is freed
// call padata_find_next, UAF
}
In the padata_reorder function, when it loops in 'while', if the alg is deleted, the refcnt may be decreased to 0 before entering 'padata_find_next', which leads to UAF.
As mentioned in [1], do_serial is supposed to be called with BHs disabled and always happen under RCU protection, to address this issue, add synchronize_rcu() in 'padata_free_shell' wait for all _do_serial calls to finish.
[1] https://lore.kernel.org/all/[email protected]/
[2] https://lore.kernel.org/linux-kernel/jfjz5d7zwbytztackem7ibzalm5lnxldi2eofeiczqmqs2m7o6@fq426cwnjtkm/
--- kernel/padata.c | 6 ++++++ 1 file changed, 6 insertions(+)
kernel/padata.c +6 -0
@@ -1118,6 +1118,12 @@ void padata_free_shell(struct padata_shell *ps)if (!ps)return ; +/* +* Wait for all _do_serial calls to finish to avoid touching +* freed pd's and ps's. +*/ +synchronize_rcu (); +mutex_lock (&ps->pinst->lock);list_del (&ps->list); pd =rcu_dereference_protected (ps->pd,1 );
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 190/393 padata: add pd get/put refcnt helper
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chen Ridong <[email protected]>
[ Upstream commit ae154202cc6a189b035359f3c4e143d5c24d5352 ]
Add helpers for pd to get/put refcnt to make code consice.
Stable-dep-of: dd7d37ccf6b1 ("padata: avoid UAF for reorder_work")
--- kernel/padata.c | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-)
kernel/padata.c +20 -7
@@ -47,6 +47,22 @@ struct padata_mt_job_state {static void padata_free_pd (struct parallel_data *pd);static void __init padata_mt_helper (struct work_struct *work); +static inline void padata_get_pd (struct parallel_data *pd) +{ +refcount_inc (&pd->refcnt); +} + +static inline void padata_put_pd_cnt (struct parallel_data *pd,int cnt) +{ +if (refcount_sub_and_test (cnt, &pd->refcnt)) +padata_free_pd (pd); +} + +static inline void padata_put_pd (struct parallel_data *pd) +{ +padata_put_pd_cnt (pd,1 ); +} +static int padata_index_to_cpu (struct parallel_data *pd,int cpu_index) {int cpu, target_cpu;
@@ -206,7 +222,7 @@ int padata_do_parallel(struct padata_shell *ps,if ((pinst->flags &PADATA_RESET )) goto out; -refcount_inc (&pd->refcnt); +padata_get_pd (pd); padata->pd = pd; padata->cb_cpu = *cb_cpu;
@@ -380,8 +396,7 @@ static void padata_serial_worker(struct work_struct *serial_work) }local_bh_enable (); -if (refcount_sub_and_test (cnt, &pd->refcnt)) -padata_free_pd (pd); +padata_put_pd_cnt (pd, cnt); }/**
@@ -678,8 +693,7 @@ static int padata_replace(struct padata_instance *pinst)synchronize_rcu ();list_for_each_entry_continue_reverse (ps, &pinst->pslist, list) -if (refcount_dec_and_test (&ps->opd->refcnt)) -padata_free_pd (ps->opd); +padata_put_pd (ps->opd); pinst->flags &= ~PADATA_RESET ;
@@ -1127,8 +1141,7 @@ void padata_free_shell(struct padata_shell *ps)mutex_lock (&ps->pinst->lock);list_del (&ps->list); pd =rcu_dereference_protected (ps->pd,1 ); -if (refcount_dec_and_test (&pd->refcnt)) -padata_free_pd (pd); +padata_put_pd (pd);mutex_unlock (&ps->pinst->lock);kfree (ps);
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 191/393 padata: avoid UAF for reorder_work
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chen Ridong <[email protected]>
[ Upstream commit dd7d37ccf6b11f3d95e797ebe4e9e886d0332600 ]
Although the previous patch can avoid ps and ps UAF for _do_serial, it can not avoid potential UAF issue for reorder_work. This issue can happen just as below:
crypto_request crypto_request crypto_del_algpadata_do_serial
...
padata_reorder
// processes all remaining
// requests then breaks
while (1) {
if (!padata)
break;
...
}
padata_do_serial
// new request added
list_add
// sees the new request
queue_work(reorder_work)
padata_reorder
queue_work_on(squeue->work)...
<kworker context> padata_serial_worker // completes new request, // no more outstanding // requests crypto_del_alg // free pd
<kworker context>invoke_padata_reorder
// UAF of pd
To avoid UAF for 'reorder_work', get 'pd' ref before put 'reorder_work' into the 'serial_wq' and put 'pd' ref until the 'serial_wq' finish.
--- kernel/padata.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)
kernel/padata.c +9 -1
@@ -352,8 +352,14 @@ static void padata_reorder(struct parallel_data *pd)smp_mb (); reorder =per_cpu_ptr (pd->reorder_list, pd->cpu); -if (!list_empty (&reorder->list) &&padata_find_next (pd, false)) +if (!list_empty (&reorder->list) &&padata_find_next (pd, false)) { +/* +* Other context(eg. the padata_serial_worker) can finish the request. +* To avoid UAF issue, add pd ref here, and put pd ref after reorder_work finish. +*/ +padata_get_pd (pd);queue_work (pinst->serial_wq, &pd->reorder_work); + } }static void invoke_padata_reorder (struct work_struct *work)
@@ -364,6 +370,8 @@ static void invoke_padata_reorder(struct work_struct *work) pd = container_of(work, struct parallel_data, reorder_work);padata_reorder (pd);local_bh_enable (); +/* Pairs with putting the reorder_work in the serial_wq */ +padata_put_pd (pd); }static void padata_serial_worker (struct work_struct *serial_work)
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 192/393 smb: client: fix oops due to unset link speed
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Paulo Alcantara <[email protected]>
[ Upstream commit be7a6a77669588bfa5022a470989702bbbb11e7f ]
It isn't guaranteed that NETWORK_INTERFACE_INFO::LinkSpeed will always be set by the server, so the client must handle any values and then prevent oopses like below from happening:
Oops: divide error: 0000 [#1] PREEMPT SMP KASAN NOPTI CPU: 0 UID: 0 PID: 1323 Comm: cat Not tainted 6.13.0-rc7 #2 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 1.16.3-3.fc41 04/01/2014 RIP: 0010:cifs_debug_data_proc_show+0xa45/0x1460 [cifs] Code: 00 00 48
89 df e8 3b cd 1b c1 41 f6 44 24 2c 04 0f 84 50 01 00 00 48 89 ef e8 e7 d0 1b c1 49 8b 44 24 18 31 d2 49 8d 7c 24 28 <48> f7 74 24 18 48 89 c3 e8 6e cf 1b c1 41 8b 6c 24 28 49 8d 7c 24
RSP: 0018:ffffc90001817be0 EFLAGS: 00010246
RAX: 0000000000000000 RBX: ffff88811230022c RCX: ffffffffc041bd99
RDX: 0000000000000000 RSI: 0000000000000567 RDI: ffff888112300228
RBP: ffff888112300218 R08: fffff52000302f5f R09: ffffed1022fa58ac
R10: ffff888117d2c566 R11: 00000000fffffffe R12: ffff888112300200
R13: 000000012a15343f R14: 0000000000000001 R15: ffff888113f2db58
FS: 00007fe27119e740(0000) GS:ffff888148600000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007fe2633c5000 CR3: 0000000124da0000 CR4: 0000000000750ef0
PKRU: 55555554
Call Trace: <TASK> ? __die_body.cold+0x19/0x27 ? die+0x2e/0x50 ? do_trap+0x159/0x1b0 ? cifs_debug_data_proc_show+0xa45/0x1460 [cifs] ? do_error_trap+0x90/0x130 ? cifs_debug_data_proc_show+0xa45/0x1460 [cifs] ? exc_divide_error+0x39/0x50 ? cifs_debug_data_proc_show+0xa45/0x1460 [cifs] ? asm_exc_divide_error+0x1a/0x20 ? cifs_debug_data_proc_show+0xa39/0x1460 [cifs] ? cifs_debug_data_proc_show+0xa45/0x1460 [cifs] ? seq_read_iter+0x42e/0x790 seq_read_iter+0x19a/0x790 proc_reg_read_iter+0xbe/0x110 ? __pfx_proc_reg_read_iter+0x10/0x10 vfs_read+0x469/0x570 ? do_user_addr_fault+0x398/0x760 ? __pfx_vfs_read+0x10/0x10 ? find_held_lock+0x8a/0xa0 ? __pfx_lock_release+0x10/0x10 ksys_read+0xd3/0x170 ? __pfx_ksys_read+0x10/0x10 ? __rcu_read_unlock+0x50/0x270 ? mark_held_locks+0x1a/0x90 do_syscall_64+0xbb/0x1d0 entry_SYSCALL_64_after_hwframe+0x77/0x7f RIP: 0033:0x7fe271288911 Code: 00 48 8b 15 01 25 10 00 f7 d8 64 89 02 b8 ff ff ff ff eb bd e8
20 ad 01 00 f3 0f 1e fa 80 3d b5 a7 10 00 00 74 13 31 c0 0f 05 <48> 3d 00 f0 ff ff 77 4f c3 66 0f 1f 44 00 00 55 48 89 e5 48 83 ec
RSP: 002b:00007ffe87c079d8 EFLAGS: 00000246 ORIG_RAX: 0000000000000000
RAX: ffffffffffffffda RBX: 0000000000040000 RCX: 00007fe271288911
RDX: 0000000000040000 RSI: 00007fe2633c6000 RDI: 0000000000000003
RBP: 00007ffe87c07a00 R08: 0000000000000000 R09: 00007fe2713e6380
R10: 0000000000000022 R11: 0000000000000246 R12: 0000000000040000
R13: 00007fe2633c6000 R14: 0000000000000003 R15: 0000000000000000
</TASK>
Fix this by setting cifs_server_iface::speed to a sane value (1Gbps) by default when link speed is unset.
--- fs/smb/client/smb2ops.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
fs/smb/client/smb2ops.c +2 -1
@@ -622,7 +622,8 @@ parse_server_interfaces(struct network_interface_info_ioctl_rsp *buf,while (bytes_left >= (ssize_t )sizeof (*p)) {memset (&tmp_iface,0 ,sizeof (tmp_iface)); - tmp_iface.speed =le64_to_cpu (p->LinkSpeed); +/* default to 1Gbps when link speed is unset */ + tmp_iface.speed =le64_to_cpu (p->LinkSpeed) ?:1000000000 ; tmp_iface.rdma_capable =le32_to_cpu (p->Capability &RDMA_CAPABLE ) ?1 :0 ; tmp_iface.rss_capable =le32_to_cpu (p->Capability &RSS_CAPABLE ) ?1 :0 ;
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 193/393 cifs: Use cifs_autodisable_serverino() for disabling CIFS_MOUNT_SERVER_INUM in readdir.c
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Pali Rohár <[email protected]>
[ Upstream commit 015683d4ed0d23698c71f2194f09bd17dbfad044 ]
In all other places is used function cifs_autodisable_serverino() for disabling CIFS_MOUNT_SERVER_INUM mount flag. So use is also in readir.c _initiate_cifs_search() function. Benefit of cifs_autodisable_serverino() is that it also prints dmesg message that server inode numbers are being disabled.
--- fs/smb/client/readdir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/smb/client/readdir.c +1 -1
@@ -413,7 +413,7 @@ _initiate_cifs_search(const unsigned int xid, struct file *file, cifsFile->invalidHandle = false; }else if ((rc == -EOPNOTSUPP ) && (cifs_sb->mnt_cifs_flags &CIFS_MOUNT_SERVER_INUM )) { - cifs_sb->mnt_cifs_flags &= ~CIFS_MOUNT_SERVER_INUM ; +cifs_autodisable_serverino (cifs_sb); goto ffirst_retry; } error_exit:
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 194/393 soc: atmel: fix device_node release in atmel_soc_device_init()
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Javier Carrasco <[email protected]>
[ Upstream commit d3455ab798100f40af77123e7c2443ec979c546b ]
A device_node acquired via of_find_node_by_path() requires explicit calls to of_node_put() when it is no longer needed to avoid leaking the resource.
Instead of adding the missing calls to of_node_put() in all execution paths, use the cleanup attribute for 'np' by means of the __free() macro, which automatically calls of_node_put() when the variable goes out of scope.
--- drivers/soc/atmel/soc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/soc/atmel/soc.c +1 -1
@@ -376,7 +376,7 @@ static const struct of_device_id at91_soc_allowed_list[] __initconst = {static int __init atmel_soc_device_init (void ) { -struct device_node *np =of_find_node_by_path ("/" ); + struct device_node *np __free(device_node) = of_find_node_by_path("/");if (!of_match_node (at91_soc_allowed_list, np))return 0 ;
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 195/393 ARM: at91: pm: change BU Power Switch to automatic mode
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Nicolas Ferre <[email protected]>
[ Upstream commit 6fc5bdfa872b7da51b5507a1327a17c3db2fcf95 ]
Change how the Backup Unit Power is configured and force the automatic/hardware mode.
This change eliminates the need for software management of the power switch, ensuring it transitions to the backup power source before entering low power modes.
This is done in the only location where this switch was configured. It's usually done in the bootloader.
Previously, the loss of the VDDANA (or VDDIN33) power source was not automatically compensated by an alternative power source. This resulted in the loss of Backup Unit content, including Backup Self-refresh low power mode information, OTP emulation configuration, and boot configuration, for instance.
--- arch/arm/mach-at91/pm.c | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-)
arch/arm/mach-at91/pm.c +20 -11
@@ -591,7 +591,21 @@ static int at91_suspend_finish(unsigned long val)return 0 ; } -static void at91_pm_switch_ba_to_vbat (void ) +/** +* at91_pm_switch_ba_to_auto() - Configure Backup Unit Power Switch +* to automatic/hardware mode. +* +* The Backup Unit Power Switch can be managed either by software or hardware. +* Enabling hardware mode allows the automatic transition of power between +* VDDANA (or VDDIN33) and VDDBU (or VBAT, respectively), based on the +* availability of these power sources. +* +* If the Backup Unit Power Switch is already in automatic mode, no action is +* required. If it is in software-controlled mode, it is switched to automatic +* mode to enhance safety and eliminate the need for toggling between power +* sources. +*/ +static void at91_pm_switch_ba_to_auto (void ) {unsigned int offset = offsetof(struct at91_pm_sfrbu_regs , pswbu);unsigned int val;
@@ -602,24 +616,19 @@ static void at91_pm_switch_ba_to_vbat(void) val =readl (soc_pm.data.sfrbu + offset); -/* Already on VBAT. */ -if (!(val & soc_pm.sfrbu_regs.pswbu.state)) +/* Already on auto/hardware. */ +if (!(val & soc_pm.sfrbu_regs.pswbu.ctrl))return ; - val &= ~soc_pm.sfrbu_regs.pswbu.softsw; - val |= soc_pm.sfrbu_regs.pswbu.key | soc_pm.sfrbu_regs.pswbu.ctrl; + val &= ~soc_pm.sfrbu_regs.pswbu.ctrl; + val |= soc_pm.sfrbu_regs.pswbu.key;writel (val, soc_pm.data.sfrbu + offset); - -/* Wait for update. */ - val =readl (soc_pm.data.sfrbu + offset); -while (val & soc_pm.sfrbu_regs.pswbu.state) - val =readl (soc_pm.data.sfrbu + offset); }static void at91_pm_suspend (suspend_state_t state) {if (soc_pm.data.mode ==AT91_PM_BACKUP ) { -at91_pm_switch_ba_to_vbat (); +at91_pm_switch_ba_to_auto ();cpu_suspend (0 , at91_suspend_finish);
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 196/393 arm64: dts: mediatek: mt8186: Move wakeup to MTU3 to get working suspend
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Nícolas F. R. A. Prado <[email protected]>
[ Upstream commit 253b4e96f5783fddede1b82274a7b4e0aa57d761 ]
The current DT has the wakeup-source and mediatek,syscon-wakeup properties in the XHCI nodes, which configures USB wakeup after powering down the XHCI hardware block. However, since the XHCI controller is behind an MTU3 (USB3 DRD controller), the MTU3 only gets powered down after USB wakeup has been configured, causing the system to detect a wakeup, and results in broken suspend support as the system resumes immediately.
Move the wakeup properties to the MTU3 nodes so that USB wakeup is only enabled after the MTU3 has powered down.
With this change in place, it is possible to suspend and resume, and also to wakeup through USB, as tested on the Google Steelix (Lenovo 300e Yoga Chromebook Gen 4).
--- arch/arm64/boot/dts/mediatek/mt8186.dtsi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
arch/arm64/boot/dts/mediatek/mt8186.dtsi +4 -4
@@ -1545,6 +1545,8 @@ #address-cells = <2>; #size-cells = <2>; ranges; + wakeup-source; + mediatek,syscon-wakeup = <&pericfg 0x420 2>; status = "disabled"; usb_host0: usb@11200000 {
@@ -1558,8 +1560,6 @@ <&infracfg_ao CLK_INFRA_AO_SSUSB_TOP_XHCI>; clock-names = "sys_ck", "ref_ck", "mcu_ck", "dma_ck", "xhci_ck"; interrupts = <GIC_SPI 294 IRQ_TYPE_LEVEL_HIGH 0>; - mediatek,syscon-wakeup = <&pericfg 0x420 2>; - wakeup-source; status = "disabled"; }; };
@@ -1611,6 +1611,8 @@ #address-cells = <2>; #size-cells = <2>; ranges; + wakeup-source; + mediatek,syscon-wakeup = <&pericfg 0x424 2>; status = "disabled"; usb_host1: usb@11280000 {
@@ -1624,8 +1626,6 @@ <&infracfg_ao CLK_INFRA_AO_SSUSB_TOP_P1_XHCI>; clock-names = "sys_ck", "ref_ck", "mcu_ck", "dma_ck","xhci_ck"; interrupts = <GIC_SPI 324 IRQ_TYPE_LEVEL_HIGH 0>; - mediatek,syscon-wakeup = <&pericfg 0x424 2>; - wakeup-source; status = "disabled"; }; };
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 197/393 arm64: dts: mt8183: set DMIC one-wire mode on Damu
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Hsin-Yi Wang <[email protected]>
[ Upstream commit 6c379e8b984815fc8f876e4bc78c4d563f13ddae ]
Sets DMIC one-wire mode on Damu.
--- arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-damu.dts | 4 ++++ 1 file changed, 4 insertions(+)
arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-damu.dts +4 -0
@@ -27,6 +27,10 @@ hid-descr-addr = <0x0001>; }; +&mt6358codec { + mediatek,dmic-mode = <1>; /* one-wire */ +}; + &qca_wifi { qcom,ath10k-calibration-variant = "GO_DAMU"; };
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 198/393 arm64: dts: mediatek: mt8516: fix GICv2 range
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Val Packett <[email protected]>
[ Upstream commit e3ee31e4409f051c021a30122f3c470f093a7386 ]
On the MT8167 which is based on the MT8516 DTS, the following error was appearing on boot, breaking interrupt operation:
GICv2 detected, but range too small and irqchip.gicv2_force_probe not set
Similar to what's been proposed for MT7622 which has the same issue, fix by using the range reported by force_probe.
--- arch/arm64/boot/dts/mediatek/mt8516.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/mediatek/mt8516.dtsi +1 -1
@@ -268,7 +268,7 @@ interrupt-parent = <&gic>; interrupt-controller; reg = <0 0x10310000 0 0x1000>, - <0 0x10320000 0 0x1000>, + <0 0x1032f000 0 0x2000>, <0 0x10340000 0 0x2000>, <0 0x10360000 0 0x2000>; interrupts = <GIC_PPI 9
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 199/393 arm64: dts: mediatek: mt8516: fix wdt irq type
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Val Packett <[email protected]>
[ Upstream commit 03a80442030e7147391738fb6cbe5fa0b3b91bb1 ]
The GICv2 does not support EDGE_FALLING interrupts, so the watchdog would refuse to attach due to a failing check coming from the GIC driver.
--- arch/arm64/boot/dts/mediatek/mt8516.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/mediatek/mt8516.dtsi +1 -1
@@ -206,7 +206,7 @@ compatible = "mediatek,mt8516-wdt", "mediatek,mt6589-wdt"; reg = <0 0x10007000 0 0x1000>; - interrupts = <GIC_SPI 198 IRQ_TYPE_EDGE_FALLING>; + interrupts = <GIC_SPI 198 IRQ_TYPE_LEVEL_LOW>; #reset-cells = <1>; };
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 200/393 arm64: dts: mediatek: mt8516: add i2c clock-div property
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Val Packett <[email protected]>
[ Upstream commit eb72341fd92b7af510d236e5a8554d855ed38d3c ]
Move the clock-div property from the pumpkin board dtsi to the SoC's since it belongs to the SoC itself and is required on other devices.
--- arch/arm64/boot/dts/mediatek/mt8516.dtsi | 3 +++ arch/arm64/boot/dts/mediatek/pumpkin-common.dtsi | 2 -- 2 files changed, 3 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/mediatek/mt8516.dtsi +3 -0
@@ -344,6 +344,7 @@ reg = <0 0x11009000 0 0x90>, <0 0x11000180 0 0x80>; interrupts = <GIC_SPI 80 IRQ_TYPE_LEVEL_LOW>; + clock-div = <2>; clocks = <&topckgen CLK_TOP_I2C0>, <&topckgen CLK_TOP_APDMA>; clock-names = "main", "dma";
@@ -358,6 +359,7 @@ reg = <0 0x1100a000 0 0x90>, <0 0x11000200 0 0x80>; interrupts = <GIC_SPI 81 IRQ_TYPE_LEVEL_LOW>; + clock-div = <2>; clocks = <&topckgen CLK_TOP_I2C1>, <&topckgen CLK_TOP_APDMA>; clock-names = "main", "dma";
@@ -372,6 +374,7 @@ reg = <0 0x1100b000 0 0x90>, <0 0x11000280 0 0x80>; interrupts = <GIC_SPI 82 IRQ_TYPE_LEVEL_LOW>; + clock-div = <2>; clocks = <&topckgen CLK_TOP_I2C2>, <&topckgen CLK_TOP_APDMA>; clock-names = "main", "dma";
arch/arm64/boot/dts/mediatek/pumpkin-common.dtsi +0 -2
@@ -47,7 +47,6 @@ }; &i2c0 { - clock-div = <2>; pinctrl-names = "default"; pinctrl-0 = <&i2c0_pins_a>; status = "okay";
@@ -156,7 +155,6 @@ }; &i2c2 { - clock-div = <2>; pinctrl-names = "default"; pinctrl-0 = <&i2c2_pins_a>; status = "okay";
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 201/393 arm64: dts: mediatek: mt8516: reserve 192 KiB for TF-A
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Val Packett <[email protected]>
[ Upstream commit 2561c7d5d497b988deccc36fe5eac7fd50b937f8 ]
The Android DTB for the related MT8167 reserves 0x30000. This is likely correct for MT8516 Android devices as well, and there's never any harm in reserving 64KiB more.
--- arch/arm64/boot/dts/mediatek/mt8516.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/mediatek/mt8516.dtsi +2 -2
@@ -144,10 +144,10 @@ #size-cells = <2>; ranges; - /* 128 KiB reserved for ARM Trusted Firmware (BL31) */ + /* 192 KiB reserved for ARM Trusted Firmware (BL31) */ bl31_secmon_reserved: secmon@43000000 { no-map; - reg = <0 0x43000000 0 0x20000>; + reg = <0 0x43000000 0 0x30000>; }; };
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 202/393 ARM: dts: stm32: Fix IPCC EXTI declaration on stm32mp151
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Arnaud Pouliquen <[email protected]>
[ Upstream commit 4ea654242e0c75bdf6b45d3c619c5fdcb2e9312a ]
The GIC IRQ type used for IPCC RX should be IRQ_TYPE_LEVEL_HIGH. Replacing the interrupt with the EXTI event changes the type to the numeric value 1, meaning IRQ_TYPE_EDGE_RISING.
The issue is that EXTI event 61 is a direct event.The IRQ type of direct events is not used by EXTI and is propagated to the parent IRQ controller of EXTI, the GIC.
Align the IRQ type to the value expected by the GIC by replacing the second parameter "1" with IRQ_TYPE_LEVEL_HIGH.
--- arch/arm/boot/dts/st/stm32mp151.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/st/stm32mp151.dtsi +1 -1
@@ -1165,7 +1165,7 @@ reg = <0x4c001000 0x400>; st,proc-id = <0>; interrupts-extended = - <&exti 61 1>, + <&exti 61 IRQ_TYPE_LEVEL_HIGH>, <&intc GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>; interrupt-names = "rx", "tx"; clocks = <&rcc IPCC>;
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 203/393 RDMA/mlx4: Avoid false error about access to uninitialized gids array
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Leon Romanovsky <[email protected]>
[ Upstream commit 1f53d88cbb0dcc7df235bf6611ae632b254fccd8 ]
Smatch generates the following false error report:drivers/infiniband/hw/mlx4/main.c:393 mlx4_ib_del_gid() error: uninitialized symbol 'gids'.
Traditionally, we are not changing kernel code and asking people to fix the tools. However in this case, the fix can be done by simply rearranging the code to be more clear.
--- drivers/infiniband/hw/mlx4/main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/infiniband/hw/mlx4/main.c +4 -4
@@ -351,7 +351,7 @@ static int mlx4_ib_del_gid(const struct ib_gid_attr *attr, void **context)struct mlx4_port_gid_table *port_gid_table;int ret =0 ;int hw_update =0 ; -struct gid_entry *gids; +struct gid_entry *gids =NULL ;if (!rdma_cap_roce_gid_table (attr->device, attr->port_num))return -EINVAL ;
@@ -389,10 +389,10 @@ static int mlx4_ib_del_gid(const struct ib_gid_attr *attr, void **context) }spin_unlock_bh (&iboe->lock); -if (!ret && hw_update) { +if (gids) ret =mlx4_ib_update_gids (gids, ibdev, attr->port_num); -kfree (gids); - } + +kfree (gids);return ret; }
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 204/393 rdma/cxgb4: Prevent potential integer overflow on 32bit
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dan Carpenter <[email protected]>
[ Upstream commit bd96a3935e89486304461a21752f824fc25e0f0b ]
The "gl->tot_len" variable is controlled by the user. It comes from process_responses(). On 32bit systems, the "gl->tot_len + sizeof(struct cpl_pass_accept_req) + sizeof(struct rss_header)" addition could have an integer wrapping bug. Use size_add() to prevent this.
--- drivers/infiniband/hw/cxgb4/device.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/infiniband/hw/cxgb4/device.c +4 -2
@@ -1114,8 +1114,10 @@ static inline struct sk_buff *copy_gl_to_skb_pkt(const struct pkt_gl *gl,* The math here assumes sizeof cpl_pass_accept_req >= sizeof * cpl_rx_pkt. */ - skb =alloc_skb (gl->tot_len +sizeof (struct cpl_pass_accept_req ) + -sizeof (struct rss_header ) - pktshift,GFP_ATOMIC ); + skb =alloc_skb (size_add (gl->tot_len, +sizeof (struct cpl_pass_accept_req ) + +sizeof (struct rss_header )) - pktshift, +GFP_ATOMIC );if (unlikely (!skb))return NULL ;
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 205/393 arm64: dts: mediatek: mt8173-evb: Drop regulator-compatible property
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chen-Yu Tsai <[email protected]>
[ Upstream commit a6d5983e40f5d5b219337569cdd269727f5a3e2e ]
The "regulator-compatible" property has been deprecated since 2012 in commit 13511def87b9 ("regulator: deprecate regulator-compatible DT property"), which is so old it's not even mentioned in the converted regulator bindings YAML file. It is also not listed in the MT6397 regulator bindings. Having them present produces a whole bunch of validation errors:
Unevaluated properties are not allowed ('regulator-compatible' was unexpected)
Drop the "regulator-compatible" property from the board dts. The property values are the same as the node name, so everything should continue to work.
--- arch/arm64/boot/dts/mediatek/mt8173-evb.dts | 23 --------------------- 1 file changed, 23 deletions(-)
arch/arm64/boot/dts/mediatek/mt8173-evb.dts +0 -23
@@ -312,7 +312,6 @@ compatible = "mediatek,mt6397-regulator"; mt6397_vpca15_reg: buck_vpca15 { - regulator-compatible = "buck_vpca15"; regulator-name = "vpca15"; regulator-min-microvolt = < 700000>; regulator-max-microvolt = <1350000>;
@@ -321,7 +320,6 @@ }; mt6397_vpca7_reg: buck_vpca7 { - regulator-compatible = "buck_vpca7"; regulator-name = "vpca7"; regulator-min-microvolt = < 700000>; regulator-max-microvolt = <1350000>;
@@ -330,7 +328,6 @@ }; mt6397_vsramca15_reg: buck_vsramca15 { - regulator-compatible = "buck_vsramca15"; regulator-name = "vsramca15"; regulator-min-microvolt = < 700000>; regulator-max-microvolt = <1350000>;
@@ -339,7 +336,6 @@ }; mt6397_vsramca7_reg: buck_vsramca7 { - regulator-compatible = "buck_vsramca7"; regulator-name = "vsramca7"; regulator-min-microvolt = < 700000>; regulator-max-microvolt = <1350000>;
@@ -348,7 +344,6 @@ }; mt6397_vcore_reg: buck_vcore { - regulator-compatible = "buck_vcore"; regulator-name = "vcore"; regulator-min-microvolt = < 700000>; regulator-max-microvolt = <1350000>;
@@ -357,7 +352,6 @@ }; mt6397_vgpu_reg: buck_vgpu { - regulator-compatible = "buck_vgpu"; regulator-name = "vgpu"; regulator-min-microvolt = < 700000>; regulator-max-microvolt = <1350000>;
@@ -366,7 +360,6 @@ }; mt6397_vdrm_reg: buck_vdrm { - regulator-compatible = "buck_vdrm"; regulator-name = "vdrm"; regulator-min-microvolt = <1200000>; regulator-max-microvolt = <1400000>;
@@ -375,7 +368,6 @@ }; mt6397_vio18_reg: buck_vio18 { - regulator-compatible = "buck_vio18"; regulator-name = "vio18"; regulator-min-microvolt = <1620000>; regulator-max-microvolt = <1980000>;
@@ -384,19 +376,16 @@ }; mt6397_vtcxo_reg: ldo_vtcxo { - regulator-compatible = "ldo_vtcxo"; regulator-name = "vtcxo"; regulator-always-on; }; mt6397_va28_reg: ldo_va28 { - regulator-compatible = "ldo_va28"; regulator-name = "va28"; regulator-always-on; }; mt6397_vcama_reg: ldo_vcama { - regulator-compatible = "ldo_vcama"; regulator-name = "vcama"; regulator-min-microvolt = <1500000>; regulator-max-microvolt = <2800000>;
@@ -404,18 +393,15 @@ }; mt6397_vio28_reg: ldo_vio28 { - regulator-compatible = "ldo_vio28"; regulator-name = "vio28"; regulator-always-on; }; mt6397_vusb_reg: ldo_vusb { - regulator-compatible = "ldo_vusb"; regulator-name = "vusb"; }; mt6397_vmc_reg: ldo_vmc { - regulator-compatible = "ldo_vmc"; regulator-name = "vmc"; regulator-min-microvolt = <1800000>; regulator-max-microvolt = <3300000>;
@@ -423,7 +409,6 @@ }; mt6397_vmch_reg: ldo_vmch { - regulator-compatible = "ldo_vmch"; regulator-name = "vmch"; regulator-min-microvolt = <3000000>; regulator-max-microvolt = <3300000>;
@@ -431,7 +416,6 @@ }; mt6397_vemc_3v3_reg: ldo_vemc3v3 { - regulator-compatible = "ldo_vemc3v3"; regulator-name = "vemc_3v3"; regulator-min-microvolt = <3000000>; regulator-max-microvolt = <3300000>;
@@ -439,7 +423,6 @@ }; mt6397_vgp1_reg: ldo_vgp1 { - regulator-compatible = "ldo_vgp1"; regulator-name = "vcamd"; regulator-min-microvolt = <1220000>; regulator-max-microvolt = <3300000>;
@@ -447,7 +430,6 @@ }; mt6397_vgp2_reg: ldo_vgp2 { - regulator-compatible = "ldo_vgp2"; regulator-name = "vcamio"; regulator-min-microvolt = <1000000>; regulator-max-microvolt = <3300000>;
@@ -455,7 +437,6 @@ }; mt6397_vgp3_reg: ldo_vgp3 { - regulator-compatible = "ldo_vgp3"; regulator-name = "vcamaf"; regulator-min-microvolt = <1200000>; regulator-max-microvolt = <3300000>;
@@ -463,7 +444,6 @@ }; mt6397_vgp4_reg: ldo_vgp4 { - regulator-compatible = "ldo_vgp4"; regulator-name = "vgp4"; regulator-min-microvolt = <1200000>; regulator-max-microvolt = <3300000>;
@@ -471,7 +451,6 @@ }; mt6397_vgp5_reg: ldo_vgp5 { - regulator-compatible = "ldo_vgp5"; regulator-name = "vgp5"; regulator-min-microvolt = <1200000>; regulator-max-microvolt = <3000000>;
@@ -479,7 +458,6 @@ }; mt6397_vgp6_reg: ldo_vgp6 { - regulator-compatible = "ldo_vgp6"; regulator-name = "vgp6"; regulator-min-microvolt = <1200000>; regulator-max-microvolt = <3300000>;
@@ -487,7 +465,6 @@ }; mt6397_vibr_reg: ldo_vibr { - regulator-compatible = "ldo_vibr"; regulator-name = "vibr"; regulator-min-microvolt = <1300000>; regulator-max-microvolt = <3300000>;
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 206/393 arm64: dts: mediatek: mt8173-elm: Drop regulator-compatible property
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chen-Yu Tsai <[email protected]>
[ Upstream commit 4b907b3ea5fba240808136cc5599d14b52230b39 ]
The "regulator-compatible" property has been deprecated since 2012 in commit 13511def87b9 ("regulator: deprecate regulator-compatible DT property"), which is so old it's not even mentioned in the converted regulator bindings YAML file. It is also not listed in the MT6397 regulator bindings. Having them present produces a whole bunch of validation errors:
Unevaluated properties are not allowed ('regulator-compatible' was unexpected)
Drop the "regulator-compatible" property from the board dts. The property values are the same as the node name, so everything should continue to work.
--- arch/arm64/boot/dts/mediatek/mt8173-elm.dtsi | 23 -------------------- 1 file changed, 23 deletions(-)
arch/arm64/boot/dts/mediatek/mt8173-elm.dtsi +0 -23
@@ -953,7 +953,6 @@ compatible = "mediatek,mt6397-regulator"; mt6397_vpca15_reg: buck_vpca15 { - regulator-compatible = "buck_vpca15"; regulator-name = "vpca15"; regulator-min-microvolt = < 700000>; regulator-max-microvolt = <1350000>;
@@ -963,7 +962,6 @@ }; mt6397_vpca7_reg: buck_vpca7 { - regulator-compatible = "buck_vpca7"; regulator-name = "vpca7"; regulator-min-microvolt = < 700000>; regulator-max-microvolt = <1350000>;
@@ -973,7 +971,6 @@ }; mt6397_vsramca15_reg: buck_vsramca15 { - regulator-compatible = "buck_vsramca15"; regulator-name = "vsramca15"; regulator-min-microvolt = < 700000>; regulator-max-microvolt = <1350000>;
@@ -982,7 +979,6 @@ }; mt6397_vsramca7_reg: buck_vsramca7 { - regulator-compatible = "buck_vsramca7"; regulator-name = "vsramca7"; regulator-min-microvolt = < 700000>; regulator-max-microvolt = <1350000>;
@@ -991,7 +987,6 @@ }; mt6397_vcore_reg: buck_vcore { - regulator-compatible = "buck_vcore"; regulator-name = "vcore"; regulator-min-microvolt = < 700000>; regulator-max-microvolt = <1350000>;
@@ -1000,7 +995,6 @@ }; mt6397_vgpu_reg: buck_vgpu { - regulator-compatible = "buck_vgpu"; regulator-name = "vgpu"; regulator-min-microvolt = < 700000>; regulator-max-microvolt = <1350000>;
@@ -1009,7 +1003,6 @@ }; mt6397_vdrm_reg: buck_vdrm { - regulator-compatible = "buck_vdrm"; regulator-name = "vdrm"; regulator-min-microvolt = <1200000>; regulator-max-microvolt = <1400000>;
@@ -1018,7 +1011,6 @@ }; mt6397_vio18_reg: buck_vio18 { - regulator-compatible = "buck_vio18"; regulator-name = "vio18"; regulator-min-microvolt = <1620000>; regulator-max-microvolt = <1980000>;
@@ -1027,18 +1019,15 @@ }; mt6397_vtcxo_reg: ldo_vtcxo { - regulator-compatible = "ldo_vtcxo"; regulator-name = "vtcxo"; regulator-always-on; }; mt6397_va28_reg: ldo_va28 { - regulator-compatible = "ldo_va28"; regulator-name = "va28"; }; mt6397_vcama_reg: ldo_vcama { - regulator-compatible = "ldo_vcama"; regulator-name = "vcama"; regulator-min-microvolt = <1800000>; regulator-max-microvolt = <1800000>;
@@ -1046,18 +1035,15 @@ }; mt6397_vio28_reg: ldo_vio28 { - regulator-compatible = "ldo_vio28"; regulator-name = "vio28"; regulator-always-on; }; mt6397_vusb_reg: ldo_vusb { - regulator-compatible = "ldo_vusb"; regulator-name = "vusb"; }; mt6397_vmc_reg: ldo_vmc { - regulator-compatible = "ldo_vmc"; regulator-name = "vmc"; regulator-min-microvolt = <1800000>; regulator-max-microvolt = <3300000>;
@@ -1065,7 +1051,6 @@ }; mt6397_vmch_reg: ldo_vmch { - regulator-compatible = "ldo_vmch"; regulator-name = "vmch"; regulator-min-microvolt = <3000000>; regulator-max-microvolt = <3300000>;
@@ -1073,7 +1058,6 @@ }; mt6397_vemc_3v3_reg: ldo_vemc3v3 { - regulator-compatible = "ldo_vemc3v3"; regulator-name = "vemc_3v3"; regulator-min-microvolt = <3000000>; regulator-max-microvolt = <3300000>;
@@ -1081,7 +1065,6 @@ }; mt6397_vgp1_reg: ldo_vgp1 { - regulator-compatible = "ldo_vgp1"; regulator-name = "vcamd"; regulator-min-microvolt = <1800000>; regulator-max-microvolt = <1800000>;
@@ -1089,7 +1072,6 @@ }; mt6397_vgp2_reg: ldo_vgp2 { - regulator-compatible = "ldo_vgp2"; regulator-name = "vcamio"; regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>;
@@ -1097,7 +1079,6 @@ }; mt6397_vgp3_reg: ldo_vgp3 { - regulator-compatible = "ldo_vgp3"; regulator-name = "vcamaf"; regulator-min-microvolt = <1800000>; regulator-max-microvolt = <1800000>;
@@ -1105,7 +1086,6 @@ }; mt6397_vgp4_reg: ldo_vgp4 { - regulator-compatible = "ldo_vgp4"; regulator-name = "vgp4"; regulator-min-microvolt = <1200000>; regulator-max-microvolt = <3300000>;
@@ -1113,7 +1093,6 @@ }; mt6397_vgp5_reg: ldo_vgp5 { - regulator-compatible = "ldo_vgp5"; regulator-name = "vgp5"; regulator-min-microvolt = <1200000>; regulator-max-microvolt = <3000000>;
@@ -1121,7 +1100,6 @@ }; mt6397_vgp6_reg: ldo_vgp6 { - regulator-compatible = "ldo_vgp6"; regulator-name = "vgp6"; regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>;
@@ -1130,7 +1108,6 @@ }; mt6397_vibr_reg: ldo_vibr { - regulator-compatible = "ldo_vibr"; regulator-name = "vibr"; regulator-min-microvolt = <1300000>; regulator-max-microvolt = <3300000>;
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 207/393 arm64: dts: mediatek: mt8192-asurada: Drop regulator-compatible property
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chen-Yu Tsai <[email protected]>
[ Upstream commit d1fb968551c8688652b8b817bb081fdc9c25cd48 ]
The "regulator-compatible" property has been deprecated since 2012 in commit 13511def87b9 ("regulator: deprecate regulator-compatible DT property"), which is so old it's not even mentioned in the converted regulator bindings YAML file. It should not have been used for new submissions such as the MT6315.
Drop the "regulator-compatible" property from the board dts. The property values are the same as the node name, so everything should continue to work.
--- arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi | 3 --- 1 file changed, 3 deletions(-)
arch/arm64/boot/dts/mediatek/mt8192-asurada.dtsi +0 -3
@@ -1391,7 +1391,6 @@ regulators { mt6315_6_vbuck1: vbuck1 { - regulator-compatible = "vbuck1"; regulator-name = "Vbcpu"; regulator-min-microvolt = <400000>; regulator-max-microvolt = <1193750>;
@@ -1401,7 +1400,6 @@ }; mt6315_6_vbuck3: vbuck3 { - regulator-compatible = "vbuck3"; regulator-name = "Vlcpu"; regulator-min-microvolt = <400000>; regulator-max-microvolt = <1193750>;
@@ -1418,7 +1416,6 @@ regulators { mt6315_7_vbuck1: vbuck1 { - regulator-compatible = "vbuck1"; regulator-name = "Vgpu"; regulator-min-microvolt = <400000>; regulator-max-microvolt = <800000>;
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 208/393 arm64: dts: mediatek: mt8195-cherry: Drop regulator-compatible property
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chen-Yu Tsai <[email protected]>
[ Upstream commit 4dbaa5d5def2c49e44efaa5e796c23d9b904be09 ]
The "regulator-compatible" property has been deprecated since 2012 in commit 13511def87b9 ("regulator: deprecate regulator-compatible DT property"), which is so old it's not even mentioned in the converted regulator bindings YAML file. It should not have been used for new submissions such as the MT6315.
Drop the "regulator-compatible" property from the board dts. The property values are the same as the node name, so everything should continue to work.
--- arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi | 2 -- 1 file changed, 2 deletions(-)
arch/arm64/boot/dts/mediatek/mt8195-cherry.dtsi +0 -2
@@ -1203,7 +1203,6 @@ regulators { mt6315_6_vbuck1: vbuck1 { - regulator-compatible = "vbuck1"; regulator-name = "Vbcpu"; regulator-min-microvolt = <400000>; regulator-max-microvolt = <1193750>;
@@ -1221,7 +1220,6 @@ regulators { mt6315_7_vbuck1: vbuck1 { - regulator-compatible = "vbuck1"; regulator-name = "Vgpu"; regulator-min-microvolt = <400000>; regulator-max-microvolt = <1193750>;
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 209/393 arm64: dts: mediatek: mt8195-demo: Drop regulator-compatible property
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chen-Yu Tsai <[email protected]>
[ Upstream commit 2a8af9b95f504260a6d8200a11f0ae5c90e9f787 ]
The "regulator-compatible" property has been deprecated since 2012 in commit 13511def87b9 ("regulator: deprecate regulator-compatible DT property"), which is so old it's not even mentioned in the converted regulator bindings YAML file. It is also not listed in the MT6360 regulator and charger bindings.
Drop the "regulator-compatible" property from the board dts. The MT6360 bindings actually require the lowercase name, so with the property present the regulators were likely not actually working.
--- arch/arm64/boot/dts/mediatek/mt8195-demo.dts | 9 --------- 1 file changed, 9 deletions(-)
arch/arm64/boot/dts/mediatek/mt8195-demo.dts +0 -9
@@ -137,7 +137,6 @@ richtek,vinovp-microvolt = <14500000>; otg_vbus_regulator: usb-otg-vbus-regulator { - regulator-compatible = "usb-otg-vbus"; regulator-name = "usb-otg-vbus"; regulator-min-microvolt = <4425000>; regulator-max-microvolt = <5825000>;
@@ -149,7 +148,6 @@ LDO_VIN3-supply = <&mt6360_buck2>; mt6360_buck1: buck1 { - regulator-compatible = "BUCK1"; regulator-name = "mt6360,buck1"; regulator-min-microvolt = <300000>; regulator-max-microvolt = <1300000>;
@@ -160,7 +158,6 @@ }; mt6360_buck2: buck2 { - regulator-compatible = "BUCK2"; regulator-name = "mt6360,buck2"; regulator-min-microvolt = <300000>; regulator-max-microvolt = <1300000>;
@@ -171,7 +168,6 @@ }; mt6360_ldo1: ldo1 { - regulator-compatible = "LDO1"; regulator-name = "mt6360,ldo1"; regulator-min-microvolt = <1200000>; regulator-max-microvolt = <3600000>;
@@ -180,7 +176,6 @@ }; mt6360_ldo2: ldo2 { - regulator-compatible = "LDO2"; regulator-name = "mt6360,ldo2"; regulator-min-microvolt = <1200000>; regulator-max-microvolt = <3600000>;
@@ -189,7 +184,6 @@ }; mt6360_ldo3: ldo3 { - regulator-compatible = "LDO3"; regulator-name = "mt6360,ldo3"; regulator-min-microvolt = <1200000>; regulator-max-microvolt = <3600000>;
@@ -198,7 +192,6 @@ }; mt6360_ldo5: ldo5 { - regulator-compatible = "LDO5"; regulator-name = "mt6360,ldo5"; regulator-min-microvolt = <2700000>; regulator-max-microvolt = <3600000>;
@@ -207,7 +200,6 @@ }; mt6360_ldo6: ldo6 { - regulator-compatible = "LDO6"; regulator-name = "mt6360,ldo6"; regulator-min-microvolt = <500000>; regulator-max-microvolt = <2100000>;
@@ -216,7 +208,6 @@ }; mt6360_ldo7: ldo7 { - regulator-compatible = "LDO7"; regulator-name = "mt6360,ldo7"; regulator-min-microvolt = <500000>; regulator-max-microvolt = <2100000>;
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 210/393 arm64: dts: mediatek: mt8173-elm: Fix MT6397 PMIC sub-node names
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chen-Yu Tsai <[email protected]>
[ Upstream commit beb06b727194f68b0a4b5183e50c88265ce185af ]
The MT6397 PMIC bindings specify exact names for its sub-nodes. The names used in the current dts don't match, causing a validation error.
Fix up the names. Also drop the label for the regulators node, since any reference should be against the individual regulator sub-nodes.
--- arch/arm64/boot/dts/mediatek/mt8173-elm.dtsi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
arch/arm64/boot/dts/mediatek/mt8173-elm.dtsi +3 -3
@@ -938,7 +938,7 @@ interrupt-controller; #interrupt-cells = <2>; - clock: mt6397clock { + clock: clocks { compatible = "mediatek,mt6397-clk"; #clock-cells = <1>; };
@@ -949,7 +949,7 @@ #gpio-cells = <2>; }; - regulator: mt6397regulator { + regulators { compatible = "mediatek,mt6397-regulator"; mt6397_vpca15_reg: buck_vpca15 {
@@ -1115,7 +1115,7 @@ }; }; - rtc: mt6397rtc { + rtc: rtc { compatible = "mediatek,mt6397-rtc"; };
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 211/393 arm64: dts: mediatek: mt8173-evb: Fix MT6397 PMIC sub-node names
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chen-Yu Tsai <[email protected]>
[ Upstream commit 9545ba142865b9099d43c972b9ebcf463606499a ]
The MT6397 PMIC bindings specify exact names for its sub-nodes. The names used in the current dts don't match, causing a validation error.
Fix up the names. Also drop the label for the regulators node, since any reference should be against the individual regulator sub-nodes.
--- arch/arm64/boot/dts/mediatek/mt8173-evb.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/mediatek/mt8173-evb.dts +1 -1
@@ -308,7 +308,7 @@ interrupt-controller; #interrupt-cells = <2>; - mt6397regulator: mt6397regulator { + regulators { compatible = "mediatek,mt6397-regulator"; mt6397_vpca15_reg: buck_vpca15 {
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 212/393 ARM: dts: aspeed: yosemite4: correct the compatible string of adm1272
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ricky CX Wu <[email protected]>
[ Upstream commit ece3e20e3389ec8a32944ad44746ee379bf1d3eb ]
Remove the space in the compatible string of adm1272 to match the pattern of compatible.
--- arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-yosemite4.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-yosemite4.dts +2 -2
@@ -284,12 +284,12 @@ &i2c11 { status = "okay"; power-sensor@10 { - compatible = "adi, adm1272"; + compatible = "adi,adm1272"; reg = <0x10>; }; power-sensor@12 { - compatible = "adi, adm1272"; + compatible = "adi,adm1272"; reg = <0x12>; };
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 213/393 ARM: dts: aspeed: yosemite4: Add required properties for IOE on fan boards
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ricky CX Wu <[email protected]>
[ Upstream commit c64ac96f8f8d957cdc6ec3c93dd9a6c4e6d78506 ]
Add the required properties for IO expander on fan boards.
--- arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-yosemite4.dts | 4 ++++ 1 file changed, 4 insertions(+)
arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-yosemite4.dts +4 -0
@@ -463,6 +463,8 @@ gpio@22{ compatible = "ti,tca6424"; reg = <0x22>; + gpio-controller; + #gpio-cells = <2>; }; pwm@23{
@@ -513,6 +515,8 @@ gpio@22{ compatible = "ti,tca6424"; reg = <0x22>; + gpio-controller; + #gpio-cells = <2>; }; pwm@23{
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 214/393 ARM: dts: aspeed: yosemite4: correct the compatible string for max31790
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ricky CX Wu <[email protected]>
[ Upstream commit b1a1ecb669bfa763ee5e86a038d7c9363eee7548 ]
Fix the compatible string for max31790 to match the binding document.
--- .../dts/aspeed/aspeed-bmc-facebook-yosemite4.dts | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-)
arch/arm/boot/dts/aspeed/aspeed-bmc-facebook-yosemite4.dts +4 -12
@@ -454,10 +454,8 @@ }; pwm@20{ - compatible = "max31790"; + compatible = "maxim,max31790"; reg = <0x20>; - #address-cells = <1>; - #size-cells = <0>; }; gpio@22{
@@ -468,10 +466,8 @@ }; pwm@23{ - compatible = "max31790"; + compatible = "maxim,max31790"; reg = <0x23>; - #address-cells = <1>; - #size-cells = <0>; }; adc@33 {
@@ -506,10 +502,8 @@ }; pwm@20{ - compatible = "max31790"; + compatible = "maxim,max31790"; reg = <0x20>; - #address-cells = <1>; - #size-cells = <0>; }; gpio@22{
@@ -520,10 +514,8 @@ }; pwm@23{ - compatible = "max31790"; + compatible = "maxim,max31790"; reg = <0x23>; - #address-cells = <1>; - #size-cells = <0>; }; adc@33 {
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 215/393 arm: dts: socfpga: use reset-name "stmmaceth-ocp" instead of "ahb"
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mamta Shukla <[email protected]>
[ Upstream commit 62a40a0d5634834790f7166ab592be247390d857 ]
The ahb reset is deasserted in probe before first register access, while the stmmacheth-ocp reset needs to be asserted every time before changing the phy mode in Arria10[1].
Changed in Upstream to "ahb"(331085a423b arm64: dts: socfpga: change the reset-name of "stmmaceth-ocp" to "ahb" ).This change was intended for arm64 socfpga and it is not applicable to Arria10.
Further with STMMAC-SELFTEST Driver enabled, ethtool test also FAILS.
$ ethtool -t eth0 [ 322.946709] socfpga-dwmac ff800000.ethernet eth0: entered promiscuous mode [ 323.374558] socfpga-dwmac ff800000.ethernet eth0: left promiscuous mode The test result is FAIL The test extra info: 1. MAC Loopback 0 2. PHY Loopback -110 3. MMC Counters -110 4. EEE -95 5. Hash Filter MC 0 6. Perfect Filter UC -110 7. MC Filter -110 8. UC Filter 0 9. Flow Control -110 10. RSS -95 11. VLAN Filtering -95 12. VLAN Filtering (perf) -95 13. Double VLAN Filter -95 14. Double VLAN Filter (perf) -95 15. Flexible RX Parser -95 16. SA Insertion (desc) -95 17. SA Replacement (desc) -95 18. SA Insertion (reg) -95 19. SA Replacement (reg) -95 20. VLAN TX Insertion -95 21. SVLAN TX Insertion -95 22. L3 DA Filtering -95 23. L3 SA Filtering -95 24. L4 DA TCP Filtering -95 25. L4 SA TCP Filtering -95 26. L4 DA UDP Filtering -95 27. L4 SA UDP Filtering -95 28. ARP Offload -95 29. Jumbo Frame -110 30. Multichannel Jumbo -95 31. Split Header -95 32. TBS (ETF Scheduler) -95
[ 324.881327] socfpga-dwmac ff800000.ethernet eth0: Link is Down [ 327.995360] socfpga-dwmac ff800000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
--- arch/arm/boot/dts/intel/socfpga/socfpga_arria10.dtsi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
arch/arm/boot/dts/intel/socfpga/socfpga_arria10.dtsi +3 -3
@@ -440,7 +440,7 @@ clocks = <&l4_mp_clk>, <&peri_emac_ptp_clk>; clock-names = "stmmaceth", "ptp_ref"; resets = <&rst EMAC0_RESET>, <&rst EMAC0_OCP_RESET>; - reset-names = "stmmaceth", "ahb"; + reset-names = "stmmaceth", "stmmaceth-ocp"; snps,axi-config = <&socfpga_axi_setup>; status = "disabled"; };
@@ -460,7 +460,7 @@ clocks = <&l4_mp_clk>, <&peri_emac_ptp_clk>; clock-names = "stmmaceth", "ptp_ref"; resets = <&rst EMAC1_RESET>, <&rst EMAC1_OCP_RESET>; - reset-names = "stmmaceth", "ahb"; + reset-names = "stmmaceth", "stmmaceth-ocp"; snps,axi-config = <&socfpga_axi_setup>; status = "disabled"; };
@@ -480,7 +480,7 @@ clocks = <&l4_mp_clk>, <&peri_emac_ptp_clk>; clock-names = "stmmaceth", "ptp_ref"; resets = <&rst EMAC2_RESET>, <&rst EMAC2_OCP_RESET>; - reset-names = "stmmaceth", "ahb"; + reset-names = "stmmaceth", "stmmaceth-ocp"; snps,axi-config = <&socfpga_axi_setup>; status = "disabled"; };
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 216/393 RDMA/rxe: Improve newline in printing messages
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Li Zhijian <[email protected]>
[ Upstream commit 6482718086bf69f9616d0b86d03514b17afaeb08 ]
Previously rxe_{dbg,info,err}() macros are appended built-in newline, but some users will add redundant newline sometimes. So remove the built-in newline for these macros.
In terms of rxe_{dbg,info,err}_xxx() macros, because they don't have built-in newline, append newline when using them.
Stable-dep-of: db03b70969aa ("RDMA/rxe: Fix mismatched max_msg_sz")
--- drivers/infiniband/sw/rxe/rxe.c | 6 +- drivers/infiniband/sw/rxe/rxe.h | 6 +- drivers/infiniband/sw/rxe/rxe_comp.c | 4 +- drivers/infiniband/sw/rxe/rxe_cq.c | 4 +- drivers/infiniband/sw/rxe/rxe_mr.c | 16 +- drivers/infiniband/sw/rxe/rxe_mw.c | 2 +- drivers/infiniband/sw/rxe/rxe_qp.c | 8 +- drivers/infiniband/sw/rxe/rxe_resp.c | 12 +- drivers/infiniband/sw/rxe/rxe_task.c | 4 +- drivers/infiniband/sw/rxe/rxe_verbs.c | 216 +++++++++++++------------- 10 files changed, 139 insertions(+), 139 deletions(-)
drivers/infiniband/sw/rxe/rxe.c +3 -3
@@ -163,7 +163,7 @@ void rxe_set_mtu(struct rxe_dev *rxe, unsigned int ndev_mtu) port->attr.active_mtu = mtu; port->mtu_cap =ib_mtu_enum_to_int (mtu); -rxe_info_dev (rxe,"Set mtu to %d" , port->mtu_cap); +rxe_info_dev (rxe,"Set mtu to %d\n" , port->mtu_cap); }/* called by ifc layer to create new rxe device.
@@ -183,7 +183,7 @@ static int rxe_newlink(const char *ibdev_name, struct net_device *ndev)int err =0 ;if (is_vlan_dev (ndev)) { -rxe_err ("rxe creation allowed on top of a real device only" ); +rxe_err ("rxe creation allowed on top of a real device only\n" ); err = -EPERM ; goto err; }
@@ -191,7 +191,7 @@ static int rxe_newlink(const char *ibdev_name, struct net_device *ndev) rxe =rxe_get_dev_from_net (ndev);if (rxe) {ib_device_put (&rxe->ib_dev); -rxe_err_dev (rxe,"already configured on %s" , ndev->name); +rxe_err_dev (rxe,"already configured on %s\n" , ndev->name); err = -EEXIST ; goto err; }
drivers/infiniband/sw/rxe/rxe.h +3 -3
@@ -38,7 +38,7 @@#define RXE_ROCE_V2_SPORT (0xc000) -#define rxe_dbg (fmt, ...) pr_debug("%s: " fmt "\n", __func__, ##__VA_ARGS__) +#define rxe_dbg (fmt, ...) pr_debug("%s: " fmt, __func__, ##__VA_ARGS__)#define rxe_dbg_dev (rxe, fmt, ...) ibdev_dbg(&(rxe)->ib_dev, \ "%s: " fmt, __func__, ##__VA_ARGS__)#define rxe_dbg_uc (uc, fmt, ...) ibdev_dbg((uc)->ibuc.device, \
@@ -58,7 +58,7 @@#define rxe_dbg_mw (mw, fmt, ...) ibdev_dbg((mw)->ibmw.device, \ "mw#%d %s: " fmt, (mw)->elem.index, __func__, ##__VA_ARGS__) -#define rxe_err (fmt, ...) pr_err_ratelimited("%s: " fmt "\n", __func__, \ +#define rxe_err (fmt, ...) pr_err_ratelimited("%s: " fmt, __func__, \ ##__VA_ARGS__)#define rxe_err_dev (rxe, fmt, ...) ibdev_err_ratelimited(&(rxe)->ib_dev, \ "%s: " fmt, __func__, ##__VA_ARGS__)
@@ -79,7 +79,7 @@#define rxe_err_mw (mw, fmt, ...) ibdev_err_ratelimited((mw)->ibmw.device, \ "mw#%d %s: " fmt, (mw)->elem.index, __func__, ##__VA_ARGS__) -#define rxe_info (fmt, ...) pr_info_ratelimited("%s: " fmt "\n", __func__, \ +#define rxe_info (fmt, ...) pr_info_ratelimited("%s: " fmt, __func__, \ ##__VA_ARGS__)#define rxe_info_dev (rxe, fmt, ...) ibdev_info_ratelimited(&(rxe)->ib_dev, \ "%s: " fmt, __func__, ##__VA_ARGS__)
drivers/infiniband/sw/rxe/rxe_comp.c +2 -2
@@ -433,7 +433,7 @@ static void make_send_cqe(struct rxe_qp *qp, struct rxe_send_wqe *wqe, } }else {if (wqe->status !=IB_WC_WR_FLUSH_ERR ) -rxe_err_qp (qp,"non-flush error status = %d" , +rxe_err_qp (qp,"non-flush error status = %d\n" , wqe->status); } }
@@ -582,7 +582,7 @@ static int flush_send_wqe(struct rxe_qp *qp, struct rxe_send_wqe *wqe) err =rxe_cq_post (qp->scq, &cqe,0 );if (err) -rxe_dbg_cq (qp->scq,"post cq failed, err = %d" , err); +rxe_dbg_cq (qp->scq,"post cq failed, err = %d\n" , err);return err; }
drivers/infiniband/sw/rxe/rxe_cq.c +2 -2
@@ -27,7 +27,7 @@ int rxe_cq_chk_attr(struct rxe_dev *rxe, struct rxe_cq *cq,if (cq) { count =queue_count (cq->queue,QUEUE_TYPE_TO_CLIENT );if (cqe < count) { -rxe_dbg_cq (cq,"cqe(%d) < current # elements in queue (%d)" , +rxe_dbg_cq (cq,"cqe(%d) < current # elements in queue (%d)\n" , cqe, count); goto err1; }
@@ -96,7 +96,7 @@ int rxe_cq_post(struct rxe_cq *cq, struct rxe_cqe *cqe, int solicited) full =queue_full (cq->queue,QUEUE_TYPE_TO_CLIENT );if (unlikely (full)) { -rxe_err_cq (cq,"queue full" ); +rxe_err_cq (cq,"queue full\n" );spin_unlock_irqrestore (&cq->cq_lock, flags);if (cq->ibcq.event_handler) { ev.device = cq->ibcq.device;
drivers/infiniband/sw/rxe/rxe_mr.c +8 -8
@@ -34,7 +34,7 @@ int mr_check_range(struct rxe_mr *mr, u64 iova, size_t length)case IB_MR_TYPE_MEM_REG :if (iova < mr->ibmr.iova || iova + length > mr->ibmr.iova + mr->ibmr.length) { -rxe_dbg_mr (mr,"iova/length out of range" ); +rxe_dbg_mr (mr,"iova/length out of range\n" );return -EINVAL ; }return 0 ;
@@ -319,7 +319,7 @@ int rxe_mr_copy(struct rxe_mr *mr, u64 iova, void *addr, err =mr_check_range (mr, iova, length);if (unlikely (err)) { -rxe_dbg_mr (mr,"iova out of range" ); +rxe_dbg_mr (mr,"iova out of range\n" );return err; }
@@ -477,7 +477,7 @@ int rxe_mr_do_atomic_op(struct rxe_mr *mr, u64 iova, int opcode,u64 *va;if (unlikely (mr->state !=RXE_MR_STATE_VALID )) { -rxe_dbg_mr (mr,"mr not in valid state" ); +rxe_dbg_mr (mr,"mr not in valid state\n" );return RESPST_ERR_RKEY_VIOLATION ; }
@@ -490,7 +490,7 @@ int rxe_mr_do_atomic_op(struct rxe_mr *mr, u64 iova, int opcode, err =mr_check_range (mr, iova,sizeof (value));if (err) { -rxe_dbg_mr (mr,"iova out of range" ); +rxe_dbg_mr (mr,"iova out of range\n" );return RESPST_ERR_RKEY_VIOLATION ; } page_offset =rxe_mr_iova_to_page_offset (mr, iova);
@@ -501,7 +501,7 @@ int rxe_mr_do_atomic_op(struct rxe_mr *mr, u64 iova, int opcode, }if (unlikely (page_offset &0x7 )) { -rxe_dbg_mr (mr,"iova not aligned" ); +rxe_dbg_mr (mr,"iova not aligned\n" );return RESPST_ERR_MISALIGNED_ATOMIC ; }
@@ -534,7 +534,7 @@ int rxe_mr_do_atomic_write(struct rxe_mr *mr, u64 iova, u64 value)/* See IBA oA19-28 */ if (unlikely (mr->state !=RXE_MR_STATE_VALID )) { -rxe_dbg_mr (mr,"mr not in valid state" ); +rxe_dbg_mr (mr,"mr not in valid state\n" );return RESPST_ERR_RKEY_VIOLATION ; }
@@ -548,7 +548,7 @@ int rxe_mr_do_atomic_write(struct rxe_mr *mr, u64 iova, u64 value)/* See IBA oA19-28 */ err =mr_check_range (mr, iova,sizeof (value));if (unlikely (err)) { -rxe_dbg_mr (mr,"iova out of range" ); +rxe_dbg_mr (mr,"iova out of range\n" );return RESPST_ERR_RKEY_VIOLATION ; } page_offset =rxe_mr_iova_to_page_offset (mr, iova);
@@ -560,7 +560,7 @@ int rxe_mr_do_atomic_write(struct rxe_mr *mr, u64 iova, u64 value)/* See IBA A19.4.2 */ if (unlikely (page_offset &0x7 )) { -rxe_dbg_mr (mr,"misaligned address" ); +rxe_dbg_mr (mr,"misaligned address\n" );return RESPST_ERR_MISALIGNED_ATOMIC ; }
drivers/infiniband/sw/rxe/rxe_mw.c +1 -1
@@ -198,7 +198,7 @@ int rxe_bind_mw(struct rxe_qp *qp, struct rxe_send_wqe *wqe) }if (access & ~RXE_ACCESS_SUPPORTED_MW ) { -rxe_err_mw (mw,"access %#x not supported" , access); +rxe_err_mw (mw,"access %#x not supported\n" , access); ret = -EOPNOTSUPP ; goto err_drop_mr; }
drivers/infiniband/sw/rxe/rxe_qp.c +4 -4
@@ -201,7 +201,7 @@ static int rxe_init_sq(struct rxe_qp *qp, struct ib_qp_init_attr *init, qp->sq.queue =rxe_queue_init (rxe, &qp->sq.max_wr, wqe_size,QUEUE_TYPE_FROM_CLIENT );if (!qp->sq.queue) { -rxe_err_qp (qp,"Unable to allocate send queue" ); +rxe_err_qp (qp,"Unable to allocate send queue\n" ); err = -ENOMEM ; goto err_out; }
@@ -211,7 +211,7 @@ static int rxe_init_sq(struct rxe_qp *qp, struct ib_qp_init_attr *init, qp->sq.queue->buf, qp->sq.queue->buf_size, &qp->sq.queue->ip);if (err) { -rxe_err_qp (qp,"do_mmap_info failed, err = %d" , err); +rxe_err_qp (qp,"do_mmap_info failed, err = %d\n" , err); goto err_free; }
@@ -292,7 +292,7 @@ static int rxe_init_rq(struct rxe_qp *qp, struct ib_qp_init_attr *init, qp->rq.queue =rxe_queue_init (rxe, &qp->rq.max_wr, wqe_size,QUEUE_TYPE_FROM_CLIENT );if (!qp->rq.queue) { -rxe_err_qp (qp,"Unable to allocate recv queue" ); +rxe_err_qp (qp,"Unable to allocate recv queue\n" ); err = -ENOMEM ; goto err_out; }
@@ -302,7 +302,7 @@ static int rxe_init_rq(struct rxe_qp *qp, struct ib_qp_init_attr *init, qp->rq.queue->buf, qp->rq.queue->buf_size, &qp->rq.queue->ip);if (err) { -rxe_err_qp (qp,"do_mmap_info failed, err = %d" , err); +rxe_err_qp (qp,"do_mmap_info failed, err = %d\n" , err); goto err_free; }
drivers/infiniband/sw/rxe/rxe_resp.c +6 -6
@@ -375,18 +375,18 @@ static enum resp_states rxe_resp_check_length(struct rxe_qp *qp,if ((pkt->mask &RXE_START_MASK ) && (pkt->mask &RXE_END_MASK )) {if (unlikely (payload > mtu)) { -rxe_dbg_qp (qp,"only packet too long" ); +rxe_dbg_qp (qp,"only packet too long\n" );return RESPST_ERR_LENGTH ; } }else if ((pkt->mask &RXE_START_MASK ) || (pkt->mask &RXE_MIDDLE_MASK )) {if (unlikely (payload != mtu)) { -rxe_dbg_qp (qp,"first or middle packet not mtu" ); +rxe_dbg_qp (qp,"first or middle packet not mtu\n" );return RESPST_ERR_LENGTH ; } }else if (pkt->mask &RXE_END_MASK ) {if (unlikely ((payload ==0 ) || (payload > mtu))) { -rxe_dbg_qp (qp,"last packet zero or too long" ); +rxe_dbg_qp (qp,"last packet zero or too long\n" );return RESPST_ERR_LENGTH ; } }
@@ -395,7 +395,7 @@ static enum resp_states rxe_resp_check_length(struct rxe_qp *qp,/* See IBA C9-94 */ if (pkt->mask &RXE_RETH_MASK ) {if (reth_len (pkt) > (1U <<31 )) { -rxe_dbg_qp (qp,"dma length too long" ); +rxe_dbg_qp (qp,"dma length too long\n" );return RESPST_ERR_LENGTH ; } }
@@ -1146,7 +1146,7 @@ static enum resp_states do_complete(struct rxe_qp *qp, } }else {if (wc->status !=IB_WC_WR_FLUSH_ERR ) -rxe_err_qp (qp,"non-flush error status = %d" , +rxe_err_qp (qp,"non-flush error status = %d\n" , wc->status); }
@@ -1455,7 +1455,7 @@ static int flush_recv_wqe(struct rxe_qp *qp, struct rxe_recv_wqe *wqe) err =rxe_cq_post (qp->rcq, &cqe,0 );if (err) -rxe_dbg_cq (qp->rcq,"post cq failed err = %d" , err); +rxe_dbg_cq (qp->rcq,"post cq failed err = %d\n" , err);return err; }
drivers/infiniband/sw/rxe/rxe_task.c +2 -2
@@ -156,7 +156,7 @@ static void do_task(struct rxe_task *task)default :WARN_ON (1 ); -rxe_dbg_qp (task->qp,"unexpected task state = %d" , +rxe_dbg_qp (task->qp,"unexpected task state = %d\n" , task->state); task->state =TASK_STATE_IDLE ; }
@@ -167,7 +167,7 @@ static void do_task(struct rxe_task *task)if (WARN_ON (task->num_done != task->num_sched))rxe_dbg_qp ( task->qp, -"%ld tasks scheduled, %ld tasks done" , +"%ld tasks scheduled, %ld tasks done\n" , task->num_sched, task->num_done); }spin_unlock_irqrestore (&task->lock, flags);
drivers/infiniband/sw/rxe/rxe_verbs.c +108 -108
808 lines not on this page · raw message
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 217/393 RDMA/rxe: Fix mismatched max_msg_sz
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: zhenwei pi <[email protected]>
[ Upstream commit db03b70969aab4ef111a3369cfd90ea4da3a6aa0 ]
User mode queries max_msg_sz as 0x800000 by command 'ibv_devinfo -v', however ibv_post_send/ibv_post_recv has a limit of 2^31. Fix this mismatched information.
--- drivers/infiniband/sw/rxe/rxe_param.h | 2 +- drivers/infiniband/sw/rxe/rxe_verbs.c | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-)
drivers/infiniband/sw/rxe/rxe_param.h +1 -1
@@ -129,7 +129,7 @@ enum rxe_device_param {enum rxe_port_param {RXE_PORT_GID_TBL_LEN =1024 ,RXE_PORT_PORT_CAP_FLAGS =IB_PORT_CM_SUP , -RXE_PORT_MAX_MSG_SZ =0x800000 , +RXE_PORT_MAX_MSG_SZ = (1UL <<31 ),RXE_PORT_BAD_PKEY_CNTR =0 ,RXE_PORT_QKEY_VIOL_CNTR =0 ,RXE_PORT_LID =0 ,
drivers/infiniband/sw/rxe/rxe_verbs.c +2 -3
@@ -688,7 +688,7 @@ static int validate_send_wr(struct rxe_qp *qp, const struct ib_send_wr *ibwr,for (i =0 ; i < ibwr->num_sge; i++) length += ibwr->sg_list[i].length; -if (length > (1UL <<31 )) { +if (length >RXE_PORT_MAX_MSG_SZ ) {rxe_err_qp (qp,"message length too long\n" );break ; }
@@ -977,8 +977,7 @@ static int post_one_recv(struct rxe_rq *rq, const struct ib_recv_wr *ibwr)for (i =0 ; i < num_sge; i++) length += ibwr->sg_list[i].length; -/* IBA max message size is 2^31 */ -if (length >= (1UL <<31 )) { +if (length >RXE_PORT_MAX_MSG_SZ ) { err = -EINVAL ;rxe_dbg ("message length too long\n" ); goto err_out;
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 218/393 arm64: dts: mediatek: mt8183: kenzo: Support second source touchscreen
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Hsin-Te Yuan <[email protected]>
[ Upstream commit 5ec5dc73c5ac0c6e06803dc3b5aea4493e856568 ]
Some kenzo devices use second source touchscreen.
--- .../dts/mediatek/mt8183-kukui-jacuzzi-kenzo.dts | 15 +++++++++++++++ 1 file changed, 15 insertions(+)
arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-kenzo.dts +15 -0
@@ -11,3 +11,18 @@ model = "Google kenzo sku17 board"; compatible = "google,juniper-sku17", "google,juniper", "mediatek,mt8183"; }; + +&i2c0 { + touchscreen@40 { + compatible = "hid-over-i2c"; + reg = <0x40>; + + pinctrl-names = "default"; + pinctrl-0 = <&touchscreen_pins>; + + interrupts-extended = <&pio 155 IRQ_TYPE_LEVEL_LOW>; + + post-power-on-delay-ms = <70>; + hid-descr-addr = <0x0001>; + }; +};
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 219/393 arm64: dts: mediatek: mt8183: willow: Support second source touchscreen
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Hsin-Te Yuan <[email protected]>
[ Upstream commit 9594935260d76bffe200bea6cfab6ba0752e70d9 ]
Some willow devices use second source touchscreen.
--- .../dts/mediatek/mt8183-kukui-jacuzzi-willow.dtsi | 15 +++++++++++++++ 1 file changed, 15 insertions(+)
arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi-willow.dtsi +15 -0
@@ -6,6 +6,21 @@ /dts-v1/; #include "mt8183-kukui-jacuzzi.dtsi" +&i2c0 { + touchscreen@40 { + compatible = "hid-over-i2c"; + reg = <0x40>; + + pinctrl-names = "default"; + pinctrl-0 = <&touchscreen_pins>; + + interrupts-extended = <&pio 155 IRQ_TYPE_LEVEL_LOW>; + + post-power-on-delay-ms = <70>; + hid-descr-addr = <0x0001>; + }; +}; + &i2c2 { trackpad@2c { compatible = "hid-over-i2c";
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 220/393 RDMA/srp: Fix error handling in srp_add_port
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Ma Ke <[email protected]>
[ Upstream commit a3cbf68c69611188cd304229e346bffdabfd4277 ]
As comment of device_add() says, if device_add() succeeds, you should call device_del() when you want to get rid of it. If device_add() has not succeeded, use only put_device() to drop the reference count.
Add a put_device() call before returning from the function to decrement reference count for cleanup.
Found by code review.
--- drivers/infiniband/ulp/srp/ib_srp.c | 1 - 1 file changed, 1 deletion(-)
drivers/infiniband/ulp/srp/ib_srp.c +0 -1
@@ -3978,7 +3978,6 @@ static struct srp_host *srp_add_port(struct srp_device *device, u32 port)return host; put_host: -device_del (&host->dev);put_device (&host->dev);return NULL ; }
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 221/393 arm64: dts: mediatek: mt8195: Remove suspend-breaking reset from pcie1
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Nícolas F. R. A. Prado <[email protected]>
[ Upstream commit 3d7fdd8e38aafd4858935df2392762c1ab8fb40f ]
The MAC reset for PCIe port 1 on MT8195 when asserted during suspend causes the system to hang during resume with the following error (with no_console_suspend enabled):
mtk-pcie-gen3 112f8000.pcie: PCIe link down, current LTSSM state: detect.quiet (0x0) mtk-pcie-gen3 112f8000.pcie: PM: dpm_run_callback(): genpd_resume_noirq+0x0/0x24 returns -110 mtk-pcie-gen3 112f8000.pcie: PM: failed to resume noirq: error -110
This issue is specific to MT8195. On MT8192 with the PCIe reset, MT8192_INFRA_RST4_PCIE_TOP_SWRST, added to the DT node, the issue is not observed.
Since without the reset, the PCIe controller and WiFi card connected to it, work just as well, remove the reset to allow the system to suspend and resume properly.
--- arch/arm64/boot/dts/mediatek/mt8195.dtsi | 3 --- 1 file changed, 3 deletions(-)
arch/arm64/boot/dts/mediatek/mt8195.dtsi +0 -3
@@ -1572,9 +1572,6 @@ phy-names = "pcie-phy"; power-domains = <&spm MT8195_POWER_DOMAIN_PCIE_MAC_P1>; - resets = <&infracfg_ao MT8195_INFRA_RST2_PCIE_P1_SWRST>; - reset-names = "mac"; - #interrupt-cells = <1>; interrupt-map-mask = <0 0 0 7>; interrupt-map = <0 0 0 1 &pcie_intc1 0>,
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 222/393 ARM: dts: stm32: Deduplicate serial aliases and chosen node for STM32MP15xx DHCOM SoM
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Marek Vasut <[email protected]>
[ Upstream commit 73317d327123472cb70e9ecbe050310f1d235e93 ]
Deduplicate /aliases { serialN = ... } and /chosen node into stm32mp15xx-dhcom-som.dtsi , since the content is identical on all carrier boards using the STM32MP15xx DHCOM SoM. No functional change.
Stable-dep-of: 479b8227ffc4 ("ARM: dts: stm32: Swap USART3 and UART8 alias on STM32MP15xx DHCOM SoM")
--- arch/arm/boot/dts/st/stm32mp15xx-dhcom-drc02.dtsi | 12 ------------ arch/arm/boot/dts/st/stm32mp15xx-dhcom-pdk2.dtsi | 10 ---------- arch/arm/boot/dts/st/stm32mp15xx-dhcom-picoitx.dtsi | 10 ---------- arch/arm/boot/dts/st/stm32mp15xx-dhcom-som.dtsi | 7 +++++++ 4 files changed, 7 insertions(+), 32 deletions(-)
arch/arm/boot/dts/st/stm32mp15xx-dhcom-drc02.dtsi +0 -12
@@ -6,18 +6,6 @@ #include <dt-bindings/input/input.h> #include <dt-bindings/pwm/pwm.h> -/ { - aliases { - serial0 = &uart4; - serial1 = &usart3; - serial2 = &uart8; - }; - - chosen { - stdout-path = "serial0:115200n8"; - }; -}; - &adc { status = "disabled"; };
arch/arm/boot/dts/st/stm32mp15xx-dhcom-pdk2.dtsi +0 -10
@@ -7,16 +7,6 @@ #include <dt-bindings/pwm/pwm.h> / { - aliases { - serial0 = &uart4; - serial1 = &usart3; - serial2 = &uart8; - }; - - chosen { - stdout-path = "serial0:115200n8"; - }; - clk_ext_audio_codec: clock-codec { compatible = "fixed-clock"; #clock-cells = <0>;
arch/arm/boot/dts/st/stm32mp15xx-dhcom-picoitx.dtsi +0 -10
@@ -7,16 +7,6 @@ #include <dt-bindings/pwm/pwm.h> / { - aliases { - serial0 = &uart4; - serial1 = &usart3; - serial2 = &uart8; - }; - - chosen { - stdout-path = "serial0:115200n8"; - }; - led { compatible = "gpio-leds";
arch/arm/boot/dts/st/stm32mp15xx-dhcom-som.dtsi +7 -0
@@ -14,6 +14,13 @@ ethernet1 = &ksz8851; rtc0 = &hwrtc; rtc1 = &rtc; + serial0 = &uart4; + serial1 = &usart3; + serial2 = &uart8; + }; + + chosen { + stdout-path = "serial0:115200n8"; }; memory@c0000000 {
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 223/393 ARM: dts: stm32: Swap USART3 and UART8 alias on STM32MP15xx DHCOM SoM
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Marek Vasut <[email protected]>
[ Upstream commit 479b8227ffc433929ba49200182b6383569f9615 ]
Swap USART3 and UART8 aliases on STM32MP15xx DHCOM SoM, make sure UART8 is listed first, USART3 second, because the UART8 is labeled as UART2 on the SoM pinout, while USART3 is labeled as UART3 on the SoM pinout.
--- arch/arm/boot/dts/st/stm32mp15xx-dhcom-som.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/boot/dts/st/stm32mp15xx-dhcom-som.dtsi +2 -2
@@ -15,8 +15,8 @@ rtc0 = &hwrtc; rtc1 = &rtc; serial0 = &uart4; - serial1 = &usart3; - serial2 = &uart8; + serial1 = &uart8; + serial2 = &usart3; }; chosen {
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 224/393 memory: tegra20-emc: fix an OF node reference bug in tegra_emc_find_node_by_ram_code()
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Joe Hattori <[email protected]>
[ Upstream commit b9784e5cde1f9fb83661a70e580e381ae1264d12 ]
As of_find_node_by_name() release the reference of the argument device node, tegra_emc_find_node_by_ram_code() releases some device nodes while still in use, resulting in possible UAFs. According to the bindings and the in-tree DTS files, the "emc-tables" node is always device's child node with the property "nvidia,use-ram-code", and the "lpddr2" node is a child of the "emc-tables" node. Thus utilize the for_each_child_of_node() macro and of_get_child_by_name() instead of of_find_node_by_name() to simplify the code.
This bug was found by an experimental verification tool that I am developing.
--- drivers/memory/tegra/tegra20-emc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/memory/tegra/tegra20-emc.c +4 -4
@@ -477,14 +477,15 @@ tegra_emc_find_node_by_ram_code(struct tegra_emc *emc) ram_code =tegra_read_ram_code (); -for (np =of_find_node_by_name (dev->of_node,"emc-tables" ); np; - np =of_find_node_by_name (np,"emc-tables" )) { +for_each_child_of_node (dev->of_node, np) { +if (!of_node_name_eq (np,"emc-tables" )) +continue ; err =of_property_read_u32 (np,"nvidia,ram-code" , &value);if (err || value != ram_code) {struct device_node *lpddr2_np;bool cfg_mismatches = false; - lpddr2_np =of_find_node_by_name (np,"lpddr2" ); + lpddr2_np =of_get_child_by_name (np,"lpddr2" );if (lpddr2_np) {const struct lpddr2_info *info;
@@ -521,7 +522,6 @@ tegra_emc_find_node_by_ram_code(struct tegra_emc *emc) }if (cfg_mismatches) { -of_node_put (np);continue ; } }
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 225/393 arm64: dts: mediatek: mt8183-kukui-jacuzzi: Drop pp3300_panel voltage settings
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Chen-Yu Tsai <[email protected]>
[ Upstream commit 0b5b1c881a909f17c05ef4b1ccb421e077f6e466 ]
The pp3300_panel fixed regulator is just a load switch. It does not have any regulating capabilities. Thus having voltage constraints on it is wrong.
Remove the voltage constraints.
--- arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi.dtsi | 2 -- 1 file changed, 2 deletions(-)
arch/arm64/boot/dts/mediatek/mt8183-kukui-jacuzzi.dtsi +0 -2
@@ -39,8 +39,6 @@ pp3300_panel: pp3300-panel { compatible = "regulator-fixed"; regulator-name = "pp3300_panel"; - regulator-min-microvolt = <3300000>; - regulator-max-microvolt = <3300000>; pinctrl-names = "default"; pinctrl-0 = <&pp3300_panel_pins>;
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 226/393 arm64: dts: qcom: msm8996-xiaomi-gemini: Fix LP5562 LED1 reg property
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Marek Vasut <[email protected]>
[ Upstream commit 02e784c5023232c48c6ec79b52ac8929d4e4db34 ]
The LP5562 led@1 reg property should likely be set to 1 to match the unit. Fix it.
--- arch/arm64/boot/dts/qcom/msm8996-xiaomi-gemini.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/qcom/msm8996-xiaomi-gemini.dts +1 -1
@@ -64,7 +64,7 @@ }; led@1 { - reg = <0>; + reg = <1>; chan-name = "button-backlight1"; led-cur = /bits/ 8 <0x32>; max-cur = /bits/ 8 <0xc8>;
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 227/393 arm64: dts: qcom: sa8775p-ride: Describe sgmii_phy0 irq
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Andrew Halaney <[email protected]>
[ Upstream commit 1ff6569b0ffe7a2e311104cb3cd841983e484ac9 ]
There's an irq hooked up, so let's describe it.
Prior to commit 9757300d2750
("pinctrl: qcom: Add intr_target_width field to support increased number of interrupt targets") one would not see the IRQ fire, despite some (invasive) debugging
showing that the GPIO was in fact asserted, resulting in the interface
staying down.
Now that the IRQ is properly routed we can describe it.
Stable-dep-of: 30f7dfd2c489 ("arm64: dts: qcom: sa8775p: Update sleep_clk frequency")
--- arch/arm64/boot/dts/qcom/sa8775p-ride.dts | 1 + 1 file changed, 1 insertion(+)
arch/arm64/boot/dts/qcom/sa8775p-ride.dts +1 -0
@@ -285,6 +285,7 @@ compatible = "ethernet-phy-id0141.0dd4"; reg = <0x8>; device_type = "ethernet-phy"; + interrupts-extended = <&tlmm 7 IRQ_TYPE_EDGE_FALLING>; reset-gpios = <&pmm8654au_2_gpios 8 GPIO_ACTIVE_LOW>; reset-assert-us = <11000>; reset-deassert-us = <70000>;
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 228/393 arm64: dts: qcom: sa8775p-ride: Describe sgmii_phy1 irq
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Andrew Halaney <[email protected]>
[ Upstream commit 454557d0032d088b4f467f0c541f98edb01fe431 ]
There's an irq hooked up, so let's describe it.
Prior to commit 9757300d2750
("pinctrl: qcom: Add intr_target_width field to support increased number of interrupt targets") one would not see the IRQ fire, despite some (invasive) debugging
showing that the GPIO was in fact asserted, resulting in the interface
staying down.
Now that the IRQ is properly routed we can describe it.
Stable-dep-of: 30f7dfd2c489 ("arm64: dts: qcom: sa8775p: Update sleep_clk frequency")
--- arch/arm64/boot/dts/qcom/sa8775p-ride.dts | 1 + 1 file changed, 1 insertion(+)
arch/arm64/boot/dts/qcom/sa8775p-ride.dts +1 -0
@@ -295,6 +295,7 @@ compatible = "ethernet-phy-id0141.0dd4"; reg = <0xa>; device_type = "ethernet-phy"; + interrupts-extended = <&tlmm 26 IRQ_TYPE_EDGE_FALLING>; reset-gpios = <&pmm8654au_2_gpios 9 GPIO_ACTIVE_LOW>; reset-assert-us = <11000>; reset-deassert-us = <70000>;
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 229/393 arm64: dts: qcom: sa8775p-ride: enable pmm8654au_0_pon_resin
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Shazad Hussain <[email protected]>
[ Upstream commit 81c8ec77b86fde629d5beea1ebe42caeea57c5a4 ]
The volume down key is controlled by PMIC via the PON hardware on sa8775p platform, so enable the same for sa8775p-ride.
Stable-dep-of: 30f7dfd2c489 ("arm64: dts: qcom: sa8775p: Update sleep_clk frequency")
--- arch/arm64/boot/dts/qcom/sa8775p-ride.dts | 5 +++++ 1 file changed, 5 insertions(+)
arch/arm64/boot/dts/qcom/sa8775p-ride.dts +5 -0
@@ -461,6 +461,11 @@ "ANALOG_PON_OPT"; }; +&pmm8654au_0_pon_resin { + linux,code = <KEY_VOLUMEDOWN>; + status = "okay"; +}; + &pmm8654au_1_gpios { gpio-line-names = "PMIC_C_ID0", "PMIC_C_ID1",
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 230/393 arm64: dts: qcom: move common parts for sa8775p-ride variants into a .dtsi
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Bartosz Golaszewski <[email protected]>
[ Upstream commit fe15631117f8d85b1bc4e0c3b434c78be483a43d ]
In order to support multiple revisions of the sa8775p-ride board, create a .dtsi containing the common parts and split out the ethernet bits into the actual board file as they will change in revision 3.
Stable-dep-of: 30f7dfd2c489 ("arm64: dts: qcom: sa8775p: Update sleep_clk frequency")
--- arch/arm64/boot/dts/qcom/sa8775p-ride.dts | 834 +-------------------- arch/arm64/boot/dts/qcom/sa8775p-ride.dtsi | 814 ++++++++++++++++++++ 2 files changed, 835 insertions(+), 813 deletions(-) create mode 100644 arch/arm64/boot/dts/qcom/sa8775p-ride.dtsi
arch/arm64/boot/dts/qcom/sa8775p-ride.dts +21 -813
@@ -5,835 +5,43 @@ /dts-v1/; -#include <dt-bindings/gpio/gpio.h> -#include <dt-bindings/regulator/qcom,rpmh-regulator.h> - -#include "sa8775p.dtsi" -#include "sa8775p-pmics.dtsi" +#include "sa8775p-ride.dtsi" / { model = "Qualcomm SA8775P Ride"; compatible = "qcom,sa8775p-ride", "qcom,sa8775p"; - - aliases { - ethernet0 = ðernet0; - ethernet1 = ðernet1; - i2c11 = &i2c11; - i2c18 = &i2c18; - serial0 = &uart10; - serial1 = &uart12; - serial2 = &uart17; - spi16 = &spi16; - ufshc1 = &ufs_mem_hc; - }; - - chosen { - stdout-path = "serial0:115200n8"; - }; -}; - -&apps_rsc { - regulators-0 { - compatible = "qcom,pmm8654au-rpmh-regulators"; - qcom,pmic-id = "a"; - - vreg_s4a: smps4 { - regulator-name = "vreg_s4a"; - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1816000>; - regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; - }; - - vreg_s5a: smps5 { - regulator-name = "vreg_s5a"; - regulator-min-microvolt = <1850000>; - regulator-max-microvolt = <1996000>; - regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; - }; - - vreg_s9a: smps9 { - regulator-name = "vreg_s9a"; - regulator-min-microvolt = <535000>; - regulator-max-microvolt = <1120000>; - regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; - }; - - vreg_l4a: ldo4 { - regulator-name = "vreg_l4a"; - regulator-min-microvolt = <788000>; - regulator-max-microvolt = <1050000>; - regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; - regulator-allow-set-load; - regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM - RPMH_REGULATOR_MODE_HPM>; - }; - - vreg_l5a: ldo5 { - regulator-name = "vreg_l5a"; - regulator-min-microvolt = <870000>; - regulator-max-microvolt = <950000>; - regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; - regulator-allow-set-load; - regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM - RPMH_REGULATOR_MODE_HPM>; - }; - - vreg_l6a: ldo6 { - regulator-name = "vreg_l6a"; - regulator-min-microvolt = <870000>; - regulator-max-microvolt = <970000>; - regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; - regulator-allow-set-load; - regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM - RPMH_REGULATOR_MODE_HPM>; - }; - - vreg_l7a: ldo7 { - regulator-name = "vreg_l7a"; - regulator-min-microvolt = <720000>; - regulator-max-microvolt = <950000>; - regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; - regulator-allow-set-load; - regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM - RPMH_REGULATOR_MODE_HPM>; - }; - - vreg_l8a: ldo8 { - regulator-name = "vreg_l8a"; - regulator-min-microvolt = <2504000>; - regulator-max-microvolt = <3300000>; - regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; - regulator-allow-set-load; - regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM - RPMH_REGULATOR_MODE_HPM>; - }; - - vreg_l9a: ldo9 { - regulator-name = "vreg_l9a"; - regulator-min-microvolt = <2970000>; - regulator-max-microvolt = <3544000>; - regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; - regulator-allow-set-load; - regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM - RPMH_REGULATOR_MODE_HPM>; - }; - }; - - regulators-1 { - compatible = "qcom,pmm8654au-rpmh-regulators"; - qcom,pmic-id = "c"; - - vreg_l1c: ldo1 { - regulator-name = "vreg_l1c"; - regulator-min-microvolt = <1140000>; - regulator-max-microvolt = <1260000>; - regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; - regulator-allow-set-load; - regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM - RPMH_REGULATOR_MODE_HPM>; - }; - - vreg_l2c: ldo2 { - regulator-name = "vreg_l2c"; - regulator-min-microvolt = <900000>; - regulator-max-microvolt = <1100000>; - regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; - regulator-allow-set-load; - regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM - RPMH_REGULATOR_MODE_HPM>; - }; - - vreg_l3c: ldo3 { - regulator-name = "vreg_l3c"; - regulator-min-microvolt = <1100000>; - regulator-max-microvolt = <1300000>; - regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; - regulator-allow-set-load; - regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM - RPMH_REGULATOR_MODE_HPM>; - }; - - vreg_l4c: ldo4 { - regulator-name = "vreg_l4c"; - regulator-min-microvolt = <1200000>; - regulator-max-microvolt = <1200000>; - regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; - /* - * FIXME: This should have regulator-allow-set-load but - * we're getting an over-current fault from the PMIC - * when switching to LPM. - */ - }; - - vreg_l5c: ldo5 { - regulator-name = "vreg_l5c"; - regulator-min-microvolt = <1100000>; - regulator-max-microvolt = <1300000>; - regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; - regulator-allow-set-load; - regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM - RPMH_REGULATOR_MODE_HPM>; - }; - - vreg_l6c: ldo6 { - regulator-name = "vreg_l6c"; - regulator-min-microvolt = <1620000>; - regulator-max-microvolt = <1980000>; - regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; - regulator-allow-set-load; - regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM - RPMH_REGULATOR_MODE_HPM>; - }; - - vreg_l7c: ldo7 { - regulator-name = "vreg_l7c"; - regulator-min-microvolt = <1620000>; - regulator-max-microvolt = <2000000>; - regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; - regulator-allow-set-load; - regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM - RPMH_REGULATOR_MODE_HPM>; - }; - - vreg_l8c: ldo8 { - regulator-name = "vreg_l8c"; - regulator-min-microvolt = <2400000>; - regulator-max-microvolt = <3300000>; - regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; - regulator-allow-set-load; - regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM - RPMH_REGULATOR_MODE_HPM>; - }; - - vreg_l9c: ldo9 { - regulator-name = "vreg_l9c"; - regulator-min-microvolt = <1650000>; - regulator-max-microvolt = <2700000>; - regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; - regulator-allow-set-load; - regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM - RPMH_REGULATOR_MODE_HPM>; - }; - }; - - regulators-2 { - compatible = "qcom,pmm8654au-rpmh-regulators"; - qcom,pmic-id = "e"; - - vreg_s4e: smps4 { - regulator-name = "vreg_s4e"; - regulator-min-microvolt = <970000>; - regulator-max-microvolt = <1520000>; - regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; - }; - - vreg_s7e: smps7 { - regulator-name = "vreg_s7e"; - regulator-min-microvolt = <1010000>; - regulator-max-microvolt = <1170000>; - regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; - }; - - vreg_s9e: smps9 { - regulator-name = "vreg_s9e"; - regulator-min-microvolt = <300000>; - regulator-max-microvolt = <570000>; - regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; - }; - - vreg_l6e: ldo6 { - regulator-name = "vreg_l6e"; - regulator-min-microvolt = <1280000>; - regulator-max-microvolt = <1450000>; - regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; - regulator-allow-set-load; - regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM - RPMH_REGULATOR_MODE_HPM>; - }; - - vreg_l8e: ldo8 { - regulator-name = "vreg_l8e"; - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1950000>; - regulator-initial-mode = <RPMH_REGULATOR_MODE_HPM>; - regulator-allow-set-load; - regulator-allowed-modes = <RPMH_REGULATOR_MODE_LPM - RPMH_REGULATOR_MODE_HPM>; - }; - }; }; ðernet0 { phy-mode = "sgmii"; - phy-handle = <&sgmii_phy0>; - - pinctrl-0 = <ðernet0_default>; - pinctrl-names = "default"; - - snps,mtl-rx-config = <&mtl_rx_setup>; - snps,mtl-tx-config = <&mtl_tx_setup>; - snps,ps-speed = <1000>; - - status = "okay"; - - mdio { - compatible = "snps,dwmac-mdio"; - #address-cells = <1>; - #size-cells = <0>; - - sgmii_phy0: phy@8 { - compatible = "ethernet-phy-id0141.0dd4"; - reg = <0x8>; - device_type = "ethernet-phy"; - interrupts-extended = <&tlmm 7 IRQ_TYPE_EDGE_FALLING>; - reset-gpios = <&pmm8654au_2_gpios 8 GPIO_ACTIVE_LOW>; - reset-assert-us = <11000>; - reset-deassert-us = <70000>; - }; - - sgmii_phy1: phy@a { - compatible = "ethernet-phy-id0141.0dd4"; - reg = <0xa>; - device_type = "ethernet-phy"; - interrupts-extended = <&tlmm 26 IRQ_TYPE_EDGE_FALLING>; - reset-gpios = <&pmm8654au_2_gpios 9 GPIO_ACTIVE_LOW>; - reset-assert-us = <11000>; - reset-deassert-us = <70000>; - }; - }; - - mtl_rx_setup: rx-queues-config { - snps,rx-queues-to-use = <4>; - snps,rx-sched-sp; - - queue0 { - snps,dcb-algorithm; - snps,map-to-dma-channel = <0x0>; - snps,route-up; - snps,priority = <0x1>; - }; - - queue1 { - snps,dcb-algorithm; - snps,map-to-dma-channel = <0x1>; - snps,route-ptp; - }; - - queue2 { - snps,avb-algorithm; - snps,map-to-dma-channel = <0x2>; - snps,route-avcp; - }; - - queue3 { - snps,avb-algorithm; - snps,map-to-dma-channel = <0x3>; - snps,priority = <0xc>; - }; - }; - - mtl_tx_setup: tx-queues-config { - snps,tx-queues-to-use = <4>; - snps,tx-sched-sp; - - queue0 { - snps,dcb-algorithm; - }; - - queue1 { - snps,dcb-algorithm; - }; - - queue2 { - snps,avb-algorithm; - snps,send_slope = <0x1000>; - snps,idle_slope = <0x1000>; - snps,high_credit = <0x3e800>; - snps,low_credit = <0xffc18000>; - }; - - queue3 { - snps,avb-algorithm; - snps,send_slope = <0x1000>; - snps,idle_slope = <0x1000>; - snps,high_credit = <0x3e800>; - snps,low_credit = <0xffc18000>; - }; - }; }; ðernet1 { phy-mode = "sgmii"; - phy-handle = <&sgmii_phy1>; - - snps,mtl-rx-config = <&mtl_rx_setup1>; - snps,mtl-tx-config = <&mtl_tx_setup1>; - snps,ps-speed = <1000>; - - status = "okay"; - - mtl_rx_setup1: rx-queues-config { - snps,rx-queues-to-use = <4>; - snps,rx-sched-sp; - - queue0 { - snps,dcb-algorithm; - snps,map-to-dma-channel = <0x0>; - snps,route-up; - snps,priority = <0x1>; - }; - - queue1 { - snps,dcb-algorithm; - snps,map-to-dma-channel = <0x1>; - snps,route-ptp; - }; - - queue2 { - snps,avb-algorithm; - snps,map-to-dma-channel = <0x2>; - snps,route-avcp; - }; - - queue3 { - snps,avb-algorithm; - snps,map-to-dma-channel = <0x3>; - snps,priority = <0xc>; - }; - }; - - mtl_tx_setup1: tx-queues-config { - snps,tx-queues-to-use = <4>; - snps,tx-sched-sp; - - queue0 { - snps,dcb-algorithm; - }; - - queue1 { - snps,dcb-algorithm; - }; - - queue2 { - snps,avb-algorithm; - snps,send_slope = <0x1000>; - snps,idle_slope = <0x1000>; - snps,high_credit = <0x3e800>; - snps,low_credit = <0xffc18000>; - }; - - queue3 { - snps,avb-algorithm; - snps,send_slope = <0x1000>; - snps,idle_slope = <0x1000>; - snps,high_credit = <0x3e800>; - snps,low_credit = <0xffc18000>; - }; - }; -}; - -&i2c11 { - clock-frequency = <400000>; - pinctrl-0 = <&qup_i2c11_default>; - pinctrl-names = "default"; - status = "okay"; -}; - -&i2c18 { - clock-frequency = <400000>; - pinctrl-0 = <&qup_i2c18_default>; - pinctrl-names = "default"; - status = "okay"; -}; - -&pmm8654au_0_gpios { - gpio-line-names = "DS_EN", - "POFF_COMPLETE", - "UFS0_VER_ID", - "FAST_POFF", - "DBU1_PON_DONE", - "AOSS_SLEEP", - "CAM_DES0_EN", - "CAM_DES1_EN", - "CAM_DES2_EN", - "CAM_DES3_EN", - "UEFI", - "ANALOG_PON_OPT"; -}; - -&pmm8654au_0_pon_resin { - linux,code = <KEY_VOLUMEDOWN>; - status = "okay"; -}; - -&pmm8654au_1_gpios { - gpio-line-names = "PMIC_C_ID0", - "PMIC_C_ID1", - "UFS1_VER_ID", - "IPA_PWR", - "", - "WLAN_DBU4_EN", - "WLAN_EN", - "BT_EN", - "USB2_PWR_EN", - "USB2_FAULT"; - - usb2_en_state: usb2-en-state { - pins = "gpio9"; - function = "normal"; - output-high; - power-source = <0>; - }; -}; - -&pmm8654au_2_gpios { - gpio-line-names = "PMIC_E_ID0", - "PMIC_E_ID1", - "USB0_PWR_EN", - "USB0_FAULT", - "SENSOR_IRQ_1", - "SENSOR_IRQ_2", - "SENSOR_RST", - "SGMIIO0_RST", - "SGMIIO1_RST", - "USB1_PWR_ENABLE", - "USB1_FAULT", - "VMON_SPX8"; - - usb0_en_state: usb0-en-state { - pins = "gpio3"; - function = "normal"; - output-high; - power-source = <0>; - }; - - usb1_en_state: usb1-en-state { - pins = "gpio10"; - function = "normal"; - output-high; - power-source = <0>; - }; -}; - -&pmm8654au_3_gpios { - gpio-line-names = "PMIC_G_ID0", - "PMIC_G_ID1", - "GNSS_RST", - "GNSS_EN", - "GNSS_BOOT_MODE"; -}; - -&qupv3_id_1 { - status = "okay"; -}; - -&qupv3_id_2 { - status = "okay"; -}; - -&serdes0 { - phy-supply = <&vreg_l5a>; - status = "okay"; -}; - -&serdes1 { - phy-supply = <&vreg_l5a>; - status = "okay"; -}; - -&sleep_clk { - clock-frequency = <32764>; -}; - -&spi16 { - pinctrl-0 = <&qup_spi16_default>; - pinctrl-names = "default"; - status = "okay"; }; -&tlmm { - ethernet0_default: ethernet0-default-state { - ethernet0_mdc: ethernet0-mdc-pins { - pins = "gpio8"; - function = "emac0_mdc"; - drive-strength = <16>; - bias-pull-up; - }; - - ethernet0_mdio: ethernet0-mdio-pins { - pins = "gpio9"; - function = "emac0_mdio"; - drive-strength = <16>; - bias-pull-up; - }; - }; - - qup_uart10_default: qup-uart10-state { - pins = "gpio46", "gpio47"; - function = "qup1_se3"; - }; - - qup_spi16_default: qup-spi16-state { - pins = "gpio86", "gpio87", "gpio88", "gpio89"; - function = "qup2_se2"; - drive-strength = <6>; - bias-disable; - }; - - qup_i2c11_default: qup-i2c11-state { - pins = "gpio48", "gpio49"; - function = "qup1_se4"; - drive-strength = <2>; - bias-pull-up; - }; - - qup_i2c18_default: qup-i2c18-state { - pins = "gpio95", "gpio96"; - function = "qup2_se4"; - drive-strength = <2>; - bias-pull-up; - }; - - qup_uart12_default: qup-uart12-state { - qup_uart12_cts: qup-uart12-cts-pins { - pins = "gpio52"; - function = "qup1_se5"; - bias-disable; - }; - - qup_uart12_rts: qup-uart12-rts-pins { - pins = "gpio53"; - function = "qup1_se5"; - bias-pull-down; - }; - - qup_uart12_tx: qup-uart12-tx-pins { - pins = "gpio54"; - function = "qup1_se5"; - bias-pull-up; - }; - - qup_uart12_rx: qup-uart12-rx-pins { - pins = "gpio55"; - function = "qup1_se5"; - bias-pull-down; - }; - }; - - qup_uart17_default: qup-uart17-state { - qup_uart17_cts: qup-uart17-cts-pins { - pins = "gpio91"; - function = "qup2_se3"; - bias-disable; - }; - - qup_uart17_rts: qup0-uart17-rts-pins { - pins = "gpio92"; - function = "qup2_se3"; - bias-pull-down; - }; - - qup_uart17_tx: qup0-uart17-tx-pins { - pins = "gpio93"; - function = "qup2_se3"; - bias-pull-up; - }; - - qup_uart17_rx: qup0-uart17-rx-pins { - pins = "gpio94"; - function = "qup2_se3"; - bias-pull-down; - }; - }; +&mdio { + compatible = "snps,dwmac-mdio"; + #address-cells = <1>; + #size-cells = <0>; - pcie0_default_state: pcie0-default-state { - perst-pins { - pins = "gpio2"; - function = "gpio"; - drive-strength = <2>; - bias-pull-down; - }; - - clkreq-pins { - pins = "gpio1"; - function = "pcie0_clkreq"; - drive-strength = <2>; - bias-pull-up; - }; - - wake-pins { - pins = "gpio0"; - function = "gpio"; - drive-strength = <2>; - bias-pull-up; - }; + sgmii_phy0: phy@8 { + compatible = "ethernet-phy-id0141.0dd4"; + reg = <0x8>; + device_type = "ethernet-phy"; + interrupts-extended = <&tlmm 7 IRQ_TYPE_EDGE_FALLING>; + reset-gpios = <&pmm8654au_2_gpios 8 GPIO_ACTIVE_LOW>; + reset-assert-us = <11000>; + reset-deassert-us = <70000>; }; - pcie1_default_state: pcie1-default-state { - perst-pins { - pins = "gpio4"; - function = "gpio"; - drive-strength = <2>; - bias-pull-down; - }; - - clkreq-pins { - pins = "gpio3"; - function = "pcie1_clkreq"; - drive-strength = <2>; - bias-pull-up; - }; - - wake-pins { - pins = "gpio5"; - function = "gpio"; - drive-strength = <2>; - bias-pull-up; - }; + sgmii_phy1: phy@a { + compatible = "ethernet-phy-id0141.0dd4"; + reg = <0xa>; + device_type = "ethernet-phy"; + interrupts-extended = <&tlmm 26 IRQ_TYPE_EDGE_FALLING>; + reset-gpios = <&pmm8654au_2_gpios 9 GPIO_ACTIVE_LOW>; + reset-assert-us = <11000>; + reset-deassert-us = <70000>; }; }; - -&pcie0 { - perst-gpios = <&tlmm 2 GPIO_ACTIVE_LOW>; - wake-gpios = <&tlmm 0 GPIO_ACTIVE_HIGH>; - - pinctrl-names = "default"; - pinctrl-0 = <&pcie0_default_state>; - - status = "okay"; -}; - -&pcie1 { - perst-gpios = <&tlmm 4 GPIO_ACTIVE_LOW>; - wake-gpios = <&tlmm 5 GPIO_ACTIVE_HIGH>; - - pinctrl-names = "default"; - pinctrl-0 = <&pcie1_default_state>; - - status = "okay"; -}; - -&pcie0_phy { - vdda-phy-supply = <&vreg_l5a>; - vdda-pll-supply = <&vreg_l1c>; - - status = "okay"; -}; - -&pcie1_phy { - vdda-phy-supply = <&vreg_l5a>; - vdda-pll-supply = <&vreg_l1c>; - - status = "okay"; -}; - -&uart10 { - compatible = "qcom,geni-debug-uart"; - pinctrl-0 = <&qup_uart10_default>; - pinctrl-names = "default"; - status = "okay"; -}; - -&uart12 { - pinctrl-0 = <&qup_uart12_default>; - pinctrl-names = "default"; - status = "okay"; -}; - -&uart17 { - pinctrl-0 = <&qup_uart17_default>; - pinctrl-names = "default"; - status = "okay"; -}; - -&ufs_mem_hc { - reset-gpios = <&tlmm 149 GPIO_ACTIVE_LOW>; - vcc-supply = <&vreg_l8a>; - vcc-max-microamp = <1100000>; - vccq-supply = <&vreg_l4c>; - vccq-max-microamp = <1200000>; - - status = "okay"; -}; - -&ufs_mem_phy { - vdda-phy-supply = <&vreg_l4a>; - vdda-pll-supply = <&vreg_l1c>; - - status = "okay"; -}; - -&usb_0 { - pinctrl-names = "default"; - pinctrl-0 = <&usb0_en_state>; - - status = "okay"; -}; - -&usb_0_dwc3 { - dr_mode = "peripheral"; -}; - -&usb_0_hsphy { - vdda-pll-supply = <&vreg_l7a>; - vdda18-supply = <&vreg_l6c>; - vdda33-supply = <&vreg_l9a>; - - status = "okay"; -}; - -&usb_0_qmpphy { - vdda-phy-supply = <&vreg_l1c>; - vdda-pll-supply = <&vreg_l7a>; - - status = "okay"; -}; - -&usb_1 { - pinctrl-names = "default"; - pinctrl-0 = <&usb1_en_state>; - - status = "okay"; -}; - -&usb_1_dwc3 { - dr_mode = "host"; -}; - -&usb_1_hsphy { - vdda-pll-supply = <&vreg_l7a>; - vdda18-supply = <&vreg_l6c>; - vdda33-supply = <&vreg_l9a>; - - status = "okay"; -}; - -&usb_1_qmpphy { - vdda-phy-supply = <&vreg_l1c>; - vdda-pll-supply = <&vreg_l7a>; - - status = "okay"; -}; - -&usb_2 { - pinctrl-names = "default"; - pinctrl-0 = <&usb2_en_state>; - - status = "okay"; -}; - -&usb_2_dwc3 { - dr_mode = "host"; -}; - -&usb_2_hsphy { - vdda-pll-supply = <&vreg_l7a>; - vdda18-supply = <&vreg_l6c>; - vdda33-supply = <&vreg_l9a>; - - status = "okay"; -}; - -&xo_board_clk { - clock-frequency = <38400000>; -};
arch/arm64/boot/dts/qcom/sa8775p-ride.dtsi new file +814 -0
814 lines not on this page · raw message
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 231/393 arm64: dts: qcom: sa8775p: Update sleep_clk frequency
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Taniya Das <[email protected]>
[ Upstream commit 30f7dfd2c4899630becf477447e8bbe92683d2c6 ]
Fix the sleep_clk frequency is 32000 on SA8775P.
--- arch/arm64/boot/dts/qcom/sa8775p-ride.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/qcom/sa8775p-ride.dtsi +1 -1
@@ -517,7 +517,7 @@ }; &sleep_clk { - clock-frequency = <32764>; + clock-frequency = <32000>; }; &spi16 {
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 232/393 arm64: dts: qcom: msm8996: Fix up USB3 interrupts
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Konrad Dybcio <[email protected]>
[ Upstream commit 9cb9c9f4e1380da317a056afd26d66a835c5796c ]
Add the missing interrupt lines and fix qusb2_phy being an impostor of hs_phy_irq.
This happens to also fix warnings such as:
usb@6af8800: interrupt-names: ['hs_phy_irq', 'ss_phy_irq'] is too short
--- arch/arm64/boot/dts/qcom/msm8996.dtsi | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/qcom/msm8996.dtsi +7 -2
@@ -3046,9 +3046,14 @@ #size-cells = <1>; ranges; - interrupts = <GIC_SPI 347 IRQ_TYPE_LEVEL_HIGH>, + interrupts = <GIC_SPI 180 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 347 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>, <GIC_SPI 243 IRQ_TYPE_LEVEL_HIGH>; - interrupt-names = "hs_phy_irq", "ss_phy_irq"; + interrupt-names = "pwr_event", + "qusb2_phy", + "hs_phy_irq", + "ss_phy_irq"; clocks = <&gcc GCC_SYS_NOC_USB3_AXI_CLK>, <&gcc GCC_USB30_MASTER_CLK>,
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 233/393 arm64: dts: qcom: msm8994: Describe USB interrupts
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Konrad Dybcio <[email protected]>
[ Upstream commit c910544d2234709660d60f80345c285616e73b1c ]
Previously the interrupt lanes were not described, fix that.
--- arch/arm64/boot/dts/qcom/msm8994.dtsi | 9 +++++++++ 1 file changed, 9 insertions(+)
arch/arm64/boot/dts/qcom/msm8994.dtsi +9 -0
@@ -437,6 +437,15 @@ #size-cells = <1>; ranges; + interrupts = <GIC_SPI 180 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 311 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 133 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 310 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "pwr_event", + "qusb2_phy", + "hs_phy_irq", + "ss_phy_irq"; + clocks = <&gcc GCC_USB30_MASTER_CLK>, <&gcc GCC_SYS_NOC_USB3_AXI_CLK>, <&gcc GCC_USB30_SLEEP_CLK>,
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 234/393 arm64: dts: qcom: sm7225-fairphone-fp4: Drop extra qcom,msm-id value
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Luca Weiss <[email protected]>
[ Upstream commit 7fb88e0d4dc1a40a29d49b603faa1484334c60f3 ]
The ID 434 is for SM6350 while 459 is for SM7225. Fairphone 4 is only SM7225, so drop the unused 434 entry.
--- arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts +1 -1
@@ -26,7 +26,7 @@ chassis-type = "handset"; /* required for bootloader to select correct board */ - qcom,msm-id = <434 0x10000>, <459 0x10000>; + qcom,msm-id = <459 0x10000>; qcom,board-id = <8 32>; aliases {
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 235/393 arm64: dts: qcom: msm8916: correct sleep clock frequency
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dmitry Baryshkov <[email protected]>
[ Upstream commit f088b921890cef28862913e5627bb2e2b5f82125 ]
The MSM8916 platform uses PM8916 to provide sleep clock. According to the documentation, that clock has 32.7645 kHz frequency. Correct the sleep clock definition.
--- arch/arm64/boot/dts/qcom/msm8916.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/qcom/msm8916.dtsi +1 -1
@@ -104,7 +104,7 @@ sleep_clk: sleep-clk { compatible = "fixed-clock"; #clock-cells = <0>; - clock-frequency = <32768>; + clock-frequency = <32764>; }; };
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 236/393 arm64: dts: qcom: msm8939: correct sleep clock frequency
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dmitry Baryshkov <[email protected]>
[ Upstream commit 5c775f586cde4fca3c5591c43b6dc8b243bc304c ]
The MSM8939 platform uses PM8916 to provide sleep clock. According to the documentation, that clock has 32.7645 kHz frequency. Correct the sleep clock definition.
--- arch/arm64/boot/dts/qcom/msm8939.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/qcom/msm8939.dtsi +1 -1
@@ -33,7 +33,7 @@ sleep_clk: sleep-clk { compatible = "fixed-clock"; #clock-cells = <0>; - clock-frequency = <32768>; + clock-frequency = <32764>; }; };
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 237/393 arm64: dts: qcom: msm8994: correct sleep clock frequency
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dmitry Baryshkov <[email protected]>
[ Upstream commit a4148d869d47d8c86da0291dd95d411a5ebe90c8 ]
The MSM8994 platform uses PM8994/6 to provide sleep clock. According to the documentation, that clock has 32.7645 kHz frequency. Correct the sleep clock definition.
--- arch/arm64/boot/dts/qcom/msm8994.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/qcom/msm8994.dtsi +1 -1
@@ -34,7 +34,7 @@ sleep_clk: sleep-clk { compatible = "fixed-clock"; #clock-cells = <0>; - clock-frequency = <32768>; + clock-frequency = <32764>; clock-output-names = "sleep_clk"; }; };
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 238/393 arm64: dts: qcom: qcs404: correct sleep clock frequency
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dmitry Baryshkov <[email protected]>
[ Upstream commit 1473ff0b69de68b23ce9874548cdabc64d72725e ]
The QCS40x platforms use PMS405 to provide sleep clock. According to the documentation, that clock has 32.7645 kHz frequency. Correct the sleep clock definition.
--- arch/arm64/boot/dts/qcom/qcs404.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/qcom/qcs404.dtsi +1 -1
@@ -28,7 +28,7 @@ sleep_clk: sleep-clk { compatible = "fixed-clock"; #clock-cells = <0>; - clock-frequency = <32768>; + clock-frequency = <32764>; }; };
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 239/393 arm64: dts: qcom: q[dr]u1000: correct sleep clock frequency
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dmitry Baryshkov <[email protected]>
[ Upstream commit 5546604e034b6c383b65676ff8615b346897eccd ]
The Q[DR]U1000 platforms use PM8150 to provide sleep clock. According to the documentation, that clock has 32.7645 kHz frequency. Correct the sleep clock definition.
--- arch/arm64/boot/dts/qcom/qdu1000-idp.dts | 2 +- arch/arm64/boot/dts/qcom/qru1000-idp.dts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/qcom/qdu1000-idp.dts +1 -1
@@ -31,7 +31,7 @@ sleep_clk: sleep-clk { compatible = "fixed-clock"; - clock-frequency = <32000>; + clock-frequency = <32764>; #clock-cells = <0>; }; };
arch/arm64/boot/dts/qcom/qru1000-idp.dts +1 -1
@@ -31,7 +31,7 @@ sleep_clk: sleep-clk { compatible = "fixed-clock"; - clock-frequency = <32000>; + clock-frequency = <32764>; #clock-cells = <0>; }; };
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 240/393 arm64: dts: qcom: qrb4210-rb2: correct sleep clock frequency
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dmitry Baryshkov <[email protected]>
[ Upstream commit 298192f365a343d84e9d2755e47bebebf0cfb82e ]
Qualcomm RB2 board uses PM6125 to provide sleep clock. According to the documentation, that clock has 32.7645 kHz frequency. Correct the sleep clock definition.
--- arch/arm64/boot/dts/qcom/qrb4210-rb2.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/qcom/qrb4210-rb2.dts +1 -1
@@ -492,7 +492,7 @@ }; &sleep_clk { - clock-frequency = <32000>; + clock-frequency = <32764>; }; &tlmm {
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 241/393 arm64: dts: qcom: sc7280: correct sleep clock frequency
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dmitry Baryshkov <[email protected]>
[ Upstream commit f6ccdca14eac545320ab03d6ca91ca343e7372e5 ]
The SC7280 platform uses PMK8350 to provide sleep clock. According to the documentation, that clock has 32.7645 kHz frequency. Correct the sleep clock definition.
--- arch/arm64/boot/dts/qcom/sc7280.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/qcom/sc7280.dtsi +1 -1
@@ -80,7 +80,7 @@ sleep_clk: sleep-clk { compatible = "fixed-clock"; - clock-frequency = <32000>; + clock-frequency = <32764>; #clock-cells = <0>; }; };
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 242/393 arm64: dts: qcom: sdx75: correct sleep clock frequency
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dmitry Baryshkov <[email protected]>
[ Upstream commit b8021da9ddc65fa041e12ea1e0ff2dfce5c926eb ]
The SDX75 platform uses PMK8550 to provide sleep clock. According to the documentation, that clock has 32.7645 kHz frequency. Correct the sleep clock definition.
--- arch/arm64/boot/dts/qcom/sdx75.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/qcom/sdx75.dtsi +1 -1
@@ -29,7 +29,7 @@ sleep_clk: sleep-clk { compatible = "fixed-clock"; - clock-frequency = <32000>; + clock-frequency = <32764>; #clock-cells = <0>; }; };
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 243/393 arm64: dts: qcom: sm4450: correct sleep clock frequency
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dmitry Baryshkov <[email protected]>
[ Upstream commit 158e67cf3619dbb5b9914bb364889041f4b90eea ]
The SM4450 platform uses PM4450 to provide sleep clock. According to the documentation, that clock has 32.7645 kHz frequency. Correct the sleep clock definition.
--- arch/arm64/boot/dts/qcom/sm4450.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/qcom/sm4450.dtsi +1 -1
@@ -23,7 +23,7 @@ sleep_clk: sleep-clk { compatible = "fixed-clock"; - clock-frequency = <32000>; + clock-frequency = <32764>; #clock-cells = <0>; }; };
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 244/393 arm64: dts: qcom: sm6125: correct sleep clock frequency
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dmitry Baryshkov <[email protected]>
[ Upstream commit b3c547e1507862f0e4d46432b665c5c6e61e14d6 ]
The SM6125 platform uses PM6125 to provide sleep clock. According to the documentation, that clock has 32.7645 kHz frequency. Correct the sleep clock definition.
--- arch/arm64/boot/dts/qcom/sm6125.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/qcom/sm6125.dtsi +1 -1
@@ -28,7 +28,7 @@ sleep_clk: sleep-clk { compatible = "fixed-clock"; #clock-cells = <0>; - clock-frequency = <32000>; + clock-frequency = <32764>; clock-output-names = "sleep_clk"; }; };
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 245/393 arm64: dts: qcom: sm6375: correct sleep clock frequency
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dmitry Baryshkov <[email protected]>
[ Upstream commit 223382c94f1f07c475d39713e4c058401480b441 ]
The SM6375 platform uses PM6125 to provide sleep clock. According to the documentation, that clock has 32.7645 kHz frequency. Correct the sleep clock definition.
--- arch/arm64/boot/dts/qcom/sm6375.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/qcom/sm6375.dtsi +1 -1
@@ -29,7 +29,7 @@ sleep_clk: sleep-clk { compatible = "fixed-clock"; - clock-frequency = <32000>; + clock-frequency = <32764>; #clock-cells = <0>; }; };
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 246/393 arm64: dts: qcom: sm8250: correct sleep clock frequency
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dmitry Baryshkov <[email protected]>
[ Upstream commit 75420e437eed69fa95d1d7c339dad86dea35319a ]
The SM8250 platform uses PM8150 to provide sleep clock. According to the documentation, that clock has 32.7645 kHz frequency. Correct the sleep clock definition.
--- arch/arm64/boot/dts/qcom/sm8250.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/qcom/sm8250.dtsi +1 -1
@@ -85,7 +85,7 @@ sleep_clk: sleep-clk { compatible = "fixed-clock"; - clock-frequency = <32768>; + clock-frequency = <32764>; #clock-cells = <0>; }; };
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 247/393 arm64: dts: qcom: sm8350: correct sleep clock frequency
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dmitry Baryshkov <[email protected]>
[ Upstream commit f4cc8c75cfc5d06084a31da2ff67e477565f0cae ]
The SM8350 platform uses PMK8350 to provide sleep clock. According to the documentation, that clock has 32.7645 kHz frequency. Correct the sleep clock definition.
--- arch/arm64/boot/dts/qcom/sm8350.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/qcom/sm8350.dtsi +1 -1
@@ -40,7 +40,7 @@ sleep_clk: sleep-clk { compatible = "fixed-clock"; - clock-frequency = <32000>; + clock-frequency = <32764>; #clock-cells = <0>; }; };
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 248/393 arm64: dts: qcom: sm8450: correct sleep clock frequency
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Dmitry Baryshkov <[email protected]>
[ Upstream commit c375ff3b887abf376607d4769c1114c5e3b6ea72 ]
The SM8450 platform uses PMK8350 to provide sleep clock. According to the documentation, that clock has 32.7645 kHz frequency. Correct the sleep clock definition.
--- arch/arm64/boot/dts/qcom/sm8450.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/qcom/sm8450.dtsi +1 -1
@@ -40,7 +40,7 @@ sleep_clk: sleep-clk { compatible = "fixed-clock"; #clock-cells = <0>; - clock-frequency = <32000>; + clock-frequency = <32764>; }; };
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 249/393 ARM: dts: microchip: sama5d27_wlsom1_ek: Remove mmc-ddr-3_3v property from sdmmc0 node
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Mihai Sain <[email protected]>
[ Upstream commit 2a7f1848d9d65a4deb366726ff8f33c9c64ac43b ]
On board the sdmmc0 interface is wired to a SD Card socket. According with mmc-controller bindings, the mmc-ddr-3_3v property is used for eMMC devices to enable high-speed DDR mode (3.3V I/O). Remove the mmc-ddr-3_3v property from sdmmc0 node.
Stable-dep-of: 4d9e5965df04 ("ARM: dts: microchip: sama5d27_wlsom1_ek: Add no-1-8-v property to sdmmc0 node")
--- arch/arm/boot/dts/microchip/at91-sama5d27_wlsom1_ek.dts | 1 - 1 file changed, 1 deletion(-)
arch/arm/boot/dts/microchip/at91-sama5d27_wlsom1_ek.dts +0 -1
@@ -197,7 +197,6 @@ &sdmmc0 { bus-width = <4>; - mmc-ddr-3_3v; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_sdmmc0_default>; status = "okay";
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 250/393 ARM: dts: microchip: sama5d27_wlsom1_ek: Add no-1-8-v property to sdmmc0 node
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Cristian Birsan <[email protected]>
[ Upstream commit 4d9e5965df04c0adf260c3009c55d5fe240f7286 ]
Add no-1-8-v property to sdmmc0 node to keep VDDSDMMC power rail at 3.3V. This property will stop the LDO regulator from switching to 1.8V when the MMC core detects an UHS SD Card. VDDSDMMC power rail is used by all the SDMMC interface pins in GPIO mode (PA0 - PA13).
On this board, PA10 is used as GPIO to enable the power switch controlling USB Vbus for the USB Host. The change is needed to fix the PA10 voltage level to 3.3V instead of 1.8V.
--- arch/arm/boot/dts/microchip/at91-sama5d27_wlsom1_ek.dts | 1 + 1 file changed, 1 insertion(+)
arch/arm/boot/dts/microchip/at91-sama5d27_wlsom1_ek.dts +1 -0
@@ -197,6 +197,7 @@ &sdmmc0 { bus-width = <4>; + no-1-8-v; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_sdmmc0_default>; status = "okay";
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 251/393 arm64: dts: ti: k3-am62: Remove duplicate GICR reg
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Bryan Brattlof <[email protected]>
[ Upstream commit 72c691d77ea5d0c4636fd3e9f0ad80d813c7d1a7 ]
The GIC Redistributor control register range is mapped twice. Remove the extra entry from the reg range.
--- arch/arm64/boot/dts/ti/k3-am62-main.dtsi | 1 - 1 file changed, 1 deletion(-)
arch/arm64/boot/dts/ti/k3-am62-main.dtsi +0 -1
@@ -23,7 +23,6 @@ interrupt-controller; reg = <0x00 0x01800000 0x00 0x10000>, /* GICD */ <0x00 0x01880000 0x00 0xc0000>, /* GICR */ - <0x00 0x01880000 0x00 0xc0000>, /* GICR */ <0x01 0x00000000 0x00 0x2000>, /* GICC */ <0x01 0x00010000 0x00 0x1000>, /* GICH */ <0x01 0x00020000 0x00 0x2000>; /* GICV */
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 252/393 arm64: dts: ti: k3-am62a: Remove duplicate GICR reg
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Bryan Brattlof <[email protected]>
[ Upstream commit 6f0232577e260cdbc25508e27bb0b75ade7e7ebc ]
The GIC Redistributor control range is mapped twice. Remove the extra entry from the reg range.
--- arch/arm64/boot/dts/ti/k3-am62a-main.dtsi | 1 - 1 file changed, 1 deletion(-)
arch/arm64/boot/dts/ti/k3-am62a-main.dtsi +0 -1
@@ -18,7 +18,6 @@ compatible = "arm,gic-v3"; reg = <0x00 0x01800000 0x00 0x10000>, /* GICD */ <0x00 0x01880000 0x00 0xc0000>, /* GICR */ - <0x00 0x01880000 0x00 0xc0000>, /* GICR */ <0x01 0x00000000 0x00 0x2000>, /* GICC */ <0x01 0x00010000 0x00 0x1000>, /* GICH */ <0x01 0x00020000 0x00 0x2000>; /* GICV */
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 253/393 arm64: dts: allwinner: a64: explicitly assign clock parent for TCON0
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Vasily Khoruzhick <[email protected]>
[ Upstream commit 8715c91a836502929c637c76a26335ede8818acf ]
TCON0 seems to need a different clock parent depending on output type. For RGB it has to be PLL-VIDEO0-2X, while for DSI it has to be PLL-MIPI, so select it explicitly.
Video output doesn't work if incorrect clock is assigned.
On my Pinebook I manually configured PLL-VIDEO0-2X and PLL-MIPI to the same rate, and while video output works fine with PLL-VIDEO0-2X, it doesn't work at all (as in no picture) with PLL-MIPI.
--- arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts | 2 ++ arch/arm64/boot/dts/allwinner/sun50i-a64-teres-i.dts | 2 ++ arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi | 2 ++ 3 files changed, 6 insertions(+)
arch/arm64/boot/dts/allwinner/sun50i-a64-pinebook.dts +2 -0
@@ -390,6 +390,8 @@ &tcon0 { pinctrl-names = "default"; pinctrl-0 = <&lcd_rgb666_pins>; + assigned-clocks = <&ccu CLK_TCON0>; + assigned-clock-parents = <&ccu CLK_PLL_VIDEO0_2X>; status = "okay"; };
arch/arm64/boot/dts/allwinner/sun50i-a64-teres-i.dts +2 -0
@@ -369,6 +369,8 @@ &tcon0 { pinctrl-names = "default"; pinctrl-0 = <&lcd_rgb666_pins>; + assigned-clocks = <&ccu CLK_TCON0>; + assigned-clock-parents = <&ccu CLK_PLL_VIDEO0_2X>; status = "okay"; };
arch/arm64/boot/dts/allwinner/sun50i-a64.dtsi +2 -0
@@ -410,6 +410,8 @@ clock-names = "ahb", "tcon-ch0"; clock-output-names = "tcon-data-clock"; #clock-cells = <0>; + assigned-clocks = <&ccu CLK_TCON0>; + assigned-clock-parents = <&ccu CLK_PLL_MIPI>; resets = <&ccu RST_BUS_TCON0>, <&ccu RST_BUS_LVDS>; reset-names = "lcd", "lvds";
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 254/393 RDMA/bnxt_re: Fix to drop reference to the mmap entry in case of error
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Kalesh AP <[email protected]>
[ Upstream commit c84f0f4f49d81645f49c3269fdcc3b84ce61e795 ]
In the error handling path of bnxt_re_mmap(), driver should invoke rdma_user_mmap_entry_put() to free the reference of mmap entry in case the error happens after rdma_user_mmap_entry_get was called.
--- drivers/infiniband/hw/bnxt_re/ib_verbs.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-)
drivers/infiniband/hw/bnxt_re/ib_verbs.c +4 -3
@@ -4278,9 +4278,10 @@ int bnxt_re_mmap(struct ib_ucontext *ib_uctx, struct vm_area_struct *vma)case BNXT_RE_MMAP_DBR_PAGE :/* Driver doesn't expect write access for user space */ if (vma->vm_flags &VM_WRITE ) -return -EFAULT ; - ret =vm_insert_page (vma, vma->vm_start, -virt_to_page ((void *)bnxt_entry->mem_offset)); + ret = -EFAULT ; +else + ret =vm_insert_page (vma, vma->vm_start, +virt_to_page ((void *)bnxt_entry->mem_offset));break ;default : ret = -EINVAL ;
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 255/393 ARM: omap1: Fix up the Retu IRQ on Nokia 770
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Aaro Koskinen <[email protected]>
[ Upstream commit ad455e48bba7f21bb5108406da0854cf8dede8ea ]
The Retu IRQ is off by one, as a result the power button does not work. Fix it.
--- arch/arm/mach-omap1/board-nokia770.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-omap1/board-nokia770.c +1 -1
@@ -289,7 +289,7 @@ static struct gpiod_lookup_table nokia770_irq_gpio_table = {GPIO_LOOKUP ("gpio-0-15" ,15 ,"ads7846_irq" ,GPIO_ACTIVE_HIGH ),/* GPIO used for retu IRQ */ -GPIO_LOOKUP ("gpio-48-63" ,15 ,"retu_irq" , +GPIO_LOOKUP ("gpio-48-63" ,14 ,"retu_irq" ,GPIO_ACTIVE_HIGH ),/* GPIO used for tahvo IRQ */ GPIO_LOOKUP("gpio-32-47", 8, "tahvo_irq",
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 256/393 arm64: dts: qcom: sdm845-db845c-navigation-mezzanine: Convert mezzanine riser to dtso
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Bryan O'Donoghue <[email protected]>
[ Upstream commit 30df676a31b7a4881352097d8ae7c2bb83515a17 ]
Convert the navigation / camera mezzanine from its own dts to a dtso. A small amount of additional includes / address / cell size change needs to be applied to convert.
Stable-dep-of: 80b47f14d543 ("arm64: dts: qcom: sdm845-db845c-navigation-mezzanine: remove disabled ov7251 camera")
---
arch/arm64/boot/dts/qcom/Makefile | 3 +++
...ine.dts => sdm845-db845c-navigation-mezzanine.dtso} | 10 +++++++++-
2 files changed, 12 insertions(+), 1 deletion(-)
rename arch/arm64/boot/dts/qcom/{sdm845-db845c-navigation-mezzanine.dts => sdm845-db845c-navigation-mezzanine.dtso} (91%)arch/arm64/boot/dts/qcom/Makefile +3 -0
@@ -171,6 +171,9 @@ dtb-$(CONFIG_ARCH_QCOM) += sdm845-cheza-r1.dtb dtb-$(CONFIG_ARCH_QCOM) += sdm845-cheza-r2.dtb dtb-$(CONFIG_ARCH_QCOM) += sdm845-cheza-r3.dtb dtb-$(CONFIG_ARCH_QCOM) += sdm845-db845c.dtb + +sdm845-db845c-navigation-mezzanine-dtbs := sdm845-db845c.dtb sdm845-db845c-navigation-mezzanine.dtbo + dtb-$(CONFIG_ARCH_QCOM) += sdm845-db845c-navigation-mezzanine.dtb dtb-$(CONFIG_ARCH_QCOM) += sdm845-lg-judyln.dtb dtb-$(CONFIG_ARCH_QCOM) += sdm845-lg-judyp.dtb
arch/arm64/boot/dts/qcom/sdm845-db845c-navigation-mezzanine.dtso renamed from arch/arm64/boot/dts/qcom/sdm845-db845c-navigation-mezzanine.dts +9 -1
@@ -4,8 +4,10 @@ */ /dts-v1/; +/plugin/; -#include "sdm845-db845c.dts" +#include <dt-bindings/clock/qcom,camcc-sdm845.h> +#include <dt-bindings/gpio/gpio.h> &camss { vdda-phy-supply = <&vreg_l1a_0p875>;
@@ -28,6 +30,9 @@ }; &cci_i2c0 { + #address-cells = <1>; + #size-cells = <0>; + camera@10 { compatible = "ovti,ov8856"; reg = <0x10>;
@@ -65,6 +70,9 @@ }; &cci_i2c1 { + #address-cells = <1>; + #size-cells = <0>; + camera@60 { compatible = "ovti,ov7251";
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 257/393 arm64: dts: qcom: sdm845-db845c-navigation-mezzanine: remove disabled ov7251 camera
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Neil Armstrong <[email protected]>
[ Upstream commit 80b47f14d5433068dd6738c9e6e17ff6648bae41 ]
The ov7251node has bindings check errors in the endpoint, and the camera node was disabled since the beginning. Even when switching the node to okay, the endpoint description to the csiphy is missing along with the csiphy parameters.
Drop the ov7251 camera entirely until it's properly described.
This obviously fixes:
sdm845-db845c-navigation-mezzanine.dtso: camera@60: port:endpoint:data-lanes: [0, 1] is too long
from schema $id: http://devicetree.org/schemas/media/i2c/ovti,ov7251.yaml#
--- .../sdm845-db845c-navigation-mezzanine.dtso | 42 ------------------- 1 file changed, 42 deletions(-)
arch/arm64/boot/dts/qcom/sdm845-db845c-navigation-mezzanine.dtso +0 -42
@@ -68,45 +68,3 @@ }; }; }; - -&cci_i2c1 { - #address-cells = <1>; - #size-cells = <0>; - - camera@60 { - compatible = "ovti,ov7251"; - - /* I2C address as per ov7251.txt linux documentation */ - reg = <0x60>; - - /* CAM3_RST_N */ - enable-gpios = <&tlmm 21 GPIO_ACTIVE_HIGH>; - pinctrl-names = "default"; - pinctrl-0 = <&cam3_default>; - - clocks = <&clock_camcc CAM_CC_MCLK3_CLK>; - clock-names = "xclk"; - clock-frequency = <24000000>; - - /* - * The &vreg_s4a_1p8 trace always powered on. - * - * The 2.8V vdda-supply regulator is enabled when the - * vreg_s4a_1p8 trace is pulled high. - * It too is represented by a fixed regulator. - * - * No 1.2V vddd-supply regulator is used. - */ - vdddo-supply = <&vreg_lvs1a_1p8>; - vdda-supply = <&cam3_avdd_2v8>; - - status = "disabled"; - - port { - ov7251_ep: endpoint { - data-lanes = <0 1>; -/* remote-endpoint = <&csiphy3_ep>; */ - }; - }; - }; -};
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 258/393 arm64: dts: qcom: sc7180-trogdor-quackingstick: add missing avee-supply
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Neil Armstrong <[email protected]>
[ Upstream commit aa09de104d421e7ff8d8cde9af98568ce62a002c ]
The bindings requires the avee-supply, use the same regulator as the avdd (positive voltage) which would also provide the negative voltage by definition.
The fixes:sc7180-trogdor-quackingstick-r0.dts: panel@0: 'avee-supply' is a required property
from schema $id: http://devicetree.org/schemas/display/panel/boe,tv101wum-nl6.yaml#
--- arch/arm64/boot/dts/qcom/sc7180-trogdor-quackingstick.dtsi | 1 + 1 file changed, 1 insertion(+)
arch/arm64/boot/dts/qcom/sc7180-trogdor-quackingstick.dtsi +1 -0
@@ -84,6 +84,7 @@ pinctrl-names = "default"; pinctrl-0 = <&lcd_rst>; avdd-supply = <&ppvar_lcd>; + avee-supply = <&ppvar_lcd>; pp1800-supply = <&v1p8_disp>; pp3300-supply = <&pp3300_dx_edp>; backlight = <&backlight>;
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 259/393 arm64: dts: qcom: sc7180-*: Remove thermal zone polling delays
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Konrad Dybcio <[email protected]>
[ Upstream commit 7cd2d9080a6eb281701f7303b1699719640380d0 ]
All of the thermal zone suppliers are interrupt-driven, remove the bogus and unnecessary polling that only wastes CPU time.
Stable-dep-of: 9180b38d706c ("arm64: dts: qcom: sc7180-trogdor-pompom: rename 5v-choke thermal zone")
--- arch/arm64/boot/dts/qcom/pm6150.dtsi | 2 +- arch/arm64/boot/dts/qcom/pm6150l.dtsi | 3 --- .../boot/dts/qcom/sc7180-trogdor-coachz.dtsi | 1 - .../dts/qcom/sc7180-trogdor-homestar.dtsi | 1 - .../boot/dts/qcom/sc7180-trogdor-pompom.dtsi | 3 --- .../dts/qcom/sc7180-trogdor-wormdingler.dtsi | 1 - arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi | 3 --- arch/arm64/boot/dts/qcom/sc7180.dtsi | 25 ------------------- 8 files changed, 1 insertion(+), 38 deletions(-)
arch/arm64/boot/dts/qcom/pm6150.dtsi +1 -1
@@ -13,7 +13,7 @@ thermal-zones { pm6150_thermal: pm6150-thermal { polling-delay-passive = <100>; - polling-delay = <0>; + thermal-sensors = <&pm6150_temp>; trips {
arch/arm64/boot/dts/qcom/pm6150l.dtsi +0 -3
@@ -10,9 +10,6 @@ / { thermal-zones { pm6150l-thermal { - polling-delay-passive = <0>; - polling-delay = <0>; - thermal-sensors = <&pm6150l_temp>; trips {
arch/arm64/boot/dts/qcom/sc7180-trogdor-coachz.dtsi +0 -1
@@ -26,7 +26,6 @@ thermal-zones { skin_temp_thermal: skin-temp-thermal { polling-delay-passive = <250>; - polling-delay = <0>; thermal-sensors = <&pm6150_adc_tm 1>; sustainable-power = <965>;
arch/arm64/boot/dts/qcom/sc7180-trogdor-homestar.dtsi +0 -1
@@ -43,7 +43,6 @@ thermal-zones { skin_temp_thermal: skin-temp-thermal { polling-delay-passive = <250>; - polling-delay = <0>; thermal-sensors = <&pm6150_adc_tm 1>; sustainable-power = <965>;
arch/arm64/boot/dts/qcom/sc7180-trogdor-pompom.dtsi +0 -3
@@ -13,9 +13,6 @@ / { thermal-zones { 5v-choke-thermal { - polling-delay-passive = <0>; - polling-delay = <250>; - thermal-sensors = <&pm6150_adc_tm 1>; trips {
arch/arm64/boot/dts/qcom/sc7180-trogdor-wormdingler.dtsi +0 -1
@@ -50,7 +50,6 @@ thermal-zones { skin_temp_thermal: skin-temp-thermal { polling-delay-passive = <250>; - polling-delay = <0>; thermal-sensors = <&pm6150_adc_tm 1>; sustainable-power = <574>;
arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi +0 -3
@@ -21,9 +21,6 @@ / { thermal-zones { charger_thermal: charger-thermal { - polling-delay-passive = <0>; - polling-delay = <0>; - thermal-sensors = <&pm6150_adc_tm 0>; trips {
arch/arm64/boot/dts/qcom/sc7180.dtsi +0 -25
@@ -3827,7 +3827,6 @@ thermal-zones { cpu0_thermal: cpu0-thermal { polling-delay-passive = <250>; - polling-delay = <0>; thermal-sensors = <&tsens0 1>; sustainable-power = <1052>;
@@ -3876,7 +3875,6 @@ cpu1_thermal: cpu1-thermal { polling-delay-passive = <250>; - polling-delay = <0>; thermal-sensors = <&tsens0 2>; sustainable-power = <1052>;
@@ -3925,7 +3923,6 @@ cpu2_thermal: cpu2-thermal { polling-delay-passive = <250>; - polling-delay = <0>; thermal-sensors = <&tsens0 3>; sustainable-power = <1052>;
@@ -3974,7 +3971,6 @@ cpu3_thermal: cpu3-thermal { polling-delay-passive = <250>; - polling-delay = <0>; thermal-sensors = <&tsens0 4>; sustainable-power = <1052>;
@@ -4023,7 +4019,6 @@ cpu4_thermal: cpu4-thermal { polling-delay-passive = <250>; - polling-delay = <0>; thermal-sensors = <&tsens0 5>; sustainable-power = <1052>;
@@ -4072,7 +4067,6 @@ cpu5_thermal: cpu5-thermal { polling-delay-passive = <250>; - polling-delay = <0>; thermal-sensors = <&tsens0 6>; sustainable-power = <1052>;
@@ -4121,7 +4115,6 @@ cpu6_thermal: cpu6-thermal { polling-delay-passive = <250>; - polling-delay = <0>; thermal-sensors = <&tsens0 9>; sustainable-power = <1425>;
@@ -4162,7 +4155,6 @@ cpu7_thermal: cpu7-thermal { polling-delay-passive = <250>; - polling-delay = <0>; thermal-sensors = <&tsens0 10>; sustainable-power = <1425>;
@@ -4203,7 +4195,6 @@ cpu8_thermal: cpu8-thermal { polling-delay-passive = <250>; - polling-delay = <0>; thermal-sensors = <&tsens0 11>; sustainable-power = <1425>;
@@ -4244,7 +4235,6 @@ cpu9_thermal: cpu9-thermal { polling-delay-passive = <250>; - polling-delay = <0>; thermal-sensors = <&tsens0 12>; sustainable-power = <1425>;
@@ -4285,7 +4275,6 @@ aoss0-thermal { polling-delay-passive = <250>; - polling-delay = <0>; thermal-sensors = <&tsens0 0>;
@@ -4306,7 +4295,6 @@ cpuss0-thermal { polling-delay-passive = <250>; - polling-delay = <0>; thermal-sensors = <&tsens0 7>;
@@ -4326,7 +4314,6 @@ cpuss1-thermal { polling-delay-passive = <250>; - polling-delay = <0>; thermal-sensors = <&tsens0 8>;
@@ -4346,7 +4333,6 @@ gpuss0-thermal { polling-delay-passive = <250>; - polling-delay = <0>; thermal-sensors = <&tsens0 13>;
@@ -4374,7 +4360,6 @@ gpuss1-thermal { polling-delay-passive = <250>; - polling-delay = <0>; thermal-sensors = <&tsens0 14>;
@@ -4402,7 +4387,6 @@ aoss1-thermal { polling-delay-passive = <250>; - polling-delay = <0>; thermal-sensors = <&tsens1 0>;
@@ -4423,7 +4407,6 @@ cwlan-thermal { polling-delay-passive = <250>; - polling-delay = <0>; thermal-sensors = <&tsens1 1>;
@@ -4444,7 +4427,6 @@ audio-thermal { polling-delay-passive = <250>; - polling-delay = <0>; thermal-sensors = <&tsens1 2>;
@@ -4465,7 +4447,6 @@ ddr-thermal { polling-delay-passive = <250>; - polling-delay = <0>; thermal-sensors = <&tsens1 3>;
@@ -4486,7 +4467,6 @@ q6-hvx-thermal { polling-delay-passive = <250>; - polling-delay = <0>; thermal-sensors = <&tsens1 4>;
@@ -4507,7 +4487,6 @@ camera-thermal { polling-delay-passive = <250>; - polling-delay = <0>; thermal-sensors = <&tsens1 5>;
@@ -4528,7 +4507,6 @@ mdm-core-thermal { polling-delay-passive = <250>; - polling-delay = <0>; thermal-sensors = <&tsens1 6>;
@@ -4549,7 +4527,6 @@ mdm-dsp-thermal { polling-delay-passive = <250>; - polling-delay = <0>; thermal-sensors = <&tsens1 7>;
@@ -4570,7 +4547,6 @@ npu-thermal { polling-delay-passive = <250>; - polling-delay = <0>; thermal-sensors = <&tsens1 8>;
@@ -4591,7 +4567,6 @@ video-thermal { polling-delay-passive = <250>; - polling-delay = <0>; thermal-sensors = <&tsens1 9>;
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 260/393 arm64: dts: qcom: sc7180-trogdor-pompom: rename 5v-choke thermal zone
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Neil Armstrong <[email protected]>
[ Upstream commit 9180b38d706c29ed212181a77999c35ae9ff6879 ]
Rename the 5v-choke thermal zone to satisfy the bindings.
This fixes:sc7180-trogdor-pompom-r2-lte.dts: thermal-zones: '5v-choke-thermal' does not match any of the regexes: '^[a-zA-Z][a-zA-Z0-9\\-]{1,10}-thermal$', 'pinctrl-[0-9]+'
from schema $id: http://devicetree.org/schemas/thermal/thermal-zones.yaml#
--- arch/arm64/boot/dts/qcom/sc7180-trogdor-pompom.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/qcom/sc7180-trogdor-pompom.dtsi +2 -2
@@ -12,11 +12,11 @@ / { thermal-zones { - 5v-choke-thermal { + choke-5v-thermal { thermal-sensors = <&pm6150_adc_tm 1>; trips { - 5v-choke-crit { + choke-5v-crit { temperature = <125000>; hysteresis = <1000>; type = "critical";
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 261/393 arm64: dts: qcom: Add SM7125 device tree
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: David Wronek <[email protected]>
[ Upstream commit 72fbf05149bd451e7222c2ed1e3823972f19df9c ]
The Snapdragon 720G (sm7125) is software-wise very similar to the Snapdragon 7c with minor differences in clock speeds and as added here, it uses the Kryo 465 instead of Kryo 468.
Stable-dep-of: 092febd32a99 ("arm64: dts: qcom: sc7180: fix psci power domain node names")
--- arch/arm64/boot/dts/qcom/sm7125.dtsi | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 arch/arm64/boot/dts/qcom/sm7125.dtsi
arch/arm64/boot/dts/qcom/sm7125.dtsi new file +16 -0
@@ -0,0 +1,16 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (c) 2021, The Linux Foundation. All rights reserved. + */ + +#include "sc7180.dtsi" + +/* SM7125 uses Kryo 465 instead of Kryo 468 */ +&CPU0 { compatible = "qcom,kryo465"; }; +&CPU1 { compatible = "qcom,kryo465"; }; +&CPU2 { compatible = "qcom,kryo465"; }; +&CPU3 { compatible = "qcom,kryo465"; }; +&CPU4 { compatible = "qcom,kryo465"; }; +&CPU5 { compatible = "qcom,kryo465"; }; +&CPU6 { compatible = "qcom,kryo465"; }; +&CPU7 { compatible = "qcom,kryo465"; };
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 262/393 arm64: dts: qcom: sc7180: change labels to lower-case
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Krzysztof Kozlowski <[email protected]>
[ Upstream commit e5f90735136562c0653714b43ff1aeb331600d24 ]
DTS coding style expects labels to be lowercase. No functional impact. Verified with comparing decompiled DTB (dtx_diff and fdtdump+diff).
Stable-dep-of: 092febd32a99 ("arm64: dts: qcom: sc7180: fix psci power domain node names")
--- .../boot/dts/qcom/sc7180-firmware-tfa.dtsi | 84 ++-- .../boot/dts/qcom/sc7180-trogdor-coachz.dtsi | 8 +- .../dts/qcom/sc7180-trogdor-homestar.dtsi | 8 +- .../dts/qcom/sc7180-trogdor-wormdingler.dtsi | 8 +- arch/arm64/boot/dts/qcom/sc7180.dtsi | 362 +++++++++--------- arch/arm64/boot/dts/qcom/sm7125.dtsi | 16 +- 6 files changed, 243 insertions(+), 243 deletions(-)
arch/arm64/boot/dts/qcom/sc7180-firmware-tfa.dtsi +42 -42
@@ -6,82 +6,82 @@ * by Qualcomm firmware. */ -&CPU0 { +&cpu0 { /delete-property/ power-domains; /delete-property/ power-domain-names; - cpu-idle-states = <&LITTLE_CPU_SLEEP_0 - &LITTLE_CPU_SLEEP_1 - &CLUSTER_SLEEP_0>; + cpu-idle-states = <&little_cpu_sleep_0 + &little_cpu_sleep_1 + &cluster_sleep_0>; }; -&CPU1 { +&cpu1 { /delete-property/ power-domains; /delete-property/ power-domain-names; - cpu-idle-states = <&LITTLE_CPU_SLEEP_0 - &LITTLE_CPU_SLEEP_1 - &CLUSTER_SLEEP_0>; + cpu-idle-states = <&little_cpu_sleep_0 + &little_cpu_sleep_1 + &cluster_sleep_0>; }; -&CPU2 { +&cpu2 { /delete-property/ power-domains; /delete-property/ power-domain-names; - cpu-idle-states = <&LITTLE_CPU_SLEEP_0 - &LITTLE_CPU_SLEEP_1 - &CLUSTER_SLEEP_0>; + cpu-idle-states = <&little_cpu_sleep_0 + &little_cpu_sleep_1 + &cluster_sleep_0>; }; -&CPU3 { +&cpu3 { /delete-property/ power-domains; /delete-property/ power-domain-names; - cpu-idle-states = <&LITTLE_CPU_SLEEP_0 - &LITTLE_CPU_SLEEP_1 - &CLUSTER_SLEEP_0>; + cpu-idle-states = <&little_cpu_sleep_0 + &little_cpu_sleep_1 + &cluster_sleep_0>; }; -&CPU4 { +&cpu4 { /delete-property/ power-domains; /delete-property/ power-domain-names; - cpu-idle-states = <&LITTLE_CPU_SLEEP_0 - &LITTLE_CPU_SLEEP_1 - &CLUSTER_SLEEP_0>; + cpu-idle-states = <&little_cpu_sleep_0 + &little_cpu_sleep_1 + &cluster_sleep_0>; }; -&CPU5 { +&cpu5 { /delete-property/ power-domains; /delete-property/ power-domain-names; - cpu-idle-states = <&LITTLE_CPU_SLEEP_0 - &LITTLE_CPU_SLEEP_1 - &CLUSTER_SLEEP_0>; + cpu-idle-states = <&little_cpu_sleep_0 + &little_cpu_sleep_1 + &cluster_sleep_0>; }; -&CPU6 { +&cpu6 { /delete-property/ power-domains; /delete-property/ power-domain-names; - cpu-idle-states = <&BIG_CPU_SLEEP_0 - &BIG_CPU_SLEEP_1 - &CLUSTER_SLEEP_0>; + cpu-idle-states = <&big_cpu_sleep_0 + &big_cpu_sleep_1 + &cluster_sleep_0>; }; -&CPU7 { +&cpu7 { /delete-property/ power-domains; /delete-property/ power-domain-names; - cpu-idle-states = <&BIG_CPU_SLEEP_0 - &BIG_CPU_SLEEP_1 - &CLUSTER_SLEEP_0>; + cpu-idle-states = <&big_cpu_sleep_0 + &big_cpu_sleep_1 + &cluster_sleep_0>; }; /delete-node/ &domain_idle_states; &idle_states { - CLUSTER_SLEEP_0: cluster-sleep-0 { + cluster_sleep_0: cluster-sleep-0 { compatible = "arm,idle-state"; idle-state-name = "cluster-power-down"; arm,psci-suspend-param = <0x40003444>;
@@ -92,15 +92,15 @@ }; }; -/delete-node/ &CPU_PD0; -/delete-node/ &CPU_PD1; -/delete-node/ &CPU_PD2; -/delete-node/ &CPU_PD3; -/delete-node/ &CPU_PD4; -/delete-node/ &CPU_PD5; -/delete-node/ &CPU_PD6; -/delete-node/ &CPU_PD7; -/delete-node/ &CLUSTER_PD; +/delete-node/ &cpu_pd0; +/delete-node/ &cpu_pd1; +/delete-node/ &cpu_pd2; +/delete-node/ &cpu_pd3; +/delete-node/ &cpu_pd4; +/delete-node/ &cpu_pd5; +/delete-node/ &cpu_pd6; +/delete-node/ &cpu_pd7; +/delete-node/ &cluster_pd; &apps_rsc { /delete-property/ power-domains;
arch/arm64/boot/dts/qcom/sc7180-trogdor-coachz.dtsi +4 -4
@@ -53,14 +53,14 @@ cooling-maps { map0 { trip = <&skin_temp_alert0>; - cooling-device = <&CPU6 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, - <&CPU7 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + cooling-device = <&cpu6 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu7 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; }; map1 { trip = <&skin_temp_alert1>; - cooling-device = <&CPU6 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, - <&CPU7 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + cooling-device = <&cpu6 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu7 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; }; }; };
arch/arm64/boot/dts/qcom/sc7180-trogdor-homestar.dtsi +4 -4
@@ -70,14 +70,14 @@ cooling-maps { map0 { trip = <&skin_temp_alert0>; - cooling-device = <&CPU6 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, - <&CPU7 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + cooling-device = <&cpu6 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu7 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; }; map1 { trip = <&skin_temp_alert1>; - cooling-device = <&CPU6 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, - <&CPU7 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + cooling-device = <&cpu6 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu7 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; }; }; };
arch/arm64/boot/dts/qcom/sc7180-trogdor-wormdingler.dtsi +4 -4
@@ -77,14 +77,14 @@ cooling-maps { map0 { trip = <&skin_temp_alert0>; - cooling-device = <&CPU6 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, - <&CPU7 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + cooling-device = <&cpu6 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu7 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; }; map1 { trip = <&skin_temp_alert1>; - cooling-device = <&CPU6 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, - <&CPU7 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; + cooling-device = <&cpu6 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>, + <&cpu7 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>; }; }; };
arch/arm64/boot/dts/qcom/sc7180.dtsi +181 -181
764 lines not on this page · raw message
arch/arm64/boot/dts/qcom/sm7125.dtsi +8 -8
@@ -6,11 +6,11 @@ #include "sc7180.dtsi" /* SM7125 uses Kryo 465 instead of Kryo 468 */ -&CPU0 { compatible = "qcom,kryo465"; }; -&CPU1 { compatible = "qcom,kryo465"; }; -&CPU2 { compatible = "qcom,kryo465"; }; -&CPU3 { compatible = "qcom,kryo465"; }; -&CPU4 { compatible = "qcom,kryo465"; }; -&CPU5 { compatible = "qcom,kryo465"; }; -&CPU6 { compatible = "qcom,kryo465"; }; -&CPU7 { compatible = "qcom,kryo465"; }; +&cpu0 { compatible = "qcom,kryo465"; }; +&cpu1 { compatible = "qcom,kryo465"; }; +&cpu2 { compatible = "qcom,kryo465"; }; +&cpu3 { compatible = "qcom,kryo465"; }; +&cpu4 { compatible = "qcom,kryo465"; }; +&cpu5 { compatible = "qcom,kryo465"; }; +&cpu6 { compatible = "qcom,kryo465"; }; +&cpu7 { compatible = "qcom,kryo465"; };
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 263/393 arm64: dts: qcom: sc7180: fix psci power domain node names
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Neil Armstrong <[email protected]>
[ Upstream commit 092febd32a99800902f865ed86b83314faa9c7e4 ]
Rename the psci power domain node names to match the bindings.
This Fixes:sc7180-acer-aspire1.dts: psci: 'cpu-cluster0', 'cpu0', 'cpu1', 'cpu2', 'cpu3', 'cpu4', 'cpu5', 'cpu6', 'cpu7' do not match any of the regexes: '^power-domain-', 'pinctrl-[0-9]+'
--- arch/arm64/boot/dts/qcom/sc7180.dtsi | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-)
arch/arm64/boot/dts/qcom/sc7180.dtsi +9 -9
@@ -580,55 +580,55 @@ compatible = "arm,psci-1.0"; method = "smc"; - cpu_pd0: cpu0 { + cpu_pd0: power-domain-cpu0 { #power-domain-cells = <0>; power-domains = <&cluster_pd>; domain-idle-states = <&little_cpu_sleep_0 &little_cpu_sleep_1>; }; - cpu_pd1: cpu1 { + cpu_pd1: power-domain-cpu1 { #power-domain-cells = <0>; power-domains = <&cluster_pd>; domain-idle-states = <&little_cpu_sleep_0 &little_cpu_sleep_1>; }; - cpu_pd2: cpu2 { + cpu_pd2: power-domain-cpu2 { #power-domain-cells = <0>; power-domains = <&cluster_pd>; domain-idle-states = <&little_cpu_sleep_0 &little_cpu_sleep_1>; }; - cpu_pd3: cpu3 { + cpu_pd3: power-domain-cpu3 { #power-domain-cells = <0>; power-domains = <&cluster_pd>; domain-idle-states = <&little_cpu_sleep_0 &little_cpu_sleep_1>; }; - cpu_pd4: cpu4 { + cpu_pd4: power-domain-cpu4 { #power-domain-cells = <0>; power-domains = <&cluster_pd>; domain-idle-states = <&little_cpu_sleep_0 &little_cpu_sleep_1>; }; - cpu_pd5: cpu5 { + cpu_pd5: power-domain-cpu5 { #power-domain-cells = <0>; power-domains = <&cluster_pd>; domain-idle-states = <&little_cpu_sleep_0 &little_cpu_sleep_1>; }; - cpu_pd6: cpu6 { + cpu_pd6: power-domain-cpu6 { #power-domain-cells = <0>; power-domains = <&cluster_pd>; domain-idle-states = <&big_cpu_sleep_0 &big_cpu_sleep_1>; }; - cpu_pd7: cpu7 { + cpu_pd7: power-domain-cpu7 { #power-domain-cells = <0>; power-domains = <&cluster_pd>; domain-idle-states = <&big_cpu_sleep_0 &big_cpu_sleep_1>; }; - cluster_pd: cpu-cluster0 { + cluster_pd: power-domain-cluster { #power-domain-cells = <0>; domain-idle-states = <&cluster_sleep_pc &cluster_sleep_cx_ret
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 264/393 arm64: dts: qcom: sm8150-microsoft-surface-duo: fix typos in da7280 properties
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Neil Armstrong <[email protected]>
[ Upstream commit 9875adffb87da5c40f4013e55104f5e2fc071c2a ]
The dlg,const-op-mode & dlg,periodic-op-mode were mis-names with twice the "dlg," prefix, drop one to match the bindings.
This fixes:
sm8150-microsoft-surface-duo.dtb: da7280@4a: 'dlg,const-op-mode' is a required property
from schema $id: http://devicetree.org/schemas/input/dlg,da7280.yaml#
m8150-microsoft-surface-duo.dtb: da7280@4a: 'dlg,periodic-op-mode' is a required property
from schema $id: http://devicetree.org/schemas/input/dlg,da7280.yaml#
sm8150-microsoft-surface-duo.dtb: da7280@4a: 'dlg,dlg,const-op-mode', 'dlg,dlg,periodic-op-mode' do not match any of the regexes: 'pinctrl-[0-9]+'
from schema $id: http://devicetree.org/schemas/input/dlg,da7280.yaml#
With the dlg,da7280.yaml converted from dlg,da7280.txt at [1].
[1] https://lore.kernel.org/all/[email protected]/
--- arch/arm64/boot/dts/qcom/sm8150-microsoft-surface-duo.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/qcom/sm8150-microsoft-surface-duo.dts +2 -2
@@ -376,8 +376,8 @@ pinctrl-0 = <&da7280_intr_default>; dlg,actuator-type = "LRA"; - dlg,dlg,const-op-mode = <1>; - dlg,dlg,periodic-op-mode = <1>; + dlg,const-op-mode = <1>; + dlg,periodic-op-mode = <1>; dlg,nom-microvolt = <2000000>; dlg,abs-max-microvolt = <2000000>; dlg,imax-microamp = <129000>;
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 265/393 arm64: dts: qcom: sc8280xp: Fix up remoteproc register space sizes
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Konrad Dybcio <[email protected]>
[ Upstream commit 7ec7e327286182c65d0b5b81dff498d620fe9e8c ]
Make sure the remoteproc reg ranges reflect the entire register space they refer to.
Since they're unused by the driver, there's no functional change.
--- arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
arch/arm64/boot/dts/qcom/sc8280xp.dtsi +3 -3
@@ -2642,7 +2642,7 @@ remoteproc_adsp: remoteproc@3000000 { compatible = "qcom,sc8280xp-adsp-pas"; - reg = <0 0x03000000 0 0x100>; + reg = <0 0x03000000 0 0x10000>; interrupts-extended = <&intc GIC_SPI 162 IRQ_TYPE_LEVEL_HIGH>, <&smp2p_adsp_in 0 IRQ_TYPE_EDGE_RISING>,
@@ -4399,7 +4399,7 @@ remoteproc_nsp0: remoteproc@1b300000 { compatible = "qcom,sc8280xp-nsp0-pas"; - reg = <0 0x1b300000 0 0x100>; + reg = <0 0x1b300000 0 0x10000>; interrupts-extended = <&intc GIC_SPI 578 IRQ_TYPE_LEVEL_HIGH>, <&smp2p_nsp0_in 0 IRQ_TYPE_EDGE_RISING>,
@@ -4530,7 +4530,7 @@ remoteproc_nsp1: remoteproc@21300000 { compatible = "qcom,sc8280xp-nsp1-pas"; - reg = <0 0x21300000 0 0x100>; + reg = <0 0x21300000 0 0x10000>; interrupts-extended = <&intc GIC_SPI 887 IRQ_TYPE_LEVEL_HIGH>, <&smp2p_nsp1_in 0 IRQ_TYPE_EDGE_RISING>,
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 266/393 dts: arm64: mediatek: mt8195: Remove MT8183 compatible for OVL
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Jason-JH.Lin <[email protected]>
[ Upstream commit ce3dbc46d7e30a84b8e99c730e3172dd5efbf094 ]
The OVL hardware capabilities have changed starting from MT8195, making the MT8183 compatible no longer applicable. Therefore, it is necessary to remove the MT8183 compatible for OVL.
--- arch/arm64/boot/dts/mediatek/mt8195.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/mediatek/mt8195.dtsi +1 -1
@@ -2677,7 +2677,7 @@ }; ovl0: ovl@1c000000 { - compatible = "mediatek,mt8195-disp-ovl", "mediatek,mt8183-disp-ovl"; + compatible = "mediatek,mt8195-disp-ovl"; reg = <0 0x1c000000 0 0x1000>; interrupts = <GIC_SPI 636 IRQ_TYPE_LEVEL_HIGH 0>; power-domains = <&spm MT8195_POWER_DOMAIN_VDOSYS0>;
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 267/393 arm64: dts: mediatek: add per-SoC compatibles for keypad nodes
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Val Packett <[email protected]>
[ Upstream commit 6139d9e9e397dc9711cf10f8f548a8f9da3b5323 ]
The mt6779-keypad binding specifies using a compatible for the actual SoC before the generic MT6779 one.
--- arch/arm64/boot/dts/mediatek/mt8183.dtsi | 3 ++- arch/arm64/boot/dts/mediatek/mt8365.dtsi | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/mediatek/mt8183.dtsi +2 -1
@@ -1026,7 +1026,8 @@ }; keyboard: keyboard@10010000 { - compatible = "mediatek,mt6779-keypad"; + compatible = "mediatek,mt8183-keypad", + "mediatek,mt6779-keypad"; reg = <0 0x10010000 0 0x1000>; interrupts = <GIC_SPI 186 IRQ_TYPE_EDGE_FALLING>; clocks = <&clk26m>;
arch/arm64/boot/dts/mediatek/mt8365.dtsi +2 -1
@@ -334,7 +334,8 @@ }; keypad: keypad@10010000 { - compatible = "mediatek,mt6779-keypad"; + compatible = "mediatek,mt8365-keypad", + "mediatek,mt6779-keypad"; reg = <0 0x10010000 0 0x1000>; wakeup-source; interrupts = <GIC_SPI 124 IRQ_TYPE_EDGE_FALLING>;
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 268/393 arm64: dts: qcom: sdm845: Fix interrupt types of camss interrupts
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Vladimir Zapolskiy <[email protected]>
[ Upstream commit cb96722b728e81ad97f5b5b20dea64cd294a5452 ]
Qualcomm IP catalog says that all CAMSS interrupts is edge rising, fix it in the CAMSS device tree node for sdm845 SoC.
--- arch/arm64/boot/dts/qcom/sdm845.dtsi | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-)
arch/arm64/boot/dts/qcom/sdm845.dtsi +10 -10
@@ -4244,16 +4244,16 @@ "vfe1", "vfe_lite"; - interrupts = <GIC_SPI 464 IRQ_TYPE_LEVEL_HIGH>, - <GIC_SPI 466 IRQ_TYPE_LEVEL_HIGH>, - <GIC_SPI 468 IRQ_TYPE_LEVEL_HIGH>, - <GIC_SPI 477 IRQ_TYPE_LEVEL_HIGH>, - <GIC_SPI 478 IRQ_TYPE_LEVEL_HIGH>, - <GIC_SPI 479 IRQ_TYPE_LEVEL_HIGH>, - <GIC_SPI 448 IRQ_TYPE_LEVEL_HIGH>, - <GIC_SPI 465 IRQ_TYPE_LEVEL_HIGH>, - <GIC_SPI 467 IRQ_TYPE_LEVEL_HIGH>, - <GIC_SPI 469 IRQ_TYPE_LEVEL_HIGH>; + interrupts = <GIC_SPI 464 IRQ_TYPE_EDGE_RISING>, + <GIC_SPI 466 IRQ_TYPE_EDGE_RISING>, + <GIC_SPI 468 IRQ_TYPE_EDGE_RISING>, + <GIC_SPI 477 IRQ_TYPE_EDGE_RISING>, + <GIC_SPI 478 IRQ_TYPE_EDGE_RISING>, + <GIC_SPI 479 IRQ_TYPE_EDGE_RISING>, + <GIC_SPI 448 IRQ_TYPE_EDGE_RISING>, + <GIC_SPI 465 IRQ_TYPE_EDGE_RISING>, + <GIC_SPI 467 IRQ_TYPE_EDGE_RISING>, + <GIC_SPI 469 IRQ_TYPE_EDGE_RISING>; interrupt-names = "csid0", "csid1", "csid2",
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 269/393 arm64: dts: qcom: sm8250: Fix interrupt types of camss interrupts
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Vladimir Zapolskiy <[email protected]>
[ Upstream commit 6c7bba42ebc3da56e64d4aec4c4a31dd454e05fd ]
Qualcomm IP catalog says that all CAMSS interrupts is edge rising, fix it in the CAMSS device tree node for sm8250 SoC.
--- arch/arm64/boot/dts/qcom/sm8250.dtsi | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-)
arch/arm64/boot/dts/qcom/sm8250.dtsi +14 -14
@@ -4121,20 +4121,20 @@ "vfe_lite0", "vfe_lite1"; - interrupts = <GIC_SPI 477 IRQ_TYPE_LEVEL_HIGH>, - <GIC_SPI 478 IRQ_TYPE_LEVEL_HIGH>, - <GIC_SPI 479 IRQ_TYPE_LEVEL_HIGH>, - <GIC_SPI 448 IRQ_TYPE_LEVEL_HIGH>, - <GIC_SPI 86 IRQ_TYPE_LEVEL_HIGH>, - <GIC_SPI 89 IRQ_TYPE_LEVEL_HIGH>, - <GIC_SPI 464 IRQ_TYPE_LEVEL_HIGH>, - <GIC_SPI 466 IRQ_TYPE_LEVEL_HIGH>, - <GIC_SPI 468 IRQ_TYPE_LEVEL_HIGH>, - <GIC_SPI 359 IRQ_TYPE_LEVEL_HIGH>, - <GIC_SPI 465 IRQ_TYPE_LEVEL_HIGH>, - <GIC_SPI 467 IRQ_TYPE_LEVEL_HIGH>, - <GIC_SPI 469 IRQ_TYPE_LEVEL_HIGH>, - <GIC_SPI 360 IRQ_TYPE_LEVEL_HIGH>; + interrupts = <GIC_SPI 477 IRQ_TYPE_EDGE_RISING>, + <GIC_SPI 478 IRQ_TYPE_EDGE_RISING>, + <GIC_SPI 479 IRQ_TYPE_EDGE_RISING>, + <GIC_SPI 448 IRQ_TYPE_EDGE_RISING>, + <GIC_SPI 86 IRQ_TYPE_EDGE_RISING>, + <GIC_SPI 89 IRQ_TYPE_EDGE_RISING>, + <GIC_SPI 464 IRQ_TYPE_EDGE_RISING>, + <GIC_SPI 466 IRQ_TYPE_EDGE_RISING>, + <GIC_SPI 468 IRQ_TYPE_EDGE_RISING>, + <GIC_SPI 359 IRQ_TYPE_EDGE_RISING>, + <GIC_SPI 465 IRQ_TYPE_EDGE_RISING>, + <GIC_SPI 467 IRQ_TYPE_EDGE_RISING>, + <GIC_SPI 469 IRQ_TYPE_EDGE_RISING>, + <GIC_SPI 360 IRQ_TYPE_EDGE_RISING>; interrupt-names = "csiphy0", "csiphy1", "csiphy2",
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 270/393 ARM: dts: mediatek: mt7623: fix IR nodename
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Rafał Miłecki <[email protected]>
[ Upstream commit 90234cf9b37c57201a24b78c217a91a8af774109 ]
Fix following validation error:arch/arm/boot/dts/mediatek/mt7623a-rfb-emmc.dtb: cir@10013000: $nodename:0: 'cir@10013000' does not match '^ir(-receiver)?(@[a-f0-9]+)?$'
from schema $id: http://devicetree.org/schemas/media/mediatek,mt7622-cir.yaml#
--- arch/arm/boot/dts/mediatek/mt7623.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/mediatek/mt7623.dtsi +1 -1
@@ -308,7 +308,7 @@ clock-names = "spi", "wrap"; }; - cir: cir@10013000 { + cir: ir-receiver@10013000 { compatible = "mediatek,mt7623-cir"; reg = <0 0x10013000 0 0x1000>; interrupts = <GIC_SPI 87 IRQ_TYPE_LEVEL_LOW>;
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 271/393 fbdev: omapfb: Fix an OF node leak in dss_of_port_get_parent_device()
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Joe Hattori <[email protected]>
[ Upstream commit de124b61e179e690277116e6be512e4f422b5dd8 ]
dss_of_port_get_parent_device() leaks an OF node reference when i >= 2 and struct device_node *np is present. Since of_get_next_parent() obtains a reference of the returned OF node, call of_node_put() before returning NULL.
This was found by an experimental verifier that I am developing, and no runtime test was able to be performed due to that lack of actual devices.
--- drivers/video/fbdev/omap2/omapfb/dss/dss-of.c | 1 + 1 file changed, 1 insertion(+)
drivers/video/fbdev/omap2/omapfb/dss/dss-of.c +1 -0
@@ -102,6 +102,7 @@ struct device_node *dss_of_port_get_parent_device(struct device_node *port) np =of_get_next_parent (np); } +of_node_put (np);return NULL ; }
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 272/393 arm64: tegra: Fix DMA ID for SPI2
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Akhil R <[email protected]>
[ Upstream commit 346bf459db26325c09ed841fdfd6678de1b1cb3a ]
DMA ID for SPI2 is '16'. Update the incorrect value in the devicetree.
--- arch/arm64/boot/dts/nvidia/tegra234.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/nvidia/tegra234.dtsi +1 -1
@@ -1794,7 +1794,7 @@ assigned-clock-parents = <&bpmp TEGRA234_CLK_PLLP_OUT0>; resets = <&bpmp TEGRA234_RESET_SPI2>; reset-names = "spi"; - dmas = <&gpcdma 19>, <&gpcdma 19>; + dmas = <&gpcdma 16>, <&gpcdma 16>; dma-names = "rx", "tx"; dma-coherent; status = "disabled";
Signature · 1 line
2.39.5
Greg Kroah-Hartman
maintainerPATCH 273/393 i3c: dw: Add hot-join support.
In reply to Greg Kroah-Hartman6.6-stable review patch. If anyone has any objections, please let me know.
------------------
From: Billy Tsai <[email protected]>
[ Upstream commit 1d08326020fba690cbb7b8f1b38ab4eab6745969 ]
Add hot-join support for dw i3c master controller.
By default, the hot-join acknowledgment is disabled, and the hardware will automatically send the DISEC CCC when it receives the hot-join request. Users can use the sys entry to enable it.
Stable-dep-of: b75439c945b9 ("i3c: dw: Fix use-after-free in dw_i3c_master driver due to race condition")
--- drivers/i3c/master/dw-i3c-master.c | 67 ++++++++++++++++++++++++------ drivers/i3c/master/dw-i3c-master.h | 2 + 2 files changed, 56 insertions(+), 13 deletions(-)
drivers/i3c/master/dw-i3c-master.c +54 -13
@@ -1136,6 +1136,23 @@ static void dw_i3c_master_free_ibi(struct i3c_dev_desc *dev) data->ibi_pool =NULL ; } +static void dw_i3c_master_enable_sir_signal (struct dw_i3c_master *master,bool enable) +{ +u32 reg; + + reg =readl (master->regs +INTR_STATUS_EN ); + reg &= ~INTR_IBI_THLD_STAT ; +if (enable) + reg |=INTR_IBI_THLD_STAT ; +writel (reg, master->regs +INTR_STATUS_EN ); + + reg =readl (master->regs +INTR_SIGNAL_EN ); + reg &= ~INTR_IBI_THLD_STAT ; +if (enable) + reg |=INTR_IBI_THLD_STAT ; +writel (reg, master->regs +INTR_SIGNAL_EN ); +} +static void dw_i3c_master_set_sir_enabled (struct dw_i3c_master *master,struct i3c_dev_desc *dev,u8 idx,bool enable)
@@ -1170,23 +1187,34 @@ static void dw_i3c_master_set_sir_enabled(struct dw_i3c_master *master, }writel (reg, master->regs +IBI_SIR_REQ_REJECT ); -if (global) { - reg =readl (master->regs +INTR_STATUS_EN ); - reg &= ~INTR_IBI_THLD_STAT ; -if (enable) - reg |=INTR_IBI_THLD_STAT ; -writel (reg, master->regs +INTR_STATUS_EN ); - - reg =readl (master->regs +INTR_SIGNAL_EN ); - reg &= ~INTR_IBI_THLD_STAT ; -if (enable) - reg |=INTR_IBI_THLD_STAT ; -writel (reg, master->regs +INTR_SIGNAL_EN ); - } +if (global) +dw_i3c_master_enable_sir_signal (master, enable); +spin_unlock_irqrestore (&master->devs_lock, flags); } +static int dw_i3c_master_enable_hotjoin (struct i3c_master_controller *m) +{ +struct dw_i3c_master *master =to_dw_i3c_master (m); + +dw_i3c_master_enable_sir_signal (master, true); +writel (readl (master->regs +DEVICE_CTRL ) & ~DEV_CTRL_HOT_JOIN_NACK , + master->regs +DEVICE_CTRL ); + +return 0 ; +} + +static int dw_i3c_master_disable_hotjoin (struct i3c_master_controller *m) +{ +struct dw_i3c_master *master =to_dw_i3c_master (m); + +writel (readl (master->regs +DEVICE_CTRL ) |DEV_CTRL_HOT_JOIN_NACK , + master->regs +DEVICE_CTRL ); + +return 0 ; +} +static int dw_i3c_master_enable_ibi (struct i3c_dev_desc *dev) {struct dw_i3c_i2c_dev_data *data =i3c_dev_get_master_data (dev);
@@ -1326,6 +1354,8 @@ static void dw_i3c_master_irq_handle_ibis(struct dw_i3c_master *master)if (IBI_TYPE_SIRQ (reg)) {dw_i3c_master_handle_ibi_sir (master, reg); + }else if (IBI_TYPE_HJ (reg)) { +queue_work (master->base.wq, &master->hj_work); }else { len =IBI_QUEUE_STATUS_DATA_LEN (reg); dev_info(&master->base.dev,
@@ -1393,6 +1423,8 @@ static const struct i3c_master_controller_ops dw_mipi_i3c_ibi_ops = { .enable_ibi = dw_i3c_master_enable_ibi, .disable_ibi = dw_i3c_master_disable_ibi, .recycle_ibi_slot = dw_i3c_master_recycle_ibi_slot, + .enable_hotjoin = dw_i3c_master_enable_hotjoin, + .disable_hotjoin = dw_i3c_master_disable_hotjoin, };/* default platform ops implementations */
@@ -1412,6 +1444,14 @@ static const struct dw_i3c_platform_ops dw_i3c_platform_ops_default = { .set_dat_ibi = dw_i3c_platform_set_dat_ibi_nop, }; +static void dw_i3c_hj_work (struct work_struct *work) +{ +struct dw_i3c_master *master = +container_of (work,typeof (*master), hj_work); + +i3c_master_do_daa (&master->base); +} +int dw_i3c_common_probe (struct dw_i3c_master *master,struct platform_device *pdev) {
@@ -1469,6 +1509,7 @@ int dw_i3c_common_probe(struct dw_i3c_master *master,if (master->ibi_capable) ops = &dw_mipi_i3c_ibi_ops; +INIT_WORK (&master->hj_work, dw_i3c_hj_work); ret =i3c_master_register (&master->base, &pdev->dev, ops, false);if (ret) goto err_assert_rst;
drivers/i3c/master/dw-i3c-master.h +2 -0
@@ -57,6 +57,8 @@ struct dw_i3c_master {/* platform-specific data */ const struct dw_i3c_platform_ops *platform_ops; + +struct work_struct hj_work; };struct dw_i3c_platform_ops {
Signature · 1 line
2.39.5