Skip to content

Commit 840a696

Browse files
committed
Automatic merge of 'master' into merge (2024-07-12 22:47)
2 parents 79d16b1 + 43db1e0 commit 840a696

File tree

146 files changed

+1624
-947
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

146 files changed

+1624
-947
lines changed

Diff for: .mailmap

+1
Original file line numberDiff line numberDiff line change
@@ -384,6 +384,7 @@ Li Yang <[email protected]> <[email protected]>
384384
385385
386386
387+
387388
388389
389390

Diff for: Documentation/networking/devlink/devlink-region.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ example usage
4949
$ devlink region show [ DEV/REGION ]
5050
$ devlink region del DEV/REGION snapshot SNAPSHOT_ID
5151
$ devlink region dump DEV/REGION [ snapshot SNAPSHOT_ID ]
52-
$ devlink region read DEV/REGION [ snapshot SNAPSHOT_ID ] address ADDRESS length length
52+
$ devlink region read DEV/REGION [ snapshot SNAPSHOT_ID ] address ADDRESS length LENGTH
5353
5454
# Show all of the exposed regions with region sizes:
5555
$ devlink region show

Diff for: MAINTAINERS

+1-1
Original file line numberDiff line numberDiff line change
@@ -14471,7 +14471,7 @@ MEMORY MAPPING
1447114471
M: Andrew Morton <[email protected]>
1447214472
R: Liam R. Howlett <[email protected]>
1447314473
R: Vlastimil Babka <[email protected]>
14474-
R: Lorenzo Stoakes <lstoakes@gmail.com>
14474+
R: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
1447514475
1447614476
S: Maintained
1447714477
W: http://www.linux-mm.org

Diff for: arch/s390/mm/pgalloc.c

+4
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ unsigned long *crst_table_alloc(struct mm_struct *mm)
5555

5656
void crst_table_free(struct mm_struct *mm, unsigned long *table)
5757
{
58+
if (!table)
59+
return;
5860
pagetable_free(virt_to_ptdesc(table));
5961
}
6062

@@ -262,6 +264,8 @@ static unsigned long *base_crst_alloc(unsigned long val)
262264

263265
static void base_crst_free(unsigned long *table)
264266
{
267+
if (!table)
268+
return;
265269
pagetable_free(virt_to_ptdesc(table));
266270
}
267271

Diff for: arch/xtensa/include/asm/current.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
struct task_struct;
2121

22-
static inline struct task_struct *get_current(void)
22+
static __always_inline struct task_struct *get_current(void)
2323
{
2424
return current_thread_info()->task;
2525
}

Diff for: arch/xtensa/include/asm/thread_info.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ struct thread_info {
9191
}
9292

9393
/* how to get the thread information struct from C */
94-
static inline struct thread_info *current_thread_info(void)
94+
static __always_inline struct thread_info *current_thread_info(void)
9595
{
9696
struct thread_info *ti;
9797
__asm__("extui %0, a1, 0, "__stringify(CURRENT_SHIFT)"\n\t"

Diff for: drivers/acpi/processor_idle.c

+16-21
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
#include <linux/acpi.h>
1717
#include <linux/dmi.h>
1818
#include <linux/sched.h> /* need_resched() */
19-
#include <linux/sort.h>
2019
#include <linux/tick.h>
2120
#include <linux/cpuidle.h>
2221
#include <linux/cpu.h>
@@ -386,25 +385,24 @@ static void acpi_processor_power_verify_c3(struct acpi_processor *pr,
386385
acpi_write_bit_register(ACPI_BITREG_BUS_MASTER_RLD, 1);
387386
}
388387

389-
static int acpi_cst_latency_cmp(const void *a, const void *b)
388+
static void acpi_cst_latency_sort(struct acpi_processor_cx *states, size_t length)
390389
{
391-
const struct acpi_processor_cx *x = a, *y = b;
390+
int i, j, k;
392391

393-
if (!(x->valid && y->valid))
394-
return 0;
395-
if (x->latency > y->latency)
396-
return 1;
397-
if (x->latency < y->latency)
398-
return -1;
399-
return 0;
400-
}
401-
static void acpi_cst_latency_swap(void *a, void *b, int n)
402-
{
403-
struct acpi_processor_cx *x = a, *y = b;
392+
for (i = 1; i < length; i++) {
393+
if (!states[i].valid)
394+
continue;
404395

405-
if (!(x->valid && y->valid))
406-
return;
407-
swap(x->latency, y->latency);
396+
for (j = i - 1, k = i; j >= 0; j--) {
397+
if (!states[j].valid)
398+
continue;
399+
400+
if (states[j].latency > states[k].latency)
401+
swap(states[j].latency, states[k].latency);
402+
403+
k = j;
404+
}
405+
}
408406
}
409407

410408
static int acpi_processor_power_verify(struct acpi_processor *pr)
@@ -449,10 +447,7 @@ static int acpi_processor_power_verify(struct acpi_processor *pr)
449447

450448
if (buggy_latency) {
451449
pr_notice("FW issue: working around C-state latencies out of order\n");
452-
sort(&pr->power.states[1], max_cstate,
453-
sizeof(struct acpi_processor_cx),
454-
acpi_cst_latency_cmp,
455-
acpi_cst_latency_swap);
450+
acpi_cst_latency_sort(&pr->power.states[1], max_cstate);
456451
}
457452

458453
lapic_timer_propagate_broadcast(pr);

Diff for: drivers/cpufreq/acpi-cpufreq.c

+3-1
Original file line numberDiff line numberDiff line change
@@ -890,8 +890,10 @@ static int acpi_cpufreq_cpu_init(struct cpufreq_policy *policy)
890890
if (perf->states[0].core_frequency * 1000 != freq_table[0].frequency)
891891
pr_warn(FW_WARN "P-state 0 is not max freq\n");
892892

893-
if (acpi_cpufreq_driver.set_boost)
893+
if (acpi_cpufreq_driver.set_boost) {
894894
set_boost(policy, acpi_cpufreq_driver.boost_enabled);
895+
policy->boost_enabled = acpi_cpufreq_driver.boost_enabled;
896+
}
895897

896898
return result;
897899

Diff for: drivers/cpufreq/cpufreq.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -1431,7 +1431,8 @@ static int cpufreq_online(unsigned int cpu)
14311431
}
14321432

14331433
/* Let the per-policy boost flag mirror the cpufreq_driver boost during init */
1434-
policy->boost_enabled = cpufreq_boost_enabled() && policy_has_boost_freq(policy);
1434+
if (cpufreq_boost_enabled() && policy_has_boost_freq(policy))
1435+
policy->boost_enabled = true;
14351436

14361437
/*
14371438
* The initialization has succeeded and the policy is online.

Diff for: drivers/md/dm-vdo/dm-vdo-target.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -945,7 +945,7 @@ static void vdo_io_hints(struct dm_target *ti, struct queue_limits *limits)
945945
* The value is used by dm-thin to determine whether to pass down discards. The block layer
946946
* splits large discards on this boundary when this is set.
947947
*/
948-
limits->max_discard_sectors =
948+
limits->max_hw_discard_sectors =
949949
(vdo->device_config->max_discard_blocks * VDO_SECTORS_PER_BLOCK);
950950

951951
/*

Diff for: drivers/net/dsa/lan9303-core.c

+10-13
Original file line numberDiff line numberDiff line change
@@ -1047,31 +1047,31 @@ static int lan9303_get_sset_count(struct dsa_switch *ds, int port, int sset)
10471047
return ARRAY_SIZE(lan9303_mib);
10481048
}
10491049

1050-
static int lan9303_phy_read(struct dsa_switch *ds, int phy, int regnum)
1050+
static int lan9303_phy_read(struct dsa_switch *ds, int port, int regnum)
10511051
{
10521052
struct lan9303 *chip = ds->priv;
10531053
int phy_base = chip->phy_addr_base;
10541054

1055-
if (phy == phy_base)
1055+
if (port == 0)
10561056
return lan9303_virt_phy_reg_read(chip, regnum);
1057-
if (phy > phy_base + 2)
1057+
if (port > 2)
10581058
return -ENODEV;
10591059

1060-
return chip->ops->phy_read(chip, phy, regnum);
1060+
return chip->ops->phy_read(chip, phy_base + port, regnum);
10611061
}
10621062

1063-
static int lan9303_phy_write(struct dsa_switch *ds, int phy, int regnum,
1063+
static int lan9303_phy_write(struct dsa_switch *ds, int port, int regnum,
10641064
u16 val)
10651065
{
10661066
struct lan9303 *chip = ds->priv;
10671067
int phy_base = chip->phy_addr_base;
10681068

1069-
if (phy == phy_base)
1069+
if (port == 0)
10701070
return lan9303_virt_phy_reg_write(chip, regnum, val);
1071-
if (phy > phy_base + 2)
1071+
if (port > 2)
10721072
return -ENODEV;
10731073

1074-
return chip->ops->phy_write(chip, phy, regnum, val);
1074+
return chip->ops->phy_write(chip, phy_base + port, regnum, val);
10751075
}
10761076

10771077
static int lan9303_port_enable(struct dsa_switch *ds, int port,
@@ -1099,7 +1099,7 @@ static void lan9303_port_disable(struct dsa_switch *ds, int port)
10991099
vlan_vid_del(dsa_port_to_conduit(dp), htons(ETH_P_8021Q), port);
11001100

11011101
lan9303_disable_processing_port(chip, port);
1102-
lan9303_phy_write(ds, chip->phy_addr_base + port, MII_BMCR, BMCR_PDOWN);
1102+
lan9303_phy_write(ds, port, MII_BMCR, BMCR_PDOWN);
11031103
}
11041104

11051105
static int lan9303_port_bridge_join(struct dsa_switch *ds, int port,
@@ -1374,8 +1374,6 @@ static const struct dsa_switch_ops lan9303_switch_ops = {
13741374

13751375
static int lan9303_register_switch(struct lan9303 *chip)
13761376
{
1377-
int base;
1378-
13791377
chip->ds = devm_kzalloc(chip->dev, sizeof(*chip->ds), GFP_KERNEL);
13801378
if (!chip->ds)
13811379
return -ENOMEM;
@@ -1385,8 +1383,7 @@ static int lan9303_register_switch(struct lan9303 *chip)
13851383
chip->ds->priv = chip;
13861384
chip->ds->ops = &lan9303_switch_ops;
13871385
chip->ds->phylink_mac_ops = &lan9303_phylink_mac_ops;
1388-
base = chip->phy_addr_base;
1389-
chip->ds->phys_mii_mask = GENMASK(LAN9303_NUM_PORTS - 1 + base, base);
1386+
chip->ds->phys_mii_mask = GENMASK(LAN9303_NUM_PORTS - 1, 0);
13901387

13911388
return dsa_register_switch(chip->ds);
13921389
}

Diff for: drivers/net/ethernet/broadcom/asp2/bcmasp.c

+1
Original file line numberDiff line numberDiff line change
@@ -1380,6 +1380,7 @@ static int bcmasp_probe(struct platform_device *pdev)
13801380
dev_err(dev, "Cannot create eth interface %d\n", i);
13811381
bcmasp_remove_intfs(priv);
13821382
of_node_put(intf_node);
1383+
ret = -ENOMEM;
13831384
goto of_put_exit;
13841385
}
13851386
list_add_tail(&intf->list, &priv->intfs);

Diff for: drivers/net/ethernet/broadcom/bnxt/bnxt.c

+15
Original file line numberDiff line numberDiff line change
@@ -6146,6 +6146,21 @@ static u16 bnxt_get_max_rss_ring(struct bnxt *bp)
61466146
return max_ring;
61476147
}
61486148

6149+
u16 bnxt_get_max_rss_ctx_ring(struct bnxt *bp)
6150+
{
6151+
u16 i, tbl_size, max_ring = 0;
6152+
struct bnxt_rss_ctx *rss_ctx;
6153+
6154+
tbl_size = bnxt_get_rxfh_indir_size(bp->dev);
6155+
6156+
list_for_each_entry(rss_ctx, &bp->rss_ctx_list, list) {
6157+
for (i = 0; i < tbl_size; i++)
6158+
max_ring = max(max_ring, rss_ctx->rss_indir_tbl[i]);
6159+
}
6160+
6161+
return max_ring;
6162+
}
6163+
61496164
int bnxt_get_nr_rss_ctxs(struct bnxt *bp, int rx_rings)
61506165
{
61516166
if (bp->flags & BNXT_FLAG_CHIP_P5_PLUS) {

Diff for: drivers/net/ethernet/broadcom/bnxt/bnxt.h

+1
Original file line numberDiff line numberDiff line change
@@ -2776,6 +2776,7 @@ int bnxt_hwrm_vnic_set_tpa(struct bnxt *bp, struct bnxt_vnic_info *vnic,
27762776
void bnxt_fill_ipv6_mask(__be32 mask[4]);
27772777
int bnxt_alloc_rss_indir_tbl(struct bnxt *bp, struct bnxt_rss_ctx *rss_ctx);
27782778
void bnxt_set_dflt_rss_indir_tbl(struct bnxt *bp, struct bnxt_rss_ctx *rss_ctx);
2779+
u16 bnxt_get_max_rss_ctx_ring(struct bnxt *bp);
27792780
int bnxt_get_nr_rss_ctxs(struct bnxt *bp, int rx_rings);
27802781
int bnxt_hwrm_vnic_cfg(struct bnxt *bp, struct bnxt_vnic_info *vnic);
27812782
int bnxt_hwrm_vnic_alloc(struct bnxt *bp, struct bnxt_vnic_info *vnic,

Diff for: drivers/net/ethernet/broadcom/bnxt/bnxt_ethtool.c

+6
Original file line numberDiff line numberDiff line change
@@ -961,6 +961,12 @@ static int bnxt_set_channels(struct net_device *dev,
961961
return rc;
962962
}
963963

964+
if (req_rx_rings < bp->rx_nr_rings &&
965+
req_rx_rings <= bnxt_get_max_rss_ctx_ring(bp)) {
966+
netdev_warn(dev, "Can't deactivate rings used by RSS contexts\n");
967+
return -EINVAL;
968+
}
969+
964970
if (bnxt_get_nr_rss_ctxs(bp, req_rx_rings) !=
965971
bnxt_get_nr_rss_ctxs(bp, bp->rx_nr_rings) &&
966972
netif_is_rxfh_configured(dev)) {

Diff for: drivers/net/ethernet/intel/e1000e/ich8lan.c

+53-20
Original file line numberDiff line numberDiff line change
@@ -1108,6 +1108,46 @@ static s32 e1000_platform_pm_pch_lpt(struct e1000_hw *hw, bool link)
11081108
return 0;
11091109
}
11101110

1111+
/**
1112+
* e1000e_force_smbus - Force interfaces to transition to SMBUS mode.
1113+
* @hw: pointer to the HW structure
1114+
*
1115+
* Force the MAC and the PHY to SMBUS mode. Assumes semaphore already
1116+
* acquired.
1117+
*
1118+
* Return: 0 on success, negative errno on failure.
1119+
**/
1120+
static s32 e1000e_force_smbus(struct e1000_hw *hw)
1121+
{
1122+
u16 smb_ctrl = 0;
1123+
u32 ctrl_ext;
1124+
s32 ret_val;
1125+
1126+
/* Switching PHY interface always returns MDI error
1127+
* so disable retry mechanism to avoid wasting time
1128+
*/
1129+
e1000e_disable_phy_retry(hw);
1130+
1131+
/* Force SMBus mode in the PHY */
1132+
ret_val = e1000_read_phy_reg_hv_locked(hw, CV_SMB_CTRL, &smb_ctrl);
1133+
if (ret_val) {
1134+
e1000e_enable_phy_retry(hw);
1135+
return ret_val;
1136+
}
1137+
1138+
smb_ctrl |= CV_SMB_CTRL_FORCE_SMBUS;
1139+
e1000_write_phy_reg_hv_locked(hw, CV_SMB_CTRL, smb_ctrl);
1140+
1141+
e1000e_enable_phy_retry(hw);
1142+
1143+
/* Force SMBus mode in the MAC */
1144+
ctrl_ext = er32(CTRL_EXT);
1145+
ctrl_ext |= E1000_CTRL_EXT_FORCE_SMBUS;
1146+
ew32(CTRL_EXT, ctrl_ext);
1147+
1148+
return 0;
1149+
}
1150+
11111151
/**
11121152
* e1000_enable_ulp_lpt_lp - configure Ultra Low Power mode for LynxPoint-LP
11131153
* @hw: pointer to the HW structure
@@ -1165,6 +1205,14 @@ s32 e1000_enable_ulp_lpt_lp(struct e1000_hw *hw, bool to_sx)
11651205
if (ret_val)
11661206
goto out;
11671207

1208+
if (hw->mac.type != e1000_pch_mtp) {
1209+
ret_val = e1000e_force_smbus(hw);
1210+
if (ret_val) {
1211+
e_dbg("Failed to force SMBUS: %d\n", ret_val);
1212+
goto release;
1213+
}
1214+
}
1215+
11681216
/* Si workaround for ULP entry flow on i127/rev6 h/w. Enable
11691217
* LPLU and disable Gig speed when entering ULP
11701218
*/
@@ -1225,27 +1273,12 @@ s32 e1000_enable_ulp_lpt_lp(struct e1000_hw *hw, bool to_sx)
12251273
}
12261274

12271275
release:
1228-
/* Switching PHY interface always returns MDI error
1229-
* so disable retry mechanism to avoid wasting time
1230-
*/
1231-
e1000e_disable_phy_retry(hw);
1232-
1233-
/* Force SMBus mode in PHY */
1234-
ret_val = e1000_read_phy_reg_hv_locked(hw, CV_SMB_CTRL, &phy_reg);
1235-
if (ret_val) {
1236-
e1000e_enable_phy_retry(hw);
1237-
hw->phy.ops.release(hw);
1238-
goto out;
1276+
if (hw->mac.type == e1000_pch_mtp) {
1277+
ret_val = e1000e_force_smbus(hw);
1278+
if (ret_val)
1279+
e_dbg("Failed to force SMBUS over MTL system: %d\n",
1280+
ret_val);
12391281
}
1240-
phy_reg |= CV_SMB_CTRL_FORCE_SMBUS;
1241-
e1000_write_phy_reg_hv_locked(hw, CV_SMB_CTRL, phy_reg);
1242-
1243-
e1000e_enable_phy_retry(hw);
1244-
1245-
/* Force SMBus mode in MAC */
1246-
mac_reg = er32(CTRL_EXT);
1247-
mac_reg |= E1000_CTRL_EXT_FORCE_SMBUS;
1248-
ew32(CTRL_EXT, mac_reg);
12491282

12501283
hw->phy.ops.release(hw);
12511284
out:

Diff for: drivers/net/ethernet/intel/i40e/i40e_main.c

+4-5
Original file line numberDiff line numberDiff line change
@@ -13293,6 +13293,10 @@ static int i40e_xdp_setup(struct i40e_vsi *vsi, struct bpf_prog *prog,
1329313293
bool need_reset;
1329413294
int i;
1329513295

13296+
/* VSI shall be deleted in a moment, block loading new programs */
13297+
if (prog && test_bit(__I40E_IN_REMOVE, pf->state))
13298+
return -EINVAL;
13299+
1329613300
/* Don't allow frames that span over multiple buffers */
1329713301
if (vsi->netdev->mtu > frame_size - I40E_PACKET_HDR_PAD) {
1329813302
NL_SET_ERR_MSG_MOD(extack, "MTU too large for linear frames and XDP prog does not support frags");
@@ -13301,14 +13305,9 @@ static int i40e_xdp_setup(struct i40e_vsi *vsi, struct bpf_prog *prog,
1330113305

1330213306
/* When turning XDP on->off/off->on we reset and rebuild the rings. */
1330313307
need_reset = (i40e_enabled_xdp_vsi(vsi) != !!prog);
13304-
1330513308
if (need_reset)
1330613309
i40e_prep_for_reset(pf);
1330713310

13308-
/* VSI shall be deleted in a moment, just return EINVAL */
13309-
if (test_bit(__I40E_IN_REMOVE, pf->state))
13310-
return -EINVAL;
13311-
1331213311
old_prog = xchg(&vsi->xdp_prog, prog);
1331313312

1331413313
if (need_reset) {

0 commit comments

Comments
 (0)