5.18.18-rc1 review
Subsystems (12)
Greg Kroah-Hartman
maintainerPATCH 113/1095 media: [PATCH] pci: atomisp_cmd: fix three missing checks on list iterator
In reply to Greg Kroah-HartmanFrom: Xiaomeng Tong <[email protected]>
commit 09b204eb9de9fdf07d028c41c4331b5cfeb70dd7 upstream.
The three bugs are here:
__func__, s3a_buf->s3a_data->exp_id); __func__, md_buf->metadata->exp_id); __func__, dis_buf->dis_data->exp_id);
The list iterator 's3a_buf/md_buf/dis_buf' will point to a bogus position containing HEAD if the list is empty or no element is found. This case must be checked before any use of the iterator, otherwise it will lead to a invalid memory access.
To fix this bug, add an check. Use a new variable '*_iter' as the list iterator, while use the old variable '*_buf' as a dedicated pointer to point to the found element.
--- drivers/staging/media/atomisp/pci/atomisp_cmd.c | 57 +++++++++++++++--------- 1 file changed, 36 insertions(+), 21 deletions(-)
drivers/staging/media/atomisp/pci/atomisp_cmd.c +36 -21
@@ -901,9 +901,9 @@ void atomisp_buf_done(struct atomisp_subint err;unsigned long irqflags;struct ia_css_frame *frame =NULL ; -struct atomisp_s3a_buf *s3a_buf =NULL , *_s3a_buf_tmp; -struct atomisp_dis_buf *dis_buf =NULL , *_dis_buf_tmp; -struct atomisp_metadata_buf *md_buf =NULL , *_md_buf_tmp; +struct atomisp_s3a_buf *s3a_buf =NULL , *_s3a_buf_tmp, *s3a_iter; +struct atomisp_dis_buf *dis_buf =NULL , *_dis_buf_tmp, *dis_iter; +struct atomisp_metadata_buf *md_buf =NULL , *_md_buf_tmp, *md_iter;enum atomisp_metadata_type md_type;struct atomisp_device *isp = asd->isp;struct v4l2_control ctrl;
@@ -942,60 +942,75 @@ void atomisp_buf_done(struct atomisp_subswitch (buf_type) {case IA_CSS_BUFFER_TYPE_3A_STATISTICS : -list_for_each_entry_safe (s3a_buf, _s3a_buf_tmp, +list_for_each_entry_safe (s3a_iter, _s3a_buf_tmp, &asd->s3a_stats_in_css, list) { -if (s3a_buf->s3a_data == +if (s3a_iter->s3a_data == buffer.css_buffer.data.stats_3a) { -list_del_init (&s3a_buf->list); -list_add_tail (&s3a_buf->list, +list_del_init (&s3a_iter->list); +list_add_tail (&s3a_iter->list, &asd->s3a_stats_ready); + s3a_buf = s3a_iter;break ; } } asd->s3a_bufs_in_css[css_pipe_id]--;atomisp_3a_stats_ready_event (asd, buffer.css_buffer.exp_id); -dev_dbg (isp->dev,"%s: s3a stat with exp_id %d is ready\n" , - __func__, s3a_buf->s3a_data->exp_id); +if (s3a_buf) +dev_dbg (isp->dev,"%s: s3a stat with exp_id %d is ready\n" , + __func__, s3a_buf->s3a_data->exp_id); +else +dev_dbg (isp->dev,"%s: s3a stat is ready with no exp_id found\n" , + __func__);break ;case IA_CSS_BUFFER_TYPE_METADATA :if (error)break ; md_type =atomisp_get_metadata_type (asd, css_pipe_id); -list_for_each_entry_safe (md_buf, _md_buf_tmp, +list_for_each_entry_safe (md_iter, _md_buf_tmp, &asd->metadata_in_css[md_type], list) { -if (md_buf->metadata == +if (md_iter->metadata == buffer.css_buffer.data.metadata) { -list_del_init (&md_buf->list); -list_add_tail (&md_buf->list, +list_del_init (&md_iter->list); +list_add_tail (&md_iter->list, &asd->metadata_ready[md_type]); + md_buf = md_iter;break ; } } asd->metadata_bufs_in_css[stream_id][css_pipe_id]--;atomisp_metadata_ready_event (asd, md_type); -dev_dbg (isp->dev,"%s: metadata with exp_id %d is ready\n" , - __func__, md_buf->metadata->exp_id); +if (md_buf) +dev_dbg (isp->dev,"%s: metadata with exp_id %d is ready\n" , + __func__, md_buf->metadata->exp_id); +else +dev_dbg (isp->dev,"%s: metadata is ready with no exp_id found\n" , + __func__);break ;case IA_CSS_BUFFER_TYPE_DIS_STATISTICS : -list_for_each_entry_safe (dis_buf, _dis_buf_tmp, +list_for_each_entry_safe (dis_iter, _dis_buf_tmp, &asd->dis_stats_in_css, list) { -if (dis_buf->dis_data == +if (dis_iter->dis_data == buffer.css_buffer.data.stats_dvs) {spin_lock_irqsave (&asd->dis_stats_lock, irqflags); -list_del_init (&dis_buf->list); -list_add (&dis_buf->list, &asd->dis_stats); +list_del_init (&dis_iter->list); +list_add (&dis_iter->list, &asd->dis_stats); asd->params.dis_proj_data_valid = true;spin_unlock_irqrestore (&asd->dis_stats_lock, irqflags); + dis_buf = dis_iter;break ; } } asd->dis_bufs_in_css--; -dev_dbg (isp->dev,"%s: dis stat with exp_id %d is ready\n" , - __func__, dis_buf->dis_data->exp_id); +if (dis_buf) +dev_dbg (isp->dev,"%s: dis stat with exp_id %d is ready\n" , + __func__, dis_buf->dis_data->exp_id); +else +dev_dbg (isp->dev,"%s: dis stat is ready with no exp_id found\n" , + __func__);break ;case IA_CSS_BUFFER_TYPE_VF_OUTPUT_FRAME :case IA_CSS_BUFFER_TYPE_SEC_VF_OUTPUT_FRAME :
Greg Kroah-Hartman
maintainerPATCH 114/1095 ia64, processor: fix -Wincompatible-pointer-types in ia64_get_irr()
In reply to Greg Kroah-HartmanFrom: Alexander Lobakin <[email protected]>
commit e5a16a5c4602c119262f350274021f90465f479d upstream.
test_bit(), as any other bitmap op, takes unsigned long * as a second argument (pointer to the actual bitmap), as any bitmap itself is an array of unsigned longs. However, the ia64_get_irr() code passes a ref to u64 as a second argument.
This works with the ia64 bitops implementation due to that they have void * as the second argument and then cast it later on. This works with the bitmap API itself due to that unsigned long has the same size on ia64 as u64 (unsigned long long), but from the compiler PoV those two are different.
Define @irr as unsigned long to fix that. That implies no functional changes. Has been hidden for 16 years!
--- arch/ia64/include/asm/processor.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/ia64/include/asm/processor.h +1 -1
@@ -538,7 +538,7 @@ ia64_get_irr(unsigned int vector) {unsigned int reg = vector /64 ;unsigned int bit = vector %64 ; -u64 irr; +unsigned long irr;switch (reg) {case 0 : irr =ia64_getreg (_IA64_REG_CR_IRR0);break ;
Greg Kroah-Hartman
maintainerPATCH 115/1095 powerpc: Restore CONFIG_DEBUG_INFO in defconfigs
In reply to Greg Kroah-HartmanFrom: Christophe Leroy <[email protected]>
commit 92f89ec1b534b6eca2b81bae97d30a786932f51a upstream.
Commit f9b3cd245784 ("Kconfig.debug: make DEBUG_INFO selectable from a choice") broke the selection of CONFIG_DEBUG_INFO by powerpc defconfigs.
It is now necessary to select one of the three DEBUG_INFO_DWARF* options to get DEBUG_INFO enabled.
Replace DEBUG_INFO=y by DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y in all defconfigs using the following command:
sed -i s/DEBUG_INFO=y/DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y/g git grep -l DEBUG_INFO arch/powerpc/configs/
--- arch/powerpc/configs/44x/akebono_defconfig | 2 +- arch/powerpc/configs/44x/currituck_defconfig | 2 +- arch/powerpc/configs/44x/fsp2_defconfig | 2 +- arch/powerpc/configs/44x/iss476-smp_defconfig | 2 +- arch/powerpc/configs/44x/warp_defconfig | 2 +- arch/powerpc/configs/52xx/lite5200b_defconfig | 2 +- arch/powerpc/configs/52xx/motionpro_defconfig | 2 +- arch/powerpc/configs/52xx/tqm5200_defconfig | 2 +- arch/powerpc/configs/adder875_defconfig | 2 +- arch/powerpc/configs/ep8248e_defconfig | 2 +- arch/powerpc/configs/ep88xc_defconfig | 2 +- arch/powerpc/configs/fsl-emb-nonhw.config | 2 +- arch/powerpc/configs/mgcoge_defconfig | 2 +- arch/powerpc/configs/mpc5200_defconfig | 2 +- arch/powerpc/configs/mpc8272_ads_defconfig | 2 +- arch/powerpc/configs/mpc885_ads_defconfig | 2 +- arch/powerpc/configs/ppc6xx_defconfig | 2 +- arch/powerpc/configs/pq2fads_defconfig | 2 +- arch/powerpc/configs/ps3_defconfig | 2 +- arch/powerpc/configs/tqm8xx_defconfig | 2 +- 20 files changed, 20 insertions(+), 20 deletions(-)
arch/powerpc/configs/44x/akebono_defconfig +1 -1
@@ -118,7 +118,7 @@ CONFIG_CRAMFS=y CONFIG_NLS_DEFAULT="n" CONFIG_NLS_CODEPAGE_437=y CONFIG_NLS_ISO8859_1=y -CONFIG_DEBUG_INFO=y +CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y CONFIG_MAGIC_SYSRQ=y CONFIG_DETECT_HUNG_TASK=y CONFIG_XMON=y
arch/powerpc/configs/44x/currituck_defconfig +1 -1
@@ -73,7 +73,7 @@ CONFIG_NFS_FS=y CONFIG_NFS_V3_ACL=y CONFIG_NFS_V4=y CONFIG_NLS_DEFAULT="n" -CONFIG_DEBUG_INFO=y +CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y CONFIG_MAGIC_SYSRQ=y CONFIG_DETECT_HUNG_TASK=y CONFIG_XMON=y
arch/powerpc/configs/44x/fsp2_defconfig +1 -1
@@ -110,7 +110,7 @@ CONFIG_XZ_DEC=y CONFIG_PRINTK_TIME=y CONFIG_MESSAGE_LOGLEVEL_DEFAULT=3 CONFIG_DYNAMIC_DEBUG=y -CONFIG_DEBUG_INFO=y +CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y CONFIG_MAGIC_SYSRQ=y CONFIG_DETECT_HUNG_TASK=y CONFIG_CRYPTO_CBC=y
arch/powerpc/configs/44x/iss476-smp_defconfig +1 -1
@@ -56,7 +56,7 @@ CONFIG_PROC_KCORE=y CONFIG_TMPFS=y CONFIG_CRAMFS=y # CONFIG_NETWORK_FILESYSTEMS is not set -CONFIG_DEBUG_INFO=y +CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y CONFIG_MAGIC_SYSRQ=y CONFIG_DETECT_HUNG_TASK=y CONFIG_PPC_EARLY_DEBUG=y
arch/powerpc/configs/44x/warp_defconfig +1 -1
@@ -88,7 +88,7 @@ CONFIG_NLS_UTF8=y CONFIG_CRC_CCITT=y CONFIG_CRC_T10DIF=y CONFIG_PRINTK_TIME=y -CONFIG_DEBUG_INFO=y +CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y CONFIG_DEBUG_FS=y CONFIG_MAGIC_SYSRQ=y CONFIG_DETECT_HUNG_TASK=y
arch/powerpc/configs/52xx/lite5200b_defconfig +1 -1
@@ -58,6 +58,6 @@ CONFIG_NFS_FS=y CONFIG_NFS_V4=y CONFIG_ROOT_NFS=y CONFIG_PRINTK_TIME=y -CONFIG_DEBUG_INFO=y +CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y CONFIG_DETECT_HUNG_TASK=y # CONFIG_DEBUG_BUGVERBOSE is not set
arch/powerpc/configs/52xx/motionpro_defconfig +1 -1
@@ -84,7 +84,7 @@ CONFIG_ROOT_NFS=y CONFIG_NLS_CODEPAGE_437=y CONFIG_NLS_ISO8859_1=y CONFIG_PRINTK_TIME=y -CONFIG_DEBUG_INFO=y +CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y CONFIG_DETECT_HUNG_TASK=y # CONFIG_DEBUG_BUGVERBOSE is not set CONFIG_CRYPTO_ECB=y
arch/powerpc/configs/52xx/tqm5200_defconfig +1 -1
@@ -85,7 +85,7 @@ CONFIG_ROOT_NFS=y CONFIG_NLS_CODEPAGE_437=y CONFIG_NLS_ISO8859_1=y CONFIG_PRINTK_TIME=y -CONFIG_DEBUG_INFO=y +CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y CONFIG_DETECT_HUNG_TASK=y # CONFIG_DEBUG_BUGVERBOSE is not set CONFIG_CRYPTO_ECB=y
arch/powerpc/configs/adder875_defconfig +1 -1
@@ -45,7 +45,7 @@ CONFIG_CRAMFS=y CONFIG_NFS_FS=y CONFIG_ROOT_NFS=y CONFIG_CRC32_SLICEBY4=y -CONFIG_DEBUG_INFO=y +CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y CONFIG_DEBUG_FS=y CONFIG_MAGIC_SYSRQ=y CONFIG_DETECT_HUNG_TASK=y
arch/powerpc/configs/ep8248e_defconfig +1 -1
@@ -59,7 +59,7 @@ CONFIG_NLS_CODEPAGE_437=y CONFIG_NLS_ASCII=y CONFIG_NLS_ISO8859_1=y CONFIG_NLS_UTF8=y -CONFIG_DEBUG_INFO=y +CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y CONFIG_MAGIC_SYSRQ=y # CONFIG_SCHED_DEBUG is not set CONFIG_BDI_SWITCH=y
arch/powerpc/configs/ep88xc_defconfig +1 -1
@@ -48,6 +48,6 @@ CONFIG_CRAMFS=y CONFIG_NFS_FS=y CONFIG_ROOT_NFS=y CONFIG_CRC32_SLICEBY4=y -CONFIG_DEBUG_INFO=y +CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y CONFIG_MAGIC_SYSRQ=y CONFIG_DETECT_HUNG_TASK=y
arch/powerpc/configs/fsl-emb-nonhw.config +1 -1
@@ -24,7 +24,7 @@ CONFIG_CRYPTO_PCBC=m CONFIG_CRYPTO_SHA256=y CONFIG_CRYPTO_SHA512=y CONFIG_DEBUG_FS=y -CONFIG_DEBUG_INFO=y +CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y CONFIG_DEBUG_KERNEL=y CONFIG_DEBUG_SHIRQ=y CONFIG_DETECT_HUNG_TASK=y
arch/powerpc/configs/mgcoge_defconfig +1 -1
@@ -73,7 +73,7 @@ CONFIG_NLS_CODEPAGE_437=y CONFIG_NLS_ASCII=y CONFIG_NLS_ISO8859_1=y CONFIG_NLS_UTF8=y -CONFIG_DEBUG_INFO=y +CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y CONFIG_DEBUG_FS=y CONFIG_MAGIC_SYSRQ=y # CONFIG_SCHED_DEBUG is not set
arch/powerpc/configs/mpc5200_defconfig +1 -1
@@ -122,6 +122,6 @@ CONFIG_ROOT_NFS=y CONFIG_NLS_CODEPAGE_437=y CONFIG_NLS_ISO8859_1=y CONFIG_PRINTK_TIME=y -CONFIG_DEBUG_INFO=y +CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y CONFIG_DEBUG_KERNEL=y CONFIG_DETECT_HUNG_TASK=y
arch/powerpc/configs/mpc8272_ads_defconfig +1 -1
@@ -67,7 +67,7 @@ CONFIG_NLS_CODEPAGE_437=y CONFIG_NLS_ASCII=y CONFIG_NLS_ISO8859_1=y CONFIG_NLS_UTF8=y -CONFIG_DEBUG_INFO=y +CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y CONFIG_MAGIC_SYSRQ=y CONFIG_DETECT_HUNG_TASK=y CONFIG_BDI_SWITCH=y
arch/powerpc/configs/mpc885_ads_defconfig +1 -1
@@ -71,7 +71,7 @@ CONFIG_ROOT_NFS=y CONFIG_CRYPTO=y CONFIG_CRYPTO_DEV_TALITOS=y CONFIG_CRC32_SLICEBY4=y -CONFIG_DEBUG_INFO=y +CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y CONFIG_MAGIC_SYSRQ=y CONFIG_DEBUG_FS=y CONFIG_DEBUG_VM_PGTABLE=y
arch/powerpc/configs/ppc6xx_defconfig +1 -1
@@ -1066,7 +1066,7 @@ CONFIG_NLS_ISO8859_14=m CONFIG_NLS_ISO8859_15=m CONFIG_NLS_KOI8_R=m CONFIG_NLS_KOI8_U=m -CONFIG_DEBUG_INFO=y +CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y CONFIG_HEADERS_INSTALL=y CONFIG_MAGIC_SYSRQ=y CONFIG_DEBUG_KERNEL=y
arch/powerpc/configs/pq2fads_defconfig +1 -1
@@ -68,7 +68,7 @@ CONFIG_NLS_CODEPAGE_437=y CONFIG_NLS_ASCII=y CONFIG_NLS_ISO8859_1=y CONFIG_NLS_UTF8=y -CONFIG_DEBUG_INFO=y +CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y CONFIG_MAGIC_SYSRQ=y CONFIG_DETECT_HUNG_TASK=y # CONFIG_SCHED_DEBUG is not set
arch/powerpc/configs/ps3_defconfig +1 -1
@@ -153,7 +153,7 @@ CONFIG_NLS_CODEPAGE_437=y CONFIG_NLS_ISO8859_1=y CONFIG_CRC_CCITT=m CONFIG_CRC_T10DIF=y -CONFIG_DEBUG_INFO=y +CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y CONFIG_MAGIC_SYSRQ=y CONFIG_DEBUG_MEMORY_INIT=y CONFIG_DEBUG_STACKOVERFLOW=y
arch/powerpc/configs/tqm8xx_defconfig +1 -1
@@ -55,6 +55,6 @@ CONFIG_CRAMFS=y CONFIG_NFS_FS=y CONFIG_ROOT_NFS=y CONFIG_CRC32_SLICEBY4=y -CONFIG_DEBUG_INFO=y +CONFIG_DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT=y CONFIG_MAGIC_SYSRQ=y CONFIG_DETECT_HUNG_TASK=y
Greg Kroah-Hartman
maintainerPATCH 116/1095 powerpc/64e: Fix early TLB miss with KUAP
In reply to Greg Kroah-HartmanFrom: Christophe Leroy <[email protected]>
commit 09317643117ade87c03158341e87466413fa8f1a upstream.
With KUAP, the TLB miss handler bails out when an access to user memory is performed with a nul TID.
But the normal TLB miss routine which is only used early during boot does the check regardless for all memory areas, not only user memory.
By chance there is no early IO or vmalloc access, but when KASAN come we will start having early TLB misses.
Fix it by creating a special branch for user accesses similar to the one in the 'bolted' TLB miss handlers. Unfortunately SPRN_MAS1 is now read too early and there are no registers available to preserve it so it will be read a second time.
--- arch/powerpc/mm/nohash/tlb_low_64e.S | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-)
arch/powerpc/mm/nohash/tlb_low_64e.S +8 -9
@@ -583,7 +583,7 @@ itlb_miss_fault_e6500: */ rlwimi r11,r14,32-19,27,27 rlwimi r11,r14,32-16,19,19 - beq normal_tlb_miss + beq normal_tlb_miss_user /* XXX replace the RMW cycles with immediate loads + writes */ 1: mfspr r10,SPRN_MAS1 cmpldi cr0,r15,8 /* Check for vmalloc region */
@@ -626,7 +626,7 @@ itlb_miss_fault_e6500: cmpldi cr0,r15,0 /* Check for user region */ std r14,EX_TLB_ESR(r12) /* write crazy -1 to frame */ - beq normal_tlb_miss + beq normal_tlb_miss_user li r11,_PAGE_PRESENT|_PAGE_BAP_SX /* Base perm */ oris r11,r11,_PAGE_ACCESSED@h
@@ -653,6 +653,12 @@ itlb_miss_fault_e6500: * r11 = PTE permission mask * r10 = crap (free to use) */ +normal_tlb_miss_user: +#ifdef CONFIG_PPC_KUAP + mfspr r14,SPRN_MAS1 + rlwinm. r14,r14,0,0x3fff0000 + beq- normal_tlb_miss_access_fault /* KUAP fault */ +#endif normal_tlb_miss: /* So we first construct the page table address. We do that by * shifting the bottom of the address (not the region ID) by
@@ -683,11 +689,6 @@ finish_normal_tlb_miss: /* Check if required permissions are met */ andc. r15,r11,r14 bne- normal_tlb_miss_access_fault -#ifdef CONFIG_PPC_KUAP - mfspr r11,SPRN_MAS1 - rlwinm. r10,r11,0,0x3fff0000 - beq- normal_tlb_miss_access_fault /* KUAP fault */ -#endif /* Now we build the MAS: *
@@ -709,9 +710,7 @@ finish_normal_tlb_miss: rldicl r10,r14,64-8,64-8 cmpldi cr0,r10,BOOK3E_PAGESZ_4K beq- 1f -#ifndef CONFIG_PPC_KUAP mfspr r11,SPRN_MAS1 -#endif rlwimi r11,r14,31,21,24 rlwinm r11,r11,0,21,19 mtspr SPRN_MAS1,r11
Signature · 1 line
2.37.1
Greg Kroah-Hartman
maintainerPATCH 117/1095 powerpc/fsl-pci: Fix Class Code of PCIe Root Port
In reply to Greg Kroah-HartmanFrom: Pali Rohár <[email protected]>
commit 0c551abfa004ce154d487d91777bf221c808a64f upstream.
By default old pre-3.0 Freescale PCIe controllers reports invalid PCI Class Code 0x0b20 for PCIe Root Port. It can be seen by lspci -b output on P2020 board which has this pre-3.0 controller:
$ lspci -bvnn
00:00.0 Power PC [0b20]: Freescale Semiconductor Inc P2020E [1957:0070] (rev 21)
!!! Invalid class 0b20 for header type 01
Capabilities: [4c] Express Root Port (Slot-), MSI 00Fix this issue by programming correct PCI Class Code 0x0604 for PCIe Root Port to the Freescale specific PCIe register 0x474.
With this change lspci -b output is:
$ lspci -bvnn
00:00.0 PCI bridge [0604]: Freescale Semiconductor Inc P2020E [1957:0070] (rev 21) (prog-if 00 [Normal decode])
Capabilities: [4c] Express Root Port (Slot-), MSI 00Without any "Invalid class" error. So class code was properly reflected into standard (read-only) PCI register 0x08.
Same fix is already implemented in U-Boot pcie_fsl.c driver in commit:
http://source.denx.de/u-boot/u-boot/-/commit/d18d06ac35229345a0af80977a408cfbe1d1015b
Fix activated by U-Boot stay active also after booting Linux kernel. But boards which use older U-Boot version without that fix are affected and still require this fix.
So implement this class code fix also in kernel fsl_pci.c driver.
--- arch/powerpc/sysdev/fsl_pci.c | 8 ++++++++ arch/powerpc/sysdev/fsl_pci.h | 1 + 2 files changed, 9 insertions(+)
arch/powerpc/sysdev/fsl_pci.c +8 -0
@@ -520,6 +520,7 @@ int fsl_add_bridge(struct platform_devicstruct resource rsrc;const int *bus_range;u8 hdr_type, progif; +u32 class_code;struct device_node *dev;struct ccsr_pci __iomem *pci;u16 temp;
@@ -593,6 +594,13 @@ int fsl_add_bridge(struct platform_devicPPC_INDIRECT_TYPE_SURPRESS_PRIMARY_BUS ;if (fsl_pcie_check_link (hose)) hose->indirect_type |=PPC_INDIRECT_TYPE_NO_PCIE_LINK ; +/* Fix Class Code to PCI_CLASS_BRIDGE_PCI_NORMAL for pre-3.0 controller */ +if (in_be32 (&pci->block_rev1) <PCIE_IP_REV_3_0 ) { +early_read_config_dword (hose,0 ,0 ,PCIE_FSL_CSR_CLASSCODE , &class_code); + class_code &=0xff ; + class_code |=PCI_CLASS_BRIDGE_PCI_NORMAL <<8 ; +early_write_config_dword (hose,0 ,0 ,PCIE_FSL_CSR_CLASSCODE , class_code); + } }else {/* * Set PBFR(PCI Bus Function Register)[10] = 1 to
arch/powerpc/sysdev/fsl_pci.h +1 -0
@@ -18,6 +18,7 @@ struct platform_device;#define PCIE_LTSSM 0x0404/* PCIE Link Training and Status */ #define PCIE_LTSSM_L0 0x16/* L0 state */ +#define PCIE_FSL_CSR_CLASSCODE 0x474/* FSL GPEX CSR */ #define PCIE_IP_REV_2_2 0x02080202/* PCIE IP block version Rev2.2 */ #define PCIE_IP_REV_3_0 0x02080300/* PCIE IP block version Rev3.0 */ #define PIWAR_EN 0x80000000/* Enable */
Greg Kroah-Hartman
maintainerPATCH 118/1095 powerpc/ptdump: Fix display of RW pages on FSL_BOOK3E
In reply to Greg Kroah-HartmanFrom: Christophe Leroy <[email protected]>
commit dd8de84b57b02ba9c1fe530a6d916c0853f136bd upstream.
On FSL_BOOK3E, _PAGE_RW is defined with two bits, one for user and one for supervisor. As soon as one of the two bits is set, the page has to be display as RW. But the way it is implemented today requires both bits to be set in order to display it as RW.
Instead of display RW when _PAGE_RW bits are set and R otherwise, reverse the logic and display R when _PAGE_RW bits are all 0 and RW otherwise.
This change has no impact on other platforms as _PAGE_RW is a single bit on all of them.
--- arch/powerpc/mm/ptdump/shared.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
arch/powerpc/mm/ptdump/shared.c +3 -3
@@ -17,9 +17,9 @@ static const struct flag_info flag_array .clear = " ", }, { .mask = _PAGE_RW, - .val = _PAGE_RW, - .set = "rw", - .clear = "r ", + .val = 0, + .set = "r ", + .clear = "rw", }, { .mask = _PAGE_EXEC, .val = _PAGE_EXEC,
Greg Kroah-Hartman
maintainerPATCH 119/1095 powerpc/powernv: Avoid crashing if rng is NULL
In reply to Greg Kroah-HartmanFrom: Michael Ellerman <[email protected]>
commit 90b5d4fe0b3ba7f589c6723c6bfb559d9e83956a upstream.
On a bare-metal Power8 system that doesn't have an "ibm,power-rng", a malicious QEMU and guest that ignore the absence of the KVM_CAP_PPC_HWRNG flag, and calls H_RANDOM anyway, will dereference a NULL pointer.
In practice all Power8 machines have an "ibm,power-rng", but let's not rely on that, add a NULL check and early return in powernv_get_random_real_mode().
--- arch/powerpc/platforms/powernv/rng.c | 2 ++ 1 file changed, 2 insertions(+)
arch/powerpc/platforms/powernv/rng.c +2 -0
@@ -63,6 +63,8 @@ int powernv_get_random_real_mode(unsignestruct powernv_rng *rng; rng =raw_cpu_read (powernv_rng); +if (!rng) +return 0 ; *v =rng_whiten (rng,__raw_rm_readq (rng->regs_real));
Greg Kroah-Hartman
maintainerPATCH 120/1095 MIPS: cpuinfo: Fix a warning for CONFIG_CPUMASK_OFFSTACK
In reply to Greg Kroah-HartmanFrom: Huacai Chen <[email protected]>
commit e1a534f5d074db45ae5cbac41d8912b98e96a006 upstream.
When CONFIG_CPUMASK_OFFSTACK and CONFIG_DEBUG_PER_CPU_MAPS is selected, cpu_max_bits_warn() generates a runtime warning similar as below while we show /proc/cpuinfo. Fix this by using nr_cpu_ids (the runtime limit) instead of NR_CPUS to iterate CPUs.
[ 3.052463] ------------[ cut here ]------------ [ 3.059679] WARNING: CPU: 3 PID: 1 at include/linux/cpumask.h:108 show_cpuinfo+0x5e8/0x5f0 [ 3.070072] Modules linked in: efivarfs autofs4 [ 3.076257] CPU: 0 PID: 1 Comm: systemd Not tainted 5.19-rc5+ #1052 [ 3.084034] Hardware name: Loongson Loongson-3A4000-7A1000-1w-V0.1-CRB/Loongson-LS3A4000-7A1000-1w-EVB-V1.21, BIOS Loongson-UDK2018-V2.0.04082-beta7 04/27 [ 3.099465] Stack : 9000000100157b08 9000000000f18530 9000000000cf846c 9000000100154000 [ 3.109127] 9000000100157a50 0000000000000000 9000000100157a58 9000000000ef7430 [ 3.118774] 90000001001578e8 0000000000000040 0000000000000020 ffffffffffffffff [ 3.128412] 0000000000aaaaaa 1ab25f00eec96a37 900000010021de80 900000000101c890 [ 3.138056] 0000000000000000 0000000000000000 0000000000000000 0000000000aaaaaa [ 3.147711] ffff8000339dc220 0000000000000001 0000000006ab4000 0000000000000000 [ 3.157364] 900000000101c998 0000000000000004 9000000000ef7430 0000000000000000 [ 3.167012] 0000000000000009 000000000000006c 0000000000000000 0000000000000000 [ 3.176641] 9000000000d3de08 9000000001639390 90000000002086d8 00007ffff0080286 [ 3.186260] 00000000000000b0 0000000000000004 0000000000000000 0000000000071c1c [ 3.195868] ... [ 3.199917] Call Trace: [ 3.203941] [<98000000002086d8>] show_stack+0x38/0x14c [ 3.210666] [<9800000000cf846c>] dump_stack_lvl+0x60/0x88 [ 3.217625] [<980000000023d268>] __warn+0xd0/0x100 [ 3.223958] [<9800000000cf3c90>] warn_slowpath_fmt+0x7c/0xcc [ 3.231150] [<9800000000210220>] show_cpuinfo+0x5e8/0x5f0 [ 3.238080] [<98000000004f578c>] seq_read_iter+0x354/0x4b4 [ 3.245098] [<98000000004c2e90>] new_sync_read+0x17c/0x1c4 [ 3.252114] [<98000000004c5174>] vfs_read+0x138/0x1d0 [ 3.258694] [<98000000004c55f8>] ksys_read+0x70/0x100 [ 3.265265] [<9800000000cfde9c>] do_syscall+0x7c/0x94 [ 3.271820] [<9800000000202fe4>] handle_syscall+0xc4/0x160 [ 3.281824] ---[ end trace 8b484262b4b8c24c ]---
--- arch/mips/kernel/proc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/mips/kernel/proc.c +1 -1
@@ -311,7 +311,7 @@ static void *c_start(struct seq_file *m, {unsigned long i = *pos; -return i <NR_CPUS ? (void *) (i +1 ) :NULL ; +return i < nr_cpu_ids ? (void *) (i +1 ) :NULL ; }static void *c_next (struct seq_file *m,void *v,loff_t *pos)
Greg Kroah-Hartman
maintainerPATCH 121/1095 coresight: Clear the connection field properly
In reply to Greg Kroah-HartmanFrom: Suzuki K Poulose <[email protected]>
commit 2af89ebacf299b7fba5f3087d35e8a286ec33706 upstream.
coresight devices track their connections (output connections) and hold a reference to the fwnode. When a device goes away, we walk through the devices on the coresight bus and make sure that the references are dropped. This happens both ways:
a) For all output connections from the device, drop the reference to the target device via coresight_release_platform_data()
b) Iterate over all the devices on the coresight bus and drop the reference to fwnode if *this* device is the target of the output connection, via coresight_remove_conns()->coresight_remove_match().
However, the coresight_remove_match() doesn't clear the fwnode field, after dropping the reference, this causes use-after-free and additional refcount drops on the fwnode.
e.g., if we have two devices, A and B, with a connection, A -> B. If we remove B first, B would clear the reference on B, from A via coresight_remove_match(). But when A is removed, it still has a connection with fwnode still pointing to B. Thus it tries to drops the reference in coresight_release_platform_data(), raising the bells like :
[ 91.990153] ------------[ cut here ]------------ [ 91.990163] refcount_t: addition on 0; use-after-free. [ 91.990212] WARNING: CPU: 0 PID: 461 at lib/refcount.c:25 refcount_warn_saturate+0xa0/0x144 [ 91.990260] Modules linked in: coresight_funnel coresight_replicator coresight_etm4x(-) crct10dif_ce coresight ip_tables x_tables ipv6 [last unloaded: coresight_cpu_debug] [ 91.990398] CPU: 0 PID: 461 Comm: rmmod Tainted: G W T 5.19.0-rc2+ #53 [ 91.990418] Hardware name: ARM LTD ARM Juno Development Platform/ARM Juno Development Platform, BIOS EDK II Feb 1 2019 [ 91.990434] pstate: 600000c5 (nZCv daIF -PAN -UAO -TCO -DIT -SSBS BTYPE=--) [ 91.990454] pc : refcount_warn_saturate+0xa0/0x144 [ 91.990476] lr : refcount_warn_saturate+0xa0/0x144 [ 91.990496] sp : ffff80000c843640 [ 91.990509] x29: ffff80000c843640 x28: ffff800009957c28 x27: ffff80000c8439a8 [ 91.990560] x26: ffff00097eff1990 x25: ffff8000092b6ad8 x24: ffff00097eff19a8 [ 91.990610] x23: ffff80000c8439a8 x22: 0000000000000000 x21: ffff80000c8439c2 [ 91.990659] x20: 0000000000000000 x19: ffff00097eff1a10 x18: ffff80000ab99c40 [ 91.990708] x17: 0000000000000000 x16: 0000000000000000 x15: ffff80000abf6fa0 [ 91.990756] x14: 000000000000001d x13: 0a2e656572662d72 x12: 657466612d657375 [ 91.990805] x11: 203b30206e6f206e x10: 6f69746964646120 x9 : ffff8000081aba28 [ 91.990854] x8 : 206e6f206e6f6974 x7 : 69646461203a745f x6 : 746e756f63666572 [ 91.990903] x5 : ffff00097648ec58 x4 : 0000000000000000 x3 : 0000000000000027 [ 91.990952] x2 : 0000000000000000 x1 : 0000000000000000 x0 : ffff00080260ba00 [ 91.991000] Call trace: [ 91.991012] refcount_warn_saturate+0xa0/0x144 [ 91.991034] kobject_get+0xac/0xb0 [ 91.991055] of_node_get+0x2c/0x40 [ 91.991076] of_fwnode_get+0x40/0x60 [ 91.991094] fwnode_handle_get+0x3c/0x60 [ 91.991116] fwnode_get_nth_parent+0xf4/0x110 [ 91.991137] fwnode_full_name_string+0x48/0xc0 [ 91.991158] device_node_string+0x41c/0x530 [ 91.991178] pointer+0x320/0x3ec [ 91.991198] vsnprintf+0x23c/0x750 [ 91.991217] vprintk_store+0x104/0x4b0 [ 91.991238] vprintk_emit+0x8c/0x360 [ 91.991257] vprintk_default+0x44/0x50 [ 91.991276] vprintk+0xcc/0xf0 [ 91.991295] _printk+0x68/0x90 [ 91.991315] of_node_release+0x13c/0x14c [ 91.991334] kobject_put+0x98/0x114 [ 91.991354] of_node_put+0x24/0x34 [ 91.991372] of_fwnode_put+0x40/0x5c [ 91.991390] fwnode_handle_put+0x38/0x50 [ 91.991411] coresight_release_platform_data+0x74/0xb0 [coresight] [ 91.991472] coresight_unregister+0x64/0xcc [coresight] [ 91.991525] etm4_remove_dev+0x64/0x78 [coresight_etm4x] [ 91.991563] etm4_remove_amba+0x1c/0x2c [coresight_etm4x] [ 91.991598] amba_remove+0x3c/0x19c
Reproducible by: (Build all coresight components as modules):
#!/bin/sh
while true
do
for m in tmc stm cpu_debug etm4x replicator funnel do
modprobe coresight_${m}
done
for m in tmc stm cpu_debug etm4x replicator funnel do
rmmode coresight_${m}
done
done
--- drivers/hwtracing/coresight/coresight-core.c | 1 + 1 file changed, 1 insertion(+)
drivers/hwtracing/coresight/coresight-core.c +1 -0
@@ -1424,6 +1424,7 @@ static int coresight_remove_match(struct* platform data. */ fwnode_handle_put (conn->child_fwnode); + conn->child_fwnode =NULL ;/* No need to continue */ break ; }
Greg Kroah-Hartman
maintainerPATCH 122/1095 usb: typec: ucsi: Acknowledge the GET_ERROR_STATUS command completion
In reply to Greg Kroah-HartmanFrom: Linyu Yuan <[email protected]>
commit a7dc438b5e446afcd1b3b6651da28271400722f2 upstream.
We found PPM will not send any notification after it report error status and OPM issue GET_ERROR_STATUS command to read the details about error.
According UCSI spec, PPM may clear the Error Status Data after the OPM has acknowledged the command completion.
This change add operation to acknowledge the command completion from PPM.
--- drivers/usb/typec/ucsi/ucsi.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/usb/typec/ucsi/ucsi.c +4 -0
@@ -76,6 +76,10 @@ static int ucsi_read_error(struct ucsi *if (ret)return ret; + ret =ucsi_acknowledge_command (ucsi); +if (ret) +return ret; +switch (error) {case UCSI_ERROR_INCOMPATIBLE_PARTNER :return -EOPNOTSUPP ;
Greg Kroah-Hartman
maintainerPATCH 123/1095 USB: HCD: Fix URB giveback issue in tasklet function
In reply to Greg Kroah-HartmanFrom: Weitao Wang <[email protected]>
commit 26c6c2f8a907c9e3a2f24990552a4d77235791e6 upstream.
Usb core introduce the mechanism of giveback of URB in tasklet context to reduce hardware interrupt handling time. On some test situation(such as FIO with 4KB block size), when tasklet callback function called to giveback URB, interrupt handler add URB node to the bh->head list also. If check bh->head list again after finish all URB giveback of local_list, then it may introduce a "dynamic balance" between giveback URB and add URB to bh->head list. This tasklet callback function may not exit for a long time, which will cause other tasklet function calls to be delayed. Some real-time applications(such as KB and Mouse) will see noticeable lag.
In order to prevent the tasklet function from occupying the cpu for a long time at a time, new URBS will not be added to the local_list even though the bh->head list is not empty. But also need to ensure the left URB giveback to be processed in time, so add a member high_prio for structure giveback_urb_bh to prioritize tasklet and schelule this tasklet again if bh->head list is not empty.
At the same time, we are able to prioritize tasklet through structure member high_prio. So, replace the local high_prio_bh variable with this structure member in usb_hcd_giveback_urb.
--- drivers/usb/core/hcd.c | 26 +++++++++++++++----------- include/linux/usb/hcd.h | 1 + 2 files changed, 16 insertions(+), 11 deletions(-)
drivers/usb/core/hcd.c +15 -11
@@ -1691,7 +1691,6 @@ static void usb_giveback_urb_bh(struct tspin_lock_irq (&bh->lock); bh->running = true; - restart:list_replace_init (&bh->head, &local_list);spin_unlock_irq (&bh->lock);
@@ -1705,10 +1704,17 @@ static void usb_giveback_urb_bh(struct t bh->completing_ep =NULL ; } -/* check if there are new URBs to giveback */ +/* +* giveback new URBs next time to prevent this function +* from not exiting for a long time. +*/ spin_lock_irq (&bh->lock); -if (!list_empty (&bh->head)) - goto restart; +if (!list_empty (&bh->head)) { +if (bh->high_prio) +tasklet_hi_schedule (&bh->bh); +else +tasklet_schedule (&bh->bh); + } bh->running = false;spin_unlock_irq (&bh->lock); }
@@ -1737,7 +1743,7 @@ static void usb_giveback_urb_bh(struct tvoid usb_hcd_giveback_urb (struct usb_hcd *hcd,struct urb *urb,int status) {struct giveback_urb_bh *bh; -bool running, high_prio_bh; +bool running;/* pass status to tasklet via unlinked */ if (likely (!urb->unlinked))
@@ -1748,13 +1754,10 @@ void usb_hcd_giveback_urb(struct usb_hcdreturn ; } -if (usb_pipeisoc (urb->pipe) ||usb_pipeint (urb->pipe)) { +if (usb_pipeisoc (urb->pipe) ||usb_pipeint (urb->pipe)) bh = &hcd->high_prio_bh; - high_prio_bh = true; - }else { +else bh = &hcd->low_prio_bh; - high_prio_bh = false; - }spin_lock (&bh->lock);list_add_tail (&urb->urb_list, &bh->head);
@@ -1763,7 +1766,7 @@ void usb_hcd_giveback_urb(struct usb_hcdif (running) ; -else if (high_prio_bh) +else if (bh->high_prio)tasklet_hi_schedule (&bh->bh);else tasklet_schedule (&bh->bh);
@@ -2959,6 +2962,7 @@ int usb_add_hcd(struct usb_hcd *hcd,/* initialize tasklets */ init_giveback_urb_bh (&hcd->high_prio_bh); + hcd->high_prio_bh.high_prio = true;init_giveback_urb_bh (&hcd->low_prio_bh);/* enable irqs just before we start the controller,
include/linux/usb/hcd.h +1 -0
@@ -66,6 +66,7 @@struct giveback_urb_bh {bool running; +bool high_prio;spinlock_t lock;struct list_head head;struct tasklet_struct bh;
Greg Kroah-Hartman
maintainerPATCH 124/1095 Revert "net: usb: ax88179_178a needs FLAG_SEND_ZLP"
In reply to Greg Kroah-HartmanFrom: Jose Alonso <[email protected]>
commit 6fd2c17fb6e02a8c0ab51df1cfec82ce96b8e83d upstream.
This reverts commit 36a15e1cb134c0395261ba1940762703f778438c.
The usage of FLAG_SEND_ZLP causes problems to other firmware/hardware versions that have no issues.
The FLAG_SEND_ZLP is not safe to use in this context. See:
https://patchwork.ozlabs.org/project/netdev/patch/1270599787.8900.8.camel@Linuxdev4-laptop/#118378
The original problem needs another way to solve.
--- drivers/net/usb/ax88179_178a.c | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-)
drivers/net/usb/ax88179_178a.c +13 -13
@@ -1801,7 +1801,7 @@ static const struct driver_info ax88179_ .link_reset = ax88179_link_reset, .reset = ax88179_reset, .stop = ax88179_stop, - .flags = FLAG_ETHER | FLAG_FRAMING_AX | FLAG_SEND_ZLP, + .flags = FLAG_ETHER | FLAG_FRAMING_AX, .rx_fixup = ax88179_rx_fixup, .tx_fixup = ax88179_tx_fixup, };
@@ -1814,7 +1814,7 @@ static const struct driver_info ax88178a .link_reset = ax88179_link_reset, .reset = ax88179_reset, .stop = ax88179_stop, - .flags = FLAG_ETHER | FLAG_FRAMING_AX | FLAG_SEND_ZLP, + .flags = FLAG_ETHER | FLAG_FRAMING_AX, .rx_fixup = ax88179_rx_fixup, .tx_fixup = ax88179_tx_fixup, };
@@ -1827,7 +1827,7 @@ static const struct driver_info cypress_ .link_reset = ax88179_link_reset, .reset = ax88179_reset, .stop = ax88179_stop, - .flags = FLAG_ETHER | FLAG_FRAMING_AX | FLAG_SEND_ZLP, + .flags = FLAG_ETHER | FLAG_FRAMING_AX, .rx_fixup = ax88179_rx_fixup, .tx_fixup = ax88179_tx_fixup, };
@@ -1840,7 +1840,7 @@ static const struct driver_info dlink_du .link_reset = ax88179_link_reset, .reset = ax88179_reset, .stop = ax88179_stop, - .flags = FLAG_ETHER | FLAG_FRAMING_AX | FLAG_SEND_ZLP, + .flags = FLAG_ETHER | FLAG_FRAMING_AX, .rx_fixup = ax88179_rx_fixup, .tx_fixup = ax88179_tx_fixup, };
@@ -1853,7 +1853,7 @@ static const struct driver_info sitecom_ .link_reset = ax88179_link_reset, .reset = ax88179_reset, .stop = ax88179_stop, - .flags = FLAG_ETHER | FLAG_FRAMING_AX | FLAG_SEND_ZLP, + .flags = FLAG_ETHER | FLAG_FRAMING_AX, .rx_fixup = ax88179_rx_fixup, .tx_fixup = ax88179_tx_fixup, };
@@ -1866,7 +1866,7 @@ static const struct driver_info samsung_ .link_reset = ax88179_link_reset, .reset = ax88179_reset, .stop = ax88179_stop, - .flags = FLAG_ETHER | FLAG_FRAMING_AX | FLAG_SEND_ZLP, + .flags = FLAG_ETHER | FLAG_FRAMING_AX, .rx_fixup = ax88179_rx_fixup, .tx_fixup = ax88179_tx_fixup, };
@@ -1879,7 +1879,7 @@ static const struct driver_info lenovo_i .link_reset = ax88179_link_reset, .reset = ax88179_reset, .stop = ax88179_stop, - .flags = FLAG_ETHER | FLAG_FRAMING_AX | FLAG_SEND_ZLP, + .flags = FLAG_ETHER | FLAG_FRAMING_AX, .rx_fixup = ax88179_rx_fixup, .tx_fixup = ax88179_tx_fixup, };
@@ -1892,7 +1892,7 @@ static const struct driver_info belkin_i .link_reset = ax88179_link_reset, .reset = ax88179_reset, .stop = ax88179_stop, - .flags = FLAG_ETHER | FLAG_FRAMING_AX | FLAG_SEND_ZLP, + .flags = FLAG_ETHER | FLAG_FRAMING_AX, .rx_fixup = ax88179_rx_fixup, .tx_fixup = ax88179_tx_fixup, };
@@ -1905,7 +1905,7 @@ static const struct driver_info toshiba_ .link_reset = ax88179_link_reset, .reset = ax88179_reset, .stop = ax88179_stop, - .flags = FLAG_ETHER | FLAG_FRAMING_AX | FLAG_SEND_ZLP, + .flags = FLAG_ETHER | FLAG_FRAMING_AX, .rx_fixup = ax88179_rx_fixup, .tx_fixup = ax88179_tx_fixup, };
@@ -1918,7 +1918,7 @@ static const struct driver_info mct_info .link_reset = ax88179_link_reset, .reset = ax88179_reset, .stop = ax88179_stop, - .flags = FLAG_ETHER | FLAG_FRAMING_AX | FLAG_SEND_ZLP, + .flags = FLAG_ETHER | FLAG_FRAMING_AX, .rx_fixup = ax88179_rx_fixup, .tx_fixup = ax88179_tx_fixup, };
@@ -1931,7 +1931,7 @@ static const struct driver_info at_umc20 .link_reset = ax88179_link_reset, .reset = ax88179_reset, .stop = ax88179_stop, - .flags = FLAG_ETHER | FLAG_FRAMING_AX | FLAG_SEND_ZLP, + .flags = FLAG_ETHER | FLAG_FRAMING_AX, .rx_fixup = ax88179_rx_fixup, .tx_fixup = ax88179_tx_fixup, };
@@ -1944,7 +1944,7 @@ static const struct driver_info at_umc20 .link_reset = ax88179_link_reset, .reset = ax88179_reset, .stop = ax88179_stop, - .flags = FLAG_ETHER | FLAG_FRAMING_AX | FLAG_SEND_ZLP, + .flags = FLAG_ETHER | FLAG_FRAMING_AX, .rx_fixup = ax88179_rx_fixup, .tx_fixup = ax88179_tx_fixup, };
@@ -1957,7 +1957,7 @@ static const struct driver_info at_umc20 .link_reset = ax88179_link_reset, .reset = ax88179_reset, .stop = ax88179_stop, - .flags = FLAG_ETHER | FLAG_FRAMING_AX | FLAG_SEND_ZLP, + .flags = FLAG_ETHER | FLAG_FRAMING_AX, .rx_fixup = ax88179_rx_fixup, .tx_fixup = ax88179_tx_fixup, };
Greg Kroah-Hartman
maintainerPATCH 125/1095 ARM: dts: uniphier: Fix USB interrupts for PXs2 SoC
In reply to Greg Kroah-HartmanFrom: Kunihiko Hayashi <[email protected]>
commit 9b0dc7abb5cc43a2dbf90690c3c6011dcadc574d upstream.
An interrupt for USB device are shared with USB host. Set interrupt-names property to common "dwc_usb3" instead of "host" and "peripheral".
--- arch/arm/boot/dts/uniphier-pxs2.dtsi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
arch/arm/boot/dts/uniphier-pxs2.dtsi +4 -4
@@ -597,8 +597,8 @@ compatible = "socionext,uniphier-dwc3", "snps,dwc3"; status = "disabled"; reg = <0x65a00000 0xcd00>; - interrupt-names = "host", "peripheral"; - interrupts = <0 134 4>, <0 135 4>; + interrupt-names = "dwc_usb3"; + interrupts = <0 134 4>; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_usb0>, <&pinctrl_usb2>; clock-names = "ref", "bus_early", "suspend";
@@ -693,8 +693,8 @@ compatible = "socionext,uniphier-dwc3", "snps,dwc3"; status = "disabled"; reg = <0x65c00000 0xcd00>; - interrupt-names = "host", "peripheral"; - interrupts = <0 137 4>, <0 138 4>; + interrupt-names = "dwc_usb3"; + interrupts = <0 137 4>; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_usb1>, <&pinctrl_usb3>; clock-names = "ref", "bus_early", "suspend";
Greg Kroah-Hartman
maintainerPATCH 126/1095 arm64: dts: uniphier: Fix USB interrupts for PXs3 SoC
In reply to Greg Kroah-HartmanFrom: Kunihiko Hayashi <[email protected]>
commit fe17b91a7777df140d0f1433991da67ba658796c upstream.
An interrupt for USB device are shared with USB host. Set interrupt-names property to common "dwc_usb3" instead of "host" and "peripheral".
--- arch/arm64/boot/dts/socionext/uniphier-pxs3.dtsi | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
arch/arm64/boot/dts/socionext/uniphier-pxs3.dtsi +4 -4
@@ -599,8 +599,8 @@ compatible = "socionext,uniphier-dwc3", "snps,dwc3"; status = "disabled"; reg = <0x65a00000 0xcd00>; - interrupt-names = "host", "peripheral"; - interrupts = <0 134 4>, <0 135 4>; + interrupt-names = "dwc_usb3"; + interrupts = <0 134 4>; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_usb0>, <&pinctrl_usb2>; clock-names = "ref", "bus_early", "suspend";
@@ -701,8 +701,8 @@ compatible = "socionext,uniphier-dwc3", "snps,dwc3"; status = "disabled"; reg = <0x65c00000 0xcd00>; - interrupt-names = "host", "peripheral"; - interrupts = <0 137 4>, <0 138 4>; + interrupt-names = "dwc_usb3"; + interrupts = <0 137 4>; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_usb1>, <&pinctrl_usb3>; clock-names = "ref", "bus_early", "suspend";
Greg Kroah-Hartman
maintainerPATCH 127/1095 USB: gadget: Fix use-after-free Read in usb_udc_uevent()
In reply to Greg Kroah-HartmanFrom: Alan Stern <[email protected]>
commit 2191c00855b03aa59c20e698be713d952d51fc18 upstream.
The syzbot fuzzer found a race between uevent callbacks and gadget driver unregistration that can cause a use-after-free bug:
---------------------------------------------------------------
BUG: KASAN: use-after-free in usb_udc_uevent+0x11f/0x130 drivers/usb/gadget/udc/core.c:1732 Read of size 8 at addr ffff888078ce2050 by task udevd/2968 CPU: 1 PID: 2968 Comm: udevd Not tainted 5.19.0-rc4-next-20220628-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 06/29/2022 Call Trace: <TASK> __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xcd/0x134 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:317 [inline] print_report.cold+0x2ba/0x719 mm/kasan/report.c:433 kasan_report+0xbe/0x1f0 mm/kasan/report.c:495 usb_udc_uevent+0x11f/0x130 drivers/usb/gadget/udc/core.c:1732 dev_uevent+0x290/0x770 drivers/base/core.c:2424 ---------------------------------------------------------------
The bug occurs because usb_udc_uevent() dereferences udc->driver but does so without acquiring the udc_lock mutex, which protects this field. If the gadget driver is unbound from the udc concurrently with uevent processing, the driver structure may be accessed after it has been deallocated.
To prevent the race, we make sure that the routine holds the mutex around the racing accesses.
--- drivers/usb/gadget/udc/core.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)
drivers/usb/gadget/udc/core.c +6 -5
@@ -1745,13 +1745,14 @@ static int usb_udc_uevent(struct devicereturn ret; } -if (udc->driver) { +mutex_lock (&udc_lock); +if (udc->driver) ret =add_uevent_var (env,"USB_UDC_DRIVER=%s" , udc->driver->function); -if (ret) { -dev_err (dev,"failed to add uevent USB_UDC_DRIVER\n" ); -return ret; - } +mutex_unlock (&udc_lock); +if (ret) { +dev_err (dev,"failed to add uevent USB_UDC_DRIVER\n" ); +return ret; }return 0 ;
Greg Kroah-Hartman
maintainerPATCH 128/1095 usb: dwc3: gadget: refactor dwc3_repare_one_trb
In reply to Greg Kroah-HartmanFrom: Michael Grzeschik <[email protected]>
commit 23385cec5f354794dadced7f28c31da7ae3eb54c upstream.
The function __dwc3_prepare_one_trb has many parameters. Since it is only used in dwc3_prepare_one_trb there is no point in keeping the function. We merge both functions and get rid of the big list of parameters.
--- drivers/usb/dwc3/gadget.c | 92 ++++++++++++++++++++-------------------------- 1 file changed, 40 insertions(+), 52 deletions(-)
drivers/usb/dwc3/gadget.c +40 -52
@@ -1181,17 +1181,49 @@ static u32 dwc3_calc_trbs_left(struct dwreturn trbs_left; } -static void __dwc3_prepare_one_trb (struct dwc3_ep *dep,struct dwc3_trb *trb, -dma_addr_t dma,unsigned int length,unsigned int chain, -unsigned int node,unsigned int stream_id, -unsigned int short_not_ok,unsigned int no_interrupt, -unsigned int is_last,bool must_interrupt) +/** +* dwc3_prepare_one_trb - setup one TRB from one request +* @dep: endpoint for which this request is prepared +* @req: dwc3_request pointer +* @trb_length: buffer size of the TRB +* @chain: should this TRB be chained to the next? +* @node: only for isochronous endpoints. First TRB needs different type. +* @use_bounce_buffer: set to use bounce buffer +* @must_interrupt: set to interrupt on TRB completion +*/ +static void dwc3_prepare_one_trb (struct dwc3_ep *dep, +struct dwc3_request *req,unsigned int trb_length, +unsigned int chain,unsigned int node,bool use_bounce_buffer, +bool must_interrupt) { +struct dwc3_trb *trb; +dma_addr_t dma; +unsigned int stream_id = req->request.stream_id; +unsigned int short_not_ok = req->request.short_not_ok; +unsigned int no_interrupt = req->request.no_interrupt; +unsigned int is_last = req->request.is_last;struct dwc3 *dwc = dep->dwc;struct usb_gadget *gadget = dwc->gadget;enum usb_device_speed speed = gadget->speed; - trb->size =DWC3_TRB_SIZE_LENGTH (length); +if (use_bounce_buffer) + dma = dep->dwc->bounce_addr; +else if (req->request.num_sgs >0 ) + dma =sg_dma_address (req->start_sg); +else + dma = req->request.dma; + + trb = &dep->trb_pool[dep->trb_enqueue]; + +if (!req->trb) { +dwc3_gadget_move_started_request (req); + req->trb = trb; + req->trb_dma =dwc3_trb_dma_offset (dep, trb); + } + + req->num_trbs++; + + trb->size =DWC3_TRB_SIZE_LENGTH (trb_length); trb->bpl =lower_32_bits (dma); trb->bph =upper_32_bits (dma);
@@ -1231,10 +1263,10 @@ static void __dwc3_prepare_one_trb(strucunsigned int mult =2 ;unsigned int maxp =usb_endpoint_maxp (ep->desc); -if (length <= (2 * maxp)) +if (trb_length <= (2 * maxp)) mult--; -if (length <= maxp) +if (trb_length <= maxp) mult--; trb->size |=DWC3_TRB_SIZE_PCM1 (mult);
@@ -1308,50 +1340,6 @@ static void __dwc3_prepare_one_trb(structrace_dwc3_prepare_trb (dep, trb); } -/** -* dwc3_prepare_one_trb - setup one TRB from one request -* @dep: endpoint for which this request is prepared -* @req: dwc3_request pointer -* @trb_length: buffer size of the TRB -* @chain: should this TRB be chained to the next? -* @node: only for isochronous endpoints. First TRB needs different type. -* @use_bounce_buffer: set to use bounce buffer -* @must_interrupt: set to interrupt on TRB completion -*/ -static void dwc3_prepare_one_trb (struct dwc3_ep *dep, -struct dwc3_request *req,unsigned int trb_length, -unsigned int chain,unsigned int node,bool use_bounce_buffer, -bool must_interrupt) -{ -struct dwc3_trb *trb; -dma_addr_t dma; -unsigned int stream_id = req->request.stream_id; -unsigned int short_not_ok = req->request.short_not_ok; -unsigned int no_interrupt = req->request.no_interrupt; -unsigned int is_last = req->request.is_last; - -if (use_bounce_buffer) - dma = dep->dwc->bounce_addr; -else if (req->request.num_sgs >0 ) - dma =sg_dma_address (req->start_sg); -else - dma = req->request.dma; - - trb = &dep->trb_pool[dep->trb_enqueue]; - -if (!req->trb) { -dwc3_gadget_move_started_request (req); - req->trb = trb; - req->trb_dma =dwc3_trb_dma_offset (dep, trb); - } - - req->num_trbs++; - -__dwc3_prepare_one_trb (dep, trb, dma, trb_length, chain, node, - stream_id, short_not_ok, no_interrupt, is_last, - must_interrupt); -} -static bool dwc3_needs_extra_trb (struct dwc3_ep *dep,struct dwc3_request *req) {unsigned int maxp =usb_endpoint_maxp (dep->endpoint.desc);
Greg Kroah-Hartman
maintainerPATCH 129/1095 usb: dwc3: gadget: fix high speed multiplier setting
In reply to Greg Kroah-HartmanFrom: Michael Grzeschik <[email protected]>
commit 8affe37c525d800a2628c4ecfaed13b77dc5634a upstream.
For High-Speed Transfers the prepare_one_trb function is calculating the multiplier setting for the trb based on the length parameter of the trb currently prepared. This assumption is wrong. For trbs with a sg list, the length of the actual request has to be taken instead.
--- drivers/usb/dwc3/gadget.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/usb/dwc3/gadget.c +2 -2
@@ -1263,10 +1263,10 @@ static void dwc3_prepare_one_trb(structunsigned int mult =2 ;unsigned int maxp =usb_endpoint_maxp (ep->desc); -if (trb_length <= (2 * maxp)) +if (req->request.length <= (2 * maxp)) mult--; -if (trb_length <= maxp) +if (req->request.length <= maxp) mult--; trb->size |=DWC3_TRB_SIZE_PCM1 (mult);
Greg Kroah-Hartman
maintainerPATCH 130/1095 netfilter: nf_tables: do not allow SET_ID to refer to another table
In reply to Greg Kroah-HartmanFrom: Thadeu Lima de Souza Cascardo <[email protected]>
commit 470ee20e069a6d05ae549f7d0ef2bdbcee6a81b2 upstream.
When doing lookups for sets on the same batch by using its ID, a set from a different table can be used.
Then, when the table is removed, a reference to the set may be kept after the set is freed, leading to a potential use-after-free.
When looking for sets by ID, use the table that was used for the lookup by name, and only return sets belonging to that same table.
This fixes CVE-2022-2586, also reported as ZDI-CAN-17470.
--- net/netfilter/nf_tables_api.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
net/netfilter/nf_tables_api.c +3 -1
@@ -3840,6 +3840,7 @@ static struct nft_set *nft_set_lookup_by }static struct nft_set *nft_set_lookup_byid (const struct net *net, +const struct nft_table *table,const struct nlattr *nla,u8 genmask) {struct nftables_pernet *nft_net =nft_pernet (net);
@@ -3851,6 +3852,7 @@ static struct nft_set *nft_set_lookup_bystruct nft_set *set =nft_trans_set (trans);if (id ==nft_trans_set_id (trans) && + set->table == table &&nft_active_genmask (set, genmask))return set; }
@@ -3871,7 +3873,7 @@ struct nft_set *nft_set_lookup_global(coif (!nla_set_id)return set; - set =nft_set_lookup_byid (net, nla_set_id, genmask); + set =nft_set_lookup_byid (net, table, nla_set_id, genmask); }return set; }
Greg Kroah-Hartman
maintainerPATCH 131/1095 netfilter: nf_tables: do not allow CHAIN_ID to refer to another table
In reply to Greg Kroah-HartmanFrom: Thadeu Lima de Souza Cascardo <[email protected]>
commit 95f466d22364a33d183509629d0879885b4f547e upstream.
When doing lookups for chains on the same batch by using its ID, a chain from a different table can be used. If a rule is added to a table but refers to a chain in a different table, it will be linked to the chain in table2, but would have expressions referring to objects in table1.
Then, when table1 is removed, the rule will not be removed as its linked to a chain in table2. When expressions in the rule are processed or removed, that will lead to a use-after-free.
When looking for chains by ID, use the table that was used for the lookup by name, and only return chains belonging to that same table.
--- net/netfilter/nf_tables_api.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
net/netfilter/nf_tables_api.c +4 -2
@@ -2472,6 +2472,7 @@ err: }static struct nft_chain *nft_chain_lookup_byid (const struct net *net, +const struct nft_table *table,const struct nlattr *nla) {struct nftables_pernet *nft_net =nft_pernet (net);
@@ -2482,6 +2483,7 @@ static struct nft_chain *nft_chain_lookustruct nft_chain *chain = trans->ctx.chain;if (trans->msg_type ==NFT_MSG_NEWCHAIN && + chain->table == table && id ==nft_trans_chain_id (trans))return chain; }
@@ -3415,7 +3417,7 @@ static int nf_tables_newrule(struct sk_breturn -EOPNOTSUPP ; }else if (nla[NFTA_RULE_CHAIN_ID ]) { - chain =nft_chain_lookup_byid (net, nla[NFTA_RULE_CHAIN_ID ]); + chain =nft_chain_lookup_byid (net, table, nla[NFTA_RULE_CHAIN_ID ]);if (IS_ERR (chain)) {NL_SET_BAD_ATTR (extack, nla[NFTA_RULE_CHAIN_ID ]);return PTR_ERR (chain);
@@ -9597,7 +9599,7 @@ static int nft_verdict_init(const struct tb[NFTA_VERDICT_CHAIN ], genmask); }else if (tb[NFTA_VERDICT_CHAIN_ID ]) { - chain =nft_chain_lookup_byid (ctx->net, + chain =nft_chain_lookup_byid (ctx->net, ctx->table, tb[NFTA_VERDICT_CHAIN_ID ]);if (IS_ERR (chain))return PTR_ERR (chain);
Greg Kroah-Hartman
maintainerPATCH 132/1095 netfilter: nf_tables: do not allow RULE_ID to refer to another chain
In reply to Greg Kroah-HartmanFrom: Thadeu Lima de Souza Cascardo <[email protected]>
commit 36d5b2913219ac853908b0f1c664345e04313856 upstream.
When doing lookups for rules on the same batch by using its ID, a rule from a different chain can be used. If a rule is added to a chain but tries to be positioned next to a rule from a different chain, it will be linked to chain2, but the use counter on chain1 would be the one to be incremented.
When looking for rules by ID, use the chain that was used for the lookup by name. The chain used in the context copied to the transaction needs to match that same chain. That way, struct nft_rule does not need to get enlarged with another member.
--- net/netfilter/nf_tables_api.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
net/netfilter/nf_tables_api.c +5 -2
@@ -3371,6 +3371,7 @@ static int nft_table_validate(struct net }static struct nft_rule *nft_rule_lookup_byid (const struct net *net, +const struct nft_chain *chain,const struct nlattr *nla);#define NFT_RULE_MAXEXPRS 128
@@ -3459,7 +3460,7 @@ static int nf_tables_newrule(struct sk_breturn PTR_ERR (old_rule); } }else if (nla[NFTA_RULE_POSITION_ID ]) { - old_rule =nft_rule_lookup_byid (net, nla[NFTA_RULE_POSITION_ID ]); + old_rule =nft_rule_lookup_byid (net, chain, nla[NFTA_RULE_POSITION_ID ]);if (IS_ERR (old_rule)) {NL_SET_BAD_ATTR (extack, nla[NFTA_RULE_POSITION_ID ]);return PTR_ERR (old_rule);
@@ -3604,6 +3605,7 @@ err_release_expr: }static struct nft_rule *nft_rule_lookup_byid (const struct net *net, +const struct nft_chain *chain,const struct nlattr *nla) {struct nftables_pernet *nft_net =nft_pernet (net);
@@ -3614,6 +3616,7 @@ static struct nft_rule *nft_rule_lookup_struct nft_rule *rule =nft_trans_rule (trans);if (trans->msg_type ==NFT_MSG_NEWRULE && + trans->ctx.chain == chain && id ==nft_trans_rule_id (trans))return rule; }
@@ -3663,7 +3666,7 @@ static int nf_tables_delrule(struct sk_b err =nft_delrule (&ctx, rule); }else if (nla[NFTA_RULE_ID ]) { - rule =nft_rule_lookup_byid (net, nla[NFTA_RULE_ID ]); + rule =nft_rule_lookup_byid (net, chain, nla[NFTA_RULE_ID ]);if (IS_ERR (rule)) {NL_SET_BAD_ATTR (extack, nla[NFTA_RULE_ID ]);return PTR_ERR (rule);
Greg Kroah-Hartman
maintainerPATCH 133/1095 netfilter: nf_tables: fix null deref due to zeroed list head
In reply to Greg Kroah-HartmanFrom: Florian Westphal <[email protected]>
commit 580077855a40741cf511766129702d97ff02f4d9 upstream.
In nf_tables_updtable, if nf_tables_table_enable returns an error, nft_trans_destroy is called to free the transaction object.
nft_trans_destroy() calls list_del(), but the transaction was never placed on a list -- the list head is all zeroes, this results in a null dereference:
BUG: KASAN: null-ptr-deref in nft_trans_destroy+0x26/0x59 Call Trace: nft_trans_destroy+0x26/0x59 nf_tables_newtable+0x4bc/0x9bc [..]
Its sane to assume that nft_trans_destroy() can be called on the transaction object returned by nft_trans_alloc(), so make sure the list head is initialised.
--- net/netfilter/nf_tables_api.c | 1 + 1 file changed, 1 insertion(+)
net/netfilter/nf_tables_api.c +1 -0
@@ -153,6 +153,7 @@ static struct nft_trans *nft_trans_allocif (trans ==NULL )return NULL ; +INIT_LIST_HEAD (&trans->list); trans->msg_type = msg_type; trans->ctx = *ctx;
Greg Kroah-Hartman
maintainerPATCH 134/1095 epoll: autoremove wakers even more aggressively
In reply to Greg Kroah-HartmanFrom: Benjamin Segall <[email protected]>
commit a16ceb13961068f7209e34d7984f8e42d2c06159 upstream.
If a process is killed or otherwise exits while having active network connections and many threads waiting on epoll_wait, the threads will all be woken immediately, but not removed from ep->wq. Then when network traffic scans ep->wq in wake_up, every wakeup attempt will fail, and will not remove the entries from the list.
This means that the cost of the wakeup attempt is far higher than usual, does not decrease, and this also competes with the dying threads trying to actually make progress and remove themselves from the wq.
Handle this by removing visited epoll wq entries unconditionally, rather than only when the wakeup succeeds - the structure of ep_poll means that the only potential loss is the timed_out->eavail heuristic, which now can race and result in a redundant ep_send_events attempt. (But only when incoming data and a timeout actually race, not on every timeout)
Shakeel added:
: We are seeing this issue in production with real workloads and it has : caused hard lockups. Particularly network heavy workloads with a lot : of threads in epoll_wait() can easily trigger this issue if they get : killed (oom-killed in our case).
--- fs/eventpoll.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+)
fs/eventpoll.c +22 -0
@@ -1747,6 +1747,21 @@ static struct timespec64 *ep_timeout_to_return to; } +/* +* autoremove_wake_function, but remove even on failure to wake up, because we +* know that default_wake_function/ttwu will only fail if the thread is already +* woken, and in that case the ep_poll loop will remove the entry anyways, not +* try to reuse it. +*/ +static int ep_autoremove_wake_function (struct wait_queue_entry *wq_entry, +unsigned int mode,int sync,void *key) +{ +int ret =default_wake_function (wq_entry, mode, sync, key); + +list_del_init (&wq_entry->entry); +return ret; +} +/** * ep_poll - Retrieves ready events, and delivers them to the caller-supplied * event buffer.
@@ -1828,8 +1843,15 @@ static int ep_poll(struct eventpoll *ep,* normal wakeup path no need to call __remove_wait_queue() * explicitly, thus ep->lock is not taken, which halts the * event delivery. +* +* In fact, we now use an even more aggressive function that +* unconditionally removes, because we don't reuse the wait +* entry between loop iterations. This lets us also avoid the +* performance issue if a process is killed, causing all of its +* threads to wake up without being removed normally. */ init_wait (&wait); + wait.func = ep_autoremove_wake_function;write_lock_irq (&ep->lock);/*
Greg Kroah-Hartman
maintainerPATCH 135/1095 x86: Handle idle=nomwait cmdline properly for x86_idle
In reply to Greg Kroah-HartmanFrom: Wyes Karny <[email protected]>
[ Upstream commit 8bcedb4ce04750e1ccc9a6b6433387f6a9166a56 ]
When kernel is booted with idle=nomwait do not use MWAIT as the default idle state.
If the user boots the kernel with idle=nomwait, it is a clear direction to not use mwait as the default idle state. However, the current code does not take this into consideration while selecting the default idle state on x86.
Fix it by checking for the idle=nomwait boot option in prefer_mwait_c1_over_halt().
Also update the documentation around idle=nomwait appropriately.
[ dhansen: tweak commit message ]
--- Documentation/admin-guide/pm/cpuidle.rst | 15 +++++++++------ arch/x86/kernel/process.c | 9 ++++++--- 2 files changed, 15 insertions(+), 9 deletions(-)
Documentation/admin-guide/pm/cpuidle.rst +9 -6
@@ -612,8 +612,8 @@ the ``menu`` governor to be used on the systems that use the ``ladder`` governor by default this way, for example. The other kernel command line parameters controlling CPU idle time management -described below are only relevant for the *x86* architecture and some of -them affect Intel processors only. +described below are only relevant for the *x86* architecture and references +to ``intel_idle`` affect Intel processors only. The *x86* architecture support code recognizes three kernel command line options related to CPU idle time management: ``idle=poll``, ``idle=halt``,
@@ -635,10 +635,13 @@ idle, so it very well may hurt single-thread computations performance as well as energy-efficiency. Thus using it for performance reasons may not be a good idea at all.] -The ``idle=nomwait`` option disables the ``intel_idle`` driver and causes -``acpi_idle`` to be used (as long as all of the information needed by it is -there in the system's ACPI tables), but it is not allowed to use the -``MWAIT`` instruction of the CPUs to ask the hardware to enter idle states. +The ``idle=nomwait`` option prevents the use of ``MWAIT`` instruction of +the CPU to enter idle states. When this option is used, the ``acpi_idle`` +driver will use the ``HLT`` instruction instead of ``MWAIT``. On systems +running Intel processors, this option disables the ``intel_idle`` driver +and forces the use of the ``acpi_idle`` driver instead. Note that in either +case, ``acpi_idle`` driver will function only if all the information needed +by it is in the system's ACPI tables. In addition to the architecture-level kernel command line options affecting CPU idle time management, there are parameters affecting individual ``CPUIdle``
arch/x86/kernel/process.c +6 -3
@@ -824,6 +824,10 @@ static void amd_e400_idle(void)*/ static int prefer_mwait_c1_over_halt (const struct cpuinfo_x86 *c) { +/* User has disallowed the use of MWAIT. Fallback to HALT */ +if (boot_option_idle_override ==IDLE_NOMWAIT ) +return 0 ; +if (c->x86_vendor !=X86_VENDOR_INTEL )return 0 ;
@@ -932,9 +936,8 @@ static int __init idle_setup(char *str) }else if (!strcmp (str,"nomwait" )) {/* * If the boot option of "idle=nomwait" is added, -* it means that mwait will be disabled for CPU C2/C3 -* states. In such case it won't touch the variable -* of boot_option_idle_override. +* it means that mwait will be disabled for CPU C1/C2/C3 +* states. */ boot_option_idle_override =IDLE_NOMWAIT ; }else
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 136/1095 arch: make TRACE_IRQFLAGS_NMI_SUPPORT generic
In reply to Greg Kroah-HartmanFrom: Mark Rutland <[email protected]>
[ Upstream commit 4510bffb4d0246cdcc1f14c7367c026b807a862d ]
On most architectures, IRQ flag tracing is disabled in NMI context, and architectures need to define and select TRACE_IRQFLAGS_NMI_SUPPORT in order to enable this.
Commit:
859d069ee1ddd878 ("lockdep: Prepare for NMI IRQ state tracking")
Permitted IRQ flag tracing in NMI context, allowing lockdep to work in NMI context where an architecture had suitable entry logic. At the time, most architectures did not have such suitable entry logic, and this broke lockdep on such architectures. Thus, this was partially disabled in commit:
ed00495333ccc80f ("locking/lockdep: Fix TRACE_IRQFLAGS vs. NMIs")
... with architectures needing to select TRACE_IRQFLAGS_NMI_SUPPORT to enable IRQ flag tracing in NMI context.
Currently TRACE_IRQFLAGS_NMI_SUPPORT is defined under arch/x86/Kconfig.debug. Move it to arch/Kconfig so architectures can select it without having to provide their own definition.
Since the regular TRACE_IRQFLAGS_SUPPORT is selected by arch/x86/Kconfig, the select of TRACE_IRQFLAGS_NMI_SUPPORT is moved there too.
There should be no functional change as a result of this patch.
--- arch/Kconfig | 3 +++ arch/x86/Kconfig | 1 + arch/x86/Kconfig.debug | 3 --- 3 files changed, 4 insertions(+), 3 deletions(-)
arch/Kconfig +3 -0
@@ -214,6 +214,9 @@ config HAVE_FUNCTION_DESCRIPTORS config TRACE_IRQFLAGS_SUPPORT bool +config TRACE_IRQFLAGS_NMI_SUPPORT + bool + # # An arch should select this if it provides all these things: #
arch/x86/Kconfig +1 -0
@@ -272,6 +272,7 @@ config X86 select SYSCTL_EXCEPTION_TRACE select THREAD_INFO_IN_TASK select TRACE_IRQFLAGS_SUPPORT + select TRACE_IRQFLAGS_NMI_SUPPORT select USER_STACKTRACE_SUPPORT select VIRT_TO_BUS select HAVE_ARCH_KCSAN if X86_64
arch/x86/Kconfig.debug +0 -3
@@ -1,8 +1,5 @@ # SPDX-License-Identifier: GPL-2.0 -config TRACE_IRQFLAGS_NMI_SUPPORT - def_bool y - config EARLY_PRINTK_USB bool
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 137/1095 arm64: Do not forget syscall when starting a new thread.
In reply to Greg Kroah-HartmanFrom: Francis Laniel <[email protected]>
[ Upstream commit de6921856f99c11d3986c6702d851e1328d4f7f6 ]
Enable tracing of the execve*() system calls with the syscalls:sys_exit_execve tracepoint by removing the call to forget_syscall() when starting a new thread and preserving the value of regs->syscallno across exec.
--- arch/arm64/include/asm/processor.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
arch/arm64/include/asm/processor.h +2 -1
@@ -250,8 +250,9 @@ void tls_preserve_current_state(void);static inline void start_thread_common (struct pt_regs *regs,unsigned long pc) { +s32 previous_syscall = regs->syscallno;memset (regs,0 ,sizeof (*regs)); -forget_syscall (regs); + regs->syscallno = previous_syscall; regs->pc = pc;if (system_uses_irq_prio_masking ())
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 138/1095 arm64: fix oops in concurrently setting insn_emulation sysctls
In reply to Greg Kroah-HartmanFrom: haibinzhang (张海斌) <[email protected]>
[ Upstream commit af483947d472eccb79e42059276c4deed76f99a6 ]
emulation_proc_handler() changes table->data for proc_dointvec_minmax and can generate the following Oops if called concurrently with itself:
| Unable to handle kernel NULL pointer dereference at virtual address 0000000000000010 | Internal error: Oops: 96000006 [#1] SMP | Call trace: | update_insn_emulation_mode+0xc0/0x148 | emulation_proc_handler+0x64/0xb8 | proc_sys_call_handler+0x9c/0xf8 | proc_sys_write+0x18/0x20 | __vfs_write+0x20/0x48 | vfs_write+0xe4/0x1d0 | ksys_write+0x70/0xf8 | __arm64_sys_write+0x20/0x28 | el0_svc_common.constprop.0+0x7c/0x1c0 | el0_svc_handler+0x2c/0xa0 | el0_svc+0x8/0x200
To fix this issue, keep the table->data as &insn->current_mode and use container_of() to retrieve the insn pointer. Another mutex is used to protect against the current_mode update but not for retrieving insn_emulation as table->data is no longer changing.
--- arch/arm64/kernel/armv8_deprecated.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
arch/arm64/kernel/armv8_deprecated.c +5 -4
@@ -59,6 +59,7 @@ struct insn_emulation {static LIST_HEAD (insn_emulation);static int nr_insn_emulated__initdata ;static DEFINE_RAW_SPINLOCK (insn_emulation_lock); +static DEFINE_MUTEX (insn_emulation_mutex);static void register_emulation_hooks (struct insn_emulation_ops *ops) {
@@ -207,10 +208,10 @@ static int emulation_proc_handler(struct ctl_table *table, int write, loff_t *ppos) {int ret =0 ; -struct insn_emulation *insn = (struct insn_emulation *) table->data; + struct insn_emulation *insn = container_of(table->data, struct insn_emulation, current_mode);enum insn_emulation_mode prev_mode = insn->current_mode; - table->data = &insn->current_mode; +mutex_lock (&insn_emulation_mutex); ret =proc_dointvec_minmax (table, write, buffer, lenp, ppos);if (ret || !write || prev_mode == insn->current_mode)
@@ -223,7 +224,7 @@ static int emulation_proc_handler(struct ctl_table *table, int write,update_insn_emulation_mode (insn,INSN_UNDEF ); } ret: - table->data = insn; +mutex_unlock (&insn_emulation_mutex);return ret; }
@@ -247,7 +248,7 @@ static void __init register_insn_emulation_sysctl(void) sysctl->maxlen =sizeof (int ); sysctl->procname = insn->ops->name; - sysctl->data = insn; + sysctl->data = &insn->current_mode; sysctl->extra1 = &insn->min; sysctl->extra2 = &insn->max; sysctl->proc_handler = emulation_proc_handler;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 139/1095 arm64: kasan: Revert "arm64: mte: reset the page tag in page->flags"
In reply to Greg Kroah-HartmanFrom: Catalin Marinas <[email protected]>
[ Upstream commit 20794545c14692094a882d2221c251c4573e6adf ]
This reverts commit e5b8d9218951e59df986f627ec93569a0d22149b.
Pages mapped in user-space with PROT_MTE have the allocation tags either zeroed or copied/restored to some user values. In order for the kernel to access such pages via page_address(), resetting the tag in page->flags was necessary. This tag resetting was deferred to set_pte_at() -> mte_sync_page_tags() but it can race with another CPU reading the flags (via page_to_virt()):
P0 (mte_sync_page_tags): P1 (memcpy from virt_to_page):
Rflags!=0xff
Wflags=0xff
DMB (doesn't help)
Wtags=0
Rtags=0 // fault
Since now the post_alloc_hook() function resets the page->flags tag when unpoisoning is skipped for user pages (including the __GFP_ZEROTAGS case), revert the arm64 commit calling page_kasan_tag_reset().
--- arch/arm64/kernel/hibernate.c | 5 ----- arch/arm64/kernel/mte.c | 9 --------- arch/arm64/mm/copypage.c | 9 --------- arch/arm64/mm/mteswap.c | 9 --------- 4 files changed, 32 deletions(-)
arch/arm64/kernel/hibernate.c +0 -5
@@ -300,11 +300,6 @@ static void swsusp_mte_restore_tags(void)unsigned long pfn = xa_state.xa_index;struct page *page =pfn_to_online_page (pfn); -/* -* It is not required to invoke page_kasan_tag_reset(page) -* at this point since the tags stored in page->flags are -* already restored. -*/ mte_restore_page_tags (page_address (page), tags);mte_free_tag_storage (tags);
arch/arm64/kernel/mte.c +0 -9
@@ -47,15 +47,6 @@ static void mte_sync_page_tags(struct page *page, pte_t old_pte,if (!pte_is_tagged)return ; -page_kasan_tag_reset (page); -/* -* We need smp_wmb() in between setting the flags and clearing the -* tags because if another thread reads page->flags and builds a -* tagged address out of it, there is an actual dependency to the -* memory access, but on the current thread we do not guarantee that -* the new page->flags are visible before the tags were updated. -*/ -smp_wmb ();mte_clear_page_tags (page_address (page)); }
arch/arm64/mm/copypage.c +0 -9
@@ -23,15 +23,6 @@ void copy_highpage(struct page *to, struct page *from)if (system_supports_mte () &&test_bit (PG_mte_tagged, &from->flags)) {set_bit (PG_mte_tagged, &to->flags); -page_kasan_tag_reset (to); -/* -* We need smp_wmb() in between setting the flags and clearing the -* tags because if another thread reads page->flags and builds a -* tagged address out of it, there is an actual dependency to the -* memory access, but on the current thread we do not guarantee that -* the new page->flags are visible before the tags were updated. -*/ -smp_wmb ();mte_copy_page_tags (kto, kfrom); } }
arch/arm64/mm/mteswap.c +0 -9
@@ -53,15 +53,6 @@ bool mte_restore_tags(swp_entry_t entry, struct page *page)if (!tags)return false; -page_kasan_tag_reset (page); -/* -* We need smp_wmb() in between setting the flags and clearing the -* tags because if another thread reads page->flags and builds a -* tagged address out of it, there is an actual dependency to the -* memory access, but on the current thread we do not guarantee that -* the new page->flags are visible before the tags were updated. -*/ -smp_wmb ();mte_restore_page_tags (page_address (page), tags);return true;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 140/1095 arm64: errata: Remove AES hwcap for COMPAT tasks
In reply to Greg Kroah-HartmanFrom: James Morse <[email protected]>
[ Upstream commit 44b3834b2eed595af07021b1c64e6f9bc396398b ]
Cortex-A57 and Cortex-A72 have an erratum where an interrupt that occurs between a pair of AES instructions in aarch32 mode may corrupt the ELR. The task will subsequently produce the wrong AES result.
The AES instructions are part of the cryptographic extensions, which are optional. User-space software will detect the support for these instructions from the hwcaps. If the platform doesn't support these instructions a software implementation should be used.
Remove the hwcap bits on affected parts to indicate user-space should not use the AES instructions.
--- Documentation/arm64/silicon-errata.rst | 4 ++++ arch/arm64/Kconfig | 16 ++++++++++++++++ arch/arm64/kernel/cpu_errata.c | 16 ++++++++++++++++ arch/arm64/kernel/cpufeature.c | 14 +++++++++++++- arch/arm64/tools/cpucaps | 1 + 5 files changed, 50 insertions(+), 1 deletion(-)
Documentation/arm64/silicon-errata.rst +4 -0
@@ -82,10 +82,14 @@ stable kernels. +----------------+-----------------+-----------------+-----------------------------+ | ARM | Cortex-A57 | #1319537 | ARM64_ERRATUM_1319367 | +----------------+-----------------+-----------------+-----------------------------+ +| ARM | Cortex-A57 | #1742098 | ARM64_ERRATUM_1742098 | ++----------------+-----------------+-----------------+-----------------------------+ | ARM | Cortex-A72 | #853709 | N/A | +----------------+-----------------+-----------------+-----------------------------+ | ARM | Cortex-A72 | #1319367 | ARM64_ERRATUM_1319367 | +----------------+-----------------+-----------------+-----------------------------+ +| ARM | Cortex-A72 | #1655431 | ARM64_ERRATUM_1742098 | ++----------------+-----------------+-----------------+-----------------------------+ | ARM | Cortex-A73 | #858921 | ARM64_ERRATUM_858921 | +----------------+-----------------+-----------------+-----------------------------+ | ARM | Cortex-A76 | #1188873,1418040| ARM64_ERRATUM_1418040 |
arch/arm64/Kconfig +16 -0
@@ -500,6 +500,22 @@ config ARM64_ERRATUM_834220 If unsure, say Y. +config ARM64_ERRATUM_1742098 + bool "Cortex-A57/A72: 1742098: ELR recorded incorrectly on interrupt taken between cryptographic instructions in a sequence" + depends on COMPAT + default y + help + This option removes the AES hwcap for aarch32 user-space to + workaround erratum 1742098 on Cortex-A57 and Cortex-A72. + + Affected parts may corrupt the AES state if an interrupt is + taken between a pair of AES instructions. These instructions + are only present if the cryptography extensions are present. + All software should have a fallback implementation for CPUs + that don't implement the cryptography extensions. + + If unsure, say Y. + config ARM64_ERRATUM_845719 bool "Cortex-A53: 845719: a load might read incorrect data" depends on COMPAT
arch/arm64/kernel/cpu_errata.c +16 -0
@@ -395,6 +395,14 @@ static struct midr_range trbe_write_out_of_range_cpus[] = { };#endif /* CONFIG_ARM64_WORKAROUND_TRBE_WRITE_OUT_OF_RANGE */ +#ifdef CONFIG_ARM64_ERRATUM_1742098 +static struct midr_range broken_aarch32_aes[] = { +MIDR_RANGE (MIDR_CORTEX_A57 ,0 ,1 ,0xf ,0xf ), +MIDR_ALL_VERSIONS (MIDR_CORTEX_A72 ), + {}, +}; +#endif /* CONFIG_ARM64_WORKAROUND_TRBE_WRITE_OUT_OF_RANGE */ + const struct arm64_cpu_capabilities arm64_errata[] = {#ifdef CONFIG_ARM64_WORKAROUND_CLEAN_CACHE {
@@ -657,6 +665,14 @@ const struct arm64_cpu_capabilities arm64_errata[] = {/* Cortex-A510 r0p0 - r0p1 */ ERRATA_MIDR_REV_RANGE(MIDR_CORTEX_A510, 0, 0, 1) }, +#endif +#ifdef CONFIG_ARM64_ERRATUM_1742098 + { + .desc = "ARM erratum 1742098", + .capability = ARM64_WORKAROUND_1742098, + CAP_MIDR_RANGE_LIST(broken_aarch32_aes), + .type = ARM64_CPUCAP_LOCAL_CPU_ERRATUM, + }, #endif { }
arch/arm64/kernel/cpufeature.c +13 -1
@@ -79,6 +79,7 @@#include <asm/cpufeature.h> #include <asm/cpu_ops.h> #include <asm/fpsimd.h> +#include <asm/hwcap.h> #include <asm/insn.h> #include <asm/kvm_host.h> #include <asm/mmu_context.h>
@@ -1921,6 +1922,14 @@ static void cpu_enable_mte(struct arm64_cpu_capabilities const *cap) }#endif /* CONFIG_ARM64_MTE */ +static void elf_hwcap_fixup (void ) +{ +#ifdef CONFIG_ARM64_ERRATUM_1742098 +if (cpus_have_const_cap (ARM64_WORKAROUND_1742098 )) + compat_elf_hwcap2 &= ~COMPAT_HWCAP2_AES ; +#endif /* ARM64_ERRATUM_1742098 */ +} +#ifdef CONFIG_KVM static bool is_kvm_protected_mode (const struct arm64_cpu_capabilities *entry,int __unused) {
@@ -3033,8 +3042,10 @@ void __init setup_cpu_features(void)setup_system_capabilities ();setup_elf_hwcaps (arm64_elf_hwcaps); -if (system_supports_32bit_el0 ()) +if (system_supports_32bit_el0 ()) {setup_elf_hwcaps (compat_elf_hwcaps); +elf_hwcap_fixup (); + }if (system_uses_ttbr0_pan ())pr_info ("emulated: Privileged Access Never (PAN) using TTBR0_EL1 switching\n" );
@@ -3086,6 +3097,7 @@ static int enable_mismatched_32bit_el0(unsigned int cpu) cpu_active_mask);get_cpu_device (lucky_winner)->offline_disabled = true;setup_elf_hwcaps (compat_elf_hwcaps); +elf_hwcap_fixup ();pr_info ("Asymmetric 32-bit EL0 support detected on CPU %u; CPU hot-unplug disabled on CPU %u\n" , cpu, lucky_winner);return 0 ;
arch/arm64/tools/cpucaps +1 -0
@@ -58,6 +58,7 @@ WORKAROUND_1418040 WORKAROUND_1463225 WORKAROUND_1508412 WORKAROUND_1542419 +WORKAROUND_1742098 WORKAROUND_1902691 WORKAROUND_2038923 WORKAROUND_2064142
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 141/1095 ext2: Add more validity checks for inode counts
In reply to Greg Kroah-HartmanFrom: Jan Kara <[email protected]>
[ Upstream commit fa78f336937240d1bc598db817d638086060e7e9 ]
Add checks verifying number of inodes stored in the superblock matches the number computed from number of inodes per group. Also verify we have at least one block worth of inodes per group. This prevents crashes on corrupted filesystems.
--- fs/ext2/super.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-)
fs/ext2/super.c +10 -2
@@ -1059,9 +1059,10 @@ static int ext2_fill_super(struct super_block *sb, void *data, int silent) sbi->s_frags_per_group); goto failed_mount; } -if (sbi->s_inodes_per_group > sb->s_blocksize *8 ) { +if (sbi->s_inodes_per_group < sbi->s_inodes_per_block || + sbi->s_inodes_per_group > sb->s_blocksize *8 ) {ext2_msg (sb,KERN_ERR , -"error: #inodes per group too big: %lu" , +"error: invalid #inodes per group: %lu" , sbi->s_inodes_per_group); goto failed_mount; }
@@ -1071,6 +1072,13 @@ static int ext2_fill_super(struct super_block *sb, void *data, int silent) sbi->s_groups_count = ((le32_to_cpu (es->s_blocks_count) -le32_to_cpu (es->s_first_data_block) -1 ) /EXT2_BLOCKS_PER_GROUP (sb)) +1 ; +if ((u64 )sbi->s_groups_count * sbi->s_inodes_per_group != +le32_to_cpu (es->s_inodes_count)) { +ext2_msg (sb,KERN_ERR ,"error: invalid #inodes: %u vs computed %llu" , +le32_to_cpu (es->s_inodes_count), + (u64 )sbi->s_groups_count * sbi->s_inodes_per_group); + goto failed_mount; + } db_count = (sbi->s_groups_count +EXT2_DESC_PER_BLOCK (sb) -1 ) /EXT2_DESC_PER_BLOCK (sb); sbi->s_group_desc = kmalloc_array(db_count,
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 142/1095 sched/fair: Introduce SIS_UTIL to search idle CPU based on sum of util_avg
In reply to Greg Kroah-HartmanFrom: Chen Yu <[email protected]>
[ Upstream commit 70fb5ccf2ebb09a0c8ebba775041567812d45f86 ]
[Problem Statement]select_idle_cpu() might spend too much time searching for an idle CPU, when the system is overloaded.
The following histogram is the time spent in select_idle_cpu(), when running 224 instances of netperf on a system with 112 CPUs per LLC domain:
@usecs:
[0] 533 | | [1] 5495 | | [2, 4) 12008 | | [4, 8) 239252 | | [8, 16) 4041924 |@@@@@@@@@@@@@@ | [16, 32) 12357398 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ | [32, 64) 14820255 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@| [64, 128) 13047682 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ | [128, 256) 8235013 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@ | [256, 512) 4507667 |@@@@@@@@@@@@@@@ | [512, 1K) 2600472 |@@@@@@@@@ | [1K, 2K) 927912 |@@@ | [2K, 4K) 218720 | | [4K, 8K) 98161 | | [8K, 16K) 37722 | | [16K, 32K) 6715 | | [32K, 64K) 477 | | [64K, 128K) 7 | |
netperf latency usecs:
=======
case load Lat_99th std%TCP_RR thread-224 257.39 ( 0.21)
The time spent in select_idle_cpu() is visible to netperf and might have a negative impact.
[Symptom analysis]
The patch [1] from Mel Gorman has been applied to track the efficiency of select_idle_sibling. Copy the indicators here:
SIS Search Efficiency(se_eff%):
A ratio expressed as a percentage of runqueues scanned versus idle CPUs found. A 100% efficiency indicates that the target, prev or recent CPU of a task was idle at wakeup. The lower the efficiency, the more runqueues were scanned before an idle CPU was found.
SIS Domain Search Efficiency(dom_eff%):
Similar, except only for the slower SIS
patch.
SIS Fast Success Rate(fast_rate%):
Percentage of SIS that used target, prev or recent CPUs.
SIS Success rate(success_rate%):
Percentage of scans that found an idle CPU.
The test is based on Aubrey's schedtests tool, including netperf, hackbench, schbench and tbench.
Test on vanilla kernel:schedstat_parse.py -f netperf_vanilla.log
case load se_eff% dom_eff% fast_rate% success_rate%
TCP_RR 28 threads 99.978 18.535 99.995 100.000 TCP_RR 56 threads 99.397 5.671 99.964 100.000 TCP_RR 84 threads 21.721 6.818 73.632 100.000 TCP_RR 112 threads 12.500 5.533 59.000 100.000 TCP_RR 140 threads 8.524 4.535 49.020 100.000 TCP_RR 168 threads 6.438 3.945 40.309 99.999 TCP_RR 196 threads 5.397 3.718 32.320 99.982 TCP_RR 224 threads 4.874 3.661 25.775 99.767 UDP_RR 28 threads 99.988 17.704 99.997 100.000 UDP_RR 56 threads 99.528 5.977 99.970 100.000 UDP_RR 84 threads 24.219 6.992 76.479 100.000 UDP_RR 112 threads 13.907 5.706 62.538 100.000 UDP_RR 140 threads 9.408 4.699 52.519 100.000 UDP_RR 168 threads 7.095 4.077 44.352 100.000 UDP_RR 196 threads 5.757 3.775 35.764 99.991 UDP_RR 224 threads 5.124 3.704 28.748 99.860
schedstat_parse.py -f schbench_vanilla.log
(each group has 28 tasks)
case load se_eff% dom_eff% fast_rate% success_rate%
normal 1 mthread 99.152 6.400 99.941 100.000 normal 2 mthreads 97.844 4.003 99.908 100.000 normal 3 mthreads 96.395 2.118 99.917 99.998 normal 4 mthreads 55.288 1.451 98.615 99.804 normal 5 mthreads 7.004 1.870 45.597 61.036 normal 6 mthreads 3.354 1.346 20.777 34.230 normal 7 mthreads 2.183 1.028 11.257 21.055 normal 8 mthreads 1.653 0.825 7.849 15.549
schedstat_parse.py -f hackbench_vanilla.log
(each group has 28 tasks)
case load se_eff% dom_eff% fast_rate% success_rate%
process-pipe 1 group 99.991 7.692 99.999 100.000 process-pipe 2 groups 99.934 4.615 99.997 100.000 process-pipe 3 groups 99.597 3.198 99.987 100.000 process-pipe 4 groups 98.378 2.464 99.958 100.000 process-pipe 5 groups 27.474 3.653 89.811 99.800 process-pipe 6 groups 20.201 4.098 82.763 99.570 process-pipe 7 groups 16.423 4.156 77.398 99.316 process-pipe 8 groups 13.165 3.920 72.232 98.828 process-sockets 1 group 99.977 5.882 99.999 100.000 process-sockets 2 groups 99.927 5.505 99.996 100.000 process-sockets 3 groups 99.397 3.250 99.980 100.000 process-sockets 4 groups 79.680 4.258 98.864 99.998 process-sockets 5 groups 7.673 2.503 63.659 92.115 process-sockets 6 groups 4.642 1.584 58.946 88.048 process-sockets 7 groups 3.493 1.379 49.816 81.164 process-sockets 8 groups 3.015 1.407 40.845 75.500 threads-pipe 1 group 99.997 0.000 100.000 100.000 threads-pipe 2 groups 99.894 2.932 99.997 100.000 threads-pipe 3 groups 99.611 4.117 99.983 100.000 threads-pipe 4 groups 97.703 2.624 99.937 100.000 threads-pipe 5 groups 22.919 3.623 87.150 99.764 threads-pipe 6 groups 18.016 4.038 80.491 99.557 threads-pipe 7 groups 14.663 3.991 75.239 99.247 threads-pipe 8 groups 12.242 3.808 70.651 98.644 threads-sockets 1 group 99.990 6.667 99.999 100.000 threads-sockets 2 groups 99.940 5.114 99.997 100.000 threads-sockets 3 groups 99.469 4.115 99.977 100.000 threads-sockets 4 groups 87.528 4.038 99.400 100.000 threads-sockets 5 groups 6.942 2.398 59.244 88.337 threads-sockets 6 groups 4.359 1.954 49.448 87.860 threads-sockets 7 groups 2.845 1.345 41.198 77.102 threads-sockets 8 groups 2.871 1.404 38.512 74.312
schedstat_parse.py -f tbench_vanilla.log
case load se_eff% dom_eff% fast_rate% success_rate%
loopback 28 threads 99.976 18.369 99.995 100.000 loopback 56 threads 99.222 7.799 99.934 100.000 loopback 84 threads 19.723 6.819 70.215 100.000 loopback 112 threads 11.283 5.371 55.371 99.999 loopback 140 threads 0.000 0.000 0.000 0.000 loopback 168 threads 0.000 0.000 0.000 0.000 loopback 196 threads 0.000 0.000 0.000 0.000 loopback 224 threads 0.000 0.000 0.000 0.000
According to the test above, if the system becomes busy, the SIS Search Efficiency(se_eff%) drops significantly. Although some benchmarks would finally find an idle CPU(success_rate% = 100%), it is doubtful whether it is worth it to search the whole LLC domain.
[Proposal]
It would be ideal to have a crystal ball to answer this question:
How many CPUs must a wakeup path walk down, before it can find an idle CPU? Many potential metrics could be used to predict the number. One candidate is the sum of util_avg in this LLC domain. The benefit of choosing util_avg is that it is a metric of accumulated historic activity, which seems to be smoother than instantaneous metrics (such as rq->nr_running). Besides, choosing the sum of util_avg would help predict the load of the LLC domain more precisely, because SIS_PROP uses one CPU's idle time to estimate the total LLC domain idle time.
In summary, the lower the util_avg is, the more select_idle_cpu() should scan for idle CPU, and vice versa. When the sum of util_avg in this LLC domain hits 85% or above, the scan stops. The reason to choose 85% as the threshold is that this is the imbalance_pct(117) when a LLC sched group is overloaded.
Introduce the quadratic function:
y = SCHED_CAPACITY_SCALE - p * x^2
and y'= y / SCHED_CAPACITY_SCALE
x is the ratio of sum_util compared to the CPU capacity:
x = sum_util / (llc_weight * SCHED_CAPACITY_SCALE) y' is the ratio of CPUs to be scanned in the LLC domain, and the number of CPUs to scan is calculated by:
nr_scan = llc_weight * y'
Choosing quadratic function is because:
[1] Compared to the linear function, it scans more aggressively when the sum_util is low.
[2] Compared to the exponential function, it is easier to calculate.
[3] It seems that there is no accurate mapping between the sum of util_avg and the number of CPUs to be scanned. Use heuristic scan for now.
For a platform with 112 CPUs per LLC, the number of CPUs to scan is:
sum_util% 0 5 15 25 35 45 55 65 75 85 86 ... scan_nr 112 111 108 102 93 81 65 47 25 1 0 ...
For a platform with 16 CPUs per LLC, the number of CPUs to scan is:
sum_util% 0 5 15 25 35 45 55 65 75 85 86 ... scan_nr 16 15 15 14 13 11 9 6 3 0 0 ...
Furthermore, to minimize the overhead of calculating the metrics in select_idle_cpu(), borrow the statistics from periodic load balance. As mentioned by Abel, on a platform with 112 CPUs per LLC, the sum_util calculated by periodic load balance after 112 ms would decay to about 0.5 * 0.5 * 0.5 * 0.7 = 8.75%, thus bringing a delay in reflecting the latest utilization. But it is a trade-off. Checking the util_avg in newidle load balance would be more frequent, but it brings overhead - multiple CPUs write/read the per-LLC shared variable and introduces cache contention. Tim also mentioned that, it is allowed to be non-optimal in terms of scheduling for the short-term variations, but if there is a long-term trend in the load behavior, the scheduler can adjust for that.
When SIS_UTIL is enabled, the select_idle_cpu() uses the nr_scan calculated by SIS_UTIL instead of the one from SIS_PROP. As Peter and Mel suggested, SIS_UTIL should be enabled by default.
This patch is based on the util_avg, which is very sensitive to the CPU frequency invariance. There is an issue that, when the max frequency has been clamp, the util_avg would decay insanely fast when
the CPU is idle. Commit addca285120b ("cpufreq: intel_pstate: Handle no_turbo in frequency invariance") could be used to mitigate this symptom, by adjusting the arch_max_freq_ratio when turbo is disabled. But this issue is still not thoroughly fixed, because the current code is unaware of the user-specified max CPU frequency.
[Test result]
netperf and tbench were launched with 25% 50% 75% 100% 125% 150% 175% 200% of CPU number respectively. Hackbench and schbench were launched by 1, 2 ,4, 8 groups. Each test lasts for 100 seconds and repeats 3 times.
The following is the benchmark result comparison between baseline:vanilla v5.19-rc1 and compare:patched kernel. Positive compare% indicates better performance.
Each netperf test is a:
netperf -4 -H 127.0.1 -t TCP/UDP_RR -c -C -l 100
netperf.throughput
=======
case load baseline(std%) compare%( std%) TCP_RR 28 threads 1.00 ( 0.34) -0.16 ( 0.40) TCP_RR 56 threads 1.00 ( 0.19) -0.02 ( 0.20) TCP_RR 84 threads 1.00 ( 0.39) -0.47 ( 0.40) TCP_RR 112 threads 1.00 ( 0.21) -0.66 ( 0.22) TCP_RR 140 threads 1.00 ( 0.19) -0.69 ( 0.19) TCP_RR 168 threads 1.00 ( 0.18) -0.48 ( 0.18) TCP_RR 196 threads 1.00 ( 0.16) +194.70 ( 16.43) TCP_RR 224 threads 1.00 ( 0.16) +197.30 ( 7.85) UDP_RR 28 threads 1.00 ( 0.37) +0.35 ( 0.33) UDP_RR 56 threads 1.00 ( 11.18) -0.32 ( 0.21) UDP_RR 84 threads 1.00 ( 1.46) -0.98 ( 0.32) UDP_RR 112 threads 1.00 ( 28.85) -2.48 ( 19.61) UDP_RR 140 threads 1.00 ( 0.70) -0.71 ( 14.04) UDP_RR 168 threads 1.00 ( 14.33) -0.26 ( 11.16) UDP_RR 196 threads 1.00 ( 12.92) +186.92 ( 20.93) UDP_RR 224 threads 1.00 ( 11.74) +196.79 ( 18.62)
Take the 224 threads as an example, the SIS search metrics changes are illustrated below:
vanilla patched
4544492 +237.5% 15338634 sched_debug.cpu.sis_domain_search.avg
38539 +39686.8% 15333634 sched_debug.cpu.sis_failed.avg
128300000 -87.9% 15551326 sched_debug.cpu.sis_scanned.avg
5842896 +162.7% 15347978 sched_debug.cpu.sis_search.avgThere is -87.9% less CPU scans after patched, which indicates lower overhead. Besides, with this patch applied, there is -13% less rq lock contention in perf-profile.calltrace.cycles-pp._raw_spin_lock.raw_spin_rq_lock_nested .try_to_wake_up.default_wake_function.woken_wake_function.
This might help explain the performance improvement - Because this patch allows the waking task to remain on the previous CPU, rather than grabbing other CPUs' lock.
Each hackbench test is a:
hackbench -g $job --process/threads --pipe/sockets -l 1000000 -s 100 hackbench.throughput
=========
case load baseline(std%) compare%( std%) process-pipe 1 group 1.00 ( 1.29) +0.57 ( 0.47) process-pipe 2 groups 1.00 ( 0.27) +0.77 ( 0.81) process-pipe 4 groups 1.00 ( 0.26) +1.17 ( 0.02) process-pipe 8 groups 1.00 ( 0.15) -4.79 ( 0.02) process-sockets 1 group 1.00 ( 0.63) -0.92 ( 0.13) process-sockets 2 groups 1.00 ( 0.03) -0.83 ( 0.14) process-sockets 4 groups 1.00 ( 0.40) +5.20 ( 0.26) process-sockets 8 groups 1.00 ( 0.04) +3.52 ( 0.03) threads-pipe 1 group 1.00 ( 1.28) +0.07 ( 0.14) threads-pipe 2 groups 1.00 ( 0.22) -0.49 ( 0.74) threads-pipe 4 groups 1.00 ( 0.05) +1.88 ( 0.13) threads-pipe 8 groups 1.00 ( 0.09) -4.90 ( 0.06) threads-sockets 1 group 1.00 ( 0.25) -0.70 ( 0.53) threads-sockets 2 groups 1.00 ( 0.10) -0.63 ( 0.26) threads-sockets 4 groups 1.00 ( 0.19) +11.92 ( 0.24) threads-sockets 8 groups 1.00 ( 0.08) +4.31 ( 0.11)
Each tbench test is a:
tbench -t 100 $job 127.0.0.1
tbench.throughput
======
case load baseline(std%) compare%( std%) loopback 28 threads 1.00 ( 0.06) -0.14 ( 0.09) loopback 56 threads 1.00 ( 0.03) -0.04 ( 0.17) loopback 84 threads 1.00 ( 0.05) +0.36 ( 0.13) loopback 112 threads 1.00 ( 0.03) +0.51 ( 0.03) loopback 140 threads 1.00 ( 0.02) -1.67 ( 0.19) loopback 168 threads 1.00 ( 0.38) +1.27 ( 0.27) loopback 196 threads 1.00 ( 0.11) +1.34 ( 0.17) loopback 224 threads 1.00 ( 0.11) +1.67 ( 0.22)
Each schbench test is a:
schbench -m $job -t 28 -r 100 -s 30000 -c 30000
schbench.latency_90%_us
========
case load baseline(std%) compare%( std%) normal 1 mthread 1.00 ( 31.22) -7.36 ( 20.25)* normal 2 mthreads 1.00 ( 2.45) -0.48 ( 1.79) normal 4 mthreads 1.00 ( 1.69) +0.45 ( 0.64) normal 8 mthreads 1.00 ( 5.47) +9.81 ( 14.28)
*Consider the Standard Deviation, this -7.36% regression might not be valid.
Also, a OLTP workload with a commercial RDBMS has been tested, and there is no significant change.
There were concerns that unbalanced tasks among CPUs would cause problems. For example, suppose the LLC domain is composed of 8 CPUs, and 7 tasks are bound to CPU0~CPU6, while CPU7 is idle:
CPU0 CPU1 CPU2 CPU3 CPU4 CPU5 CPU6 CPU7 util_avg 1024 1024 1024 1024 1024 1024 1024 0
Since the util_avg ratio is 87.5%( = 7/8 ), which is higher than 85%, select_idle_cpu() will not scan, thus CPU7 is undetected during scan. But according to Mel, it is unlikely the CPU7 will be idle all the time because CPU7 could pull some tasks via CPU_NEWLY_IDLE.
lkp(kernel test robot) has reported a regression on stress-ng.sock on a very busy system. According to the sched_debug statistics, it might be caused by SIS_UTIL terminates the scan and chooses a previous CPU earlier, and this might introduce more context switch, especially involuntary preemption, which impacts a busy stress-ng. This regression has shown that, not all benchmarks in every scenario benefit from idle CPU scan limit, and it needs further investigation.
Besides, there is slight regression in hackbench's 16 groups case when the LLC domain has 16 CPUs. Prateek mentioned that we should scan aggressively in an LLC domain with 16 CPUs. Because the cost to search for an idle one among 16 CPUs is negligible. The current patch aims to propose a generic solution and only considers the util_avg. Something like the below could be applied on top of the current patch to fulfill the requirement:
if (llc_weight <= 16) nr_scan = nr_scan * 32 / llc_weight;
For LLC domain with 16 CPUs, the nr_scan will be expanded to 2 times large. The smaller the CPU number this LLC domain has, the larger nr_scan will be expanded. This needs further investigation.
There is also ongoing work[2] from Abel to filter out the busy CPUs during wakeup, to further speed up the idle CPU scan. And it could be a following-up optimization on top of this change.
--- include/linux/sched/topology.h | 1 + kernel/sched/fair.c | 87 ++++++++++++++++++++++++++++++++++ kernel/sched/features.h | 3 +- 3 files changed, 90 insertions(+), 1 deletion(-)
include/linux/sched/topology.h +1 -0
@@ -81,6 +81,7 @@ struct sched_domain_shared {atomic_t ref;atomic_t nr_busy_cpus;int has_idle_cores; +int nr_idle_scan; };struct sched_domain {
kernel/sched/fair.c +87 -0
123 lines not on this page · raw message
kernel/sched/features.h +2 -1
@@ -60,7 +60,8 @@ SCHED_FEAT(TTWU_QUEUE, true)/* * When doing wakeups, attempt to limit superfluous scans of the LLC domain. */ -SCHED_FEAT (SIS_PROP , true) +SCHED_FEAT(SIS_PROP, false) +SCHED_FEAT (SIS_UTIL , true)/* * Issue a WARN when we do multiple update_rq_clock() calls
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 143/1095 genirq: Dont return error on missing optional irq_request_resources()
In reply to Greg Kroah-HartmanFrom: Antonio Borneo <[email protected]>
[ Upstream commit 95001b756467ecc9f5973eb5e74e97699d9bbdf1 ]
Function irq_chip::irq_request_resources() is reported as optional in the declaration of struct irq_chip.
If the parent irq_chip does not implement it, we should ignore it and return.
Don't return error if the functions is missing.
--- kernel/irq/chip.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
kernel/irq/chip.c +2 -1
@@ -1513,7 +1513,8 @@ int irq_chip_request_resources_parent(struct irq_data *data)if (data->chip->irq_request_resources)return data->chip->irq_request_resources (data); -return -ENOSYS ; +/* no error on missing optional irq_chip::irq_request_resources */ +return 0 ; }EXPORT_SYMBOL_GPL (irq_chip_request_resources_parent);
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 144/1095 irqchip/mips-gic: Only register IPI domain when SMP is enabled
In reply to Greg Kroah-HartmanFrom: Samuel Holland <[email protected]>
[ Upstream commit 8190cc572981f2f13b6ffc26c7cfa7899e5d3ccc ]
The MIPS GIC irqchip driver may be selected in a uniprocessor configuration, but it unconditionally registers an IPI domain.
Limit the part of the driver dealing with IPIs to only be compiled when GENERIC_IRQ_IPI is enabled, which corresponds to an SMP configuration.
--- drivers/irqchip/Kconfig | 3 +- drivers/irqchip/irq-mips-gic.c | 80 +++++++++++++++++++++++----------- 2 files changed, 56 insertions(+), 27 deletions(-)
drivers/irqchip/Kconfig +2 -1
@@ -310,7 +310,8 @@ config KEYSTONE_IRQ config MIPS_GIC bool - select GENERIC_IRQ_IPI + select GENERIC_IRQ_IPI if SMP + select IRQ_DOMAIN_HIERARCHY select MIPS_CM config INGENIC_IRQ
drivers/irqchip/irq-mips-gic.c +54 -26
129 lines not on this page · raw message
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 145/1095 genirq: GENERIC_IRQ_IPI depends on SMP
In reply to Greg Kroah-HartmanFrom: Samuel Holland <[email protected]>
[ Upstream commit 0f5209fee90b4544c58b4278d944425292789967 ]
The generic IPI code depends on the IRQ affinity mask being allocated and initialized. This will not be the case if SMP is disabled. Fix up the remaining driver that selected GENERIC_IRQ_IPI in a non-SMP config.
--- drivers/irqchip/Kconfig | 2 +- kernel/irq/Kconfig | 1 + 2 files changed, 2 insertions(+), 1 deletion(-)
drivers/irqchip/Kconfig +1 -1
@@ -177,7 +177,7 @@ config MADERA_IRQ config IRQ_MIPS_CPU bool select GENERIC_IRQ_CHIP - select GENERIC_IRQ_IPI if SYS_SUPPORTS_MULTITHREADING + select GENERIC_IRQ_IPI if SMP && SYS_SUPPORTS_MULTITHREADING select IRQ_DOMAIN select GENERIC_IRQ_EFFECTIVE_AFF_MASK
kernel/irq/Kconfig +1 -0
@@ -82,6 +82,7 @@ config IRQ_FASTEOI_HIERARCHY_HANDLERS # Generic IRQ IPI support config GENERIC_IRQ_IPI bool + depends on SMP select IRQ_DOMAIN_HIERARCHY # Generic MSI interrupt support
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 146/1095 sched/fair: fix case with reduced capacity CPU
In reply to Greg Kroah-HartmanFrom: Vincent Guittot <[email protected]>
[ Upstream commit c82a69629c53eda5233f13fc11c3c01585ef48a2 ]
The capacity of the CPU available for CFS tasks can be reduced because of other activities running on the latter. In such case, it's worth trying to move CFS tasks on a CPU with more available capacity.
The rework of the load balance has filtered the case when the CPU is classified to be fully busy but its capacity is reduced.
Check if CPU's capacity is reduced while gathering load balance statistic and classify it group_misfit_task instead of group_fully_busy so we can try to move the load on another CPU.
--- kernel/sched/fair.c | 54 +++++++++++++++++++++++++++++++++++---------- 1 file changed, 42 insertions(+), 12 deletions(-)
kernel/sched/fair.c +42 -12
@@ -7628,8 +7628,8 @@ enum group_type {*/ group_fully_busy,/* -* SD_ASYM_CPUCAPACITY only: One task doesn't fit with CPU's capacity -* and must be migrated to a more powerful CPU. +* One task doesn't fit with CPU's capacity and must be migrated to a +* more powerful CPU. */ group_misfit_task,/*
@@ -8712,6 +8712,19 @@ sched_asym(struct lb_env *env, struct sd_lb_stats *sds, struct sg_lb_stats *sgsreturn sched_asym_prefer (env->dst_cpu, group->asym_prefer_cpu); } +static inline bool +sched_reduced_capacity (struct rq *rq,struct sched_domain *sd) +{ +/* +* When there is more than 1 task, the group_overloaded case already +* takes care of cpu with reduced capacity +*/ +if (rq->cfs.h_nr_running !=1 ) +return false; + +return check_cpu_capacity (rq, sd); +} +/** * update_sg_lb_stats - Update sched_group's statistics for load balancing. * @env: The load balancing environment.
@@ -8734,8 +8747,9 @@ static inline void update_sg_lb_stats(struct lb_env *env,for_each_cpu_and (i,sched_group_span (group), env->cpus) {struct rq *rq =cpu_rq (i); +unsigned long load =cpu_load (rq); - sgs->group_load +=cpu_load (rq); + sgs->group_load += load; sgs->group_util +=cpu_util_cfs (i); sgs->group_runnable +=cpu_runnable (rq); sgs->sum_h_nr_running += rq->cfs.h_nr_running;
@@ -8765,11 +8779,17 @@ static inline void update_sg_lb_stats(struct lb_env *env,if (local_group)continue ; -/* Check for a misfit task on the cpu */ -if (env->sd->flags &SD_ASYM_CPUCAPACITY && - sgs->group_misfit_task_load < rq->misfit_task_load) { - sgs->group_misfit_task_load = rq->misfit_task_load; - *sg_status |=SG_OVERLOAD ; +if (env->sd->flags &SD_ASYM_CPUCAPACITY ) { +/* Check for a misfit task on the cpu */ +if (sgs->group_misfit_task_load < rq->misfit_task_load) { + sgs->group_misfit_task_load = rq->misfit_task_load; + *sg_status |=SG_OVERLOAD ; + } + }else if ((env->idle !=CPU_NOT_IDLE ) && +sched_reduced_capacity (rq, env->sd)) { +/* Check for a task running on a CPU with reduced capacity */ +if (sgs->group_misfit_task_load < load) + sgs->group_misfit_task_load = load; } }
@@ -8822,7 +8842,8 @@ static bool update_sd_pick_busiest(struct lb_env *env,* CPUs in the group should either be possible to resolve * internally or be covered by avg_load imbalance (eventually). */ -if (sgs->group_type == group_misfit_task && +if ((env->sd->flags &SD_ASYM_CPUCAPACITY ) && + (sgs->group_type == group_misfit_task) && (!capacity_greater (capacity_of (env->dst_cpu), sg->sgc->max_capacity) || sds->local_stat.group_type != group_has_spare))return false;
@@ -9443,9 +9464,18 @@ static inline void calculate_imbalance(struct lb_env *env, struct sd_lb_stats *s busiest = &sds->busiest_stat;if (busiest->group_type == group_misfit_task) { -/* Set imbalance to allow misfit tasks to be balanced. */ - env->migration_type = migrate_misfit; - env->imbalance =1 ; +if (env->sd->flags &SD_ASYM_CPUCAPACITY ) { +/* Set imbalance to allow misfit tasks to be balanced. */ + env->migration_type = migrate_misfit; + env->imbalance =1 ; + }else { +/* +* Set load imbalance to allow moving task from cpu +* with reduced capacity. +*/ + env->migration_type = migrate_load; + env->imbalance = busiest->group_misfit_task_load; + }return ; }
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 147/1095 sched/core: Always flush pending blk_plug
In reply to Greg Kroah-HartmanFrom: John Keeping <[email protected]>
[ Upstream commit 401e4963bf45c800e3e9ea0d3a0289d738005fd4 ]
With CONFIG_PREEMPT_RT, it is possible to hit a deadlock between two normal priority tasks (SCHED_OTHER, nice level zero):
INFO: task kworker/u8:0:8 blocked for more than 491 seconds. Not tainted 5.15.49-rt46 #1 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. task:kworker/u8:0 state:D stack: 0 pid: 8 ppid: 2 flags:0x00000000 Workqueue: writeback wb_workfn (flush-7:0) [<c08a3a10>] (__schedule) from [<c08a3d84>] (schedule+0xdc/0x134) [<c08a3d84>] (schedule) from [<c08a65a0>] (rt_mutex_slowlock_block.constprop.0+0xb8/0x174) [<c08a65a0>] (rt_mutex_slowlock_block.constprop.0) from [<c08a6708>] +(rt_mutex_slowlock.constprop.0+0xac/0x174) [<c08a6708>] (rt_mutex_slowlock.constprop.0) from [<c0374d60>] (fat_write_inode+0x34/0x54) [<c0374d60>] (fat_write_inode) from [<c0297304>] (__writeback_single_inode+0x354/0x3ec) [<c0297304>] (__writeback_single_inode) from [<c0297998>] (writeback_sb_inodes+0x250/0x45c) [<c0297998>] (writeback_sb_inodes) from [<c0297c20>] (__writeback_inodes_wb+0x7c/0xb8) [<c0297c20>] (__writeback_inodes_wb) from [<c0297f24>] (wb_writeback+0x2c8/0x2e4) [<c0297f24>] (wb_writeback) from [<c0298c40>] (wb_workfn+0x1a4/0x3e4) [<c0298c40>] (wb_workfn) from [<c0138ab8>] (process_one_work+0x1fc/0x32c) [<c0138ab8>] (process_one_work) from [<c0139120>] (worker_thread+0x22c/0x2d8) [<c0139120>] (worker_thread) from [<c013e6e0>] (kthread+0x16c/0x178) [<c013e6e0>] (kthread) from [<c01000fc>] (ret_from_fork+0x14/0x38) Exception stack(0xc10e3fb0 to 0xc10e3ff8) 3fa0: 00000000 00000000 00000000 00000000 3fc0: 00000000 00000000 00000000 00000000 00000000 00000000 00000000 00000000 3fe0: 00000000 00000000 00000000 00000000 00000013 00000000 INFO: task tar:2083 blocked for more than 491 seconds. Not tainted 5.15.49-rt46 #1 "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message. task:tar state:D stack: 0 pid: 2083 ppid: 2082 flags:0x00000000 [<c08a3a10>] (__schedule) from [<c08a3d84>] (schedule+0xdc/0x134) [<c08a3d84>] (schedule) from [<c08a41b0>] (io_schedule+0x14/0x24) [<c08a41b0>] (io_schedule) from [<c08a455c>] (bit_wait_io+0xc/0x30) [<c08a455c>] (bit_wait_io) from [<c08a441c>] (__wait_on_bit_lock+0x54/0xa8) [<c08a441c>] (__wait_on_bit_lock) from [<c08a44f4>] (out_of_line_wait_on_bit_lock+0x84/0xb0) [<c08a44f4>] (out_of_line_wait_on_bit_lock) from [<c0371fb0>] (fat_mirror_bhs+0xa0/0x144) [<c0371fb0>] (fat_mirror_bhs) from [<c0372a68>] (fat_alloc_clusters+0x138/0x2a4) [<c0372a68>] (fat_alloc_clusters) from [<c0370b14>] (fat_alloc_new_dir+0x34/0x250) [<c0370b14>] (fat_alloc_new_dir) from [<c03787c0>] (vfat_mkdir+0x58/0x148) [<c03787c0>] (vfat_mkdir) from [<c0277b60>] (vfs_mkdir+0x68/0x98) [<c0277b60>] (vfs_mkdir) from [<c027b484>] (do_mkdirat+0xb0/0xec) [<c027b484>] (do_mkdirat) from [<c0100060>] (ret_fast_syscall+0x0/0x1c) Exception stack(0xc2e1bfa8 to 0xc2e1bff0) bfa0: 01ee42f0 01ee4208 01ee42f0 000041ed 00000000 00004000 bfc0: 01ee42f0 01ee4208 00000000 00000027 01ee4302 00000004 000dcb00 01ee4190 bfe0: 000dc368 bed11924 0006d4b0 b6ebddfc
Here the kworker is waiting on msdos_sb_info::s_lock which is held by tar which is in turn waiting for a buffer which is locked waiting to be flushed, but this operation is plugged in the kworker.
The lock is a normal struct mutex, so tsk_is_pi_blocked() will always return false on !RT and thus the behaviour changes for RT.
It seems that the intent here is to skip blk_flush_plug() in the case where a non-preemptible lock (such as a spinlock) has been converted to a rtmutex on RT, which is the case covered by the SM_RTLOCK_WAIT schedule flag. But sched_submit_work() is only called from schedule() which is never called in this scenario, so the check can simply be deleted.
Looking at the history of the -rt patchset, in fact this change was present from v5.9.1-rt20 until being dropped in v5.13-rt1 as it was part of a larger patch [1] most of which was replaced by commit b4bfa3fcfe3b ("sched/core: Rework the __schedule() preempt argument").
As described in [1]:
The schedule process must distinguish between blocking on a regular sleeping lock (rwsem and mutex) and a RT-only sleeping lock (spinlock and rwlock):
- rwsem and mutex must flush block requests (blk_schedule_flush_plug()) even if blocked on a lock. This can not deadlock because this also happens for non-RT.
There should be a warning if the scheduling point is within a RCU read section.
- spinlock and rwlock must not flush block requests. This will deadlock if the callback attempts to acquire a lock which is already acquired. Similarly to being preempted, there should be no warning if the scheduling point is within a RCU read section.
and with the tsk_is_pi_blocked() in the scheduler path, we hit the first issue.
--- include/linux/sched/rt.h | 8 -------- kernel/sched/core.c | 8 ++++++-- 2 files changed, 6 insertions(+), 10 deletions(-)
include/linux/sched/rt.h +0 -8
@@ -39,20 +39,12 @@ static inline struct task_struct *rt_mutex_get_top_task(struct task_struct *p) }extern void rt_mutex_setprio (struct task_struct *p,struct task_struct *pi_task);extern void rt_mutex_adjust_pi (struct task_struct *p); -static inline bool tsk_is_pi_blocked (struct task_struct *tsk) -{ -return tsk->pi_blocked_on !=NULL ; -}#else static inline struct task_struct *rt_mutex_get_top_task (struct task_struct *task) {return NULL ; }# define rt_mutex_adjust_pi (p) do { } while (0) -static inline bool tsk_is_pi_blocked (struct task_struct *tsk) -{ -return false; -}#endif extern void normalize_rt_tasks (void );
kernel/sched/core.c +6 -2
@@ -6460,8 +6460,12 @@ static inline void sched_submit_work(struct task_struct *tsk)io_wq_worker_sleeping (tsk); } -if (tsk_is_pi_blocked (tsk)) -return ; +/* +* spinlock and rwlock must not flush block requests. This will +* deadlock if the callback attempts to acquire a lock which is +* already acquired. +*/ +SCHED_WARN_ON (current->__state &TASK_RTLOCK_WAIT );/* * If we are going to sleep and we have plugged IO queued,
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 148/1095 irqchip/mips-gic: Check the return value of ioremap() in gic_of_init()
In reply to Greg Kroah-HartmanFrom: William Dean <[email protected]>
[ Upstream commit 71349cc85e5930dce78ed87084dee098eba24b59 ]
The function ioremap() in gic_of_init() can fail, so its return value should be checked.
--- drivers/irqchip/irq-mips-gic.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/irqchip/irq-mips-gic.c +4 -0
@@ -783,6 +783,10 @@ static int __init gic_of_init(struct device_node *node, } mips_gic_base =ioremap (gic_base, gic_len); +if (!mips_gic_base) { +pr_err ("Failed to ioremap gic_base\n" ); +return -ENOMEM ; + } gicconfig =read_gic_config (); gic_shared_intrs =FIELD_GET (GIC_CONFIG_NUMINTERRUPTS , gicconfig);
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 149/1095 wait: Fix __wait_event_hrtimeout for RT/DL tasks
In reply to Greg Kroah-HartmanFrom: Juri Lelli <[email protected]>
[ Upstream commit cceeeb6a6d02e7b9a74ddd27a3225013b34174aa ]
Changes to hrtimer mode (potentially made by __hrtimer_init_sleeper on PREEMPT_RT) are not visible to hrtimer_start_range_ns, thus not accounted for by hrtimer_start_expires call paths. In particular, __wait_event_hrtimeout suffers from this problem as we have, for example:
fs/aio.c::read_events
wait_event_interruptible_hrtimeout
__wait_event_hrtimeout
hrtimer_init_sleeper_on_stack <- this might "mode |= HRTIMER_MODE_HARD"
on RT if task runs at RT/DL priority
hrtimer_start_range_ns
WARN_ON_ONCE(!(mode & HRTIMER_MODE_HARD) ^ !timer->is_hard) fires since the latter doesn't see the change of mode done by init_sleeper
Fix it by making __wait_event_hrtimeout call hrtimer_sleeper_start_expires, which is aware of the special RT/DL case, instead of hrtimer_start_range_ns.
--- include/linux/wait.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
include/linux/wait.h +5 -4
@@ -544,10 +544,11 @@ do { \ \hrtimer_init_sleeper_on_stack (&__t,CLOCK_MONOTONIC , \HRTIMER_MODE_REL ); \ -if ((timeout) !=KTIME_MAX ) \ -hrtimer_start_range_ns (&__t.timer, timeout, \ - current->timer_slack_ns, \ -HRTIMER_MODE_REL ); \ +if ((timeout) !=KTIME_MAX ) { \ +hrtimer_set_expires_range_ns (&__t.timer, timeout, \ + current->timer_slack_ns); \ +hrtimer_sleeper_start_expires (&__t,HRTIMER_MODE_REL ); \ + } \ \ __ret = ___wait_event(wq_head, condition, state, 0, 0, \ if (!__t.task) { \
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 150/1095 ARM: dts: imx6ul: add missing properties for sram
In reply to Greg Kroah-HartmanFrom: Alexander Stein <[email protected]>
[ Upstream commit 5655699cf5cff9f4c4ee703792156bdd05d1addf ]
All 3 properties are required by sram.yaml. Fixes the dtbs_check warning:
sram@900000: '#address-cells' is a required property sram@900000: '#size-cells' is a required property sram@900000: 'ranges' is a required property
--- arch/arm/boot/dts/imx6ul.dtsi | 3 +++ 1 file changed, 3 insertions(+)
arch/arm/boot/dts/imx6ul.dtsi +3 -0
@@ -149,6 +149,9 @@ soc { ocram: sram@900000 { compatible = "mmio-sram"; reg = <0x00900000 0x20000>; + ranges = <0 0x00900000 0x20000>; + #address-cells = <1>; + #size-cells = <1>; }; intc: interrupt-controller@a01000 {
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 151/1095 ARM: dts: imx6ul: change operating-points to uint32-matrix
In reply to Greg Kroah-HartmanFrom: Alexander Stein <[email protected]>
[ Upstream commit edb67843983bbdf61b4c8c3c50618003d38bb4ae ]
operating-points is a uint32-matrix as per opp-v1.yaml. Change it accordingly. While at it, change fsl,soc-operating-points as well, although there is no bindings file (yet). But they should have the same format. Fixes the dt_binding_check warning:
cpu@0: operating-points:0: [696000, 1275000, 528000, 1175000, 396000, 1025000, 198000, 950000] is too long
cpu@0: operating-points:0: Additional items are not allowed (528000, 1175000, 396000, 1025000, 198000, 950000 were unexpected)
--- arch/arm/boot/dts/imx6ul.dtsi | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-)
arch/arm/boot/dts/imx6ul.dtsi +10 -12
@@ -64,20 +64,18 @@ cpu0: cpu@0 { clock-frequency = <696000000>; clock-latency = <61036>; /* two CLK32 periods */ #cooling-cells = <2>; - operating-points = < + operating-points = /* kHz uV */ - 696000 1275000 - 528000 1175000 - 396000 1025000 - 198000 950000 - >; - fsl,soc-operating-points = < + <696000 1275000>, + <528000 1175000>, + <396000 1025000>, + <198000 950000>; + fsl,soc-operating-points = /* KHz uV */ - 696000 1275000 - 528000 1175000 - 396000 1175000 - 198000 1175000 - >; + <696000 1275000>, + <528000 1175000>, + <396000 1175000>, + <198000 1175000>; clocks = <&clks IMX6UL_CLK_ARM>, <&clks IMX6UL_CLK_PLL2_BUS>, <&clks IMX6UL_CLK_PLL2_PFD2>,
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 152/1095 ARM: dts: imx6ul: fix keypad compatible
In reply to Greg Kroah-HartmanFrom: Alexander Stein <[email protected]>
[ Upstream commit 7d15e0c9a515494af2e3199741cdac7002928a0e ]
According to binding, the compatible shall only contain imx6ul and imx21 compatibles. Fixes the dt_binding_check warning:
keypad@20b8000: compatible: 'oneOf' conditional failed, one must be fixed:
['fsl,imx6ul-kpp', 'fsl,imx6q-kpp', 'fsl,imx21-kpp'] is too long Additional items are not allowed ('fsl,imx6q-kpp', 'fsl,imx21-kpp' were unexpected)
Additional items are not allowed ('fsl,imx21-kpp' was unexpected) 'fsl,imx21-kpp' was expected
--- arch/arm/boot/dts/imx6ul.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/imx6ul.dtsi +1 -1
@@ -544,7 +544,7 @@ fec2: ethernet@20b4000 { }; kpp: keypad@20b8000 { - compatible = "fsl,imx6ul-kpp", "fsl,imx6q-kpp", "fsl,imx21-kpp"; + compatible = "fsl,imx6ul-kpp", "fsl,imx21-kpp"; reg = <0x020b8000 0x4000>; interrupts = <GIC_SPI 82 IRQ_TYPE_LEVEL_HIGH>; clocks = <&clks IMX6UL_CLK_KPP>;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 153/1095 ARM: dts: imx6ul: fix csi node compatible
In reply to Greg Kroah-HartmanFrom: Alexander Stein <[email protected]>
[ Upstream commit e0aca931a2c7c29c88ebf37f9c3cd045e083483d ]
"fsl,imx6ul-csi" was never listed as compatible to "fsl,imx7-csi", neither in yaml bindings, nor previous txt binding. Remove the imx7 part. Fixes the dt schema check warning:
csi@21c4000: compatible: 'oneOf' conditional failed, one must be fixed:
['fsl,imx6ul-csi', 'fsl,imx7-csi'] is too long
Additional items are not allowed ('fsl,imx7-csi' was unexpected) 'fsl,imx8mm-csi' was expected
--- arch/arm/boot/dts/imx6ul.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/imx6ul.dtsi +1 -1
@@ -999,7 +999,7 @@ cpu_speed_grade: speed-grade@10 { }; csi: csi@21c4000 { - compatible = "fsl,imx6ul-csi", "fsl,imx7-csi"; + compatible = "fsl,imx6ul-csi"; reg = <0x021c4000 0x4000>; interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>; clocks = <&clks IMX6UL_CLK_CSI>;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 154/1095 ARM: dts: imx6ul: fix lcdif node compatible
In reply to Greg Kroah-HartmanFrom: Alexander Stein <[email protected]>
[ Upstream commit 1a884d17ca324531634cce82e9f64c0302bdf7de ]
In yaml binding "fsl,imx6ul-lcdif" is listed as compatible to imx6sx-lcdif, but not imx28-lcdif. Change the list accordingly. Fixes the dt_binding_check warning:
lcdif@21c8000: compatible: 'oneOf' conditional failed, one must be fixed:
['fsl,imx6ul-lcdif', 'fsl,imx28-lcdif'] is too long
Additional items are not allowed ('fsl,imx28-lcdif' was unexpected) 'fsl,imx6ul-lcdif' is not one of ['fsl,imx23-lcdif', 'fsl,imx28-lcdif', 'fsl,imx6sx-lcdif']
'fsl,imx6sx-lcdif' was expected
--- arch/arm/boot/dts/imx6ul.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/imx6ul.dtsi +1 -1
@@ -1008,7 +1008,7 @@ csi: csi@21c4000 { }; lcdif: lcdif@21c8000 { - compatible = "fsl,imx6ul-lcdif", "fsl,imx28-lcdif"; + compatible = "fsl,imx6ul-lcdif", "fsl,imx6sx-lcdif"; reg = <0x021c8000 0x4000>; interrupts = <GIC_SPI 5 IRQ_TYPE_LEVEL_HIGH>; clocks = <&clks IMX6UL_CLK_LCDIF_PIX>,
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 155/1095 ARM: dts: imx6ul: fix qspi node compatible
In reply to Greg Kroah-HartmanFrom: Alexander Stein <[email protected]>
[ Upstream commit 0c6cf86e1ab433b2d421880fdd9c6e954f404948 ]
imx6ul is not compatible to imx6sx, both have different erratas. Fixes the dt_binding_check warning:
spi@21e0000: compatible: 'oneOf' conditional failed, one must be fixed:
['fsl,imx6ul-qspi', 'fsl,imx6sx-qspi'] is too long Additional items are not allowed ('fsl,imx6sx-qspi' was unexpected) 'fsl,imx6ul-qspi' is not one of ['fsl,ls1043a-qspi'] 'fsl,imx6ul-qspi' is not one of ['fsl,imx8mq-qspi'] 'fsl,ls1021a-qspi' was expected
'fsl,imx7d-qspi' was expected
--- arch/arm/boot/dts/imx6ul.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/imx6ul.dtsi +1 -1
@@ -1029,7 +1029,7 @@ pxp: pxp@21cc000 { qspi: spi@21e0000 { #address-cells = <1>; #size-cells = <0>; - compatible = "fsl,imx6ul-qspi", "fsl,imx6sx-qspi"; + compatible = "fsl,imx6ul-qspi"; reg = <0x021e0000 0x4000>, <0x60000000 0x10000000>; reg-names = "QuadSPI", "QuadSPI-memory"; interrupts = <GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 156/1095 ARM: dts: BCM5301X: Add DT for Meraki MR26
In reply to Greg Kroah-HartmanFrom: Christian Lamparter <[email protected]>
[ Upstream commit 935327a73553001f8d81375c76985d05f604507f ]
Meraki MR26 is an EOL wireless access point featuring a PoE ethernet port and two dual-band 3x3 MIMO 802.11n radios and 1x1 dual-band WIFI dedicated to scanning.
Thank you Amir for the unit and PSU.
Hardware info:
SOC : Broadcom BCM53015A1KFEBG (dual-core Cortex-A9 CPU at 800 MHz)
RAM : SK Hynix Inc. H5TQ1G63EFR, 1 GBit DDR3 SDRAM = 128 MiB
NAND : Spansion S34ML01G100TF100, 1 GBit SLC NAND Flash = 128 MiB
ETH : 1 GBit Ethernet Port - PoE (TPS23754 PoE Interface)
WIFI0 : Broadcom BCM43431KMLG, BCM43431 802.11 abgn (3x3:3) WIFI1 : Broadcom BCM43431KMLG, BCM43431 802.11 abgn (3x3:3) WIFI2 : Broadcom BCM43428 "Air Marshal" 802.11 abgn (1x1:1)
BUTTON: One reset key behind a small hole next to the Ethernet Port LEDS : One amber (fault), one white (indicator) LED, separate RGB-LED MISC : Atmel AT24C64 8KiB EEPROM i2c
: Ti INA219 26V, 12-bit, i2c output current/voltage/power monitor
SERIAL:
WARNING: The serial port needs a TTL/RS-232 3V3 level converter! The Serial setting is 115200-8-N-1. The board has a populated right angle 1x4 0.1" pinheader.
The pinout is: VCC (next to J3, has the pin 1 indicator), RX, TX, GND.
Odd stuff:
- uboot does not support lzma compression, but gzip'd uImage/DTB work.
- uboot claims to support FIT, but fails to pass the DTB to the kernel. Appending the dtb after the kernel image works.
- RGB-controller is supported through an external userspace program.
- The ubi partition contains a "board-config" volume. It stores the MAC Address (0x66 in binary) and Serial No. (0x7c alpha-numerical).
- SoC's temperature sensor always reports that it is on fire. This causes the system to immediately shutdown! Looking at reported "418 degree Celsius" suggests that this sensor is not working.
WIFI:
b43 is able to initialize all three WIFIs @ 802.11bg.
| b43-phy0: Broadcom 43431 WLAN found (core revision 29) | bcma-pci-bridge 0000:01:00.0: bus1: Switched to core: 0x812 | b43-phy0: Found PHY: Analog 9, Type 7 (HT), Revision 1 | b43-phy0: Found Radio: Manuf 0x17F, ID 0x2059, Revision 0, Version 1 | b43-phy0 warning: 5 GHz band is unsupported on this PHY | b43-phy1: Broadcom 43431 WLAN found (core revision 29) | bcma-pci-bridge 0001:01:00.0: bus2: Switched to core: 0x812 | b43-phy1: Found PHY: Analog 9, Type 7 (HT), Revision 1 | b43-phy1: Found Radio: Manuf 0x17F, ID 0x2059, Revision 0, Version 1 | b43-phy1 warning: 5 GHz band is unsupported on this PHY | b43-phy2: Broadcom 43228 WLAN found (core revision 30) | bcma-pci-bridge 0002:01:00.0: bus3: Switched to core: 0x812 | b43-phy2: Found PHY: Analog 9, Type 4 (N), Revision 16 | b43-phy2: Found Radio: Manuf 0x17F, ID 0x2057, Revision 9, Version 1 | Broadcom 43xx driver loaded [ Features: NL ]
--- arch/arm/boot/dts/Makefile | 1 + arch/arm/boot/dts/bcm53015-meraki-mr26.dts | 166 +++++++++++++++++++++ 2 files changed, 167 insertions(+) create mode 100644 arch/arm/boot/dts/bcm53015-meraki-mr26.dts
arch/arm/boot/dts/Makefile +1 -0
@@ -133,6 +133,7 @@ dtb-$(CONFIG_ARCH_BCM_5301X) += \ bcm47094-luxul-xwr-3150-v1.dtb \ bcm47094-netgear-r8500.dtb \ bcm47094-phicomm-k3.dtb \ + bcm53015-meraki-mr26.dtb \ bcm53016-meraki-mr32.dtb \ bcm94708.dtb \ bcm94709.dtb \
arch/arm/boot/dts/bcm53015-meraki-mr26.dts new file +166 -0
166 lines not on this page · raw message
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 157/1095 ARM: dts: ux500: Fix Janice accelerometer mounting matrix
In reply to Greg Kroah-HartmanFrom: Linus Walleij <[email protected]>
[ Upstream commit 013fda41c03e6bcb3dc416669187b609e9e5fdbc ]
This was fixed wrong so fix it again. Now verified by using iio-sensor-proxy monitor-sensor test program.
--- arch/arm/boot/dts/ste-ux500-samsung-janice.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/boot/dts/ste-ux500-samsung-janice.dts +2 -2
@@ -610,8 +610,8 @@ i2c-gate { accelerometer@8 { compatible = "bosch,bma222"; reg = <0x08>; - mount-matrix = "0", "1", "0", - "-1", "0", "0", + mount-matrix = "0", "-1", "0", + "1", "0", "0", "0", "0", "1"; vddio-supply = <&ab8500_ldo_aux2_reg>; // 1.8V vdd-supply = <&ab8500_ldo_aux1_reg>; // 3V
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 158/1095 ARM: dts: ux500: Fix Codina accelerometer mounting matrix
In reply to Greg Kroah-HartmanFrom: Linus Walleij <[email protected]>
[ Upstream commit 0b2152e428ab91533a02888ff24e52e788dc4637 ]
This was fixed wrong so fix it again. Now verified by using iio-sensor-proxy monitor-sensor test program.
--- arch/arm/boot/dts/ste-ux500-samsung-codina.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/boot/dts/ste-ux500-samsung-codina.dts +2 -2
@@ -566,8 +566,8 @@ lisd3dh@19 { reg = <0x19>; vdd-supply = <&ab8500_ldo_aux1_reg>; // 3V vddio-supply = <&ab8500_ldo_aux2_reg>; // 1.8V - mount-matrix = "0", "-1", "0", - "1", "0", "0", + mount-matrix = "0", "1", "0", + "-1", "0", "0", "0", "0", "1"; }; };
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 159/1095 ARM: dts: ux500: Fix Gavini accelerometer mounting matrix
In reply to Greg Kroah-HartmanFrom: Linus Walleij <[email protected]>
[ Upstream commit e24c75f02a81d6ddac0072cbd7a03e799c19d558 ]
This was fixed wrong so fix it. Now verified by using iio-sensor-proxy monitor-sensor test program.
--- arch/arm/boot/dts/ste-ux500-samsung-gavini.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/boot/dts/ste-ux500-samsung-gavini.dts +2 -2
@@ -523,8 +523,8 @@ i2c-gate { accelerometer@18 { compatible = "bosch,bma222e"; reg = <0x18>; - mount-matrix = "0", "1", "0", - "-1", "0", "0", + mount-matrix = "0", "-1", "0", + "1", "0", "0", "0", "0", "1"; vddio-supply = <&ab8500_ldo_aux2_reg>; // 1.8V vdd-supply = <&ab8500_ldo_aux1_reg>; // 3V
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 160/1095 arm64: dts: qcom: timer should use only 32-bit size
In reply to Greg Kroah-HartmanFrom: David Heidelberg <[email protected]>
[ Upstream commit 458ebdbb8e5d596a462d8125cec74142ff5dfa97 ]
There's no reason the timer needs > 32-bits of address or size. Since we using 32-bit size, we need to define ranges properly.
Fixes warnings as:
```
arch/arm64/boot/dts/qcom/sdm845-oneplus-fajita.dt.yaml: timer@17c90000: #size-cells:0:0: 1 was expected
From schema: Documentation/devicetree/bindings/timer/arm,arch_timer_mmio.yaml
```--- arch/arm64/boot/dts/qcom/ipq6018.dtsi | 22 +++++++++++----------- arch/arm64/boot/dts/qcom/sc7180.dtsi | 22 +++++++++++----------- arch/arm64/boot/dts/qcom/sc7280.dtsi | 22 +++++++++++----------- arch/arm64/boot/dts/qcom/sdm845.dtsi | 22 +++++++++++----------- arch/arm64/boot/dts/qcom/sm6350.dtsi | 22 +++++++++++----------- arch/arm64/boot/dts/qcom/sm8150.dtsi | 22 +++++++++++----------- arch/arm64/boot/dts/qcom/sm8250.dtsi | 22 +++++++++++----------- arch/arm64/boot/dts/qcom/sm8350.dtsi | 22 +++++++++++----------- arch/arm64/boot/dts/qcom/sm8450.dtsi | 22 +++++++++++----------- 9 files changed, 99 insertions(+), 99 deletions(-)
arch/arm64/boot/dts/qcom/ipq6018.dtsi +11 -11
@@ -525,9 +525,9 @@ timer { }; timer@b120000 { - #address-cells = <2>; - #size-cells = <2>; - ranges; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0 0 0 0x10000000>; compatible = "arm,armv7-timer-mem"; reg = <0x0 0x0b120000 0x0 0x1000>;
@@ -535,49 +535,49 @@ frame@b120000 { frame-number = <0>; interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>, <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>; - reg = <0x0 0x0b121000 0x0 0x1000>, - <0x0 0x0b122000 0x0 0x1000>; + reg = <0x0b121000 0x1000>, + <0x0b122000 0x1000>; }; frame@b123000 { frame-number = <1>; interrupts = <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>; - reg = <0x0 0xb123000 0x0 0x1000>; + reg = <0x0b123000 0x1000>; status = "disabled"; }; frame@b124000 { frame-number = <2>; interrupts = <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>; - reg = <0x0 0x0b124000 0x0 0x1000>; + reg = <0x0b124000 0x1000>; status = "disabled"; }; frame@b125000 { frame-number = <3>; interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>; - reg = <0x0 0x0b125000 0x0 0x1000>; + reg = <0x0b125000 0x1000>; status = "disabled"; }; frame@b126000 { frame-number = <4>; interrupts = <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>; - reg = <0x0 0x0b126000 0x0 0x1000>; + reg = <0x0b126000 0x1000>; status = "disabled"; }; frame@b127000 { frame-number = <5>; interrupts = <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>; - reg = <0x0 0x0b127000 0x0 0x1000>; + reg = <0x0b127000 0x1000>; status = "disabled"; }; frame@b128000 { frame-number = <6>; interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>; - reg = <0x0 0x0b128000 0x0 0x1000>; + reg = <0x0b128000 0x1000>; status = "disabled"; }; };
arch/arm64/boot/dts/qcom/sc7180.dtsi +11 -11
@@ -3388,9 +3388,9 @@ watchdog@17c10000 { }; timer@17c20000{ - #address-cells = <2>; - #size-cells = <2>; - ranges; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0 0 0 0x20000000>; compatible = "arm,armv7-timer-mem"; reg = <0 0x17c20000 0 0x1000>;
@@ -3398,49 +3398,49 @@ frame@17c21000 { frame-number = <0>; interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>, <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>; - reg = <0 0x17c21000 0 0x1000>, - <0 0x17c22000 0 0x1000>; + reg = <0x17c21000 0x1000>, + <0x17c22000 0x1000>; }; frame@17c23000 { frame-number = <1>; interrupts = <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>; - reg = <0 0x17c23000 0 0x1000>; + reg = <0x17c23000 0x1000>; status = "disabled"; }; frame@17c25000 { frame-number = <2>; interrupts = <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>; - reg = <0 0x17c25000 0 0x1000>; + reg = <0x17c25000 0x1000>; status = "disabled"; }; frame@17c27000 { frame-number = <3>; interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>; - reg = <0 0x17c27000 0 0x1000>; + reg = <0x17c27000 0x1000>; status = "disabled"; }; frame@17c29000 { frame-number = <4>; interrupts = <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>; - reg = <0 0x17c29000 0 0x1000>; + reg = <0x17c29000 0x1000>; status = "disabled"; }; frame@17c2b000 { frame-number = <5>; interrupts = <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>; - reg = <0 0x17c2b000 0 0x1000>; + reg = <0x17c2b000 0x1000>; status = "disabled"; }; frame@17c2d000 { frame-number = <6>; interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>; - reg = <0 0x17c2d000 0 0x1000>; + reg = <0x17c2d000 0x1000>; status = "disabled"; }; };
arch/arm64/boot/dts/qcom/sc7280.dtsi +11 -11
@@ -4395,9 +4395,9 @@ watchdog@17c10000 { }; timer@17c20000 { - #address-cells = <2>; - #size-cells = <2>; - ranges; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0 0 0 0x20000000>; compatible = "arm,armv7-timer-mem"; reg = <0 0x17c20000 0 0x1000>;
@@ -4405,49 +4405,49 @@ frame@17c21000 { frame-number = <0>; interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>, <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>; - reg = <0 0x17c21000 0 0x1000>, - <0 0x17c22000 0 0x1000>; + reg = <0x17c21000 0x1000>, + <0x17c22000 0x1000>; }; frame@17c23000 { frame-number = <1>; interrupts = <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>; - reg = <0 0x17c23000 0 0x1000>; + reg = <0x17c23000 0x1000>; status = "disabled"; }; frame@17c25000 { frame-number = <2>; interrupts = <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>; - reg = <0 0x17c25000 0 0x1000>; + reg = <0x17c25000 0x1000>; status = "disabled"; }; frame@17c27000 { frame-number = <3>; interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>; - reg = <0 0x17c27000 0 0x1000>; + reg = <0x17c27000 0x1000>; status = "disabled"; }; frame@17c29000 { frame-number = <4>; interrupts = <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>; - reg = <0 0x17c29000 0 0x1000>; + reg = <0x17c29000 0x1000>; status = "disabled"; }; frame@17c2b000 { frame-number = <5>; interrupts = <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>; - reg = <0 0x17c2b000 0 0x1000>; + reg = <0x17c2b000 0x1000>; status = "disabled"; }; frame@17c2d000 { frame-number = <6>; interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>; - reg = <0 0x17c2d000 0 0x1000>; + reg = <0x17c2d000 0x1000>; status = "disabled"; }; };
arch/arm64/boot/dts/qcom/sdm845.dtsi +11 -11
@@ -4942,9 +4942,9 @@ slimbam: dma-controller@17184000 { }; timer@17c90000 { - #address-cells = <2>; - #size-cells = <2>; - ranges; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0 0 0 0x20000000>; compatible = "arm,armv7-timer-mem"; reg = <0 0x17c90000 0 0x1000>;
@@ -4952,49 +4952,49 @@ frame@17ca0000 { frame-number = <0>; interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>, <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>; - reg = <0 0x17ca0000 0 0x1000>, - <0 0x17cb0000 0 0x1000>; + reg = <0x17ca0000 0x1000>, + <0x17cb0000 0x1000>; }; frame@17cc0000 { frame-number = <1>; interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>; - reg = <0 0x17cc0000 0 0x1000>; + reg = <0x17cc0000 0x1000>; status = "disabled"; }; frame@17cd0000 { frame-number = <2>; interrupts = <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>; - reg = <0 0x17cd0000 0 0x1000>; + reg = <0x17cd0000 0x1000>; status = "disabled"; }; frame@17ce0000 { frame-number = <3>; interrupts = <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>; - reg = <0 0x17ce0000 0 0x1000>; + reg = <0x17ce0000 0x1000>; status = "disabled"; }; frame@17cf0000 { frame-number = <4>; interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>; - reg = <0 0x17cf0000 0 0x1000>; + reg = <0x17cf0000 0x1000>; status = "disabled"; }; frame@17d00000 { frame-number = <5>; interrupts = <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>; - reg = <0 0x17d00000 0 0x1000>; + reg = <0x17d00000 0x1000>; status = "disabled"; }; frame@17d10000 { frame-number = <6>; interrupts = <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>; - reg = <0 0x17d10000 0 0x1000>; + reg = <0x17d10000 0x1000>; status = "disabled"; }; };
arch/arm64/boot/dts/qcom/sm6350.dtsi +11 -11
@@ -1090,57 +1090,57 @@ timer@17c20000 { compatible = "arm,armv7-timer-mem"; reg = <0x0 0x17c20000 0x0 0x1000>; clock-frequency = <19200000>; - #address-cells = <2>; - #size-cells = <2>; - ranges; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0 0 0 0x20000000>; frame@17c21000 { frame-number = <0>; interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>, <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>; - reg = <0x0 0x17c21000 0x0 0x1000>, - <0x0 0x17c22000 0x0 0x1000>; + reg = <0x17c21000 0x1000>, + <0x17c22000 0x1000>; }; frame@17c23000 { frame-number = <1>; interrupts = <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>; - reg = <0x0 0x17c23000 0x0 0x1000>; + reg = <0x17c23000 0x1000>; status = "disabled"; }; frame@17c25000 { frame-number = <2>; interrupts = <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>; - reg = <0x0 0x17c25000 0x0 0x1000>; + reg = <0x17c25000 0x1000>; status = "disabled"; }; frame@17c27000 { frame-number = <3>; interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>; - reg = <0x0 0x17c27000 0x0 0x1000>; + reg = <0x17c27000 0x1000>; status = "disabled"; }; frame@17c29000 { frame-number = <4>; interrupts = <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>; - reg = <0x0 0x17c29000 0x0 0x1000>; + reg = <0x17c29000 0x1000>; status = "disabled"; }; frame@17c2b000 { frame-number = <5>; interrupts = <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>; - reg = <0x0 0x17c2b000 0x0 0x1000>; + reg = <0x17c2b000 0x1000>; status = "disabled"; }; frame@17c2d000 { frame-number = <6>; interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>; - reg = <0x0 0x17c2d000 0x0 0x1000>; + reg = <0x17c2d000 0x1000>; status = "disabled"; }; };
arch/arm64/boot/dts/qcom/sm8150.dtsi +11 -11
@@ -3608,9 +3608,9 @@ watchdog@17c10000 { }; timer@17c20000 { - #address-cells = <2>; - #size-cells = <2>; - ranges; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0 0 0 0x20000000>; compatible = "arm,armv7-timer-mem"; reg = <0x0 0x17c20000 0x0 0x1000>; clock-frequency = <19200000>;
@@ -3619,49 +3619,49 @@ frame@17c21000{ frame-number = <0>; interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>, <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>; - reg = <0x0 0x17c21000 0x0 0x1000>, - <0x0 0x17c22000 0x0 0x1000>; + reg = <0x17c21000 0x1000>, + <0x17c22000 0x1000>; }; frame@17c23000 { frame-number = <1>; interrupts = <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>; - reg = <0x0 0x17c23000 0x0 0x1000>; + reg = <0x17c23000 0x1000>; status = "disabled"; }; frame@17c25000 { frame-number = <2>; interrupts = <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>; - reg = <0x0 0x17c25000 0x0 0x1000>; + reg = <0x17c25000 0x1000>; status = "disabled"; }; frame@17c27000 { frame-number = <3>; interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>; - reg = <0x0 0x17c26000 0x0 0x1000>; + reg = <0x17c26000 0x1000>; status = "disabled"; }; frame@17c29000 { frame-number = <4>; interrupts = <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>; - reg = <0x0 0x17c29000 0x0 0x1000>; + reg = <0x17c29000 0x1000>; status = "disabled"; }; frame@17c2b000 { frame-number = <5>; interrupts = <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>; - reg = <0x0 0x17c2b000 0x0 0x1000>; + reg = <0x17c2b000 0x1000>; status = "disabled"; }; frame@17c2d000 { frame-number = <6>; interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>; - reg = <0x0 0x17c2d000 0x0 0x1000>; + reg = <0x17c2d000 0x1000>; status = "disabled"; }; };
arch/arm64/boot/dts/qcom/sm8250.dtsi +11 -11
@@ -4528,9 +4528,9 @@ watchdog@17c10000 { }; timer@17c20000 { - #address-cells = <2>; - #size-cells = <2>; - ranges; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0 0 0 0x20000000>; compatible = "arm,armv7-timer-mem"; reg = <0x0 0x17c20000 0x0 0x1000>; clock-frequency = <19200000>;
@@ -4539,49 +4539,49 @@ frame@17c21000 { frame-number = <0>; interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>, <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>; - reg = <0x0 0x17c21000 0x0 0x1000>, - <0x0 0x17c22000 0x0 0x1000>; + reg = <0x17c21000 0x1000>, + <0x17c22000 0x1000>; }; frame@17c23000 { frame-number = <1>; interrupts = <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>; - reg = <0x0 0x17c23000 0x0 0x1000>; + reg = <0x17c23000 0x1000>; status = "disabled"; }; frame@17c25000 { frame-number = <2>; interrupts = <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>; - reg = <0x0 0x17c25000 0x0 0x1000>; + reg = <0x17c25000 0x1000>; status = "disabled"; }; frame@17c27000 { frame-number = <3>; interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>; - reg = <0x0 0x17c27000 0x0 0x1000>; + reg = <0x17c27000 0x1000>; status = "disabled"; }; frame@17c29000 { frame-number = <4>; interrupts = <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>; - reg = <0x0 0x17c29000 0x0 0x1000>; + reg = <0x17c29000 0x1000>; status = "disabled"; }; frame@17c2b000 { frame-number = <5>; interrupts = <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>; - reg = <0x0 0x17c2b000 0x0 0x1000>; + reg = <0x17c2b000 0x1000>; status = "disabled"; }; frame@17c2d000 { frame-number = <6>; interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>; - reg = <0x0 0x17c2d000 0x0 0x1000>; + reg = <0x17c2d000 0x1000>; status = "disabled"; }; };
arch/arm64/boot/dts/qcom/sm8350.dtsi +11 -11
@@ -1752,9 +1752,9 @@ intc: interrupt-controller@17a00000 { timer@17c20000 { compatible = "arm,armv7-timer-mem"; - #address-cells = <2>; - #size-cells = <2>; - ranges; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0 0 0 0x20000000>; reg = <0x0 0x17c20000 0x0 0x1000>; clock-frequency = <19200000>;
@@ -1762,49 +1762,49 @@ frame@17c21000 { frame-number = <0>; interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>, <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>; - reg = <0x0 0x17c21000 0x0 0x1000>, - <0x0 0x17c22000 0x0 0x1000>; + reg = <0x17c21000 0x1000>, + <0x17c22000 0x1000>; }; frame@17c23000 { frame-number = <1>; interrupts = <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>; - reg = <0x0 0x17c23000 0x0 0x1000>; + reg = <0x17c23000 0x1000>; status = "disabled"; }; frame@17c25000 { frame-number = <2>; interrupts = <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>; - reg = <0x0 0x17c25000 0x0 0x1000>; + reg = <0x17c25000 0x1000>; status = "disabled"; }; frame@17c27000 { frame-number = <3>; interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>; - reg = <0x0 0x17c27000 0x0 0x1000>; + reg = <0x17c27000 0x1000>; status = "disabled"; }; frame@17c29000 { frame-number = <4>; interrupts = <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>; - reg = <0x0 0x17c29000 0x0 0x1000>; + reg = <0x17c29000 0x1000>; status = "disabled"; }; frame@17c2b000 { frame-number = <5>; interrupts = <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>; - reg = <0x0 0x17c2b000 0x0 0x1000>; + reg = <0x17c2b000 0x1000>; status = "disabled"; }; frame@17c2d000 { frame-number = <6>; interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>; - reg = <0x0 0x17c2d000 0x0 0x1000>; + reg = <0x17c2d000 0x1000>; status = "disabled"; }; };
arch/arm64/boot/dts/qcom/sm8450.dtsi +11 -11
@@ -1203,9 +1203,9 @@ intc: interrupt-controller@17100000 { timer@17420000 { compatible = "arm,armv7-timer-mem"; - #address-cells = <2>; - #size-cells = <2>; - ranges; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0 0 0 0x20000000>; reg = <0x0 0x17420000 0x0 0x1000>; clock-frequency = <19200000>;
@@ -1213,49 +1213,49 @@ frame@17421000 { frame-number = <0>; interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>, <GIC_SPI 6 IRQ_TYPE_LEVEL_HIGH>; - reg = <0x0 0x17421000 0x0 0x1000>, - <0x0 0x17422000 0x0 0x1000>; + reg = <0x17421000 0x1000>, + <0x17422000 0x1000>; }; frame@17423000 { frame-number = <1>; interrupts = <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>; - reg = <0x0 0x17423000 0x0 0x1000>; + reg = <0x17423000 0x1000>; status = "disabled"; }; frame@17425000 { frame-number = <2>; interrupts = <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>; - reg = <0x0 0x17425000 0x0 0x1000>; + reg = <0x17425000 0x1000>; status = "disabled"; }; frame@17427000 { frame-number = <3>; interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>; - reg = <0x0 0x17427000 0x0 0x1000>; + reg = <0x17427000 0x1000>; status = "disabled"; }; frame@17429000 { frame-number = <4>; interrupts = <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>; - reg = <0x0 0x17429000 0x0 0x1000>; + reg = <0x17429000 0x1000>; status = "disabled"; }; frame@1742b000 { frame-number = <5>; interrupts = <GIC_SPI 13 IRQ_TYPE_LEVEL_HIGH>; - reg = <0x0 0x1742b000 0x0 0x1000>; + reg = <0x1742b000 0x1000>; status = "disabled"; }; frame@1742d000 { frame-number = <6>; interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>; - reg = <0x0 0x1742d000 0x0 0x1000>; + reg = <0x1742d000 0x1000>; status = "disabled"; }; };
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 161/1095 spi: synquacer: Add missing clk_disable_unprepare()
In reply to Greg Kroah-HartmanFrom: Guo Mengqi <[email protected]>
[ Upstream commit 917e43de2a56d9b82576f1cc94748261f1988458 ]
Add missing clk_disable_unprepare() in synquacer_spi_resume().
--- drivers/spi/spi-synquacer.c | 1 + 1 file changed, 1 insertion(+)
drivers/spi/spi-synquacer.c +1 -0
@@ -783,6 +783,7 @@ static int __maybe_unused synquacer_spi_resume(struct device *dev) ret =synquacer_spi_enable (master);if (ret) { +clk_disable_unprepare (sspi->clk);dev_err (dev,"failed to enable spi (%d)\n" , ret);return ret; }
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 162/1095 ARM: OMAP2+: display: Fix refcount leak bug
In reply to Greg Kroah-HartmanFrom: Liang He <[email protected]>
[ Upstream commit 50b87a32a79bca6e275918a711fb8cc55e16d739 ]
In omapdss_init_fbdev(), of_find_node_by_name() will return a node pointer with refcount incremented. We should use of_node_put() when it is not used anymore.
Message-Id: <[email protected]>
--- arch/arm/mach-omap2/display.c | 1 + 1 file changed, 1 insertion(+)
arch/arm/mach-omap2/display.c +1 -0
@@ -211,6 +211,7 @@ static int __init omapdss_init_fbdev(void) node =of_find_node_by_name (NULL ,"omap4_padconf_global" );if (node) omap4_dsi_mux_syscon =syscon_node_to_regmap (node); +of_node_put (node);return 0 ; }
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 163/1095 ARM: OMAP2+: pdata-quirks: Fix refcount leak bug
In reply to Greg Kroah-HartmanFrom: Liang He <[email protected]>
[ Upstream commit 5cdbab96bab314c6f2f5e4e8b8a019181328bf5f ]
In pdata_quirks_init_clocks(), the loop contains of_find_node_by_name() but without corresponding of_node_put().
Message-Id: <[email protected]>
--- arch/arm/mach-omap2/pdata-quirks.c | 2 ++ 1 file changed, 2 insertions(+)
arch/arm/mach-omap2/pdata-quirks.c +2 -0
@@ -551,6 +551,8 @@ pdata_quirks_init_clocks(const struct of_device_id *omap_dt_match_table)of_platform_populate (np, omap_dt_match_table, omap_auxdata_lookup,NULL ); + +of_node_put (np); } }
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 164/1095 ACPI: EC: Remove duplicate ThinkPad X1 Carbon 6th entry from DMI quirks
In reply to Greg Kroah-HartmanFrom: Hans de Goede <[email protected]>
[ Upstream commit 0dd6db359e5f206cbf1dd1fd40dd211588cd2725 ]
Somehow the "ThinkPad X1 Carbon 6th" entry ended up twice in the struct dmi_system_id acpi_ec_no_wakeup[] array. Remove one of the entries.
--- drivers/acpi/ec.c | 7 ------- 1 file changed, 7 deletions(-)
drivers/acpi/ec.c +0 -7
@@ -2207,13 +2207,6 @@ static const struct dmi_system_id acpi_ec_no_wakeup[] = { DMI_MATCH(DMI_PRODUCT_FAMILY, "Thinkpad X1 Carbon 6th"), }, }, - { - .ident = "ThinkPad X1 Carbon 6th", - .matches = { -DMI_MATCH (DMI_SYS_VENDOR ,"LENOVO" ), - DMI_MATCH(DMI_PRODUCT_FAMILY, "ThinkPad X1 Carbon 6th"), - }, - }, { .ident = "ThinkPad X1 Yoga 3rd", .matches = {
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 165/1095 ACPI: EC: Drop the EC_FLAGS_IGNORE_DSDT_GPE quirk
In reply to Greg Kroah-HartmanFrom: Hans de Goede <[email protected]>
[ Upstream commit f7090e0ef360d674f08a22fab90e4e209fb1f658 ]
It seems that these quirks are no longer necessary since commit 69b957c26b32 ("ACPI: EC: Fix possible issues related to EC initialization order"), which has fixed this in a generic manner.
There are 3 commits adding DMI entries with this quirk (adding multiple DMI entries per commit). 2/3 commits are from before the generic fix.
Which leaves commit 6306f0431914 ("ACPI: EC: Make more Asus laptops use ECDT _GPE"), which was committed way after the generic fix. But this was just due to slow upstreaming of it. This commit stems from Endless from 15 Aug 2017 (committed upstream 20 May 2021):
https://github.com/endlessm/linux/pull/288
The current code should work fine without this:
1. The EC_FLAGS_IGNORE_DSDT_GPE flag is only checked in ec_parse_device(),
like this:
if (boot_ec && boot_ec_is_ecdt && EC_FLAGS_IGNORE_DSDT_GPE) {
ec->gpe = boot_ec->gpe;
} else {
/* parse GPE */
} 2. ec_parse_device() is only called from acpi_ec_add() and acpi_ec_dsdt_probe()
3. acpi_ec_dsdt_probe() starts with:
if (boot_ec)
return;
so it only calls ec_parse_device() when boot_ec == NULL, meaning that
the quirk never triggers for this call. So only the call in
acpi_ec_add() matters. 4. acpi_ec_add() does the following after the ec_parse_device() call:
if (boot_ec && ec->command_addr == boot_ec->command_addr &&
ec->data_addr == boot_ec->data_addr &&
!EC_FLAGS_TRUST_DSDT_GPE) {
/*
* Trust PNP0C09 namespace location rather than
* ECDT ID. But trust ECDT GPE rather than _GPE
* because of ASUS quirks, so do not change
* boot_ec->gpe to ec->gpe.
*/
boot_ec->handle = ec->handle;
acpi_handle_debug(ec->handle, "duplicated.\n");
acpi_ec_free(ec);
ec = boot_ec;
}The quirk only matters if boot_ec != NULL and EC_FLAGS_TRUST_DSDT_GPE is never set at the same time as EC_FLAGS_IGNORE_DSDT_GPE.
That means that if the addresses match we always enter this if block and then only the ec->handle part of the data stored in ec by ec_parse_device() is used and the rest is thrown away, after which ec is made to point to boot_ec, at which point ec->gpe == boot_ec->gpe, so the same result as with the quirk set, independent of the value of the quirk.
Also note the comment in this block which indicates that the gpe result from ec_parse_device() is deliberately not taken to deal with buggy Asus laptops and all DMI quirks setting EC_FLAGS_IGNORE_DSDT_GPE are for Asus laptops.
Based on the above I believe that unless on some quirked laptops the ECDT and DSDT EC addresses do not match we can drop the quirk.
I've checked dmesg output to ensure the ECDT and DSDT EC addresses match for quirked models using https://linux-hardware.org hw-probe reports.
I've been able to confirm that the addresses match for the following models this way: GL702VMK, X505BA, X505BP, X550VXK, X580VD. Whereas for the following models I could find any dmesg output:
FX502VD, FX502VE, X542BA, X542BP.
Note the models without dmesg all were submitted in patches with a batch of models and other models from the same batch checkout ok.
This, combined with that all the code adding the quirks was written before the generic fix makes me believe that it is safe to remove this quirk now.
--- drivers/acpi/ec.c | 75 ++++++----------------------------------------- 1 file changed, 9 insertions(+), 66 deletions(-)
drivers/acpi/ec.c +9 -66
@@ -180,7 +180,6 @@ static struct workqueue_struct *ec_wq;static struct workqueue_struct *ec_query_wq;static int EC_FLAGS_CORRECT_ECDT ;/* Needs ECDT port address correction */ -static int EC_FLAGS_IGNORE_DSDT_GPE ;/* Needs ECDT GPE as correction setting */ static int EC_FLAGS_TRUST_DSDT_GPE ;/* Needs DSDT GPE as correction setting */ static int EC_FLAGS_CLEAR_ON_RESUME ;/* Needs acpi_ec_clear() on boot/resume */
@@ -1407,24 +1406,16 @@ ec_parse_device(acpi_handle handle, u32 Level, void *context, void **retval)if (ec->data_addr ==0 || ec->command_addr ==0 )return AE_OK ; -if (boot_ec && boot_ec_is_ecdt &&EC_FLAGS_IGNORE_DSDT_GPE ) { -/* -* Always inherit the GPE number setting from the ECDT -* EC. -*/ - ec->gpe = boot_ec->gpe; - }else { -/* Get GPE bit assignment (EC events). */ -/* TODO: Add support for _GPE returning a package */ - status =acpi_evaluate_integer (handle,"_GPE" ,NULL , &tmp); -if (ACPI_SUCCESS (status)) - ec->gpe = tmp; +/* Get GPE bit assignment (EC events). */ +/* TODO: Add support for _GPE returning a package */ + status =acpi_evaluate_integer (handle,"_GPE" ,NULL , &tmp); +if (ACPI_SUCCESS (status)) + ec->gpe = tmp; +/* +* Errors are non-fatal, allowing for ACPI Reduced Hardware +* platforms which use GpioInt instead of GPE. +*/ -/* -* Errors are non-fatal, allowing for ACPI Reduced Hardware -* platforms which use GpioInt instead of GPE. -*/ - }/* Use the global lock for all EC transactions? */ tmp =0 ;acpi_evaluate_integer (handle,"_GLK" ,NULL , &tmp);
@@ -1862,60 +1853,12 @@ static int ec_honor_dsdt_gpe(const struct dmi_system_id *id)return 0 ; } -/* -* Some DSDTs contain wrong GPE setting. -* Asus FX502VD/VE, GL702VMK, X550VXK, X580VD -* https://bugzilla.kernel.org/show_bug.cgi?id=195651 -*/ -static int ec_honor_ecdt_gpe (const struct dmi_system_id *id) -{ -pr_debug ("Detected system needing ignore DSDT GPE setting.\n" ); -EC_FLAGS_IGNORE_DSDT_GPE =1 ; -return 0 ; -} -static const struct dmi_system_id ec_dmi_table[]__initconst = { { ec_correct_ecdt,"MSI MS-171F" , {DMI_MATCH (DMI_SYS_VENDOR ,"Micro-Star" ),DMI_MATCH (DMI_PRODUCT_NAME ,"MS-171F" ),},NULL }, { - ec_honor_ecdt_gpe,"ASUS FX502VD" , { -DMI_MATCH (DMI_SYS_VENDOR ,"ASUSTeK COMPUTER INC." ), -DMI_MATCH (DMI_PRODUCT_NAME ,"FX502VD" ),},NULL }, - { - ec_honor_ecdt_gpe,"ASUS FX502VE" , { -DMI_MATCH (DMI_SYS_VENDOR ,"ASUSTeK COMPUTER INC." ), -DMI_MATCH (DMI_PRODUCT_NAME ,"FX502VE" ),},NULL }, - { - ec_honor_ecdt_gpe,"ASUS GL702VMK" , { -DMI_MATCH (DMI_SYS_VENDOR ,"ASUSTeK COMPUTER INC." ), -DMI_MATCH (DMI_PRODUCT_NAME ,"GL702VMK" ),},NULL }, - { - ec_honor_ecdt_gpe,"ASUSTeK COMPUTER INC. X505BA" , { -DMI_MATCH (DMI_SYS_VENDOR ,"ASUSTeK COMPUTER INC." ), -DMI_MATCH (DMI_PRODUCT_NAME ,"X505BA" ),},NULL }, - { - ec_honor_ecdt_gpe,"ASUSTeK COMPUTER INC. X505BP" , { -DMI_MATCH (DMI_SYS_VENDOR ,"ASUSTeK COMPUTER INC." ), -DMI_MATCH (DMI_PRODUCT_NAME ,"X505BP" ),},NULL }, - { - ec_honor_ecdt_gpe,"ASUSTeK COMPUTER INC. X542BA" , { -DMI_MATCH (DMI_SYS_VENDOR ,"ASUSTeK COMPUTER INC." ), -DMI_MATCH (DMI_PRODUCT_NAME ,"X542BA" ),},NULL }, - { - ec_honor_ecdt_gpe,"ASUSTeK COMPUTER INC. X542BP" , { -DMI_MATCH (DMI_SYS_VENDOR ,"ASUSTeK COMPUTER INC." ), -DMI_MATCH (DMI_PRODUCT_NAME ,"X542BP" ),},NULL }, - { - ec_honor_ecdt_gpe,"ASUS X550VXK" , { -DMI_MATCH (DMI_SYS_VENDOR ,"ASUSTeK COMPUTER INC." ), -DMI_MATCH (DMI_PRODUCT_NAME ,"X550VXK" ),},NULL }, - { - ec_honor_ecdt_gpe,"ASUS X580VD" , { -DMI_MATCH (DMI_SYS_VENDOR ,"ASUSTeK COMPUTER INC." ), -DMI_MATCH (DMI_PRODUCT_NAME ,"X580VD" ),},NULL }, - {/* https://bugzilla.kernel.org/show_bug.cgi?id=209989 */ ec_honor_dsdt_gpe,"HP Pavilion Gaming Laptop 15-cx0xxx" , {DMI_MATCH (DMI_SYS_VENDOR ,"HP" ),
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 166/1095 ACPI: PM: save NVS memory for Lenovo G40-45
In reply to Greg Kroah-HartmanFrom: Manyi Li <[email protected]>
[ Upstream commit 4b7ef7b05afcde44142225c184bf43a0cd9e2178 ]
[821d6f0359b0614792ab8e2fb93b503e25a65079] is to make machines produced from 2012 to now not saving NVS region to accelerate S3.
But, Lenovo G40-45, a platform released in 2015, still needs NVS memory saving during S3. A quirk is introduced for this platform.
--- drivers/acpi/sleep.c | 8 ++++++++ 1 file changed, 8 insertions(+)
drivers/acpi/sleep.c +8 -0
@@ -360,6 +360,14 @@ static const struct dmi_system_id acpisleep_dmi_table[] __initconst = { DMI_MATCH(DMI_PRODUCT_NAME, "80E3"), }, }, + { + .callback = init_nvs_save_s3, + .ident = "Lenovo G40-45", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), + DMI_MATCH(DMI_PRODUCT_NAME, "80E1"), + }, + },/* * ThinkPad X1 Tablet(2016) cannot do suspend-to-idle using * the Low Power S0 Idle firmware interface (see
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 167/1095 ACPI: LPSS: Fix missing check in register_device_clock()
In reply to Greg Kroah-HartmanFrom: huhai <[email protected]>
[ Upstream commit b4f1f61ed5928b1128e60e38d0dffa16966f06dc ]
register_device_clock() misses a check for platform_device_register_simple(). Add a check to fix it.
--- drivers/acpi/acpi_lpss.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/acpi/acpi_lpss.c +3 -0
@@ -422,6 +422,9 @@ static int register_device_clock(struct acpi_device *adev,if (!lpss_clk_dev)lpt_register_clock_device (); +if (IS_ERR (lpss_clk_dev)) +return PTR_ERR (lpss_clk_dev); + clk_data =platform_get_drvdata (lpss_clk_dev);if (!clk_data)return -ENODEV ;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 168/1095 ARM: dts: qcom: sdx55: Fix the IRQ trigger type for UART
In reply to Greg Kroah-HartmanFrom: Manivannan Sadhasivam <[email protected]>
[ Upstream commit ae500b351ab0006d933d804a2b7507fe1e98cecc ]
The trigger type should be LEVEL_HIGH. So fix it!
--- arch/arm/boot/dts/qcom-sdx55.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/qcom-sdx55.dtsi +1 -1
@@ -206,7 +206,7 @@ gcc: clock-controller@100000 { blsp1_uart3: serial@831000 { compatible = "qcom,msm-uartdm-v1.4", "qcom,msm-uartdm"; reg = <0x00831000 0x200>; - interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_LOW>; + interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>; clocks = <&gcc 30>, <&gcc 9>; clock-names = "core", "iface";
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 169/1095 arm64: dts: qcom: add missing AOSS QMP compatible fallback
In reply to Greg Kroah-HartmanFrom: Krzysztof Kozlowski <[email protected]>
[ Upstream commit 6ba93ba9f63fbc44c3a6af7fe6f2536d009cfd5a ]
The AOSS QMP bindings expect all compatibles to be followed by fallback "qcom,aoss-qmp" because all of these are actually compatible with each other. This fixes dtbs_check warnings like:
sm8250-hdk.dtb: power-controller@c300000: compatible: ['qcom,sm8250-aoss-qmp'] is too short
--- arch/arm64/boot/dts/qcom/sc7180.dtsi | 2 +- arch/arm64/boot/dts/qcom/sc7280.dtsi | 2 +- arch/arm64/boot/dts/qcom/sm8150.dtsi | 2 +- arch/arm64/boot/dts/qcom/sm8250.dtsi | 2 +- arch/arm64/boot/dts/qcom/sm8350.dtsi | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-)
arch/arm64/boot/dts/qcom/sc7180.dtsi +1 -1
@@ -3219,7 +3219,7 @@ aoss_reset: reset-controller@c2a0000 { }; aoss_qmp: power-controller@c300000 { - compatible = "qcom,sc7180-aoss-qmp"; + compatible = "qcom,sc7180-aoss-qmp", "qcom,aoss-qmp"; reg = <0 0x0c300000 0 0x400>; interrupts = <GIC_SPI 389 IRQ_TYPE_EDGE_RISING>; mboxes = <&apss_shared 0>;
arch/arm64/boot/dts/qcom/sc7280.dtsi +1 -1
@@ -3467,7 +3467,7 @@ aoss_reset: reset-controller@c2a0000 { }; aoss_qmp: power-controller@c300000 { - compatible = "qcom,sc7280-aoss-qmp"; + compatible = "qcom,sc7280-aoss-qmp", "qcom,aoss-qmp"; reg = <0 0x0c300000 0 0x400>; interrupts-extended = <&ipcc IPCC_CLIENT_AOP IPCC_MPROC_SIGNAL_GLINK_QMP
arch/arm64/boot/dts/qcom/sm8150.dtsi +1 -1
@@ -3382,7 +3382,7 @@ camnoc_virt: interconnect@ac00000 { }; aoss_qmp: power-controller@c300000 { - compatible = "qcom,sm8150-aoss-qmp"; + compatible = "qcom,sm8150-aoss-qmp", "qcom,aoss-qmp"; reg = <0x0 0x0c300000 0x0 0x400>; interrupts = <GIC_SPI 389 IRQ_TYPE_EDGE_RISING>; mboxes = <&apss_shared 0>;
arch/arm64/boot/dts/qcom/sm8250.dtsi +1 -1
@@ -3475,7 +3475,7 @@ tsens1: thermal-sensor@c265000 { }; aoss_qmp: power-controller@c300000 { - compatible = "qcom,sm8250-aoss-qmp"; + compatible = "qcom,sm8250-aoss-qmp", "qcom,aoss-qmp"; reg = <0 0x0c300000 0 0x400>; interrupts-extended = <&ipcc IPCC_CLIENT_AOP IPCC_MPROC_SIGNAL_GLINK_QMP
arch/arm64/boot/dts/qcom/sm8350.dtsi +1 -1
@@ -1537,7 +1537,7 @@ tsens1: thermal-sensor@c265000 { }; aoss_qmp: power-controller@c300000 { - compatible = "qcom,sm8350-aoss-qmp"; + compatible = "qcom,sm8350-aoss-qmp", "qcom,aoss-qmp"; reg = <0 0x0c300000 0 0x400>; interrupts-extended = <&ipcc IPCC_CLIENT_AOP IPCC_MPROC_SIGNAL_GLINK_QMP IRQ_TYPE_EDGE_RISING>;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 170/1095 arm64: dts: qcom: ipq8074: fix NAND node name
In reply to Greg Kroah-HartmanFrom: Robert Marko <[email protected]>
[ Upstream commit b39961659ffc3c3a9e3d0d43b0476547b5f35d49 ]
Per schema it should be nand-controller@79b0000 instead of nand@79b0000. Fix it to match nand-controller.yaml requirements.
--- arch/arm64/boot/dts/qcom/ipq8074.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/qcom/ipq8074.dtsi +1 -1
@@ -534,7 +534,7 @@ qpic_bam: dma-controller@7984000 { status = "disabled"; }; - qpic_nand: nand@79b0000 { + qpic_nand: nand-controller@79b0000 { compatible = "qcom,ipq8074-nand"; reg = <0x079b0000 0x10000>; #address-cells = <1>;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 171/1095 arm64: dts: allwinner: a64: orangepi-win: Fix LED node name
In reply to Greg Kroah-HartmanFrom: Samuel Holland <[email protected]>
[ Upstream commit b8eb2df19fbf97aa1e950cf491232c2e3bef8357 ]
"status" does not match any pattern in the gpio-leds binding. Rename the node to the preferred pattern. This fixes a make dtbs_check error.
--- arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/allwinner/sun50i-a64-orangepi-win.dts +1 -1
@@ -40,7 +40,7 @@ hdmi_con_in: endpoint { leds { compatible = "gpio-leds"; - status { + led-0 { label = "orangepi:green:status"; gpios = <&pio 7 11 GPIO_ACTIVE_HIGH>; /* PH11 */ };
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 172/1095 ARM: shmobile: rcar-gen2: Increase refcount for new reference
In reply to Greg Kroah-HartmanFrom: Liang He <[email protected]>
[ Upstream commit 75a185fb92e58ccd3670258d8d3b826bd2fa6d29 ]
In rcar_gen2_regulator_quirk(), for_each_matching_node_and_match() will automatically increase and decrease the refcount. However, we should call of_node_get() for the new reference created in 'quirk->np'. Besides, we also should call of_node_put() before the 'quirk' being freed.
--- arch/arm/mach-shmobile/regulator-quirk-rcar-gen2.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
arch/arm/mach-shmobile/regulator-quirk-rcar-gen2.c +4 -1
@@ -125,6 +125,7 @@ static int regulator_quirk_notify(struct notifier_block *nb,list_for_each_entry_safe (pos, tmp, &quirk_list, list) {list_del (&pos->list); +of_node_put (pos->np);kfree (pos); }
@@ -174,11 +175,12 @@ static int __init rcar_gen2_regulator_quirk(void)memcpy (&quirk->i2c_msg, id->data,sizeof (quirk->i2c_msg)); quirk->id = id; - quirk->np = np; + quirk->np =of_node_get (np); quirk->i2c_msg.addr = addr; ret =of_irq_parse_one (np,0 , argsa);if (ret) {/* Skip invalid entry and continue */ +of_node_put (np);kfree (quirk);continue ; }
@@ -225,6 +227,7 @@ static int __init rcar_gen2_regulator_quirk(void) err_mem:list_for_each_entry_safe (pos, tmp, &quirk_list, list) {list_del (&pos->list); +of_node_put (pos->np);kfree (pos); }
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 173/1095 firmware: tegra: Fix error check return value of debugfs_create_file()
In reply to Greg Kroah-HartmanFrom: Lv Ruyi <[email protected]>
[ Upstream commit afcdb8e55c91c6ff0700ab272fd0f74e899ab884 ]
If an error occurs, debugfs_create_file() will return ERR_PTR(-ERROR), so use IS_ERR() to check it.
--- drivers/firmware/tegra/bpmp-debugfs.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/firmware/tegra/bpmp-debugfs.c +5 -5
@@ -474,7 +474,7 @@ static int bpmp_populate_debugfs_inband(struct tegra_bpmp *bpmp, mode |= attrs &DEBUGFS_S_IWUSR ?0200 :0 ; dentry =debugfs_create_file (name, mode, parent, bpmp, &bpmp_debug_fops); -if (!dentry) { +if (IS_ERR (dentry)) { err = -ENOMEM ; goto out; }
@@ -725,7 +725,7 @@ static int bpmp_populate_dir(struct tegra_bpmp *bpmp, struct seqbuf *seqbuf,if (t &DEBUGFS_S_ISDIR ) { dentry =debugfs_create_dir (name, parent); -if (!dentry) +if (IS_ERR (dentry))return -ENOMEM ; err =bpmp_populate_dir (bpmp, seqbuf, dentry, depth+1 );if (err <0 )
@@ -738,7 +738,7 @@ static int bpmp_populate_dir(struct tegra_bpmp *bpmp, struct seqbuf *seqbuf, dentry =debugfs_create_file (name, mode, parent, bpmp, &debugfs_fops); -if (!dentry) +if (IS_ERR (dentry))return -ENOMEM ; } }
@@ -788,11 +788,11 @@ int tegra_bpmp_init_debugfs(struct tegra_bpmp *bpmp)return 0 ; root =debugfs_create_dir ("bpmp" ,NULL ); -if (!root) +if (IS_ERR (root))return -ENOMEM ; bpmp->debugfs_mirror =debugfs_create_dir ("debug" , root); -if (!bpmp->debugfs_mirror) { +if (IS_ERR (bpmp->debugfs_mirror)) { err = -ENOMEM ; goto out; }
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 174/1095 hwmon: (dell-smm) Add Dell XPS 13 7390 to fan control whitelist
In reply to Greg Kroah-HartmanFrom: Armin Wolf <[email protected]>
[ Upstream commit 385e5f57053ff293282fea84c1c27186d53f66e1 ]
A user reported that the program dell-bios-fan-control worked on his Dell XPS 13 7390 to switch off automatic fan control.
Since it uses the same mechanism as the dell_smm_hwmon module, add this model to the fan control whitelist.
Compile-tested only.
--- drivers/hwmon/dell-smm-hwmon.c | 8 ++++++++ 1 file changed, 8 insertions(+)
drivers/hwmon/dell-smm-hwmon.c +8 -0
@@ -1262,6 +1262,14 @@ static const struct dmi_system_id i8k_whitelist_fan_control[] __initconst = { }, .driver_data = (void *)&i8k_fan_control_data[I8K_FAN_34A3_35A3], }, + { + .ident = "Dell XPS 13 7390", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), + DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "XPS 13 7390"), + }, + .driver_data = (void *)&i8k_fan_control_data[I8K_FAN_34A3_35A3], + }, { } };
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 175/1095 ACPI: video: Use native backlight on Dell Inspiron N4010
In reply to Greg Kroah-HartmanFrom: Hans de Goede <[email protected]>
[ Upstream commit 03c440a26cba6cfa540d65924e9db86fcea362b2 ]
The Dell Inspiron N4010 does not have ACPI backlight control, so acpi_video_get_backlight_type()'s heuristics return vendor as the type to use.
But the vendor interface is broken, where as the native (intel_backlight) works well, add a quirk to use native.
--- drivers/acpi/video_detect.c | 8 ++++++++ 1 file changed, 8 insertions(+)
drivers/acpi/video_detect.c +8 -0
@@ -347,6 +347,14 @@ static const struct dmi_system_id video_detect_dmi_table[] = { DMI_MATCH(DMI_PRODUCT_NAME, "MacBookPro12,1"), }, }, + { + .callback = video_detect_force_native, +/* Dell Inspiron N4010 */ + .matches = { +DMI_MATCH (DMI_SYS_VENDOR ,"Dell Inc." ), + DMI_MATCH(DMI_PRODUCT_NAME, "Inspiron N4010"), + }, + }, { .callback = video_detect_force_native,/* Dell Vostro V131 */
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 176/1095 hwmon: (sht15) Fix wrong assumptions in device remove callback
In reply to Greg Kroah-HartmanFrom: Uwe Kleine-König <[email protected]>
[ Upstream commit 7d4edccc9bbfe1dcdff641343f7b0c6763fbe774 ]
Taking a lock at the beginning of .remove() doesn't prevent new readers. With the existing approach it can happen, that a read occurs just when the lock was taken blocking the reader until the lock is released at the end of the remove callback which then accessed *data that is already freed then.
To actually fix this problem the hwmon core needs some adaption. Until this is implemented take the optimistic approach of assuming that all readers are gone after hwmon_device_unregister() and sysfs_remove_group() as most other drivers do. (And once the core implements that, taking the lock would deadlock.)
So drop the lock, move the reset to after device unregistration to keep the device in a workable state until it's deregistered. Also add a error message in case the reset fails and return 0 anyhow. (Returning an error code, doesn't stop the platform device unregistration and only results in a little helpful error message before the devm cleanup handlers are called.)
--- drivers/hwmon/sht15.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-)
drivers/hwmon/sht15.c +6 -11
@@ -1020,25 +1020,20 @@ static int sht15_probe(struct platform_device *pdev)static int sht15_remove (struct platform_device *pdev) {struct sht15_data *data =platform_get_drvdata (pdev); +int ret; -/* -* Make sure any reads from the device are done and -* prevent new ones beginning -*/ -mutex_lock (&data->read_lock); -if (sht15_soft_reset (data)) { -mutex_unlock (&data->read_lock); -return -EFAULT ; - }hwmon_device_unregister (data->hwmon_dev);sysfs_remove_group (&pdev->dev.kobj, &sht15_attr_group); + + ret =sht15_soft_reset (data); +if (ret) +dev_err (&pdev->dev,"Failed to reset device (%pe)\n" ,ERR_PTR (ret)); +if (!IS_ERR (data->reg)) {regulator_unregister_notifier (data->reg, &data->nb);regulator_disable (data->reg); } -mutex_unlock (&data->read_lock); -return 0 ; }
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 177/1095 PM: hibernate: defer device probing when resuming from hibernation
In reply to Greg Kroah-HartmanFrom: Tetsuo Handa <[email protected]>
[ Upstream commit 8386c414e27caba8501119948e9551e52b527f59 ]
syzbot is reporting hung task at misc_open() [1], for there is a race window of AB-BA deadlock which involves probe_count variable. Currently wait_for_device_probe() from snapshot_open() from misc_open() can sleep forever with misc_mtx held if probe_count cannot become 0.
When a device is probed by hub_event() work function, probe_count is incremented before the probe function starts, and probe_count is decremented after the probe function completed.
There are three cases that can prevent probe_count from dropping to 0.
(a) A device being probed stopped responding (i.e. broken/malicious hardware).
(b) A process emulating a USB device using /dev/raw-gadget interface stopped responding for some reason.
(c) New device probe requests keeps coming in before existing device probe requests complete.
The phenomenon syzbot is reporting is (b). A process which is holding system_transition_mutex and misc_mtx is waiting for probe_count to become 0 inside wait_for_device_probe(), but the probe function which is called
from hub_event() work function is waiting for the processes which are
blocked at mutex_lock(&misc_mtx) to respond via /dev/raw-gadget interface.
This patch mitigates (b) by deferring wait_for_device_probe() from snapshot_open() to snapshot_write() and snapshot_ioctl(). Please note that the possibility of (b) remains as long as any thread which is emulating a USB device via /dev/raw-gadget interface can be blocked by uninterruptible blocking operations (e.g. mutex_lock()).
Please also note that (a) and (c) are not addressed. Regarding (c), we should change the code to wait for only one device which contains the image for resuming from hibernation. I don't know how to address (a), for use of timeout for wait_for_device_probe() might result in loss of user data in the image. Maybe we should require the userland to wait for the image device before opening /dev/snapshot interface.
--- kernel/power/user.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-)
kernel/power/user.c +12 -1
@@ -26,6 +26,7 @@#include "power.h" +static bool need_wait; static struct snapshot_data { struct snapshot_handle handle;
@@ -78,7 +79,7 @@ static int snapshot_open(struct inode *inode, struct file *filp)* Resuming. We may need to wait for the image device to * appear. */ -wait_for_device_probe (); + need_wait = true; data->swap =-1 ; data->mode =O_WRONLY ;
@@ -168,6 +169,11 @@ static ssize_t snapshot_write(struct file *filp, const char __user *buf,ssize_t res;loff_t pg_offp = *offp & ~PAGE_MASK ; +if (need_wait) { +wait_for_device_probe (); + need_wait = false; + } +lock_system_sleep (); data = filp->private_data;
@@ -244,6 +250,11 @@ static long snapshot_ioctl(struct file *filp, unsigned int cmd,loff_t size;sector_t offset; +if (need_wait) { +wait_for_device_probe (); + need_wait = false; + } +if (_IOC_TYPE (cmd) !=SNAPSHOT_IOC_MAGIC )return -ENOTTY ;if (_IOC_NR (cmd) >SNAPSHOT_IOC_MAXNR )
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 178/1095 selinux: fix memleak in security_read_state_kernel()
In reply to Greg Kroah-HartmanFrom: Xiu Jianfeng <[email protected]>
[ Upstream commit 73de1befcc53a7c68b0c5e76b9b5ac41c517760f ]
In this function, it directly returns the result of __security_read_policy without freeing the allocated memory in *data, cause memory leak issue, so free the memory if __security_read_policy failed.
--- security/selinux/ss/services.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
security/selinux/ss/services.c +8 -1
@@ -4049,6 +4049,7 @@ int security_read_policy(struct selinux_state *state,int security_read_state_kernel (struct selinux_state *state,void **data,size_t *len) { +int err;struct selinux_policy *policy; policy = rcu_dereference_protected(
@@ -4061,5 +4062,11 @@ int security_read_state_kernel(struct selinux_state *state,if (!*data)return -ENOMEM ; -return __security_read_policy (policy, *data, len); + err =__security_read_policy (policy, *data, len); +if (err) { +vfree (*data); + *data =NULL ; + *len =0 ; + } +return err; }
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 179/1095 selinux: Add boundary check in put_entry()
In reply to Greg Kroah-HartmanFrom: Xiu Jianfeng <[email protected]>
[ Upstream commit 15ec76fb29be31df2bccb30fc09875274cba2776 ]
Just like next_entry(), boundary check is necessary to prevent memory out-of-bound access.
--- security/selinux/ss/policydb.h | 2 ++ 1 file changed, 2 insertions(+)
security/selinux/ss/policydb.h +2 -0
@@ -370,6 +370,8 @@ static inline int put_entry(const void *buf, size_t bytes, int num, struct polic {size_t len = bytes * num; +if (len > fp->len) +return -EINVAL ;memcpy (fp->data, buf, len); fp->data += len; fp->len -= len;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 180/1095 kasan: test: Silence GCC 12 warnings
In reply to Greg Kroah-HartmanFrom: Kees Cook <[email protected]>
[ Upstream commit aaf50b1969d7933a51ea421b11432a7fb90974e3 ]
GCC 12 continues to get smarter about array accesses. The KASAN tests are expecting to explicitly test out-of-bounds conditions at run-time, so hide the variable from GCC, to avoid warnings like:
../lib/test_kasan.c: In function 'ksize_uaf':../lib/test_kasan.c:790:61: warning: array subscript 120 is outside array bounds of 'void[120]' [-Warray-bounds]
790 | KUNIT_EXPECT_KASAN_FAIL(test, ((volatile char *)ptr)[size]);
| ~~~~~~~~~~~~~~~~~~~~~~^~~~~~
../lib/test_kasan.c:97:9: note: in definition of macro 'KUNIT_EXPECT_KASAN_FAIL'
97 | expression; \
| ^~~~~~~~~~--- lib/test_kasan.c | 10 ++++++++++ 1 file changed, 10 insertions(+)
lib/test_kasan.c +10 -0
@@ -131,6 +131,7 @@ static void kmalloc_oob_right(struct kunit *test) ptr =kmalloc (size,GFP_KERNEL );KUNIT_ASSERT_NOT_ERR_OR_NULL (test, ptr); +OPTIMIZER_HIDE_VAR (ptr);/* * An unaligned access past the requested kmalloc size. * Only generic KASAN can precisely detect these.
@@ -159,6 +160,7 @@ static void kmalloc_oob_left(struct kunit *test) ptr =kmalloc (size,GFP_KERNEL );KUNIT_ASSERT_NOT_ERR_OR_NULL (test, ptr); +OPTIMIZER_HIDE_VAR (ptr);KUNIT_EXPECT_KASAN_FAIL (test, *ptr = *(ptr -1 ));kfree (ptr); }
@@ -171,6 +173,7 @@ static void kmalloc_node_oob_right(struct kunit *test) ptr =kmalloc_node (size,GFP_KERNEL ,0 );KUNIT_ASSERT_NOT_ERR_OR_NULL (test, ptr); +OPTIMIZER_HIDE_VAR (ptr);KUNIT_EXPECT_KASAN_FAIL (test, ptr[0 ] = ptr[size]);kfree (ptr); }
@@ -191,6 +194,7 @@ static void kmalloc_pagealloc_oob_right(struct kunit *test) ptr =kmalloc (size,GFP_KERNEL );KUNIT_ASSERT_NOT_ERR_OR_NULL (test, ptr); +OPTIMIZER_HIDE_VAR (ptr);KUNIT_EXPECT_KASAN_FAIL (test, ptr[size +OOB_TAG_OFF ] =0 );kfree (ptr);
@@ -271,6 +275,7 @@ static void kmalloc_large_oob_right(struct kunit *test) ptr =kmalloc (size,GFP_KERNEL );KUNIT_ASSERT_NOT_ERR_OR_NULL (test, ptr); +OPTIMIZER_HIDE_VAR (ptr);KUNIT_EXPECT_KASAN_FAIL (test, ptr[size] =0 );kfree (ptr); }
@@ -410,6 +415,8 @@ static void kmalloc_oob_16(struct kunit *test) ptr2 =kmalloc (sizeof (*ptr2),GFP_KERNEL );KUNIT_ASSERT_NOT_ERR_OR_NULL (test, ptr2); +OPTIMIZER_HIDE_VAR (ptr1); +OPTIMIZER_HIDE_VAR (ptr2);KUNIT_EXPECT_KASAN_FAIL (test, *ptr1 = *ptr2);kfree (ptr1);kfree (ptr2);
@@ -756,6 +763,8 @@ static void ksize_unpoisons_memory(struct kunit *test)KUNIT_ASSERT_NOT_ERR_OR_NULL (test, ptr); real_size =ksize (ptr); +OPTIMIZER_HIDE_VAR (ptr); +/* This access shouldn't trigger a KASAN report. */ ptr[size] ='x' ;
@@ -778,6 +787,7 @@ static void ksize_uaf(struct kunit *test)KUNIT_ASSERT_NOT_ERR_OR_NULL (test, ptr);kfree (ptr); +OPTIMIZER_HIDE_VAR (ptr);KUNIT_EXPECT_KASAN_FAIL (test,ksize (ptr));KUNIT_EXPECT_KASAN_FAIL (test, ((volatile char *)ptr)[0 ]);KUNIT_EXPECT_KASAN_FAIL (test, ((volatile char *)ptr)[size]);
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 181/1095 pinctrl: Dont allow PINCTRL_AMD to be a module
In reply to Greg Kroah-HartmanFrom: Mario Limonciello <[email protected]>
[ Upstream commit 41ef3c1a6bb0fd4a3f81170dd17de3adbff80783 ]
It was observed that by allowing pinctrl_amd to be loaded later in the boot process that interrupts sent to the GPIO controller early in the boot are not serviced. The kernel treats these as a spurious IRQ and disables the IRQ.
This problem was exacerbated because it happened on a system with an encrypted partition so the kernel object was not accesssible for an extended period of time while waiting for a passphrase.
To avoid this situation from occurring, stop allowing pinctrl-amd from being built as a module and instead require it to be built-in or disabled.
--- drivers/pinctrl/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pinctrl/Kconfig +1 -1
@@ -32,7 +32,7 @@ config DEBUG_PINCTRL Say Y here to add some extra checks and diagnostics to PINCTRL calls. config PINCTRL_AMD - tristate "AMD GPIO pin control" + bool "AMD GPIO pin control" depends on HAS_IOMEM depends on ACPI || COMPILE_TEST select GPIOLIB
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 182/1095 drm/amdgpu: Remove one duplicated ef removal
In reply to Greg Kroah-HartmanFrom: xinhui pan <[email protected]>
[ Upstream commit e1aadbab445b06e072013a1365fd0cf2aa25e843 ]
That has been done in BO release notify.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 6 ------ 1 file changed, 6 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c +0 -6
@@ -1401,16 +1401,10 @@ void amdgpu_amdkfd_gpuvm_destroy_cb(struct amdgpu_device *adev, struct amdgpu_vm *vm) {struct amdkfd_process_info *process_info = vm->process_info; -struct amdgpu_bo *pd = vm->root.bo;if (!process_info)return ; -/* Release eviction fence from PD */ -amdgpu_bo_reserve (pd, false); -amdgpu_bo_fence (pd,NULL , false); -amdgpu_bo_unreserve (pd); -/* Update process info */ mutex_lock (&process_info->lock); process_info->n_vms--;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 183/1095 powerpc/64s: Disable stack variable initialisation for prom_init
In reply to Greg Kroah-HartmanFrom: Michael Ellerman <[email protected]>
[ Upstream commit be640317a1d0b9cf42fedb2debc2887a7cfa38de ]
With GCC 12 allmodconfig prom_init fails to build:
Error: External symbol 'memset' referenced from prom_init.c
make[2]: *** [arch/powerpc/kernel/Makefile:204: arch/powerpc/kernel/prom_init_check] Error 1
The allmodconfig build enables KASAN, so all calls to memset in prom_init should be converted to __memset by the #ifdefs in asm/string.h, because prom_init must use the non-KASAN instrumented versions.
The build failure happens because there's a call to memset that hasn't been caught by the pre-processor and converted to __memset. Typically that's because it's a memset generated by the compiler itself, and that is the case here.
With GCC 12, allmodconfig enables CONFIG_INIT_STACK_ALL_PATTERN, which causes the compiler to emit memset calls to initialise on-stack variables with a pattern.
Because prom_init is non-user-facing boot-time only code, as a workaround just disable stack variable initialisation to unbreak the build.
--- arch/powerpc/kernel/Makefile | 1 + 1 file changed, 1 insertion(+)
arch/powerpc/kernel/Makefile +1 -0
@@ -20,6 +20,7 @@ CFLAGS_prom.o += $(DISABLE_LATENT_ENTROPY_PLUGIN) CFLAGS_prom_init.o += -fno-stack-protector CFLAGS_prom_init.o += -DDISABLE_BRANCH_PROFILING CFLAGS_prom_init.o += -ffreestanding +CFLAGS_prom_init.o += $(call cc-option, -ftrivial-auto-var-init=uninitialized) ifdef CONFIG_FUNCTION_TRACER # Do not trace early boot code
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 184/1095 spi: spi-rspi: Fix PIO fallback on RZ platforms
In reply to Greg Kroah-HartmanFrom: Biju Das <[email protected]>
[ Upstream commit b620aa3a7be346f04ae7789b165937615c6ee8d3 ]
RSPI IP on RZ/{A, G2L} SoC's has the same signal for both interrupt and DMA transfer request. Setting DMARS register for DMA transfer makes the signal to work as a DMA transfer request signal and subsequent interrupt requests to the interrupt controller are masked.
PIO fallback does not work as interrupt signal is disabled.
This patch fixes this issue by re-enabling the interrupts by calling dmaengine_synchronize().
--- drivers/spi/spi-rspi.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/spi/spi-rspi.c +4 -0
@@ -613,6 +613,10 @@ static int rspi_dma_transfer(struct rspi_data *rspi, struct sg_table *tx, rspi->dma_callbacked, HZ);if (ret >0 && rspi->dma_callbacked) { ret =0 ; +if (tx) +dmaengine_synchronize (rspi->ctlr->dma_tx); +if (rx) +dmaengine_synchronize (rspi->ctlr->dma_rx); }else {if (!ret) {dev_err (&rspi->ctlr->dev,"DMA timeout\n" );
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 185/1095 netfilter: nf_tables: add rescheduling points during loop detection walks
In reply to Greg Kroah-HartmanFrom: Florian Westphal <[email protected]>
[ Upstream commit 81ea010667417ef3f218dfd99b69769fe66c2b67 ]
Add explicit rescheduling points during ruleset walk.
Switching to a faster algorithm is possible but this is a much smaller change, suitable for nf tree.
--- net/netfilter/nf_tables_api.c | 6 ++++++ 1 file changed, 6 insertions(+)
net/netfilter/nf_tables_api.c +6 -0
@@ -3343,6 +3343,8 @@ int nft_chain_validate(const struct nft_ctx *ctx, const struct nft_chain *chain)if (err <0 )return err; } + +cond_resched (); }return 0 ;
@@ -9371,9 +9373,13 @@ static int nf_tables_check_loops(const struct nft_ctx *ctx,break ; } } + +cond_resched (); }list_for_each_entry (set, &ctx->table->sets, list) { +cond_resched (); +if (!nft_is_active_next (ctx->net, set))continue ; if (!(set->flags & NFT_SET_MAP) ||
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 186/1095 netfilter: nft_queue: only allow supported familes and hooks
In reply to Greg Kroah-HartmanFrom: Florian Westphal <[email protected]>
[ Upstream commit 47f4f510ad586032b85c89a0773fbb011d412425 ]
Trying to use 'queue' statement in ingress (for example) triggers a splat on reinject:
WARNING: CPU: 3 PID: 1345 at net/netfilter/nf_queue.c:291
... because nf_reinject cannot find the ruleset head.
The netdev family doesn't support async resume at the moment anyway, so disallow loading such rulesets with a more appropriate error message.
v2: add 'validate' callback and also check hook points, v1 did allow ingress use in 'table inet', but that doesn't work either. (Pablo)
--- net/netfilter/nft_queue.c | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+)
net/netfilter/nft_queue.c +27 -0
@@ -68,6 +68,31 @@ static void nft_queue_sreg_eval(const struct nft_expr *expr, regs->verdict.code = ret; } +static int nft_queue_validate (const struct nft_ctx *ctx, +const struct nft_expr *expr, +const struct nft_data **data) +{ +static const unsigned int supported_hooks = ((1 <<NF_INET_PRE_ROUTING ) | + (1 <<NF_INET_LOCAL_IN ) | + (1 <<NF_INET_FORWARD ) | + (1 <<NF_INET_LOCAL_OUT ) | + (1 <<NF_INET_POST_ROUTING )); + +switch (ctx->family) { +case NFPROTO_IPV4 : +case NFPROTO_IPV6 : +case NFPROTO_INET : +case NFPROTO_BRIDGE : +break ; +case NFPROTO_NETDEV :/* lacks okfn */ + fallthrough; +default : +return -EOPNOTSUPP ; + } + +return nft_chain_validate_hooks (ctx->chain, supported_hooks); +} +static const struct nla_policy nft_queue_policy[NFTA_QUEUE_MAX +1 ] = { [NFTA_QUEUE_NUM ] = { .type =NLA_U16 }, [NFTA_QUEUE_TOTAL ] = { .type =NLA_U16 },
@@ -164,6 +189,7 @@ static const struct nft_expr_ops nft_queue_ops = { .eval = nft_queue_eval, .init = nft_queue_init, .dump = nft_queue_dump, + .validate = nft_queue_validate, .reduce = NFT_REDUCE_READONLY, };
@@ -173,6 +199,7 @@ static const struct nft_expr_ops nft_queue_sreg_ops = { .eval = nft_queue_sreg_eval, .init = nft_queue_sreg_init, .dump = nft_queue_sreg_dump, + .validate = nft_queue_validate, .reduce = NFT_REDUCE_READONLY, };
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 187/1095 ARM: findbit: fix overflowing offset
In reply to Greg Kroah-HartmanFrom: Russell King (Oracle) <[email protected]>
[ Upstream commit ec85bd369fd2bfaed6f45dd678706429d4f75b48 ]
When offset is larger than the size of the bit array, we should not attempt to access the array as we can perform an access beyond the end of the array. Fix this by changing the pre-condition.
Using "cmp r2, r1; bhs ..." covers us for the size == 0 case, since this will always take the branch when r1 is zero, irrespective of the value of r2. This means we can fix this bug without adding any additional code!
--- arch/arm/lib/findbit.S | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
arch/arm/lib/findbit.S +8 -8
@@ -40,8 +40,8 @@ ENDPROC(_find_first_zero_bit_le) * Prototype: int find_next_zero_bit(void *addr, unsigned int maxbit, int offset) */ ENTRY(_find_next_zero_bit_le) - teq r1, #0 - beq 3b + cmp r2, r1 + bhs 3b ands ip, r2, #7 beq 1b @ If new byte, goto old routine ARM( ldrb r3, [r0, r2, lsr #3] )
@@ -81,8 +81,8 @@ ENDPROC(_find_first_bit_le) * Prototype: int find_next_zero_bit(void *addr, unsigned int maxbit, int offset) */ ENTRY(_find_next_bit_le) - teq r1, #0 - beq 3b + cmp r2, r1 + bhs 3b ands ip, r2, #7 beq 1b @ If new byte, goto old routine ARM( ldrb r3, [r0, r2, lsr #3] )
@@ -115,8 +115,8 @@ ENTRY(_find_first_zero_bit_be) ENDPROC(_find_first_zero_bit_be) ENTRY(_find_next_zero_bit_be) - teq r1, #0 - beq 3b + cmp r2, r1 + bhs 3b ands ip, r2, #7 beq 1b @ If new byte, goto old routine eor r3, r2, #0x18 @ big endian byte ordering
@@ -149,8 +149,8 @@ ENTRY(_find_first_bit_be) ENDPROC(_find_first_bit_be) ENTRY(_find_next_bit_be) - teq r1, #0 - beq 3b + cmp r2, r1 + bhs 3b ands ip, r2, #7 beq 1b @ If new byte, goto old routine eor r3, r2, #0x18 @ big endian byte ordering
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 188/1095 meson-mx-socinfo: Fix refcount leak in meson_mx_socinfo_init
In reply to Greg Kroah-HartmanFrom: Miaoqian Lin <[email protected]>
[ Upstream commit a2106f38077e78afcb4bf98fdda3e162118cfb3d ]
of_find_matching_node() returns a node pointer with refcount incremented, we should use of_node_put() on it when not need anymore. Add missing of_node_put() to avoid refcount leak.
--- drivers/soc/amlogic/meson-mx-socinfo.c | 1 + 1 file changed, 1 insertion(+)
drivers/soc/amlogic/meson-mx-socinfo.c +1 -0
@@ -126,6 +126,7 @@ static int __init meson_mx_socinfo_init(void) np =of_find_matching_node (NULL , meson_mx_socinfo_analog_top_ids);if (np) { analog_top_regmap =syscon_node_to_regmap (np); +of_node_put (np);if (IS_ERR (analog_top_regmap))return PTR_ERR (analog_top_regmap);
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 189/1095 arm64: dts: renesas: beacon: Fix regulator node names
In reply to Greg Kroah-HartmanFrom: Geert Uytterhoeven <[email protected]>
[ Upstream commit 7512af9f78dedea7e04225f665dad6750df7d095 ]
Currently there are two nodes named "regulator_camera". This causes the former to be overwritten by the latter.
Fix this by renaming them to unique names, using the preferred hyphen instead of an underscore.
While at it, update the name of the audio regulator (which was added in the same commit) to use a hyphen.
--- arch/arm64/boot/dts/renesas/beacon-renesom-baseboard.dtsi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
arch/arm64/boot/dts/renesas/beacon-renesom-baseboard.dtsi +3 -3
@@ -146,7 +146,7 @@ rgb_panel: endpoint { }; }; - reg_audio: regulator_audio { + reg_audio: regulator-audio { compatible = "regulator-fixed"; regulator-name = "audio-1.8V"; regulator-min-microvolt = <1800000>;
@@ -174,7 +174,7 @@ reg_lcd_reset: regulator-lcd-reset { vin-supply = <®_lcd>; }; - reg_cam0: regulator_camera { + reg_cam0: regulator-cam0 { compatible = "regulator-fixed"; regulator-name = "reg_cam0"; regulator-min-microvolt = <1800000>;
@@ -183,7 +183,7 @@ reg_cam0: regulator_camera { enable-active-high; }; - reg_cam1: regulator_camera { + reg_cam1: regulator-cam1 { compatible = "regulator-fixed"; regulator-name = "reg_cam1"; regulator-min-microvolt = <1800000>;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 190/1095 spi: spi-altera-dfl: Fix an error handling path
In reply to Greg Kroah-HartmanFrom: Christophe JAILLET <[email protected]>
[ Upstream commit 8e3ca32f46994e74b7f43c57731150b2aedb2630 ]
The spi_alloc_master() call is not undone in all error handling paths. Moreover, there is no .remove function to release the allocated memory.
In order to fix both this issues, switch to devm_spi_alloc_master().
This allows further simplification of the probe.
--- drivers/spi/spi-altera-dfl.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-)
drivers/spi/spi-altera-dfl.c +5 -9
@@ -128,9 +128,9 @@ static int dfl_spi_altera_probe(struct dfl_device *dfl_dev)struct spi_master *master;struct altera_spi *hw;void __iomem *base; -int err = -ENODEV ; +int err; - master =spi_alloc_master (dev,sizeof (struct altera_spi )); + master =devm_spi_alloc_master (dev,sizeof (struct altera_spi ));if (!master)return -ENOMEM ;
@@ -159,10 +159,9 @@ static int dfl_spi_altera_probe(struct dfl_device *dfl_dev)altera_spi_init_master (master); err =devm_spi_register_master (dev, master); -if (err) { -dev_err (dev,"%s failed to register spi master %d\n" , __func__, err); - goto exit; - } +if (err) +return dev_err_probe (dev, err,"%s failed to register spi master\n" , + __func__);if (dfl_dev->revision ==FME_FEATURE_REV_MAX10_SPI_N5010 )strscpy (board_info.modalias,"m10-n5010" ,SPI_NAME_SIZE );
@@ -179,9 +178,6 @@ static int dfl_spi_altera_probe(struct dfl_device *dfl_dev) }return 0 ; -exit: -spi_master_put (master); -return err; }static const struct dfl_device_id dfl_spi_altera_ids[] = {
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 191/1095 ARM: bcm: Fix refcount leak in bcm_kona_smc_init
In reply to Greg Kroah-HartmanFrom: Miaoqian Lin <[email protected]>
[ Upstream commit cb23389a2458c2e4bfd6c86a513cbbe1c4d35e76 ]
of_find_matching_node() returns a node pointer with refcount incremented, we should use of_node_put() on it when not need anymore. Add missing of_node_put() to avoid refcount leak.
--- arch/arm/mach-bcm/bcm_kona_smc.c | 1 + 1 file changed, 1 insertion(+)
arch/arm/mach-bcm/bcm_kona_smc.c +1 -0
@@ -52,6 +52,7 @@ int __init bcm_kona_smc_init(void)return -ENODEV ; prop_val =of_get_address (node,0 , &prop_size,NULL ); +of_node_put (node);if (!prop_val)return -EINVAL ;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 192/1095 ACPI: processor/idle: Annotate more functions to live in cpuidle section
In reply to Greg Kroah-HartmanFrom: Guilherme G. Piccoli <[email protected]>
[ Upstream commit 409dfdcaffb266acfc1f33529a26b1443c9332d4 ]
Commit 6727ad9e206c ("nmi_backtrace: generate one-line reports for idle cpus") introduced a new text section called cpuidle; with that, we have a mechanism to add idling functions in such section and skip them from nmi_backtrace output, since they're useless and potentially flooding for such report.
Happens that inlining might cause some real idle functions to end-up outside of such section; this is currently the case of ACPI processor_idle driver; the functions acpi_idle_enter_* do inline acpi_idle_do_entry(), hence they stay out of the cpuidle section.
Fix that by marking such functions to also live in the cpuidle section.
--- drivers/acpi/processor_idle.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/acpi/processor_idle.c +3 -3
@@ -602,7 +602,7 @@ static DEFINE_RAW_SPINLOCK(c3_lock);* @cx: Target state context * @index: index of target state */ -static int acpi_idle_enter_bm (struct cpuidle_driver *drv, +static int __cpuidle acpi_idle_enter_bm(struct cpuidle_driver *drv,struct acpi_processor *pr,struct acpi_processor_cx *cx,int index)
@@ -659,7 +659,7 @@ static int acpi_idle_enter_bm(struct cpuidle_driver *drv,return index; } -static int acpi_idle_enter (struct cpuidle_device *dev, +static int __cpuidle acpi_idle_enter(struct cpuidle_device *dev,struct cpuidle_driver *drv,int index) {struct acpi_processor_cx *cx =per_cpu (acpi_cstate[index], dev->cpu);
@@ -688,7 +688,7 @@ static int acpi_idle_enter(struct cpuidle_device *dev,return index; } -static int acpi_idle_enter_s2idle (struct cpuidle_device *dev, +static int __cpuidle acpi_idle_enter_s2idle(struct cpuidle_device *dev,struct cpuidle_driver *drv,int index) {struct acpi_processor_cx *cx =per_cpu (acpi_cstate[index], dev->cpu);
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 193/1095 ARM: dts: imx7d-colibri-emmc: add cpu1 supply
In reply to Greg Kroah-HartmanFrom: Marcel Ziswiler <[email protected]>
[ Upstream commit ba28db60d34271e8a3cf4d7158d71607e8b1e57f ]
Each cpu-core is supposed to list its supply separately, add supply for cpu1.
--- arch/arm/boot/dts/imx7d-colibri-emmc.dtsi | 4 ++++ 1 file changed, 4 insertions(+)
arch/arm/boot/dts/imx7d-colibri-emmc.dtsi +4 -0
@@ -13,6 +13,10 @@ memory@80000000 { }; }; +&cpu1 { + cpu-supply = <®_DCDC2>; +}; + &gpio6 { gpio-line-names = "", "",
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 194/1095 soc: renesas: r8a779a0-sysc: Fix A2DP1 and A2CV[2357] PDR values
In reply to Greg Kroah-HartmanFrom: Geert Uytterhoeven <[email protected]>
[ Upstream commit bccceabb92ce8eb78bbf2de08308e2cc2761a2e5 ]
The PDR values for the A2DP1 and A2CV[2357] power areas on R-Car V3U are incorrect (copied-and-pasted from A2DP0 and A2CV[0146]).
Fix them.
--- drivers/soc/renesas/r8a779a0-sysc.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/soc/renesas/r8a779a0-sysc.c +5 -5
@@ -57,11 +57,11 @@ static struct rcar_gen4_sysc_area r8a779a0_areas[] __initdata = { { "a2cv6", R8A779A0_PD_A2CV6, R8A779A0_PD_A3IR }, { "a2cn2", R8A779A0_PD_A2CN2, R8A779A0_PD_A3IR }, { "a2imp23", R8A779A0_PD_A2IMP23, R8A779A0_PD_A3IR }, - { "a2dp1", R8A779A0_PD_A2DP0, R8A779A0_PD_A3IR }, - { "a2cv2", R8A779A0_PD_A2CV0, R8A779A0_PD_A3IR }, - { "a2cv3", R8A779A0_PD_A2CV1, R8A779A0_PD_A3IR }, - { "a2cv5", R8A779A0_PD_A2CV4, R8A779A0_PD_A3IR }, - { "a2cv7", R8A779A0_PD_A2CV6, R8A779A0_PD_A3IR }, + { "a2dp1", R8A779A0_PD_A2DP1, R8A779A0_PD_A3IR }, + { "a2cv2", R8A779A0_PD_A2CV2, R8A779A0_PD_A3IR }, + { "a2cv3", R8A779A0_PD_A2CV3, R8A779A0_PD_A3IR }, + { "a2cv5", R8A779A0_PD_A2CV5, R8A779A0_PD_A3IR }, + { "a2cv7", R8A779A0_PD_A2CV7, R8A779A0_PD_A3IR }, { "a2cn1", R8A779A0_PD_A2CN1, R8A779A0_PD_A3IR }, { "a1cnn0", R8A779A0_PD_A1CNN0, R8A779A0_PD_A2CN0 }, { "a1cnn2", R8A779A0_PD_A1CNN2, R8A779A0_PD_A2CN2 },
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 195/1095 soc: amlogic: Fix refcount leak in meson-secure-pwrc.c
In reply to Greg Kroah-HartmanFrom: Liang He <[email protected]>
[ Upstream commit d18529a4c12f66d83daac78045ea54063bd43257 ]
In meson_secure_pwrc_probe(), there is a refcount leak in one fail path.
--- drivers/soc/amlogic/meson-secure-pwrc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/soc/amlogic/meson-secure-pwrc.c +3 -1
@@ -152,8 +152,10 @@ static int meson_secure_pwrc_probe(struct platform_device *pdev) } pwrc =devm_kzalloc (&pdev->dev,sizeof (*pwrc),GFP_KERNEL ); -if (!pwrc) +if (!pwrc) { +of_node_put (sm_np);return -ENOMEM ; + } pwrc->fw =meson_sm_get (sm_np);of_node_put (sm_np);
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 196/1095 arm64: dts: renesas: Fix thermal-sensors on single-zone sensors
In reply to Greg Kroah-HartmanFrom: Geert Uytterhoeven <[email protected]>
[ Upstream commit 62e8a53431145e06e503b71625a34eaa87b72b2c ]
"make dtbs_check":
arch/arm64/boot/dts/renesas/r8a774c0-cat874.dtb: thermal-zones: cpu-thermal:thermal-sensors: [[74], [0]] is too long
arch/arm64/boot/dts/renesas/r8a774c0-ek874.dtb: thermal-zones: cpu-thermal:thermal-sensors: [[79], [0]] is too long
arch/arm64/boot/dts/renesas/r8a774c0-ek874-idk-2121wr.dtb: thermal-zones: cpu-thermal:thermal-sensors: [[82], [0]] is too long
arch/arm64/boot/dts/renesas/r8a774c0-ek874-mipi-2.1.dtb: thermal-zones: cpu-thermal:thermal-sensors: [[87], [0]] is too long
arch/arm64/boot/dts/renesas/r8a77990-ebisu.dtb: thermal-zones: cpu-thermal:thermal-sensors: [[105], [0]] is too long
From schema: Documentation/devicetree/bindings/thermal/thermal-zones.yamlIndeed, the thermal sensors on R-Car E3 and RZ/G2E support only a single zone, hence #thermal-sensor-cells = <0>.
Fix this by dropping the bogus zero cell from the thermal sensor specifiers.
--- arch/arm64/boot/dts/renesas/r8a774c0.dtsi | 2 +- arch/arm64/boot/dts/renesas/r8a77990.dtsi | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/renesas/r8a774c0.dtsi +1 -1
@@ -1956,7 +1956,7 @@ thermal-zones { cpu-thermal { polling-delay-passive = <250>; polling-delay = <0>; - thermal-sensors = <&thermal 0>; + thermal-sensors = <&thermal>; sustainable-power = <717>; cooling-maps {
arch/arm64/boot/dts/renesas/r8a77990.dtsi +1 -1
@@ -2117,7 +2117,7 @@ thermal-zones { cpu-thermal { polling-delay-passive = <250>; polling-delay = <0>; - thermal-sensors = <&thermal 0>; + thermal-sensors = <&thermal>; sustainable-power = <717>; cooling-maps {
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 197/1095 Revert "ARM: dts: imx6qdl-apalis: Avoid underscore in node name"
In reply to Greg Kroah-HartmanFrom: Max Krummenacher <[email protected]>
[ Upstream commit 9c0919acb3fa7c1a24e384ff912f2d88f060c373 ]
The STMPE MFD device binding requires the child node to have a fixed name, i.e. with '_', not '-'. Otherwise the stmpe_adc, stmpe_touchscreen drivers will not be probed.
--- arch/arm/boot/dts/imx6qdl-apalis.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/boot/dts/imx6qdl-apalis.dtsi +2 -2
@@ -315,7 +315,7 @@ stmpe811@41 { /* ADC conversion time: 80 clocks */ st,sample-time = <4>; - stmpe_touchscreen: stmpe-touchscreen { + stmpe_touchscreen: stmpe_touchscreen { compatible = "st,stmpe-ts"; /* 8 sample average control */ st,ave-ctrl = <3>;
@@ -332,7 +332,7 @@ stmpe_touchscreen: stmpe-touchscreen { st,touch-det-delay = <5>; }; - stmpe_adc: stmpe-adc { + stmpe_adc: stmpe_adc { compatible = "st,stmpe-adc"; /* forbid to use ADC channels 3-0 (touch) */ st,norequest-mask = <0x0F>;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 198/1095 x86/pmem: Fix platform-device leak in error path
In reply to Greg Kroah-HartmanFrom: Johan Hovold <[email protected]>
[ Upstream commit 229e73d46994f15314f58b2d39bf952111d89193 ]
Make sure to free the platform device in the unlikely event that registration fails.
--- arch/x86/kernel/pmem.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-)
arch/x86/kernel/pmem.c +6 -1
@@ -27,6 +27,11 @@ static __init int register_e820_pmem(void)* simply here to trigger the module to load on demand. */ pdev =platform_device_alloc ("e820_pmem" ,-1 ); -return platform_device_add (pdev); + + rc =platform_device_add (pdev); +if (rc) +platform_device_put (pdev); + +return rc; }device_initcall (register_e820_pmem);
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 199/1095 ARM: dts: ast2500-evb: fix board compatible
In reply to Greg Kroah-HartmanFrom: Krzysztof Kozlowski <[email protected]>
[ Upstream commit 30b276fca5c0644f3cb17bceb1bd6a626c670184 ]
The AST2500 EVB board should have dedicated compatible.
--- arch/arm/boot/dts/aspeed-ast2500-evb.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/aspeed-ast2500-evb.dts +1 -1
@@ -5,7 +5,7 @@ / { model = "AST2500 EVB"; - compatible = "aspeed,ast2500"; + compatible = "aspeed,ast2500-evb", "aspeed,ast2500"; aliases { serial4 = &uart5;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 200/1095 ARM: dts: ast2600-evb: fix board compatible
In reply to Greg Kroah-HartmanFrom: Krzysztof Kozlowski <[email protected]>
[ Upstream commit aa5e06208500a0db41473caebdee5a2e81d5a277 ]
The AST2600 EVB board should have dedicated compatible.
--- arch/arm/boot/dts/aspeed-ast2600-evb.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/aspeed-ast2600-evb.dts +1 -1
@@ -8,7 +8,7 @@ / { model = "AST2600 EVB"; - compatible = "aspeed,ast2600"; + compatible = "aspeed,ast2600-evb-a1", "aspeed,ast2600"; aliases { serial4 = &uart5;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 201/1095 ARM: dts: ast2600-evb-a1: fix board compatible
In reply to Greg Kroah-HartmanFrom: Krzysztof Kozlowski <[email protected]>
[ Upstream commit 33c39140cc298e0d4e36083cb9a665a837773a60 ]
The AST2600 EVB A1 board should have dedicated compatible.
--- arch/arm/boot/dts/aspeed-ast2600-evb-a1.dts | 1 + 1 file changed, 1 insertion(+)
arch/arm/boot/dts/aspeed-ast2600-evb-a1.dts +1 -0
@@ -5,6 +5,7 @@ / { model = "AST2600 A1 EVB"; + compatible = "aspeed,ast2600-evb-a1", "aspeed,ast2600"; /delete-node/regulator-vcc-sdhci0; /delete-node/regulator-vcc-sdhci1;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 202/1095 arm64: dts: mt8192: Fix idle-states nodes naming scheme
In reply to Greg Kroah-HartmanFrom: Nícolas F. R. A. Prado <[email protected]>
[ Upstream commit 399e23ad51caaf62400a531c9268ad3c453c3d76 ]
Tweak the name of the idle-states subnodes so that they follow the binding pattern, getting rid of dtbs_check warnings.
Only the usage of "-" in the name was necessary, but "off" was also exchanged for "sleep" since that seems to be a more common wording in other dts files.
--- arch/arm64/boot/dts/mediatek/mt8192.dtsi | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-)
arch/arm64/boot/dts/mediatek/mt8192.dtsi +12 -12
@@ -41,7 +41,7 @@ cpu0: cpu@0 { reg = <0x000>; enable-method = "psci"; clock-frequency = <1701000000>; - cpu-idle-states = <&cpuoff_l &clusteroff_l>; + cpu-idle-states = <&cpu_sleep_l &cluster_sleep_l>; next-level-cache = <&l2_0>; capacity-dmips-mhz = <530>; };
@@ -52,7 +52,7 @@ cpu1: cpu@100 { reg = <0x100>; enable-method = "psci"; clock-frequency = <1701000000>; - cpu-idle-states = <&cpuoff_l &clusteroff_l>; + cpu-idle-states = <&cpu_sleep_l &cluster_sleep_l>; next-level-cache = <&l2_0>; capacity-dmips-mhz = <530>; };
@@ -63,7 +63,7 @@ cpu2: cpu@200 { reg = <0x200>; enable-method = "psci"; clock-frequency = <1701000000>; - cpu-idle-states = <&cpuoff_l &clusteroff_l>; + cpu-idle-states = <&cpu_sleep_l &cluster_sleep_l>; next-level-cache = <&l2_0>; capacity-dmips-mhz = <530>; };
@@ -74,7 +74,7 @@ cpu3: cpu@300 { reg = <0x300>; enable-method = "psci"; clock-frequency = <1701000000>; - cpu-idle-states = <&cpuoff_l &clusteroff_l>; + cpu-idle-states = <&cpu_sleep_l &cluster_sleep_l>; next-level-cache = <&l2_0>; capacity-dmips-mhz = <530>; };
@@ -85,7 +85,7 @@ cpu4: cpu@400 { reg = <0x400>; enable-method = "psci"; clock-frequency = <2171000000>; - cpu-idle-states = <&cpuoff_b &clusteroff_b>; + cpu-idle-states = <&cpu_sleep_b &cluster_sleep_b>; next-level-cache = <&l2_1>; capacity-dmips-mhz = <1024>; };
@@ -96,7 +96,7 @@ cpu5: cpu@500 { reg = <0x500>; enable-method = "psci"; clock-frequency = <2171000000>; - cpu-idle-states = <&cpuoff_b &clusteroff_b>; + cpu-idle-states = <&cpu_sleep_b &cluster_sleep_b>; next-level-cache = <&l2_1>; capacity-dmips-mhz = <1024>; };
@@ -107,7 +107,7 @@ cpu6: cpu@600 { reg = <0x600>; enable-method = "psci"; clock-frequency = <2171000000>; - cpu-idle-states = <&cpuoff_b &clusteroff_b>; + cpu-idle-states = <&cpu_sleep_b &cluster_sleep_b>; next-level-cache = <&l2_1>; capacity-dmips-mhz = <1024>; };
@@ -118,7 +118,7 @@ cpu7: cpu@700 { reg = <0x700>; enable-method = "psci"; clock-frequency = <2171000000>; - cpu-idle-states = <&cpuoff_b &clusteroff_b>; + cpu-idle-states = <&cpu_sleep_b &cluster_sleep_b>; next-level-cache = <&l2_1>; capacity-dmips-mhz = <1024>; };
@@ -171,7 +171,7 @@ l3_0: l3-cache { idle-states { entry-method = "arm,psci"; - cpuoff_l: cpuoff_l { + cpu_sleep_l: cpu-sleep-l { compatible = "arm,idle-state"; arm,psci-suspend-param = <0x00010001>; local-timer-stop;
@@ -179,7 +179,7 @@ cpuoff_l: cpuoff_l { exit-latency-us = <140>; min-residency-us = <780>; }; - cpuoff_b: cpuoff_b { + cpu_sleep_b: cpu-sleep-b { compatible = "arm,idle-state"; arm,psci-suspend-param = <0x00010001>; local-timer-stop;
@@ -187,7 +187,7 @@ cpuoff_b: cpuoff_b { exit-latency-us = <145>; min-residency-us = <720>; }; - clusteroff_l: clusteroff_l { + cluster_sleep_l: cluster-sleep-l { compatible = "arm,idle-state"; arm,psci-suspend-param = <0x01010002>; local-timer-stop;
@@ -195,7 +195,7 @@ clusteroff_l: clusteroff_l { exit-latency-us = <155>; min-residency-us = <860>; }; - clusteroff_b: clusteroff_b { + cluster_sleep_b: cluster-sleep-b { compatible = "arm,idle-state"; arm,psci-suspend-param = <0x01010002>; local-timer-stop;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 203/1095 arm64: dts: mt8192: Fix idle-states entry-method
In reply to Greg Kroah-HartmanFrom: Nícolas F. R. A. Prado <[email protected]>
[ Upstream commit 2e599740f7e423ee89fb027896cb2635dd43784f ]
The entry-method property of the idle-states node should be "psci" as described in the idle-states binding, since this is already the value of enable-method in the CPU nodes. Fix it to get rid of a dtbs_check warning.
--- arch/arm64/boot/dts/mediatek/mt8192.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/mediatek/mt8192.dtsi +1 -1
@@ -170,7 +170,7 @@ l3_0: l3-cache { }; idle-states { - entry-method = "arm,psci"; + entry-method = "psci"; cpu_sleep_l: cpu-sleep-l { compatible = "arm,idle-state"; arm,psci-suspend-param = <0x00010001>;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 204/1095 arm64: select TRACE_IRQFLAGS_NMI_SUPPORT
In reply to Greg Kroah-HartmanFrom: Mark Rutland <[email protected]>
[ Upstream commit 3381da254fab37ba08c4b7c4f19b4ee28b1a27ec ]
Due to an oversight, on arm64 lockdep IRQ state tracking doesn't work as intended in NMI context. This demonstrably results in bogus warnings from lockdep, and in theory could mask a variety of issues.
On arm64, we've consistently tracked IRQ flag state for NMIs (and saved/restored the state of the interrupted context) since commit:
f0cd5ac1e4c53cb6 ("arm64: entry: fix NMI {user, kernel}->kernel transitions")
That commit fixed most lockdep issues with NMI by virtue of the save/restore of the lockdep state of the interrupted context. However, for lockdep IRQ state tracking to consistently take effect in NMI context it has been necessary to select TRACE_IRQFLAGS_NMI_SUPPORT since commit:
ed00495333ccc80f ("locking/lockdep: Fix TRACE_IRQFLAGS vs. NMIs")
As arm64 does not select TRACE_IRQFLAGS_NMI_SUPPORT, this means that the lockdep state can be stale in NMI context, and some uses of that state can consume stale data.
When an NMI is taken arm64 entry code will call arm64_enter_nmi(). This will enter NMI context via __nmi_enter() before calling lockdep_hardirqs_off() to inform lockdep that IRQs have been masked. Where TRACE_IRQFLAGS_NMI_SUPPORT is not selected, lockdep_hardirqs_off() will not update lockdep state if called in NMI context. Thus if IRQs were enabled in the original context, lockdep will continue to believe that IRQs are enabled despite the call to lockdep_hardirqs_off().
However, the lockdep_assert_*() checks do take effect in NMI context, and will consume the stale lockdep state. If an NMI is taken from a context which had IRQs enabled, and during the handling of the NMI something calls lockdep_assert_irqs_disabled(), this will result in a spurious warning based upon the stale lockdep state.
This can be seen when using perf with GICv3 pseudo-NMIs. Within the perf NMI handler we may attempt a uaccess to record the userspace callchain, and is this faults the el1_abort() call in the nested context will call exit_to_kernel_mode() when returning, which has a lockdep_assert_irqs_disabled() assertion:
| # ./perf record -a -g sh | ------------[ cut here ]------------ | WARNING: CPU: 0 PID: 164 at arch/arm64/kernel/entry-common.c:73 exit_to_kernel_mode+0x118/0x1ac | Modules linked in: | CPU: 0 PID: 164 Comm: perf Not tainted 5.18.0-rc5 #1 | Hardware name: linux,dummy-virt (DT) | pstate: 004003c5 (nzcv DAIF +PAN -UAO -TCO -DIT -SSBS BTYPE=--) | pc : exit_to_kernel_mode+0x118/0x1ac | lr : el1_abort+0x80/0xbc | sp : ffff8000080039f0 | pmr_save: 000000f0 | x29: ffff8000080039f0 x28: ffff6831054e4980 x27: ffff683103adb400 | x26: 0000000000000000 x25: 0000000000000001 x24: 0000000000000001 | x23: 00000000804000c5 x22: 00000000000000c0 x21: 0000000000000001 | x20: ffffbd51e635ec44 x19: ffff800008003a60 x18: 0000000000000000 | x17: ffffaadf98d23000 x16: ffff800008004000 x15: 0000ffffd14f25c0 | x14: 0000000000000000 x13: 00000000000018eb x12: 0000000000000040 | x11: 000000000000001e x10: 000000002b820020 x9 : 0000000100110000 | x8 : 000000000045cac0 x7 : 0000ffffd14f25c0 x6 : ffffbd51e639b000 | x5 : 00000000000003e5 x4 : ffffbd51e58543b0 x3 : 0000000000000001 | x2 : ffffaadf98d23000 x1 : ffff6831054e4980 x0 : 0000000100110000 | Call trace: | exit_to_kernel_mode+0x118/0x1ac | el1_abort+0x80/0xbc | el1h_64_sync_handler+0xa4/0xd0 | el1h_64_sync+0x74/0x78 | __arch_copy_from_user+0xa4/0x230 | get_perf_callchain+0x134/0x1e4 | perf_callchain+0x7c/0xa0 | perf_prepare_sample+0x414/0x660 | perf_event_output_forward+0x80/0x180 | __perf_event_overflow+0x70/0x13c | perf_event_overflow+0x1c/0x30 | armv8pmu_handle_irq+0xe8/0x160 | armpmu_dispatch_irq+0x2c/0x70 | handle_percpu_devid_fasteoi_nmi+0x7c/0xbc | generic_handle_domain_nmi+0x3c/0x60 | gic_handle_irq+0x1dc/0x310 | call_on_irq_stack+0x2c/0x54 | do_interrupt_handler+0x80/0x94 | el1_interrupt+0xb0/0xe4 | el1h_64_irq_handler+0x18/0x24 | el1h_64_irq+0x74/0x78 | lockdep_hardirqs_off+0x50/0x120 | trace_hardirqs_off+0x38/0x214 | _raw_spin_lock_irq+0x98/0xa0 | pipe_read+0x1f8/0x404 | new_sync_read+0x140/0x150 | vfs_read+0x190/0x1dc | ksys_read+0xdc/0xfc | __arm64_sys_read+0x20/0x30 | invoke_syscall+0x48/0x114 | el0_svc_common.constprop.0+0x158/0x17c | do_el0_svc+0x28/0x90 | el0_svc+0x60/0x150 | el0t_64_sync_handler+0xa4/0x130 | el0t_64_sync+0x19c/0x1a0 | irq event stamp: 483 | hardirqs last enabled at (483): [<ffffbd51e636aa24>] _raw_spin_unlock_irqrestore+0xa4/0xb0 | hardirqs last disabled at (482): [<ffffbd51e636acd0>] _raw_spin_lock_irqsave+0xb0/0xb4 | softirqs last enabled at (468): [<ffffbd51e5216f58>] put_cpu_fpsimd_context+0x28/0x70 | softirqs last disabled at (466): [<ffffbd51e5216ed4>] get_cpu_fpsimd_context+0x0/0x5c | ---[ end trace 0000000000000000 ]---
Note that as lockdep_assert_irqs_disabled() uses WARN_ON_ONCE(), and this uses a BRK, the warning is logged with the real PSTATE at the time of the warning, which clearly has DAIF.I set, meaning IRQs (and pseudo-NMIs) were definitely masked and the warning is spurious.
Fix this by selecting TRACE_IRQFLAGS_NMI_SUPPORT such that the existing entry tracking takes effect, as we had originally intended when the arm64 entry code was fixed for transitions to/from NMI.
Arguably the lockdep_assert_*() functions should have the same NMI checks as the rest of the code to prevent spurious warnings when TRACE_IRQFLAGS_NMI_SUPPORT is not selected, but the real fix for any architecture is to explicitly handle the transitions to/from NMI in the entry code.
--- arch/arm64/Kconfig | 1 + 1 file changed, 1 insertion(+)
arch/arm64/Kconfig +1 -0
@@ -223,6 +223,7 @@ config ARM64 select THREAD_INFO_IN_TASK select HAVE_ARCH_USERFAULTFD_MINOR if USERFAULTFD select TRACE_IRQFLAGS_SUPPORT + select TRACE_IRQFLAGS_NMI_SUPPORT help ARM 64-bit (AArch64) Linux support.
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 205/1095 arm64: cpufeature: Allow different PMU versions in ID_DFR0_EL1
In reply to Greg Kroah-HartmanFrom: Alexandru Elisei <[email protected]>
[ Upstream commit 506506cad3947b942425b119ffa2b06715d5d804 ]
Commit b20d1ba3cf4b ("arm64: cpufeature: allow for version discrepancy in PMU implementations") made it possible to run Linux on a machine with PMUs with different versions without tainting the kernel. The patch relaxed the restriction only for the ID_AA64DFR0_EL1.PMUVer field, and missed doing the same for ID_DFR0_EL1.PerfMon , which also reports the PMU version, but for the AArch32 state.
For example, with Linux running on two clusters with different PMU versions, the kernel is tainted when bringing up secondaries with the following message:
[ 0.097027] smp: Bringing up secondary CPUs ... [..] [ 0.142805] Detected PIPT I-cache on CPU4 [ 0.142805] CPU features: SANITY CHECK: Unexpected variation in SYS_ID_DFR0_EL1. Boot CPU: 0x00000004011088, CPU4: 0x00000005011088 [ 0.143555] CPU features: Unsupported CPU feature variation detected. [ 0.143702] GICv3: CPU4: found redistributor 10000 region 0:0x000000002f180000 [ 0.143702] GICv3: CPU4: using allocated LPI pending table @0x00000008800d0000 [ 0.144888] CPU4: Booted secondary processor 0x0000010000 [0x410fd0f0]
The boot CPU implements FEAT_PMUv3p1 (ID_DFR0_EL1.PerfMon, bits 27:24, is 0b0100), but CPU4, part of the other cluster, implements FEAT_PMUv3p4 (ID_DFR0_EL1.PerfMon = 0b0101).
Treat the PerfMon field as FTR_NONSTRICT and FTR_EXACT to pass the sanity check and to match how PMUVer is treated for the 64bit ID register.
--- arch/arm64/kernel/cpufeature.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/kernel/cpufeature.c +1 -1
@@ -541,7 +541,7 @@ static const struct arm64_ftr_bits ftr_id_pfr2[] = {static const struct arm64_ftr_bits ftr_id_dfr0[] = {/* [31:28] TraceFilt */ -S_ARM64_FTR_BITS (FTR_HIDDEN ,FTR_STRICT ,FTR_LOWER_SAFE ,ID_DFR0_PERFMON_SHIFT ,4 ,0xf ), +S_ARM64_FTR_BITS (FTR_HIDDEN ,FTR_NONSTRICT ,FTR_EXACT ,ID_DFR0_PERFMON_SHIFT ,4 ,0 ),ARM64_FTR_BITS (FTR_HIDDEN ,FTR_STRICT ,FTR_LOWER_SAFE ,ID_DFR0_MPROFDBG_SHIFT ,4 ,0 ),ARM64_FTR_BITS (FTR_HIDDEN ,FTR_STRICT ,FTR_LOWER_SAFE ,ID_DFR0_MMAPTRC_SHIFT ,4 ,0 ),ARM64_FTR_BITS (FTR_HIDDEN ,FTR_STRICT ,FTR_LOWER_SAFE ,ID_DFR0_COPTRC_SHIFT ,4 ,0 ),
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 206/1095 locking/lockdep: Fix lockdep_init_map_*() confusion
In reply to Greg Kroah-HartmanFrom: Peter Zijlstra <[email protected]>
[ Upstream commit eae6d58d67d9739be5f7ae2dbead1d0ef6528243 ]
Commit dfd5e3f5fe27 ("locking/lockdep: Mark local_lock_t") added yet another lockdep_init_map_*() variant, but forgot to update all the existing users of the most complicated version.
This could lead to a loss of lock_type and hence an incorrect report. Given the relative rarity of both local_lock and these annotations, this is unlikely to happen in practise, still, best fix things.
--- include/linux/lockdep.h | 30 +++++++++++++++++------------- kernel/locking/lockdep.c | 7 ++++--- 2 files changed, 21 insertions(+), 16 deletions(-)
include/linux/lockdep.h +17 -13
@@ -192,7 +192,7 @@ static inline void lockdep_init_map_waits(struct lockdep_map *lock, const char *name, struct lock_class_key *key, int subclass, u8 inner, u8 outer) { -lockdep_init_map_type (lock, name, key, subclass, inner, LD_WAIT_INV, LD_LOCK_NORMAL); +lockdep_init_map_type (lock, name, key, subclass, inner, outer, LD_LOCK_NORMAL); } static inline void
@@ -215,24 +215,28 @@ static inline void lockdep_init_map(struct lockdep_map *lock, const char *name,* or they are too narrow (they suffer from a false class-split): */ #define lockdep_set_class (lock, key) \ - lockdep_init_map_waits(&(lock)->dep_map, #key, key, 0, \ - (lock)->dep_map.wait_type_inner, \ - (lock)->dep_map.wait_type_outer) + lockdep_init_map_type(&(lock)->dep_map, #key, key, 0, \ + (lock)->dep_map.wait_type_inner, \ + (lock)->dep_map.wait_type_outer, \ + (lock)->dep_map.lock_type)#define lockdep_set_class_and_name (lock, key, name) \ - lockdep_init_map_waits(&(lock)->dep_map, name, key, 0, \ - (lock)->dep_map.wait_type_inner, \ - (lock)->dep_map.wait_type_outer) + lockdep_init_map_type(&(lock)->dep_map, name, key, 0, \ + (lock)->dep_map.wait_type_inner, \ + (lock)->dep_map.wait_type_outer, \ + (lock)->dep_map.lock_type)#define lockdep_set_class_and_subclass (lock, key, sub) \ - lockdep_init_map_waits(&(lock)->dep_map, #key, key, sub,\ - (lock)->dep_map.wait_type_inner, \ - (lock)->dep_map.wait_type_outer) + lockdep_init_map_type(&(lock)->dep_map, #key, key, sub, \ + (lock)->dep_map.wait_type_inner, \ + (lock)->dep_map.wait_type_outer, \ + (lock)->dep_map.lock_type)#define lockdep_set_subclass (lock, sub) \ - lockdep_init_map_waits(&(lock)->dep_map, #lock, (lock)->dep_map.key, sub,\ - (lock)->dep_map.wait_type_inner, \ - (lock)->dep_map.wait_type_outer) + lockdep_init_map_type(&(lock)->dep_map, #lock, (lock)->dep_map.key, sub,\ + (lock)->dep_map.wait_type_inner, \ + (lock)->dep_map.wait_type_outer, \ + (lock)->dep_map.lock_type)#define lockdep_set_novalidate_class (lock) \ lockdep_set_class_and_name(lock, &__lockdep_no_validate__, #lock)
kernel/locking/lockdep.c +4 -3
@@ -5214,9 +5214,10 @@ __lock_set_class(struct lockdep_map *lock, const char *name,return 0 ; } -lockdep_init_map_waits (lock, name, key,0 , - lock->wait_type_inner, - lock->wait_type_outer); +lockdep_init_map_type (lock, name, key,0 , + lock->wait_type_inner, + lock->wait_type_outer, + lock->lock_type); class =register_lock_class (lock, subclass,0 ); hlock->class_idx = class - lock_classes;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 207/1095 arm64: dts: qcom: sc7180: Remove ipa_fw_mem node on trogdor
In reply to Greg Kroah-HartmanFrom: Stephen Boyd <[email protected]>
[ Upstream commit e60414644cf3a703e10ed4429c15263095945ffe ]
We don't use this carveout on trogdor boards, and having it defined in the sc7180 SoC file causes an overlap message to be printed at boot.
OF: reserved mem: OVERLAP DETECTED!
memory@86000000 (0x0000000086000000--0x000000008ec00000) overlaps with memory@8b700000 (0x000000008b700000--0x000000008b710000)
Delete the node in the trogdor dtsi file to fix the overlap problem and remove the error message.
--- arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi | 1 + 1 file changed, 1 insertion(+)
arch/arm64/boot/dts/qcom/sc7180-trogdor.dtsi +1 -0
@@ -42,6 +42,7 @@ charger-crit { */ /delete-node/ &hyp_mem; +/delete-node/ &ipa_fw_mem; /delete-node/ &xbl_mem; /delete-node/ &aop_mem; /delete-node/ &sec_apps_mem;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 208/1095 soc: fsl: guts: machine variable might be unset
In reply to Greg Kroah-HartmanFrom: Michael Walle <[email protected]>
[ Upstream commit ab3f045774f704c4e7b6a878102f4e9d4ae7bc74 ]
If both the model and the compatible properties are missing, then machine will not be set. Initialize it with NULL.
--- drivers/soc/fsl/guts.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/soc/fsl/guts.c +1 -1
@@ -140,7 +140,7 @@ static int fsl_guts_probe(struct platform_device *pdev)struct device_node *root, *np = pdev->dev.of_node;struct device *dev = &pdev->dev;const struct fsl_soc_die_attr *soc_die; -const char *machine; +const char *machine =NULL ;u32 svr;/* Initialize guts */
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 209/1095 spi: s3c64xx: constify fsd_spi_port_config
In reply to Greg Kroah-HartmanFrom: Krzysztof Kozlowski <[email protected]>
[ Upstream commit a813c47d22b0a0c51567292bc198a39bdcdc3799 ]
All struct s3c64xx_spi_port_config should be const.
--- drivers/spi/spi-s3c64xx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/spi/spi-s3c64xx.c +1 -1
@@ -1413,7 +1413,7 @@ static const struct s3c64xx_spi_port_config exynos5433_spi_port_config = { .quirks = S3C64XX_SPI_QUIRK_CS_AUTO, }; -static struct s3c64xx_spi_port_config fsd_spi_port_config = { +static const struct s3c64xx_spi_port_config fsd_spi_port_config = { .fifo_lvl_mask = {0x7f ,0x7f ,0x7f ,0x7f ,0x7f }, .rx_lvl_offset =15 , .tx_st_done =25 ,
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 210/1095 block: fix infinite loop for invalid zone append
In reply to Greg Kroah-HartmanFrom: Keith Busch <[email protected]>
[ Upstream commit b82d9fa257cb3725c49d94d2aeafc4677c34448a ]
Returning 0 early from __bio_iov_append_get_pages() for the max_append_sectors warning just creates an infinite loop since 0 means success, and the bio will never fill from the unadvancing iov_iter. We could turn the return into an error value, but it will already be turned into an error value later on, so just remove the warning. Clearly no one ever hit it anyway.
--- block/bio.c | 3 --- 1 file changed, 3 deletions(-)
block/bio.c +0 -3
@@ -1199,9 +1199,6 @@ static int __bio_iov_append_get_pages(struct bio *bio, struct iov_iter *iter)size_t offset;int ret =0 ; -if (WARN_ON_ONCE (!max_append_sectors)) -return 0 ; -/* * Move page array up in the allocated memory for the bio vecs as far as * possible so that we can start filling biovecs from the beginning
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 211/1095 arm64: dts: qcom: sdm845-akatsuki: Round down l22a regulator voltage
In reply to Greg Kroah-HartmanFrom: Marijn Suijten <[email protected]>
[ Upstream commit 4148a9eeb15152865d60b0913d96beb7ca166f9a ]
2700000 is not a multiple of pmic4_pldo's step size of 8000 (with base voltage 1664000), resulting in pm8998-rpmh-regulators not probing. Just as we did with MSM8998's Sony Yoshino Poplar [1], round the voltages down to err on the cautious side and leave a comment in place to document this discrepancy wrt downstream sources.
[1]: https://lore.kernel.org/linux-arm-msm/[email protected]/
--- .../arm64/boot/dts/qcom/sdm845-sony-xperia-tama-akatsuki.dts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/qcom/sdm845-sony-xperia-tama-akatsuki.dts +3 -2
@@ -19,8 +19,9 @@ &vreg_l14a_1p8 { }; &vreg_l22a_2p8 { - regulator-min-microvolt = <2700000>; - regulator-max-microvolt = <2700000>; + /* Note: Round-down from 2700000 to be a multiple of PLDO step-size 8000 */ + regulator-min-microvolt = <2696000>; + regulator-max-microvolt = <2696000>; }; &vreg_l28a_2p8 {
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 212/1095 ARM: dts: qcom: mdm9615: add missing PMIC GPIO reg
In reply to Greg Kroah-HartmanFrom: Krzysztof Kozlowski <[email protected]>
[ Upstream commit dc590cdc31f636ea15658f1206c3e380a53fb78e ]
'reg' property is required in SSBI children:
qcom-mdm9615-wp8548-mangoh-green.dtb: gpio@150: 'reg' is a required property
--- arch/arm/boot/dts/qcom-mdm9615.dtsi | 1 + 1 file changed, 1 insertion(+)
arch/arm/boot/dts/qcom-mdm9615.dtsi +1 -0
@@ -321,6 +321,7 @@ rtc@11d { pmicgpio: gpio@150 { compatible = "qcom,pm8018-gpio", "qcom,ssbi-gpio"; + reg = <0x150>; interrupt-controller; #interrupt-cells = <2>; gpio-controller;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 213/1095 ARM: OMAP2+: Fix refcount leak in omapdss_init_of
In reply to Greg Kroah-HartmanFrom: Miaoqian Lin <[email protected]>
[ Upstream commit 9705db1eff38d6b9114121f9e253746199b759c9 ]
omapdss_find_dss_of_node() calls of_find_compatible_node() to get device node. of_find_compatible_node() returns a node pointer with refcount incremented, we should use of_node_put() on it when done. Add missing of_node_put() in later error path and normal path.
Message-Id: <[email protected]>
--- arch/arm/mach-omap2/display.c | 2 ++ 1 file changed, 2 insertions(+)
arch/arm/mach-omap2/display.c +2 -0
@@ -260,11 +260,13 @@ static int __init omapdss_init_of(void)if (!pdev) {pr_err ("Unable to find DSS platform device\n" ); +of_node_put (node);return -ENODEV ; } r =of_platform_populate (node,NULL ,NULL , &pdev->dev);put_device (&pdev->dev); +of_node_put (node);if (r) {pr_err ("Unable to populate DSS submodule devices\n" );return r;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 214/1095 ARM: OMAP2+: Fix refcount leak in omap3xxx_prm_late_init
In reply to Greg Kroah-HartmanFrom: Miaoqian Lin <[email protected]>
[ Upstream commit 942228fbf5d4901112178b93d41225be7c0dd9de ]
of_find_matching_node() returns a node pointer with refcount incremented, we should use of_node_put() on it when not need anymore. Add missing of_node_put() to avoid refcount leak.
Message-Id: <[email protected]>
--- arch/arm/mach-omap2/prm3xxx.c | 1 + 1 file changed, 1 insertion(+)
arch/arm/mach-omap2/prm3xxx.c +1 -0
@@ -708,6 +708,7 @@ static int omap3xxx_prm_late_init(void) } irq_num =of_irq_get (np,0 ); +of_node_put (np);if (irq_num == -EPROBE_DEFER )return irq_num;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 215/1095 arm64: dts: qcom: sdm630: disable GPU by default
In reply to Greg Kroah-HartmanFrom: Dmitry Baryshkov <[email protected]>
[ Upstream commit 1c047919763b4548381d1ab3320af1df66ab83df ]
The SoC's device tree file disables gpucc and adreno's SMMU by default. So let's disable the GPU too. Moreover it looks like SMMU might be not usable without additional patches (which means that GPU is unusable too). No board uses GPU at this moment.
--- arch/arm64/boot/dts/qcom/sdm630.dtsi | 2 ++ 1 file changed, 2 insertions(+)
arch/arm64/boot/dts/qcom/sdm630.dtsi +2 -0
@@ -1050,6 +1050,8 @@ adreno_gpu: gpu@5000000 { operating-points-v2 = <&gpu_sdm630_opp_table>; + status = "disabled"; + gpu_sdm630_opp_table: opp-table { compatible = "operating-points-v2"; opp-775000000 {
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 216/1095 arm64: dts: qcom: sdm630: fix the qusb2phy ref clock
In reply to Greg Kroah-HartmanFrom: Dmitry Baryshkov <[email protected]>
[ Upstream commit 924bbd8dd60e094344711c3526a5b308d71dc008 ]
According to the downstram DT file, the qusb2phy ref clock should be GCC_RX0_USB2_CLKREF_CLK, not GCC_RX1_USB2_CLKREF_CLK.
--- arch/arm64/boot/dts/qcom/sdm630.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/qcom/sdm630.dtsi +1 -1
@@ -1262,7 +1262,7 @@ qusb2phy: phy@c012000 { #phy-cells = <0>; clocks = <&gcc GCC_USB_PHY_CFG_AHB2PHY_CLK>, - <&gcc GCC_RX1_USB2_CLKREF_CLK>; + <&gcc GCC_RX0_USB2_CLKREF_CLK>; clock-names = "cfg_ahb", "ref"; resets = <&gcc GCC_QUSB2PHY_PRIM_BCR>;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 217/1095 arm64: dts: qcom: sdm630: fix gpus interconnect path
In reply to Greg Kroah-HartmanFrom: Dmitry Baryshkov <[email protected]>
[ Upstream commit 3cd1c4f41d64a40ea6bc4575ae28e37542123d77 ]
ICC path for the GPU incorrectly states <&gnoc 1 &bimc 5>, which is a path from SLAVE_GNOC_BIMC to SLAVE_EBI. According to the downstream kernel sources, the GPU uses MASTER_OXILI here, which is equivalent to <&bimc 1 ...>.
While we are at it, use defined names instead of the numbers for this interconnect path.
--- arch/arm64/boot/dts/qcom/sdm630.dtsi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
arch/arm64/boot/dts/qcom/sdm630.dtsi +2 -1
@@ -8,6 +8,7 @@ #include <dt-bindings/clock/qcom,gpucc-sdm660.h> #include <dt-bindings/clock/qcom,mmcc-sdm660.h> #include <dt-bindings/clock/qcom,rpmcc.h> +#include <dt-bindings/interconnect/qcom,sdm660.h> #include <dt-bindings/power/qcom-rpmpd.h> #include <dt-bindings/gpio/gpio.h> #include <dt-bindings/interrupt-controller/arm-gic.h>
@@ -1045,7 +1046,7 @@ adreno_gpu: gpu@5000000 { nvmem-cells = <&gpu_speed_bin>; nvmem-cell-names = "speed_bin"; - interconnects = <&gnoc 1 &bimc 5>; + interconnects = <&bimc MASTER_OXILI &bimc SLAVE_EBI>; interconnect-names = "gfx-mem"; operating-points-v2 = <&gpu_sdm630_opp_table>;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 218/1095 arm64: dts: qcom: sdm636-sony-xperia-ganges-mermaid: correct sdc2 pinconf
In reply to Greg Kroah-HartmanFrom: Dmitry Baryshkov <[email protected]>
[ Upstream commit 3a04cec9cba393abfe70fc62e523f381c9baec2e ]
Fix the device tree node in the &sdc2_state_on override. The sdm630 uses 'clk' rather than 'pinconf-clk'.
--- arch/arm64/boot/dts/qcom/sdm636-sony-xperia-ganges-mermaid.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/qcom/sdm636-sony-xperia-ganges-mermaid.dts +1 -1
@@ -19,7 +19,7 @@ / { }; &sdc2_state_on { - pinconf-clk { + clk { drive-strength = <14>; }; };
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 219/1095 cpufreq: zynq: Fix refcount leak in zynq_get_revision
In reply to Greg Kroah-HartmanFrom: Miaoqian Lin <[email protected]>
[ Upstream commit d1ff2559cef0f6f8d97fba6337b28adb10689e16 ]
of_find_compatible_node() returns a node pointer with refcount incremented, we should use of_node_put() on it when done. Add missing of_node_put() to avoid refcount leak.
--- arch/arm/mach-zynq/common.c | 1 + 1 file changed, 1 insertion(+)
arch/arm/mach-zynq/common.c +1 -0
@@ -77,6 +77,7 @@ static int __init zynq_get_revision(void) } zynq_devcfg_base =of_iomap (np,0 ); +of_node_put (np);if (!zynq_devcfg_base) {pr_err ("%s: Unable to map I/O memory\n" , __func__);return -1 ;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 220/1095 arm64: dts: renesas: r8a779m8: Drop operating points above 1.5 GHz
In reply to Greg Kroah-HartmanFrom: Geert Uytterhoeven <[email protected]>
[ Upstream commit f48cb21a28c07d0754d5f2f85444cfb0e7b1fd05 ]
The highest-performance mode for the Cortex-A57 CPU cores supported on R-Car H3Ne (R8A779M8) is the Power Optimized (1.5 GHz) mode. The Normal (1.6 GHz) and High Performance (1.7 GHz) modes are not supported.
Hence drop the "turbo-mode" entries from the operating points table inherited from r8a77951.dtsi.
--- arch/arm64/boot/dts/renesas/r8a779m8.dtsi | 5 +++++ 1 file changed, 5 insertions(+)
arch/arm64/boot/dts/renesas/r8a779m8.dtsi +5 -0
@@ -10,3 +10,8 @@ / { compatible = "renesas,r8a779m8", "renesas,r8a7795"; }; + +&cluster0_opp { + /delete-node/ opp-1600000000; + /delete-node/ opp-1700000000; +};
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 221/1095 arm64: dts: renesas: r9a07g054l2-smarc: Correct SoC name in comment
In reply to Greg Kroah-HartmanFrom: Chris Paterson <[email protected]>
[ Upstream commit d1273f541ab409242e08da6bb836bb564021274c ]
This dts is for the RZ/V2L SMARC EVK, not RZ/G2L.
--- arch/arm64/boot/dts/renesas/r9a07g054l2-smarc.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/renesas/r9a07g054l2-smarc.dts +1 -1
@@ -1,6 +1,6 @@ // SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) /* - * Device Tree Source for the RZ/G2L SMARC EVK board + * Device Tree Source for the RZ/V2L SMARC EVK board * * Copyright (C) 2021 Renesas Electronics Corp. */
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 222/1095 regulator: qcom_smd: Fix pm8916_pldo range
In reply to Greg Kroah-HartmanFrom: Stephan Gerhold <[email protected]>
[ Upstream commit e8977917e116d1571dacb8e9864474551c1c12bd ]
The PM8916 device specification [1] documents a programmable range of 1.75V to 3.337V with 12.5mV steps for the PMOS LDOs in PM8916. This range is also used when controlling the regulator directly using the qcom_spmi-regulator driver ("ult_pldo" there).
However, for some reason the qcom_smd-regulator driver allows a much larger range for the same hardware component. This could be simply a typo, since the start of the range is essentially just missing a '1'.
In practice this does not cause any major problems, since the driver just sends the actual voltage to the RPM firmware instead of making use of the incorrect voltage selector. Still, having the wrong range there is confusing and prevents the regulator core from validating requests correctly.
--- drivers/regulator/qcom_smd-regulator.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/regulator/qcom_smd-regulator.c +2 -2
@@ -357,10 +357,10 @@ static const struct regulator_desc pm8941_switch = {static const struct regulator_desc pm8916_pldo = { .linear_ranges = (struct linear_range []) { -REGULATOR_LINEAR_RANGE (750000 ,0 ,208 ,12500 ), +REGULATOR_LINEAR_RANGE (1750000 ,0 ,127 ,12500 ), }, .n_linear_ranges =1 , - .n_voltages =209 , + .n_voltages =128 , .ops = &rpm_smps_ldo_ops, };
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 223/1095 ACPI: APEI: Fix _EINJ vs EFI_MEMORY_SP
In reply to Greg Kroah-HartmanFrom: Dan Williams <[email protected]>
[ Upstream commit b13a3e5fd40b7d1b394c5ecbb5eb301a4c38e7b2 ]
When a platform marks a memory range as "special purpose" it is not onlined as System RAM by default. However, it is still suitable for error injection. Add IORES_DESC_SOFT_RESERVED to einj_error_inject() as a permissible memory type in the sanity checking of the arguments to _EINJ.
--- drivers/acpi/apei/einj.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/acpi/apei/einj.c +2 -0
@@ -546,6 +546,8 @@ static int einj_error_inject(u32 type, u32 flags, u64 param1, u64 param2, != REGION_INTERSECTS) && (region_intersects (base_addr, size,IORESOURCE_MEM ,IORES_DESC_PERSISTENT_MEMORY ) !=REGION_INTERSECTS ) && + (region_intersects (base_addr, size,IORESOURCE_MEM ,IORES_DESC_SOFT_RESERVED ) + !=REGION_INTERSECTS ) && !arch_is_platform_page(base_addr))) return -EINVAL;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 224/1095 ARM: dts: qcom: msm8974-lge-nexus5: move gpio-keys out of soc
In reply to Greg Kroah-HartmanFrom: Krzysztof Kozlowski <[email protected]>
[ Upstream commit d3eff0e174e5feecb8f45cf630a30f47f02f921c ]
The GPIO keys are not part of SoC and they should be defined inside of the root node.
--- .../qcom-msm8974-lge-nexus5-hammerhead.dts | 42 +++++++++---------- 1 file changed, 21 insertions(+), 21 deletions(-)
arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dts +21 -21
@@ -19,6 +19,27 @@ chosen { stdout-path = "serial0:115200n8"; }; + gpio-keys { + compatible = "gpio-keys"; + + pinctrl-names = "default"; + pinctrl-0 = <&gpio_keys_pin_a>; + + volume-up { + label = "volume_up"; + gpios = <&pm8941_gpios 2 GPIO_ACTIVE_LOW>; + linux,input-type = <1>; + linux,code = <KEY_VOLUMEUP>; + }; + + volume-down { + label = "volume_down"; + gpios = <&pm8941_gpios 3 GPIO_ACTIVE_LOW>; + linux,input-type = <1>; + linux,code = <KEY_VOLUMEDOWN>; + }; + }; + smd { rpm { rpm_requests {
@@ -448,27 +469,6 @@ bcrmf@1 { }; }; - gpio-keys { - compatible = "gpio-keys"; - - pinctrl-names = "default"; - pinctrl-0 = <&gpio_keys_pin_a>; - - volume-up { - label = "volume_up"; - gpios = <&pm8941_gpios 2 GPIO_ACTIVE_LOW>; - linux,input-type = <1>; - linux,code = <KEY_VOLUMEUP>; - }; - - volume-down { - label = "volume_down"; - gpios = <&pm8941_gpios 3 GPIO_ACTIVE_LOW>; - linux,input-type = <1>; - linux,code = <KEY_VOLUMEDOWN>; - }; - }; - serial@f9960000 { status = "okay";
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 225/1095 ARM: dts: qcom: msm8974-samsung-klte: move gpio-keys out of soc
In reply to Greg Kroah-HartmanFrom: Krzysztof Kozlowski <[email protected]>
[ Upstream commit c19865df6b142276ec4371ad534a1eb6fef5782d ]
The GPIO keys are not part of SoC and they should be defined inside of the root node.
--- .../boot/dts/qcom-msm8974-samsung-klte.dts | 64 +++++++++---------- 1 file changed, 32 insertions(+), 32 deletions(-)
arch/arm/boot/dts/qcom-msm8974-samsung-klte.dts +32 -32
@@ -20,6 +20,38 @@ chosen { stdout-path = "serial0:115200n8"; }; + gpio-keys { + compatible = "gpio-keys"; + + pinctrl-names = "default"; + pinctrl-0 = <&gpio_keys_pin_a>; + + volume-down { + label = "volume_down"; + gpios = <&pma8084_gpios 2 GPIO_ACTIVE_LOW>; + linux,input-type = <1>; + linux,code = <KEY_VOLUMEDOWN>; + debounce-interval = <15>; + }; + + home-key { + label = "home_key"; + gpios = <&pma8084_gpios 3 GPIO_ACTIVE_LOW>; + linux,input-type = <1>; + linux,code = <KEY_HOMEPAGE>; + wakeup-source; + debounce-interval = <15>; + }; + + volume-up { + label = "volume_up"; + gpios = <&pma8084_gpios 5 GPIO_ACTIVE_LOW>; + linux,input-type = <1>; + linux,code = <KEY_VOLUMEUP>; + debounce-interval = <15>; + }; + }; + smd { rpm { rpm_requests {
@@ -347,38 +379,6 @@ bluetooth { }; }; - gpio-keys { - compatible = "gpio-keys"; - - pinctrl-names = "default"; - pinctrl-0 = <&gpio_keys_pin_a>; - - volume-down { - label = "volume_down"; - gpios = <&pma8084_gpios 2 GPIO_ACTIVE_LOW>; - linux,input-type = <1>; - linux,code = <KEY_VOLUMEDOWN>; - debounce-interval = <15>; - }; - - home-key { - label = "home_key"; - gpios = <&pma8084_gpios 3 GPIO_ACTIVE_LOW>; - linux,input-type = <1>; - linux,code = <KEY_HOMEPAGE>; - wakeup-source; - debounce-interval = <15>; - }; - - volume-up { - label = "volume_up"; - gpios = <&pma8084_gpios 5 GPIO_ACTIVE_LOW>; - linux,input-type = <1>; - linux,code = <KEY_VOLUMEUP>; - debounce-interval = <15>; - }; - }; - pinctrl@fd510000 { blsp2_uart8_pins_active: blsp2-uart8-pins-active { pins = "gpio45", "gpio46", "gpio47", "gpio48";
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 226/1095 ARM: dts: qcom: do not use underscore in node name
In reply to Greg Kroah-HartmanFrom: Krzysztof Kozlowski <[email protected]>
[ Upstream commit 43cdc159d203eb6d02b312409e634a3fa06632ac ]
Align RPM requests node with DT schema by using hyphen instead of underscore.
--- arch/arm/boot/dts/qcom-apq8064.dtsi | 8 ++++---- arch/arm/boot/dts/qcom-apq8074-dragonboard.dts | 2 +- arch/arm/boot/dts/qcom-apq8084.dtsi | 2 +- arch/arm/boot/dts/qcom-msm8974-fairphone-fp2.dts | 2 +- arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dts | 2 +- arch/arm/boot/dts/qcom-msm8974-samsung-klte.dts | 2 +- arch/arm/boot/dts/qcom-msm8974-sony-xperia-amami.dts | 2 +- arch/arm/boot/dts/qcom-msm8974-sony-xperia-castor.dts | 2 +- arch/arm/boot/dts/qcom-msm8974-sony-xperia-honami.dts | 2 +- arch/arm/boot/dts/qcom-msm8974.dtsi | 2 +- 10 files changed, 13 insertions(+), 13 deletions(-)
arch/arm/boot/dts/qcom-apq8064.dtsi +4 -4
@@ -227,7 +227,7 @@ smem { smd { compatible = "qcom,smd"; - modem@0 { + modem-edge { interrupts = <0 37 IRQ_TYPE_EDGE_RISING>; qcom,ipc = <&l2cc 8 3>;
@@ -236,7 +236,7 @@ modem@0 { status = "disabled"; }; - q6@1 { + q6-edge { interrupts = <0 90 IRQ_TYPE_EDGE_RISING>; qcom,ipc = <&l2cc 8 15>;
@@ -245,7 +245,7 @@ q6@1 { status = "disabled"; }; - dsps@3 { + dsps-edge { interrupts = <0 138 IRQ_TYPE_EDGE_RISING>; qcom,ipc = <&sps_sic_non_secure 0x4080 0>;
@@ -254,7 +254,7 @@ dsps@3 { status = "disabled"; }; - riva@6 { + riva-edge { interrupts = <0 198 IRQ_TYPE_EDGE_RISING>; qcom,ipc = <&l2cc 8 25>;
arch/arm/boot/dts/qcom-apq8074-dragonboard.dts +1 -1
@@ -147,7 +147,7 @@ eeprom: eeprom@52 { smd { rpm { - rpm_requests { + rpm-requests { pm8841-regulators { s1 { regulator-min-microvolt = <675000>;
arch/arm/boot/dts/qcom-apq8084.dtsi +1 -1
@@ -470,7 +470,7 @@ rpm { qcom,ipc = <&apcs 8 0>; qcom,smd-edge = <15>; - rpm_requests { + rpm-requests { compatible = "qcom,rpm-apq8084"; qcom,smd-channels = "rpm_requests";
arch/arm/boot/dts/qcom-msm8974-fairphone-fp2.dts +1 -1
@@ -57,7 +57,7 @@ vibrator { smd { rpm { - rpm_requests { + rpm-requests { pm8841-regulators { s1 { regulator-min-microvolt = <675000>;
arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dts +1 -1
@@ -42,7 +42,7 @@ volume-down { smd { rpm { - rpm_requests { + rpm-requests { pm8841-regulators { s1 { regulator-min-microvolt = <675000>;
arch/arm/boot/dts/qcom-msm8974-samsung-klte.dts +1 -1
@@ -54,7 +54,7 @@ volume-up { smd { rpm { - rpm_requests { + rpm-requests { pma8084-regulators { compatible = "qcom,rpm-pma8084-regulators"; status = "okay";
arch/arm/boot/dts/qcom-msm8974-sony-xperia-amami.dts +1 -1
@@ -60,7 +60,7 @@ memory@0 { smd { rpm { - rpm_requests { + rpm-requests { pm8841-regulators { s1 { regulator-min-microvolt = <675000>;
arch/arm/boot/dts/qcom-msm8974-sony-xperia-castor.dts +1 -1
@@ -55,7 +55,7 @@ volume-up { smd { rpm { - rpm_requests { + rpm-requests { pm8941-regulators { vdd_l1_l3-supply = <&pm8941_s1>; vdd_l2_lvs1_2_3-supply = <&pm8941_s3>;
arch/arm/boot/dts/qcom-msm8974-sony-xperia-honami.dts +1 -1
@@ -60,7 +60,7 @@ memory@0 { smd { rpm { - rpm_requests { + rpm-requests { pm8841-regulators { s1 { regulator-min-microvolt = <675000>;
arch/arm/boot/dts/qcom-msm8974.dtsi +1 -1
@@ -1614,7 +1614,7 @@ rpm { qcom,ipc = <&apcs 8 0>; qcom,smd-edge = <15>; - rpm_requests { + rpm-requests { compatible = "qcom,rpm-msm8974"; qcom,smd-channels = "rpm_requests";
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 227/1095 ARM: dts: qcom-msm8974*: Fix UART naming
In reply to Greg Kroah-HartmanFrom: Konrad Dybcio <[email protected]>
[ Upstream commit b905c34ae7db6b564589f02fa7eac7afaa0294e9 ]
It's either uart10, or blsp2_uart4, not blsp2_uart10, as there aren't 10 UARTs on BLSP2. Fix the naming to align with what's done in arm64/qcom.
--- .../boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dts | 6 +++--- arch/arm/boot/dts/qcom-msm8974-samsung-klte.dts | 10 +++++----- arch/arm/boot/dts/qcom-msm8974-sony-xperia-castor.dts | 2 +- arch/arm/boot/dts/qcom-msm8974.dtsi | 6 +++--- 4 files changed, 12 insertions(+), 12 deletions(-)
arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dts +3 -3
@@ -12,7 +12,7 @@ / { aliases { serial0 = &blsp1_uart1; - serial1 = &blsp2_uart10; + serial1 = &blsp2_uart4; }; chosen {
@@ -395,7 +395,7 @@ shutdown { }; }; - blsp2_uart10_pin_a: blsp2-uart10-pin-active { + blsp2_uart4_pin_a: blsp2-uart4-pin-active { tx { pins = "gpio53"; function = "blsp_uart10";
@@ -473,7 +473,7 @@ serial@f9960000 { status = "okay"; pinctrl-names = "default"; - pinctrl-0 = <&blsp2_uart10_pin_a>; + pinctrl-0 = <&blsp2_uart4_pin_a>; bluetooth { compatible = "brcm,bcm43438-bt";
arch/arm/boot/dts/qcom-msm8974-samsung-klte.dts +5 -5
@@ -358,13 +358,13 @@ serial@f991e000 { status = "okay"; }; - /* blsp2_uart8 */ + /* blsp2_uart2 */ serial@f995e000 { status = "okay"; pinctrl-names = "default", "sleep"; - pinctrl-0 = <&blsp2_uart8_pins_active>; - pinctrl-1 = <&blsp2_uart8_pins_sleep>; + pinctrl-0 = <&blsp2_uart2_pins_active>; + pinctrl-1 = <&blsp2_uart2_pins_sleep>; bluetooth { compatible = "brcm,bcm43540-bt";
@@ -380,14 +380,14 @@ bluetooth { }; pinctrl@fd510000 { - blsp2_uart8_pins_active: blsp2-uart8-pins-active { + blsp2_uart2_pins_active: blsp2-uart2-pins-active { pins = "gpio45", "gpio46", "gpio47", "gpio48"; function = "blsp_uart8"; drive-strength = <8>; bias-disable; }; - blsp2_uart8_pins_sleep: blsp2-uart8-pins-sleep { + blsp2_uart2_pins_sleep: blsp2-uart2-pins-sleep { pins = "gpio45", "gpio46", "gpio47", "gpio48"; function = "gpio"; drive-strength = <2>;
arch/arm/boot/dts/qcom-msm8974-sony-xperia-castor.dts +1 -1
@@ -11,7 +11,7 @@ / { aliases { serial0 = &blsp1_uart2; - serial1 = &blsp2_uart7; + serial1 = &blsp2_uart1; }; chosen {
arch/arm/boot/dts/qcom-msm8974.dtsi +3 -3
@@ -715,7 +715,7 @@ blsp1_uart2: serial@f991e000 { status = "disabled"; }; - blsp2_uart7: serial@f995d000 { + blsp2_uart1: serial@f995d000 { compatible = "qcom,msm-uartdm-v1.4", "qcom,msm-uartdm"; reg = <0xf995d000 0x1000>; interrupts = <GIC_SPI 113 IRQ_TYPE_NONE>;
@@ -724,7 +724,7 @@ blsp2_uart7: serial@f995d000 { status = "disabled"; }; - blsp2_uart8: serial@f995e000 { + blsp2_uart2: serial@f995e000 { compatible = "qcom,msm-uartdm-v1.4", "qcom,msm-uartdm"; reg = <0xf995e000 0x1000>; interrupts = <GIC_SPI 114 IRQ_TYPE_LEVEL_HIGH>;
@@ -733,7 +733,7 @@ blsp2_uart8: serial@f995e000 { status = "disabled"; }; - blsp2_uart10: serial@f9960000 { + blsp2_uart4: serial@f9960000 { compatible = "qcom,msm-uartdm-v1.4", "qcom,msm-uartdm"; reg = <0xf9960000 0x1000>; interrupts = <GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH>;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 228/1095 ARM: dts: qcom-msm8974*: Fix I2C labels
In reply to Greg Kroah-HartmanFrom: Konrad Dybcio <[email protected]>
[ Upstream commit bb167546d06847a8729c973fe5165a231fd5c39d ]
Fix up the label names and add missing ones.
--- arch/arm/boot/dts/qcom-msm8974.dtsi | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-)
arch/arm/boot/dts/qcom-msm8974.dtsi +7 -7
@@ -959,7 +959,7 @@ msmgpio: pinctrl@fd510000 { interrupts = <GIC_SPI 208 IRQ_TYPE_LEVEL_HIGH>; }; - i2c@f9923000 { + blsp1_i2c1: i2c@f9923000 { status = "disabled"; compatible = "qcom,i2c-qup-v2.1.1"; reg = <0xf9923000 0x1000>;
@@ -970,7 +970,7 @@ i2c@f9923000 { #size-cells = <0>; }; - i2c@f9924000 { + blsp1_i2c2: i2c@f9924000 { status = "disabled"; compatible = "qcom,i2c-qup-v2.1.1"; reg = <0xf9924000 0x1000>;
@@ -981,7 +981,7 @@ i2c@f9924000 { #size-cells = <0>; }; - blsp_i2c3: i2c@f9925000 { + blsp1_i2c3: i2c@f9925000 { status = "disabled"; compatible = "qcom,i2c-qup-v2.1.1"; reg = <0xf9925000 0x1000>;
@@ -992,7 +992,7 @@ blsp_i2c3: i2c@f9925000 { #size-cells = <0>; }; - blsp_i2c6: i2c@f9928000 { + blsp1_i2c6: i2c@f9928000 { status = "disabled"; compatible = "qcom,i2c-qup-v2.1.1"; reg = <0xf9928000 0x1000>;
@@ -1003,7 +1003,7 @@ blsp_i2c6: i2c@f9928000 { #size-cells = <0>; }; - blsp_i2c8: i2c@f9964000 { + blsp2_i2c2: i2c@f9964000 { status = "disabled"; compatible = "qcom,i2c-qup-v2.1.1"; reg = <0xf9964000 0x1000>;
@@ -1014,7 +1014,7 @@ blsp_i2c8: i2c@f9964000 { #size-cells = <0>; }; - blsp_i2c11: i2c@f9967000 { + blsp2_i2c5: i2c@f9967000 { status = "disabled"; compatible = "qcom,i2c-qup-v2.1.1"; reg = <0xf9967000 0x1000>;
@@ -1027,7 +1027,7 @@ blsp_i2c11: i2c@f9967000 { dma-names = "tx", "rx"; }; - blsp_i2c12: i2c@f9968000 { + blsp2_i2c6: i2c@f9968000 { status = "disabled"; compatible = "qcom,i2c-qup-v2.1.1"; reg = <0xf9968000 0x1000>;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 229/1095 ARM: dts: qcom-msm8974: Fix up mdss nodes
In reply to Greg Kroah-HartmanFrom: Konrad Dybcio <[email protected]>
[ Upstream commit 4de36f7b6d0e7e792d36800ac6c5e3392b59573a ]
Fix up formatting, move status=disabled to the end where it belongs, rename DSI PHY label to match newer DTs, use tabs where possible, unwrap lines where wrapping is not necessary and don't disable mdp, as MDSS is useless without it.
--- arch/arm/boot/dts/qcom-msm8974.dtsi | 77 +++++++++++++---------------- 1 file changed, 34 insertions(+), 43 deletions(-)
arch/arm/boot/dts/qcom-msm8974.dtsi +34 -43
@@ -1461,35 +1461,29 @@ opp-27000000 { }; mdss: mdss@fd900000 { - status = "disabled"; - compatible = "qcom,mdss"; - reg = <0xfd900000 0x100>, - <0xfd924000 0x1000>; - reg-names = "mdss_phys", - "vbif_phys"; + reg = <0xfd900000 0x100>, <0xfd924000 0x1000>; + reg-names = "mdss_phys", "vbif_phys"; power-domains = <&mmcc MDSS_GDSC>; clocks = <&mmcc MDSS_AHB_CLK>, - <&mmcc MDSS_AXI_CLK>, - <&mmcc MDSS_VSYNC_CLK>; - clock-names = "iface", - "bus", - "vsync"; + <&mmcc MDSS_AXI_CLK>, + <&mmcc MDSS_VSYNC_CLK>; + clock-names = "iface", "bus", "vsync"; interrupts = <GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>; interrupt-controller; #interrupt-cells = <1>; + status = "disabled"; + #address-cells = <1>; #size-cells = <1>; ranges; mdp: mdp@fd900000 { - status = "disabled"; - compatible = "qcom,mdp5"; reg = <0xfd900100 0x22000>; reg-names = "mdp_phys";
@@ -1501,10 +1495,7 @@ mdp: mdp@fd900000 { <&mmcc MDSS_AXI_CLK>, <&mmcc MDSS_MDP_CLK>, <&mmcc MDSS_VSYNC_CLK>; - clock-names = "iface", - "bus", - "core", - "vsync"; + clock-names = "iface", "bus", "core", "vsync"; interconnects = <&mmssnoc MNOC_MAS_MDP_PORT0 &bimc BIMC_SLV_EBI_CH0>; interconnect-names = "mdp0-mem";
@@ -1523,8 +1514,6 @@ mdp5_intf1_out: endpoint { }; dsi0: dsi@fd922800 { - status = "disabled"; - compatible = "qcom,mdss-dsi-ctrl"; reg = <0xfd922800 0x1f8>; reg-names = "dsi_ctrl";
@@ -1532,29 +1521,32 @@ dsi0: dsi@fd922800 { interrupt-parent = <&mdss>; interrupts = <4 IRQ_TYPE_LEVEL_HIGH>; - assigned-clocks = <&mmcc BYTE0_CLK_SRC>, - <&mmcc PCLK0_CLK_SRC>; - assigned-clock-parents = <&dsi_phy0 0>, - <&dsi_phy0 1>; + assigned-clocks = <&mmcc BYTE0_CLK_SRC>, <&mmcc PCLK0_CLK_SRC>; + assigned-clock-parents = <&dsi0_phy 0>, <&dsi0_phy 1>; clocks = <&mmcc MDSS_MDP_CLK>, - <&mmcc MDSS_AHB_CLK>, - <&mmcc MDSS_AXI_CLK>, - <&mmcc MDSS_BYTE0_CLK>, - <&mmcc MDSS_PCLK0_CLK>, - <&mmcc MDSS_ESC0_CLK>, - <&mmcc MMSS_MISC_AHB_CLK>; + <&mmcc MDSS_AHB_CLK>, + <&mmcc MDSS_AXI_CLK>, + <&mmcc MDSS_BYTE0_CLK>, + <&mmcc MDSS_PCLK0_CLK>, + <&mmcc MDSS_ESC0_CLK>, + <&mmcc MMSS_MISC_AHB_CLK>; clock-names = "mdp_core", - "iface", - "bus", - "byte", - "pixel", - "core", - "core_mmss"; - - phys = <&dsi_phy0>; + "iface", + "bus", + "byte", + "pixel", + "core", + "core_mmss"; + + phys = <&dsi0_phy>; phy-names = "dsi-phy"; + status = "disabled"; + + #address-cells = <1>; + #size-cells = <0>; + ports { #address-cells = <1>; #size-cells = <0>;
@@ -1574,23 +1566,22 @@ dsi0_out: endpoint { }; }; - dsi_phy0: dsi-phy@fd922a00 { - status = "disabled"; - + dsi0_phy: dsi-phy@fd922a00 { compatible = "qcom,dsi-phy-28nm-hpm"; reg = <0xfd922a00 0xd4>, <0xfd922b00 0x280>, <0xfd922d80 0x30>; reg-names = "dsi_pll", - "dsi_phy", - "dsi_phy_regulator"; + "dsi_phy", + "dsi_phy_regulator"; #clock-cells = <1>; #phy-cells = <0>; - qcom,dsi-phy-index = <0>; clocks = <&mmcc MDSS_AHB_CLK>, <&xo_board>; clock-names = "iface", "ref"; + + status = "disabled"; }; };
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 230/1095 ARM: dts: qcom-msm8974: Fix up SDHCI nodes
In reply to Greg Kroah-HartmanFrom: Konrad Dybcio <[email protected]>
[ Upstream commit 64cf62683b5398e46cf967c308be95685137626a ]
- Add missing labels (and remove their redefinition from klte)
- Commonize bus-width
- Add non-removable on sdhc_1, as it's supposed to have an eMMC on it
--- arch/arm/boot/dts/qcom-msm8974-samsung-klte.dts | 4 ++-- arch/arm/boot/dts/qcom-msm8974.dtsi | 13 ++++++++++--- 2 files changed, 12 insertions(+), 5 deletions(-)
arch/arm/boot/dts/qcom-msm8974-samsung-klte.dts +2 -2
@@ -534,7 +534,7 @@ te { }; }; - sdhc_1: sdhci@f9824900 { + sdhci@f9824900 { status = "okay"; vmmc-supply = <&pma8084_l20>;
@@ -547,7 +547,7 @@ sdhc_1: sdhci@f9824900 { pinctrl-0 = <&sdhc1_pin_a>; }; - sdhc_2: sdhci@f9864900 { + sdhci@f9864900 { status = "okay"; max-frequency = <100000000>;
arch/arm/boot/dts/qcom-msm8974.dtsi +10 -3
@@ -742,7 +742,7 @@ blsp2_uart4: serial@f9960000 { status = "disabled"; }; - sdhci@f9824900 { + sdhc_1: sdhci@f9824900 { compatible = "qcom,msm8974-sdhci", "qcom,sdhci-msm-v4"; reg = <0xf9824900 0x11c>, <0xf9824000 0x800>; reg-names = "hc_mem", "core_mem";
@@ -753,10 +753,13 @@ sdhci@f9824900 { <&gcc GCC_SDCC1_AHB_CLK>, <&xo_board>; clock-names = "core", "iface", "xo"; + bus-width = <8>; + non-removable; + status = "disabled"; }; - sdhci@f9864900 { + sdhc_3: sdhci@f9864900 { compatible = "qcom,msm8974-sdhci", "qcom,sdhci-msm-v4"; reg = <0xf9864900 0x11c>, <0xf9864000 0x800>; reg-names = "hc_mem", "core_mem";
@@ -767,10 +770,12 @@ sdhci@f9864900 { <&gcc GCC_SDCC3_AHB_CLK>, <&xo_board>; clock-names = "core", "iface", "xo"; + bus-width = <4>; + status = "disabled"; }; - sdhci@f98a4900 { + sdhc_2: sdhci@f98a4900 { compatible = "qcom,msm8974-sdhci", "qcom,sdhci-msm-v4"; reg = <0xf98a4900 0x11c>, <0xf98a4000 0x800>; reg-names = "hc_mem", "core_mem";
@@ -781,6 +786,8 @@ sdhci@f98a4900 { <&gcc GCC_SDCC2_AHB_CLK>, <&xo_board>; clock-names = "core", "iface", "xo"; + bus-width = <4>; + status = "disabled"; };
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 231/1095 ARM: dts: qcom-msm8974*: Rename msmgpio to tlmm
In reply to Greg Kroah-HartmanFrom: Konrad Dybcio <[email protected]>
[ Upstream commit 087c9704d5bb322dd5db52938416caeaf4cdc3c3 ]
Rename the label to match new the style used in newer DTs.
--- .../arm/boot/dts/qcom-apq8074-dragonboard.dts | 2 +- .../boot/dts/qcom-msm8974-fairphone-fp2.dts | 2 +- .../qcom-msm8974-lge-nexus5-hammerhead.dts | 18 ++++++++--------- .../boot/dts/qcom-msm8974-samsung-klte.dts | 20 +++++++++---------- .../dts/qcom-msm8974-sony-xperia-amami.dts | 2 +- .../dts/qcom-msm8974-sony-xperia-castor.dts | 10 +++++----- .../dts/qcom-msm8974-sony-xperia-honami.dts | 4 ++-- arch/arm/boot/dts/qcom-msm8974.dtsi | 4 ++-- 8 files changed, 31 insertions(+), 31 deletions(-)
arch/arm/boot/dts/qcom-apq8074-dragonboard.dts +1 -1
@@ -35,7 +35,7 @@ sdhci@f9824900 { }; sdhci@f98a4900 { - cd-gpios = <&msmgpio 62 0x1>; + cd-gpios = <&tlmm 62 0x1>; pinctrl-names = "default"; pinctrl-0 = <&sdhc2_pin_a>, <&sdhc2_cd_pin_a>; bus-width = <4>;
arch/arm/boot/dts/qcom-msm8974-fairphone-fp2.dts +1 -1
@@ -51,7 +51,7 @@ volume-up { vibrator { compatible = "gpio-vibrator"; - enable-gpios = <&msmgpio 86 GPIO_ACTIVE_HIGH>; + enable-gpios = <&tlmm 86 GPIO_ACTIVE_HIGH>; vcc-supply = <&pm8941_l18>; };
arch/arm/boot/dts/qcom-msm8974-lge-nexus5-hammerhead.dts +9 -9
@@ -250,7 +250,7 @@ vreg_wlan: wlan-regulator { regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; - gpio = <&msmgpio 26 GPIO_ACTIVE_HIGH>; + gpio = <&tlmm 26 GPIO_ACTIVE_HIGH>; enable-active-high; pinctrl-names = "default";
@@ -482,9 +482,9 @@ bluetooth { pinctrl-names = "default"; pinctrl-0 = <&bt_pin>; - host-wakeup-gpios = <&msmgpio 42 GPIO_ACTIVE_HIGH>; - device-wakeup-gpios = <&msmgpio 62 GPIO_ACTIVE_HIGH>; - shutdown-gpios = <&msmgpio 41 GPIO_ACTIVE_HIGH>; + host-wakeup-gpios = <&tlmm 42 GPIO_ACTIVE_HIGH>; + device-wakeup-gpios = <&tlmm 62 GPIO_ACTIVE_HIGH>; + shutdown-gpios = <&tlmm 41 GPIO_ACTIVE_HIGH>; }; };
@@ -522,7 +522,7 @@ i2c@f9968000 { mpu6515@68 { compatible = "invensense,mpu6515"; reg = <0x68>; - interrupts-extended = <&msmgpio 73 IRQ_TYPE_EDGE_FALLING>; + interrupts-extended = <&tlmm 73 IRQ_TYPE_EDGE_FALLING>; vddio-supply = <&pm8941_lvs1>; pinctrl-names = "default";
@@ -538,7 +538,7 @@ i2c-gate { ak8963@f { compatible = "asahi-kasei,ak8963"; reg = <0x0f>; - gpios = <&msmgpio 67 0>; + gpios = <&tlmm 67 0>; vid-supply = <&pm8941_lvs1>; vdd-supply = <&pm8941_l17>; };
@@ -577,7 +577,7 @@ fuelgauge: max17048@36 { maxim,double-soc; maxim,rcomp = /bits/ 8 <0x4d>; - interrupt-parent = <&msmgpio>; + interrupt-parent = <&tlmm>; interrupts = <9 IRQ_TYPE_LEVEL_LOW>; pinctrl-names = "default";
@@ -600,7 +600,7 @@ synaptics@70 { compatible = "syna,rmi4-i2c"; reg = <0x70>; - interrupts-extended = <&msmgpio 5 IRQ_TYPE_EDGE_FALLING>; + interrupts-extended = <&tlmm 5 IRQ_TYPE_EDGE_FALLING>; vdd-supply = <&pm8941_l22>; vio-supply = <&pm8941_lvs3>;
@@ -632,7 +632,7 @@ i2c@f9925000 { avago_apds993@39 { compatible = "avago,apds9930"; reg = <0x39>; - interrupts-extended = <&msmgpio 61 IRQ_TYPE_EDGE_FALLING>; + interrupts-extended = <&tlmm 61 IRQ_TYPE_EDGE_FALLING>; vdd-supply = <&pm8941_l17>; vddio-supply = <&pm8941_lvs1>; led-max-microamp = <100000>;
arch/arm/boot/dts/qcom-msm8974-samsung-klte.dts +10 -10
@@ -247,8 +247,8 @@ i2c-gpio-touchkey { compatible = "i2c-gpio"; #address-cells = <1>; #size-cells = <0>; - sda-gpios = <&msmgpio 95 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; - scl-gpios = <&msmgpio 96 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; + sda-gpios = <&tlmm 95 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; + scl-gpios = <&tlmm 96 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; pinctrl-names = "default"; pinctrl-0 = <&i2c_touchkey_pins>;
@@ -272,8 +272,8 @@ i2c-gpio-led { compatible = "i2c-gpio"; #address-cells = <1>; #size-cells = <0>; - scl-gpios = <&msmgpio 121 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; - sda-gpios = <&msmgpio 120 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; + scl-gpios = <&tlmm 121 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; + sda-gpios = <&tlmm 120 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; pinctrl-names = "default"; pinctrl-0 = <&i2c_led_gpioex_pins>;
@@ -291,7 +291,7 @@ gpio_expander: gpio@20 { pinctrl-names = "default"; pinctrl-0 = <&gpioex_pin>; - reset-gpios = <&msmgpio 145 GPIO_ACTIVE_LOW>; + reset-gpios = <&tlmm 145 GPIO_ACTIVE_LOW>; }; led-controller@30 {
@@ -371,9 +371,9 @@ bluetooth { max-speed = <3000000>; pinctrl-names = "default"; pinctrl-0 = <&bt_pins>; - device-wakeup-gpios = <&msmgpio 91 GPIO_ACTIVE_HIGH>; + device-wakeup-gpios = <&tlmm 91 GPIO_ACTIVE_HIGH>; shutdown-gpios = <&gpio_expander 9 GPIO_ACTIVE_HIGH>; - interrupt-parent = <&msmgpio>; + interrupt-parent = <&tlmm>; interrupts = <75 IRQ_TYPE_LEVEL_HIGH>; interrupt-names = "host-wakeup"; };
@@ -563,7 +563,7 @@ sdhci@f9864900 { */ pinctrl-names = "default"; pinctrl-0 = <&sdhc2_pin_a /* &sdhc2_cd_pin */>; - // cd-gpios = <&msmgpio 62 GPIO_ACTIVE_LOW>; + // cd-gpios = <&tlmm 62 GPIO_ACTIVE_LOW>; }; sdhci@f98a4900 {
@@ -587,7 +587,7 @@ wifi@1 { reg = <1>; compatible = "brcm,bcm4329-fmac"; - interrupt-parent = <&msmgpio>; + interrupt-parent = <&tlmm>; interrupts = <92 IRQ_TYPE_LEVEL_HIGH>; interrupt-names = "host-wake";
@@ -818,7 +818,7 @@ panel: panel@0 { vddr-supply = <&vreg_panel>; reset-gpios = <&pma8084_gpios 17 GPIO_ACTIVE_LOW>; - te-gpios = <&msmgpio 12 GPIO_ACTIVE_HIGH>; + te-gpios = <&tlmm 12 GPIO_ACTIVE_HIGH>; port { panel_in: endpoint {
arch/arm/boot/dts/qcom-msm8974-sony-xperia-amami.dts +1 -1
@@ -280,7 +280,7 @@ sdhci@f98a4900 { vmmc-supply = <&pm8941_l21>; vqmmc-supply = <&pm8941_l13>; - cd-gpios = <&msmgpio 62 GPIO_ACTIVE_LOW>; + cd-gpios = <&tlmm 62 GPIO_ACTIVE_LOW>; pinctrl-names = "default"; pinctrl-0 = <&sdhc2_pin_a>, <&sdhc2_cd_pin_a>;
arch/arm/boot/dts/qcom-msm8974-sony-xperia-castor.dts +5 -5
@@ -239,7 +239,7 @@ vreg_bl_vddio: lcd-backlight-vddio { regulator-min-microvolt = <3150000>; regulator-max-microvolt = <3150000>; - gpio = <&msmgpio 69 0>; + gpio = <&tlmm 69 0>; enable-active-high; vin-supply = <&pm8941_s3>;
@@ -323,7 +323,7 @@ sdhci@f98a4900 { vmmc-supply = <&pm8941_l21>; vqmmc-supply = <&pm8941_l13>; - cd-gpios = <&msmgpio 62 GPIO_ACTIVE_LOW>; + cd-gpios = <&tlmm 62 GPIO_ACTIVE_LOW>; pinctrl-names = "default"; pinctrl-0 = <&sdhc2_pin_a>, <&sdhc2_cd_pin_a>;
@@ -351,8 +351,8 @@ bluetooth { <&bt_dev_wake_pin>, <&bt_reg_on_pin>; - host-wakeup-gpios = <&msmgpio 95 GPIO_ACTIVE_HIGH>; - device-wakeup-gpios = <&msmgpio 96 GPIO_ACTIVE_HIGH>; + host-wakeup-gpios = <&tlmm 95 GPIO_ACTIVE_HIGH>; + device-wakeup-gpios = <&tlmm 96 GPIO_ACTIVE_HIGH>; shutdown-gpios = <&pm8941_gpios 16 GPIO_ACTIVE_HIGH>; }; };
@@ -566,7 +566,7 @@ synaptics@2c { compatible = "syna,rmi4-i2c"; reg = <0x2c>; - interrupt-parent = <&msmgpio>; + interrupt-parent = <&tlmm>; interrupts = <86 IRQ_TYPE_EDGE_FALLING>; #address-cells = <1>;
arch/arm/boot/dts/qcom-msm8974-sony-xperia-honami.dts +2 -2
@@ -305,7 +305,7 @@ sdhci@f98a4900 { vmmc-supply = <&pm8941_l21>; vqmmc-supply = <&pm8941_l13>; - cd-gpios = <&msmgpio 62 GPIO_ACTIVE_LOW>; + cd-gpios = <&tlmm 62 GPIO_ACTIVE_LOW>; pinctrl-names = "default"; pinctrl-0 = <&sdhc2_pin_a>, <&sdhc2_cd_pin_a>;
@@ -331,7 +331,7 @@ synaptics@2c { compatible = "syna,rmi4-i2c"; reg = <0x2c>; - interrupts-extended = <&msmgpio 61 IRQ_TYPE_EDGE_FALLING>; + interrupts-extended = <&tlmm 61 IRQ_TYPE_EDGE_FALLING>; #address-cells = <1>; #size-cells = <0>;
arch/arm/boot/dts/qcom-msm8974.dtsi +2 -2
@@ -955,11 +955,11 @@ wifi { }; }; - msmgpio: pinctrl@fd510000 { + tlmm: pinctrl@fd510000 { compatible = "qcom,msm8974-pinctrl"; reg = <0xfd510000 0x4000>; gpio-controller; - gpio-ranges = <&msmgpio 0 0 146>; + gpio-ranges = <&tlmm 0 0 146>; #gpio-cells = <2>; interrupt-controller; #interrupt-cells = <2>;
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 232/1095 ARM: dts: qcom-apq8074-dragonboard: Use &labels
In reply to Greg Kroah-HartmanFrom: Konrad Dybcio <[email protected]>
[ Upstream commit 9f440d17e2309c7d14eba0898c775be6d6e6d6b7 ]
Use &labels to align with the style used in new DTS and apply tiny style fixes.
--- .../arm/boot/dts/qcom-apq8074-dragonboard.dts | 605 +++++++++--------- arch/arm/boot/dts/qcom-msm8974.dtsi | 2 +- 2 files changed, 296 insertions(+), 311 deletions(-)
arch/arm/boot/dts/qcom-apq8074-dragonboard.dts +295 -310
@@ -16,331 +16,316 @@ aliases { chosen { stdout-path = "serial0:115200n8"; }; +}; + +&blsp1_uart2 { + status = "okay"; +}; + +&blsp2_i2c5 { + status = "okay"; + clock-frequency = <200000>; + + pinctrl-0 = <&i2c11_pins>; + pinctrl-names = "default"; + + eeprom: eeprom@52 { + compatible = "atmel,24c128"; + reg = <0x52>; + pagesize = <32>; + read-only; + }; +}; + +&otg { + status = "okay"; - soc { - serial@f991e000 { + phys = <&usb_hs2_phy>; + phy-select = <&tcsr 0xb000 1>; + extcon = <&smbb>, <&usb_id>; + vbus-supply = <&chg_otg>; + hnp-disable; + srp-disable; + adp-disable; + + ulpi { + phy@b { status = "okay"; + v3p3-supply = <&pm8941_l24>; + v1p8-supply = <&pm8941_l6>; + extcon = <&smbb>; + qcom,init-seq = /bits/ 8 <0x1 0x63>; + }; + }; +}; + +&rpm_requests { + pm8841-regulators { + pm8841_s1: s1 { + regulator-min-microvolt = <675000>; + regulator-max-microvolt = <1050000>; }; - sdhci@f9824900 { - bus-width = <8>; - non-removable; - status = "okay"; + pm8841_s2: s2 { + regulator-min-microvolt = <500000>; + regulator-max-microvolt = <1050000>; + }; + + pm8841_s3: s3 { + regulator-min-microvolt = <500000>; + regulator-max-microvolt = <1050000>; + }; - vmmc-supply = <&pm8941_l20>; - vqmmc-supply = <&pm8941_s3>; + pm8841_s4: s4 { + regulator-min-microvolt = <500000>; + regulator-max-microvolt = <1050000>; + }; + }; - pinctrl-names = "default"; - pinctrl-0 = <&sdhc1_pin_a>; + pm8941-regulators { + vdd_l1_l3-supply = <&pm8941_s1>; + vdd_l2_lvs1_2_3-supply = <&pm8941_s3>; + vdd_l4_l11-supply = <&pm8941_s1>; + vdd_l5_l7-supply = <&pm8941_s2>; + vdd_l6_l12_l14_l15-supply = <&pm8941_s2>; + vin_5vs-supply = <&pm8941_5v>; + + pm8941_s1: s1 { + regulator-min-microvolt = <1300000>; + regulator-max-microvolt = <1300000>; + regulator-always-on; + regulator-boot-on; }; - sdhci@f98a4900 { - cd-gpios = <&tlmm 62 0x1>; - pinctrl-names = "default"; - pinctrl-0 = <&sdhc2_pin_a>, <&sdhc2_cd_pin_a>; - bus-width = <4>; - status = "okay"; + pm8941_s2: s2 { + regulator-min-microvolt = <2150000>; + regulator-max-microvolt = <2150000>; + regulator-boot-on; + }; - vmmc-supply = <&pm8941_l21>; - vqmmc-supply = <&pm8941_l13>; + pm8941_s3: s3 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-always-on; + regulator-boot-on; }; - usb@f9a55000 { - status = "okay"; - phys = <&usb_hs2_phy>; - phy-select = <&tcsr 0xb000 1>; - extcon = <&smbb>, <&usb_id>; - vbus-supply = <&chg_otg>; - hnp-disable; - srp-disable; - adp-disable; - ulpi { - phy@b { - status = "okay"; - v3p3-supply = <&pm8941_l24>; - v1p8-supply = <&pm8941_l6>; - extcon = <&smbb>; - qcom,init-seq = /bits/ 8 <0x1 0x63>; - }; - }; - }; - - - pinctrl@fd510000 { - i2c11_pins: i2c11 { - mux { - pins = "gpio83", "gpio84"; - function = "blsp_i2c11"; - }; - }; - - spi8_default: spi8_default { - mosi { - pins = "gpio45"; - function = "blsp_spi8"; - }; - miso { - pins = "gpio46"; - function = "blsp_spi8"; - }; - cs { - pins = "gpio47"; - function = "blsp_spi8"; - }; - clk { - pins = "gpio48"; - function = "blsp_spi8"; - }; - }; - - sdhc1_pin_a: sdhc1-pin-active { - clk { - pins = "sdc1_clk"; - drive-strength = <16>; - bias-disable; - }; - - cmd-data { - pins = "sdc1_cmd", "sdc1_data"; - drive-strength = <10>; - bias-pull-up; - }; - }; - - sdhc2_cd_pin_a: sdhc2-cd-pin-active { - pins = "gpio62"; - function = "gpio"; - - drive-strength = <2>; - bias-disable; - }; - - sdhc2_pin_a: sdhc2-pin-active { - clk { - pins = "sdc2_clk"; - drive-strength = <10>; - bias-disable; - }; - - cmd-data { - pins = "sdc2_cmd", "sdc2_data"; - drive-strength = <6>; - bias-pull-up; - }; - }; - }; - - i2c@f9967000 { - status = "okay"; - clock-frequency = <200000>; - pinctrl-0 = <&i2c11_pins>; - pinctrl-names = "default"; + pm8941_l1: l1 { + regulator-min-microvolt = <1225000>; + regulator-max-microvolt = <1225000>; + regulator-always-on; + regulator-boot-on; + }; + + pm8941_l2: l2 { + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + }; + + pm8941_l3: l3 { + regulator-min-microvolt = <1225000>; + regulator-max-microvolt = <1225000>; + }; + + pm8941_l4: l4 { + regulator-min-microvolt = <1225000>; + regulator-max-microvolt = <1225000>; + }; + + pm8941_l5: l5 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + }; + + pm8941_l6: l6 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-boot-on; + }; + + pm8941_l7: l7 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-boot-on; + }; + + pm8941_l8: l8 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + }; + + pm8941_l9: l9 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <2950000>; + }; + + pm8941_l10: l10 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-always-on; + }; + + pm8941_l11: l11 { + regulator-min-microvolt = <1300000>; + regulator-max-microvolt = <1300000>; + }; + + pm8941_l12: l12 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-always-on; + regulator-boot-on; + }; + + pm8941_l13: l13 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <2950000>; + regulator-boot-on; + }; + + pm8941_l14: l14 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + }; + + pm8941_l15: l15 { + regulator-min-microvolt = <2050000>; + regulator-max-microvolt = <2050000>; + }; + + pm8941_l16: l16 { + regulator-min-microvolt = <2700000>; + regulator-max-microvolt = <2700000>; + }; + + pm8941_l17: l17 { + regulator-min-microvolt = <2700000>; + regulator-max-microvolt = <2700000>; + }; + + pm8941_l18: l18 { + regulator-min-microvolt = <2850000>; + regulator-max-microvolt = <2850000>; + }; + + pm8941_l19: l19 { + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + }; + + pm8941_l20: l20 { + regulator-min-microvolt = <2950000>; + regulator-max-microvolt = <2950000>; + regulator-system-load = <200000>; + regulator-allow-set-load; + regulator-boot-on; + }; + + pm8941_l21: l21 { + regulator-min-microvolt = <2950000>; + regulator-max-microvolt = <2950000>; + regulator-boot-on; + }; + + pm8941_l22: l22 { + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3000000>; + }; + + pm8941_l23: l23 { + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3000000>; + }; + + pm8941_l24: l24 { + regulator-min-microvolt = <3075000>; + regulator-max-microvolt = <3075000>; + regulator-boot-on; + }; + }; +}; + +&sdhc_1 { + status = "okay"; + + vmmc-supply = <&pm8941_l20>; + vqmmc-supply = <&pm8941_s3>; + + pinctrl-names = "default"; + pinctrl-0 = <&sdhc1_pin_a>; +}; + +&sdhc_2 { + status = "okay"; + cd-gpios = <&tlmm 62 0x1>; + pinctrl-names = "default"; + pinctrl-0 = <&sdhc2_pin_a>, <&sdhc2_cd_pin_a>; + + vmmc-supply = <&pm8941_l21>; + vqmmc-supply = <&pm8941_l13>; +}; + +&tlmm { + i2c11_pins: i2c11 { + mux { + pins = "gpio83", "gpio84"; + function = "blsp_i2c11"; + }; + }; + + spi8_default: spi8_default { + mosi { + pins = "gpio45"; + function = "blsp_spi8"; + }; + miso { + pins = "gpio46"; + function = "blsp_spi8"; + }; + cs { + pins = "gpio47"; + function = "blsp_spi8"; + }; + clk { + pins = "gpio48"; + function = "blsp_spi8"; + }; + }; + + sdhc1_pin_a: sdhc1-pin-active { + clk { + pins = "sdc1_clk"; + drive-strength = <16>; + bias-disable; + }; - eeprom: eeprom@52 { - compatible = "atmel,24c128"; - reg = <0x52>; - pagesize = <32>; - read-only; - }; + cmd-data { + pins = "sdc1_cmd", "sdc1_data"; + drive-strength = <10>; + bias-pull-up; }; }; - smd { - rpm { - rpm-requests { - pm8841-regulators { - s1 { - regulator-min-microvolt = <675000>; - regulator-max-microvolt = <1050000>; - }; - - s2 { - regulator-min-microvolt = <500000>; - regulator-max-microvolt = <1050000>; - }; - - s3 { - regulator-min-microvolt = <500000>; - regulator-max-microvolt = <1050000>; - }; - - s4 { - regulator-min-microvolt = <500000>; - regulator-max-microvolt = <1050000>; - }; - }; - - pm8941-regulators { - vdd_l1_l3-supply = <&pm8941_s1>; - vdd_l2_lvs1_2_3-supply = <&pm8941_s3>; - vdd_l4_l11-supply = <&pm8941_s1>; - vdd_l5_l7-supply = <&pm8941_s2>; - vdd_l6_l12_l14_l15-supply = <&pm8941_s2>; - vin_5vs-supply = <&pm8941_5v>; - - s1 { - regulator-min-microvolt = <1300000>; - regulator-max-microvolt = <1300000>; - regulator-always-on; - regulator-boot-on; - }; - - s2 { - regulator-min-microvolt = <2150000>; - regulator-max-microvolt = <2150000>; - regulator-boot-on; - }; - - s3 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - regulator-always-on; - regulator-boot-on; - }; - - l1 { - regulator-min-microvolt = <1225000>; - regulator-max-microvolt = <1225000>; - - regulator-always-on; - regulator-boot-on; - }; - - l2 { - regulator-min-microvolt = <1200000>; - regulator-max-microvolt = <1200000>; - }; - - l3 { - regulator-min-microvolt = <1225000>; - regulator-max-microvolt = <1225000>; - }; - - l4 { - regulator-min-microvolt = <1225000>; - regulator-max-microvolt = <1225000>; - }; - - l5 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - }; - - l6 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - - regulator-boot-on; - }; - - l7 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - - regulator-boot-on; - }; - - l8 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - }; - - l9 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <2950000>; - }; - - l10 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - regulator-always-on; - }; - - l11 { - regulator-min-microvolt = <1300000>; - regulator-max-microvolt = <1300000>; - }; - - l12 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - - regulator-always-on; - regulator-boot-on; - }; - - l13 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <2950000>; - - regulator-boot-on; - }; - - l14 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - }; - - l15 { - regulator-min-microvolt = <2050000>; - regulator-max-microvolt = <2050000>; - }; - - l16 { - regulator-min-microvolt = <2700000>; - regulator-max-microvolt = <2700000>; - }; - - l17 { - regulator-min-microvolt = <2700000>; - regulator-max-microvolt = <2700000>; - }; - - l18 { - regulator-min-microvolt = <2850000>; - regulator-max-microvolt = <2850000>; - }; - - l19 { - regulator-min-microvolt = <3300000>; - regulator-max-microvolt = <3300000>; - regulator-always-on; - }; - - l20 { - regulator-min-microvolt = <2950000>; - regulator-max-microvolt = <2950000>; - - regulator-allow-set-load; - regulator-boot-on; - regulator-system-load = <200000>; - }; - - l21 { - regulator-min-microvolt = <2950000>; - regulator-max-microvolt = <2950000>; - - regulator-boot-on; - }; - - l22 { - regulator-min-microvolt = <3000000>; - regulator-max-microvolt = <3000000>; - }; - - l23 { - regulator-min-microvolt = <3000000>; - regulator-max-microvolt = <3000000>; - }; - - l24 { - regulator-min-microvolt = <3075000>; - regulator-max-microvolt = <3075000>; - - regulator-boot-on; - }; - }; - }; + sdhc2_cd_pin_a: sdhc2-cd-pin-active { + pins = "gpio62"; + function = "gpio"; + + drive-strength = <2>; + bias-disable; + }; + + sdhc2_pin_a: sdhc2-pin-active { + clk { + pins = "sdc2_clk"; + drive-strength = <10>; + bias-disable; + }; + + cmd-data { + pins = "sdc2_cmd", "sdc2_data"; + drive-strength = <6>; + bias-pull-up; }; }; };
arch/arm/boot/dts/qcom-msm8974.dtsi +1 -1
@@ -1612,7 +1612,7 @@ rpm { qcom,ipc = <&apcs 8 0>; qcom,smd-edge = <15>; - rpm-requests { + rpm_requests: rpm-requests { compatible = "qcom,rpm-msm8974"; qcom,smd-channels = "rpm_requests";
Signature · 1 line
2.35.1
Greg Kroah-Hartman
maintainerPATCH 233/1095 ARM: dts: qcom-msm8974-fp2: Use &labels
In reply to Greg Kroah-HartmanFrom: Konrad Dybcio <[email protected]>
[ Upstream commit 409ab7dc57c41d9db54d221f4d247e229ba34cf9 ]
Use &labels to align with the style used in new DTS and apply tiny style fixes.
--- .../boot/dts/qcom-msm8974-fairphone-fp2.dts | 577 +++++++++--------- arch/arm/boot/dts/qcom-msm8974.dtsi | 2 +- 2 files changed, 276 insertions(+), 303 deletions(-)
arch/arm/boot/dts/qcom-msm8974-fairphone-fp2.dts +275 -302
@@ -5,7 +5,6 @@ #include <dt-bindings/input/input.h> #include <dt-bindings/pinctrl/qcom,pmic-gpio.h> - / { model = "Fairphone 2"; compatible = "fairphone,fp2", "qcom,msm8974";
@@ -54,356 +53,330 @@ vibrator { enable-gpios = <&tlmm 86 GPIO_ACTIVE_HIGH>; vcc-supply = <&pm8941_l18>; }; +}; + +&blsp1_uart2 { + status = "okay"; +}; + +&imem { + status = "okay"; + + reboot-mode { + mode-normal = <0x77665501>; + mode-bootloader = <0x77665500>; + mode-recovery = <0x77665502>; + }; +}; + +&otg { + status = "okay"; + + phys = <&usb_hs1_phy>; + phy-select = <&tcsr 0xb000 0>; + extcon = <&smbb>, <&usb_id>; + vbus-supply = <&chg_otg>; - smd { - rpm { - rpm-requests { - pm8841-regulators { - s1 { - regulator-min-microvolt = <675000>; - regulator-max-microvolt = <1050000>; - }; - - s2 { - regulator-min-microvolt = <500000>; - regulator-max-microvolt = <1050000>; - }; - - s3 { - regulator-min-microvolt = <1050000>; - regulator-max-microvolt = <1050000>; - }; - }; - - pm8941-regulators { - vdd_l1_l3-supply = <&pm8941_s1>; - vdd_l2_lvs1_2_3-supply = <&pm8941_s3>; - vdd_l4_l11-supply = <&pm8941_s1>; - vdd_l5_l7-supply = <&pm8941_s2>; - vdd_l6_l12_l14_l15-supply = <&pm8941_s2>; - vdd_l9_l10_l17_l22-supply = <&vreg_boost>; - vdd_l13_l20_l23_l24-supply = <&vreg_boost>; - vdd_l21-supply = <&vreg_boost>; - - s1 { - regulator-min-microvolt = <1300000>; - regulator-max-microvolt = <1300000>; - - regulator-always-on; - regulator-boot-on; - }; - - s2 { - regulator-min-microvolt = <2150000>; - regulator-max-microvolt = <2150000>; - - regulator-boot-on; - }; - - s3 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - - regulator-always-on; - regulator-boot-on; - }; - - l1 { - regulator-min-microvolt = <1225000>; - regulator-max-microvolt = <1225000>; - - regulator-always-on; - regulator-boot-on; - }; - - l2 { - regulator-min-microvolt = <1200000>; - regulator-max-microvolt = <1200000>; - }; - - l3 { - regulator-min-microvolt = <1225000>; - regulator-max-microvolt = <1225000>; - }; - - l4 { - regulator-min-microvolt = <1225000>; - regulator-max-microvolt = <1225000>; - }; - - l5 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - }; - - l6 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - - regulator-boot-on; - }; - - l7 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - - regulator-boot-on; - }; - - l8 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - }; - - l9 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <2950000>; - }; - - l10 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <2950000>; - }; - - l11 { - regulator-min-microvolt = <1225000>; - regulator-max-microvolt = <1350000>; - }; - - l12 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - - regulator-always-on; - regulator-boot-on; - }; - - l13 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <2950000>; - - regulator-boot-on; - }; - - l14 { - regulator-min-microvolt = <1800000>; - regulator-max-microvolt = <1800000>; - }; - - l15 { - regulator-min-microvolt = <2050000>; - regulator-max-microvolt = <2050000>; - }; - - l16 { - regulator-min-microvolt = <2700000>; - regulator-max-microvolt = <2700000>; - }; - - l17 { - regulator-min-microvolt = <2850000>; - regulator-max-microvolt = <2850000>; - }; - - l18 { - regulator-min-microvolt = <2850000>; - regulator-max-microvolt = <2850000>; - }; - - l19 { - regulator-min-microvolt = <2900000>; - regulator-max-microvolt = <3350000>; - }; - - l20 { - regulator-min-microvolt = <2950000>; - regulator-max-microvolt = <2950000>; - - regulator-boot-on; - regulator-system-load = <200000>; - regulator-allow-set-load; - }; - - l21 { - regulator-min-microvolt = <2950000>; - regulator-max-microvolt = <2950000>; - - regulator-boot-on; - }; - - l22 { - regulator-min-microvolt = <3000000>; - regulator-max-microvolt = <3300000>; - }; - - l23 { - regulator-min-microvolt = <3000000>; - regulator-max-microvolt = <3000000>; - }; - - l24 { - regulator-min-microvolt = <3075000>; - regulator-max-microvolt = <3075000>; - - regulator-boot-on; - }; - }; - }; + hnp-disable; + srp-disable; + adp-disable; + + ulpi { + phy@a { + status = "okay"; + + v1p8-supply = <&pm8941_l6>; + v3p3-supply = <&pm8941_l24>; + + extcon = <&smbb>; + qcom,init-seq = /bits/ 8 <0x1 0x64>; }; }; }; -&soc { - serial@f991e000 { - status = "okay"; +&pm8941_gpios { + gpio_keys_pin_a: gpio-keys-active { + pins = "gpio1", "gpio2", "gpio5"; + function = "normal"; + + bias-pull-up; + power-source = <PM8941_GPIO_S3>; }; +}; - remoteproc@fb21b000 { - status = "okay"; +&pronto { + status = "okay"; - vddmx-supply = <&pm8841_s1>; - vddcx-supply = <&pm8841_s2>; + vddmx-supply = <&pm8841_s1>; + vddcx-supply = <&pm8841_s2>; - pinctrl-names = "default"; - pinctrl-0 = <&wcnss_pin_a>; + pinctrl-names = "default"; + pinctrl-0 = <&wcnss_pin_a>; - smd-edge { - qcom,remote-pid = <4>; - label = "pronto"; + smd-edge { + qcom,remote-pid = <4>; + label = "pronto"; - wcnss { - status = "okay"; - }; + wcnss { + status = "okay"; }; }; +}; + +&rpm_requests { + pm8841-regulators { + pm8841_s1: s1 { + regulator-min-microvolt = <675000>; + regulator-max-microvolt = <1050000>; + }; - pinctrl@fd510000 { - sdhc1_pin_a: sdhc1-pin-active { - clk { - pins = "sdc1_clk"; - drive-strength = <16>; - bias-disable; - }; + pm8841_s2: s2 { + regulator-min-microvolt = <500000>; + regulator-max-microvolt = <1050000>; + }; - cmd-data { - pins = "sdc1_cmd", "sdc1_data"; - drive-strength = <10>; - bias-pull-up; - }; + pm8841_s3: s3 { + regulator-min-microvolt = <1050000>; + regulator-max-microvolt = <1050000>; }; + }; - sdhc2_pin_a: sdhc2-pin-active { - clk { - pins = "sdc2_clk"; - drive-strength = <10>; - bias-disable; - }; + pm8941-regulators { + vdd_l1_l3-supply = <&pm8941_s1>; + vdd_l2_lvs1_2_3-supply = <&pm8941_s3>; + vdd_l4_l11-supply = <&pm8941_s1>; + vdd_l5_l7-supply = <&pm8941_s2>; + vdd_l6_l12_l14_l15-supply = <&pm8941_s2>; + vdd_l9_l10_l17_l22-supply = <&vreg_boost>; + vdd_l13_l20_l23_l24-supply = <&vreg_boost>; + vdd_l21-supply = <&vreg_boost>; + + pm8941_s1: s1 { + regulator-min-microvolt = <1300000>; + regulator-max-microvolt = <1300000>; + regulator-always-on; + regulator-boot-on; + }; - cmd-data { - pins = "sdc2_cmd", "sdc2_data"; - drive-strength = <6>; - bias-pull-up; - }; + pm8941_s2: s2 { + regulator-min-microvolt = <2150000>; + regulator-max-microvolt = <2150000>; + regulator-boot-on; }; - wcnss_pin_a: wcnss-pin-active { - wlan { - pins = "gpio36", "gpio37", "gpio38", "gpio39", "gpio40"; - function = "wlan"; + pm8941_s3: s3 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-always-on; + regulator-boot-on; + }; - drive-strength = <6>; - bias-pull-down; - }; + pm8941_l1: l1 { + regulator-min-microvolt = <1225000>; + regulator-max-microvolt = <1225000>; + regulator-always-on; + regulator-boot-on; + }; - bt { - pins = "gpio35", "gpio43", "gpio44"; - function = "bt"; + pm8941_l2: l2 { + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1200000>; + }; - drive-strength = <2>; - bias-pull-down; - }; + pm8941_l3: l3 { + regulator-min-microvolt = <1225000>; + regulator-max-microvolt = <1225000>; + }; - fm { - pins = "gpio41", "gpio42"; - function = "fm"; + pm8941_l4: l4 { + regulator-min-microvolt = <1225000>; + regulator-max-microvolt = <1225000>; + }; - drive-strength = <2>; - bias-pull-down; - }; + pm8941_l5: l5 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; }; - }; - sdhci@f9824900 { - status = "okay"; + pm8941_l6: l6 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-boot-on; + }; - vmmc-supply = <&pm8941_l20>; - vqmmc-supply = <&pm8941_s3>; + pm8941_l7: l7 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-boot-on; + }; - bus-width = <8>; - non-removable; + pm8941_l8: l8 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + }; - pinctrl-names = "default"; - pinctrl-0 = <&sdhc1_pin_a>; - }; + pm8941_l9: l9 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <2950000>; + }; - sdhci@f98a4900 { - status = "okay"; + pm8941_l10: l10 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <2950000>; + }; - vmmc-supply = <&pm8941_l21>; - vqmmc-supply = <&pm8941_l13>; + pm8941_l11: l11 { + regulator-min-microvolt = <1225000>; + regulator-max-microvolt = <1350000>; + }; - bus-width = <4>; + pm8941_l12: l12 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-always-on; + regulator-boot-on; + }; - pinctrl-names = "default"; - pinctrl-0 = <&sdhc2_pin_a>; + pm8941_l13: l13 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <2950000>; + regulator-boot-on; + }; + + pm8941_l14: l14 { + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + }; + + pm8941_l15: l15 { + regulator-min-microvolt = <2050000>; + regulator-max-microvolt = <2050000>; + }; + + pm8941_l16: l16 { + regulator-min-microvolt = <2700000>; + regulator-max-microvolt = <2700000>; + }; + + pm8941_l17: l17 { + regulator-min-microvolt = <2850000>; + regulator-max-microvolt = <2850000>; + }; + + pm8941_l18: l18 { + regulator-min-microvolt = <2850000>; + regulator-max-microvolt = <2850000>; + }; + + pm8941_l19: l19 { + regulator-min-microvolt = <2900000>; + regulator-max-microvolt = <3350000>; + }; + + pm8941_l20: l20 { + regulator-min-microvolt = <2950000>; + regulator-max-microvolt = <2950000>; + regulator-system-load = <200000>; + regulator-allow-set-load; + regulator-boot-on; + }; + + pm8941_l21: l21 { + regulator-min-microvolt = <2950000>; + regulator-max-microvolt = <2950000>; + regulator-boot-on; + }; + + pm8941_l22: l22 { + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3300000>; + }; + + pm8941_l23: l23 { + regulator-min-microvolt = <3000000>; + regulator-max-microvolt = <3000000>; + }; + + pm8941_l24: l24 { + regulator-min-microvolt = <3075000>; + regulator-max-microvolt = <3075000>; + regulator-boot-on; + }; }; +}; - usb@f9a55000 { - status = "okay"; +&sdhc_1 { + status = "okay"; - phys = <&usb_hs1_phy>; - phy-select = <&tcsr 0xb000 0>; - extcon = <&smbb>, <&usb_id>; - vbus-supply = <&chg_otg>; + vmmc-supply = <&pm8941_l20>; + vqmmc-supply = <&pm8941_s3>; - hnp-disable; - srp-disable; - adp-disable; + pinctrl-names = "default"; + pinctrl-0 = <&sdhc1_pin_a>; +}; + +&sdhc_2 { + status = "okay"; - ulpi { - phy@a { - status = "okay"; + vmmc-supply = <&pm8941_l21>; + vqmmc-supply = <&pm8941_l13>; + + pinctrl-names = "default"; + pinctrl-0 = <&sdhc2_pin_a>; +}; - v1p8-supply = <&pm8941_l6>; - v3p3-supply = <&pm8941_l24>; +&tlmm { + sdhc1_pin_a: sdhc1-pin-active { + clk { + pins = "sdc1_clk"; + drive-strength = <16>; + bias-disable; + }; - extcon = <&smbb>; - qcom,init-seq = /bits/ 8 <0x1 0x64>; - }; + cmd-data { + pins = "sdc1_cmd", "sdc1_data"; + drive-strength = <10>; + bias-pull-up; }; }; - imem@fe805000 { - status = "okay"; + sdhc2_pin_a: sdhc2-pin-active { + clk { + pins = "sdc2_clk"; + drive-strength = <10>; + bias-disable; + }; - reboot-mode { - mode-normal = <0x77665501>; - mode-bootloader = <0x77665500>; - mode-recovery = <0x77665502>; + cmd-data { + pins = "sdc2_cmd", "sdc2_data"; + drive-strength = <6>; + bias-pull-up; }; }; -}; -&spmi_bus { - pm8941@0 { - gpios@c000 { - gpio_keys_pin_a: gpio-keys-active { - pins = "gpio1", "gpio2", "gpio5"; - function = "normal"; + wcnss_pin_a: wcnss-pin-active { + wlan { + pins = "gpio36", "gpio37", "gpio38", "gpio39", "gpio40"; + function = "wlan"; + + drive-strength = <6>; + bias-pull-down; + }; + + bt { + pins = "gpio35", "gpio43", "gpio44"; + function = "bt"; + + drive-strength = <2>; + bias-pull-down; + }; + + fm { + pins = "gpio41", "gpio42"; + function = "fm"; - bias-pull-up; - power-source = <PM8941_GPIO_S3>; - }; + drive-strength = <2>; + bias-pull-down; }; }; };
arch/arm/boot/dts/qcom-msm8974.dtsi +1 -1
@@ -1592,7 +1592,7 @@ dsi0_phy: dsi-phy@fd922a00 { }; }; - imem@fe805000 { + imem: imem@fe805000 { status = "disabled"; compatible = "syscon", "simple-mfd"; reg = <0xfe805000 0x1000>;
Signature · 1 line
2.35.1