* [PATCH AUTOSEL 6.13 02/17] ASoC: tas2770: Fix volume scale
2025-03-03 16:29 [PATCH AUTOSEL 6.13 01/17] phy: ti: gmii-sel: Do not use syscon helper to build regmap Sasha Levin
@ 2025-03-03 16:29 ` Sasha Levin
2025-03-03 16:29 ` [PATCH AUTOSEL 6.13 03/17] ASoC: tas2764: Fix power control mask Sasha Levin
` (14 subsequent siblings)
15 siblings, 0 replies; 19+ messages in thread
From: Sasha Levin @ 2025-03-03 16:29 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Hector Martin, Mark Brown, Sasha Levin, shenghao-ding, kevin-lu,
baojun.xu, lgirdwood, perex, tiwai, linux-sound
From: Hector Martin <marcan@marcan.st>
[ Upstream commit 579cd64b9df8a60284ec3422be919c362de40e41 ]
The scale starts at -100dB, not -128dB.
Signed-off-by: Hector Martin <marcan@marcan.st>
Signed-off-by: Mark Brown <broonie@kernel.org>
Link: https://patch.msgid.link/20250208-asoc-tas2770-v1-1-cf50ff1d59a3@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/codecs/tas2770.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/codecs/tas2770.c b/sound/soc/codecs/tas2770.c
index 9f93b230652a5..863c3f672ba98 100644
--- a/sound/soc/codecs/tas2770.c
+++ b/sound/soc/codecs/tas2770.c
@@ -506,7 +506,7 @@ static int tas2770_codec_probe(struct snd_soc_component *component)
}
static DECLARE_TLV_DB_SCALE(tas2770_digital_tlv, 1100, 50, 0);
-static DECLARE_TLV_DB_SCALE(tas2770_playback_volume, -12750, 50, 0);
+static DECLARE_TLV_DB_SCALE(tas2770_playback_volume, -10050, 50, 0);
static const struct snd_kcontrol_new tas2770_snd_controls[] = {
SOC_SINGLE_TLV("Speaker Playback Volume", TAS2770_PLAY_CFG_REG2,
--
2.39.5
^ permalink raw reply related [flat|nested] 19+ messages in thread* [PATCH AUTOSEL 6.13 03/17] ASoC: tas2764: Fix power control mask
2025-03-03 16:29 [PATCH AUTOSEL 6.13 01/17] phy: ti: gmii-sel: Do not use syscon helper to build regmap Sasha Levin
2025-03-03 16:29 ` [PATCH AUTOSEL 6.13 02/17] ASoC: tas2770: Fix volume scale Sasha Levin
@ 2025-03-03 16:29 ` Sasha Levin
2025-03-03 16:29 ` [PATCH AUTOSEL 6.13 04/17] ASoC: tas2764: Set the SDOUT polarity correctly Sasha Levin
` (13 subsequent siblings)
15 siblings, 0 replies; 19+ messages in thread
From: Sasha Levin @ 2025-03-03 16:29 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Hector Martin, Neal Gompa, James Calligeros, Mark Brown,
Sasha Levin, shenghao-ding, kevin-lu, baojun.xu, lgirdwood, perex,
tiwai, linux-sound
From: Hector Martin <marcan@marcan.st>
[ Upstream commit a3f172359e22b2c11b750d23560481a55bf86af1 ]
Reviewed-by: Neal Gompa <neal@gompa.dev>
Signed-off-by: Hector Martin <marcan@marcan.st>
Signed-off-by: James Calligeros <jcalligeros99@gmail.com>
Link: https://patch.msgid.link/20250218-apple-codec-changes-v2-1-932760fd7e07@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/codecs/tas2764.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/soc/codecs/tas2764.h b/sound/soc/codecs/tas2764.h
index 168af772a898f..d13ecae9c9c2f 100644
--- a/sound/soc/codecs/tas2764.h
+++ b/sound/soc/codecs/tas2764.h
@@ -25,7 +25,7 @@
/* Power Control */
#define TAS2764_PWR_CTRL TAS2764_REG(0X0, 0x02)
-#define TAS2764_PWR_CTRL_MASK GENMASK(1, 0)
+#define TAS2764_PWR_CTRL_MASK GENMASK(2, 0)
#define TAS2764_PWR_CTRL_ACTIVE 0x0
#define TAS2764_PWR_CTRL_MUTE BIT(0)
#define TAS2764_PWR_CTRL_SHUTDOWN BIT(1)
--
2.39.5
^ permalink raw reply related [flat|nested] 19+ messages in thread* [PATCH AUTOSEL 6.13 04/17] ASoC: tas2764: Set the SDOUT polarity correctly
2025-03-03 16:29 [PATCH AUTOSEL 6.13 01/17] phy: ti: gmii-sel: Do not use syscon helper to build regmap Sasha Levin
2025-03-03 16:29 ` [PATCH AUTOSEL 6.13 02/17] ASoC: tas2770: Fix volume scale Sasha Levin
2025-03-03 16:29 ` [PATCH AUTOSEL 6.13 03/17] ASoC: tas2764: Fix power control mask Sasha Levin
@ 2025-03-03 16:29 ` Sasha Levin
2025-03-03 16:29 ` [PATCH AUTOSEL 6.13 05/17] fuse: don't truncate cached, mutated symlink Sasha Levin
` (12 subsequent siblings)
15 siblings, 0 replies; 19+ messages in thread
From: Sasha Levin @ 2025-03-03 16:29 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Hector Martin, Neal Gompa, James Calligeros, Mark Brown,
Sasha Levin, shenghao-ding, kevin-lu, baojun.xu, lgirdwood, perex,
tiwai, linux-sound
From: Hector Martin <marcan@marcan.st>
[ Upstream commit f5468beeab1b1adfc63c2717b1f29ef3f49a5fab ]
TX launch polarity needs to be the opposite of RX capture polarity, to
generate the right bit slot alignment.
Reviewed-by: Neal Gompa <neal@gompa.dev>
Signed-off-by: Hector Martin <marcan@marcan.st>
Signed-off-by: James Calligeros <jcalligeros99@gmail.com>
Link: https://patch.msgid.link/20250218-apple-codec-changes-v2-28-932760fd7e07@gmail.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/codecs/tas2764.c | 10 +++++++++-
sound/soc/codecs/tas2764.h | 6 ++++++
2 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/sound/soc/codecs/tas2764.c b/sound/soc/codecs/tas2764.c
index d482cd194c08c..58315eab492a1 100644
--- a/sound/soc/codecs/tas2764.c
+++ b/sound/soc/codecs/tas2764.c
@@ -365,7 +365,7 @@ static int tas2764_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)
{
struct snd_soc_component *component = dai->component;
struct tas2764_priv *tas2764 = snd_soc_component_get_drvdata(component);
- u8 tdm_rx_start_slot = 0, asi_cfg_0 = 0, asi_cfg_1 = 0;
+ u8 tdm_rx_start_slot = 0, asi_cfg_0 = 0, asi_cfg_1 = 0, asi_cfg_4 = 0;
int ret;
switch (fmt & SND_SOC_DAIFMT_INV_MASK) {
@@ -374,12 +374,14 @@ static int tas2764_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)
fallthrough;
case SND_SOC_DAIFMT_NB_NF:
asi_cfg_1 = TAS2764_TDM_CFG1_RX_RISING;
+ asi_cfg_4 = TAS2764_TDM_CFG4_TX_FALLING;
break;
case SND_SOC_DAIFMT_IB_IF:
asi_cfg_0 ^= TAS2764_TDM_CFG0_FRAME_START;
fallthrough;
case SND_SOC_DAIFMT_IB_NF:
asi_cfg_1 = TAS2764_TDM_CFG1_RX_FALLING;
+ asi_cfg_4 = TAS2764_TDM_CFG4_TX_RISING;
break;
}
@@ -389,6 +391,12 @@ static int tas2764_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)
if (ret < 0)
return ret;
+ ret = snd_soc_component_update_bits(component, TAS2764_TDM_CFG4,
+ TAS2764_TDM_CFG4_TX_MASK,
+ asi_cfg_4);
+ if (ret < 0)
+ return ret;
+
switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) {
case SND_SOC_DAIFMT_I2S:
asi_cfg_0 ^= TAS2764_TDM_CFG0_FRAME_START;
diff --git a/sound/soc/codecs/tas2764.h b/sound/soc/codecs/tas2764.h
index d13ecae9c9c2f..9490f2686e389 100644
--- a/sound/soc/codecs/tas2764.h
+++ b/sound/soc/codecs/tas2764.h
@@ -79,6 +79,12 @@
#define TAS2764_TDM_CFG3_RXS_SHIFT 0x4
#define TAS2764_TDM_CFG3_MASK GENMASK(3, 0)
+/* TDM Configuration Reg4 */
+#define TAS2764_TDM_CFG4 TAS2764_REG(0X0, 0x0d)
+#define TAS2764_TDM_CFG4_TX_MASK BIT(0)
+#define TAS2764_TDM_CFG4_TX_RISING 0x0
+#define TAS2764_TDM_CFG4_TX_FALLING BIT(0)
+
/* TDM Configuration Reg5 */
#define TAS2764_TDM_CFG5 TAS2764_REG(0X0, 0x0e)
#define TAS2764_TDM_CFG5_VSNS_MASK BIT(6)
--
2.39.5
^ permalink raw reply related [flat|nested] 19+ messages in thread* [PATCH AUTOSEL 6.13 05/17] fuse: don't truncate cached, mutated symlink
2025-03-03 16:29 [PATCH AUTOSEL 6.13 01/17] phy: ti: gmii-sel: Do not use syscon helper to build regmap Sasha Levin
` (2 preceding siblings ...)
2025-03-03 16:29 ` [PATCH AUTOSEL 6.13 04/17] ASoC: tas2764: Set the SDOUT polarity correctly Sasha Levin
@ 2025-03-03 16:29 ` Sasha Levin
2025-03-03 16:29 ` [PATCH AUTOSEL 6.13 06/17] ASoC: dapm-graph: set fill colour of turned on nodes Sasha Levin
` (11 subsequent siblings)
15 siblings, 0 replies; 19+ messages in thread
From: Sasha Levin @ 2025-03-03 16:29 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Miklos Szeredi, Laura Promberger, Sam Lewis, Bernd Schubert,
Christian Brauner, Sasha Levin, miklos, viro, linux-fsdevel
From: Miklos Szeredi <mszeredi@redhat.com>
[ Upstream commit b4c173dfbb6c78568578ff18f9e8822d7bd0e31b ]
Fuse allows the value of a symlink to change and this property is exploited
by some filesystems (e.g. CVMFS).
It has been observed, that sometimes after changing the symlink contents,
the value is truncated to the old size.
This is caused by fuse_getattr() racing with fuse_reverse_inval_inode().
fuse_reverse_inval_inode() updates the fuse_inode's attr_version, which
results in fuse_change_attributes() exiting before updating the cached
attributes
This is okay, as the cached attributes remain invalid and the next call to
fuse_change_attributes() will likely update the inode with the correct
values.
The reason this causes problems is that cached symlinks will be
returned through page_get_link(), which truncates the symlink to
inode->i_size. This is correct for filesystems that don't mutate
symlinks, but in this case it causes bad behavior.
The solution is to just remove this truncation. This can cause a
regression in a filesystem that relies on supplying a symlink larger than
the file size, but this is unlikely. If that happens we'd need to make
this behavior conditional.
Reported-by: Laura Promberger <laura.promberger@cern.ch>
Tested-by: Sam Lewis <samclewis@google.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Link: https://lore.kernel.org/r/20250220100258.793363-1-mszeredi@redhat.com
Reviewed-by: Bernd Schubert <bschubert@ddn.com>
Signed-off-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
fs/fuse/dir.c | 2 +-
fs/namei.c | 24 +++++++++++++++++++-----
include/linux/fs.h | 2 ++
3 files changed, 22 insertions(+), 6 deletions(-)
diff --git a/fs/fuse/dir.c b/fs/fuse/dir.c
index e540d05549fff..b7944d8bfb171 100644
--- a/fs/fuse/dir.c
+++ b/fs/fuse/dir.c
@@ -1633,7 +1633,7 @@ static const char *fuse_get_link(struct dentry *dentry, struct inode *inode,
goto out_err;
if (fc->cache_symlinks)
- return page_get_link(dentry, inode, callback);
+ return page_get_link_raw(dentry, inode, callback);
err = -ECHILD;
if (!dentry)
diff --git a/fs/namei.c b/fs/namei.c
index 9d30c7aa9aa6e..553729a29095d 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -5354,10 +5354,9 @@ const char *vfs_get_link(struct dentry *dentry, struct delayed_call *done)
EXPORT_SYMBOL(vfs_get_link);
/* get the link contents into pagecache */
-const char *page_get_link(struct dentry *dentry, struct inode *inode,
- struct delayed_call *callback)
+static char *__page_get_link(struct dentry *dentry, struct inode *inode,
+ struct delayed_call *callback)
{
- char *kaddr;
struct page *page;
struct address_space *mapping = inode->i_mapping;
@@ -5376,8 +5375,23 @@ const char *page_get_link(struct dentry *dentry, struct inode *inode,
}
set_delayed_call(callback, page_put_link, page);
BUG_ON(mapping_gfp_mask(mapping) & __GFP_HIGHMEM);
- kaddr = page_address(page);
- nd_terminate_link(kaddr, inode->i_size, PAGE_SIZE - 1);
+ return page_address(page);
+}
+
+const char *page_get_link_raw(struct dentry *dentry, struct inode *inode,
+ struct delayed_call *callback)
+{
+ return __page_get_link(dentry, inode, callback);
+}
+EXPORT_SYMBOL_GPL(page_get_link_raw);
+
+const char *page_get_link(struct dentry *dentry, struct inode *inode,
+ struct delayed_call *callback)
+{
+ char *kaddr = __page_get_link(dentry, inode, callback);
+
+ if (!IS_ERR(kaddr))
+ nd_terminate_link(kaddr, inode->i_size, PAGE_SIZE - 1);
return kaddr;
}
diff --git a/include/linux/fs.h b/include/linux/fs.h
index f7efc6866ebc9..1f07469f3d6e1 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -3353,6 +3353,8 @@ extern const struct file_operations generic_ro_fops;
extern int readlink_copy(char __user *, int, const char *);
extern int page_readlink(struct dentry *, char __user *, int);
+extern const char *page_get_link_raw(struct dentry *, struct inode *,
+ struct delayed_call *);
extern const char *page_get_link(struct dentry *, struct inode *,
struct delayed_call *);
extern void page_put_link(void *);
--
2.39.5
^ permalink raw reply related [flat|nested] 19+ messages in thread* [PATCH AUTOSEL 6.13 06/17] ASoC: dapm-graph: set fill colour of turned on nodes
2025-03-03 16:29 [PATCH AUTOSEL 6.13 01/17] phy: ti: gmii-sel: Do not use syscon helper to build regmap Sasha Levin
` (3 preceding siblings ...)
2025-03-03 16:29 ` [PATCH AUTOSEL 6.13 05/17] fuse: don't truncate cached, mutated symlink Sasha Levin
@ 2025-03-03 16:29 ` Sasha Levin
2025-03-03 16:29 ` [PATCH AUTOSEL 6.13 07/17] ASoC: SOF: Intel: don't check number of sdw links when set dmic_fixup Sasha Levin
` (10 subsequent siblings)
15 siblings, 0 replies; 19+ messages in thread
From: Sasha Levin @ 2025-03-03 16:29 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Nicolas Frattaroli, Luca Ceresoli, Mark Brown, Sasha Levin,
linux-sound
From: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
[ Upstream commit d31babd7e304d3b800d36ff74be6739405b985f2 ]
Some tools like KGraphViewer interpret the "ON" nodes not having an
explicitly set fill colour as them being entirely black, which obscures
the text on them and looks funny. In fact, I thought they were off for
the longest time. Comparing to the output of the `dot` tool, I assume
they are supposed to be white.
Instead of speclawyering over who's in the wrong and must immediately
atone for their wickedness at the altar of RFC2119, just be explicit
about it, set the fillcolor to white, and nobody gets confused.
Signed-off-by: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
Tested-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Reviewed-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Link: https://patch.msgid.link/20250221-dapm-graph-node-colour-v1-1-514ed0aa7069@collabora.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
tools/sound/dapm-graph | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/sound/dapm-graph b/tools/sound/dapm-graph
index f14bdfedee8f1..b6196ee5065a4 100755
--- a/tools/sound/dapm-graph
+++ b/tools/sound/dapm-graph
@@ -10,7 +10,7 @@ set -eu
STYLE_COMPONENT_ON="color=dodgerblue;style=bold"
STYLE_COMPONENT_OFF="color=gray40;style=filled;fillcolor=gray90"
-STYLE_NODE_ON="shape=box,style=bold,color=green4"
+STYLE_NODE_ON="shape=box,style=bold,color=green4,fillcolor=white"
STYLE_NODE_OFF="shape=box,style=filled,color=gray30,fillcolor=gray95"
# Print usage and exit
--
2.39.5
^ permalink raw reply related [flat|nested] 19+ messages in thread* [PATCH AUTOSEL 6.13 07/17] ASoC: SOF: Intel: don't check number of sdw links when set dmic_fixup
2025-03-03 16:29 [PATCH AUTOSEL 6.13 01/17] phy: ti: gmii-sel: Do not use syscon helper to build regmap Sasha Levin
` (4 preceding siblings ...)
2025-03-03 16:29 ` [PATCH AUTOSEL 6.13 06/17] ASoC: dapm-graph: set fill colour of turned on nodes Sasha Levin
@ 2025-03-03 16:29 ` Sasha Levin
2025-03-03 16:29 ` [PATCH AUTOSEL 6.13 08/17] drm/vkms: Round fixp2int conversion in lerp_u16 Sasha Levin
` (9 subsequent siblings)
15 siblings, 0 replies; 19+ messages in thread
From: Sasha Levin @ 2025-03-03 16:29 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Bard Liao, Ranjani Sridharan, Péter Ujfalusi, Mark Brown,
Sasha Levin, lgirdwood, daniel.baluta, perex, tiwai,
pierre-louis.bossart, brent.lu, sound-open-firmware, linux-sound
From: Bard Liao <yung-chuan.liao@linux.intel.com>
[ Upstream commit 56a677293509b2a0d39ac8d02b583c1ab1fe4d94 ]
Currently, we assume that the PCH DMIC pins are pin-muxed with SoundWire
links. However, we do see a HW design that use PCH DMIC along with 3
SoundWire links. Remove the check now.
With this change the PCM DMIC will be presented if it is reported by the
BIOS irrespective of whether there are SDW links present or not.
Signed-off-by: Bard Liao <yung-chuan.liao@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Péter Ujfalusi <peter.ujfalusi@linux.intel.com>
Link: https://patch.msgid.link/20250225093716.67240-2-yung-chuan.liao@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
sound/soc/sof/intel/hda.c | 18 ++----------------
1 file changed, 2 insertions(+), 16 deletions(-)
diff --git a/sound/soc/sof/intel/hda.c b/sound/soc/sof/intel/hda.c
index be689f6e10c81..a1ccd95da8bb7 100644
--- a/sound/soc/sof/intel/hda.c
+++ b/sound/soc/sof/intel/hda.c
@@ -1312,22 +1312,8 @@ struct snd_soc_acpi_mach *hda_machine_select(struct snd_sof_dev *sdev)
/* report to machine driver if any DMICs are found */
mach->mach_params.dmic_num = check_dmic_num(sdev);
- if (sdw_mach_found) {
- /*
- * DMICs use up to 4 pins and are typically pin-muxed with SoundWire
- * link 2 and 3, or link 1 and 2, thus we only try to enable dmics
- * if all conditions are true:
- * a) 2 or fewer links are used by SoundWire
- * b) the NHLT table reports the presence of microphones
- */
- if (hweight_long(mach->link_mask) <= 2)
- dmic_fixup = true;
- else
- mach->mach_params.dmic_num = 0;
- } else {
- if (mach->tplg_quirk_mask & SND_SOC_ACPI_TPLG_INTEL_DMIC_NUMBER)
- dmic_fixup = true;
- }
+ if (sdw_mach_found || mach->tplg_quirk_mask & SND_SOC_ACPI_TPLG_INTEL_DMIC_NUMBER)
+ dmic_fixup = true;
if (tplg_fixup &&
dmic_fixup &&
--
2.39.5
^ permalink raw reply related [flat|nested] 19+ messages in thread* [PATCH AUTOSEL 6.13 08/17] drm/vkms: Round fixp2int conversion in lerp_u16
2025-03-03 16:29 [PATCH AUTOSEL 6.13 01/17] phy: ti: gmii-sel: Do not use syscon helper to build regmap Sasha Levin
` (5 preceding siblings ...)
2025-03-03 16:29 ` [PATCH AUTOSEL 6.13 07/17] ASoC: SOF: Intel: don't check number of sdw links when set dmic_fixup Sasha Levin
@ 2025-03-03 16:29 ` Sasha Levin
2025-03-03 16:29 ` [PATCH AUTOSEL 6.13 09/17] perf/x86/intel: Use better start period for frequency mode Sasha Levin
` (8 subsequent siblings)
15 siblings, 0 replies; 19+ messages in thread
From: Sasha Levin @ 2025-03-03 16:29 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Harry Wentland, Alex Hung, Louis Chauvet, Sasha Levin,
maarten.lankhorst, mripard, tzimmermann, airlied, simona,
dri-devel
From: Harry Wentland <harry.wentland@amd.com>
[ Upstream commit 8ec43c58d3be615a71548bc09148212013fb7e5f ]
fixp2int always rounds down, fixp2int_ceil rounds up. We need
the new fixp2int_round.
Signed-off-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Harry Wentland <harry.wentland@amd.com>
Reviewed-by: Louis Chauvet <louis.chauvet@bootlin.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20241220043410.416867-3-alex.hung@amd.com
Signed-off-by: Louis Chauvet <louis.chauvet@bootlin.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/gpu/drm/vkms/vkms_composer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/vkms/vkms_composer.c b/drivers/gpu/drm/vkms/vkms_composer.c
index 3f0977d746bee..87dfb9f69ee5b 100644
--- a/drivers/gpu/drm/vkms/vkms_composer.c
+++ b/drivers/gpu/drm/vkms/vkms_composer.c
@@ -98,7 +98,7 @@ static u16 lerp_u16(u16 a, u16 b, s64 t)
s64 delta = drm_fixp_mul(b_fp - a_fp, t);
- return drm_fixp2int(a_fp + delta);
+ return drm_fixp2int_round(a_fp + delta);
}
static s64 get_lut_index(const struct vkms_color_lut *lut, u16 channel_value)
--
2.39.5
^ permalink raw reply related [flat|nested] 19+ messages in thread* [PATCH AUTOSEL 6.13 09/17] perf/x86/intel: Use better start period for frequency mode
2025-03-03 16:29 [PATCH AUTOSEL 6.13 01/17] phy: ti: gmii-sel: Do not use syscon helper to build regmap Sasha Levin
` (6 preceding siblings ...)
2025-03-03 16:29 ` [PATCH AUTOSEL 6.13 08/17] drm/vkms: Round fixp2int conversion in lerp_u16 Sasha Levin
@ 2025-03-03 16:29 ` Sasha Levin
2025-03-03 16:29 ` [PATCH AUTOSEL 6.13 10/17] x86/of: Don't use DTB for SMP setup if ACPI is enabled Sasha Levin
` (7 subsequent siblings)
15 siblings, 0 replies; 19+ messages in thread
From: Sasha Levin @ 2025-03-03 16:29 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Kan Liang, Ingo Molnar, Peter Zijlstra, Sasha Levin, mingo, acme,
namhyung, tglx, bp, dave.hansen, x86, linux-perf-users
From: Kan Liang <kan.liang@linux.intel.com>
[ Upstream commit a26b24b2e21f6222635a95426b9ef9eec63d69b1 ]
Freqency mode is the current default mode of Linux perf. A period of 1 is
used as a starting period. The period is auto-adjusted on each tick or an
overflow, to meet the frequency target.
The start period of 1 is too low and may trigger some issues:
- Many HWs do not support period 1 well.
https://lore.kernel.org/lkml/875xs2oh69.ffs@tglx/
- For an event that occurs frequently, period 1 is too far away from the
real period. Lots of samples are generated at the beginning.
The distribution of samples may not be even.
- A low starting period for frequently occurring events also challenges
virtualization, which has a longer path to handle a PMI.
The limit_period value only checks the minimum acceptable value for HW.
It cannot be used to set the start period, because some events may
need a very low period. The limit_period cannot be set too high. It
doesn't help with the events that occur frequently.
It's hard to find a universal starting period for all events. The idea
implemented by this patch is to only give an estimate for the popular
HW and HW cache events. For the rest of the events, start from the lowest
possible recommended value.
Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: https://lore.kernel.org/r/20250117151913.3043942-3-kan.liang@linux.intel.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/x86/events/intel/core.c | 85 ++++++++++++++++++++++++++++++++++++
1 file changed, 85 insertions(+)
diff --git a/arch/x86/events/intel/core.c b/arch/x86/events/intel/core.c
index 2bba1d934efb0..6651360d6a525 100644
--- a/arch/x86/events/intel/core.c
+++ b/arch/x86/events/intel/core.c
@@ -3949,6 +3949,85 @@ static inline bool intel_pmu_has_cap(struct perf_event *event, int idx)
return test_bit(idx, (unsigned long *)&intel_cap->capabilities);
}
+static u64 intel_pmu_freq_start_period(struct perf_event *event)
+{
+ int type = event->attr.type;
+ u64 config, factor;
+ s64 start;
+
+ /*
+ * The 127 is the lowest possible recommended SAV (sample after value)
+ * for a 4000 freq (default freq), according to the event list JSON file.
+ * Also, assume the workload is idle 50% time.
+ */
+ factor = 64 * 4000;
+ if (type != PERF_TYPE_HARDWARE && type != PERF_TYPE_HW_CACHE)
+ goto end;
+
+ /*
+ * The estimation of the start period in the freq mode is
+ * based on the below assumption.
+ *
+ * For a cycles or an instructions event, 1GHZ of the
+ * underlying platform, 1 IPC. The workload is idle 50% time.
+ * The start period = 1,000,000,000 * 1 / freq / 2.
+ * = 500,000,000 / freq
+ *
+ * Usually, the branch-related events occur less than the
+ * instructions event. According to the Intel event list JSON
+ * file, the SAV (sample after value) of a branch-related event
+ * is usually 1/4 of an instruction event.
+ * The start period of branch-related events = 125,000,000 / freq.
+ *
+ * The cache-related events occurs even less. The SAV is usually
+ * 1/20 of an instruction event.
+ * The start period of cache-related events = 25,000,000 / freq.
+ */
+ config = event->attr.config & PERF_HW_EVENT_MASK;
+ if (type == PERF_TYPE_HARDWARE) {
+ switch (config) {
+ case PERF_COUNT_HW_CPU_CYCLES:
+ case PERF_COUNT_HW_INSTRUCTIONS:
+ case PERF_COUNT_HW_BUS_CYCLES:
+ case PERF_COUNT_HW_STALLED_CYCLES_FRONTEND:
+ case PERF_COUNT_HW_STALLED_CYCLES_BACKEND:
+ case PERF_COUNT_HW_REF_CPU_CYCLES:
+ factor = 500000000;
+ break;
+ case PERF_COUNT_HW_BRANCH_INSTRUCTIONS:
+ case PERF_COUNT_HW_BRANCH_MISSES:
+ factor = 125000000;
+ break;
+ case PERF_COUNT_HW_CACHE_REFERENCES:
+ case PERF_COUNT_HW_CACHE_MISSES:
+ factor = 25000000;
+ break;
+ default:
+ goto end;
+ }
+ }
+
+ if (type == PERF_TYPE_HW_CACHE)
+ factor = 25000000;
+end:
+ /*
+ * Usually, a prime or a number with less factors (close to prime)
+ * is chosen as an SAV, which makes it less likely that the sampling
+ * period synchronizes with some periodic event in the workload.
+ * Minus 1 to make it at least avoiding values near power of twos
+ * for the default freq.
+ */
+ start = DIV_ROUND_UP_ULL(factor, event->attr.sample_freq) - 1;
+
+ if (start > x86_pmu.max_period)
+ start = x86_pmu.max_period;
+
+ if (x86_pmu.limit_period)
+ x86_pmu.limit_period(event, &start);
+
+ return start;
+}
+
static int intel_pmu_hw_config(struct perf_event *event)
{
int ret = x86_pmu_hw_config(event);
@@ -3960,6 +4039,12 @@ static int intel_pmu_hw_config(struct perf_event *event)
if (ret)
return ret;
+ if (event->attr.freq && event->attr.sample_freq) {
+ event->hw.sample_period = intel_pmu_freq_start_period(event);
+ event->hw.last_period = event->hw.sample_period;
+ local64_set(&event->hw.period_left, event->hw.sample_period);
+ }
+
if (event->attr.precise_ip) {
if ((event->attr.config & INTEL_ARCH_EVENT_MASK) == INTEL_FIXED_VLBR_EVENT)
return -EINVAL;
--
2.39.5
^ permalink raw reply related [flat|nested] 19+ messages in thread* [PATCH AUTOSEL 6.13 10/17] x86/of: Don't use DTB for SMP setup if ACPI is enabled
2025-03-03 16:29 [PATCH AUTOSEL 6.13 01/17] phy: ti: gmii-sel: Do not use syscon helper to build regmap Sasha Levin
` (7 preceding siblings ...)
2025-03-03 16:29 ` [PATCH AUTOSEL 6.13 09/17] perf/x86/intel: Use better start period for frequency mode Sasha Levin
@ 2025-03-03 16:29 ` Sasha Levin
2025-03-03 16:29 ` [PATCH AUTOSEL 6.13 11/17] x86/irq: Define trace events conditionally Sasha Levin
` (6 subsequent siblings)
15 siblings, 0 replies; 19+ messages in thread
From: Sasha Levin @ 2025-03-03 16:29 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Dmytro Maluka, Ingo Molnar, Sasha Levin, tglx, mingo, bp,
dave.hansen, x86, ssengar, robh, ilpo.jarvinen, usamaarif642,
sboyd
From: Dmytro Maluka <dmaluka@chromium.org>
[ Upstream commit 96f41f644c4885761b0d117fc36dc5dcf92e15ec ]
There are cases when it is useful to use both ACPI and DTB provided by
the bootloader, however in such cases we should make sure to prevent
conflicts between the two. Namely, don't try to use DTB for SMP setup
if ACPI is enabled.
Precisely, this prevents at least:
- incorrectly calling register_lapic_address(APIC_DEFAULT_PHYS_BASE)
after the LAPIC was already successfully enumerated via ACPI, causing
noisy kernel warnings and probably potential real issues as well
- failed IOAPIC setup in the case when IOAPIC is enumerated via mptable
instead of ACPI (e.g. with acpi=noirq), due to
mpparse_parse_smp_config() overridden by x86_dtb_parse_smp_config()
Signed-off-by: Dmytro Maluka <dmaluka@chromium.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/20250105172741.3476758-2-dmaluka@chromium.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/x86/kernel/devicetree.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/x86/kernel/devicetree.c b/arch/x86/kernel/devicetree.c
index 59d23cdf4ed0f..dd8748c45529a 100644
--- a/arch/x86/kernel/devicetree.c
+++ b/arch/x86/kernel/devicetree.c
@@ -2,6 +2,7 @@
/*
* Architecture specific OF callbacks.
*/
+#include <linux/acpi.h>
#include <linux/export.h>
#include <linux/io.h>
#include <linux/interrupt.h>
@@ -313,6 +314,6 @@ void __init x86_flattree_get_config(void)
if (initial_dtb)
early_memunmap(dt, map_len);
#endif
- if (of_have_populated_dt())
+ if (acpi_disabled && of_have_populated_dt())
x86_init.mpparse.parse_smp_cfg = x86_dtb_parse_smp_config;
}
--
2.39.5
^ permalink raw reply related [flat|nested] 19+ messages in thread* [PATCH AUTOSEL 6.13 11/17] x86/irq: Define trace events conditionally
2025-03-03 16:29 [PATCH AUTOSEL 6.13 01/17] phy: ti: gmii-sel: Do not use syscon helper to build regmap Sasha Levin
` (8 preceding siblings ...)
2025-03-03 16:29 ` [PATCH AUTOSEL 6.13 10/17] x86/of: Don't use DTB for SMP setup if ACPI is enabled Sasha Levin
@ 2025-03-03 16:29 ` Sasha Levin
2025-03-03 16:29 ` [PATCH AUTOSEL 6.13 12/17] perf/x86/rapl: Add support for Intel Arrow Lake U Sasha Levin
` (5 subsequent siblings)
15 siblings, 0 replies; 19+ messages in thread
From: Sasha Levin @ 2025-03-03 16:29 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Arnd Bergmann, Ingo Molnar, Sasha Levin, tglx, mingo, bp,
dave.hansen, x86, jacob.jun.pan
From: Arnd Bergmann <arnd@arndb.de>
[ Upstream commit 9de7695925d5d2d2085681ba935857246eb2817d ]
When both of X86_LOCAL_APIC and X86_THERMAL_VECTOR are disabled,
the irq tracing produces a W=1 build warning for the tracing
definitions:
In file included from include/trace/trace_events.h:27,
from include/trace/define_trace.h:113,
from arch/x86/include/asm/trace/irq_vectors.h:383,
from arch/x86/kernel/irq.c:29:
include/trace/stages/init.h:2:23: error: 'str__irq_vectors__trace_system_name' defined but not used [-Werror=unused-const-variable=]
Make the tracepoints conditional on the same symbosl that guard
their usage.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/20250225213236.3141752-1-arnd@kernel.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/x86/kernel/irq.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/x86/kernel/irq.c b/arch/x86/kernel/irq.c
index 385e3a5fc3045..feca4f20b06aa 100644
--- a/arch/x86/kernel/irq.c
+++ b/arch/x86/kernel/irq.c
@@ -25,8 +25,10 @@
#include <asm/posted_intr.h>
#include <asm/irq_remapping.h>
+#if defined(CONFIG_X86_LOCAL_APIC) || defined(CONFIG_X86_THERMAL_VECTOR)
#define CREATE_TRACE_POINTS
#include <asm/trace/irq_vectors.h>
+#endif
DEFINE_PER_CPU_SHARED_ALIGNED(irq_cpustat_t, irq_stat);
EXPORT_PER_CPU_SYMBOL(irq_stat);
--
2.39.5
^ permalink raw reply related [flat|nested] 19+ messages in thread* [PATCH AUTOSEL 6.13 12/17] perf/x86/rapl: Add support for Intel Arrow Lake U
2025-03-03 16:29 [PATCH AUTOSEL 6.13 01/17] phy: ti: gmii-sel: Do not use syscon helper to build regmap Sasha Levin
` (9 preceding siblings ...)
2025-03-03 16:29 ` [PATCH AUTOSEL 6.13 11/17] x86/irq: Define trace events conditionally Sasha Levin
@ 2025-03-03 16:29 ` Sasha Levin
2025-03-03 16:29 ` [PATCH AUTOSEL 6.13 13/17] mptcp: safety check before fallback Sasha Levin
` (4 subsequent siblings)
15 siblings, 0 replies; 19+ messages in thread
From: Sasha Levin @ 2025-03-03 16:29 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Aaron Ma, Ingo Molnar, Zhang Rui, Sasha Levin, peterz, mingo,
acme, namhyung, tglx, bp, dave.hansen, x86, linux-perf-users
From: Aaron Ma <aaron.ma@canonical.com>
[ Upstream commit 68a9b0e313302451468c0b0eda53c383fa51a8f4 ]
Add Arrow Lake U model for RAPL:
$ ls -1 /sys/devices/power/events/
energy-cores
energy-cores.scale
energy-cores.unit
energy-gpu
energy-gpu.scale
energy-gpu.unit
energy-pkg
energy-pkg.scale
energy-pkg.unit
energy-psys
energy-psys.scale
energy-psys.unit
The same output as ArrowLake:
$ perf stat -a -I 1000 --per-socket -e power/energy-pkg/
Signed-off-by: Aaron Ma <aaron.ma@canonical.com>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Acked-by: Zhang Rui <rui.zhang@intel.com>
Link: https://lore.kernel.org/r/20241224145516.349028-1-aaron.ma@canonical.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/x86/events/rapl.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/x86/events/rapl.c b/arch/x86/events/rapl.c
index a8defc813c369..7e493963d0576 100644
--- a/arch/x86/events/rapl.c
+++ b/arch/x86/events/rapl.c
@@ -796,6 +796,7 @@ static const struct x86_cpu_id rapl_model_match[] __initconst = {
X86_MATCH_VFM(INTEL_METEORLAKE_L, &model_skl),
X86_MATCH_VFM(INTEL_ARROWLAKE_H, &model_skl),
X86_MATCH_VFM(INTEL_ARROWLAKE, &model_skl),
+ X86_MATCH_VFM(INTEL_ARROWLAKE_U, &model_skl),
X86_MATCH_VFM(INTEL_LUNARLAKE_M, &model_skl),
{},
};
--
2.39.5
^ permalink raw reply related [flat|nested] 19+ messages in thread* [PATCH AUTOSEL 6.13 13/17] mptcp: safety check before fallback
2025-03-03 16:29 [PATCH AUTOSEL 6.13 01/17] phy: ti: gmii-sel: Do not use syscon helper to build regmap Sasha Levin
` (10 preceding siblings ...)
2025-03-03 16:29 ` [PATCH AUTOSEL 6.13 12/17] perf/x86/rapl: Add support for Intel Arrow Lake U Sasha Levin
@ 2025-03-03 16:29 ` Sasha Levin
2025-03-03 17:05 ` Matthieu Baerts
2025-03-03 16:29 ` [PATCH AUTOSEL 6.13 14/17] drm/nouveau: Do not override forced connector status Sasha Levin
` (3 subsequent siblings)
15 siblings, 1 reply; 19+ messages in thread
From: Sasha Levin @ 2025-03-03 16:29 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Matthieu Baerts (NGI0), Paolo Abeni, Jakub Kicinski, Sasha Levin,
martineau, davem, edumazet, netdev, mptcp
From: "Matthieu Baerts (NGI0)" <matttbe@kernel.org>
[ Upstream commit db75a16813aabae3b78c06b1b99f5e314c1f55d3 ]
Recently, some fallback have been initiated, while the connection was
not supposed to fallback.
Add a safety check with a warning to detect when an wrong attempt to
fallback is being done. This should help detecting any future issues
quicker.
Acked-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Link: https://patch.msgid.link/20250224-net-mptcp-misc-fixes-v1-3-f550f636b435@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
net/mptcp/protocol.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/net/mptcp/protocol.h b/net/mptcp/protocol.h
index b70a303e08287..7e2f70f22b05b 100644
--- a/net/mptcp/protocol.h
+++ b/net/mptcp/protocol.h
@@ -1194,6 +1194,8 @@ static inline void __mptcp_do_fallback(struct mptcp_sock *msk)
pr_debug("TCP fallback already done (msk=%p)\n", msk);
return;
}
+ if (WARN_ON_ONCE(!READ_ONCE(msk->allow_infinite_fallback)))
+ return;
set_bit(MPTCP_FALLBACK_DONE, &msk->flags);
}
--
2.39.5
^ permalink raw reply related [flat|nested] 19+ messages in thread* Re: [PATCH AUTOSEL 6.13 13/17] mptcp: safety check before fallback
2025-03-03 16:29 ` [PATCH AUTOSEL 6.13 13/17] mptcp: safety check before fallback Sasha Levin
@ 2025-03-03 17:05 ` Matthieu Baerts
2025-03-15 1:39 ` Sasha Levin
0 siblings, 1 reply; 19+ messages in thread
From: Matthieu Baerts @ 2025-03-03 17:05 UTC (permalink / raw)
To: Sasha Levin, linux-kernel, stable
Cc: Paolo Abeni, Jakub Kicinski, martineau, davem, edumazet, netdev,
mptcp
Hi Sasha,
On 03/03/2025 17:29, Sasha Levin wrote:
> From: "Matthieu Baerts (NGI0)" <matttbe@kernel.org>
>
> [ Upstream commit db75a16813aabae3b78c06b1b99f5e314c1f55d3 ]
>
> Recently, some fallback have been initiated, while the connection was
> not supposed to fallback.
>
> Add a safety check with a warning to detect when an wrong attempt to
> fallback is being done. This should help detecting any future issues
> quicker.
>
> Acked-by: Paolo Abeni <pabeni@redhat.com>
> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
> Link: https://patch.msgid.link/20250224-net-mptcp-misc-fixes-v1-3-f550f636b435@kernel.org
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
> Signed-off-by: Sasha Levin <sashal@kernel.org>
Thank you for backporting this patch, but is it OK to delay it a bit on
v6.13 and older please?
This patch depends on its parent commit, commit 8668860b0ad3 ("mptcp:
reset when MPTCP opts are dropped after join"), on kernels >=v5.19, to
avoid a WARN().
> diff --git a/net/mptcp/protocol.h b/net/mptcp/protocol.h
> index b70a303e08287..7e2f70f22b05b 100644
> --- a/net/mptcp/protocol.h
> +++ b/net/mptcp/protocol.h
> @@ -1194,6 +1194,8 @@ static inline void __mptcp_do_fallback(struct mptcp_sock *msk)
> pr_debug("TCP fallback already done (msk=%p)\n", msk);
> return;
> }
> + if (WARN_ON_ONCE(!READ_ONCE(msk->allow_infinite_fallback)))
An alternative is to drop the WARN_ON_ONCE() when backporting this to
stable, and only keep the condition here:
if (!READ_ONCE(msk->allow_infinite_fallback))
> + return;
> set_bit(MPTCP_FALLBACK_DONE, &msk->flags);
> }
>
Cheers,
Matt
--
Sponsored by the NGI0 Core fund.
^ permalink raw reply [flat|nested] 19+ messages in thread* Re: [PATCH AUTOSEL 6.13 13/17] mptcp: safety check before fallback
2025-03-03 17:05 ` Matthieu Baerts
@ 2025-03-15 1:39 ` Sasha Levin
0 siblings, 0 replies; 19+ messages in thread
From: Sasha Levin @ 2025-03-15 1:39 UTC (permalink / raw)
To: Matthieu Baerts
Cc: linux-kernel, stable, Paolo Abeni, Jakub Kicinski, martineau,
davem, edumazet, netdev, mptcp
On Mon, Mar 03, 2025 at 06:05:12PM +0100, Matthieu Baerts wrote:
>Hi Sasha,
>
>On 03/03/2025 17:29, Sasha Levin wrote:
>> From: "Matthieu Baerts (NGI0)" <matttbe@kernel.org>
>>
>> [ Upstream commit db75a16813aabae3b78c06b1b99f5e314c1f55d3 ]
>>
>> Recently, some fallback have been initiated, while the connection was
>> not supposed to fallback.
>>
>> Add a safety check with a warning to detect when an wrong attempt to
>> fallback is being done. This should help detecting any future issues
>> quicker.
>>
>> Acked-by: Paolo Abeni <pabeni@redhat.com>
>> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
>> Link: https://patch.msgid.link/20250224-net-mptcp-misc-fixes-v1-3-f550f636b435@kernel.org
>> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
>> Signed-off-by: Sasha Levin <sashal@kernel.org>
>
>Thank you for backporting this patch, but is it OK to delay it a bit on
>v6.13 and older please?
>
>This patch depends on its parent commit, commit 8668860b0ad3 ("mptcp:
>reset when MPTCP opts are dropped after join"), on kernels >=v5.19, to
>avoid a WARN().
Waited a bit, looks ok to pull in now :)
--
Thanks,
Sasha
^ permalink raw reply [flat|nested] 19+ messages in thread
* [PATCH AUTOSEL 6.13 14/17] drm/nouveau: Do not override forced connector status
2025-03-03 16:29 [PATCH AUTOSEL 6.13 01/17] phy: ti: gmii-sel: Do not use syscon helper to build regmap Sasha Levin
` (11 preceding siblings ...)
2025-03-03 16:29 ` [PATCH AUTOSEL 6.13 13/17] mptcp: safety check before fallback Sasha Levin
@ 2025-03-03 16:29 ` Sasha Levin
2025-03-03 16:29 ` [PATCH AUTOSEL 6.13 15/17] net: Handle napi_schedule() calls from non-interrupt Sasha Levin
` (2 subsequent siblings)
15 siblings, 0 replies; 19+ messages in thread
From: Sasha Levin @ 2025-03-03 16:29 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Thomas Zimmermann, Lyude Paul, Sasha Levin, dakr, airlied, simona,
dri-devel, nouveau
From: Thomas Zimmermann <tzimmermann@suse.de>
[ Upstream commit 01f1d77a2630e774ce33233c4e6723bca3ae9daa ]
Keep user-forced connector status even if it cannot be programmed. Same
behavior as for the rest of the drivers.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Lyude Paul <lyude@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250114100214.195386-1-tzimmermann@suse.de
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
drivers/gpu/drm/nouveau/nouveau_connector.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/gpu/drm/nouveau/nouveau_connector.c b/drivers/gpu/drm/nouveau/nouveau_connector.c
index 8d5c9c74cbb90..eac0d1d2dbda2 100644
--- a/drivers/gpu/drm/nouveau/nouveau_connector.c
+++ b/drivers/gpu/drm/nouveau/nouveau_connector.c
@@ -775,7 +775,6 @@ nouveau_connector_force(struct drm_connector *connector)
if (!nv_encoder) {
NV_ERROR(drm, "can't find encoder to force %s on!\n",
connector->name);
- connector->status = connector_status_disconnected;
return;
}
--
2.39.5
^ permalink raw reply related [flat|nested] 19+ messages in thread* [PATCH AUTOSEL 6.13 15/17] net: Handle napi_schedule() calls from non-interrupt
2025-03-03 16:29 [PATCH AUTOSEL 6.13 01/17] phy: ti: gmii-sel: Do not use syscon helper to build regmap Sasha Levin
` (12 preceding siblings ...)
2025-03-03 16:29 ` [PATCH AUTOSEL 6.13 14/17] drm/nouveau: Do not override forced connector status Sasha Levin
@ 2025-03-03 16:29 ` Sasha Levin
2025-03-03 16:29 ` [PATCH AUTOSEL 6.13 16/17] block: fix 'kmem_cache of name 'bio-108' already exists' Sasha Levin
2025-03-03 16:29 ` [PATCH AUTOSEL 6.13 17/17] vhost: return task creation error instead of NULL Sasha Levin
15 siblings, 0 replies; 19+ messages in thread
From: Sasha Levin @ 2025-03-03 16:29 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Frederic Weisbecker, Paul Menzel, Jakub Kicinski, Francois Romieu,
Breno Leitao, Eric Dumazet, Sasha Levin, davem, pabeni, kuniyu,
bigeasy, jdamato, aleksander.lobakin, netdev
From: Frederic Weisbecker <frederic@kernel.org>
[ Upstream commit 77e45145e3039a0fb212556ab3f8c87f54771757 ]
napi_schedule() is expected to be called either:
* From an interrupt, where raised softirqs are handled on IRQ exit
* From a softirq disabled section, where raised softirqs are handled on
the next call to local_bh_enable().
* From a softirq handler, where raised softirqs are handled on the next
round in do_softirq(), or further deferred to a dedicated kthread.
Other bare tasks context may end up ignoring the raised NET_RX vector
until the next random softirq handling opportunity, which may not
happen before a while if the CPU goes idle afterwards with the tick
stopped.
Such "misuses" have been detected on several places thanks to messages
of the kind:
"NOHZ tick-stop error: local softirq work is pending, handler #08!!!"
For example:
__raise_softirq_irqoff
__napi_schedule
rtl8152_runtime_resume.isra.0
rtl8152_resume
usb_resume_interface.isra.0
usb_resume_both
__rpm_callback
rpm_callback
rpm_resume
__pm_runtime_resume
usb_autoresume_device
usb_remote_wakeup
hub_event
process_one_work
worker_thread
kthread
ret_from_fork
ret_from_fork_asm
And also:
* drivers/net/usb/r8152.c::rtl_work_func_t
* drivers/net/netdevsim/netdev.c::nsim_start_xmit
There is a long history of issues of this kind:
019edd01d174 ("ath10k: sdio: Add missing BH locking around napi_schdule()")
330068589389 ("idpf: disable local BH when scheduling napi for marker packets")
e3d5d70cb483 ("net: lan78xx: fix "softirq work is pending" error")
e55c27ed9ccf ("mt76: mt7615: add missing bh-disable around rx napi schedule")
c0182aa98570 ("mt76: mt7915: add missing bh-disable around tx napi enable/schedule")
970be1dff26d ("mt76: disable BH around napi_schedule() calls")
019edd01d174 ("ath10k: sdio: Add missing BH locking around napi_schdule()")
30bfec4fec59 ("can: rx-offload: can_rx_offload_threaded_irq_finish(): add new function to be called from threaded interrupt")
e63052a5dd3c ("mlx5e: add add missing BH locking around napi_schdule()")
83a0c6e58901 ("i40e: Invoke softirqs after napi_reschedule")
bd4ce941c8d5 ("mlx4: Invoke softirqs after napi_reschedule")
8cf699ec849f ("mlx4: do not call napi_schedule() without care")
ec13ee80145c ("virtio_net: invoke softirqs after __napi_schedule")
This shows that relying on the caller to arrange a proper context for
the softirqs to be handled while calling napi_schedule() is very fragile
and error prone. Also fixing them can also prove challenging if the
caller may be called from different kinds of contexts.
Therefore fix this from napi_schedule() itself with waking up ksoftirqd
when softirqs are raised from task contexts.
Reported-by: Paul Menzel <pmenzel@molgen.mpg.de>
Reported-by: Jakub Kicinski <kuba@kernel.org>
Reported-by: Francois Romieu <romieu@fr.zoreil.com>
Closes: https://lore.kernel.org/lkml/354a2690-9bbf-4ccb-8769-fa94707a9340@molgen.mpg.de/
Cc: Breno Leitao <leitao@debian.org>
Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Link: https://patch.msgid.link/20250223221708.27130-1-frederic@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
net/core/dev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/core/dev.c b/net/core/dev.c
index 2b09714761c62..7f755270ff1ce 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -4610,7 +4610,7 @@ static inline void ____napi_schedule(struct softnet_data *sd,
* we have to raise NET_RX_SOFTIRQ.
*/
if (!sd->in_net_rx_action)
- __raise_softirq_irqoff(NET_RX_SOFTIRQ);
+ raise_softirq_irqoff(NET_RX_SOFTIRQ);
}
#ifdef CONFIG_RPS
--
2.39.5
^ permalink raw reply related [flat|nested] 19+ messages in thread* [PATCH AUTOSEL 6.13 16/17] block: fix 'kmem_cache of name 'bio-108' already exists'
2025-03-03 16:29 [PATCH AUTOSEL 6.13 01/17] phy: ti: gmii-sel: Do not use syscon helper to build regmap Sasha Levin
` (13 preceding siblings ...)
2025-03-03 16:29 ` [PATCH AUTOSEL 6.13 15/17] net: Handle napi_schedule() calls from non-interrupt Sasha Levin
@ 2025-03-03 16:29 ` Sasha Levin
2025-03-03 16:29 ` [PATCH AUTOSEL 6.13 17/17] vhost: return task creation error instead of NULL Sasha Levin
15 siblings, 0 replies; 19+ messages in thread
From: Sasha Levin @ 2025-03-03 16:29 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Ming Lei, Guangwu Zhang, Jens Axboe, Sasha Levin, linux-block
From: Ming Lei <ming.lei@redhat.com>
[ Upstream commit b654f7a51ffb386131de42aa98ed831f8c126546 ]
Device mapper bioset often has big bio_slab size, which can be more than
1000, then 8byte can't hold the slab name any more, cause the kmem_cache
allocation warning of 'kmem_cache of name 'bio-108' already exists'.
Fix the warning by extending bio_slab->name to 12 bytes, but fix output
of /proc/slabinfo
Reported-by: Guangwu Zhang <guazhang@redhat.com>
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Link: https://lore.kernel.org/r/20250228132656.2838008-1-ming.lei@redhat.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
block/bio.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/bio.c b/block/bio.c
index d5bdc31d88d32..f54e8572affc1 100644
--- a/block/bio.c
+++ b/block/bio.c
@@ -77,7 +77,7 @@ struct bio_slab {
struct kmem_cache *slab;
unsigned int slab_ref;
unsigned int slab_size;
- char name[8];
+ char name[12];
};
static DEFINE_MUTEX(bio_slab_lock);
static DEFINE_XARRAY(bio_slabs);
--
2.39.5
^ permalink raw reply related [flat|nested] 19+ messages in thread* [PATCH AUTOSEL 6.13 17/17] vhost: return task creation error instead of NULL
2025-03-03 16:29 [PATCH AUTOSEL 6.13 01/17] phy: ti: gmii-sel: Do not use syscon helper to build regmap Sasha Levin
` (14 preceding siblings ...)
2025-03-03 16:29 ` [PATCH AUTOSEL 6.13 16/17] block: fix 'kmem_cache of name 'bio-108' already exists' Sasha Levin
@ 2025-03-03 16:29 ` Sasha Levin
15 siblings, 0 replies; 19+ messages in thread
From: Sasha Levin @ 2025-03-03 16:29 UTC (permalink / raw)
To: linux-kernel, stable
Cc: Keith Busch, Mike Christie, Paolo Bonzini, Sasha Levin, seanjc,
tglx, mingo, bp, dave.hansen, x86, mst, jasowang, kvm,
virtualization, netdev
From: Keith Busch <kbusch@kernel.org>
[ Upstream commit cb380909ae3b1ebf14d6a455a4f92d7916d790cb ]
Lets callers distinguish why the vhost task creation failed. No one
currently cares why it failed, so no real runtime change from this
patch, but that will not be the case for long.
Signed-off-by: Keith Busch <kbusch@kernel.org>
Message-ID: <20250227230631.303431-2-kbusch@meta.com>
Reviewed-by: Mike Christie <michael.christie@oracle.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
arch/x86/kvm/mmu/mmu.c | 2 +-
drivers/vhost/vhost.c | 2 +-
kernel/vhost_task.c | 4 ++--
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/x86/kvm/mmu/mmu.c b/arch/x86/kvm/mmu/mmu.c
index e102505735a7b..0e6bf24093f75 100644
--- a/arch/x86/kvm/mmu/mmu.c
+++ b/arch/x86/kvm/mmu/mmu.c
@@ -7435,7 +7435,7 @@ static void kvm_mmu_start_lpage_recovery(struct once *once)
kvm_nx_huge_page_recovery_worker_kill,
kvm, "kvm-nx-lpage-recovery");
- if (!nx_thread)
+ if (IS_ERR(nx_thread))
return;
vhost_task_start(nx_thread);
diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c
index 9ac25d08f473e..63612faeab727 100644
--- a/drivers/vhost/vhost.c
+++ b/drivers/vhost/vhost.c
@@ -666,7 +666,7 @@ static struct vhost_worker *vhost_worker_create(struct vhost_dev *dev)
vtsk = vhost_task_create(vhost_run_work_list, vhost_worker_killed,
worker, name);
- if (!vtsk)
+ if (IS_ERR(vtsk))
goto free_worker;
mutex_init(&worker->mutex);
diff --git a/kernel/vhost_task.c b/kernel/vhost_task.c
index 8800f5acc0071..2ef2e1b800916 100644
--- a/kernel/vhost_task.c
+++ b/kernel/vhost_task.c
@@ -133,7 +133,7 @@ struct vhost_task *vhost_task_create(bool (*fn)(void *),
vtsk = kzalloc(sizeof(*vtsk), GFP_KERNEL);
if (!vtsk)
- return NULL;
+ return ERR_PTR(-ENOMEM);
init_completion(&vtsk->exited);
mutex_init(&vtsk->exit_mutex);
vtsk->data = arg;
@@ -145,7 +145,7 @@ struct vhost_task *vhost_task_create(bool (*fn)(void *),
tsk = copy_process(NULL, 0, NUMA_NO_NODE, &args);
if (IS_ERR(tsk)) {
kfree(vtsk);
- return NULL;
+ return ERR_PTR(PTR_ERR(tsk));
}
vtsk->task = tsk;
--
2.39.5
^ permalink raw reply related [flat|nested] 19+ messages in thread