cpufreq: Add Tegra234 to cpufreq-dt-platdev blocklist
Subsystems (8)
Sasha Levin
maintainerPATCH 1/16 cpufreq: Add Tegra234 to cpufreq-dt-platdev blocklist
From: Sumit Gupta <[email protected]>
[ Upstream commit 01c5bb0cc2a39fbc56ff9a5ef28b79447f0c2351 ]
Tegra234 platform uses the tegra194-cpufreq driver, so add it to the blocklist in cpufreq-dt-platdev driver to avoid the cpufreq driver registration from there.
--- drivers/cpufreq/cpufreq-dt-platdev.c | 1 + 1 file changed, 1 insertion(+)
drivers/cpufreq/cpufreq-dt-platdev.c +1 -0
@@ -126,6 +126,7 @@ static const struct of_device_id blacklist[] __initconst = { { .compatible = "nvidia,tegra124", }, { .compatible = "nvidia,tegra210", }, + { .compatible = "nvidia,tegra234", }, { .compatible = "qcom,apq8096", }, { .compatible = "qcom,msm8996", },
Signature · 1 line
2.35.1
Sasha Levin
maintainerPATCH 2/16 ASoC: fsl_micfil: Correct the number of steps on SX controls
From: Chancel Liu <[email protected]>
[ Upstream commit cdfa92eb90f5770b26a79824ef213ebdbbd988b1 ]
The parameter "max" of SOC_SINGLE_SX_TLV() means the number of steps rather than maximum value. This patch corrects the minimum value to -8 and the number of steps to 15.
--- sound/soc/fsl/fsl_micfil.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
sound/soc/fsl/fsl_micfil.c +8 -8
@@ -87,21 +87,21 @@ static DECLARE_TLV_DB_SCALE(gain_tlv, 0, 100, 0);static const struct snd_kcontrol_new fsl_micfil_snd_controls[] = {SOC_SINGLE_SX_TLV ("CH0 Volume" ,REG_MICFIL_OUT_CTRL , -MICFIL_OUTGAIN_CHX_SHIFT (0 ),0xF ,0x7 , gain_tlv), +MICFIL_OUTGAIN_CHX_SHIFT (0 ),0x8 ,0xF , gain_tlv),SOC_SINGLE_SX_TLV ("CH1 Volume" ,REG_MICFIL_OUT_CTRL , -MICFIL_OUTGAIN_CHX_SHIFT (1 ),0xF ,0x7 , gain_tlv), +MICFIL_OUTGAIN_CHX_SHIFT (1 ),0x8 ,0xF , gain_tlv),SOC_SINGLE_SX_TLV ("CH2 Volume" ,REG_MICFIL_OUT_CTRL , -MICFIL_OUTGAIN_CHX_SHIFT (2 ),0xF ,0x7 , gain_tlv), +MICFIL_OUTGAIN_CHX_SHIFT (2 ),0x8 ,0xF , gain_tlv),SOC_SINGLE_SX_TLV ("CH3 Volume" ,REG_MICFIL_OUT_CTRL , -MICFIL_OUTGAIN_CHX_SHIFT (3 ),0xF ,0x7 , gain_tlv), +MICFIL_OUTGAIN_CHX_SHIFT (3 ),0x8 ,0xF , gain_tlv),SOC_SINGLE_SX_TLV ("CH4 Volume" ,REG_MICFIL_OUT_CTRL , -MICFIL_OUTGAIN_CHX_SHIFT (4 ),0xF ,0x7 , gain_tlv), +MICFIL_OUTGAIN_CHX_SHIFT (4 ),0x8 ,0xF , gain_tlv),SOC_SINGLE_SX_TLV ("CH5 Volume" ,REG_MICFIL_OUT_CTRL , -MICFIL_OUTGAIN_CHX_SHIFT (5 ),0xF ,0x7 , gain_tlv), +MICFIL_OUTGAIN_CHX_SHIFT (5 ),0x8 ,0xF , gain_tlv),SOC_SINGLE_SX_TLV ("CH6 Volume" ,REG_MICFIL_OUT_CTRL , -MICFIL_OUTGAIN_CHX_SHIFT (6 ),0xF ,0x7 , gain_tlv), +MICFIL_OUTGAIN_CHX_SHIFT (6 ),0x8 ,0xF , gain_tlv),SOC_SINGLE_SX_TLV ("CH7 Volume" ,REG_MICFIL_OUT_CTRL , -MICFIL_OUTGAIN_CHX_SHIFT (7 ),0xF ,0x7 , gain_tlv), +MICFIL_OUTGAIN_CHX_SHIFT (7 ),0x8 ,0xF , gain_tlv),SOC_ENUM_EXT ("MICFIL Quality Select" , fsl_micfil_quality_enum, snd_soc_get_enum_double, snd_soc_put_enum_double),
Signature · 1 line
2.35.1
Sasha Levin
maintainerPATCH 3/16 drm: Add orientation quirk for Lenovo ideapad D330-10IGL
In reply to Sasha LevinFrom: Patrick Thompson <[email protected]>
[ Upstream commit 0688773f0710528e1ab302c3d6317e269f2e2e6e ]
Panel is 800x1280 but mounted on a detachable form factor sideways.
--- drivers/gpu/drm/drm_panel_orientation_quirks.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/gpu/drm/drm_panel_orientation_quirks.c +6 -0
@@ -272,6 +272,12 @@ static const struct dmi_system_id orientation_data[] = { DMI_EXACT_MATCH(DMI_PRODUCT_VERSION, "Lenovo ideapad D330-10IGM"), }, .driver_data = (void *)&lcd1200x1920_rightside_up, + }, { /* Lenovo Ideapad D330-10IGL (HD) */ + .matches = { +DMI_EXACT_MATCH (DMI_SYS_VENDOR ,"LENOVO" ), + DMI_EXACT_MATCH(DMI_PRODUCT_VERSION, "Lenovo ideapad D330-10IGL"), + }, + .driver_data = (void *)&lcd800x1280_rightside_up, }, { /* Lenovo Yoga Book X90F / X91F / X91L */ .matches = {/* Non exact match to match all versions */
Signature · 1 line
2.35.1
Sasha Levin
maintainerPATCH 4/16 s390/debug: add _ASM_S390_ prefix to header guard
In reply to Sasha LevinFrom: Niklas Schnelle <[email protected]>
[ Upstream commit 0d4d52361b6c29bf771acd4fa461f06d78fb2fac ]
Using DEBUG_H without a prefix is very generic and inconsistent with other header guards in arch/s390/include/asm. In fact it collides with the same name in the ath9k wireless driver though that depends on !S390 via disabled wireless support. Let's just use a consistent header guard name and prevent possible future trouble.
--- arch/s390/include/asm/debug.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
arch/s390/include/asm/debug.h +3 -3
@@ -4,8 +4,8 @@* * Copyright IBM Corp. 1999, 2000 */ -#ifndef DEBUG_H -#define DEBUG_H +#ifndef _ASM_S390_DEBUG_H +#define _ASM_S390_DEBUG_H#include <linux/string.h> #include <linux/spinlock.h>
@@ -416,4 +416,4 @@ int debug_unregister_view(debug_info_t *id, struct debug_view *view); #define PRINT_FATAL(x...) printk(KERN_DEBUG PRINTK_HEADER x)#endif /* DASD_DEBUG */ -#endif /* DEBUG_H */ +#endif /* _ASM_S390_DEBUG_H */
Signature · 1 line
2.35.1
Sasha Levin
maintainerPATCH 5/16 arm64/mm: Define dummy pud_user_exec() when using 2-level page-table
In reply to Sasha LevinFrom: Will Deacon <[email protected]>
[ Upstream commit 4e4ff23a35ee3a145fbc8378ecfeaab2d235cddd ]
With only two levels of page-table, the generic 'pud_*' macros are implemented using dummy operations in pgtable-nopmd.h. Since commit 730a11f982e6 ("arm64/mm: add pud_user_exec() check in pud_user_accessible_page()"), pud_user_accessible_page() unconditionally calls pud_user_exec(), which is an arm64-specific helper and therefore isn't defined by pgtable-nopmd.h. This results in a build failure for configurations with only two levels of page table:
arch/arm64/include/asm/pgtable.h: In function 'pud_user_accessible_page':
Quoted 1 line
Quoted 1 line
arch/arm64/include/asm/pgtable.h:870:51: error: implicit declaration of function 'pud_user_exec'; did you mean 'pmd_user_exec'? [-Werror=implicit-function-declaration]
870 | return pud_leaf(pud) && (pud_user(pud) || pud_user_exec(pud));
| ^~~~~~~~~~~~~
| pmd_user_execFix the problem by defining pud_user_exec() as pud_user() in this case.
--- arch/arm64/include/asm/pgtable.h | 1 + 1 file changed, 1 insertion(+)
arch/arm64/include/asm/pgtable.h +1 -0
@@ -588,6 +588,7 @@ static inline phys_addr_t pud_page_paddr(pud_t pud)#else #define pud_page_paddr (pud) ({ BUILD_BUG(); 0; }) +#define pud_user_exec (pud) pud_user(pud)/* Always 0 with folding */ /* Match pmd_offset folding in <asm/generic/pgtable-nopmd.h> */ #define pmd_set_fixmap (addr) NULL
Signature · 1 line
2.35.1
Re: [PATCH AUTOSEL 5.4 05/16] arm64/mm: Define dummy pud_user_exec() when using 2-level page-table
Quoted 18 lines · Sasha Levin
From: Will Deacon <[email protected]>
[ Upstream commit
4e4ff23a35ee3a145fbc8378ecfeaab2d235cddd]With only two levels of page-table, the generic 'pud_*' macros are implemented using dummy operations in
pgtable-nopmd.h. Since commit730a11f982e6("arm64/mm: addpud_user_exec()check inpud_user_accessible_page()"),pud_user_accessible_page()unconditionally callspud_user_exec(), which is an arm64-specific helper and therefore isn't defined bypgtable-nopmd.h. This results in a build failure for configurations with only two levels of page table:
arch/arm64/include/asm/pgtable.h: In function 'pud_user_accessible_page':Quoted 1 line
Quoted 1 line
arch/arm64/include/asm/pgtable.h:870:51: error: implicit declaration of function 'pud_user_exec'; did you mean 'pmd_user_exec'? [-Werror=implicit-function-declaration]870 | return pud_leaf(pud) && (pud_user(pud) || pud_user_exec(pud)); | ^~~~~~~~~~~~~ | pmd_user_exec
Quoted 6 lines
Fix the problem by defining
pud_user_exec()aspud_user()in this case.Reported-by kernel test robot <[email protected]>Signed-off-by Will Deacon <[email protected]>Signed-off-by Sasha Levin <[email protected]>
I don't think this patch should be backported to 5.4. It is a fix for a commit that went in shortly before this one (730a11f982e6). The latter commit does have a Fixes tag but I guess Will thought it's not worth a cc stable (and it's up to 5.19 anyway).
Signature · 6 lines
Catalin _______________________________________________ linux-arm-kernel mailing list [email protected] http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Sasha Levin
maintainerRe: [PATCH AUTOSEL 5.4 05/16] arm64/mm: Define dummy pud_user_exec() when using 2-level page-table
Quoted 26 lines · Catalin Marinas
Quoted 18 lines · Sasha Levin
From: Will Deacon <[email protected]>
[ Upstream commit
4e4ff23a35ee3a145fbc8378ecfeaab2d235cddd]With only two levels of page-table, the generic 'pud_*' macros are implemented using dummy operations in
pgtable-nopmd.h. Since commit730a11f982e6("arm64/mm: addpud_user_exec()check inpud_user_accessible_page()"),pud_user_accessible_page()unconditionally callspud_user_exec(), which is an arm64-specific helper and therefore isn't defined bypgtable-nopmd.h. This results in a build failure for configurations with only two levels of page table:
arch/arm64/include/asm/pgtable.h: In function 'pud_user_accessible_page':Quoted 1 line
Quoted 1 line
arch/arm64/include/asm/pgtable.h:870:51: error: implicit declaration of function 'pud_user_exec'; did you mean 'pmd_user_exec'? [-Werror=implicit-function-declaration]870 | return pud_leaf(pud) && (pud_user(pud) || pud_user_exec(pud)); | ^~~~~~~~~~~~~ | pmd_user_execQuoted 6 lines
Fix the problem by defining
pud_user_exec()aspud_user()in this case.Reported-by kernel test robot <[email protected]>Signed-off-by Will Deacon <[email protected]>Signed-off-by Sasha Levin <[email protected]>
Quoted 4 lines
I don't think this patch should be backported to 5.4. It is a fix for a commit that went in shortly before this one (
730a11f982e6). The latter commit does have a Fixes tag but I guess Will thought it's not worth a cc stable (and it's up to 5.19 anyway).
Ack, I'll drop it.
Signature · 2 lines
Thanks, Sasha
Sasha Levin
maintainerPATCH 6/16 cpufreq: armada-37xx: stop using 0 as NULL pointer
In reply to Sasha LevinFrom: Miles Chen <[email protected]>
[ Upstream commit 08f0adb193c008de640fde34a2e00a666c01d77c ]
Use NULL for NULL pointer to fix the following sparse warning:drivers/cpufreq/armada-37xx-cpufreq.c:448:32: sparse: warning: Using plain integer as NULL pointer
--- drivers/cpufreq/armada-37xx-cpufreq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/cpufreq/armada-37xx-cpufreq.c +1 -1
@@ -443,7 +443,7 @@ static int __init armada37xx_cpufreq_driver_init(void)return -ENODEV ; } - clk =clk_get (cpu_dev,0 ); + clk =clk_get (cpu_dev,NULL );if (IS_ERR (clk)) {dev_err (cpu_dev,"Cannot get clock for CPU0\n" );return PTR_ERR (clk);
Signature · 1 line
2.35.1
Sasha Levin
maintainerPATCH 7/16 ASoC: fsl_ssi: Rename AC'97 streams to avoid collisions with AC'97 CODEC
In reply to Sasha LevinFrom: Mark Brown <[email protected]>
[ Upstream commit 8c6a42b5b0ed6f96624f56954e93eeae107440a6 ]
The SSI driver calls the AC'97 playback and transmit streams "AC97 Playback" and "AC97 Capture" respectively. This is the same name used by the generic AC'97 CODEC driver in ASoC, creating confusion for the Freescale ASoC card when it attempts to use these widgets in routing. Add a "CPU" in the name like the regular DAIs registered by the driver to disambiguate.
--- sound/soc/fsl/fsl-asoc-card.c | 8 ++++---- sound/soc/fsl/fsl_ssi.c | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-)
sound/soc/fsl/fsl-asoc-card.c +4 -4
@@ -112,11 +112,11 @@ static const struct snd_soc_dapm_route audio_map[] = {static const struct snd_soc_dapm_route audio_map_ac97[] = {/* 1st half -- Normal DAPM routes */ - {"Playback" ,NULL ,"AC97 Playback" }, - {"AC97 Capture" ,NULL ,"Capture" }, + {"Playback" ,NULL ,"CPU AC97 Playback" }, + {"CPU AC97 Capture" ,NULL ,"Capture" },/* 2nd half -- ASRC DAPM routes */ - {"AC97 Playback" ,NULL ,"ASRC-Playback" }, - {"ASRC-Capture" ,NULL ,"AC97 Capture" }, + {"CPU AC97 Playback" ,NULL ,"ASRC-Playback" }, + {"ASRC-Capture" ,NULL ,"CPU AC97 Capture" }, };/* Add all possible widgets into here without being redundant */
sound/soc/fsl/fsl_ssi.c +2 -2
@@ -1147,14 +1147,14 @@ static struct snd_soc_dai_driver fsl_ssi_ac97_dai = { .symmetric_channels = 1, .probe = fsl_ssi_dai_probe, .playback = { - .stream_name = "AC97 Playback", + .stream_name = "CPU AC97 Playback", .channels_min = 2, .channels_max = 2, .rates = SNDRV_PCM_RATE_8000_48000, .formats = SNDRV_PCM_FMTBIT_S16 | SNDRV_PCM_FMTBIT_S20, }, .capture = { - .stream_name = "AC97 Capture", + .stream_name = "CPU AC97 Capture", .channels_min = 2, .channels_max = 2, .rates = SNDRV_PCM_RATE_48000,
Signature · 1 line
2.35.1
Sasha Levin
maintainerPATCH 8/16 ASoC: fsl-asoc-card: Fix naming of AC'97 CODEC widgets
In reply to Sasha LevinFrom: Mark Brown <[email protected]>
[ Upstream commit 242fc66ae6e1e2b8519daacc7590a73cd0e8a6e4 ]
The fsl-asoc-card AC'97 support currently tries to route to Playback and Capture widgets provided by the AC'97 CODEC. This doesn't work since the generic AC'97 driver registers with an "AC97" at the front of the stream and hence widget names, update to reflect reality. It's not clear to me if or how this ever worked.
--- sound/soc/fsl/fsl-asoc-card.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
sound/soc/fsl/fsl-asoc-card.c +2 -2
@@ -112,8 +112,8 @@ static const struct snd_soc_dapm_route audio_map[] = {static const struct snd_soc_dapm_route audio_map_ac97[] = {/* 1st half -- Normal DAPM routes */ - {"Playback" ,NULL ,"CPU AC97 Playback" }, - {"CPU AC97 Capture" ,NULL ,"Capture" }, + {"AC97 Playback" ,NULL ,"CPU AC97 Playback" }, + {"CPU AC97 Capture" ,NULL ,"AC97 Capture" },/* 2nd half -- ASRC DAPM routes */ {"CPU AC97 Playback" ,NULL ,"ASRC-Playback" }, {"ASRC-Capture" ,NULL ,"CPU AC97 Capture" },
Signature · 1 line
2.35.1
Sasha Levin
maintainerPATCH 9/16 spi: spidev: fix a race condition when accessing spidev->spi
In reply to Sasha LevinFrom: Bartosz Golaszewski <[email protected]>
[ Upstream commit a720416d94634068951773cb9e9d6f1b73769e5b ]
There's a spinlock in place that is taken in file_operations callbacks whenever we check if spidev->spi is still alive (not null). It's also taken when spidev->spi is set to NULL in remove().
This however doesn't protect the code against driver unbind event while one of the syscalls is still in progress. To that end we need a lock taken continuously as long as we may still access spidev->spi. As both the file ops and the remove callback are never called from interrupt context, we can replace the spinlock with a mutex.
--- drivers/spi/spidev.c | 34 ++++++++++++++++++---------------- 1 file changed, 18 insertions(+), 16 deletions(-)
drivers/spi/spidev.c +18 -16
@@ -66,7 +66,7 @@ static DECLARE_BITMAP(minors, N_SPI_MINORS);struct spidev_data {dev_t devt; -spinlock_t spi_lock; +struct mutex spi_lock;struct spi_device *spi;struct list_head device_entry;
@@ -93,9 +93,8 @@ spidev_sync(struct spidev_data *spidev, struct spi_message *message)int status;struct spi_device *spi; -spin_lock_irq (&spidev->spi_lock); +mutex_lock (&spidev->spi_lock); spi = spidev->spi; -spin_unlock_irq (&spidev->spi_lock);if (spi ==NULL ) status = -ESHUTDOWN ;
@@ -105,6 +104,7 @@ spidev_sync(struct spidev_data *spidev, struct spi_message *message)if (status ==0 ) status = message->actual_length; +mutex_unlock (&spidev->spi_lock);return status; }
@@ -355,12 +355,12 @@ spidev_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)* we issue this ioctl. */ spidev = filp->private_data; -spin_lock_irq (&spidev->spi_lock); +mutex_lock (&spidev->spi_lock); spi =spi_dev_get (spidev->spi); -spin_unlock_irq (&spidev->spi_lock); - -if (spi ==NULL ) +if (spi ==NULL ) { +mutex_unlock (&spidev->spi_lock);return -ESHUTDOWN ; + }/* use the buffer lock here for triple duty: * - prevent I/O (from us) so calling spi_setup() is safe;
@@ -485,6 +485,7 @@ spidev_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)mutex_unlock (&spidev->buf_lock);spi_dev_put (spi); +mutex_unlock (&spidev->spi_lock);return retval; }
@@ -506,12 +507,12 @@ spidev_compat_ioc_message(struct file *filp, unsigned int cmd,* we issue this ioctl. */ spidev = filp->private_data; -spin_lock_irq (&spidev->spi_lock); +mutex_lock (&spidev->spi_lock); spi =spi_dev_get (spidev->spi); -spin_unlock_irq (&spidev->spi_lock); - -if (spi ==NULL ) +if (spi ==NULL ) { +mutex_unlock (&spidev->spi_lock);return -ESHUTDOWN ; + }/* SPI_IOC_MESSAGE needs the buffer locked "normally" */ mutex_lock (&spidev->buf_lock);
@@ -538,6 +539,7 @@ spidev_compat_ioc_message(struct file *filp, unsigned int cmd, done:mutex_unlock (&spidev->buf_lock);spi_dev_put (spi); +mutex_unlock (&spidev->spi_lock);return retval; }
@@ -616,10 +618,10 @@ static int spidev_release(struct inode *inode, struct file *filp) spidev = filp->private_data; filp->private_data =NULL ; -spin_lock_irq (&spidev->spi_lock); +mutex_lock (&spidev->spi_lock);/* ... after we unbound from the underlying device? */ dofree = (spidev->spi ==NULL ); -spin_unlock_irq (&spidev->spi_lock); +mutex_unlock (&spidev->spi_lock);/* last close? */ spidev->users--;
@@ -746,7 +748,7 @@ static int spidev_probe(struct spi_device *spi)/* Initialize the driver data */ spidev->spi = spi; -spin_lock_init (&spidev->spi_lock); +mutex_init (&spidev->spi_lock);mutex_init (&spidev->buf_lock);INIT_LIST_HEAD (&spidev->device_entry);
@@ -791,9 +793,9 @@ static int spidev_remove(struct spi_device *spi)/* prevent new opens */ mutex_lock (&device_list_lock);/* make sure ops on existing fds can abort cleanly */ -spin_lock_irq (&spidev->spi_lock); +mutex_lock (&spidev->spi_lock); spidev->spi =NULL ; -spin_unlock_irq (&spidev->spi_lock); +mutex_unlock (&spidev->spi_lock);list_del (&spidev->device_entry);device_destroy (spidev_class, spidev->devt);
Signature · 1 line
2.35.1
Sasha Levin
maintainerPATCH 10/16 spi: spidev: remove debug messages that access spidev->spi without locking
In reply to Sasha LevinFrom: Bartosz Golaszewski <[email protected]>
[ Upstream commit 6b35b173dbc1711f8d272e3f322d2ad697015919 ]
The two debug messages in spidev_open() dereference spidev->spi without taking the lock and without checking if it's not null. This can lead to a crash. Drop the messages as they're not needed - the user-space will get informed about ENOMEM with the syscall return value.
--- drivers/spi/spidev.c | 2 -- 1 file changed, 2 deletions(-)
drivers/spi/spidev.c +0 -2
@@ -579,7 +579,6 @@ static int spidev_open(struct inode *inode, struct file *filp)if (!spidev->tx_buffer) { spidev->tx_buffer =kmalloc (bufsiz,GFP_KERNEL );if (!spidev->tx_buffer) { -dev_dbg (&spidev->spi->dev,"open/ENOMEM\n" ); status = -ENOMEM ; goto err_find_dev; }
@@ -588,7 +587,6 @@ static int spidev_open(struct inode *inode, struct file *filp)if (!spidev->rx_buffer) { spidev->rx_buffer =kmalloc (bufsiz,GFP_KERNEL );if (!spidev->rx_buffer) { -dev_dbg (&spidev->spi->dev,"open/ENOMEM\n" ); status = -ENOMEM ; goto err_alloc_rx_buf; }
Signature · 1 line
2.35.1
Sasha Levin
maintainerPATCH 11/16 KVM: s390: interrupt: use READ_ONCE() before cmpxchg()
In reply to Sasha LevinFrom: Heiko Carstens <[email protected]>
[ Upstream commit 42400d99e9f0728c17240edb9645637ead40f6b9 ]
Use READ_ONCE() before cmpxchg() to prevent that the compiler generates code that fetches the to be compared old value several times from memory.
--- arch/s390/kvm/interrupt.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-)
arch/s390/kvm/interrupt.c +8 -4
@@ -81,8 +81,9 @@ static int sca_inject_ext_call(struct kvm_vcpu *vcpu, int src_id)struct esca_block *sca = vcpu->kvm->arch.sca;union esca_sigp_ctrl *sigp_ctrl = &(sca->cpu[vcpu->vcpu_id].sigp_ctrl); -union esca_sigp_ctrl new_val = {0 }, old_val = *sigp_ctrl; +union esca_sigp_ctrl new_val = {0 }, old_val; + old_val =READ_ONCE (*sigp_ctrl); new_val.scn = src_id; new_val.c =1 ; old_val.c =0 ;
@@ -93,8 +94,9 @@ static int sca_inject_ext_call(struct kvm_vcpu *vcpu, int src_id)struct bsca_block *sca = vcpu->kvm->arch.sca;union bsca_sigp_ctrl *sigp_ctrl = &(sca->cpu[vcpu->vcpu_id].sigp_ctrl); -union bsca_sigp_ctrl new_val = {0 }, old_val = *sigp_ctrl; +union bsca_sigp_ctrl new_val = {0 }, old_val; + old_val =READ_ONCE (*sigp_ctrl); new_val.scn = src_id; new_val.c =1 ; old_val.c =0 ;
@@ -124,16 +126,18 @@ static void sca_clear_ext_call(struct kvm_vcpu *vcpu)struct esca_block *sca = vcpu->kvm->arch.sca;union esca_sigp_ctrl *sigp_ctrl = &(sca->cpu[vcpu->vcpu_id].sigp_ctrl); -union esca_sigp_ctrl old = *sigp_ctrl; +union esca_sigp_ctrl old; + old =READ_ONCE (*sigp_ctrl); expect = old.value; rc =cmpxchg (&sigp_ctrl->value, old.value,0 ); }else {struct bsca_block *sca = vcpu->kvm->arch.sca;union bsca_sigp_ctrl *sigp_ctrl = &(sca->cpu[vcpu->vcpu_id].sigp_ctrl); -union bsca_sigp_ctrl old = *sigp_ctrl; +union bsca_sigp_ctrl old; + old =READ_ONCE (*sigp_ctrl); expect = old.value; rc =cmpxchg (&sigp_ctrl->value, old.value,0 ); }
Signature · 1 line
2.35.1
Sasha Levin
maintainerPATCH 12/16 scsi: hisi_sas: Set a port invalid only if there are no devices attached when refreshing port id
In reply to Sasha LevinFrom: Yihang Li <[email protected]>
[ Upstream commit f58c89700630da6554b24fd3df293a24874c10c1 ]
Currently the driver sets the port invalid if one phy in the port is not enabled, which may cause issues in expander situation. In directly attached situation, if phy up doesn't occur in time when refreshing port id, the port is incorrectly set to invalid which will also cause disk lost.
Therefore set a port invalid only if there are no devices attached to the port.
--- drivers/scsi/hisi_sas/hisi_sas_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/scsi/hisi_sas/hisi_sas_main.c +1 -1
@@ -1397,7 +1397,7 @@ static void hisi_sas_refresh_port_id(struct hisi_hba *hisi_hba) device->linkrate = phy->sas_phy.linkrate; hisi_hba->hw->setup_itct (hisi_hba, sas_dev); - }else + }else if (!port->port_attached) port->id =0xff ; } }
Signature · 1 line
2.35.1
Sasha Levin
maintainerPATCH 13/16 platform/x86: touchscreen_dmi: Add info for the CSL Panther Tab HD
In reply to Sasha LevinFrom: Michael Klein <[email protected]>
[ Upstream commit 36c2b9d6710427f802494ba070621cb415198293 ]
Add touchscreen info for the CSL Panther Tab HD.
--- drivers/platform/x86/touchscreen_dmi.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+)
drivers/platform/x86/touchscreen_dmi.c +25 -0
@@ -169,6 +169,23 @@ static const struct ts_dmi_data connect_tablet9_data = { .properties = connect_tablet9_props, }; +static const struct property_entry csl_panther_tab_hd_props[] = { +PROPERTY_ENTRY_U32 ("touchscreen-min-x" ,1 ), +PROPERTY_ENTRY_U32 ("touchscreen-min-y" ,20 ), +PROPERTY_ENTRY_U32 ("touchscreen-size-x" ,1980 ), +PROPERTY_ENTRY_U32 ("touchscreen-size-y" ,1526 ), +PROPERTY_ENTRY_BOOL ("touchscreen-inverted-y" ), +PROPERTY_ENTRY_BOOL ("touchscreen-swapped-x-y" ), +PROPERTY_ENTRY_STRING ("firmware-name" ,"gsl1680-csl-panther-tab-hd.fw" ), +PROPERTY_ENTRY_U32 ("silead,max-fingers" ,10 ), + { } +}; + +static const struct ts_dmi_data csl_panther_tab_hd_data = { + .acpi_name ="MSSL1680:00" , + .properties = csl_panther_tab_hd_props, +}; +static const struct property_entry cube_iwork8_air_props[] = {PROPERTY_ENTRY_U32 ("touchscreen-min-x" ,1 ),PROPERTY_ENTRY_U32 ("touchscreen-min-y" ,3 ),
@@ -721,6 +738,14 @@ static const struct dmi_system_id touchscreen_dmi_table[] = { DMI_MATCH(DMI_PRODUCT_NAME, "Tablet 9"), }, }, + { +/* CSL Panther Tab HD */ + .driver_data = (void *)&csl_panther_tab_hd_data, + .matches = { +DMI_MATCH (DMI_SYS_VENDOR ,"CSL Computer GmbH & Co. KG" ), + DMI_MATCH(DMI_PRODUCT_NAME, "CSL Panther Tab HD"), + }, + }, {/* CUBE iwork8 Air */ .driver_data = (void *)&cube_iwork8_air_data,
Signature · 1 line
2.35.1
Sasha Levin
maintainerPATCH 14/16 platform/x86: asus-nb-wmi: Add alternate mapping for KEY_SCREENLOCK
In reply to Sasha LevinFrom: Hans de Goede <[email protected]>
[ Upstream commit db9494895b405bf318dc7e563dee6daa51b3b6ed ]
The 0x33 keycode is emitted by Fn + F6 on a ASUS FX705GE laptop.
--- drivers/platform/x86/asus-nb-wmi.c | 1 + 1 file changed, 1 insertion(+)
drivers/platform/x86/asus-nb-wmi.c +1 -0
@@ -528,6 +528,7 @@ static const struct key_entry asus_nb_wmi_keymap[] = { { KE_KEY, 0x30, { KEY_VOLUMEUP } }, { KE_KEY, 0x31, { KEY_VOLUMEDOWN } }, { KE_KEY, 0x32, { KEY_MUTE } }, + { KE_KEY, 0x33, { KEY_SCREENLOCK } }, { KE_KEY, 0x35, { KEY_SCREENLOCK } }, { KE_KEY, 0x40, { KEY_PREVIOUSSONG } }, { KE_KEY, 0x41, { KEY_NEXTSONG } },
Signature · 1 line
2.35.1
Sasha Levin
maintainerPATCH 15/16 platform/x86: asus-wmi: Ignore fan on E410MA
In reply to Sasha LevinFrom: Thomas Weißschuh <[email protected]>
[ Upstream commit 82cc5c6c624c63f7b57214e325e2ea685d924e89 ]
The ASUS VivoBook has a fan device described in its ACPI tables but does not actually contain any physical fan.
Use the quirk to inhibit fan handling.
--- drivers/platform/x86/asus-nb-wmi.c | 13 +++++++++++++ 1 file changed, 13 insertions(+)
drivers/platform/x86/asus-nb-wmi.c +13 -0
@@ -120,6 +120,10 @@ static struct quirk_entry quirk_asus_ga502i = { .wmi_backlight_set_devstate = true, }; +static struct quirk_entry quirk_asus_ignore_fan = { + .wmi_ignore_fan = true, +}; +static int dmi_matched (const struct dmi_system_id *dmi) {pr_info ("Identified laptop model '%s'\n" , dmi->ident);
@@ -493,6 +497,15 @@ static const struct dmi_system_id asus_quirks[] = { }, .driver_data = &quirk_asus_ga502i, }, + { + .callback = dmi_matched, + .ident = "ASUS VivoBook E410MA", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "ASUSTeK COMPUTER INC."), + DMI_MATCH(DMI_PRODUCT_NAME, "E410MA"), + }, + .driver_data = &quirk_asus_ignore_fan, + }, {}, };
Signature · 1 line
2.35.1
Sasha Levin
maintainerPATCH 16/16 lockref: stop doing cpu_relax in the cmpxchg loop
In reply to Sasha LevinFrom: Mateusz Guzik <[email protected]>
[ Upstream commit f5fe24ef17b5fbe6db49534163e77499fb10ae8c ]
On the x86-64 architecture even a failing cmpxchg grants exclusive access to the cacheline, making it preferable to retry the failed op immediately instead of stalling with the pause instruction.
To illustrate the impact, below are benchmark results obtained by running various will-it-scale tests on top of the 6.2-rc3 kernel and Cascade Lake (2 sockets * 24 cores * 2 threads) CPU.
All results in ops/s. Note there is some variance in re-runs, but the code is consistently faster when contention is present.
open3 ("Same file open/close"):
proc stock no-pause
1 805603 814942 (+%1)
2 1054980 1054781 (-0%)
8 1544802 1822858 (+18%)
24 1191064 2199665 (+84%)
48 851582 1469860 (+72%)
96 609481 1427170 (+134%) fstat2 ("Same file fstat"):
proc stock no-pause
1 3013872 3047636 (+1%)
2 4284687 4400421 (+2%)
8 3257721 5530156 (+69%)
24 2239819 5466127 (+144%)
48 1701072 5256609 (+209%)
96 1269157 6649326 (+423%)Additionally, a kernel with a private patch to help access() scalability:
access2 ("Same file access"):
proc stock patched patched
+nopause
24 2378041 2005501 5370335 (-15% / +125%)That is, fixing the problems in access itself *reduces* scalability after the cacheline ping-pong only happens in lockref with the pause instruction.
Note that fstat and access benchmarks are not currently integrated into will-it-scale, but interested parties can find them in pull requests to said project.
Code at hand has a rather tortured history. First modification showed up in commit d472d9d98b46 ("lockref: Relax in cmpxchg loop"), written with Itanium in mind. Later it got patched up to use an arch-dependent macro to stop doing it on s390 where it caused a significant regression. Said macro had undergone revisions and was ultimately eliminated later, going back to cpu_relax.
While I intended to only remove cpu_relax for x86-64, I got the following comment from Linus:
I would actually prefer just removing it entirely and see if somebody else hollers. You have the numbers to prove it hurts on real hardware, and I don't think we have any numbers to the contrary.
So I think it's better to trust the numbers and remove it as a failure, than say "let's just remove it on x86-64 and leave everybody else with the potentially broken code"
Additionally, Will Deacon (maintainer of the arm64 port, one of the architectures previously benchmarked):
So, from the arm64 side of the fence, I'm perfectly happy just removing the cpu_relax() calls from lockref.
As such, come back full circle in history and whack it altogether.
--- lib/lockref.c | 1 - 1 file changed, 1 deletion(-)
lib/lockref.c +0 -1
@@ -24,7 +24,6 @@ } \if (!--retry) \break ; \ -cpu_relax (); \ } \ }while (0 )
Signature · 1 line
2.35.1