5.9.15-rc1 review
Subsystems (6)
Greg Kroah-Hartman
maintainerPATCH 32/105 vdpa: mlx5: fix vdpa/vhost dependencies
In reply to Greg Kroah-HartmanFrom: Randy Dunlap <[email protected]>
[ Upstream commit 98701a2a861fa87a5055cf2809758e8725e8b146 ]
drivers/vdpa/mlx5/ uses vhost_iotlb*() interfaces, so select VHOST_IOTLB to make them be built.
However, if VHOST_IOTLB is the only VHOST symbol that is set/enabled, the object file still won't be built because drivers/Makefile won't descend into drivers/vhost/ to build it, so make drivers/Makefile build the needed binary whenever VHOST_IOTLB is set, like it does for VHOST_RING.
Fixes these build errors:
ERROR: modpost: "vhost_iotlb_itree_next" [drivers/vdpa/mlx5/mlx5_vdpa.ko] undefined!
ERROR: modpost: "vhost_iotlb_itree_first" [drivers/vdpa/mlx5/mlx5_vdpa.ko] undefined!
--- drivers/Makefile | 1 + drivers/vdpa/Kconfig | 1 + 2 files changed, 2 insertions(+)
drivers/Makefile +1 -0
@@ -145,6 +145,7 @@ obj-$(CONFIG_OF) += of/ obj-$(CONFIG_SSB) += ssb/ obj-$(CONFIG_BCMA) += bcma/ obj-$(CONFIG_VHOST_RING) += vhost/ +obj-$(CONFIG_VHOST_IOTLB) += vhost/ obj-$(CONFIG_VHOST) += vhost/ obj-$(CONFIG_VLYNQ) += vlynq/ obj-$(CONFIG_GREYBUS) += greybus/
drivers/vdpa/Kconfig +1 -0
@@ -32,6 +32,7 @@ config IFCVF config MLX5_VDPA bool + select VHOST_IOTLB help Support library for Mellanox VDPA drivers. Provides code that is common for all types of VDPA drivers. The following drivers are planned:
Signature · 8 lines
2.27.0 _______________________________________________ Virtualization mailing list [email protected] https://lists.linuxfoundation.org/mailman/listinfo/virtualization
Greg Kroah-Hartman
maintainerPATCH 7/105 net, xsk: Avoid taking multiple skbuff references
In reply to Greg Kroah-HartmanFrom: Björn Töpel <[email protected]>
[ Upstream commit 36ccdf85829a7dd6936dba5d02fa50138471f0d3 ]
Commit 642e450b6b59 ("xsk: Do not discard packet when NETDEV_TX_BUSY") addressed the problem that packets were discarded from the Tx AF_XDP ring, when the driver returned NETDEV_TX_BUSY. Part of the fix was bumping the skbuff reference count, so that the buffer would not be freed by dev_direct_xmit(). A reference count larger than one means that the skbuff is "shared", which is not the case.
If the "shared" skbuff is sent to the generic XDP receive path, netif_receive_generic_xdp(), and pskb_expand_head() is entered the BUG_ON(skb_shared(skb)) will trigger.
This patch adds a variant to dev_direct_xmit(), __dev_direct_xmit(), where a user can select the skbuff free policy. This allows AF_XDP to avoid bumping the reference count, but still keep the NETDEV_TX_BUSY behavior.
--- include/linux/netdevice.h | 14 +++++++++++++- net/core/dev.c | 8 ++------ net/xdp/xsk.c | 8 +------- 3 files changed, 16 insertions(+), 14 deletions(-)
include/linux/netdevice.h +13 -1
@@ -2778,9 +2778,21 @@ u16 dev_pick_tx_zero(struct net_device *dev, struct sk_buff *skb, struct net_device *sb_dev);u16 dev_pick_tx_cpu_id (struct net_device *dev,struct sk_buff *skb,struct net_device *sb_dev); +int dev_queue_xmit (struct sk_buff *skb);int dev_queue_xmit_accel (struct sk_buff *skb,struct net_device *sb_dev); -int dev_direct_xmit (struct sk_buff *skb,u16 queue_id); +int __dev_direct_xmit (struct sk_buff *skb,u16 queue_id); + +static inline int dev_direct_xmit (struct sk_buff *skb,u16 queue_id) +{ +int ret; + + ret =__dev_direct_xmit (skb, queue_id); +if (!dev_xmit_complete (ret)) +kfree_skb (skb); +return ret; +} +int register_netdevice (struct net_device *dev);void unregister_netdevice_queue (struct net_device *dev,struct list_head *head);void unregister_netdevice_many (struct list_head *head);
net/core/dev.c +2 -6
@@ -4176,7 +4176,7 @@ int dev_queue_xmit_accel(struct sk_buff *skb, struct net_device *sb_dev) }EXPORT_SYMBOL (dev_queue_xmit_accel); -int dev_direct_xmit (struct sk_buff *skb,u16 queue_id) +int __dev_direct_xmit (struct sk_buff *skb,u16 queue_id) {struct net_device *dev = skb->dev;struct sk_buff *orig_skb = skb;
@@ -4205,17 +4205,13 @@ int dev_direct_xmit(struct sk_buff *skb, u16 queue_id)dev_xmit_recursion_dec ();local_bh_enable (); - -if (!dev_xmit_complete (ret)) -kfree_skb (skb); -return ret; drop:atomic_long_inc (&dev->tx_dropped);kfree_skb_list (skb);return NET_XMIT_DROP ; } -EXPORT_SYMBOL (dev_direct_xmit); +EXPORT_SYMBOL (__dev_direct_xmit);/************************************************************************* * Receiver routines
net/xdp/xsk.c +1 -7
@@ -377,11 +377,7 @@ static int xsk_generic_xmit(struct sock *sk)skb_shinfo (skb)->destructor_arg = (void *)(long )desc.addr; skb->destructor = xsk_destruct_skb; -/* Hinder dev_direct_xmit from freeing the packet and -* therefore completing it in the destructor -*/ -refcount_inc (&skb->users); - err =dev_direct_xmit (skb, xs->queue_id); + err =__dev_direct_xmit (skb, xs->queue_id);if (err ==NETDEV_TX_BUSY ) {/* Tell user-space to retry the send */ skb->destructor = sock_wfree;
@@ -395,12 +391,10 @@ static int xsk_generic_xmit(struct sock *sk)/* Ignore NET_XMIT_CN as packet might have been sent */ if (err ==NET_XMIT_DROP ) {/* SKB completed but not sent */ -kfree_skb (skb); err = -EBUSY ; goto out; } -consume_skb (skb); sent_frame = true; }
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 3/105 kprobes: Remove NMI context check
In reply to Greg Kroah-HartmanFrom: Masami Hiramatsu <[email protected]>
commit e03b4a084ea6b0a18b0e874baec439e69090c168 upstream.
The in_nmi() check in pre_handler_kretprobe() is meant to avoid recursion, and blindly assumes that anything NMI is recursive.
However, since commit:
9b38cc704e84 ("kretprobe: Prevent triggering kretprobe from within kprobe_flush_task")
there is a better way to detect and avoid actual recursion.
By setting a dummy kprobe, any actual exceptions will terminate early (by trying to handle the dummy kprobe), and recursion will not happen.
Employ this to avoid the kretprobe_table_lock() recursion, replacing the over-eager in_nmi() check.
--- kernel/kprobes.c | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-)
kernel/kprobes.c +4 -12
@@ -1359,7 +1359,8 @@ static void cleanup_rp_inst(struct kretpstruct hlist_node *next;struct hlist_head *head; -/* No race here */ +/* To avoid recursive kretprobe by NMI, set kprobe busy here */ +kprobe_busy_begin ();for (hash =0 ; hash <KPROBE_TABLE_SIZE ; hash++) {kretprobe_table_lock (hash, &flags); head = &kretprobe_inst_table[hash];
@@ -1369,6 +1370,8 @@ static void cleanup_rp_inst(struct kretp }kretprobe_table_unlock (hash, &flags); } +kprobe_busy_end (); +free_rp_inst (rp); }NOKPROBE_SYMBOL (cleanup_rp_inst);
@@ -1937,17 +1940,6 @@ static int pre_handler_kretprobe(structunsigned long hash, flags =0 ;struct kretprobe_instance *ri; -/* -* To avoid deadlocks, prohibit return probing in NMI contexts, -* just skip the probe and increase the (inexact) 'nmissed' -* statistical counter, so that the user is informed that -* something happened: -*/ -if (unlikely (in_nmi ())) { - rp->nmissed++; -return 0 ; - } -/* TODO: consider to only swap the RA after the last pre_handler fired */ hash =hash_ptr (current,KPROBE_HASH_BITS );raw_spin_lock_irqsave (&rp->lock, flags);
Greg Kroah-Hartman
maintainerPATCH 9/105 vhost-vdpa: fix page pinning leakage in error path (rework)
In reply to Greg Kroah-HartmanFrom: Si-Wei Liu <[email protected]>
[ Upstream commit ad89653f79f1882d55d9df76c9b2b94f008c4e27 ]
Pinned pages are not properly accounted particularly when mapping error occurs on IOTLB update. Clean up dangling pinned pages for the error path.
The memory usage for bookkeeping pinned pages is reverted to what it was before: only one single free page is needed. This helps reduce the host memory demand for VM with a large amount of memory, or in the situation where host is running short of free memory.
--- drivers/vhost/vdpa.c | 80 ++++++++++++++++++++++++++++++++++---------- 1 file changed, 62 insertions(+), 18 deletions(-)
drivers/vhost/vdpa.c +62 -18
@@ -567,6 +567,8 @@ static int vhost_vdpa_map(struct vhost_vdpa *v,if (r)vhost_iotlb_del_range (dev->iotlb, iova, iova + size -1 ); +else +atomic64_add (size >>PAGE_SHIFT , &dev->mm->pinned_vm);return r; }
@@ -598,14 +600,16 @@ static int vhost_vdpa_process_iotlb_update(struct vhost_vdpa *v,unsigned long list_size =PAGE_SIZE /sizeof (struct page *);unsigned int gup_flags =FOLL_LONGTERM ;unsigned long npages, cur_base, map_pfn, last_pfn =0 ; -unsigned long locked, lock_limit, pinned, i; +unsigned long lock_limit, sz2pin, nchunks, i;u64 iova = msg->iova; +long pinned;int ret =0 ;if (vhost_iotlb_itree_first (iotlb, msg->iova, msg->iova + msg->size -1 ))return -EEXIST ; +/* Limit the use of memory for bookkeeping */ page_list = (struct page **)__get_free_page (GFP_KERNEL );if (!page_list)return -ENOMEM ;
@@ -614,52 +618,75 @@ static int vhost_vdpa_process_iotlb_update(struct vhost_vdpa *v, gup_flags |=FOLL_WRITE ; npages =PAGE_ALIGN (msg->size + (iova & ~PAGE_MASK )) >>PAGE_SHIFT ; -if (!npages) -return -EINVAL ; +if (!npages) { + ret = -EINVAL ; + goto free; + }mmap_read_lock (dev->mm); - locked =atomic64_add_return (npages, &dev->mm->pinned_vm); lock_limit =rlimit (RLIMIT_MEMLOCK ) >>PAGE_SHIFT ; - -if (locked > lock_limit) { +if (npages +atomic64_read (&dev->mm->pinned_vm) > lock_limit) { ret = -ENOMEM ; - goto out; + goto unlock; } cur_base = msg->uaddr &PAGE_MASK ; iova &=PAGE_MASK ; + nchunks =0 ;while (npages) { - pinned = min_t(unsigned long, npages, list_size); - ret =pin_user_pages (cur_base, pinned, - gup_flags, page_list,NULL ); -if (ret != pinned) + sz2pin = min_t(unsigned long, npages, list_size); + pinned =pin_user_pages (cur_base, sz2pin, + gup_flags, page_list,NULL ); +if (sz2pin != pinned) { +if (pinned <0 ) { + ret = pinned; + }else { +unpin_user_pages (page_list, pinned); + ret = -ENOMEM ; + } goto out; + } + nchunks++;if (!last_pfn) map_pfn =page_to_pfn (page_list[0 ]); -for (i =0 ; i < ret; i++) { +for (i =0 ; i < pinned; i++) {unsigned long this_pfn =page_to_pfn (page_list[i]);u64 csize;if (last_pfn && (this_pfn != last_pfn +1 )) {/* Pin a contiguous chunk of memory */ csize = (last_pfn - map_pfn +1 ) <<PAGE_SHIFT ; -if (vhost_vdpa_map (v, iova, csize, - map_pfn <<PAGE_SHIFT , - msg->perm)) + ret =vhost_vdpa_map (v, iova, csize, + map_pfn <<PAGE_SHIFT , + msg->perm); +if (ret) { +/* +* Unpin the pages that are left unmapped +* from this point on in the current +* page_list. The remaining outstanding +* ones which may stride across several +* chunks will be covered in the common +* error path subsequently. +*/ +unpin_user_pages (&page_list[i], + pinned - i); goto out; + } + map_pfn = this_pfn; iova += csize; + nchunks =0 ; } last_pfn = this_pfn; } - cur_base += ret <<PAGE_SHIFT ; - npages -= ret; + cur_base += pinned <<PAGE_SHIFT ; + npages -= pinned; }/* Pin the rest chunk */
@@ -667,10 +694,27 @@ static int vhost_vdpa_process_iotlb_update(struct vhost_vdpa *v, map_pfn << PAGE_SHIFT, msg->perm); out:if (ret) { +if (nchunks) { +unsigned long pfn; + +/* +* Unpin the outstanding pages which are yet to be +* mapped but haven't due to vdpa_map() or +* pin_user_pages() failure. +* +* Mapped pages are accounted in vdpa_map(), hence +* the corresponding unpinning will be handled by +* vdpa_unmap(). +*/ +WARN_ON (!last_pfn); +for (pfn = map_pfn; pfn <= last_pfn; pfn++) +unpin_user_page (pfn_to_page (pfn)); + }vhost_vdpa_unmap (v, msg->iova, msg->size); -atomic64_sub (npages, &dev->mm->pinned_vm); } +unlock:mmap_read_unlock (dev->mm); +free:free_page ((unsigned long )page_list);return ret; }
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 17/105 ibmvnic: avoid memset null scrq msgs
In reply to Greg Kroah-HartmanFrom: Dany Madden <[email protected]>
[ Upstream commit 9281cf2d584083a450fd65fd27cc5f0e692f6e30 ]
scrq->msgs could be NULL during device reset, causing Linux to crash. So, check before memset scrq->msgs.
--- drivers/net/ethernet/ibm/ibmvnic.c | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-)
drivers/net/ethernet/ibm/ibmvnic.c +15 -4
@@ -2857,15 +2857,26 @@ static int reset_one_sub_crq_queue(struct ibmvnic_adapter *adapter, {int rc; +if (!scrq) { +netdev_dbg (adapter->netdev, +"Invalid scrq reset. irq (%d) or msgs (%p).\n" , + scrq->irq, scrq->msgs); +return -EINVAL ; + } +if (scrq->irq) {free_irq (scrq->irq, scrq);irq_dispose_mapping (scrq->irq); scrq->irq =0 ; } - -memset (scrq->msgs,0 ,4 *PAGE_SIZE ); -atomic_set (&scrq->used,0 ); - scrq->cur =0 ; +if (scrq->msgs) { +memset (scrq->msgs,0 ,4 *PAGE_SIZE ); +atomic_set (&scrq->used,0 ); + scrq->cur =0 ; + }else { +netdev_dbg (adapter->netdev,"Invalid scrq reset\n" ); +return -EINVAL ; + } rc =h_reg_sub_crq (adapter->vdev->unit_address, scrq->msg_token,4 *PAGE_SIZE , &scrq->crq_num, &scrq->hw_irq);
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 23/105 drm/panel: sony-acx565akm: Fix race condition in probe
In reply to Greg Kroah-HartmanFrom: Sebastian Reichel <[email protected]>
[ Upstream commit 7c4bada12d320d8648ba3ede6f9b6f9e10f1126a ]
The probe routine acquires the reset GPIO using GPIOD_OUT_LOW. Directly afterwards it calls acx565akm_detect(), which sets the GPIO value to HIGH. If the bootloader initialized the GPIO to HIGH before the probe routine was called, there is only a very short time period of a few instructions where the reset signal is LOW. Exact time depends on compiler optimizations, kernel configuration and alignment of the stars, but I expect it to be always way less than 10us. There are no public datasheets for the panel, but acx565akm_power_on() has a comment with timings and reset period should be at least 10us. So this potentially brings the panel into a half-reset state.
The result is, that panel may not work after boot and can get into a working state by re-enabling it (e.g. by blanking + unblanking), since that does a clean reset cycle. This bug has recently been hit by Ivaylo Dimitrov, but there are some older reports which are probably the same bug. At least Tony Lindgren, Peter Ujfalusi and Jarkko Nikula have experienced it in 2017 describing the blank/unblank procedure as possible workaround.
Note, that the bug really goes back in time. It has originally been introduced in the predecessor of the omapfb driver in commit 3c45d05be382 ("OMAPDSS: acx565akm panel: handle gpios in panel driver") in 2012. That driver eventually got replaced by a newer one, which had the bug from the beginning in commit 84192742d9c2 ("OMAPDSS: Add Sony ACX565AKM panel driver") and still exists in fbdev world. That driver has later been copied to omapdrm and then was used as a basis for this driver. Last but not least the omapdrm specific driver has been removed in commit 45f16c82db7e ("drm/omap: displays: Remove unused panel drivers").
--- drivers/gpu/drm/panel/panel-sony-acx565akm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/panel/panel-sony-acx565akm.c +1 -1
@@ -629,7 +629,7 @@ static int acx565akm_probe(struct spi_device *spi) lcd->spi = spi;mutex_init (&lcd->mutex); - lcd->reset_gpio =devm_gpiod_get (&spi->dev,"reset" ,GPIOD_OUT_LOW ); + lcd->reset_gpio =devm_gpiod_get (&spi->dev,"reset" ,GPIOD_OUT_HIGH );if (IS_ERR (lcd->reset_gpio)) {dev_err (&spi->dev,"failed to get reset GPIO\n" );return PTR_ERR (lcd->reset_gpio);
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 60/105 btrfs: fix lockdep splat when enabling and disabling qgroups
In reply to Greg Kroah-HartmanFrom: Filipe Manana <[email protected]>
[ Upstream commit a855fbe69229078cd8aecd8974fb996a5ca651e6 ]
When running test case btrfs/017 from fstests, lockdep reported the following splat:
[ 1297.067385] ======================================================
[ 1297.067708] WARNING: possible circular locking dependency detected
[ 1297.068022] 5.10.0-rc4-btrfs-next-73 #1 Not tainted
[ 1297.068322] ------------------------------------------------------
[ 1297.068629] btrfs/189080 is trying to acquire lock:
[ 1297.068929] ffff9f2725731690 (sb_internal#2){.+.+}-{0:0}, at: btrfs_quota_enable+0xaf/0xa70 [btrfs]
[ 1297.069274]
but task is already holding lock:
[ 1297.069868] ffff9f2702b61a08 (&fs_info->qgroup_ioctl_lock){+.+.}-{3:3}, at: btrfs_quota_enable+0x3b/0xa70 [btrfs]
[ 1297.070219]
which lock already depends on the new lock. [ 1297.071131]
the existing dependency chain (in reverse order) is:
[ 1297.071721]
-> #1 (&fs_info->qgroup_ioctl_lock){+.+.}-{3:3}:
[ 1297.072375] lock_acquire+0xd8/0x490
[ 1297.072710] __mutex_lock+0xa3/0xb30
[ 1297.073061] btrfs_qgroup_inherit+0x59/0x6a0 [btrfs]
[ 1297.073421] create_subvol+0x194/0x990 [btrfs]
[ 1297.073780] btrfs_mksubvol+0x3fb/0x4a0 [btrfs]
[ 1297.074133] __btrfs_ioctl_snap_create+0x119/0x1a0 [btrfs]
[ 1297.074498] btrfs_ioctl_snap_create+0x58/0x80 [btrfs]
[ 1297.074872] btrfs_ioctl+0x1a90/0x36f0 [btrfs]
[ 1297.075245] __x64_sys_ioctl+0x83/0xb0
[ 1297.075617] do_syscall_64+0x33/0x80
[ 1297.075993] entry_SYSCALL_64_after_hwframe+0x44/0xa9
[ 1297.076380]
-> #0 (sb_internal#2){.+.+}-{0:0}:
[ 1297.077166] check_prev_add+0x91/0xc60
[ 1297.077572] __lock_acquire+0x1740/0x3110
[ 1297.077984] lock_acquire+0xd8/0x490
[ 1297.078411] start_transaction+0x3c5/0x760 [btrfs]
[ 1297.078853] btrfs_quota_enable+0xaf/0xa70 [btrfs]
[ 1297.079323] btrfs_ioctl+0x2c60/0x36f0 [btrfs]
[ 1297.079789] __x64_sys_ioctl+0x83/0xb0
[ 1297.080232] do_syscall_64+0x33/0x80
[ 1297.080680] entry_SYSCALL_64_after_hwframe+0x44/0xa9
[ 1297.081139]
other info that might help us debug this:[ 1297.082536] Possible unsafe locking scenario:
[ 1297.083510] CPU0 CPU1
[ 1297.084005] ---- ----
[ 1297.084500] lock(&fs_info->qgroup_ioctl_lock);
[ 1297.084994] lock(sb_internal#2);
[ 1297.085485] lock(&fs_info->qgroup_ioctl_lock);
[ 1297.085974] lock(sb_internal#2);
[ 1297.086454]
*** DEADLOCK ***
[ 1297.087880] 3 locks held by btrfs/189080:
[ 1297.088324] #0: ffff9f2725731470 (sb_writers#14){.+.+}-{0:0}, at: btrfs_ioctl+0xa73/0x36f0 [btrfs]
[ 1297.088799] #1: ffff9f2702b60cc0 (&fs_info->subvol_sem){++++}-{3:3}, at: btrfs_ioctl+0x1f4d/0x36f0 [btrfs]
[ 1297.089284] #2: ffff9f2702b61a08 (&fs_info->qgroup_ioctl_lock){+.+.}-{3:3}, at: btrfs_quota_enable+0x3b/0xa70 [btrfs]
[ 1297.089771]
stack backtrace:
[ 1297.090662] CPU: 5 PID: 189080 Comm: btrfs Not tainted 5.10.0-rc4-btrfs-next-73 #1
[ 1297.091132] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014
[ 1297.092123] Call Trace:
[ 1297.092629] dump_stack+0x8d/0xb5
[ 1297.093115] check_noncircular+0xff/0x110
[ 1297.093596] check_prev_add+0x91/0xc60
[ 1297.094076] ? kvm_clock_read+0x14/0x30
[ 1297.094553] ? kvm_sched_clock_read+0x5/0x10
[ 1297.095029] __lock_acquire+0x1740/0x3110
[ 1297.095510] lock_acquire+0xd8/0x490
[ 1297.095993] ? btrfs_quota_enable+0xaf/0xa70 [btrfs]
[ 1297.096476] start_transaction+0x3c5/0x760 [btrfs]
[ 1297.096962] ? btrfs_quota_enable+0xaf/0xa70 [btrfs]
[ 1297.097451] btrfs_quota_enable+0xaf/0xa70 [btrfs]
[ 1297.097941] ? btrfs_ioctl+0x1f4d/0x36f0 [btrfs]
[ 1297.098429] btrfs_ioctl+0x2c60/0x36f0 [btrfs]
[ 1297.098904] ? do_user_addr_fault+0x20c/0x430
[ 1297.099382] ? kvm_clock_read+0x14/0x30
[ 1297.099854] ? kvm_sched_clock_read+0x5/0x10
[ 1297.100328] ? sched_clock+0x5/0x10
[ 1297.100801] ? sched_clock_cpu+0x12/0x180
[ 1297.101272] ? __x64_sys_ioctl+0x83/0xb0
[ 1297.101739] __x64_sys_ioctl+0x83/0xb0
[ 1297.102207] do_syscall_64+0x33/0x80
[ 1297.102673] entry_SYSCALL_64_after_hwframe+0x44/0xa9
[ 1297.103148] RIP: 0033:0x7f773ff65d87This is because during the quota enable ioctl we lock first the mutex qgroup_ioctl_lock and then start a transaction, and starting a transaction acquires a fs freeze semaphore (at the VFS level). However, every other code path, except for the quota disable ioctl path, we do the opposite:
we start a transaction and then lock the mutex.
So fix this by making the quota enable and disable paths to start the transaction without having the mutex locked, and then, after starting the transaction, lock the mutex and check if some other task already enabled or disabled the quotas, bailing with success if that was the case.
--- fs/btrfs/ctree.h | 5 ++++- fs/btrfs/qgroup.c | 57 ++++++++++++++++++++++++++++++++++++++++------- 2 files changed, 53 insertions(+), 9 deletions(-)
fs/btrfs/ctree.h +4 -1
@@ -869,7 +869,10 @@ struct btrfs_fs_info {*/ struct ulist *qgroup_ulist; -/* protect user change for quota operations */ +/* +* Protect user change for quota operations. If a transaction is needed, +* it must be started before locking this lock. +*/ struct mutex qgroup_ioctl_lock;/* list of dirty qgroups to be written at next commit */
fs/btrfs/qgroup.c +49 -8
134 lines not on this page · raw message
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 61/105 soc: fsl: dpio: Get the cpumask through cpumask_of(cpu)
In reply to Greg Kroah-HartmanFrom: Hao Si <[email protected]>
[ Upstream commit 2663b3388551230cbc4606a40fabf3331ceb59e4 ]
The local variable 'cpumask_t mask' is in the stack memory, and its address is assigned to 'desc->affinity' in 'irq_set_affinity_hint()'. But the memory area where this variable is located is at risk of being modified.
During LTP testing, the following error was generated:
Unable to handle kernel paging request at virtual address ffff000012e9b790
Mem abort info:
ESR = 0x96000007
Exception class = DABT (current EL), IL = 32 bits SET = 0, FnV = 0
EA = 0, S1PTW = 0
Data abort info:
ISV = 0, ISS = 0x00000007
CM = 0, WnR = 0
swapper pgtable: 4k pages, 48-bit VAs, pgdp = 0000000075ac5e07 [ffff000012e9b790] pgd=00000027dbffe003, pud=00000027dbffd003, pmd=00000027b6d61003, pte=0000000000000000
Internal error: Oops: 96000007 [#1] PREEMPT SMP Modules linked in: xt_conntrack Process read_all (pid: 20171, stack limit = 0x0000000044ea4095) CPU: 14 PID: 20171 Comm: read_all Tainted: G B W Hardware name: NXP Layerscape LX2160ARDB (DT) pstate: 80000085 (Nzcv daIf -PAN -UAO) pc : irq_affinity_hint_proc_show+0x54/0xb0 lr : irq_affinity_hint_proc_show+0x4c/0xb0
sp : ffff00001138bc10
x29: ffff00001138bc10 x28: 0000ffffd131d1e0
x27: 00000000007000c0 x26: ffff8025b9480dc0
x25: ffff8025b9480da8 x24: 00000000000003ff
x23: ffff8027334f8300 x22: ffff80272e97d000
x21: ffff80272e97d0b0 x20: ffff8025b9480d80
x19: ffff000009a49000 x18: 0000000000000000
x17: 0000000000000000 x16: 0000000000000000
x15: 0000000000000000 x14: 0000000000000000
x13: 0000000000000000 x12: 0000000000000040
x11: 0000000000000000 x10: ffff802735b79b88 x9 : 0000000000000000 x8 : 0000000000000000 x7 : ffff000009a49848 x6 : 0000000000000003 x5 : 0000000000000000 x4 : ffff000008157d6c x3 : ffff00001138bc10 x2 : ffff000012e9b790 x1 : 0000000000000000 x0 : 0000000000000000
Call trace: irq_affinity_hint_proc_show+0x54/0xb0 seq_read+0x1b0/0x440 proc_reg_read+0x80/0xd8 __vfs_read+0x60/0x178 vfs_read+0x94/0x150 ksys_read+0x74/0xf0 __arm64_sys_read+0x24/0x30 el0_svc_common.constprop.0+0xd8/0x1a0 el0_svc_handler+0x34/0x88 el0_svc+0x10/0x14 Code: f9001bbf 943e0732 f94066c2 b4000062 (f9400041) ---[ end trace b495bdcb0b3b732b ]--- Kernel panic - not syncing: Fatal exception
SMP: stopping secondary CPUs
SMP: failed to stop secondary CPUs 0,2-4,6,8,11,13-15 Kernel Offset: disabled
CPU features: 0x0,21006008
Memory Limit: none
---[ end Kernel panic - not syncing: Fatal exception ]---
Fix it by using 'cpumask_of(cpu)' to get the cpumask.
--- drivers/soc/fsl/dpio/dpio-driver.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/soc/fsl/dpio/dpio-driver.c +1 -4
@@ -95,7 +95,6 @@ static int register_dpio_irq_handlers(struct fsl_mc_device *dpio_dev, int cpu) {int error;struct fsl_mc_device_irq *irq; -cpumask_t mask; irq = dpio_dev->irqs[0 ]; error = devm_request_irq(&dpio_dev->dev,
@@ -112,9 +111,7 @@ static int register_dpio_irq_handlers(struct fsl_mc_device *dpio_dev, int cpu) }/* set the affinity hint */ -cpumask_clear (&mask); -cpumask_set_cpu (cpu, &mask); -if (irq_set_affinity_hint (irq->msi_desc->irq, &mask)) +if (irq_set_affinity_hint (irq->msi_desc->irq,cpumask_of (cpu)))dev_err (&dpio_dev->dev,"irq_set_affinity failed irq %d cpu %d\n" , irq->msi_desc->irq, cpu);
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 57/105 arm-smmu-qcom: Ensure the qcom_scm driver has finished probing
In reply to Greg Kroah-HartmanFrom: John Stultz <[email protected]>
[ Upstream commit 72b55c96f3a5ae6e486c20b5dacf5114060ed042 ]
Robin Murphy pointed out that if the arm-smmu driver probes before the qcom_scm driver, we may call qcom_scm_qsmmu500_wait_safe_toggle() before the __scm is initialized.
Now, getting this to happen is a bit contrived, as in my efforts it required enabling asynchronous probing for both drivers, moving the firmware dts node to the end of the dtsi file, as well as forcing a long delay in the qcom_scm_probe function.
With those tweaks we ran into the following crash:
[ 2.631040] arm-smmu 15000000.iommu: Stage-1: 48-bit VA -> 48-bit IPA [ 2.633372] Unable to handle kernel NULL pointer dereference at virtual address 0000000000000000 ... [ 2.633402] [0000000000000000] user address but active_mm is swapper [ 2.633409] Internal error: Oops: 96000005 [#1] PREEMPT SMP [ 2.633415] Modules linked in: [ 2.633427] CPU: 5 PID: 117 Comm: kworker/u16:2 Tainted: G W 5.10.0-rc1-mainline-00025-g272a618fc36-dirty #3971 [ 2.633430] Hardware name: Thundercomm Dragonboard 845c (DT) [ 2.633448] Workqueue: events_unbound async_run_entry_fn [ 2.633456] pstate: 80c00005 (Nzcv daif +PAN +UAO -TCO BTYPE=--) [ 2.633465] pc : qcom_scm_qsmmu500_wait_safe_toggle+0x78/0xb0 [ 2.633473] lr : qcom_smmu500_reset+0x58/0x78 [ 2.633476] sp : ffffffc0105a3b60 ... [ 2.633567] Call trace: [ 2.633572] qcom_scm_qsmmu500_wait_safe_toggle+0x78/0xb0 [ 2.633576] qcom_smmu500_reset+0x58/0x78 [ 2.633581] arm_smmu_device_reset+0x194/0x270 [ 2.633585] arm_smmu_device_probe+0xc94/0xeb8 [ 2.633592] platform_drv_probe+0x58/0xa8 [ 2.633597] really_probe+0xec/0x398 [ 2.633601] driver_probe_device+0x5c/0xb8 [ 2.633606] __driver_attach_async_helper+0x64/0x88 [ 2.633610] async_run_entry_fn+0x4c/0x118 [ 2.633617] process_one_work+0x20c/0x4b0 [ 2.633621] worker_thread+0x48/0x460 [ 2.633628] kthread+0x14c/0x158 [ 2.633634] ret_from_fork+0x10/0x18 [ 2.633642] Code: a9034fa0 d0007f73 29107fa0 91342273 (f9400020)
To avoid this, this patch adds a check on qcom_scm_is_available() in the qcom_smmu_impl_init() function, returning -EPROBE_DEFER if its not ready.
This allows the driver to try to probe again later after qcom_scm has finished probing.
--- drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c +4 -0
@@ -69,6 +69,10 @@ struct arm_smmu_device *qcom_smmu_impl_init(struct arm_smmu_device *smmu) {struct qcom_smmu *qsmmu; +/* Check to make sure qcom_scm has finished probing */ +if (!qcom_scm_is_available ()) +return ERR_PTR (-EPROBE_DEFER ); + qsmmu =devm_kzalloc (smmu->dev,sizeof (*qsmmu),GFP_KERNEL );if (!qsmmu)return ERR_PTR (-ENOMEM );
Signature · 8 lines
2.27.0 _______________________________________________ iommu mailing list [email protected] https://lists.linuxfoundation.org/mailman/listinfo/iommu
Greg Kroah-Hartman
maintainerPATCH 65/105 platform/x86: thinkpad_acpi: add P1 gen3 second fan support
In reply to Greg Kroah-HartmanFrom: Iakov 'Jake' Kirilenko <[email protected]>
[ Upstream commit 15d89c9f6f4a186ade7aefbe77e7ede9746b6c47 ]
Tested on my P1 gen3, works fine with thinkfan. Since thinkpad_acpi fan control is off by default, it is safe to add 2nd fan control for brave overclockers
--- drivers/platform/x86/thinkpad_acpi.c | 1 + 1 file changed, 1 insertion(+)
drivers/platform/x86/thinkpad_acpi.c +1 -0
@@ -8769,6 +8769,7 @@ static const struct tpacpi_quirk fan_quirk_table[] __initconst = {TPACPI_Q_LNV3 ('N' ,'2' ,'C' ,TPACPI_FAN_2CTL ),/* P52 / P72 */ TPACPI_Q_LNV3 ('N' ,'2' ,'E' ,TPACPI_FAN_2CTL ),/* P1 / X1 Extreme (1st gen) */ TPACPI_Q_LNV3 ('N' ,'2' ,'O' ,TPACPI_FAN_2CTL ),/* P1 / X1 Extreme (2nd gen) */ + TPACPI_Q_LNV3('N', '2', 'V', TPACPI_FAN_2CTL), /* P1 / X1 Extreme (3nd gen) */ };static int __init fan_init (struct ibm_init_struct *iibm)
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 56/105 spi: spi-nxp-fspi: fix fspi panic by unexpected interrupts
In reply to Greg Kroah-HartmanFrom: Ran Wang <[email protected]>
[ Upstream commit 71d80563b0760a411cd90a3680536f5d887fff6b ]
Given the case that bootloader(such as UEFI)'s FSPI driver might not handle all interrupts before loading kernel, those legacy interrupts would assert immidiately once kernel's FSPI driver enable them. Further, if it was FSPI_INTR_IPCMDDONE, the irq handler nxp_fspi_irq_handler() would call complete(&f->c) to notify others. However, f->c might not be initialized yet at that time, then cause kernel panic.
Of cause, we should fix this issue within bootloader. But it would be better to have this pacth to make dirver more robust (by clearing all interrupt status bits before enabling interrupts).
--- drivers/spi/spi-nxp-fspi.c | 7 +++++++ 1 file changed, 7 insertions(+)
drivers/spi/spi-nxp-fspi.c +7 -0
@@ -991,6 +991,7 @@ static int nxp_fspi_probe(struct platform_device *pdev)struct resource *res;struct nxp_fspi *f;int ret; +u32 reg; ctlr =spi_alloc_master (&pdev->dev,sizeof (*f));if (!ctlr)
@@ -1017,6 +1018,12 @@ static int nxp_fspi_probe(struct platform_device *pdev) goto err_put_ctrl; } +/* Clear potential interrupts */ + reg =fspi_readl (f, f->iobase +FSPI_INTR ); +if (reg) +fspi_writel (f, reg, f->iobase +FSPI_INTR ); + +/* find the resources - controller memory mapped space */ res =platform_get_resource_byname (pdev,IORESOURCE_MEM ,"fspi_mmap" );if (!res) {
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 99/105 zonefs: fix page reference and BIO leak
In reply to Greg Kroah-HartmanFrom: Damien Le Moal <[email protected]>
commit 6bea0225a4bf14a58af71cb9677a756921469e46 upstream.
In zonefs_file_dio_append(), the pages obtained using bio_iov_iter_get_pages() are not released on completion of the REQ_OP_APPEND BIO, nor when bio_iov_iter_get_pages() fails. Furthermore, a call to bio_put() is missing when bio_iov_iter_get_pages() fails.
Fix these resource leaks by adding BIO resource release code (bio_put()i and bio_release_pages()) at the end of the function after the BIO execution and add a jump to this resource cleanup code in case of bio_iov_iter_get_pages() failure.
While at it, also fix the call to task_io_account_write() to be passed the correct BIO size instead of bio_iov_iter_get_pages() return value.
--- fs/zonefs/super.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-)
fs/zonefs/super.c +8 -6
@@ -628,21 +628,23 @@ static ssize_t zonefs_file_dio_append(st bio->bi_opf |=REQ_FUA ; ret =bio_iov_iter_get_pages (bio, from); -if (unlikely (ret)) { -bio_io_error (bio); -return ret; - } +if (unlikely (ret)) + goto out_release; + size = bio->bi_iter.bi_size; -task_io_account_write (ret); +task_io_account_write (size);if (iocb->ki_flags &IOCB_HIPRI )bio_set_polled (bio, iocb); ret =submit_bio_wait (bio); +zonefs_file_write_dio_end_io (iocb, size, ret,0 ); + +out_release: +bio_release_pages (bio, false);bio_put (bio); -zonefs_file_write_dio_end_io (iocb, size, ret,0 );if (ret >=0 ) { iocb->ki_pos += size;return size;
Greg Kroah-Hartman
maintainerPATCH 34/105 perf/x86/intel: Fix a warning on x86_pmu_stop() with large PEBS
In reply to Greg Kroah-HartmanFrom: Namhyung Kim <[email protected]>
[ Upstream commit 5debf02131227d39988e44adf5090fb796fa8466 ]
The commit 3966c3feca3f ("x86/perf/amd: Remove need to check "running" bit in NMI handler") introduced this. It seems x86_pmu_stop can be called recursively (like when it losts some samples) like below:
x86_pmu_stop
intel_pmu_disable_event (x86_pmu_disable)
intel_pmu_pebs_disable
intel_pmu_drain_pebs_nhm (x86_pmu_drain_pebs_buffer)
x86_pmu_stopWhile commit 35d1ce6bec13 ("perf/x86/intel/ds: Fix x86_pmu_stop warning for large PEBS") fixed it for the normal cases, there's another path to call x86_pmu_stop() recursively when a PEBS error was detected (like two or more counters overflowed at the same time).
Like in the Kan's previous fix, we can skip the interrupt accounting for large PEBS, so check the iregs which is set for PMI only.
--- arch/x86/events/intel/ds.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/events/intel/ds.c +1 -1
@@ -1937,7 +1937,7 @@ static void intel_pmu_drain_pebs_nhm(struct pt_regs *iregs)if (error[bit]) {perf_log_lost_samples (event, error[bit]); -if (perf_event_account_interrupt (event)) +if (iregs &&perf_event_account_interrupt (event))x86_pmu_stop (event,0 ); }
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 86/105 pinctrl: amd: remove debounce filter setting in IRQ type setting
In reply to Greg Kroah-HartmanFrom: Coiby Xu <[email protected]>
commit 47a0001436352c9853d72bf2071e85b316d688a2 upstream.
Debounce filter setting should be independent from IRQ type setting because according to the ACPI specs, there are separate arguments for specifying debounce timeout and IRQ type in GpioIo() and GpioInt().
Together with commit 06abe8291bc31839950f7d0362d9979edc88a666 ("pinctrl: amd: fix incorrect way to disable debounce filter") and Andy's patch "gpiolib: acpi: Take into account debounce settings" [1], this will fix broken touchpads for laptops whose BIOS set the debounce timeout to a relatively large value. For example, the BIOS of Lenovo AMD gaming laptops including Legion-5 15ARH05 (R7000), Legion-5P (R7000P) and IdeaPad Gaming 3 15ARH05, set the debounce timeout to 124.8ms. This led to the kernel receiving only ~7 HID reports per second from the Synaptics touchpad
(MSFT0001:00 06CB:7F28).
Existing touchpads like [2][3] are not troubled by this bug because the debounce timeout has been set to 0 by the BIOS before enabling the debounce filter in setting IRQ type.
[1] https://lore.kernel.org/linux-gpio/[email protected]/
8dcb7a15a585 ("gpiolib: acpi: Take into account debounce settings")
[2] https://github.com/Syniurge/i2c-amd-mp2/issues/11#issuecomment-721331582
[3] https://forum.manjaro.org/t/random-short-touchpad-freezes/30832/28
--- drivers/pinctrl/pinctrl-amd.c | 7 ------- 1 file changed, 7 deletions(-)
drivers/pinctrl/pinctrl-amd.c +0 -7
@@ -429,7 +429,6 @@ static int amd_gpio_irq_set_type(struct pin_reg &= ~BIT (LEVEL_TRIG_OFF ); pin_reg &= ~(ACTIVE_LEVEL_MASK <<ACTIVE_LEVEL_OFF ); pin_reg |=ACTIVE_HIGH <<ACTIVE_LEVEL_OFF ; - pin_reg |=DB_TYPE_REMOVE_GLITCH <<DB_CNTRL_OFF ;irq_set_handler_locked (d, handle_edge_irq);break ;
@@ -437,7 +436,6 @@ static int amd_gpio_irq_set_type(struct pin_reg &= ~BIT (LEVEL_TRIG_OFF ); pin_reg &= ~(ACTIVE_LEVEL_MASK <<ACTIVE_LEVEL_OFF ); pin_reg |=ACTIVE_LOW <<ACTIVE_LEVEL_OFF ; - pin_reg |=DB_TYPE_REMOVE_GLITCH <<DB_CNTRL_OFF ;irq_set_handler_locked (d, handle_edge_irq);break ;
@@ -445,7 +443,6 @@ static int amd_gpio_irq_set_type(struct pin_reg &= ~BIT (LEVEL_TRIG_OFF ); pin_reg &= ~(ACTIVE_LEVEL_MASK <<ACTIVE_LEVEL_OFF ); pin_reg |=BOTH_EADGE <<ACTIVE_LEVEL_OFF ; - pin_reg |=DB_TYPE_REMOVE_GLITCH <<DB_CNTRL_OFF ;irq_set_handler_locked (d, handle_edge_irq);break ;
@@ -453,8 +450,6 @@ static int amd_gpio_irq_set_type(struct pin_reg |=LEVEL_TRIGGER <<LEVEL_TRIG_OFF ; pin_reg &= ~(ACTIVE_LEVEL_MASK <<ACTIVE_LEVEL_OFF ); pin_reg |=ACTIVE_HIGH <<ACTIVE_LEVEL_OFF ; - pin_reg &= ~(DB_CNTRl_MASK <<DB_CNTRL_OFF ); - pin_reg |=DB_TYPE_PRESERVE_LOW_GLITCH <<DB_CNTRL_OFF ;irq_set_handler_locked (d, handle_level_irq);break ;
@@ -462,8 +457,6 @@ static int amd_gpio_irq_set_type(struct pin_reg |=LEVEL_TRIGGER <<LEVEL_TRIG_OFF ; pin_reg &= ~(ACTIVE_LEVEL_MASK <<ACTIVE_LEVEL_OFF ); pin_reg |=ACTIVE_LOW <<ACTIVE_LEVEL_OFF ; - pin_reg &= ~(DB_CNTRl_MASK <<DB_CNTRL_OFF ); - pin_reg |=DB_TYPE_PRESERVE_HIGH_GLITCH <<DB_CNTRL_OFF ;irq_set_handler_locked (d, handle_level_irq);break ;
Greg Kroah-Hartman
maintainerPATCH 87/105 mmc: sdhci-of-arasan: Fix clock registration error for Keem Bay SOC
In reply to Greg Kroah-HartmanFrom: Muhammad Husaini Zulkifli <[email protected]>
commit a42a7ec9bb99a17869c3b9f3d365aaf2bdb1a554 upstream.
The commit 16ada730a759 ("mmc: sdhci-of-arasan: Modify clock operations handling") introduced support for platform specific clock operations. Around the same point in time the commit 36c6aadaae86 ("mmc:
sdhci-of-arasan: Add support for Intel Keem Bay") was also merged. Unfortunate it was not really tested on top of the previously mentioned commit, which causes clock registration failures for Keem Bay SOC devices.
Let's fix this, by properly declaring the clock operation for Keem Bay SOC devices.
--- drivers/mmc/host/sdhci-of-arasan.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/mmc/host/sdhci-of-arasan.c +3 -0
@@ -1186,16 +1186,19 @@ static struct sdhci_arasan_of_data sdhcistatic struct sdhci_arasan_of_data intel_keembay_emmc_data = { .soc_ctl_map = &intel_keembay_soc_ctl_map, .pdata = &sdhci_keembay_emmc_pdata, + .clk_ops = &arasan_clk_ops, };static struct sdhci_arasan_of_data intel_keembay_sd_data = { .soc_ctl_map = &intel_keembay_soc_ctl_map, .pdata = &sdhci_keembay_sd_pdata, + .clk_ops = &arasan_clk_ops, };static struct sdhci_arasan_of_data intel_keembay_sdio_data = { .soc_ctl_map = &intel_keembay_soc_ctl_map, .pdata = &sdhci_keembay_sdio_pdata, + .clk_ops = &arasan_clk_ops, };static const struct of_device_id sdhci_arasan_of_match[] = {
Greg Kroah-Hartman
maintainerPATCH 72/105 platform/x86: touchscreen_dmi: Add info for the Irbis TW118 tablet
In reply to Greg Kroah-HartmanFrom: Hans de Goede <[email protected]>
[ Upstream commit c9aa128080cbce92f8715a9328f88d8ca3134279 ]
Add touchscreen info for the Irbis TW118 tablet.
--- drivers/platform/x86/touchscreen_dmi.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+)
drivers/platform/x86/touchscreen_dmi.c +23 -0
@@ -295,6 +295,21 @@ static const struct ts_dmi_data irbis_tw90_data = { .properties = irbis_tw90_props, }; +static const struct property_entry irbis_tw118_props[] = { +PROPERTY_ENTRY_U32 ("touchscreen-min-x" ,20 ), +PROPERTY_ENTRY_U32 ("touchscreen-min-y" ,30 ), +PROPERTY_ENTRY_U32 ("touchscreen-size-x" ,1960 ), +PROPERTY_ENTRY_U32 ("touchscreen-size-y" ,1510 ), +PROPERTY_ENTRY_STRING ("firmware-name" ,"gsl1680-irbis-tw118.fw" ), +PROPERTY_ENTRY_U32 ("silead,max-fingers" ,10 ), + { } +}; + +static const struct ts_dmi_data irbis_tw118_data = { + .acpi_name ="MSSL1680:00" , + .properties = irbis_tw118_props, +}; +static const struct property_entry itworks_tw891_props[] = {PROPERTY_ENTRY_U32 ("touchscreen-min-x" ,1 ),PROPERTY_ENTRY_U32 ("touchscreen-min-y" ,5 ),
@@ -953,6 +968,14 @@ const struct dmi_system_id touchscreen_dmi_table[] = { DMI_MATCH(DMI_PRODUCT_NAME, "TW90"), }, }, + { +/* Irbis TW118 */ + .driver_data = (void *)&irbis_tw118_data, + .matches = { +DMI_MATCH (DMI_SYS_VENDOR ,"IRBIS" ), + DMI_MATCH(DMI_PRODUCT_NAME, "TW118"), + }, + }, {/* I.T.Works TW891 */ .driver_data = (void *)&itworks_tw891_data,
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 54/105 irqchip/gic-v3-its: Unconditionally save/restore the ITS state on suspend
In reply to Greg Kroah-HartmanFrom: Xu Qiang <[email protected]>
[ Upstream commit 74cde1a53368aed4f2b4b54bf7030437f64a534b ]
On systems without HW-based collections (i.e. anything except GIC-500), we rely on firmware to perform the ITS save/restore. This doesn't really work, as although FW can properly save everything, it cannot fully restore the state of the command queue (the read-side is reset to the head of the queue). This results in the ITS consuming previously processed commands, potentially corrupting the state.
Instead, let's always save the ITS state on suspend, disabling it in the process, and restore the full state on resume. This saves us from broken FW as long as it doesn't enable the ITS by itself (for which we can't do anything).
This amounts to simply dropping the ITS_FLAGS_SAVE_SUSPEND_STATE.
--- drivers/irqchip/irq-gic-v3-its.c | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-)
drivers/irqchip/irq-gic-v3-its.c +3 -13
@@ -42,7 +42,6 @@#define ITS_FLAGS_CMDQ_NEEDS_FLUSHING (1ULL << 0)#define ITS_FLAGS_WORKAROUND_CAVIUM_22375 (1ULL << 1)#define ITS_FLAGS_WORKAROUND_CAVIUM_23144 (1ULL << 2) -#define ITS_FLAGS_SAVE_SUSPEND_STATE (1ULL << 3)#define RDIST_FLAGS_PROPBASE_NEEDS_FLUSHING (1 << 0)#define RDIST_FLAGS_RD_TABLES_PREALLOCATED (1 << 1)
@@ -4735,9 +4734,6 @@ static int its_save_disable(void)list_for_each_entry (its, &its_nodes, entry) {void __iomem *base; -if (!(its->flags &ITS_FLAGS_SAVE_SUSPEND_STATE )) -continue ; - base = its->base; its->ctlr_save =readl_relaxed (base +GITS_CTLR ); err =its_force_quiescent (base);
@@ -4756,9 +4752,6 @@ err:list_for_each_entry_continue_reverse (its, &its_nodes, entry) {void __iomem *base; -if (!(its->flags &ITS_FLAGS_SAVE_SUSPEND_STATE )) -continue ; - base = its->base;writel_relaxed (its->ctlr_save, base +GITS_CTLR ); }
@@ -4778,9 +4771,6 @@ static void its_restore_enable(void)void __iomem *base;int i; -if (!(its->flags &ITS_FLAGS_SAVE_SUSPEND_STATE )) -continue ; - base = its->base;/*
@@ -4788,7 +4778,10 @@ static void its_restore_enable(void)* don't restore it since writing to CBASER or BASER<n> * registers is undefined according to the GIC v3 ITS * Specification. +* +* Firmware resuming with the ITS enabled is terminally broken. */ +WARN_ON (readl_relaxed (base +GITS_CTLR ) &GITS_CTLR_ENABLE ); ret =its_force_quiescent (base);if (ret) { pr_err("ITS@%pa: failed to quiesce on resume: %d\n",
@@ -5068,9 +5061,6 @@ static int __init its_probe_one(struct resource *res, ctlr |= GITS_CTLR_ImDe;writel_relaxed (ctlr, its->base +GITS_CTLR ); -if (GITS_TYPER_HCC (typer)) - its->flags |=ITS_FLAGS_SAVE_SUSPEND_STATE ; - err =its_init_domain (handle, its);if (err) goto out_free_tables;
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 85/105 pinctrl: jasperlake: Fix HOSTSW_OWN offset
In reply to Greg Kroah-HartmanFrom: Evan Green <[email protected]>
commit cdd8fc2dd64e3f1b22a6636e242d0eff49c4ba22 upstream.
GPIOs that attempt to use interrupts get thwarted with a message like:
"pin 161 cannot be used as IRQ" (for instance with SD_CD). This is because the HOSTSW_OWN offset is incorrect, so every GPIO looks like it's owned by ACPI.
--- drivers/pinctrl/intel/pinctrl-jasperlake.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/pinctrl/intel/pinctrl-jasperlake.c +1 -1
@@ -16,7 +16,7 @@#define JSL_PAD_OWN 0x020#define JSL_PADCFGLOCK 0x080 -#define JSL_HOSTSW_OWN 0x0b0 +#define JSL_HOSTSW_OWN 0x0c0#define JSL_GPI_IS 0x100#define JSL_GPI_IE 0x120
Greg Kroah-Hartman
maintainerPATCH 100/105 scsi: be2iscsi: Revert "Fix a theoretical leak in beiscsi_create_eqs()"
In reply to Greg Kroah-HartmanFrom: Dan Carpenter <[email protected]>
commit eeaf06af6f87e1dba371fbe42674e6f963220b9c upstream.
My patch caused kernel Oopses and delays in boot. Revert it.
The problem was that I moved the "mem->dma = paddr;" before the call to be_fill_queue(). But the first thing that the be_fill_queue() function does is memset the whole struct to zero which overwrites the assignment.
--- drivers/scsi/be2iscsi/be_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/scsi/be2iscsi/be_main.c +2 -2
@@ -3020,7 +3020,6 @@ static int beiscsi_create_eqs(struct bei goto create_eq_error; } - mem->dma = paddr; mem->va = eq_vaddress; ret =be_fill_queue (eq, phba->params.num_eq_entries,sizeof (struct be_eq_entry ), eq_vaddress);
@@ -3030,6 +3029,7 @@ static int beiscsi_create_eqs(struct bei goto create_eq_error; } + mem->dma = paddr; ret =beiscsi_cmd_eq_create (&phba->ctrl, eq,BEISCSI_EQ_DELAY_DEF );if (ret) {
@@ -3086,7 +3086,6 @@ static int beiscsi_create_cqs(struct bei goto create_cq_error; } - mem->dma = paddr; ret =be_fill_queue (cq, phba->params.num_cq_entries,sizeof (struct sol_cqe ), cq_vaddress);if (ret) {
@@ -3096,6 +3095,7 @@ static int beiscsi_create_cqs(struct bei goto create_cq_error; } + mem->dma = paddr; ret =beiscsi_cmd_cq_create (&phba->ctrl, cq, eq, false, false,0 );if (ret) {
Greg Kroah-Hartman
maintainerPATCH 101/105 x86/mm/mem_encrypt: Fix definition of PMD_FLAGS_DEC_WP
In reply to Greg Kroah-HartmanFrom: Arvind Sankar <[email protected]>
commit 29ac40cbed2bc06fa218ca25d7f5e280d3d08a25 upstream.
The PAT bit is in different locations for 4k and 2M/1G page table entries.
Add a definition for _PAGE_LARGE_CACHE_MASK to represent the three caching bits (PWT, PCD, PAT), similar to _PAGE_CACHE_MASK for 4k pages, and use it in the definition of PMD_FLAGS_DEC_WP to get the correct PAT index for write-protected pages.
--- arch/x86/include/asm/pgtable_types.h | 1 + arch/x86/mm/mem_encrypt_identity.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-)
arch/x86/include/asm/pgtable_types.h +1 -0
@@ -155,6 +155,7 @@ enum page_cache_mode {#define _PAGE_ENC (_AT(pteval_t, sme_me_mask))#define _PAGE_CACHE_MASK (_PAGE_PWT | _PAGE_PCD | _PAGE_PAT) +#define _PAGE_LARGE_CACHE_MASK (_PAGE_PWT | _PAGE_PCD | _PAGE_PAT_LARGE)#define _PAGE_NOCACHE (cachemode2protval(_PAGE_CACHE_MODE_UC))#define _PAGE_CACHE_WP (cachemode2protval(_PAGE_CACHE_MODE_WP))
arch/x86/mm/mem_encrypt_identity.c +2 -2
@@ -45,8 +45,8 @@#define PMD_FLAGS_LARGE (__PAGE_KERNEL_LARGE_EXEC & ~_PAGE_GLOBAL)#define PMD_FLAGS_DEC PMD_FLAGS_LARGE -#define PMD_FLAGS_DEC_WP ((PMD_FLAGS_DEC & ~_PAGE_CACHE_MASK) | \ - (_PAGE_PAT | _PAGE_PWT)) +#define PMD_FLAGS_DEC_WP ((PMD_FLAGS_DEC & ~_PAGE_LARGE_CACHE_MASK) | \ + (_PAGE_PAT_LARGE | _PAGE_PWT))#define PMD_FLAGS_ENC (PMD_FLAGS_LARGE | _PAGE_ENC)
Greg Kroah-Hartman
maintainerPATCH 62/105 sched/idle: Fix arch_cpu_idle() vs tracing
In reply to Greg Kroah-HartmanFrom: Peter Zijlstra <[email protected]>
[ Upstream commit 58c644ba512cfbc2e39b758dd979edd1d6d00e27 ]
We call arch_cpu_idle() with RCU disabled, but then use local_irq_{en,dis}able(), which invokes tracing, which relies on RCU.
Switch all arch_cpu_idle() implementations to use raw_local_irq_{en,dis}able() and carefully manage the lockdep,rcu,tracing state like we do in entry.
(XXX: we really should change arch_cpu_idle() to not return with interrupts enabled)
--- arch/alpha/kernel/process.c | 2 +- arch/arm/kernel/process.c | 2 +- arch/arm64/kernel/process.c | 2 +- arch/csky/kernel/process.c | 2 +- arch/h8300/kernel/process.c | 2 +- arch/hexagon/kernel/process.c | 2 +- arch/ia64/kernel/process.c | 2 +- arch/microblaze/kernel/process.c | 2 +- arch/mips/kernel/idle.c | 12 ++++++------ arch/nios2/kernel/process.c | 2 +- arch/openrisc/kernel/process.c | 2 +- arch/parisc/kernel/process.c | 2 +- arch/powerpc/kernel/idle.c | 4 ++-- arch/riscv/kernel/process.c | 2 +- arch/s390/kernel/idle.c | 6 +++--- arch/sh/kernel/idle.c | 2 +- arch/sparc/kernel/leon_pmc.c | 4 ++-- arch/sparc/kernel/process_32.c | 2 +- arch/sparc/kernel/process_64.c | 4 ++-- arch/um/kernel/process.c | 2 +- arch/x86/include/asm/mwait.h | 2 -- arch/x86/kernel/process.c | 12 +++++++----- kernel/sched/idle.c | 28 +++++++++++++++++++++++++++- 23 files changed, 64 insertions(+), 38 deletions(-)
arch/alpha/kernel/process.c +1 -1
@@ -57,7 +57,7 @@ EXPORT_SYMBOL(pm_power_off);void arch_cpu_idle (void ) {wtint (0 ); -local_irq_enable (); +raw_local_irq_enable (); }void arch_cpu_idle_dead (void )
arch/arm/kernel/process.c +1 -1
@@ -71,7 +71,7 @@ void arch_cpu_idle(void)arm_pm_idle (); elsecpu_do_idle (); -local_irq_enable (); +raw_local_irq_enable (); }void arch_cpu_idle_prepare (void )
arch/arm64/kernel/process.c +1 -1
@@ -124,7 +124,7 @@ void arch_cpu_idle(void)* tricks */ cpu_do_idle (); -local_irq_enable (); +raw_local_irq_enable (); }#ifdef CONFIG_HOTPLUG_CPU
arch/csky/kernel/process.c +1 -1
@@ -102,6 +102,6 @@ void arch_cpu_idle(void)#ifdef CONFIG_CPU_PM_STOP asmvolatile ("stop\n" );#endif - local_irq_enable(); + raw_local_irq_enable(); }#endif
arch/h8300/kernel/process.c +1 -1
@@ -57,7 +57,7 @@ asmlinkage void ret_from_kernel_thread(void);*/ void arch_cpu_idle (void ) { -local_irq_enable (); +raw_local_irq_enable (); __asm__("sleep" ); }
arch/hexagon/kernel/process.c +1 -1
@@ -44,7 +44,7 @@ void arch_cpu_idle(void) {__vmwait ();/* interrupts wake us up, but irqs are still disabled */ -local_irq_enable (); +raw_local_irq_enable (); }/*
arch/ia64/kernel/process.c +1 -1
@@ -252,7 +252,7 @@ void arch_cpu_idle(void)if (mark_idle) (*mark_idle)(1 ); -safe_halt (); +raw_safe_halt ();if (mark_idle) (*mark_idle)(0 );
arch/microblaze/kernel/process.c +1 -1
@@ -149,5 +149,5 @@ int dump_fpu(struct pt_regs *regs, elf_fpregset_t *fpregs)void arch_cpu_idle (void ) { -local_irq_enable (); +raw_local_irq_enable (); }
arch/mips/kernel/idle.c +6 -6
@@ -33,19 +33,19 @@ static void __cpuidle r3081_wait(void) {unsigned long cfg =read_c0_conf ();write_c0_conf (cfg |R30XX_CONF_HALT ); -local_irq_enable (); +raw_local_irq_enable (); } static void __cpuidle r39xx_wait(void) {if (!need_resched ())write_c0_conf (read_c0_conf () |TX39_CONF_HALT ); -local_irq_enable (); +raw_local_irq_enable (); } void __cpuidle r4k_wait(void) { -local_irq_enable (); +raw_local_irq_enable ();__r4k_wait (); }
@@ -64,7 +64,7 @@ void __cpuidle r4k_wait_irqoff(void)" .set arch=r4000 \n" " wait \n" " .set pop \n"); -local_irq_enable (); +raw_local_irq_enable (); }/*
@@ -84,7 +84,7 @@ static void __cpuidle rm7k_wait_irqoff(void)" wait \n" " mtc0 $1, $12 # stalls until W stage \n" " .set pop \n"); -local_irq_enable (); +raw_local_irq_enable (); }/*
@@ -257,7 +257,7 @@ void arch_cpu_idle(void)if (cpu_wait)cpu_wait ();else -local_irq_enable (); +raw_local_irq_enable (); }#ifdef CONFIG_CPU_IDLE
arch/nios2/kernel/process.c +1 -1
@@ -33,7 +33,7 @@ EXPORT_SYMBOL(pm_power_off);void arch_cpu_idle (void ) { -local_irq_enable (); +raw_local_irq_enable (); }/*
arch/openrisc/kernel/process.c +1 -1
@@ -79,7 +79,7 @@ void machine_power_off(void)*/ void arch_cpu_idle (void ) { -local_irq_enable (); +raw_local_irq_enable ();if (mfspr (SPR_UPR ) &SPR_UPR_PMP )mtspr (SPR_PMR ,mfspr (SPR_PMR ) |SPR_PMR_DME ); }
arch/parisc/kernel/process.c +1 -1
@@ -169,7 +169,7 @@ void __cpuidle arch_cpu_idle_dead(void) void __cpuidle arch_cpu_idle(void) { -local_irq_enable (); +raw_local_irq_enable ();/* nop on real hardware, qemu will idle sleep. */ asmvolatile ("or %%r10,%%r10,%%r10\n" :::);
arch/powerpc/kernel/idle.c +2 -2
@@ -60,9 +60,9 @@ void arch_cpu_idle(void)* interrupts enabled, some don't. */ if (irqs_disabled ()) -local_irq_enable (); +raw_local_irq_enable (); }else { -local_irq_enable (); +raw_local_irq_enable ();/* * Go into low thread priority and possibly * low power mode.
arch/riscv/kernel/process.c +1 -1
@@ -36,7 +36,7 @@ extern asmlinkage void ret_from_kernel_thread(void);void arch_cpu_idle (void ) {wait_for_interrupt (); -local_irq_enable (); +raw_local_irq_enable (); }void show_regs (struct pt_regs *regs)
arch/s390/kernel/idle.c +3 -3
@@ -33,10 +33,10 @@ void enabled_wait(void)PSW_MASK_IO |PSW_MASK_EXT |PSW_MASK_MCHECK ;clear_cpu_flag (CIF_NOHZ_DELAY ); -local_irq_save (flags); +raw_local_irq_save (flags);/* Call the assembler magic in entry.S */ psw_idle (idle, psw_mask); -local_irq_restore (flags); +raw_local_irq_restore (flags);/* Account time spent with enabled wait psw loaded as idle time. */ raw_write_seqcount_begin (&idle->seqcount);
@@ -123,7 +123,7 @@ void arch_cpu_idle_enter(void)void arch_cpu_idle (void ) {enabled_wait (); -local_irq_enable (); +raw_local_irq_enable (); }void arch_cpu_idle_exit (void )
arch/sh/kernel/idle.c +1 -1
@@ -22,7 +22,7 @@ static void (*sh_idle)(void);void default_idle (void ) {set_bl_bit (); -local_irq_enable (); +raw_local_irq_enable ();/* Isn't this racy ? */ cpu_sleep ();clear_bl_bit ();
arch/sparc/kernel/leon_pmc.c +2 -2
@@ -50,7 +50,7 @@ static void pmc_leon_idle_fixup(void) registerunsigned int address = (unsigned int )leon3_irqctrl_regs;/* Interrupts need to be enabled to not hang the CPU */ -local_irq_enable (); +raw_local_irq_enable (); __asm__ __volatile__ ( "wr %%g0, %%asr19\n"
@@ -66,7 +66,7 @@ static void pmc_leon_idle_fixup(void)static void pmc_leon_idle (void ) {/* Interrupts need to be enabled to not hang the CPU */ -local_irq_enable (); +raw_local_irq_enable ();/* For systems without power-down, this will be no-op */ __asm__ __volatile__ ("wr %g0, %asr19\n\t" );
arch/sparc/kernel/process_32.c +1 -1
@@ -74,7 +74,7 @@ void arch_cpu_idle(void) {if (sparc_idle) (*sparc_idle)(); -local_irq_enable (); +raw_local_irq_enable (); }/* XXX cli/sti -> local_irq_xxx here, check this works once SMP is fixed. */
arch/sparc/kernel/process_64.c +2 -2
@@ -62,11 +62,11 @@ void arch_cpu_idle(void) {if (tlb_type != hypervisor) {touch_nmi_watchdog (); -local_irq_enable (); +raw_local_irq_enable (); }else {unsigned long pstate; -local_irq_enable (); +raw_local_irq_enable ();/* The sun4v sleeping code requires that we have PSTATE.IE cleared over * the cpu sleep hypervisor call.
arch/um/kernel/process.c +1 -1
@@ -217,7 +217,7 @@ void arch_cpu_idle(void) { cpu_tasks[current_thread_info ()->cpu].pid =os_getpid ();um_idle_sleep (); -local_irq_enable (); +raw_local_irq_enable (); }int __cant_sleep (void ) {
arch/x86/include/asm/mwait.h +0 -2
@@ -88,8 +88,6 @@ static inline void __mwaitx(unsigned long eax, unsigned long ebx,static inline void __sti_mwait (unsigned long eax,unsigned long ecx) { -trace_hardirqs_on (); -mds_idle_clear_cpu_buffers ();/* "mwait %eax, %ecx;" */ asm volatile("sti; .byte 0x0f, 0x01, 0xc9;"
arch/x86/kernel/process.c +7 -5
@@ -685,7 +685,7 @@ void arch_cpu_idle(void)*/ void __cpuidle default_idle(void) { -safe_halt (); +raw_safe_halt (); }#if defined(CONFIG_APM_MODULE ) || defined(CONFIG_HALTPOLL_CPUIDLE_MODULE )EXPORT_SYMBOL (default_idle);
@@ -736,6 +736,8 @@ void stop_this_cpu(void *dummy)/* * AMD Erratum 400 aware idle routine. We handle it the same way as C3 power * states (local apic timer and TSC stop). +* +* XXX this function is completely buggered vs RCU and tracing. */ static void amd_e400_idle (void ) {
@@ -757,9 +759,9 @@ static void amd_e400_idle(void)* The switch back from broadcast mode needs to be called with * interrupts disabled. */ -local_irq_disable (); +raw_local_irq_disable ();tick_broadcast_exit (); -local_irq_enable (); +raw_local_irq_enable (); }/*
@@ -801,9 +803,9 @@ static __cpuidle void mwait_idle(void)if (!need_resched ())__sti_mwait (0 ,0 );else -local_irq_enable (); +raw_local_irq_enable (); }else { -local_irq_enable (); +raw_local_irq_enable (); }__current_clr_polling (); }
kernel/sched/idle.c +27 -1
@@ -78,7 +78,7 @@ void __weak arch_cpu_idle_dead(void) { }void __weak arch_cpu_idle (void ) { cpu_idle_force_poll =1 ; -local_irq_enable (); +raw_local_irq_enable (); }/**
@@ -94,9 +94,35 @@ void __cpuidle default_idle_call(void)trace_cpu_idle (1 ,smp_processor_id ());stop_critical_timings (); + +/* +* arch_cpu_idle() is supposed to enable IRQs, however +* we can't do that because of RCU and tracing. +* +* Trace IRQs enable here, then switch off RCU, and have +* arch_cpu_idle() use raw_local_irq_enable(). Note that +* rcu_idle_enter() relies on lockdep IRQ state, so switch that +* last -- this is very similar to the entry code. +*/ +trace_hardirqs_on_prepare (); +lockdep_hardirqs_on_prepare (_THIS_IP_);rcu_idle_enter (); +lockdep_hardirqs_on (_THIS_IP_); +arch_cpu_idle (); + +/* +* OK, so IRQs are enabled here, but RCU needs them disabled to +* turn itself back on.. funny thing is that disabling IRQs +* will cause tracing, which needs RCU. Jump through hoops to +* make it 'work'. +*/ +raw_local_irq_disable (); +lockdep_hardirqs_off (_THIS_IP_);rcu_idle_exit (); +lockdep_hardirqs_on (_THIS_IP_); +raw_local_irq_enable (); +start_critical_timings ();trace_cpu_idle (PWR_EVENT_EXIT ,smp_processor_id ()); }
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 49/105 scsi: ufs: Fix unexpected values from ufshcd_read_desc_param()
In reply to Greg Kroah-HartmanFrom: Can Guo <[email protected]>
[ Upstream commit 1699f980d87fb678a669490462cf0b9517c1fb47 ]
WB-related sysfs entries can be accessed even when an UFS device does not support the feature. The descriptors which are not supported by the UFS device may be wrongly reported when they are accessed from their corrsponding sysfs entries. Fix it by adding a sanity check of parameter offset against the actual decriptor length.
--- drivers/scsi/ufs/ufshcd.c | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-)
drivers/scsi/ufs/ufshcd.c +15 -9
@@ -3163,13 +3163,19 @@ int ufshcd_read_desc_param(struct ufs_hba *hba,/* Get the length of descriptor */ ufshcd_map_desc_id_to_length (hba, desc_id, &buff_len);if (!buff_len) { -dev_err (hba->dev,"%s: Failed to get desc length" , __func__); +dev_err (hba->dev,"%s: Failed to get desc length\n" , __func__); +return -EINVAL ; + } + +if (param_offset >= buff_len) { +dev_err (hba->dev,"%s: Invalid offset 0x%x in descriptor IDN 0x%x, length 0x%x\n" , + __func__, param_offset, desc_id, buff_len);return -EINVAL ; }/* Check whether we need temp memory */ if (param_offset !=0 || param_size < buff_len) { - desc_buf =kmalloc (buff_len,GFP_KERNEL ); + desc_buf =kzalloc (buff_len,GFP_KERNEL );if (!desc_buf)return -ENOMEM ; }else {
@@ -3183,14 +3189,14 @@ int ufshcd_read_desc_param(struct ufs_hba *hba, desc_buf, &buff_len);if (ret) { -dev_err (hba->dev,"%s: Failed reading descriptor. desc_id %d, desc_index %d, param_offset %d, ret %d" , +dev_err (hba->dev,"%s: Failed reading descriptor. desc_id %d, desc_index %d, param_offset %d, ret %d\n" , __func__, desc_id, desc_index, param_offset, ret); goto out; }/* Sanity check */ if (desc_buf[QUERY_DESC_DESC_TYPE_OFFSET ] != desc_id) { -dev_err (hba->dev,"%s: invalid desc_id %d in descriptor header" , +dev_err (hba->dev,"%s: invalid desc_id %d in descriptor header\n" , __func__, desc_buf[QUERY_DESC_DESC_TYPE_OFFSET ]); ret = -EINVAL ; goto out;
@@ -3200,12 +3206,12 @@ int ufshcd_read_desc_param(struct ufs_hba *hba, buff_len = desc_buf[QUERY_DESC_LENGTH_OFFSET ];ufshcd_update_desc_length (hba, desc_id, desc_index, buff_len); -/* Check wherher we will not copy more data, than available */ -if (is_kmalloc && (param_offset + param_size) > buff_len) - param_size = buff_len - param_offset; - -if (is_kmalloc) +if (is_kmalloc) { +/* Make sure we don't copy more data than available */ +if (param_offset + param_size > buff_len) + param_size = buff_len - param_offset;memcpy (param_read_buf, &desc_buf[param_offset], param_size); + } out:if (is_kmalloc)kfree (desc_buf);
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 89/105 drm/amdgpu/disply: set num_crtc earlier
In reply to Greg Kroah-HartmanFrom: Alex Deucher <[email protected]>
commit 578b6c487899179fed730e710ffec0b069917971 upstream.
To avoid a recently added warning:
Bogus possible_crtcs: [ENCODER:65:TMDS-65] possible_crtcs=0xf (full crtc mask=0x7)
WARNING: CPU: 3 PID: 439 at drivers/gpu/drm/drm_mode_config.c:617 drm_mode_config_validate+0x178/0x200 [drm]
In this case the warning is harmless, but confusing to users.
--- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c +4 -5
@@ -977,9 +977,6 @@ static int amdgpu_dm_init(struct amdgpu_ goto error; } -/* Update the actual used number of crtc */ - adev->mode_info.num_crtc = adev->dm.display_indexes_num; -/* create fake encoders for MST */ dm_dp_create_fake_mst_encoders (adev);
@@ -3099,6 +3096,10 @@ static int amdgpu_dm_initialize_drm_devienum dc_connection_type new_connection_type = dc_connection_none;const struct dc_plane_cap *plane; + dm->display_indexes_num = dm->dc->caps.max_streams; +/* Update the actual used number of crtc */ + adev->mode_info.num_crtc = adev->dm.display_indexes_num; + link_cnt = dm->dc->caps.max_links;if (amdgpu_dm_mode_config_init (dm->adev)) {DRM_ERROR ("DM: Failed to initialize mode config\n" );
@@ -3160,8 +3161,6 @@ static int amdgpu_dm_initialize_drm_devi goto fail; } - dm->display_indexes_num = dm->dc->caps.max_streams; -/* loops over all connectors on the board */ for (i =0 ; i < link_cnt; i++) {struct dc_link *link =NULL ;
Greg Kroah-Hartman
maintainerPATCH 104/105 x86/kprobes: Fix optprobe to detect INT3 padding correctly
In reply to Greg Kroah-HartmanFrom: Masami Hiramatsu <[email protected]>
commit 0d07c0ec4381f630c801539c79ad8dcc627f6e4a upstream.
Commit
7705dc855797 ("x86/vmlinux: Use INT3 instead of NOP for linker fill bytes")
changed the padding bytes between functions from NOP to INT3. However, when optprobe decodes a target function it finds INT3 and gives up the jump optimization.
Instead of giving up any INT3 detection, check whether the rest of the bytes to the end of the function are INT3. If all of them are INT3, those come from the linker. In that case, continue the optprobe jump optimization.
[ bp: Massage commit message. ]
--- arch/x86/kernel/kprobes/opt.c | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-)
arch/x86/kernel/kprobes/opt.c +20 -2
@@ -271,6 +271,19 @@ static int insn_is_indirect_jump(structreturn ret; } +static bool is_padding_int3 (unsigned long addr,unsigned long eaddr) +{ +unsigned char ops; + +for (; addr < eaddr; addr++) { +if (get_kernel_nofault (ops, (void *)addr) <0 || + ops !=INT3_INSN_OPCODE ) +return false; + } + +return true; +} +/* Decode whole function to ensure any instructions don't jump into target */ static int can_optimize (unsigned long paddr) {
@@ -309,9 +322,14 @@ static int can_optimize(unsigned long pareturn 0 ;kernel_insn_init (&insn, (void *)recovered_insn,MAX_INSN_SIZE );insn_get_length (&insn); -/* Another subsystem puts a breakpoint */ +/* +* In the case of detecting unknown breakpoint, this could be +* a padding INT3 between functions. Let's check that all the +* rest of the bytes are also INT3. +*/ if (insn.opcode.bytes[0 ] ==INT3_INSN_OPCODE ) -return 0 ; +return is_padding_int3 (addr, paddr - offset + size) ?1 :0 ; +/* Recover address */ insn.kaddr = (void *)addr; insn.next_byte = (void *)(addr + insn.length);
Greg Kroah-Hartman
maintainerPATCH 90/105 drm/i915/gem: Propagate error from cancelled submit due to context closure
In reply to Greg Kroah-HartmanFrom: Chris Wilson <[email protected]>
commit 0e124e19ce52d20b28ee9f1d5cdb22e2106bfd29 upstream.
In the course of discovering and closing many races with context closure and execbuf submission, since commit 61231f6bd056 ("drm/i915/gem: Check that the context wasn't closed during setup") we started checking that the context was not closed by another userspace thread during the execbuf ioctl. In doing so we cancelled the inflight request (by telling it to be skipped), but kept reporting success since we do submit a request, albeit one that doesn't execute. As the error is known before we return from the ioctl, we can report the error we detect immediately, rather than leave it on the fence status. With the immediate propagation of the error, it is easier for userspace to handle.
Testcase: igt/gem_ctx_exec/basic-close-race
--- drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c +5 -2
@@ -2613,7 +2613,7 @@ static void retire_requests(struct intelbreak ; } -static void eb_request_add (struct i915_execbuffer *eb) +static int eb_request_add (struct i915_execbuffer *eb,int err) {struct i915_request *rq = eb->request;struct intel_timeline *const tl =i915_request_timeline (rq);
@@ -2634,6 +2634,7 @@ static void eb_request_add(struct i915_e/* Serialise with context_close via the add_to_timeline */ i915_request_set_error_once (rq, -ENOENT );__i915_request_skip (rq); + err = -ENOENT ;/* override any transient errors */ }__i915_request_queue (rq, &attr);
@@ -2643,6 +2644,8 @@ static void eb_request_add(struct i915_eretire_requests (tl, prev);mutex_unlock (&tl->mutex); + +return err; } static int
@@ -2844,7 +2847,7 @@ i915_gem_do_execbuffer(struct drm_device err_request:add_to_client (eb.request, file);i915_request_get (eb.request); -eb_request_add (&eb); + err =eb_request_add (&eb, err);if (fences)signal_fence_array (&eb, fences);
Greg Kroah-Hartman
maintainerPATCH 83/105 Input: cm109 - do not stomp on control URB
In reply to Greg Kroah-HartmanFrom: Dmitry Torokhov <[email protected]>
commit 82e06090473289ce63e23fdeb8737aad59b10645 upstream.
We need to make sure we are not stomping on the control URB that was issued when opening the device when attempting to toggle buzzer. To do that we need to mark it as pending in cm109_open().
--- drivers/input/misc/cm109.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
drivers/input/misc/cm109.c +5 -2
@@ -568,12 +568,15 @@ static int cm109_input_open(struct input dev->ctl_data->byte[HID_OR2 ] = dev->keybit; dev->ctl_data->byte[HID_OR3 ] =0x00 ; + dev->ctl_urb_pending =1 ; error =usb_submit_urb (dev->urb_ctl,GFP_KERNEL ); -if (error) +if (error) { + dev->ctl_urb_pending =0 ;dev_err (&dev->intf->dev,"%s: usb_submit_urb (urb_ctl) failed %d\n" , __func__, error); -else + }else { dev->open =1 ; + }mutex_unlock (&dev->pm_mutex);
Greg Kroah-Hartman
maintainerPATCH 88/105 mmc: block: Fixup condition for CMD13 polling for RPMB requests
In reply to Greg Kroah-HartmanFrom: Bean Huo <[email protected]>
commit 6246d7c9d15aaff0bc3863f67900c6a6e6be921b upstream.
The CMD13 polling is needed for commands with R1B responses. In commit a0d4c7eb71dd ("mmc: block: Add CMD13 polling for MMC IOCTLS with R1B response"), the intent was to introduce this for requests targeted to the RPMB partition. However, the condition to trigger the polling loop became wrong, leading to unnecessary polling. Let's fix the condition to avoid this.
--- drivers/mmc/core/block.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/core/block.c +1 -1
@@ -580,7 +580,7 @@ static int __mmc_blk_ioctl_cmd(struct mmmemcpy (&(idata->ic.response), cmd.resp,sizeof (cmd.resp)); -if (idata->rpmb || (cmd.flags &MMC_RSP_R1B )) { +if (idata->rpmb || (cmd.flags &MMC_RSP_R1B ) ==MMC_RSP_R1B ) {/* * Ensure RPMB/R1B command has completed by polling CMD13 * "Send Status".
Greg Kroah-Hartman
maintainerPATCH 91/105 drm/i915/display/dp: Compute the correct slice count for VDSC on DP
In reply to Greg Kroah-HartmanFrom: Manasi Navare <[email protected]>
commit f6cbe49be65ed800863ac5ba695555057363f9c2 upstream.
This patch fixes the slice count computation algorithm for calculating the slice count based on Peak pixel rate and the max slice width allowed on the DSC engines. We need to ensure slice count > min slice count req as per DP spec based on peak pixel rate and that it is greater than min slice count based on the max slice width advertised by DPCD. So use max of these two.
In the prev patch we were using min of these 2 causing it to violate the max slice width limitation causing a blank screen on 8K@60.
--- drivers/gpu/drm/i915/display/intel_dp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/i915/display/intel_dp.c +1 -1
@@ -597,7 +597,7 @@ static u8 intel_dp_dsc_get_slice_count(sreturn 0 ; }/* Also take into account max slice width */ - min_slice_count =min_t (u8, min_slice_count, + min_slice_count =max_t (u8, min_slice_count,DIV_ROUND_UP (mode_hdisplay, max_slice_width));
Greg Kroah-Hartman
maintainerPATCH 92/105 drm/i915/gt: Declare gen9 has 64 mocs entries!
In reply to Greg Kroah-HartmanFrom: Chris Wilson <[email protected]>
commit 7c5c15dffe1e3c42f44735ce9552afb7207f1584 upstream.
We checked the table size against a hardcoded number of entries, and that number was excluding the special mocs registers at the end.
--- drivers/gpu/drm/i915/gt/intel_mocs.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
drivers/gpu/drm/i915/gt/intel_mocs.c +3 -4
@@ -59,8 +59,7 @@ struct drm_i915_mocs_table {#define _L3_CACHEABILITY (value) ((value) << 4)/* Helper defines */ -#define GEN9_NUM_MOCS_ENTRIES 62/* 62 out of 64 - 63 & 64 are reserved. */ -#define GEN11_NUM_MOCS_ENTRIES 64/* 63-64 are reserved, but configured. */ +#define GEN9_NUM_MOCS_ENTRIES 64/* 63-64 are reserved, but configured. */ /* (e)LLC caching options */ /*
@@ -328,11 +327,11 @@ static unsigned int get_mocs_settings(coif (INTEL_GEN (i915) >=12 ) { table->size =ARRAY_SIZE (tgl_mocs_table); table->table = tgl_mocs_table; - table->n_entries =GEN11_NUM_MOCS_ENTRIES ; + table->n_entries =GEN9_NUM_MOCS_ENTRIES ; }else if (IS_GEN (i915,11 )) { table->size =ARRAY_SIZE (icl_mocs_table); table->table = icl_mocs_table; - table->n_entries =GEN11_NUM_MOCS_ENTRIES ; + table->n_entries =GEN9_NUM_MOCS_ENTRIES ; }else if (IS_GEN9_BC (i915) ||IS_CANNONLAKE (i915)) { table->size =ARRAY_SIZE (skl_mocs_table); table->n_entries =GEN9_NUM_MOCS_ENTRIES ;
Greg Kroah-Hartman
maintainerPATCH 105/105 compiler.h: fix barrier_data() on clang
In reply to Greg Kroah-HartmanFrom: Arvind Sankar <[email protected]>
commit 3347acc6fcd4ee71ad18a9ff9d9dac176b517329 upstream.
Commit 815f0ddb346c ("include/linux/compiler*.h: make compiler-*.h mutually exclusive") neglected to copy barrier_data() from compiler-gcc.h into compiler-clang.h.
The definition in compiler-gcc.h was really to work around clang's more aggressive optimization, so this broke barrier_data() on clang, and consequently memzero_explicit() as well.
For example, this results in at least the memzero_explicit() call in lib/crypto/sha256.c:sha256_transform() being optimized away by clang.
Fix this by moving the definition of barrier_data() into compiler.h.
Also move the gcc/clang definition of barrier() into compiler.h, __memory_barrier() is icc-specific (and barrier() is already defined using it in compiler-intel.h) and doesn't belong in compiler.h.
[[email protected]: fix ALPHA builds when SMP is not enabled]
--- include/asm-generic/barrier.h | 1 + include/linux/compiler-clang.h | 6 ------ include/linux/compiler-gcc.h | 19 ------------------- include/linux/compiler.h | 18 ++++++++++++++++-- 4 files changed, 17 insertions(+), 27 deletions(-)
include/asm-generic/barrier.h +1 -0
@@ -13,6 +13,7 @@#ifndef __ASSEMBLY__ +#include <linux/compiler.h> #include <asm/rwonce.h> #ifndef nop
include/linux/compiler-clang.h +0 -6
@@ -52,12 +52,6 @@#define COMPILER_HAS_GENERIC_BUILTIN_OVERFLOW 1#endif -/* The following are for compatibility with GCC, from compiler-gcc.h, -* and may be redefined here because they should not be shared with other -* compilers, like ICC. -*/ -#define barrier () __asm__ __volatile__("" : : : "memory") -#if __has_feature (shadow_call_stack)# define __noscs __attribute__((__no_sanitize__("shadow-call-stack")))#endif
include/linux/compiler-gcc.h +0 -19
@@ -15,25 +15,6 @@# error Sorry, your compiler is too old - please upgrade it.#endif -/* Optimization barrier */ - -/* The "volatile" is due to gcc bugs */ -#define barrier () __asm__ __volatile__("": : :"memory") -/* -* This version is i.e. to prevent dead stores elimination on @ptr -* where gcc and llvm may behave differently when otherwise using -* normal barrier(): while gcc behavior gets along with a normal -* barrier(), llvm needs an explicit input variable to be assumed -* clobbered. The issue is as follows: while the inline asm might -* access any memory it wants, the compiler could have fit all of -* @ptr into memory registers instead, and since @ptr never escaped -* from that, it proved that the inline asm wasn't touching any of -* it. This version works well with both compilers, i.e. we're telling -* the compiler that the inline asm absolutely may see the contents -* of @ptr. See also: https://llvm.org/bugs/show_bug.cgi?id=15495 -*/ -#define barrier_data (ptr) __asm__ __volatile__("": :"r"(ptr) :"memory") -/* * This macro obfuscates arithmetic on a variable address so that gcc * shouldn't recognize the original var, and make assumptions about it.
include/linux/compiler.h +16 -2
@@ -80,11 +80,25 @@ void ftrace_likely_update(struct ftrace_/* Optimization barrier */ #ifndef barrier -# define barrier () __memory_barrier() +/* The "volatile" is due to gcc bugs */ +# define barrier () __asm__ __volatile__("": : :"memory")#endif #ifndef barrier_data -# define barrier_data (ptr) barrier() +/* +* This version is i.e. to prevent dead stores elimination on @ptr +* where gcc and llvm may behave differently when otherwise using +* normal barrier(): while gcc behavior gets along with a normal +* barrier(), llvm needs an explicit input variable to be assumed +* clobbered. The issue is as follows: while the inline asm might +* access any memory it wants, the compiler could have fit all of +* @ptr into memory registers instead, and since @ptr never escaped +* from that, it proved that the inline asm wasn't touching any of +* it. This version works well with both compilers, i.e. we're telling +* the compiler that the inline asm absolutely may see the contents +* of @ptr. See also: https://llvm.org/bugs/show_bug.cgi?id=15495 +*/ +# define barrier_data (ptr) __asm__ __volatile__("": :"r"(ptr) :"memory")#endif /* workaround for GCC PR82365 if needed */
Greg Kroah-Hartman
maintainerPATCH 102/105 x86/membarrier: Get rid of a dubious optimization
In reply to Greg Kroah-HartmanFrom: Andy Lutomirski <[email protected]>
commit a493d1ca1a03b532871f1da27f8dbda2b28b04c4 upstream.
sync_core_before_usermode() had an incorrect optimization. If the kernel returns from an interrupt, it can get to usermode without IRET. It just has to schedule to a different task in the same mm and do SYSRET. Fortunately, there were no callers of sync_core_before_usermode() that could have had in_irq() or in_nmi() equal to true, because it's only ever called from the scheduler.
While at it, clarify a related comment.
--- arch/x86/include/asm/sync_core.h | 9 +++++---- arch/x86/mm/tlb.c | 10 ++++++++-- 2 files changed, 13 insertions(+), 6 deletions(-)
arch/x86/include/asm/sync_core.h +5 -4
@@ -88,12 +88,13 @@ static inline void sync_core_before_user/* With PTI, we unconditionally serialize before running user code. */ if (static_cpu_has (X86_FEATURE_PTI ))return ; +/* -* Return from interrupt and NMI is done through iret, which is core -* serializing. +* Even if we're in an interrupt, we might reschedule before returning, +* in which case we could switch to a different thread in the same mm +* and return using SYSRET or SYSEXIT. Instead of trying to keep +* track of our need to sync the core, just sync right away. */ -if (in_irq () ||in_nmi ()) -return ;sync_core (); }
arch/x86/mm/tlb.c +8 -2
@@ -475,8 +475,14 @@ void switch_mm_irqs_off(struct mm_struct/* * The membarrier system call requires a full memory barrier and * core serialization before returning to user-space, after -* storing to rq->curr. Writing to CR3 provides that full -* memory barrier and core serializing instruction. +* storing to rq->curr, when changing mm. This is because +* membarrier() sends IPIs to all CPUs that are in the target mm +* to make them issue memory barriers. However, if another CPU +* switches to/from the target mm concurrently with +* membarrier(), it can cause that CPU not to receive an IPI +* when it really should issue a memory barrier. Writing to CR3 +* provides that full memory barrier and core serializing +* instruction. */ if (real_prev == next) { VM_WARN_ON(this_cpu_read(cpu_tlbstate.ctxs[prev_asid].ctx_id) !=
Greg Kroah-Hartman
maintainerPATCH 97/105 proc: use untagged_addr() for pagemap_read addresses
In reply to Greg Kroah-HartmanFrom: Miles Chen <[email protected]>
commit 40d6366e9d86d9a67b5642040e76082fdb5bdcf9 upstream.
When we try to visit the pagemap of a tagged userspace pointer, we find that the start_vaddr is not correct because of the tag.
To fix it, we should untag the userspace pointers in pagemap_read().
I tested with 5.10-rc4 and the issue remains.
Explanation from Catalin in [1]:
"Arguably, that's a user-space bug since tagged file offsets were never
supported. In this case it's not even a tag at bit 56 as per the arm64 tagged address ABI but rather down to bit 47. You could say that the problem is caused by the C library (malloc()) or whoever created the tagged vaddr and passed it to this function. It's not a kernel regression as we've never supported it.
Now, pagemap is a special case where the offset is usually not generated as a classic file offset but rather derived by shifting a user virtual address. I guess we can make a concession for pagemap (only) and allow such offset with the tag at bit (56 - PAGE_SHIFT + 3)"
My test code is based on [2]:
A userspace pointer which has been tagged by 0xb4: 0xb400007662f541c8
userspace program:
uint64 OsLayer::VirtualToPhysical(void *vaddr) {
uint64 frame, paddr, pfnmask, pagemask;
int pagesize = sysconf(_SC_PAGESIZE);
off64_t off = ((uintptr_t)vaddr) / pagesize * 8; // off = 0xb400007662f541c8 / pagesize * 8 = 0x5a00003b317aa0
int fd = open(kPagemapPath, O_RDONLY);
...
if (lseek64(fd, off, SEEK_SET) != off || read(fd, &frame, 8) != 8) {
int err = errno;
string errtxt = ErrorString(err);
if (fd >= 0)
close(fd);
return 0;
} ...
}
kernel fs/proc/task_mmu.c:
static ssize_t pagemap_read(struct file *file, char __user *buf,
size_t count, loff_t *ppos)
{
...
src = *ppos;
svpfn = src / PM_ENTRY_BYTES; // svpfn == 0xb400007662f54
start_vaddr = svpfn << PAGE_SHIFT; // start_vaddr == 0xb400007662f54000
end_vaddr = mm->task_size;
/* watch out for wraparound */
// svpfn == 0xb400007662f54
// (mm->task_size >> PAGE) == 0x8000000
if (svpfn > mm->task_size >> PAGE_SHIFT) // the condition is true because of the tag 0xb4
start_vaddr = end_vaddr;
ret = 0;
while (count && (start_vaddr < end_vaddr)) { // we cannot visit correct entry because start_vaddr is set to end_vaddr
int len;
unsigned long end;
...
}
...}
[1] https://lore.kernel.org/patchwork/patch/1343258/
[2] https://github.com/stressapptest/stressapptest/blob/master/src/os.cc#L158
--- fs/proc/task_mmu.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
fs/proc/task_mmu.c +6 -2
@@ -1541,11 +1541,15 @@ static ssize_t pagemap_read(struct file src = *ppos; svpfn = src /PM_ENTRY_BYTES ; - start_vaddr = svpfn <<PAGE_SHIFT ; end_vaddr = mm->task_size;/* watch out for wraparound */ -if (svpfn > mm->task_size >>PAGE_SHIFT ) + start_vaddr = end_vaddr; +if (svpfn <= (ULONG_MAX >>PAGE_SHIFT )) + start_vaddr =untagged_addr (svpfn <<PAGE_SHIFT ); + +/* Ensure the address is inside the task */ +if (start_vaddr > mm->task_size) start_vaddr = end_vaddr;/*
Greg Kroah-Hartman
maintainerPATCH 98/105 mm/hugetlb: clear compound_nr before freeing gigantic pages
In reply to Greg Kroah-HartmanFrom: Gerald Schaefer <[email protected]>
commit ba9c1201beaa86a773e83be5654602a0667e4a4d upstream.
Commit 1378a5ee451a ("mm: store compound_nr as well as compound_order") added compound_nr counter to first tail struct page, overlaying with page->mapping. The overlay itself is fine, but while freeing gigantic hugepages via free_contig_range(), a "bad page" check will trigger for non-NULL page->mapping on the first tail page:
BUG: Bad page state in process bash pfn:380001
page:00000000c35f0856 refcount:0 mapcount:0 mapping:00000000126b68aa index:0x0 pfn:0x380001
aops:0x0
flags: 0x3ffff00000000000()
raw: 3ffff00000000000 0000000000000100 0000000000000122 0000000100000000
raw: 0000000000000000 0000000000000000 ffffffff00000000 0000000000000000
page dumped because: non-NULL mapping
Modules linked in:
CPU: 6 PID: 616 Comm: bash Not tainted 5.10.0-rc7-next-20201208 #1
Hardware name: IBM 3906 M03 703 (LPAR)
Call Trace:
show_stack+0x6e/0xe8
dump_stack+0x90/0xc8
bad_page+0xd6/0x130
free_pcppages_bulk+0x26a/0x800
free_unref_page+0x6e/0x90
free_contig_range+0x94/0xe8
update_and_free_page+0x1c4/0x2c8
free_pool_huge_page+0x11e/0x138
set_max_huge_pages+0x228/0x300
nr_hugepages_store_common+0xb8/0x130
kernfs_fop_write+0xd2/0x218
vfs_write+0xb0/0x2b8
ksys_write+0xac/0xe0
system_call+0xe6/0x288
Disabling lock debugging due to kernel taintThis is because only the compound_order is cleared in destroy_compound_gigantic_page(), and compound_nr is set to 1U << order == 1 for order 0 in set_compound_order(page, 0).
Fix this by explicitly clearing compound_nr for first tail page after calling set_compound_order(page, 0).
--- mm/hugetlb.c | 1 + 1 file changed, 1 insertion(+)
mm/hugetlb.c +1 -0
@@ -1227,6 +1227,7 @@ static void destroy_compound_gigantic_pa }set_compound_order (page,0 ); + page[1 ].compound_nr =0 ;__ClearPageHead (page); }
Greg Kroah-Hartman
maintainerPATCH 58/105 habanalabs/gaudi: fix missing code in ECC handling
In reply to Greg Kroah-HartmanFrom: Oded Gabbay <[email protected]>
[ Upstream commit 652b44453ea953d3157f02a7f17e18e329952649 ]
There is missing statement and missing "break;" in the ECC handling code in gaudi.c
This will cause a wrong behavior upon certain ECC interrupts.
--- drivers/misc/habanalabs/gaudi/gaudi.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/misc/habanalabs/gaudi/gaudi.c +2 -0
@@ -5416,6 +5416,8 @@ static void gaudi_handle_ecc_event(struct hl_device *hdev, u16 event_type, params.num_memories =33 ; params.derr = true; params.disable_clock_gating = true; + extract_info_from_fw = false; +break ;default :return ; }
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 84/105 Input: i8042 - add Acer laptops to the i8042 reset list
In reply to Greg Kroah-HartmanFrom: Chris Chiu <[email protected]>
commit ce6520b0eafad5962ffc21dc47cd7bd3250e9045 upstream.
The touchpad operates in Basic Mode by default in the Acer BIOS setup, but some Aspire/TravelMate models require the i8042 to be reset in order to be correctly detected.
--- drivers/input/serio/i8042-x86ia64io.h | 42 ++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+)
drivers/input/serio/i8042-x86ia64io.h +42 -0
@@ -612,6 +612,48 @@ static const struct dmi_system_id __init }, }, { + .matches = { +DMI_MATCH (DMI_SYS_VENDOR ,"Acer" ), + DMI_MATCH(DMI_PRODUCT_NAME, "Aspire A114-31"), + }, + }, + { + .matches = { +DMI_MATCH (DMI_SYS_VENDOR ,"Acer" ), + DMI_MATCH(DMI_PRODUCT_NAME, "Aspire A314-31"), + }, + }, + { + .matches = { +DMI_MATCH (DMI_SYS_VENDOR ,"Acer" ), + DMI_MATCH(DMI_PRODUCT_NAME, "Aspire A315-31"), + }, + }, + { + .matches = { +DMI_MATCH (DMI_SYS_VENDOR ,"Acer" ), + DMI_MATCH(DMI_PRODUCT_NAME, "Aspire ES1-132"), + }, + }, + { + .matches = { +DMI_MATCH (DMI_SYS_VENDOR ,"Acer" ), + DMI_MATCH(DMI_PRODUCT_NAME, "Aspire ES1-332"), + }, + }, + { + .matches = { +DMI_MATCH (DMI_SYS_VENDOR ,"Acer" ), + DMI_MATCH(DMI_PRODUCT_NAME, "Aspire ES1-432"), + }, + }, + { + .matches = { +DMI_MATCH (DMI_SYS_VENDOR ,"Acer" ), + DMI_MATCH(DMI_PRODUCT_NAME, "TravelMate Spin B118-RN"), + }, + }, + {/* Advent 4211 */ .matches = { DMI_MATCH(DMI_SYS_VENDOR, "DIXONSXP"),
Greg Kroah-Hartman
maintainerPATCH 103/105 x86/apic/vector: Fix ordering in vector assignment
In reply to Greg Kroah-HartmanFrom: Thomas Gleixner <[email protected]>
commit 190113b4c6531c8e09b31d5235f9b5175cbb0f72 upstream.
Prarit reported that depending on the affinity setting the
' irq $N: Affinity broken due to vector space exhaustion.'
message is showing up in dmesg, but the vector space on the CPUs in the affinity mask is definitely not exhausted.
Shung-Hsi provided traces and analysis which pinpoints the problem:
The ordering of trying to assign an interrupt vector in assign_irq_vector_any_locked() is simply wrong if the interrupt data has a valid node assigned. It does:
1) Try the intersection of affinity mask and node mask
2) Try the node mask
3) Try the full affinity mask
4) Try the full online mask
Obviously #2 and #3 are in the wrong order as the requested affinity mask has to take precedence.
In the observed cases #1 failed because the affinity mask did not contain CPUs from node 0. That made it allocate a vector from node 0, thereby breaking affinity and emitting the misleading message.
Revert the order of #2 and #3 so the full affinity mask without the node intersection is tried before actually affinity is broken.
If no node is assigned then only the full affinity mask and if that fails the full online mask is tried.
--- arch/x86/kernel/apic/vector.c | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-)
arch/x86/kernel/apic/vector.c +14 -10
@@ -273,20 +273,24 @@ static int assign_irq_vector_any_locked(const struct cpumask *affmsk =irq_data_get_affinity_mask (irqd);int node =irq_data_get_node (irqd); -if (node ==NUMA_NO_NODE ) - goto all; -/* Try the intersection of @affmsk and node mask */ -cpumask_and (vector_searchmask,cpumask_of_node (node), affmsk); -if (!assign_vector_locked (irqd, vector_searchmask)) -return 0 ; -/* Try the node mask */ -if (!assign_vector_locked (irqd,cpumask_of_node (node))) -return 0 ; -all: +if (node !=NUMA_NO_NODE ) { +/* Try the intersection of @affmsk and node mask */ +cpumask_and (vector_searchmask,cpumask_of_node (node), affmsk); +if (!assign_vector_locked (irqd, vector_searchmask)) +return 0 ; + } +/* Try the full affinity mask */ cpumask_and (vector_searchmask, affmsk, cpu_online_mask);if (!assign_vector_locked (irqd, vector_searchmask))return 0 ; + +if (node !=NUMA_NO_NODE ) { +/* Try the node mask */ +if (!assign_vector_locked (irqd,cpumask_of_node (node))) +return 0 ; + } +/* Try the full online mask */ return assign_vector_locked (irqd, cpu_online_mask); }
Greg Kroah-Hartman
maintainerPATCH 95/105 drm/amdgpu: fix sdma instance fw version and feature version init
In reply to Greg Kroah-HartmanFrom: Stanley.Yang <[email protected]>
commit 6896887b8676d8fb445c85ea56333b9661a6a8aa upstream.
each sdma instance fw_version and feature_version should be set right value when asic type isn't between SIENNA_CICHILD and CHIP_DIMGREY_CAVEFISH
--- drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c +1 -1
@@ -183,7 +183,7 @@ static int sdma_v5_2_init_microcode(struif (err) goto out; - err =sdma_v5_2_init_inst_ctx (&adev->sdma.instance[0 ]); + err =sdma_v5_2_init_inst_ctx (&adev->sdma.instance[i]);if (err) goto out; }
Greg Kroah-Hartman
maintainerPATCH 50/105 scsi: ufs: Make sure clk scaling happens only when HBA is runtime ACTIVE
In reply to Greg Kroah-HartmanFrom: Can Guo <[email protected]>
[ Upstream commit 73cc291c270248567245f084dcdf5078069af6b5 ]
If someone plays with the UFS clk scaling devfreq governor through sysfs, ufshcd_devfreq_scale may be called even when HBA is not runtime ACTIVE. This can lead to unexpected error. We cannot just protect it by calling pm_runtime_get_sync() because that may cause a race condition since HBA runtime suspend ops need to suspend clk scaling. To fix this call pm_runtime_get_noresume() and check HBA's runtime status. Only proceed if HBA is runtime ACTIVE, otherwise just bail.
governor_store
devfreq_performance_handler
update_devfreq
devfreq_set_target
ufshcd_devfreq_target
ufshcd_devfreq_scale
--- drivers/scsi/ufs/ufshcd.c | 7 +++++++ 1 file changed, 7 insertions(+)
drivers/scsi/ufs/ufshcd.c +7 -0
@@ -1279,8 +1279,15 @@ static int ufshcd_devfreq_target(struct device *dev, }spin_unlock_irqrestore (hba->host->host_lock, irq_flags); +pm_runtime_get_noresume (hba->dev); +if (!pm_runtime_active (hba->dev)) { +pm_runtime_put_noidle (hba->dev); + ret = -EAGAIN ; + goto out; + } start =ktime_get (); ret =ufshcd_devfreq_scale (hba, scale_up); +pm_runtime_put (hba->dev); trace_ufshcd_profile_clk_scaling(dev_name(hba->dev), (scale_up ? "up" : "down"),
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 96/105 kbuild: avoid static_assert for genksyms
In reply to Greg Kroah-HartmanFrom: Arnd Bergmann <[email protected]>
commit 14dc3983b5dff513a90bd5a8cc90acaf7867c3d0 upstream.
genksyms does not know or care about the _Static_assert() built-in, and sometimes falls back to ignoring the later symbols, which causes undefined behavior such as
WARNING: modpost: EXPORT symbol "ethtool_set_ethtool_phy_ops" [vmlinux] version generation failed, symbol will not be versioned.
ld: net/ethtool/common.o: relocation R_AARCH64_ABS32 against `__crc_ethtool_set_ethtool_phy_ops' can not be used when making a shared object net/ethtool/common.o:(_ftrace_annotated_branch+0x0): dangerous relocation: unsupported relocation
Redefine static_assert for genksyms to avoid that.
--- include/linux/build_bug.h | 5 +++++ 1 file changed, 5 insertions(+)
include/linux/build_bug.h +5 -0
@@ -77,4 +77,9 @@#define static_assert (expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr)#define __static_assert (expr, msg, ...) _Static_assert(expr, msg) +#ifdef __GENKSYMS__ +/* genksyms gets confused by _Static_assert */ +#define _Static_assert (expr, ...) +#endif +#endif /* _LINUX_BUILD_BUG_H */
Greg Kroah-Hartman
maintainerPATCH 59/105 btrfs: do nofs allocations when adding and removing qgroup relations
In reply to Greg Kroah-HartmanFrom: Filipe Manana <[email protected]>
[ Upstream commit 7aa6d359845a9dbf7ad90b0b1b6347ef4764621f ]
When adding or removing a qgroup relation we are doing a GFP_KERNEL allocation which is not safe because we are holding a transaction handle open and that can make us deadlock if the allocator needs to recurse into the filesystem. So just surround those calls with a nofs context.
--- fs/btrfs/qgroup.c | 9 +++++++++ 1 file changed, 9 insertions(+)
fs/btrfs/qgroup.c +9 -0
@@ -11,6 +11,7 @@#include <linux/slab.h> #include <linux/workqueue.h> #include <linux/btrfs.h> +#include <linux/sched/mm.h> #include "ctree.h" #include "transaction.h"
@@ -1324,13 +1325,17 @@ int btrfs_add_qgroup_relation(struct btrfs_trans_handle *trans, u64 src,struct btrfs_qgroup *member;struct btrfs_qgroup_list *list;struct ulist *tmp; +unsigned int nofs_flag;int ret =0 ;/* Check the level of src and dst first */ if (btrfs_qgroup_level (src) >=btrfs_qgroup_level (dst))return -EINVAL ; +/* We hold a transaction handle open, must do a NOFS allocation. */ + nofs_flag =memalloc_nofs_save (); tmp =ulist_alloc (GFP_KERNEL ); +memalloc_nofs_restore (nofs_flag);if (!tmp)return -ENOMEM ;
@@ -1387,10 +1392,14 @@ static int __del_qgroup_relation(struct btrfs_trans_handle *trans, u64 src,struct btrfs_qgroup_list *list;struct ulist *tmp;bool found = false; +unsigned int nofs_flag;int ret =0 ;int ret2; +/* We hold a transaction handle open, must do a NOFS allocation. */ + nofs_flag =memalloc_nofs_save (); tmp =ulist_alloc (GFP_KERNEL ); +memalloc_nofs_restore (nofs_flag);if (!tmp)return -ENOMEM ;
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 93/105 drm/i915/gt: Ignore repeated attempts to suspend request flow across reset
In reply to Greg Kroah-HartmanFrom: Chris Wilson <[email protected]>
commit 5419d93ffd774127b195b8543b063b2b4fa5aea9 upstream.
Before reseting the engine, we suspend the execution of the guilty request, so that we can continue execution with a new context while we slowly compress the captured error state for the guilty context. However, if the reset fails, we will promptly attempt to reset the same request again, and discover the ongoing capture. Ignore the second attempt to suspend and capture the same request.
--- drivers/gpu/drm/i915/gt/intel_lrc.c | 3 +++ 1 file changed, 3 insertions(+)
drivers/gpu/drm/i915/gt/intel_lrc.c +3 -0
@@ -2788,6 +2788,9 @@ static void __execlists_hold(struct i915static bool execlists_hold (struct intel_engine_cs *engine,struct i915_request *rq) { +if (i915_request_on_hold (rq)) +return false; +spin_lock_irq (&engine->active.lock);if (i915_request_completed (rq)) {/* too late! */
Greg Kroah-Hartman
maintainerPATCH 8/105 bpftool: Fix error return value in build_btf_type_table
In reply to Greg Kroah-HartmanFrom: Zhen Lei <[email protected]>
[ Upstream commit 68878a5c5b852d17f5827ce8a0f6fbd8b4cdfada ]
An appropriate return value should be set on the failed path.
--- tools/bpf/bpftool/btf.c | 1 + 1 file changed, 1 insertion(+)
tools/bpf/bpftool/btf.c +1 -0
@@ -693,6 +693,7 @@ build_btf_type_table(struct btf_attach_table *tab, enum bpf_obj_type type, obj_node =calloc (1 ,sizeof (*obj_node));if (!obj_node) {p_err ("failed to allocate memory: %s" ,strerror (errno)); + err = -ENOMEM ; goto err_free; }
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 94/105 drm/i915/gt: Cancel the preemption timeout on responding to it
In reply to Greg Kroah-HartmanFrom: Chris Wilson <[email protected]>
commit 0fe8bf4d3edce7aad6c14b9d5d92ff54dc19f0ba upstream.
We currently presume that the engine reset is successful, cancelling the expired preemption timer in the process. However, engine resets can fail, leaving the timeout still pending and we will then respond to the timeout again next time the tasklet fires. What we want is for the failed engine reset to be promoted to a full device reset, which is kicked by the heartbeat once the engine stops processing events.
--- drivers/gpu/drm/i915/gt/intel_lrc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/gt/intel_lrc.c +3 -1
@@ -3172,8 +3172,10 @@ static void execlists_submission_taskletspin_unlock_irqrestore (&engine->active.lock, flags);/* Recheck after serialising with direct-submission */ -if (unlikely (timeout &&preempt_timeout (engine))) +if (unlikely (timeout &&preempt_timeout (engine))) { +cancel_timer (&engine->execlists.preempt);execlists_reset (engine,"preemption time out" ); + } } }
Greg Kroah-Hartman
maintainerPATCH 53/105 ibmvnic: skip tx timeout reset while in resetting
In reply to Greg Kroah-HartmanFrom: Lijun Pan <[email protected]>
[ Upstream commit 855a631a4c11458a9cef1ab79c1530436aa95fae ]
Sometimes it takes longer than 5 seconds (watchdog timeout) to complete failover, migration, and other resets. In stead of scheduling another timeout reset, we wait for the current one to complete.
--- drivers/net/ethernet/ibm/ibmvnic.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/net/ethernet/ibm/ibmvnic.c +6 -0
@@ -2358,6 +2358,12 @@ static void ibmvnic_tx_timeout(struct net_device *dev, unsigned int txqueue) {struct ibmvnic_adapter *adapter =netdev_priv (dev); +if (test_bit (0 , &adapter->resetting)) { +netdev_err (adapter->netdev, +"Adapter is resetting, skip timeout reset\n" ); +return ; + } +ibmvnic_reset (adapter,VNIC_RESET_TIMEOUT ); }
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 81/105 xen: add helpers for caching grant mapping pages
In reply to Greg Kroah-HartmanFrom: Juergen Gross <[email protected]>
commit ca33479cc7be2c9b5f8be078c8bf3ac26b7d6186 upstream.
Instead of having similar helpers in multiple backend drivers use common helpers for caching pages allocated via gnttab_alloc_pages().
Make use of those helpers in blkback and scsiback.
--- drivers/block/xen-blkback/blkback.c | 89 ++++++------------------------------ drivers/block/xen-blkback/common.h | 4 - drivers/block/xen-blkback/xenbus.c | 6 -- drivers/xen/grant-table.c | 72 +++++++++++++++++++++++++++++ drivers/xen/xen-scsiback.c | 60 ++++-------------------- include/xen/grant_table.h | 13 +++++ 6 files changed, 116 insertions(+), 128 deletions(-)
drivers/block/xen-blkback/blkback.c +17 -72
@@ -132,73 +132,12 @@ module_param(log_stats, int, 0644);#define BLKBACK_INVALID_HANDLE (~0) -/* Number of free pages to remove on each call to gnttab_free_pages */ -#define NUM_BATCH_FREE_PAGES 10 -static inline bool persistent_gnt_timeout (struct persistent_gnt *persistent_gnt) {return pgrant_timeout && (jiffies - persistent_gnt->last_used >=HZ * pgrant_timeout); } -static inline int get_free_page (struct xen_blkif_ring *ring,struct page **page) -{ -unsigned long flags; - -spin_lock_irqsave (&ring->free_pages_lock, flags); -if (list_empty (&ring->free_pages)) { -BUG_ON (ring->free_pages_num !=0 ); -spin_unlock_irqrestore (&ring->free_pages_lock, flags); -return gnttab_alloc_pages (1 , page); - } -BUG_ON (ring->free_pages_num ==0 ); - page[0] = list_first_entry(&ring->free_pages, struct page, lru); -list_del (&page[0 ]->lru); - ring->free_pages_num--; -spin_unlock_irqrestore (&ring->free_pages_lock, flags); - -return 0 ; -} - -static inline void put_free_pages (struct xen_blkif_ring *ring,struct page **page, -int num) -{ -unsigned long flags; -int i; - -spin_lock_irqsave (&ring->free_pages_lock, flags); -for (i =0 ; i < num; i++) -list_add (&page[i]->lru, &ring->free_pages); - ring->free_pages_num += num; -spin_unlock_irqrestore (&ring->free_pages_lock, flags); -} - -static inline void shrink_free_pagepool (struct xen_blkif_ring *ring,int num) -{ -/* Remove requested pages in batches of NUM_BATCH_FREE_PAGES */ -struct page *page[NUM_BATCH_FREE_PAGES ]; -unsigned int num_pages =0 ; -unsigned long flags; - -spin_lock_irqsave (&ring->free_pages_lock, flags); -while (ring->free_pages_num > num) { -BUG_ON (list_empty (&ring->free_pages)); - page[num_pages] =list_first_entry (&ring->free_pages, - struct page, lru); -list_del (&page[num_pages]->lru); - ring->free_pages_num--; -if (++num_pages ==NUM_BATCH_FREE_PAGES ) { -spin_unlock_irqrestore (&ring->free_pages_lock, flags); -gnttab_free_pages (num_pages, page); -spin_lock_irqsave (&ring->free_pages_lock, flags); - num_pages =0 ; - } - } -spin_unlock_irqrestore (&ring->free_pages_lock, flags); -if (num_pages !=0 ) -gnttab_free_pages (num_pages, page); -} -#define vaddr (page) ((unsigned long)pfn_to_kaddr(page_to_pfn(page)))static int do_block_io_op (struct xen_blkif_ring *ring,unsigned int *eoi_flags);
@@ -331,7 +270,8 @@ static void free_persistent_gnts(struct unmap_data.count = segs_to_unmap;BUG_ON (gnttab_unmap_refs_sync (&unmap_data)); -put_free_pages (ring, pages, segs_to_unmap); +gnttab_page_cache_put (&ring->free_pages, pages, + segs_to_unmap); segs_to_unmap =0 ; }
@@ -371,7 +311,8 @@ void xen_blkbk_unmap_purged_grants(strucif (++segs_to_unmap ==BLKIF_MAX_SEGMENTS_PER_REQUEST ) { unmap_data.count = segs_to_unmap;BUG_ON (gnttab_unmap_refs_sync (&unmap_data)); -put_free_pages (ring, pages, segs_to_unmap); +gnttab_page_cache_put (&ring->free_pages, pages, + segs_to_unmap); segs_to_unmap =0 ; }kfree (persistent_gnt);
@@ -379,7 +320,7 @@ void xen_blkbk_unmap_purged_grants(strucif (segs_to_unmap >0 ) { unmap_data.count = segs_to_unmap;BUG_ON (gnttab_unmap_refs_sync (&unmap_data)); -put_free_pages (ring, pages, segs_to_unmap); +gnttab_page_cache_put (&ring->free_pages, pages, segs_to_unmap); } }
@@ -664,9 +605,10 @@ purge_gnt_list:/* Shrink the free pages pool if it is too large. */ if (time_before (jiffies, blkif->buffer_squeeze_end)) -shrink_free_pagepool (ring,0 ); +gnttab_page_cache_shrink (&ring->free_pages,0 );else -shrink_free_pagepool (ring, max_buffer_pages); +gnttab_page_cache_shrink (&ring->free_pages, + max_buffer_pages);if (log_stats &&time_after (jiffies, ring->st_print))print_stats (ring);
@@ -697,7 +639,7 @@ void xen_blkbk_free_caches(struct xen_bl ring->persistent_gnt_c =0 ;/* Since we are shutting down remove all pages from the buffer */ -shrink_free_pagepool (ring,0 /* All */ ); +gnttab_page_cache_shrink (&ring->free_pages,0 /* All */ ); } static unsigned int xen_blkbk_unmap_prepare(
@@ -736,7 +678,7 @@ static void xen_blkbk_unmap_and_respond_but is this the best way to deal with this? */ BUG_ON (result); -put_free_pages (ring, data->pages, data->count); +gnttab_page_cache_put (&ring->free_pages, data->pages, data->count);make_response (ring, pending_req->id, pending_req->operation, pending_req->status);free_req (ring, pending_req);
@@ -803,7 +745,8 @@ static void xen_blkbk_unmap(struct xen_bif (invcount) { ret =gnttab_unmap_refs (unmap,NULL , unmap_pages, invcount);BUG_ON (ret); -put_free_pages (ring, unmap_pages, invcount); +gnttab_page_cache_put (&ring->free_pages, unmap_pages, + invcount); } pages += batch; num -= batch;
@@ -850,7 +793,8 @@ again: pages[i]->page = persistent_gnt->page; pages[i]->persistent_gnt = persistent_gnt; }else { -if (get_free_page (ring, &pages[i]->page)) +if (gnttab_page_cache_get (&ring->free_pages, + &pages[i]->page)) goto out_of_memory; addr =vaddr (pages[i]->page); pages_to_gnt[segs_to_map] = pages[i]->page;
@@ -883,7 +827,8 @@ again:BUG_ON (new_map_idx >= segs_to_map);if (unlikely (map[new_map_idx].status !=0 )) {pr_debug ("invalid buffer -- could not remap it\n" ); -put_free_pages (ring, &pages[seg_idx]->page,1 ); +gnttab_page_cache_put (&ring->free_pages, + &pages[seg_idx]->page,1 ); pages[seg_idx]->handle =BLKBACK_INVALID_HANDLE ; ret |=1 ; goto next;
@@ -944,7 +889,7 @@ next: out_of_memory:pr_alert ("%s: out of memory\n" , __func__); -put_free_pages (ring, pages_to_gnt, segs_to_map); +gnttab_page_cache_put (&ring->free_pages, pages_to_gnt, segs_to_map);for (i = last_map; i < num; i++) pages[i]->handle =BLKBACK_INVALID_HANDLE ;return -ENOMEM ;
drivers/block/xen-blkback/common.h +1 -3
@@ -288,9 +288,7 @@ struct xen_blkif_ring {struct work_struct persistent_purge_work;/* Buffer of free pages to map grant refs. */ -spinlock_t free_pages_lock; -int free_pages_num; -struct list_head free_pages; +struct gnttab_page_cache free_pages;struct work_struct free_work;/* Thread shutdown wait queue. */
drivers/block/xen-blkback/xenbus.c +2 -4
@@ -144,8 +144,7 @@ static int xen_blkif_alloc_rings(structINIT_LIST_HEAD (&ring->pending_free);INIT_LIST_HEAD (&ring->persistent_purge_list);INIT_WORK (&ring->persistent_purge_work, xen_blkbk_unmap_purged_grants); -spin_lock_init (&ring->free_pages_lock); -INIT_LIST_HEAD (&ring->free_pages); +gnttab_page_cache_init (&ring->free_pages);spin_lock_init (&ring->pending_free_lock);init_waitqueue_head (&ring->pending_free_wq);
@@ -317,8 +316,7 @@ static int xen_blkif_disconnect(struct xBUG_ON (atomic_read (&ring->persistent_gnt_in_use) !=0 );BUG_ON (!list_empty (&ring->persistent_purge_list));BUG_ON (!RB_EMPTY_ROOT (&ring->persistent_gnts)); -BUG_ON (!list_empty (&ring->free_pages)); -BUG_ON (ring->free_pages_num !=0 ); +BUG_ON (ring->free_pages.num_pages !=0 );BUG_ON (ring->persistent_gnt_c !=0 );WARN_ON (i != (XEN_BLKIF_REQS_PER_PAGE * blkif->nr_ring_pages)); ring->active = false;
drivers/xen/grant-table.c +72 -0
78 lines not on this page · raw message
drivers/xen/xen-scsiback.c +11 -49
114 lines not on this page · raw message
include/xen/grant_table.h +13 -0
@@ -198,6 +198,19 @@ void gnttab_free_auto_xlat_frames(void);int gnttab_alloc_pages (int nr_pages,struct page **pages);void gnttab_free_pages (int nr_pages,struct page **pages); +struct gnttab_page_cache { +spinlock_t lock; +struct list_head pages; +unsigned int num_pages; +}; + +void gnttab_page_cache_init (struct gnttab_page_cache *cache); +int gnttab_page_cache_get (struct gnttab_page_cache *cache,struct page **page); +void gnttab_page_cache_put (struct gnttab_page_cache *cache,struct page **page, +unsigned int num); +void gnttab_page_cache_shrink (struct gnttab_page_cache *cache, +unsigned int num); +#ifdef CONFIG_XEN_GRANT_DMA_ALLOC struct gnttab_dma_alloc_args {/* Device for which DMA memory will be/was allocated. */
Greg Kroah-Hartman
maintainerPATCH 55/105 drm/exynos: depend on COMMON_CLK to fix compile tests
In reply to Greg Kroah-HartmanFrom: Krzysztof Kozlowski <[email protected]>
[ Upstream commit e2d3d2e904ad3d381753798dcd5cae03e3c47242 ]
The Exynos DRM uses Common Clock Framework thus it cannot be built on platforms without it (e.g. compile test on MIPS with RALINK and SOC_RT305X):
/usr/bin/mips-linux-gnu-ld: drivers/gpu/drm/exynos/exynos_mixer.o: in function `mixer_bind':
exynos_mixer.c:(.text+0x958): undefined reference to `clk_set_parent'
--- drivers/gpu/drm/exynos/Kconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/exynos/Kconfig +2 -1
@@ -1,7 +1,8 @@ # SPDX-License-Identifier: GPL-2.0-only config DRM_EXYNOS tristate "DRM Support for Samsung SoC Exynos Series" - depends on OF && DRM && (ARCH_S3C64XX || ARCH_S5PV210 || ARCH_EXYNOS || ARCH_MULTIPLATFORM || COMPILE_TEST) + depends on OF && DRM && COMMON_CLK + depends on ARCH_S3C64XX || ARCH_S5PV210 || ARCH_EXYNOS || ARCH_MULTIPLATFORM || COMPILE_TEST depends on MMU select DRM_KMS_HELPER select VIDEOMODE_HELPERS
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 82/105 xen: dont use page->lru for ZONE_DEVICE memory
In reply to Greg Kroah-HartmanFrom: Juergen Gross <[email protected]>
commit ee32f32335e8c7f6154bf397f4ac9b6175b488a8 upstream.
Commit 9e2369c06c8a18 ("xen: add helpers to allocate unpopulated memory") introduced usage of ZONE_DEVICE memory for foreign memory mappings.
Unfortunately this collides with using page->lru for Xen backend private page caches.
Fix that by using page->zone_device_data instead.
--- drivers/xen/grant-table.c | 65 +++++++++++++++++++++++++++++++++++----- drivers/xen/unpopulated-alloc.c | 20 ++++++------ include/xen/grant_table.h | 4 ++ 3 files changed, 73 insertions(+), 16 deletions(-)
drivers/xen/grant-table.c +58 -7
@@ -813,10 +813,63 @@ int gnttab_alloc_pages(int nr_pages, str }EXPORT_SYMBOL_GPL (gnttab_alloc_pages); +#ifdef CONFIG_XEN_UNPOPULATED_ALLOC +static inline void cache_init (struct gnttab_page_cache *cache) +{ + cache->pages =NULL ; +} + +static inline bool cache_empty (struct gnttab_page_cache *cache) +{ +return !cache->pages; +} + +static inline struct page *cache_deq (struct gnttab_page_cache *cache) +{ +struct page *page; + + page = cache->pages; + cache->pages = page->zone_device_data; + +return page; +} + +static inline void cache_enq (struct gnttab_page_cache *cache,struct page *page) +{ + page->zone_device_data = cache->pages; + cache->pages = page; +} +#else +static inline void cache_init (struct gnttab_page_cache *cache) +{ +INIT_LIST_HEAD (&cache->pages); +} + +static inline bool cache_empty (struct gnttab_page_cache *cache) +{ +return list_empty (&cache->pages); +} + +static inline struct page *cache_deq (struct gnttab_page_cache *cache) +{ +struct page *page; + + page = list_first_entry(&cache->pages, struct page, lru); +list_del (&page->lru); + +return page; +} + +static inline void cache_enq (struct gnttab_page_cache *cache,struct page *page) +{ +list_add (&page->lru, &cache->pages); +} +#endif +void gnttab_page_cache_init (struct gnttab_page_cache *cache) {spin_lock_init (&cache->lock); -INIT_LIST_HEAD (&cache->pages); +cache_init (cache); cache->num_pages =0 ; }EXPORT_SYMBOL_GPL (gnttab_page_cache_init);
@@ -827,13 +880,12 @@ int gnttab_page_cache_get(struct gnttab_spin_lock_irqsave (&cache->lock, flags); -if (list_empty (&cache->pages)) { +if (cache_empty (cache)) {spin_unlock_irqrestore (&cache->lock, flags);return gnttab_alloc_pages (1 , page); } - page[0] = list_first_entry(&cache->pages, struct page, lru); -list_del (&page[0 ]->lru); + page[0 ] =cache_deq (cache); cache->num_pages--;spin_unlock_irqrestore (&cache->lock, flags);
@@ -851,7 +903,7 @@ void gnttab_page_cache_put(struct gnttabspin_lock_irqsave (&cache->lock, flags);for (i =0 ; i < num; i++) -list_add (&page[i]->lru, &cache->pages); +cache_enq (cache, page[i]); cache->num_pages += num;spin_unlock_irqrestore (&cache->lock, flags);
@@ -867,8 +919,7 @@ void gnttab_page_cache_shrink(struct gntspin_lock_irqsave (&cache->lock, flags);while (cache->num_pages > num) { - page[i] = list_first_entry(&cache->pages, struct page, lru); -list_del (&page[i]->lru); + page[i] =cache_deq (cache); cache->num_pages--;if (++i ==ARRAY_SIZE (page)) {spin_unlock_irqrestore (&cache->lock, flags);
drivers/xen/unpopulated-alloc.c +11 -9
@@ -12,7 +12,7 @@#include <xen/xen.h> static DEFINE_MUTEX (list_lock); -static LIST_HEAD (page_list); +static struct page *page_list;static unsigned int list_count;static int fill_list (unsigned int nr_pages)
@@ -75,7 +75,8 @@ static int fill_list(unsigned int nr_pagstruct page *pg =virt_to_page (vaddr +PAGE_SIZE * i);BUG_ON (!virt_addr_valid (vaddr +PAGE_SIZE * i)); -list_add (&pg->lru, &page_list); + pg->zone_device_data = page_list; + page_list = pg; list_count++; }
@@ -101,12 +102,10 @@ int xen_alloc_unpopulated_pages(unsigned }for (i =0 ; i < nr_pages; i++) { -struct page *pg =list_first_entry_or_null (&page_list, - struct page, - lru); +struct page *pg = page_list;BUG_ON (!pg); -list_del (&pg->lru); + page_list = pg->zone_device_data; list_count--; pages[i] = pg;
@@ -117,7 +116,8 @@ int xen_alloc_unpopulated_pages(unsignedunsigned int j;for (j =0 ; j <= i; j++) { -list_add (&pages[j]->lru, &page_list); + pages[j]->zone_device_data = page_list; + page_list = pages[j]; list_count++; } goto out;
@@ -143,7 +143,8 @@ void xen_free_unpopulated_pages(unsignedmutex_lock (&list_lock);for (i =0 ; i < nr_pages; i++) { -list_add (&pages[i]->lru, &page_list); + pages[i]->zone_device_data = page_list; + page_list = pages[i]; list_count++; }mutex_unlock (&list_lock);
@@ -172,7 +173,8 @@ static int __init init(void)struct page *pg =pfn_to_page (xen_extra_mem[i].start_pfn + j); -list_add (&pg->lru, &page_list); + pg->zone_device_data = page_list; + page_list = pg; list_count++; } }
include/xen/grant_table.h +4 -0
@@ -200,7 +200,11 @@ void gnttab_free_pages(int nr_pages, strstruct gnttab_page_cache {spinlock_t lock; +#ifdef CONFIG_XEN_UNPOPULATED_ALLOC +struct page *pages; +#else struct list_head pages; +#endif unsigned int num_pages; };
Greg Kroah-Hartman
maintainerPATCH 80/105 ktest.pl: Fix incorrect reboot for grub2bls
In reply to Greg Kroah-HartmanFrom: Libo Chen <[email protected]>
commit 271e0c9dce1b02a825b3cc1a7aa1fab7c381d44b upstream.
This issue was first noticed when I was testing different kernels on Oracle Linux 8 which as Fedora 30+ adopts BLS as default. Even though a kernel entry was added successfully and the index of that kernel entry was retrieved correctly, ktest still wouldn't reboot the system into user-specified kernel.
The bug was spotted in subroutine reboot_to where the if-statement never checks for REBOOT_TYPE "grub2bls", therefore the desired entry will not be set for the next boot.
Add a check for "grub2bls" so that $grub_reboot $grub_number can be run before a reboot if REBOOT_TYPE is "grub2bls" then we can boot to the correct kernel.
--- tools/testing/ktest/ktest.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/ktest/ktest.pl +1 -1
@@ -2040,7 +2040,7 @@ sub reboot_to { if ($reboot_type eq "grub") { run_ssh "'(echo \"savedefault --default=$grub_number --once\" | grub --batch)'"; - } elsif ($reboot_type eq "grub2") { + } elsif (($reboot_type eq "grub2") or ($reboot_type eq "grub2bls")) { run_ssh "$grub_reboot $grub_number"; } elsif ($reboot_type eq "syslinux") { run_ssh "$syslinux --once \\\"$syslinux_label\\\" $syslinux_path";
Greg Kroah-Hartman
maintainerPATCH 74/105 s390: fix irq state tracing
In reply to Greg Kroah-HartmanFrom: Heiko Carstens <[email protected]>
[ Upstream commit b1cae1f84a0f609a34ebcaa087fbecef32f69882 ]
With commit 58c644ba512c ("sched/idle: Fix arch_cpu_idle() vs tracing") common code calls arch_cpu_idle() with a lockdep state that tells irqs are on.
This doesn't work very well for s390: psw_idle() will enable interrupts to wait for an interrupt. As soon as an interrupt occurs the interrupt handler will verify if the old context was psw_idle(). If that is the case the interrupt enablement bits in the old program status word will be cleared.
A subsequent test in both the external as well as the io interrupt handler checks if in the old context interrupts were enabled. Due to the above patching of the old program status word it is assumed the old context had interrupts disabled, and therefore a call to TRACE_IRQS_OFF (aka trace_hardirqs_off_caller) is skipped. Which in turn makes lockdep incorrectly "think" that interrupts are enabled within the interrupt handler.
Fix this by unconditionally calling TRACE_IRQS_OFF when entering interrupt handlers. Also call unconditionally TRACE_IRQS_ON when leaving interrupts handlers.
This leaves the special psw_idle() case, which now returns with interrupts disabled, but has an "irqs on" lockdep state. So callers of psw_idle() must adjust the state on their own, if required. This is currently only __udelay_disabled().
--- arch/s390/kernel/entry.S | 15 --------------- arch/s390/lib/delay.c | 5 ++--- 2 files changed, 2 insertions(+), 18 deletions(-)
arch/s390/kernel/entry.S +0 -15
@@ -765,12 +765,7 @@ ENTRY(io_int_handler) xc __PT_FLAGS(8,%r11),__PT_FLAGS(%r11) TSTMSK __LC_CPU_FLAGS,_CIF_IGNORE_IRQ jo .Lio_restore -#if IS_ENABLED(CONFIG_TRACE_IRQFLAGS) - tmhh %r8,0x300 - jz 1f TRACE_IRQS_OFF -1: -#endif xc __SF_BACKCHAIN(8,%r15),__SF_BACKCHAIN(%r15) .Lio_loop: lgr %r2,%r11 # pass pointer to pt_regs
@@ -793,12 +788,7 @@ ENTRY(io_int_handler) TSTMSK __LC_CPU_FLAGS,_CIF_WORK jnz .Lio_work .Lio_restore: -#if IS_ENABLED(CONFIG_TRACE_IRQFLAGS) - tm __PT_PSW(%r11),3 - jno 0f TRACE_IRQS_ON -0: -#endif lg %r14,__LC_VDSO_PER_CPU mvc __LC_RETURN_PSW(16),__PT_PSW(%r11) tm __PT_PSW+1(%r11),0x01 # returning to user ?
@@ -980,12 +970,7 @@ ENTRY(ext_int_handler) xc __PT_FLAGS(8,%r11),__PT_FLAGS(%r11) TSTMSK __LC_CPU_FLAGS,_CIF_IGNORE_IRQ jo .Lio_restore -#if IS_ENABLED(CONFIG_TRACE_IRQFLAGS) - tmhh %r8,0x300 - jz 1f TRACE_IRQS_OFF -1: -#endif xc __SF_BACKCHAIN(8,%r15),__SF_BACKCHAIN(%r15) lgr %r2,%r11 # pass pointer to pt_regs lghi %r3,EXT_INTERRUPT
arch/s390/lib/delay.c +2 -3
@@ -33,7 +33,7 @@ EXPORT_SYMBOL(__delay);static void __udelay_disabled (unsigned long long usecs) { -unsigned long cr0, cr0_new, psw_mask, flags; +unsigned long cr0, cr0_new, psw_mask;struct s390_idle_data idle;u64 end;
@@ -45,9 +45,8 @@ static void __udelay_disabled(unsigned long long usecs) psw_mask =__extract_psw () |PSW_MASK_EXT |PSW_MASK_WAIT ;set_clock_comparator (end);set_cpu_flag (CIF_IGNORE_IRQ ); -local_irq_save (flags);psw_idle (&idle, psw_mask); -local_irq_restore (flags); +trace_hardirqs_off ();clear_cpu_flag (CIF_IGNORE_IRQ );set_clock_comparator (S390_lowcore.clock_comparator);__ctl_load (cr0,0 ,0 );
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 76/105 media: pulse8-cec: fix duplicate free at disconnect or probe error
In reply to Greg Kroah-HartmanFrom: Hans Verkuil <[email protected]>
commit 024e01dead12c2b9fbe31216f2099401ebb78a4a upstream.
Commit 601282d65b96 ("media: pulse8-cec: use adap_free callback") used the adap_free callback to clean up on disconnect. What I forgot was that in the probe it will call cec_delete_adapter() followed by kfree(pulse8) if an error occurs. But by using the adap_free callback, cec_delete_adapter() is already freeing the pulse8 struct.
This wasn't noticed since normally the probe works fine, but Pulse-Eight published a new firmware version that caused a probe error, so now it hits this bug. This affects firmware version 12, but probably any version >= 10.
Commit aa9eda76129c ("media: pulse8-cec: close serio in disconnect, not adap_free") made this worse by adding the line 'pulse8->serio = NULL' right after the call to cec_unregister_adapter in the disconnect() function. Unfortunately, cec_unregister_adapter will typically call cec_delete_adapter (unless a filehandle to the cec device is still open), which frees the pulse8 struct. So now it will also crash on a simple unplug of the Pulse-Eight device.
With this fix both the unplug issue and a probe() error situation are handled correctly again.
It will still fail to probe() with a v12 firmware, that's something to look at separately.
--- drivers/media/cec/usb/pulse8/pulse8-cec.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-)
drivers/media/cec/usb/pulse8/pulse8-cec.c +4 -5
@@ -650,7 +650,6 @@ static void pulse8_disconnect(struct serstruct pulse8 *pulse8 =serio_get_drvdata (serio);cec_unregister_adapter (pulse8->adap); - pulse8->serio =NULL ;serio_set_drvdata (serio,NULL );serio_close (serio); }
@@ -830,8 +829,10 @@ static int pulse8_connect(struct serio * pulse8->adap =cec_allocate_adapter (&pulse8_cec_adap_ops, pulse8,dev_name (&serio->dev), caps,1 ); err =PTR_ERR_OR_ZERO (pulse8->adap); -if (err <0 ) - goto free_device; +if (err <0 ) { +kfree (pulse8); +return err; + } pulse8->dev = &serio->dev;serio_set_drvdata (serio, pulse8);
@@ -874,8 +875,6 @@ close_serio:serio_close (serio); delete_adap:cec_delete_adapter (pulse8->adap); -free_device: -kfree (pulse8);return err; }
Greg Kroah-Hartman
maintainerPATCH 79/105 mmc: mediatek: Extend recheck_sdio_irq fix to more variants
In reply to Greg Kroah-HartmanFrom: yong mao <[email protected]>
commit 903a72eca4abf241293dcc1385896fd428e15fe9 upstream.
The SDIO recheck fix is required for more of the supported variants. Let's add it to those that needs it.
--- drivers/mmc/host/mtk-sd.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)
drivers/mmc/host/mtk-sd.c +6 -5
@@ -447,7 +447,7 @@ struct msdc_host {static const struct mtk_mmc_compatible mt8135_compat = { .clk_div_bits =8 , - .recheck_sdio_irq = false, + .recheck_sdio_irq = true, .hs400_tune = false, .pad_tune_reg =MSDC_PAD_TUNE , .async_fifo = false,
@@ -486,7 +486,7 @@ static const struct mtk_mmc_compatible mstatic const struct mtk_mmc_compatible mt2701_compat = { .clk_div_bits =12 , - .recheck_sdio_irq = false, + .recheck_sdio_irq = true, .hs400_tune = false, .pad_tune_reg =MSDC_PAD_TUNE0 , .async_fifo = true,
@@ -512,7 +512,7 @@ static const struct mtk_mmc_compatible mstatic const struct mtk_mmc_compatible mt7622_compat = { .clk_div_bits =12 , - .recheck_sdio_irq = false, + .recheck_sdio_irq = true, .hs400_tune = false, .pad_tune_reg =MSDC_PAD_TUNE0 , .async_fifo = true,
@@ -525,7 +525,7 @@ static const struct mtk_mmc_compatible mstatic const struct mtk_mmc_compatible mt8516_compat = { .clk_div_bits =12 , - .recheck_sdio_irq = false, + .recheck_sdio_irq = true, .hs400_tune = false, .pad_tune_reg =MSDC_PAD_TUNE0 , .async_fifo = true,
@@ -536,7 +536,7 @@ static const struct mtk_mmc_compatible mstatic const struct mtk_mmc_compatible mt7620_compat = { .clk_div_bits =8 , - .recheck_sdio_irq = false, + .recheck_sdio_irq = true, .hs400_tune = false, .pad_tune_reg =MSDC_PAD_TUNE , .async_fifo = false,
@@ -549,6 +549,7 @@ static const struct mtk_mmc_compatible mstatic const struct mtk_mmc_compatible mt6779_compat = { .clk_div_bits =12 , + .recheck_sdio_irq = false, .hs400_tune = false, .pad_tune_reg =MSDC_PAD_TUNE0 , .async_fifo = true,
Greg Kroah-Hartman
maintainerPATCH 77/105 media: pulse8-cec: add support for FW v10 and up
In reply to Greg Kroah-HartmanFrom: Hans Verkuil <[email protected]>
commit 45ba1c0ba3e589ad3ef0d0603c822eb27ea16563 upstream.
Starting with firmware version 10 the GET/SET_HDMI_VERSION message was removed and GET/SET_AUTO_POWER_ON was added.
The removal of GET/SET_HDMI_VERSION caused the probe of the Pulse-Eight to fail. Add a version check to handle this gracefully.
Also show (but do not set) the Auto Power On value.
--- drivers/media/cec/usb/pulse8/pulse8-cec.c | 43 ++++++++++++++++++++---------- 1 file changed, 30 insertions(+), 13 deletions(-)
drivers/media/cec/usb/pulse8/pulse8-cec.c +30 -13
@@ -88,13 +88,15 @@ enum pulse8_msgcodes {MSGCODE_SET_PHYSICAL_ADDRESS ,/* 0x20 */ MSGCODE_GET_DEVICE_TYPE ,MSGCODE_SET_DEVICE_TYPE , -MSGCODE_GET_HDMI_VERSION , +MSGCODE_GET_HDMI_VERSION ,/* Removed in FW >= 10 */ MSGCODE_SET_HDMI_VERSION ,MSGCODE_GET_OSD_NAME ,MSGCODE_SET_OSD_NAME ,MSGCODE_WRITE_EEPROM ,MSGCODE_GET_ADAPTER_TYPE ,/* 0x28 */ MSGCODE_SET_ACTIVE_SOURCE , +MSGCODE_GET_AUTO_POWER_ON ,/* New for FW >= 10 */ +MSGCODE_SET_AUTO_POWER_ON ,MSGCODE_FRAME_EOM =0x80 , MSGCODE_FRAME_ACK = 0x40,
@@ -143,6 +145,8 @@ static const char * const pulse8_msgname"WRITE_EEPROM" ,"GET_ADAPTER_TYPE" ,"SET_ACTIVE_SOURCE" , +"GET_AUTO_POWER_ON" , + "SET_AUTO_POWER_ON", };static const char *pulse8_msgname (u8 cmd)
@@ -579,12 +583,14 @@ static int pulse8_cec_adap_log_addr(struif (err) goto unlock; - cmd[0 ] =MSGCODE_SET_HDMI_VERSION ; - cmd[1 ] = adap->log_addrs.cec_version; - err =pulse8_send_and_wait (pulse8, cmd,2 , -MSGCODE_COMMAND_ACCEPTED ,0 ); -if (err) - goto unlock; +if (pulse8->vers <10 ) { + cmd[0 ] =MSGCODE_SET_HDMI_VERSION ; + cmd[1 ] = adap->log_addrs.cec_version; + err =pulse8_send_and_wait (pulse8, cmd,2 , +MSGCODE_COMMAND_ACCEPTED ,0 ); +if (err) + goto unlock; + }if (adap->log_addrs.osd_name[0 ]) {size_t osd_len =strlen (adap->log_addrs.osd_name);
@@ -691,6 +697,14 @@ static int pulse8_setup(struct pulse8 *pdev_dbg (pulse8->dev,"Autonomous mode: %s" , data[0 ] ?"on" :"off" ); +if (pulse8->vers >=10 ) { + cmd[0 ] =MSGCODE_GET_AUTO_POWER_ON ; + err =pulse8_send_and_wait (pulse8, cmd,1 , cmd[0 ],1 ); +if (!err) +dev_dbg (pulse8->dev,"Auto Power On: %s" , + data[0 ] ?"on" :"off" ); + } + cmd[0 ] =MSGCODE_GET_DEVICE_TYPE ; err =pulse8_send_and_wait (pulse8, cmd,1 , cmd[0 ],1 );if (err)
@@ -752,12 +766,15 @@ static int pulse8_setup(struct pulse8 *pdev_dbg (pulse8->dev,"Physical address: %x.%x.%x.%x\n" ,cec_phys_addr_exp (*pa)); - cmd[0 ] =MSGCODE_GET_HDMI_VERSION ; - err =pulse8_send_and_wait (pulse8, cmd,1 , cmd[0 ],1 ); -if (err) -return err; - log_addrs->cec_version = data[0 ]; -dev_dbg (pulse8->dev,"CEC version: %d\n" , log_addrs->cec_version); + log_addrs->cec_version =CEC_OP_CEC_VERSION_1_4 ; +if (pulse8->vers <10 ) { + cmd[0 ] =MSGCODE_GET_HDMI_VERSION ; + err =pulse8_send_and_wait (pulse8, cmd,1 , cmd[0 ],1 ); +if (err) +return err; + log_addrs->cec_version = data[0 ]; +dev_dbg (pulse8->dev,"CEC version: %d\n" , log_addrs->cec_version); + } cmd[0 ] =MSGCODE_GET_OSD_NAME ; err =pulse8_send_and_wait (pulse8, cmd,1 , cmd[0 ],0 );
Greg Kroah-Hartman
maintainerPATCH 78/105 mmc: mediatek: Fix system suspend/resume support for CQHCI
In reply to Greg Kroah-HartmanFrom: Wenbin Mei <[email protected]>
commit c0a2074ac575fff2848c8ef804bdc8590466c36c upstream.
Before we got these errors on MT8192 platform:
[ 59.153891] Restarting tasks ... [ 59.154540] done. [ 59.159175] PM: suspend exit [ 59.218724] mtk-msdc 11f60000.mmc: phase: [map:fffffffe] [maxlen:31] [final:16] [ 119.776083] mmc0: cqhci: timeout for tag 9 [ 119.780196] mmc0: cqhci: ============ CQHCI REGISTER DUMP =========== [ 119.786709] mmc0: cqhci: Caps: 0x100020b6 | Version: 0x00000510 [ 119.793225] mmc0: cqhci: Config: 0x00000101 | Control: 0x00000000 [ 119.799706] mmc0: cqhci: Int stat: 0x00000000 | Int enab: 0x00000000 [ 119.806177] mmc0: cqhci: Int sig: 0x00000000 | Int Coal: 0x00000000 [ 119.812670] mmc0: cqhci: TDL base: 0x00000000 | TDL up32: 0x00000000 [ 119.819149] mmc0: cqhci: Doorbell: 0x003ffc00 | TCN: 0x00000200 [ 119.825656] mmc0: cqhci: Dev queue: 0x00000000 | Dev Pend: 0x00000000 [ 119.832155] mmc0: cqhci: Task clr: 0x00000000 | SSC1: 0x00001000 [ 119.838627] mmc0: cqhci: SSC2: 0x00000000 | DCMD rsp: 0x00000000 [ 119.845174] mmc0: cqhci: RED mask: 0xfdf9a080 | TERRI: 0x0000891c [ 119.851654] mmc0: cqhci: Resp idx: 0x00000000 | Resp arg: 0x00000000 [ 119.865773] mmc0: cqhci: : =========================================== [ 119.872358] mmc0: running CQE recovery
Quoted 1 line
From these logs, we found TDL base was back to the default value.
After suspend, the mmc host is powered off by HW, and bring CQE register to the default value, so we add system suspend/resume interface, then bring CQE to deactivated state before suspend, it will be enabled by CQE first request after resume.
--- drivers/mmc/host/mtk-sd.c | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-)
drivers/mmc/host/mtk-sd.c +20 -2
@@ -2654,11 +2654,29 @@ static int msdc_runtime_resume(struct demsdc_restore_reg (host);return 0 ; } + +static int msdc_suspend (struct device *dev) +{ +struct mmc_host *mmc =dev_get_drvdata (dev); +int ret; + +if (mmc->caps2 &MMC_CAP2_CQE ) { + ret =cqhci_suspend (mmc); +if (ret) +return ret; + } + +return pm_runtime_force_suspend (dev); +} + +static int msdc_resume (struct device *dev) +{ +return pm_runtime_force_resume (dev); +}#endif static const struct dev_pm_ops msdc_dev_pm_ops = { - SET_SYSTEM_SLEEP_PM_OPS(pm_runtime_force_suspend, - pm_runtime_force_resume) + SET_SYSTEM_SLEEP_PM_OPS(msdc_suspend, msdc_resume)SET_RUNTIME_PM_OPS (msdc_runtime_suspend, msdc_runtime_resume,NULL ) };
Greg Kroah-Hartman
maintainerPATCH 73/105 can: m_can: m_can_dev_setup(): add support for bosch mcan version 3.3.0
In reply to Greg Kroah-HartmanFrom: Pankaj Sharma <[email protected]>
[ Upstream commit 5c7d55bded77da6db7c5d249610e3a2eed730b3c ]
Add support for mcan bit timing and control mode according to bosch mcan IP version 3.3.0. The mcan version read from the Core Release field of CREL register would be 33. Accordingly the properties are to be set for mcan v3.3.0
--- drivers/net/can/m_can/m_can.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/net/can/m_can/m_can.c +2 -0
@@ -1385,6 +1385,8 @@ static int m_can_dev_setup(struct m_can_classdev *m_can_dev) &m_can_data_bittiming_const_31X;break ;case 32 : +case 33 : +/* Support both MCAN version v3.2.x and v3.3.0 */ m_can_dev->can.bittiming_const = m_can_dev->bit_timing ? m_can_dev->bit_timing : &m_can_bittiming_const_31X;
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 63/105 intel_idle: Fix intel_idle() vs tracing
In reply to Greg Kroah-HartmanFrom: Peter Zijlstra <[email protected]>
[ Upstream commit 6e1d2bc675bd57640f5658a4a657ae488db4c204 ]
cpuidle->enter() callbacks should not call into tracing because RCU has already been disabled. Instead of doing the broadcast thing itself, simply advertise to the cpuidle core that those states stop the timer.
--- drivers/idle/intel_idle.c | 37 ++++++++++++++++++++----------------- 1 file changed, 20 insertions(+), 17 deletions(-)
drivers/idle/intel_idle.c +20 -17
@@ -122,26 +122,9 @@ static __cpuidle int intel_idle(struct cpuidle_device *dev,struct cpuidle_state *state = &drv->states[index];unsigned long eax =flg2MWAIT (state->flags);unsigned long ecx =1 ;/* break on interrupt flag */ -bool tick; - -if (!static_cpu_has (X86_FEATURE_ARAT )) { -/* -* Switch over to one-shot tick broadcast if the target C-state -* is deeper than C1. -*/ -if ((eax >>MWAIT_SUBSTATE_SIZE ) &MWAIT_CSTATE_MASK ) { - tick = true; -tick_broadcast_enter (); - }else { - tick = false; - } - }mwait_idle_with_hints (eax, ecx); -if (!static_cpu_has (X86_FEATURE_ARAT ) && tick) -tick_broadcast_exit (); -return index; }
@@ -1223,6 +1206,20 @@ static bool __init intel_idle_acpi_cst_extract(void)return false; } +static bool __init intel_idle_state_needs_timer_stop (struct cpuidle_state *state) +{ +unsigned long eax =flg2MWAIT (state->flags); + +if (boot_cpu_has (X86_FEATURE_ARAT )) +return false; + +/* +* Switch over to one-shot tick broadcast if the target C-state +* is deeper than C1. +*/ +return !!((eax >>MWAIT_SUBSTATE_SIZE ) &MWAIT_CSTATE_MASK ); +} +static void __init intel_idle_init_cstates_acpi (struct cpuidle_driver *drv) {int cstate, limit =min_t (int,CPUIDLE_STATE_MAX , acpi_state_table.count);
@@ -1265,6 +1262,9 @@ static void __init intel_idle_init_cstates_acpi(struct cpuidle_driver *drv)if (disabled_states_mask &BIT (cstate)) state->flags |=CPUIDLE_FLAG_OFF ; +if (intel_idle_state_needs_timer_stop (state)) + state->flags |=CPUIDLE_FLAG_TIMER_STOP ; + state->enter = intel_idle; state->enter_s2idle = intel_idle_s2idle; }
@@ -1503,6 +1503,9 @@ static void __init intel_idle_init_cstates_icpu(struct cpuidle_driver *drv) !(cpuidle_state_table[cstate].flags & CPUIDLE_FLAG_ALWAYS_ENABLE))) drv->states[drv->state_count].flags |= CPUIDLE_FLAG_OFF; +if (intel_idle_state_needs_timer_stop (&drv->states[drv->state_count])) + drv->states[drv->state_count].flags |=CPUIDLE_FLAG_TIMER_STOP ; + drv->state_count++; }
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 66/105 platform/x86: thinkpad_acpi: Do not report SW_TABLET_MODE on Yoga 11e
In reply to Greg Kroah-HartmanFrom: Hans de Goede <[email protected]>
[ Upstream commit f2eae1888cf22590c38764b8fa3c989c0283870e ]
The Yoga 11e series has 2 accelerometers described by a BOSC0200 ACPI node. This setup relies on a Windows service which reads both accelerometers and then calculates the angle between the 2 halves to determine laptop / tent / tablet mode and then reports the calculated mode back to the EC by calling special ACPI methods on the BOSC0200 node.
The bmc150 iio driver does not support this (it involves double calculations requiring sqrt and arccos so this really needs to be done in userspace), as a result of this on the Yoga 11e the thinkpad_acpi code always reports SW_TABLET_MODE=0, starting with GNOME 3.38 reporting SW_TABLET_MODE=0 causes GNOME to:
1. Not show the onscreen keyboard when a text-input field is focussed with the touchscreen.
2. Disable accelerometer based auto display-rotation.
This makes sense when in laptop-mode but not when in tablet-mode. But since for the Yoga 11e the thinkpad_acpi code always reports SW_TABLET_MODE=0, GNOME does not know when the device is in tablet-mode.
Stop reporting the broken (always 0) SW_TABLET_MODE on Yoga 11e models to fix this.
Note there are plans for userspace to support 360 degree hinges style 2-in-1s with 2 accelerometers and figure out the mode by itself, see:
https://gitlab.freedesktop.org/hadess/iio-sensor-proxy/-/issues/216
--- drivers/platform/x86/thinkpad_acpi.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
drivers/platform/x86/thinkpad_acpi.c +8 -1
@@ -3214,7 +3214,14 @@ static int hotkey_init_tablet_mode(void) in_tablet_mode =hotkey_gmms_get_tablet_mode (res, &has_tablet_mode); -if (has_tablet_mode) +/* +* The Yoga 11e series has 2 accelerometers described by a +* BOSC0200 ACPI node. This setup relies on a Windows service +* which calls special ACPI methods on this node to report +* the laptop/tent/tablet mode to the EC. The bmc150 iio driver +* does not support this, so skip the hotkey on these models. +*/ +if (has_tablet_mode && !acpi_dev_present ("BOSC0200" ,"1" ,-1 )) tp_features.hotkey_tablet =TP_HOTKEY_TABLET_USES_GMMS ; type ="GMMS" ; }else if (acpi_evalf (hkey_handle, &res,"MHKG" ,"qd" )) {
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 75/105 intel_idle: Build fix
In reply to Greg Kroah-HartmanFrom: Peter Zijlstra <[email protected]>
[ Upstream commit 4d916140bf28ff027997144ea1bb4299e1536f87 ]
Because CONFIG_ soup.
--- drivers/idle/intel_idle.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-)
drivers/idle/intel_idle.c +14 -14
@@ -1136,6 +1136,20 @@ static bool __init intel_idle_max_cstate_reached(int cstate)return false; } +static bool __init intel_idle_state_needs_timer_stop (struct cpuidle_state *state) +{ +unsigned long eax =flg2MWAIT (state->flags); + +if (boot_cpu_has (X86_FEATURE_ARAT )) +return false; + +/* +* Switch over to one-shot tick broadcast if the target C-state +* is deeper than C1. +*/ +return !!((eax >>MWAIT_SUBSTATE_SIZE ) &MWAIT_CSTATE_MASK ); +} +#ifdef CONFIG_ACPI_PROCESSOR_CSTATE #include <acpi/processor.h>
@@ -1206,20 +1220,6 @@ static bool __init intel_idle_acpi_cst_extract(void)return false; } -static bool __init intel_idle_state_needs_timer_stop (struct cpuidle_state *state) -{ -unsigned long eax =flg2MWAIT (state->flags); - -if (boot_cpu_has (X86_FEATURE_ARAT )) -return false; - -/* -* Switch over to one-shot tick broadcast if the target C-state -* is deeper than C1. -*/ -return !!((eax >>MWAIT_SUBSTATE_SIZE ) &MWAIT_CSTATE_MASK ); -} -static void __init intel_idle_init_cstates_acpi (struct cpuidle_driver *drv) {int cstate, limit =min_t (int,CPUIDLE_STATE_MAX , acpi_state_table.count);
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 70/105 platform/x86: intel-vbtn: Support for tablet mode on HP Pavilion 13 x360 PC
In reply to Greg Kroah-HartmanFrom: Max Verevkin <[email protected]>
[ Upstream commit 8b205d3e1bf52ab31cdd5c55f87c87a227793d84 ]
The Pavilion 13 x360 PC has a chassis-type which does not indicate it is a convertible, while it is actually a convertible. Add it to the dmi_switches_allow_list.
--- drivers/platform/x86/intel-vbtn.c | 6 ++++++ 1 file changed, 6 insertions(+)
drivers/platform/x86/intel-vbtn.c +6 -0
@@ -206,6 +206,12 @@ static const struct dmi_system_id dmi_switches_allow_list[] = { DMI_MATCH(DMI_PRODUCT_NAME, "HP Stream x360 Convertible PC 11"), }, }, + { + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"), + DMI_MATCH(DMI_PRODUCT_NAME, "HP Pavilion 13 x360 PC"), + }, + }, {}/* Array terminator */ };
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 52/105 interconnect: qcom: qcs404: Remove GPU and display RPM IDs
In reply to Greg Kroah-HartmanFrom: Georgi Djakov <[email protected]>
[ Upstream commit 7ab1e9117607485df977bb6e271be5c5ad649a4c ]
The following errors are noticed during boot on a QCS404 board:
[ 2.926647] qcom_icc_rpm_smd_send mas 6 error -6 [ 2.934573] qcom_icc_rpm_smd_send mas 8 error -6
These errors show when we try to configure the GPU and display nodes. Since these particular nodes aren't supported on RPM and are purely local, we should just change their mas_rpm_id to -1 to avoid any requests being sent for these master IDs.
--- drivers/interconnect/qcom/qcs404.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/interconnect/qcom/qcs404.c +2 -2
@@ -157,8 +157,8 @@ struct qcom_icc_desc { }DEFINE_QNODE (mas_apps_proc,QCS404_MASTER_AMPSS_M0 ,8 ,0 ,-1 ,QCS404_SLAVE_EBI_CH0 ,QCS404_BIMC_SNOC_SLV ); -DEFINE_QNODE (mas_oxili,QCS404_MASTER_GRAPHICS_3D ,8 ,6 ,-1 ,QCS404_SLAVE_EBI_CH0 ,QCS404_BIMC_SNOC_SLV ); -DEFINE_QNODE (mas_mdp,QCS404_MASTER_MDP_PORT0 ,8 ,8 ,-1 ,QCS404_SLAVE_EBI_CH0 ,QCS404_BIMC_SNOC_SLV ); +DEFINE_QNODE (mas_oxili,QCS404_MASTER_GRAPHICS_3D ,8 ,-1 ,-1 ,QCS404_SLAVE_EBI_CH0 ,QCS404_BIMC_SNOC_SLV ); +DEFINE_QNODE (mas_mdp,QCS404_MASTER_MDP_PORT0 ,8 ,-1 ,-1 ,QCS404_SLAVE_EBI_CH0 ,QCS404_BIMC_SNOC_SLV );DEFINE_QNODE (mas_snoc_bimc_1,QCS404_SNOC_BIMC_1_MAS ,8 ,76 ,-1 ,QCS404_SLAVE_EBI_CH0 );DEFINE_QNODE (mas_tcu_0,QCS404_MASTER_TCU_0 ,8 ,-1 ,-1 ,QCS404_SLAVE_EBI_CH0 ,QCS404_BIMC_SNOC_SLV );DEFINE_QNODE (mas_spdm,QCS404_MASTER_SPDM ,4 ,-1 ,-1 ,QCS404_PNOC_INT_3 );
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 71/105 platform/x86: touchscreen_dmi: Add info for the Predia Basic tablet
In reply to Greg Kroah-HartmanFrom: Hans de Goede <[email protected]>
[ Upstream commit 0f511edc6ac12f1ccf1c6c2d4412f5ed7ba426a6 ]
Add touchscreen info for the Predia Basic tablet.
--- drivers/platform/x86/touchscreen_dmi.c | 27 ++++++++++++++++++++++++++ 1 file changed, 27 insertions(+)
drivers/platform/x86/touchscreen_dmi.c +27 -0
@@ -623,6 +623,23 @@ static const struct ts_dmi_data pov_mobii_wintab_p1006w_v10_data = { .properties = pov_mobii_wintab_p1006w_v10_props, }; +static const struct property_entry predia_basic_props[] = { +PROPERTY_ENTRY_U32 ("touchscreen-min-x" ,3 ), +PROPERTY_ENTRY_U32 ("touchscreen-min-y" ,10 ), +PROPERTY_ENTRY_U32 ("touchscreen-size-x" ,1728 ), +PROPERTY_ENTRY_U32 ("touchscreen-size-y" ,1144 ), +PROPERTY_ENTRY_BOOL ("touchscreen-swapped-x-y" ), +PROPERTY_ENTRY_STRING ("firmware-name" ,"gsl3680-predia-basic.fw" ), +PROPERTY_ENTRY_U32 ("silead,max-fingers" ,10 ), +PROPERTY_ENTRY_BOOL ("silead,home-button" ), + { } +}; + +static const struct ts_dmi_data predia_basic_data = { + .acpi_name ="MSSL1680:00" , + .properties = predia_basic_props, +}; +static const struct property_entry schneider_sct101ctm_props[] = {PROPERTY_ENTRY_U32 ("touchscreen-size-x" ,1715 ),PROPERTY_ENTRY_U32 ("touchscreen-size-y" ,1140 ),
@@ -1109,6 +1126,16 @@ const struct dmi_system_id touchscreen_dmi_table[] = { DMI_MATCH(DMI_BIOS_DATE, "10/24/2014"), }, }, + { +/* Predia Basic tablet) */ + .driver_data = (void *)&predia_basic_data, + .matches = { +DMI_MATCH (DMI_SYS_VENDOR ,"Insyde" ), +DMI_MATCH (DMI_PRODUCT_NAME ,"CherryTrail" ), +/* Above matches are too generic, add bios-version match */ + DMI_MATCH(DMI_BIOS_VERSION, "Mx.WT107.KUBNGEA"), + }, + }, {/* Point of View mobii wintab p800w (v2.1) */ .driver_data = (void *)&pov_mobii_wintab_p800w_v21_data,
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 64/105 arm64: tegra: Disable the ACONNECT for Jetson TX2
In reply to Greg Kroah-HartmanFrom: Jon Hunter <[email protected]>
[ Upstream commit fb319496935b7475a863a00c76895e8bb3216704 ]
Commit ff4c371d2bc0 ("arm64: defconfig: Build ADMA and ACONNECT driver") enable the Tegra ADMA and ACONNECT drivers and this is causing resume from system suspend to fail on Jetson TX2. Resume is failing because the ACONNECT driver is being resumed before the BPMP driver, and the ACONNECT driver is attempting to power on a power-domain that is provided by the BPMP. While a proper fix for the resume sequencing problem is identified, disable the ACONNECT for Jetson TX2 temporarily to avoid breaking system suspend.
Please note that ACONNECT driver is used by the Audio Processing Engine (APE) on Tegra, but because there is no mainline support for APE on Jetson TX2 currently, disabling the ACONNECT does not disable any useful feature at the moment.
--- arch/arm64/boot/dts/nvidia/tegra186-p2771-0000.dts | 12 ------------ 1 file changed, 12 deletions(-)
arch/arm64/boot/dts/nvidia/tegra186-p2771-0000.dts +0 -12
@@ -10,18 +10,6 @@ model = "NVIDIA Jetson TX2 Developer Kit"; compatible = "nvidia,p2771-0000", "nvidia,tegra186"; - aconnect { - status = "okay"; - - dma-controller@2930000 { - status = "okay"; - }; - - interrupt-controller@2a40000 { - status = "okay"; - }; - }; - i2c@3160000 { power-monitor@42 { compatible = "ti,ina3221";
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 69/105 platform/x86: acer-wmi: add automatic keyboard background light toggle key as KEY_LIGHTS_TOGGLE
In reply to Greg Kroah-HartmanFrom: Timo Witte <[email protected]>
[ Upstream commit 9e7a005ad56aa7d6ea5830c5ffcc60bf35de380b ]
Got a dmesg message on my AMD Renoir based Acer laptop:
"acer_wmi: Unknown key number - 0x84" when toggling keyboard background light
--- drivers/platform/x86/acer-wmi.c | 1 + 1 file changed, 1 insertion(+)
drivers/platform/x86/acer-wmi.c +1 -0
@@ -111,6 +111,7 @@ static const struct key_entry acer_wmi_keymap[] __initconst = { {KE_KEY, 0x64, {KEY_SWITCHVIDEOMODE} }, /* Display Switch */ {KE_IGNORE, 0x81, {KEY_SLEEP} }, {KE_KEY, 0x82, {KEY_TOUCHPAD_TOGGLE} }, /* Touch Pad Toggle */ + {KE_IGNORE, 0x84, {KEY_KBDILLUMTOGGLE} }, /* Automatic Keyboard background light toggle */ {KE_KEY, KEY_TOUCHPAD_ON, {KEY_TOUCHPAD_ON} }, {KE_KEY, KEY_TOUCHPAD_OFF, {KEY_TOUCHPAD_OFF} }, {KE_IGNORE, 0x83, {KEY_TOUCHPAD_TOGGLE} },
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 67/105 platform/x86: thinkpad_acpi: Add BAT1 is primary battery quirk for Thinkpad Yoga 11e 4th gen
In reply to Greg Kroah-HartmanFrom: Hans de Goede <[email protected]>
[ Upstream commit c986a7024916c92a775fc8d853fba3cae1d5fde4 ]
The Thinkpad Yoga 11e 4th gen with the N3450 / Celeron CPU only has one battery which is named BAT1 instead of the expected BAT0, add a quirk for this. This fixes not being able to set the charging tresholds on this model; and this alsoe fixes the following errors in dmesg:
ACPI: \_SB_.PCI0.LPCB.EC__.HKEY: BCTG evaluated but flagged as errorthinkpad_acpi: Error probing battery 2
battery: extension failed to load: ThinkPad Battery Extension
battery: extension unregistered: ThinkPad Battery Extension
Note that the added quirk is for the "R0K" BIOS versions which are used on the Thinkpad Yoga 11e 4th gen's with a Celeron CPU, there is a separate "R0L" BIOS for the i3/i5 based versions. This may also need the same quirk, but if that really is necessary is unknown.
--- drivers/platform/x86/thinkpad_acpi.c | 1 + 1 file changed, 1 insertion(+)
drivers/platform/x86/thinkpad_acpi.c +1 -0
@@ -9704,6 +9704,7 @@ static const struct tpacpi_quirk battery_quirk_table[] __initconst = {TPACPI_Q_LNV3 ('R' ,'0' ,'B' , true),/* Thinkpad 11e gen 3 */ TPACPI_Q_LNV3 ('R' ,'0' ,'C' , true),/* Thinkpad 13 */ TPACPI_Q_LNV3 ('R' ,'0' ,'J' , true),/* Thinkpad 13 gen 2 */ + TPACPI_Q_LNV3('R', '0', 'K', true), /* Thinkpad 11e gen 4 celeron BIOS */ };static int __init tpacpi_battery_init (struct ibm_init_struct *ibm)
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 68/105 platform/x86: thinkpad_acpi: Whitelist P15 firmware for dual fan control
In reply to Greg Kroah-HartmanFrom: Matthias Maier <[email protected]>
[ Upstream commit 80a8c3185f5047dc7438ed226b72385bf93b4071 ]
This commit enables dual fan control for the following new Lenovo
models: P15, P15v.
--- drivers/platform/x86/thinkpad_acpi.c | 1 + 1 file changed, 1 insertion(+)
drivers/platform/x86/thinkpad_acpi.c +1 -0
@@ -8777,6 +8777,7 @@ static const struct tpacpi_quirk fan_quirk_table[] __initconst = {TPACPI_Q_LNV3 ('N' ,'2' ,'E' ,TPACPI_FAN_2CTL ),/* P1 / X1 Extreme (1st gen) */ TPACPI_Q_LNV3 ('N' ,'2' ,'O' ,TPACPI_FAN_2CTL ),/* P1 / X1 Extreme (2nd gen) */ TPACPI_Q_LNV3 ('N' ,'2' ,'V' ,TPACPI_FAN_2CTL ),/* P1 / X1 Extreme (3nd gen) */ + TPACPI_Q_LNV3('N', '3', '0', TPACPI_FAN_2CTL), /* P15 (1st gen) / P15v (1st gen) */ };static int __init fan_init (struct ibm_init_struct *iibm)
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 27/105 can: c_can: c_can_power_up(): fix error handling
In reply to Greg Kroah-HartmanFrom: Zhang Qilong <[email protected]>
[ Upstream commit 44cef0c0ffbd8d61143712ce874be68a273b7884 ]
In the error handling in c_can_power_up(), there are two bugs:
1) c_can_pm_runtime_get_sync() will increase usage counter if device is not empty. Forgetting to call c_can_pm_runtime_put_sync() will result in a reference leak here.
2) c_can_reset_ram() operation will set start bit when enable is true. We should clear it in the error handling.
We fix it by adding c_can_pm_runtime_put_sync() for 1), and c_can_reset_ram(enable is false) for 2) in the error handling.
--- drivers/net/can/c_can/c_can.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-)
drivers/net/can/c_can/c_can.c +14 -4
@@ -1304,12 +1304,22 @@ int c_can_power_up(struct net_device *dev) time_after(time_out, jiffies))cpu_relax (); -if (time_after (jiffies, time_out)) -return -ETIMEDOUT ; +if (time_after (jiffies, time_out)) { + ret = -ETIMEDOUT ; + goto err_out; + } ret =c_can_start (dev); -if (!ret) -c_can_irq_control (priv, true); +if (ret) + goto err_out; + +c_can_irq_control (priv, true); + +return 0 ; + +err_out: +c_can_reset_ram (priv, false); +c_can_pm_runtime_put_sync (priv);return ret; }
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 26/105 can: sun4i_can: sun4i_can_err(): dont count arbitration lose as an error
In reply to Greg Kroah-HartmanFrom: Jeroen Hofstee <[email protected]>
[ Upstream commit c2d095eff797813461a426b97242e3ffc50e4134 ]
Losing arbitration is normal in a CAN-bus network, it means that a higher priority frame is being send and the pending message will be retried later. Hence most driver only increment arbitration_lost, but the sun4i driver also incremeants tx_error, causing errors to be reported on a normal functioning CAN-bus. So stop counting them as errors.
--- drivers/net/can/sun4i_can.c | 1 - 1 file changed, 1 deletion(-)
drivers/net/can/sun4i_can.c +0 -1
@@ -604,7 +604,6 @@ static int sun4i_can_err(struct net_device *dev, u8 isrc, u8 status)netdev_dbg (dev,"arbitration lost interrupt\n" ); alc =readl (priv->base +SUN4I_REG_STA_ADDR ); priv->can.can_stats.arbitration_lost++; - stats->tx_errors++;if (likely (skb)) { cf->can_id |=CAN_ERR_LOSTARB ; cf->data[0 ] = (alc >>8 ) &0x1f ;
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 18/105 ibmvnic: delay next reset if hard reset fails
In reply to Greg Kroah-HartmanFrom: Sukadev Bhattiprolu <[email protected]>
[ Upstream commit f15fde9d47b887b406f5e76490d601cfc26643c9 ]
If auto-priority failover is enabled, the backing device needs time to settle if hard resetting fails for any reason. Add a delay of 60 seconds before retrying the hard-reset.
--- drivers/net/ethernet/ibm/ibmvnic.c | 8 ++++++++ 1 file changed, 8 insertions(+)
drivers/net/ethernet/ibm/ibmvnic.c +8 -0
@@ -2243,6 +2243,14 @@ static void __ibmvnic_reset(struct work_struct *work) rc =do_hard_reset (adapter, rwi, reset_state);rtnl_unlock (); } +if (rc) { +/* give backing device time to settle down */ +netdev_dbg (adapter->netdev, +"[S:%d] Hard reset failed, waiting 60 secs\n" , + adapter->state); +set_current_state (TASK_UNINTERRUPTIBLE ); +schedule_timeout (60 *HZ ); + } }else if (!(rwi->reset_reason ==VNIC_RESET_FATAL && adapter->from_passive_init)) { rc =do_reset (adapter, rwi, reset_state);
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 25/105 can: sja1000: sja1000_err(): dont count arbitration lose as an error
In reply to Greg Kroah-HartmanFrom: Jeroen Hofstee <[email protected]>
[ Upstream commit bd0ccb92efb09c7da5b55162b283b42a93539ed7 ]
Losing arbitration is normal in a CAN-bus network, it means that a higher priority frame is being send and the pending message will be retried later. Hence most driver only increment arbitration_lost, but the sja1000 driver also incremeants tx_error, causing errors to be reported on a normal functioning CAN-bus. So stop counting them as errors.
--- drivers/net/can/sja1000/sja1000.c | 1 - 1 file changed, 1 deletion(-)
drivers/net/can/sja1000/sja1000.c +0 -1
@@ -474,7 +474,6 @@ static int sja1000_err(struct net_device *dev, uint8_t isrc, uint8_t status)netdev_dbg (dev,"arbitration lost interrupt\n" ); alc = priv->read_reg (priv,SJA1000_ALC ); priv->can.can_stats.arbitration_lost++; - stats->tx_errors++; cf->can_id |=CAN_ERR_LOSTARB ; cf->data[0 ] = alc &0x1f ; }
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 51/105 interconnect: qcom: msm8916: Remove rpm-ids from non-RPM nodes
In reply to Greg Kroah-HartmanFrom: Georgi Djakov <[email protected]>
[ Upstream commit c497f9322af947204c28292be6f20dd2d97483dd ]
Some nodes are incorrectly marked as RPM-controlled (they have RPM master and slave ids assigned), but are actually controlled by the application CPU instead. The RPM complains when we send requests for resources that it can't control. Let's fix this by replacing the IDs, with the default "-1" in which case no requests are sent.
--- drivers/interconnect/qcom/msm8916.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/interconnect/qcom/msm8916.c +6 -6
@@ -182,7 +182,7 @@ DEFINE_QNODE(mas_pcnoc_sdcc_1, MSM8916_MASTER_SDCC_1, 8, -1, -1, MSM8916_PNOC_INDEFINE_QNODE (mas_pcnoc_sdcc_2,MSM8916_MASTER_SDCC_2 ,8 ,-1 ,-1 ,MSM8916_PNOC_INT_1 );DEFINE_QNODE (mas_qdss_bam,MSM8916_MASTER_QDSS_BAM ,8 ,-1 ,-1 ,MSM8916_SNOC_QDSS_INT );DEFINE_QNODE (mas_qdss_etr,MSM8916_MASTER_QDSS_ETR ,8 ,-1 ,-1 ,MSM8916_SNOC_QDSS_INT ); -DEFINE_QNODE (mas_snoc_cfg,MSM8916_MASTER_SNOC_CFG ,4 ,20 ,-1 ,MSM8916_SNOC_QDSS_INT ); +DEFINE_QNODE (mas_snoc_cfg,MSM8916_MASTER_SNOC_CFG ,4 ,-1 ,-1 ,MSM8916_SNOC_QDSS_INT );DEFINE_QNODE (mas_spdm,MSM8916_MASTER_SPDM ,4 ,-1 ,-1 ,MSM8916_PNOC_MAS_0 );DEFINE_QNODE (mas_tcu0,MSM8916_MASTER_TCU0 ,8 ,-1 ,-1 ,MSM8916_SLAVE_EBI_CH0 ,MSM8916_BIMC_SNOC_MAS ,MSM8916_SLAVE_AMPSS_L2 );DEFINE_QNODE (mas_tcu1,MSM8916_MASTER_TCU1 ,8 ,-1 ,-1 ,MSM8916_SLAVE_EBI_CH0 ,MSM8916_BIMC_SNOC_MAS ,MSM8916_SLAVE_AMPSS_L2 );
@@ -208,14 +208,14 @@ DEFINE_QNODE(pcnoc_snoc_mas, MSM8916_PNOC_SNOC_MAS, 8, 29, -1, MSM8916_PNOC_SNOCDEFINE_QNODE (pcnoc_snoc_slv,MSM8916_PNOC_SNOC_SLV ,8 ,-1 ,45 ,MSM8916_SNOC_INT_0 ,MSM8916_SNOC_INT_BIMC ,MSM8916_SNOC_INT_1 );DEFINE_QNODE (qdss_int,MSM8916_SNOC_QDSS_INT ,8 ,-1 ,-1 ,MSM8916_SNOC_INT_0 ,MSM8916_SNOC_INT_BIMC );DEFINE_QNODE (slv_apps_l2,MSM8916_SLAVE_AMPSS_L2 ,8 ,-1 ,-1 ,0 ); -DEFINE_QNODE (slv_apss,MSM8916_SLAVE_APSS ,4 ,-1 ,20 ,0 ); +DEFINE_QNODE (slv_apss,MSM8916_SLAVE_APSS ,4 ,-1 ,-1 ,0 );DEFINE_QNODE (slv_audio,MSM8916_SLAVE_LPASS ,4 ,-1 ,-1 ,0 );DEFINE_QNODE (slv_bimc_cfg,MSM8916_SLAVE_BIMC_CFG ,4 ,-1 ,-1 ,0 );DEFINE_QNODE (slv_blsp_1,MSM8916_SLAVE_BLSP_1 ,4 ,-1 ,-1 ,0 );DEFINE_QNODE (slv_boot_rom,MSM8916_SLAVE_BOOT_ROM ,4 ,-1 ,-1 ,0 );DEFINE_QNODE (slv_camera_cfg,MSM8916_SLAVE_CAMERA_CFG ,4 ,-1 ,-1 ,0 ); -DEFINE_QNODE (slv_cats_0,MSM8916_SLAVE_CATS_128 ,16 ,-1 ,106 ,0 ); -DEFINE_QNODE (slv_cats_1,MSM8916_SLAVE_OCMEM_64 ,8 ,-1 ,107 ,0 ); +DEFINE_QNODE (slv_cats_0,MSM8916_SLAVE_CATS_128 ,16 ,-1 ,-1 ,0 ); +DEFINE_QNODE (slv_cats_1,MSM8916_SLAVE_OCMEM_64 ,8 ,-1 ,-1 ,0 );DEFINE_QNODE (slv_clk_ctl,MSM8916_SLAVE_CLK_CTL ,4 ,-1 ,-1 ,0 );DEFINE_QNODE (slv_crypto_0_cfg,MSM8916_SLAVE_CRYPTO_0_CFG ,4 ,-1 ,-1 ,0 );DEFINE_QNODE (slv_dehr_cfg,MSM8916_SLAVE_DEHR_CFG ,4 ,-1 ,-1 ,0 );
@@ -239,7 +239,7 @@ DEFINE_QNODE(slv_sdcc_2, MSM8916_SLAVE_SDCC_2, 4, -1, -1, 0);DEFINE_QNODE (slv_security,MSM8916_SLAVE_SECURITY ,4 ,-1 ,-1 ,0 );DEFINE_QNODE (slv_snoc_cfg,MSM8916_SLAVE_SNOC_CFG ,4 ,-1 ,-1 ,0 );DEFINE_QNODE (slv_spdm,MSM8916_SLAVE_SPDM ,4 ,-1 ,-1 ,0 ); -DEFINE_QNODE (slv_srvc_snoc,MSM8916_SLAVE_SRVC_SNOC ,8 ,-1 ,29 ,0 ); +DEFINE_QNODE (slv_srvc_snoc,MSM8916_SLAVE_SRVC_SNOC ,8 ,-1 ,-1 ,0 );DEFINE_QNODE (slv_tcsr,MSM8916_SLAVE_TCSR ,4 ,-1 ,-1 ,0 );DEFINE_QNODE (slv_tlmm,MSM8916_SLAVE_TLMM ,4 ,-1 ,-1 ,0 );DEFINE_QNODE (slv_usb_hs,MSM8916_SLAVE_USB_HS ,4 ,-1 ,-1 ,0 );
@@ -249,7 +249,7 @@ DEFINE_QNODE(snoc_bimc_0_slv, MSM8916_SNOC_BIMC_0_SLV, 8, -1, 24, MSM8916_SLAVE_DEFINE_QNODE (snoc_bimc_1_mas,MSM8916_SNOC_BIMC_1_MAS ,16 ,-1 ,-1 ,MSM8916_SNOC_BIMC_1_SLV );DEFINE_QNODE (snoc_bimc_1_slv,MSM8916_SNOC_BIMC_1_SLV ,8 ,-1 ,-1 ,MSM8916_SLAVE_EBI_CH0 );DEFINE_QNODE (snoc_int_0,MSM8916_SNOC_INT_0 ,8 ,99 ,130 ,MSM8916_SLAVE_QDSS_STM ,MSM8916_SLAVE_IMEM ,MSM8916_SNOC_PNOC_MAS ); -DEFINE_QNODE (snoc_int_1,MSM8916_SNOC_INT_1 ,8 ,100 ,131 ,MSM8916_SLAVE_APSS ,MSM8916_SLAVE_CATS_128 ,MSM8916_SLAVE_OCMEM_64 ); +DEFINE_QNODE (snoc_int_1,MSM8916_SNOC_INT_1 ,8 ,-1 ,-1 ,MSM8916_SLAVE_APSS ,MSM8916_SLAVE_CATS_128 ,MSM8916_SLAVE_OCMEM_64 );DEFINE_QNODE (snoc_int_bimc,MSM8916_SNOC_INT_BIMC ,8 ,101 ,132 ,MSM8916_SNOC_BIMC_0_MAS );DEFINE_QNODE (snoc_pcnoc_mas,MSM8916_SNOC_PNOC_MAS ,8 ,-1 ,-1 ,MSM8916_SNOC_PNOC_SLV );DEFINE_QNODE (snoc_pcnoc_slv,MSM8916_SNOC_PNOC_SLV ,8 ,-1 ,-1 ,MSM8916_PNOC_INT_0 );
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 24/105 can: m_can: tcan4x5x_can_probe(): fix error path: remove erroneous clk_disable_unprepare()
In reply to Greg Kroah-HartmanFrom: Marc Kleine-Budde <[email protected]>
[ Upstream commit ad1f5e826d91d6c27ecd36a607ad7c7f4d0b0733 ]
The clocks mcan_class->cclk and mcan_class->hclk are not prepared by any call during tcan4x5x_can_probe(), so remove erroneous clk_disable_unprepare() on them.
--- drivers/net/can/m_can/tcan4x5x.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-)
drivers/net/can/m_can/tcan4x5x.c +3 -8
@@ -489,18 +489,18 @@ static int tcan4x5x_can_probe(struct spi_device *spi) spi->bits_per_word =32 ; ret =spi_setup (spi);if (ret) - goto out_clk; + goto out_m_can_class_free_dev; priv->regmap =devm_regmap_init (&spi->dev, &tcan4x5x_bus, &spi->dev, &tcan4x5x_regmap);if (IS_ERR (priv->regmap)) { ret =PTR_ERR (priv->regmap); - goto out_clk; + goto out_m_can_class_free_dev; } ret =tcan4x5x_power_enable (priv->power,1 );if (ret) - goto out_clk; + goto out_m_can_class_free_dev; ret =tcan4x5x_parse_config (mcan_class);if (ret)
@@ -519,11 +519,6 @@ static int tcan4x5x_can_probe(struct spi_device *spi) out_power:tcan4x5x_power_enable (priv->power,0 ); -out_clk: -if (!IS_ERR (mcan_class->cclk)) { -clk_disable_unprepare (mcan_class->cclk); -clk_disable_unprepare (mcan_class->hclk); - } out_m_can_class_free_dev:m_can_class_free_dev (mcan_class->net);dev_err (&spi->dev,"Probe failed, err=%d\n" , ret);
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 21/105 ibmvnic: reduce wait for completion time
In reply to Greg Kroah-HartmanFrom: Dany Madden <[email protected]>
[ Upstream commit 98c41f04a67abf5e7f7191d55d286e905d1430ef ]
Reduce the wait time for Command Response Queue response from 30 seconds to 20 seconds, as recommended by VIOS and Power Hypervisor teams.
--- drivers/net/ethernet/ibm/ibmvnic.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/net/ethernet/ibm/ibmvnic.c +3 -3
@@ -846,7 +846,7 @@ static void release_napi(struct ibmvnic_adapter *adapter)static int ibmvnic_login (struct net_device *netdev) {struct ibmvnic_adapter *adapter =netdev_priv (netdev); -unsigned long timeout =msecs_to_jiffies (30000 ); +unsigned long timeout =msecs_to_jiffies (20000 );int retry_count =0 ;int retries =10 ;bool retry;
@@ -950,7 +950,7 @@ static void release_resources(struct ibmvnic_adapter *adapter)static int set_link_state (struct ibmvnic_adapter *adapter,u8 link_state) {struct net_device *netdev = adapter->netdev; -unsigned long timeout =msecs_to_jiffies (30000 ); +unsigned long timeout =msecs_to_jiffies (20000 );union ibmvnic_crq crq;bool resend;int rc;
@@ -5081,7 +5081,7 @@ map_failed:static int ibmvnic_reset_init (struct ibmvnic_adapter *adapter) {struct device *dev = &adapter->vdev->dev; -unsigned long timeout =msecs_to_jiffies (30000 ); +unsigned long timeout =msecs_to_jiffies (20000 );u64 old_num_rx_queues, old_num_tx_queues;int rc;
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 42/105 arm64: dts: rockchip: Reorder LED triggers from mmc devices on rk3399-roc-pc.
In reply to Greg Kroah-HartmanFrom: Markus Reichl <[email protected]>
[ Upstream commit 7327c8b98e2e14c47021eea14d1ab268086a6408 ]
After patch [1] SD-card becomes mmc1 and eMMC becomes mmc2. Correct trigger of LEDs accordingly.
[1]
https://patchwork.kernel.org/patch/11881427
--- arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi +2 -2
@@ -74,14 +74,14 @@ label = "red:diy"; gpios = <&gpio0 RK_PB5 GPIO_ACTIVE_HIGH>; default-state = "off"; - linux,default-trigger = "mmc1"; + linux,default-trigger = "mmc2"; }; yellow_led: led-2 { label = "yellow:yellow-led"; gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_HIGH>; default-state = "off"; - linux,default-trigger = "mmc0"; + linux,default-trigger = "mmc1"; }; };
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 45/105 iwlwifi: mvm: fix kernel panic in case of assert during CSA
In reply to Greg Kroah-HartmanFrom: Sara Sharon <[email protected]>
[ Upstream commit fe56d05ee6c87f6a1a8c7267affd92c9438249cc ]
During CSA, we briefly nullify the phy context, in __iwl_mvm_unassign_vif_chanctx. In case we have a FW assert right after it, it remains NULL though. We end up running into endless loop due to mac80211 trying repeatedly to move us to ASSOC state, and we keep returning -EINVAL. Later down the road we hit a kernel panic.
Detect and avoid this endless loop.
--- drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c +1 -1
@@ -3057,7 +3057,7 @@ static int iwl_mvm_mac_sta_state(struct ieee80211_hw *hw,/* this would be a mac80211 bug ... but don't crash */ if (WARN_ON_ONCE (!mvmvif->phy_ctxt)) -return -EINVAL ; +return test_bit (IWL_MVM_STATUS_HW_RESTART_REQUESTED , &mvm->status) ?0 : -EINVAL ;/* * If we are in a STA removal flow and in DQA mode:
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 44/105 iwlwifi: pcie: set LTR to avoid completion timeout
In reply to Greg Kroah-HartmanFrom: Johannes Berg <[email protected]>
[ Upstream commit edb625208d84aef179e3f16590c1c582fc5fdae6 ]
On some platforms, the preset values aren't correct and then we may get a completion timeout in the firmware. Change the LTR configuration to avoid that. The firmware will do some more complex reinit of this later, but for the boot process we use ~250usec.
--- drivers/net/wireless/intel/iwlwifi/iwl-csr.h | 10 ++++++++++ .../intel/iwlwifi/pcie/ctxt-info-gen3.c | 20 +++++++++++++++++++ 2 files changed, 30 insertions(+)
drivers/net/wireless/intel/iwlwifi/iwl-csr.h +10 -0
@@ -147,6 +147,16 @@#define CSR_MAC_SHADOW_REG_CTL2 (CSR_BASE + 0x0AC)#define CSR_MAC_SHADOW_REG_CTL2_RX_WAKE 0xFFFF +/* LTR control (since IWL_DEVICE_FAMILY_22000) */ +#define CSR_LTR_LONG_VAL_AD (CSR_BASE + 0x0D4) +#define CSR_LTR_LONG_VAL_AD_NO_SNOOP_REQ 0x80000000 +#define CSR_LTR_LONG_VAL_AD_NO_SNOOP_SCALE 0x1c000000 +#define CSR_LTR_LONG_VAL_AD_NO_SNOOP_VAL 0x03ff0000 +#define CSR_LTR_LONG_VAL_AD_SNOOP_REQ 0x00008000 +#define CSR_LTR_LONG_VAL_AD_SNOOP_SCALE 0x00001c00 +#define CSR_LTR_LONG_VAL_AD_SNOOP_VAL 0x000003ff +#define CSR_LTR_LONG_VAL_AD_SCALE_USEC 2 +/* GIO Chicken Bits (PCI Express bus link power management) */ #define CSR_GIO_CHICKEN_BITS (CSR_BASE+0x100)
drivers/net/wireless/intel/iwlwifi/pcie/ctxt-info-gen3.c +20 -0
@@ -252,6 +252,26 @@ int iwl_pcie_ctxt_info_gen3_init(struct iwl_trans *trans,iwl_set_bit (trans,CSR_CTXT_INFO_BOOT_CTRL ,CSR_AUTO_FUNC_BOOT_ENA ); + +if (trans->trans_cfg->device_family ==IWL_DEVICE_FAMILY_AX210 ) { +/* +* The firmware initializes this again later (to a smaller +* value), but for the boot process initialize the LTR to +* ~250 usec. +*/ +u32 val =CSR_LTR_LONG_VAL_AD_NO_SNOOP_REQ | +u32_encode_bits (CSR_LTR_LONG_VAL_AD_SCALE_USEC , +CSR_LTR_LONG_VAL_AD_NO_SNOOP_SCALE ) | +u32_encode_bits (250 , +CSR_LTR_LONG_VAL_AD_NO_SNOOP_VAL ) | +CSR_LTR_LONG_VAL_AD_SNOOP_REQ | +u32_encode_bits (CSR_LTR_LONG_VAL_AD_SCALE_USEC , +CSR_LTR_LONG_VAL_AD_SNOOP_SCALE ) | +u32_encode_bits (250 ,CSR_LTR_LONG_VAL_AD_SNOOP_VAL ); + +iwl_write32 (trans,CSR_LTR_LONG_VAL_AD , val); + } +if (trans->trans_cfg->device_family >=IWL_DEVICE_FAMILY_AX210 )iwl_write_umac_prph (trans,UREG_CPU_INIT_RUN ,1 );else
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 5/105 ASoC: Intel: bytcr_rt5640: Fix HP Pavilion x2 Detachable quirks
In reply to Greg Kroah-HartmanFrom: Hans de Goede <[email protected]>
[ Upstream commit fbdae7d6d04d2db36c687723920f612e93b2cbda ]
The HP Pavilion x2 Detachable line comes in many variants:
1. Bay Trail SoC + AXP288 PMIC, Micro-USB charging (10-k010nz, ...)
DMI_SYS_VENDOR: "Hewlett-Packard"
DMI_PRODUCT_NAME: "HP Pavilion x2 Detachable PC 10"
DMI_BOARD_NAME: "8021"
2. Bay Trail SoC + AXP288 PMIC, Type-C charging (10-n000nd, 10-n010nl, ...)
DMI_SYS_VENDOR: "Hewlett-Packard"
DMI_PRODUCT_NAME: "HP Pavilion x2 Detachable"
DMI_BOARD_NAME: "815D"
3. Cherry Trail SoC + AXP288 PMIC, Type-C charging (10-n101ng, ...)
DMI_SYS_VENDOR: "HP"
DMI_PRODUCT_NAME: "HP Pavilion x2 Detachable"
DMI_BOARD_NAME: "813E"
4. Cherry Trail SoC + TI PMIC, Type-C charging (10-p002nd, 10-p018wm, ...)
DMI_SYS_VENDOR: "HP"
DMI_PRODUCT_NAME: "HP x2 Detachable 10-p0XX"
DMI_BOARD_NAME: "827C"
5. Cherry Trail SoC + TI PMIC, Type-C charging (x2-210-g2, ...)
DMI_SYS_VENDOR: "HP"
DMI_PRODUCT_NAME: "HP x2 210 G2"
DMI_BOARD_NAME: "82F4"
Variant 1 needs the exact same quirk as variant 2, so relax the DMI check for the existing quirk a bit so that it matches both variant 1 and 2 (note the other variants will still not match).
Variant 2 already has an existing quirk (which now also matches variant 1)
Variant 3 uses a cx2072x codec, so is not applicable here.
Variant 4 almost works with the defaults, but it also needs a quirk to fix jack-detection, add a new quirk for this.
Variant 5 does use a RT5640 codec (based on old dmesg output), but was otherwise not tested, keep using the defaults for this variant.
--- sound/soc/intel/boards/bytcr_rt5640.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-)
sound/soc/intel/boards/bytcr_rt5640.c +14 -3
@@ -521,10 +521,10 @@ static const struct dmi_system_id byt_rt5640_quirk_table[] = { .driver_data = (void *)(BYT_RT5640_IN1_MAP | BYT_RT5640_MCLK_EN), }, - {/* HP Pavilion x2 10-n000nd */ + {/* HP Pavilion x2 10-k0XX, 10-n0XX */ .matches = { -DMI_EXACT_MATCH (DMI_SYS_VENDOR ,"Hewlett-Packard" ), - DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "HP Pavilion x2 Detachable"), +DMI_MATCH (DMI_SYS_VENDOR ,"Hewlett-Packard" ), + DMI_MATCH(DMI_PRODUCT_NAME, "HP Pavilion x2 Detachable"), }, .driver_data = (void *)(BYT_RT5640_DMIC1_MAP | BYT_RT5640_JD_SRC_JD2_IN4N |
@@ -533,6 +533,17 @@ static const struct dmi_system_id byt_rt5640_quirk_table[] = {BYT_RT5640_SSP0_AIF1 | BYT_RT5640_MCLK_EN), }, + { /* HP Pavilion x2 10-p0XX */ + .matches = { +DMI_MATCH (DMI_SYS_VENDOR ,"HP" ), + DMI_MATCH(DMI_PRODUCT_NAME, "HP x2 Detachable 10-p0XX"), + }, + .driver_data = (void *)(BYT_RT5640_DMIC1_MAP | +BYT_RT5640_JD_SRC_JD1_IN4P | +BYT_RT5640_OVCD_TH_1500UA | +BYT_RT5640_OVCD_SF_0P75 | + BYT_RT5640_MCLK_EN), + }, { /* HP Stream 7 */ .matches = { DMI_EXACT_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 22/105 drm/rockchip: Avoid uninitialized use of endpoint id in LVDS
In reply to Greg Kroah-HartmanFrom: Paul Kocialkowski <[email protected]>
[ Upstream commit aec9fe892812ed10d0bffcf309d2a8fc380d8ce6 ]
In the Rockchip DRM LVDS component driver, the endpoint id provided to drm_of_find_panel_or_bridge is grabbed from the endpoint's reg property.
However, the property may be missing in the case of a single endpoint. Initialize the endpoint_id variable to 0 to avoid using an uninitialized variable in that case.
--- drivers/gpu/drm/rockchip/rockchip_lvds.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/rockchip/rockchip_lvds.c +1 -1
@@ -544,7 +544,7 @@ static int rockchip_lvds_bind(struct device *dev, struct device *master,struct device_node *port, *endpoint;int ret =0 , child_count =0 ;const char *name; -u32 endpoint_id; +u32 endpoint_id =0 ; lvds->drm_dev = drm_dev; port =of_graph_get_port_by_id (dev->of_node,1 );
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 41/105 arm64: dts: rockchip: Assign a fixed index to mmc devices on rk3399 boards.
In reply to Greg Kroah-HartmanFrom: Markus Reichl <[email protected]>
[ Upstream commit 0011c6d182774fc781fb9e115ebe8baa356029ae ]
Recently introduced async probe on mmc devices can shuffle block IDs. Pin them to fixed values to ease booting in environments where UUIDs are not practical. Use newly introduced aliases for mmcblk devices from [1].
[1]
https://patchwork.kernel.org/patch/11747669/
--- arch/arm64/boot/dts/rockchip/rk3399.dtsi | 3 +++ 1 file changed, 3 insertions(+)
arch/arm64/boot/dts/rockchip/rk3399.dtsi +3 -0
@@ -29,6 +29,9 @@ i2c6 = &i2c6; i2c7 = &i2c7; i2c8 = &i2c8; + mmc0 = &sdio0; + mmc1 = &sdmmc; + mmc2 = &sdhci; serial0 = &uart0; serial1 = &uart1; serial2 = &uart2;
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 43/105 iwlwifi: sta: set max HE max A-MPDU according to HE capa
In reply to Greg Kroah-HartmanFrom: Mordechay Goodstein <[email protected]>
[ Upstream commit c8a2e7a29702fe4626b7aa81149b7b7164e20606 ]
Currently, our max tpt is limited to max HT A-MPDU for LB, and max VHT A-MPDU for HB. Configure HE exponent value correctly to achieve HE max A-MPDU, both on LB and HB.
--- .../net/wireless/intel/iwlwifi/fw/api/sta.h | 10 +++++----- drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 18 ++++++++++++++++++ 2 files changed, 23 insertions(+), 5 deletions(-)
drivers/net/wireless/intel/iwlwifi/fw/api/sta.h +5 -5
@@ -5,10 +5,9 @@* * GPL LICENSE SUMMARY * -* Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved. * Copyright(c) 2013 - 2014 Intel Mobile Communications GmbH * Copyright(c) 2016 - 2017 Intel Deutschland GmbH -* Copyright(c) 2018 - 2019 Intel Corporation +* Copyright(c) 2012-2014, 2018 - 2020 Intel Corporation * * This program is free software; you can redistribute it and/or modify * it under the terms of version 2 of the GNU General Public License as
@@ -28,10 +27,9 @@* * BSD LICENSE * -* Copyright(c) 2012 - 2014 Intel Corporation. All rights reserved. * Copyright(c) 2013 - 2014 Intel Mobile Communications GmbH * Copyright(c) 2016 - 2017 Intel Deutschland GmbH -* Copyright(c) 2018 - 2019 Intel Corporation +* Copyright(c) 2012-2014, 2018 - 2020 Intel Corporation * All rights reserved. * * Redistribution and use in source and binary forms, with or without
@@ -128,7 +126,9 @@ enum iwl_sta_flags {STA_FLG_MAX_AGG_SIZE_256K = (5 <<STA_FLG_MAX_AGG_SIZE_SHIFT ),STA_FLG_MAX_AGG_SIZE_512K = (6 <<STA_FLG_MAX_AGG_SIZE_SHIFT ),STA_FLG_MAX_AGG_SIZE_1024K = (7 <<STA_FLG_MAX_AGG_SIZE_SHIFT ), -STA_FLG_MAX_AGG_SIZE_MSK = (7 <<STA_FLG_MAX_AGG_SIZE_SHIFT ), +STA_FLG_MAX_AGG_SIZE_2M = (8 <<STA_FLG_MAX_AGG_SIZE_SHIFT ), +STA_FLG_MAX_AGG_SIZE_4M = (9 <<STA_FLG_MAX_AGG_SIZE_SHIFT ), +STA_FLG_MAX_AGG_SIZE_MSK = (0xf <<STA_FLG_MAX_AGG_SIZE_SHIFT ),STA_FLG_AGG_MPDU_DENS_SHIFT =23 , STA_FLG_AGG_MPDU_DENS_2US = (4 << STA_FLG_AGG_MPDU_DENS_SHIFT),
drivers/net/wireless/intel/iwlwifi/mvm/sta.c +18 -0
@@ -196,6 +196,7 @@ int iwl_mvm_sta_send_to_fw(struct iwl_mvm *mvm, struct ieee80211_sta *sta, mpdu_dens = sta->ht_cap.ampdu_density; } +if (sta->vht_cap.vht_supported) { agg_size = sta->vht_cap.cap &IEEE80211_VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_MASK ;
@@ -205,6 +206,23 @@ int iwl_mvm_sta_send_to_fw(struct iwl_mvm *mvm, struct ieee80211_sta *sta, agg_size = sta->ht_cap.ampdu_factor; } +/* D6.0 10.12.2 A-MPDU length limit rules +* A STA indicates the maximum length of the A-MPDU preEOF padding +* that it can receive in an HE PPDU in the Maximum A-MPDU Length +* Exponent field in its HT Capabilities, VHT Capabilities, +* and HE 6 GHz Band Capabilities elements (if present) and the +* Maximum AMPDU Length Exponent Extension field in its HE +* Capabilities element +*/ +if (sta->he_cap.has_he) + agg_size +=u8_get_bits (sta->he_cap.he_cap_elem.mac_cap_info[3 ], +IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_MASK ); + +/* Limit to max A-MPDU supported by FW */ +if (agg_size > (STA_FLG_MAX_AGG_SIZE_4M >>STA_FLG_MAX_AGG_SIZE_SHIFT )) + agg_size = (STA_FLG_MAX_AGG_SIZE_4M >> +STA_FLG_MAX_AGG_SIZE_SHIFT ); + add_sta_cmd.station_flags |=cpu_to_le32 (agg_size <<STA_FLG_MAX_AGG_SIZE_SHIFT ); add_sta_cmd.station_flags |=
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 46/105 powerpc: Drop -me200 addition to build flags
In reply to Greg Kroah-HartmanFrom: Michael Ellerman <[email protected]>
[ Upstream commit e02152ba2810f7c88cb54e71cda096268dfa9241 ]
Currently a build with CONFIG_E200=y will fail with:
Error: invalid switch -me200
Error: unrecognized option -me200
Upstream binutils has never supported an -me200 option. Presumably it was supported at some point by either a fork or Freescale internal binutils.
We can't support code that we can't even build test, so drop the addition of -me200 to the build flags, so we can at least build with CONFIG_E200=y.
--- arch/powerpc/Makefile | 1 - 1 file changed, 1 deletion(-)
arch/powerpc/Makefile +0 -1
@@ -249,7 +249,6 @@ KBUILD_CFLAGS += $(call cc-option,-mno-string) cpu-as-$(CONFIG_40x) += -Wa,-m405 cpu-as-$(CONFIG_44x) += -Wa,-m440 cpu-as-$(CONFIG_ALTIVEC) += $(call as-option,-Wa$(comma)-maltivec) -cpu-as-$(CONFIG_E200) += -Wa,-me200 cpu-as-$(CONFIG_E500) += -Wa,-me500 # When using '-many -mpower4' gas will first try and find a matching power4
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 47/105 arm64: dts: broadcom: clear the warnings caused by empty dma-ranges
In reply to Greg Kroah-HartmanFrom: Zhen Lei <[email protected]>
[ Upstream commit 2013a4b684b6eb614ee5c9a3c07b0ae6f5ca96d9 ]
The scripts/dtc/checks.c requires that the node have empty "dma-ranges" property must have the same "#address-cells" and "#size-cells" values as the parent node. Otherwise, the following warnings is reported:
arch/arm64/boot/dts/broadcom/stingray/stingray-usb.dtsi:7.3-14: Warning \
(dma_ranges_format): /usb:dma-ranges: empty "dma-ranges" property but \
its #address-cells (1) differs from / (2) arch/arm64/boot/dts/broadcom/stingray/stingray-usb.dtsi:7.3-14: Warning \
(dma_ranges_format): /usb:dma-ranges: empty "dma-ranges" property but \
its #size-cells (1) differs from / (2)
Arnd Bergmann figured out why it's necessary:
Also note that the #address-cells=<1> means that any device under this bus is assumed to only support 32-bit addressing, and DMA will have to go through a slow swiotlb in the absence of an IOMMU.
--- .../dts/broadcom/stingray/stingray-usb.dtsi | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-)
arch/arm64/boot/dts/broadcom/stingray/stingray-usb.dtsi +10 -10
@@ -5,20 +5,20 @@ usb { compatible = "simple-bus"; dma-ranges; - #address-cells = <1>; - #size-cells = <1>; - ranges = <0x0 0x0 0x68500000 0x00400000>; + #address-cells = <2>; + #size-cells = <2>; + ranges = <0x0 0x0 0x0 0x68500000 0x0 0x00400000>; usbphy0: usb-phy@0 { compatible = "brcm,sr-usb-combo-phy"; - reg = <0x00000000 0x100>; + reg = <0x0 0x00000000 0x0 0x100>; #phy-cells = <1>; status = "disabled"; }; xhci0: usb@1000 { compatible = "generic-xhci"; - reg = <0x00001000 0x1000>; + reg = <0x0 0x00001000 0x0 0x1000>; interrupts = <GIC_SPI 256 IRQ_TYPE_LEVEL_HIGH>; phys = <&usbphy0 1>, <&usbphy0 0>; phy-names = "phy0", "phy1";
@@ -28,7 +28,7 @@ bdc0: usb@2000 { compatible = "brcm,bdc-v0.16"; - reg = <0x00002000 0x1000>; + reg = <0x0 0x00002000 0x0 0x1000>; interrupts = <GIC_SPI 259 IRQ_TYPE_LEVEL_HIGH>; phys = <&usbphy0 0>, <&usbphy0 1>; phy-names = "phy0", "phy1";
@@ -38,21 +38,21 @@ usbphy1: usb-phy@10000 { compatible = "brcm,sr-usb-combo-phy"; - reg = <0x00010000 0x100>; + reg = <0x0 0x00010000 0x0 0x100>; #phy-cells = <1>; status = "disabled"; }; usbphy2: usb-phy@20000 { compatible = "brcm,sr-usb-hs-phy"; - reg = <0x00020000 0x100>; + reg = <0x0 0x00020000 0x0 0x100>; #phy-cells = <0>; status = "disabled"; }; xhci1: usb@11000 { compatible = "generic-xhci"; - reg = <0x00011000 0x1000>; + reg = <0x0 0x00011000 0x0 0x1000>; interrupts = <GIC_SPI 263 IRQ_TYPE_LEVEL_HIGH>; phys = <&usbphy1 1>, <&usbphy2>, <&usbphy1 0>; phy-names = "phy0", "phy1", "phy2";
@@ -62,7 +62,7 @@ bdc1: usb@21000 { compatible = "brcm,bdc-v0.16"; - reg = <0x00021000 0x1000>; + reg = <0x0 0x00021000 0x0 0x1000>; interrupts = <GIC_SPI 266 IRQ_TYPE_LEVEL_HIGH>; phys = <&usbphy2>; phy-names = "phy0";
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 48/105 ARC: stack unwinding: dont assume non-current task is sleeping
In reply to Greg Kroah-HartmanFrom: Vineet Gupta <[email protected]>
[ Upstream commit e42404fa10fd11fe72d0a0e149a321d10e577715 ]
To start stack unwinding (SP, PC and BLINK) are needed. When the explicit execution context (pt_regs etc) is not available, unwinder assumes the task is sleeping (in __switch_to()) and fetches SP and BLINK from kernel mode stack.
But this assumption is not true, specially in a SMP system, when top runs on 1 core, there may be active running processes on all cores.
So when unwinding non courrent tasks, ensure they are NOT running.
And while at it, handle the self unwinding case explicitly.
This came out of investigation of a customer reported hang with rcutorture+top
--- arch/arc/kernel/stacktrace.c | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-)
arch/arc/kernel/stacktrace.c +15 -8
@@ -38,15 +38,15 @@#ifdef CONFIG_ARC_DW2_UNWIND -static void seed_unwind_frame_info (struct task_struct *tsk, -struct pt_regs *regs, -struct unwind_frame_info *frame_info) +static int +seed_unwind_frame_info (struct task_struct *tsk,struct pt_regs *regs, +struct unwind_frame_info *frame_info) {/* * synchronous unwinding (e.g. dump_stack) * - uses current values of SP and friends */ -if (tsk ==NULL && regs ==NULL ) { +if (regs ==NULL && (tsk ==NULL || tsk == current)) {unsigned long fp, sp, blink, ret; frame_info->task = current;
@@ -65,11 +65,15 @@ static void seed_unwind_frame_info(struct task_struct *tsk, frame_info->call_frame =0 ; }else if (regs ==NULL ) {/* -* Asynchronous unwinding of sleeping task -* - Gets SP etc from task's pt_regs (saved bottom of kernel -* mode stack of task) +* Asynchronous unwinding of a likely sleeping task +* - first ensure it is actually sleeping +* - if so, it will be in __switch_to, kernel mode SP of task +* is safe-kept and BLINK at a well known location in there */ +if (tsk->state ==TASK_RUNNING ) +return -1 ; + frame_info->task = tsk; frame_info->regs.r27 =TSK_K_FP (tsk);
@@ -103,6 +107,8 @@ static void seed_unwind_frame_info(struct task_struct *tsk, frame_info->regs.r63 = regs->ret; frame_info->call_frame = 0; } + +return 0 ; }#endif
@@ -116,7 +122,8 @@ arc_unwind_core(struct task_struct *tsk, struct pt_regs *regs,unsigned int address;struct unwind_frame_info frame_info; -seed_unwind_frame_info (tsk, regs, &frame_info); +if (seed_unwind_frame_info (tsk, regs, &frame_info)) +return 0 ;while (1 ) { address =UNW_PC (&frame_info);
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 35/105 usb: ohci-omap: Fix descriptor conversion
In reply to Greg Kroah-HartmanFrom: Linus Walleij <[email protected]>
[ Upstream commit 45c5775460f32ed8cdb7c16986ae1a2c254346b3 ]
There were a bunch of issues with the patch converting the OMAP1 OSK board to use descriptors for controlling the USB host:
- The chip label was incorrect
- The GPIO offset was off-by-one
- The code should use sleeping accessors
This patch tries to fix all issues at the same time.
--- arch/arm/mach-omap1/board-osk.c | 2 +- drivers/usb/host/ohci-omap.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
arch/arm/mach-omap1/board-osk.c +1 -1
@@ -288,7 +288,7 @@ static struct gpiod_lookup_table osk_usb_gpio_table = { .dev_id = "ohci", .table = {/* Power GPIO on the I2C-attached TPS65010 */ -GPIO_LOOKUP ("i2c-tps65010" ,1 ,"power" ,GPIO_ACTIVE_HIGH ), +GPIO_LOOKUP ("tps65010" ,0 ,"power" ,GPIO_ACTIVE_HIGH ),GPIO_LOOKUP (OMAP_GPIO_LABEL ,9 ,"overcurrent" , GPIO_ACTIVE_HIGH), },
drivers/usb/host/ohci-omap.c +2 -2
@@ -91,14 +91,14 @@ static int omap_ohci_transceiver_power(struct ohci_omap_priv *priv, int on) | ((1 << 5/*usb1*/) | (1 << 3/*usb2*/)), INNOVATOR_FPGA_CAM_USB_CONTROL); else if (priv->power) - gpiod_set_value(priv->power, 0); + gpiod_set_value_cansleep(priv->power, 0); }else {if (machine_is_omap_innovator () &&cpu_is_omap1510 ())__raw_writeb (__raw_readb (INNOVATOR_FPGA_CAM_USB_CONTROL ) & ~((1 <<5 /*usb1*/ ) | (1 <<3 /*usb2*/ )),INNOVATOR_FPGA_CAM_USB_CONTROL );else if (priv->power) -gpiod_set_value (priv->power,1 ); +gpiod_set_value_cansleep (priv->power,1 ); }return 0 ;
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 20/105 ibmvnic: send_login should check for crq errors
In reply to Greg Kroah-HartmanFrom: Dany Madden <[email protected]>
[ Upstream commit c98d9cc4170da7e16a1012563d0f9fbe1c7cfe27 ]
send_login() does not check for the result of ibmvnic_send_crq() of the login request. This results in the driver needlessly retrying the login 10 times even when CRQ is no longer active. Check the return code and give up in case of errors in sending the CRQ.
The only time we want to retry is if we get a PARITALSUCCESS response from the partner.
--- drivers/net/ethernet/ibm/ibmvnic.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-)
drivers/net/ethernet/ibm/ibmvnic.c +12 -6
@@ -862,10 +862,8 @@ static int ibmvnic_login(struct net_device *netdev) adapter->init_done_rc =0 ;reinit_completion (&adapter->init_done); rc =send_login (adapter); -if (rc) { -netdev_warn (netdev,"Unable to login\n" ); +if (rc)return rc; - }if (!wait_for_completion_timeout (&adapter->init_done, timeout)) {
@@ -3731,15 +3729,16 @@ static int send_login(struct ibmvnic_adapter *adapter)struct ibmvnic_login_rsp_buffer *login_rsp_buffer;struct ibmvnic_login_buffer *login_buffer;struct device *dev = &adapter->vdev->dev; +struct vnic_login_client_data *vlcd;dma_addr_t rsp_buffer_token;dma_addr_t buffer_token;size_t rsp_buffer_size;union ibmvnic_crq crq; +int client_data_len;size_t buffer_size;__be64 *tx_list_p;__be64 *rx_list_p; -int client_data_len; -struct vnic_login_client_data *vlcd; +int rc;int i;if (!adapter->tx_scrq || !adapter->rx_scrq) {
@@ -3845,16 +3844,23 @@ static int send_login(struct ibmvnic_adapter *adapter) crq.login.len =cpu_to_be32 (buffer_size); adapter->login_pending = true; -ibmvnic_send_crq (adapter, &crq); + rc =ibmvnic_send_crq (adapter, &crq); +if (rc) { + adapter->login_pending = false; +netdev_err (adapter->netdev,"Failed to send login, rc=%d\n" , rc); + goto buf_rsp_map_failed; + }return 0 ; buf_rsp_map_failed:kfree (login_rsp_buffer); + adapter->login_rsp_buf =NULL ; buf_rsp_alloc_failed:dma_unmap_single (dev, buffer_token, buffer_size,DMA_TO_DEVICE ); buf_map_failed:kfree (login_buffer); + adapter->login_buf =NULL ; buf_alloc_failed:return -1 ; }
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 39/105 arm64: dts: rockchip: Remove system-power-controller from pmic on Odroid Go Advance
In reply to Greg Kroah-HartmanFrom: Maciej Matuszczyk <[email protected]>
[ Upstream commit 01fe332800d0d2f94337b45c1973f4cf28ae6195 ]
This fixes a poweroff issue when this is supposed to happen via PSCI.
--- arch/arm64/boot/dts/rockchip/rk3326-odroid-go2.dts | 1 - 1 file changed, 1 deletion(-)
arch/arm64/boot/dts/rockchip/rk3326-odroid-go2.dts +0 -1
@@ -243,7 +243,6 @@ interrupts = <RK_PB2 IRQ_TYPE_LEVEL_LOW>; pinctrl-names = "default"; pinctrl-0 = <&pmic_int>; - rockchip,system-power-controller; wakeup-source; #clock-cells = <1>; clock-output-names = "rk808-clkout1", "xin32k";
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 38/105 phy: usb: Fix incorrect clearing of tca_drv_sel bit in SETUP reg for 7211
In reply to Greg Kroah-HartmanFrom: Al Cooper <[email protected]>
[ Upstream commit 209c805835b29495cf66cc705b206da8f4a68e6e ]
The 7211a0 has a tca_drv_sel bit in the USB SETUP register that should never be enabled. This feature is only used if there is a USB Type-C PHY, and the 7211 does not have one. If the bit is enabled, the VBUS signal will never be asserted. In the 7211a0, the bit was incorrectly defaulted to on so the driver had to clear the bit. In the 7211c0 the state was inverted so the driver should no longer clear the bit. This hasn't been a problem because all current 7211 boards don't use the VBUS signal, but there are some future customer boards that may use it.
--- drivers/phy/broadcom/phy-brcm-usb-init-synopsys.c | 5 ----- 1 file changed, 5 deletions(-)
drivers/phy/broadcom/phy-brcm-usb-init-synopsys.c +0 -5
@@ -270,11 +270,6 @@ static void usb_init_common_7211b0(struct brcm_usb_init_params *params) reg |= params->mode <<USB_PHY_UTMI_CTL_1_PHY_MODE_SHIFT ;brcm_usb_writel (reg, usb_phy +USB_PHY_UTMI_CTL_1 ); -/* Fix the incorrect default */ - reg =brcm_usb_readl (ctrl +USB_CTRL_SETUP ); - reg &= ~USB_CTRL_SETUP_tca_drv_sel_MASK; -brcm_usb_writel (reg, ctrl +USB_CTRL_SETUP ); -usb_init_common (params);/*
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 37/105 mm/mmap.c: fix mmap return value when vma is merged after call_mmap()
In reply to Greg Kroah-HartmanFrom: Liu Zixian <[email protected]>
[ Upstream commit 309d08d9b3a3659ab3f239d27d4e38b670b08fc9 ]
On success, mmap should return the begin address of newly mapped area, but patch "mm: mmap: merge vma after call_mmap() if possible" set vm_start of newly merged vma to return value addr. Users of mmap will get wrong address if vma is merged after call_mmap(). We fix this by moving the assignment to addr before merging vma.
We have a driver which changes vm_flags, and this bug is found by our testcases.
--- mm/mmap.c | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-)
mm/mmap.c +12 -14
@@ -1774,6 +1774,17 @@ unsigned long mmap_region(struct file *file, unsigned long addr,if (error) goto unmap_and_free_vma; +/* Can addr have changed?? +* +* Answer: Yes, several device drivers can do it in their +* f_op->mmap method. -DaveM +* Bug: If addr is changed, prev, rb_link, rb_parent should +* be updated for vma_link() +*/ +WARN_ON_ONCE (addr != vma->vm_start); + + addr = vma->vm_start; +/* If vm_flags changed after call_mmap(), we should try merge vma again * as we may succeed this time. */
@@ -1788,25 +1799,12 @@ unsigned long mmap_region(struct file *file, unsigned long addr,fput (vma->vm_file);vm_area_free (vma); vma = merge; -/* Update vm_flags and possible addr to pick up the change. We don't -* warn here if addr changed as the vma is not linked by vma_link(). -*/ - addr = vma->vm_start; +/* Update vm_flags to pick up the change. */ vm_flags = vma->vm_flags; goto unmap_writable; } } -/* Can addr have changed?? -* -* Answer: Yes, several device drivers can do it in their -* f_op->mmap method. -DaveM -* Bug: If addr is changed, prev, rb_link, rb_parent should -* be updated for vma_link() -*/ -WARN_ON_ONCE (addr != vma->vm_start); - - addr = vma->vm_start; vm_flags = vma->vm_flags; }else if (vm_flags &VM_SHARED ) { error =shmem_zero_setup (vma);
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 36/105 zlib: export S390 symbols for zlib modules
In reply to Greg Kroah-HartmanFrom: Randy Dunlap <[email protected]>
[ Upstream commit 11fb479ff5d9872ddff02dd533c16d60372c86b2 ]
Fix build errors when ZLIB_INFLATE=m and ZLIB_DEFLATE=m and ZLIB_DFLTCC=y by exporting the 2 needed symbols in dfltcc_inflate.c.
Fixes these build errors:
ERROR: modpost: "dfltcc_inflate" [lib/zlib_inflate/zlib_inflate.ko] undefined!
ERROR: modpost: "dfltcc_can_inflate" [lib/zlib_inflate/zlib_inflate.ko] undefined!
--- lib/zlib_dfltcc/dfltcc_inflate.c | 3 +++ 1 file changed, 3 insertions(+)
lib/zlib_dfltcc/dfltcc_inflate.c +3 -0
@@ -4,6 +4,7 @@#include "dfltcc_util.h" #include "dfltcc.h" #include <asm/setup.h> +#include <linux/export.h> #include <linux/zutil.h> /*
@@ -29,6 +30,7 @@ int dfltcc_can_inflate(return is_bit_set (dfltcc_state->af.fns,DFLTCC_XPND ) &&is_bit_set (dfltcc_state->af.fmts,DFLTCC_FMT0 ); } +EXPORT_SYMBOL (dfltcc_can_inflate);static int dfltcc_was_inflate_used ( z_streamp strm
@@ -147,3 +149,4 @@ dfltcc_inflate_action dfltcc_inflate(return (cc ==DFLTCC_CC_OP1_TOO_SHORT || cc ==DFLTCC_CC_OP2_TOO_SHORT ) ?DFLTCC_INFLATE_BREAK :DFLTCC_INFLATE_CONTINUE ; } +EXPORT_SYMBOL (dfltcc_inflate);
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 40/105 iwlwifi: pcie: limit memory read spin time
In reply to Greg Kroah-HartmanFrom: Johannes Berg <[email protected]>
[ Upstream commit 04516706bb99889986ddfa3a769ed50d2dc7ac13 ]
When we read device memory, we lock a spinlock, write the address we want to read from the device and then spin in a loop reading the data in 32-bit quantities from another register.
As the description makes clear, this is rather inefficient, incurring a PCIe bus transaction for every read. In a typical device today, we want to read 786k SMEM if it crashes, leading to 192k register reads. Occasionally, we've seen the whole loop take over 20 seconds and then triggering the soft lockup detector.
Clearly, it is unreasonable to spin here for such extended periods of time.
To fix this, break the loop down into an outer and an inner loop, and break out of the inner loop if more than half a second elapsed. To avoid too much overhead, check for that only every 128 reads, though there's no particular reason for that number. Then, unlock and relock to obtain NIC access again, reprogram the start address and continue.
This will keep (interrupt) latencies on the CPU down to a reasonable time.
--- .../net/wireless/intel/iwlwifi/pcie/trans.c | 36 ++++++++++++++----- 1 file changed, 27 insertions(+), 9 deletions(-)
drivers/net/wireless/intel/iwlwifi/pcie/trans.c +27 -9
@@ -2155,18 +2155,36 @@ static int iwl_trans_pcie_read_mem(struct iwl_trans *trans, u32 addr, void *buf, int dwords) {unsigned long flags; -int offs, ret =0 ; +int offs =0 ;u32 *vals = buf; -if (iwl_trans_grab_nic_access (trans, &flags)) { -iwl_write32 (trans,HBUS_TARG_MEM_RADDR , addr); -for (offs =0 ; offs < dwords; offs++) - vals[offs] =iwl_read32 (trans,HBUS_TARG_MEM_RDAT ); -iwl_trans_release_nic_access (trans, &flags); - }else { - ret = -EBUSY ; +while (offs < dwords) { +/* limit the time we spin here under lock to 1/2s */ +ktime_t timeout =ktime_add_us (ktime_get (),500 *USEC_PER_MSEC ); + +if (iwl_trans_grab_nic_access (trans, &flags)) { +iwl_write32 (trans,HBUS_TARG_MEM_RADDR , + addr +4 * offs); + +while (offs < dwords) { + vals[offs] =iwl_read32 (trans, +HBUS_TARG_MEM_RDAT ); + offs++; + +/* calling ktime_get is expensive so +* do it once in 128 reads +*/ +if (offs %128 ==0 &&ktime_after (ktime_get (), + timeout)) +break ; + } +iwl_trans_release_nic_access (trans, &flags); + }else { +return -EBUSY ; + } } -return ret; + +return 0 ; } static int iwl_trans_pcie_write_mem(struct iwl_trans *trans, u32 addr,
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 2/105 mm/zsmalloc.c: drop ZSMALLOC_PGTABLE_MAPPING
In reply to Greg Kroah-HartmanFrom: Minchan Kim <[email protected]>
commit e91d8d78237de8d7120c320b3645b7100848f24d upstream.
While I was doing zram testing, I found sometimes decompression failed since the compression buffer was corrupted. With investigation, I found below commit calls cond_resched unconditionally so it could make a problem in atomic context if the task is reschedule.
BUG: sleeping function called from invalid context at mm/vmalloc.c:108
in_atomic(): 1, irqs_disabled(): 0, non_block: 0, pid: 946, name: memhog
3 locks held by memhog/946:
#0: ffff9d01d4b193e8 (&mm->mmap_lock#2){++++}-{4:4}, at: __mm_populate+0x103/0x160
#1: ffffffffa3d53de0 (fs_reclaim){+.+.}-{0:0}, at: __alloc_pages_slowpath.constprop.0+0xa98/0x1160
#2: ffff9d01d56b8110 (&zspage->lock){.+.+}-{3:3}, at: zs_map_object+0x8e/0x1f0
CPU: 0 PID: 946 Comm: memhog Not tainted 5.9.3-00011-gc5bfc0287345-dirty #316
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.13.0-1 04/01/2014
Call Trace:
unmap_kernel_range_noflush+0x2eb/0x350
unmap_kernel_range+0x14/0x30
zs_unmap_object+0xd5/0xe0
zram_bvec_rw.isra.0+0x38c/0x8e0
zram_rw_page+0x90/0x101
bdev_write_page+0x92/0xe0
__swap_writepage+0x94/0x4a0
pageout+0xe3/0x3a0
shrink_page_list+0xb94/0xd60
shrink_inactive_list+0x158/0x460We can fix this by removing the ZSMALLOC_PGTABLE_MAPPING feature (which contains the offending calling code) from zsmalloc.
Even though this option showed some amount improvement(e.g., 30%) in some arm32 platforms, it has been headache to maintain since it have abused APIs[1](e.g., unmap_kernel_range in atomic context).
Since we are approaching to deprecate 32bit machines and already made the config option available for only builtin build since v5.8, lastly it has been not default option in zsmalloc, it's time to drop the option for better maintenance.
[1] http://lore.kernel.org/linux-mm/[email protected]
--- arch/arm/configs/omap2plus_defconfig | 1 include/linux/zsmalloc.h | 1 mm/Kconfig | 13 --------- mm/zsmalloc.c | 48 ----------------------------------- 4 files changed, 63 deletions(-)
arch/arm/configs/omap2plus_defconfig +0 -1
@@ -81,7 +81,6 @@ CONFIG_PARTITION_ADVANCED=y CONFIG_BINFMT_MISC=y CONFIG_CMA=y CONFIG_ZSMALLOC=m -CONFIG_ZSMALLOC_PGTABLE_MAPPING=y CONFIG_NET=y CONFIG_PACKET=y CONFIG_UNIX=y
include/linux/zsmalloc.h +0 -1
@@ -20,7 +20,6 @@* zsmalloc mapping modes * * NOTE: These only make a difference when a mapped object spans pages. -* They also have no effect when ZSMALLOC_PGTABLE_MAPPING is selected. */ enum zs_mapmode {ZS_MM_RW ,/* normal read-write mapping */
mm/Kconfig +0 -13
@@ -706,19 +706,6 @@ config ZSMALLOC returned by an alloc(). This handle must be mapped in order to access the allocated space. -config ZSMALLOC_PGTABLE_MAPPING - bool "Use page table mapping to access object in zsmalloc" - depends on ZSMALLOC=y - help - By default, zsmalloc uses a copy-based object mapping method to - access allocations that span two pages. However, if a particular - architecture (ex, ARM) performs VM mapping faster than copying, - then you should select this. This causes zsmalloc to use page table - mapping rather than copying for object mapping. - - You can check speed with zsmalloc benchmark: - https://github.com/spartacus06/zsmapbench - config ZSMALLOC_STAT bool "Export zsmalloc statistics" depends on ZSMALLOC
mm/zsmalloc.c +0 -48
67 lines not on this page · raw message
Greg Kroah-Hartman
maintainerPATCH 11/105 batman-adv: Consider fragmentation for needed_headroom
In reply to Greg Kroah-HartmanFrom: Sven Eckelmann <[email protected]>
[ Upstream commit 4ca23e2c2074465bff55ea14221175fecdf63c5f ]
If a batman-adv packets has to be fragmented, then the original batman-adv packet header is not stripped away. Instead, only a new header is added in front of the packet after it was split.
This size must be considered to avoid cost intensive reallocations during the transmission through the various device layers.
--- net/batman-adv/hard-interface.c | 3 +++ 1 file changed, 3 insertions(+)
net/batman-adv/hard-interface.c +3 -0
@@ -554,6 +554,9 @@ static void batadv_hardif_recalc_extra_skbroom(struct net_device *soft_iface) needed_headroom = lower_headroom + (lower_header_len -ETH_HLEN ); needed_headroom +=batadv_max_header_len (); +/* fragmentation headers don't strip the unicast/... header */ + needed_headroom +=sizeof (struct batadv_frag_packet ); + soft_iface->needed_headroom = needed_headroom; soft_iface->needed_tailroom = lower_tailroom; }
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 31/105 net: broadcom CNIC: requires MMU
In reply to Greg Kroah-HartmanFrom: Randy Dunlap <[email protected]>
[ Upstream commit 14483cbf040fcb38113497161088a1ce8ce5d713 ]
The CNIC kconfig symbol selects UIO and UIO depends on MMU. Since 'select' does not follow dependency chains, add the same MMU dependency to CNIC.
Quietens this kconfig warning:
WARNING: unmet direct dependencies detected for UIO
Depends on [n]: MMU [=n]
Selected by [m]:
- CNIC [=m] && NETDEVICES [=y] && ETHERNET [=y] && NET_VENDOR_BROADCOM [=y] && PCI [=y] && (IPV6 [=m] || IPV6 [=m]=n)
--- drivers/net/ethernet/broadcom/Kconfig | 1 + 1 file changed, 1 insertion(+)
drivers/net/ethernet/broadcom/Kconfig +1 -0
@@ -88,6 +88,7 @@ config BNX2 config CNIC tristate "QLogic CNIC support" depends on PCI && (IPV6 || IPV6=n) + depends on MMU select BNX2 select UIO help
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 4/105 kprobes: Tell lockdep about kprobe nesting
In reply to Greg Kroah-HartmanFrom: Steven Rostedt (VMware) <[email protected]>
commit 645f224e7ba2f4200bf163153d384ceb0de5462e upstream.
Since the kprobe handlers have protection that prohibits other handlers from executing in other contexts (like if an NMI comes in while processing a kprobe, and executes the same kprobe, it will get fail with a "busy" return). Lockdep is unaware of this protection. Use lockdep's nesting api to differentiate between locks taken in INT3 context and other context to suppress the false warnings.
--- kernel/kprobes.c | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-)
kernel/kprobes.c +21 -4
@@ -1250,7 +1250,13 @@ __acquires(hlist_lock) *head = &kretprobe_inst_table[hash]; hlist_lock =kretprobe_table_lock_ptr (hash); -raw_spin_lock_irqsave (hlist_lock, *flags); +/* +* Nested is a workaround that will soon not be needed. +* There's other protections that make sure the same lock +* is not taken on the same CPU that lockdep is unaware of. +* Differentiate when it is taken in NMI context. +*/ +raw_spin_lock_irqsave_nested (hlist_lock, *flags, !!in_nmi ()); }NOKPROBE_SYMBOL (kretprobe_hash_lock);
@@ -1259,7 +1265,13 @@ static void kretprobe_table_lock(unsigne__acquires (hlist_lock) {raw_spinlock_t *hlist_lock =kretprobe_table_lock_ptr (hash); -raw_spin_lock_irqsave (hlist_lock, *flags); +/* +* Nested is a workaround that will soon not be needed. +* There's other protections that make sure the same lock +* is not taken on the same CPU that lockdep is unaware of. +* Differentiate when it is taken in NMI context. +*/ +raw_spin_lock_irqsave_nested (hlist_lock, *flags, !!in_nmi ()); }NOKPROBE_SYMBOL (kretprobe_table_lock);
@@ -1942,7 +1954,12 @@ static int pre_handler_kretprobe(struct/* TODO: consider to only swap the RA after the last pre_handler fired */ hash =hash_ptr (current,KPROBE_HASH_BITS ); -raw_spin_lock_irqsave (&rp->lock, flags); +/* +* Nested is a workaround that will soon not be needed. +* There's other protections that make sure the same lock +* is not taken on the same CPU that lockdep is unaware of. +*/ +raw_spin_lock_irqsave_nested (&rp->lock, flags,1 );if (!hlist_empty (&rp->free_instances)) { ri =hlist_entry (rp->free_instances.first, struct kretprobe_instance, hlist);
@@ -1953,7 +1970,7 @@ static int pre_handler_kretprobe(struct ri->task = current;if (rp->entry_handler && rp->entry_handler (ri, regs)) { -raw_spin_lock_irqsave (&rp->lock, flags); +raw_spin_lock_irqsave_nested (&rp->lock, flags,1 );hlist_add_head (&ri->hlist, &rp->free_instances);raw_spin_unlock_irqrestore (&rp->lock, flags);return 0 ;
Greg Kroah-Hartman
maintainerPATCH 13/105 batman-adv: Dont always reallocate the fragmentation skb head
In reply to Greg Kroah-HartmanFrom: Sven Eckelmann <[email protected]>
[ Upstream commit 992b03b88e36254e26e9a4977ab948683e21bd9f ]
When a packet is fragmented by batman-adv, the original batman-adv header is not modified. Only a new fragmentation is inserted between the original one and the ethernet header. The code must therefore make sure that it has a writable region of this size in the skbuff head.
But it is not useful to always reallocate the skbuff by this size even when there would be more than enough headroom still in the skb. The reallocation is just to costly during in this codepath.
--- net/batman-adv/fragmentation.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-)
net/batman-adv/fragmentation.c +6 -5
@@ -527,13 +527,14 @@ int batadv_frag_send_packet(struct sk_buff *skb, frag_header.no++; } -/* Make room for the fragment header. */ -if (batadv_skb_head_push (skb, header_size) <0 || -pskb_expand_head (skb, header_size +ETH_HLEN ,0 ,GFP_ATOMIC ) <0 ) { - ret = -ENOMEM ; +/* make sure that there is at least enough head for the fragmentation +* and ethernet headers +*/ + ret =skb_cow_head (skb,ETH_HLEN + header_size); +if (ret <0 ) goto put_primary_if; - } +skb_push (skb, header_size);memcpy (skb->data, &frag_header, header_size);/* Send the last fragment */
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainercover 5.9.15-rc1 review
This is the start of the stable review cycle for the 5.9.15 release. There are 105 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Wed, 16 Dec 2020 17:25:32 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.9.15-rc1.gz
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.9.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <[email protected]>
Linux 5.9.15-rc1
Arvind Sankar <[email protected]>
compiler.h: fix barrier_data() on clang
Masami Hiramatsu <[email protected]>
x86/kprobes: Fix optprobe to detect INT3 padding correctly
Thomas Gleixner <[email protected]>
x86/apic/vector: Fix ordering in vector assignment
Andy Lutomirski <[email protected]>
x86/membarrier: Get rid of a dubious optimization
Arvind Sankar <[email protected]>
x86/mm/mem_encrypt: Fix definition of PMD_FLAGS_DEC_WP
Dan Carpenter <[email protected]>
scsi: be2iscsi: Revert "Fix a theoretical leak in beiscsi_create_eqs()"
Damien Le Moal <[email protected]>
zonefs: fix page reference and BIO leak
Gerald Schaefer <[email protected]>
mm/hugetlb: clear compound_nr before freeing gigantic pages
Miles Chen <[email protected]>
proc: use untagged_addr() for pagemap_read addresses
Arnd Bergmann <[email protected]>
kbuild: avoid static_assert for genksyms
Stanley.Yang <[email protected]>
drm/amdgpu: fix sdma instance fw version and feature version init
Chris Wilson <[email protected]>
drm/i915/gt: Cancel the preemption timeout on responding to it
Chris Wilson <[email protected]>
drm/i915/gt: Ignore repeated attempts to suspend request flow across reset
Chris Wilson <[email protected]>
drm/i915/gt: Declare gen9 has 64 mocs entries!
Manasi Navare <[email protected]>
drm/i915/display/dp: Compute the correct slice count for VDSC on DP
Chris Wilson <[email protected]>
drm/i915/gem: Propagate error from cancelled submit due to context closure
Alex Deucher <[email protected]>
drm/amdgpu/disply: set num_crtc earlier
Bean Huo <[email protected]>
mmc: block: Fixup condition for CMD13 polling for RPMB requests
Muhammad Husaini Zulkifli <[email protected]>
mmc: sdhci-of-arasan: Fix clock registration error for Keem Bay SOC
Coiby Xu <[email protected]>
pinctrl: amd: remove debounce filter setting in IRQ type setting
Evan Green <[email protected]>
pinctrl: jasperlake: Fix HOSTSW_OWN offset
Chris Chiu <[email protected]>
Input: i8042 - add Acer laptops to the i8042 reset list
Dmitry Torokhov <[email protected]>
Input: cm109 - do not stomp on control URB
Juergen Gross <[email protected]>
xen: don't use page->lru for ZONE_DEVICE memory
Juergen Gross <[email protected]>
xen: add helpers for caching grant mapping pages
Libo Chen <[email protected]>
ktest.pl: Fix incorrect reboot for grub2bls
yong mao <[email protected]>
mmc: mediatek: Extend recheck_sdio_irq fix to more variants
Wenbin Mei <[email protected]>
mmc: mediatek: Fix system suspend/resume support for CQHCI
Hans Verkuil <[email protected]>
media: pulse8-cec: add support for FW v10 and up
Hans Verkuil <[email protected]>
media: pulse8-cec: fix duplicate free at disconnect or probe error
Peter Zijlstra <[email protected]>
intel_idle: Build fix
Heiko Carstens <[email protected]>
s390: fix irq state tracing
Pankaj Sharma <[email protected]>
can: m_can: m_can_dev_setup(): add support for bosch mcan version 3.3.0
Hans de Goede <[email protected]>
platform/x86: touchscreen_dmi: Add info for the Irbis TW118 tablet
Hans de Goede <[email protected]>
platform/x86: touchscreen_dmi: Add info for the Predia Basic tablet
Max Verevkin <[email protected]>
platform/x86: intel-vbtn: Support for tablet mode on HP Pavilion 13 x360 PC
Timo Witte <[email protected]>
platform/x86: acer-wmi: add automatic keyboard background light toggle key as KEY_LIGHTS_TOGGLE
Matthias Maier <[email protected]>
platform/x86: thinkpad_acpi: Whitelist P15 firmware for dual fan control
Hans de Goede <[email protected]>
platform/x86: thinkpad_acpi: Add BAT1 is primary battery quirk for Thinkpad Yoga 11e 4th gen
Hans de Goede <[email protected]>
platform/x86: thinkpad_acpi: Do not report SW_TABLET_MODE on Yoga 11e
Iakov 'Jake' Kirilenko <[email protected]>
platform/x86: thinkpad_acpi: add P1 gen3 second fan support
Jon Hunter <[email protected]>
arm64: tegra: Disable the ACONNECT for Jetson TX2
Peter Zijlstra <[email protected]>
intel_idle: Fix intel_idle() vs tracing
Peter Zijlstra <[email protected]>
sched/idle: Fix arch_cpu_idle() vs tracing
Hao Si <[email protected]>
soc: fsl: dpio: Get the cpumask through cpumask_of(cpu)
Filipe Manana <[email protected]>
btrfs: fix lockdep splat when enabling and disabling qgroups
Filipe Manana <[email protected]>
btrfs: do nofs allocations when adding and removing qgroup relations
Oded Gabbay <[email protected]>
habanalabs/gaudi: fix missing code in ECC handling
John Stultz <[email protected]>
arm-smmu-qcom: Ensure the qcom_scm driver has finished probing
Ran Wang <[email protected]>
spi: spi-nxp-fspi: fix fspi panic by unexpected interrupts
Krzysztof Kozlowski <[email protected]>
drm/exynos: depend on COMMON_CLK to fix compile tests
Xu Qiang <[email protected]>
irqchip/gic-v3-its: Unconditionally save/restore the ITS state on suspend
Lijun Pan <[email protected]>
ibmvnic: skip tx timeout reset while in resetting
Georgi Djakov <[email protected]>
interconnect: qcom: qcs404: Remove GPU and display RPM IDs
Georgi Djakov <[email protected]>
interconnect: qcom: msm8916: Remove rpm-ids from non-RPM nodes
Can Guo <[email protected]>
scsi: ufs: Make sure clk scaling happens only when HBA is runtime ACTIVE
Can Guo <[email protected]>
scsi: ufs: Fix unexpected values from ufshcd_read_desc_param()
Vineet Gupta <[email protected]>
ARC: stack unwinding: don't assume non-current task is sleeping
Zhen Lei <[email protected]>
arm64: dts: broadcom: clear the warnings caused by empty dma-ranges
Michael Ellerman <[email protected]>
powerpc: Drop -me200 addition to build flags
Sara Sharon <[email protected]>
iwlwifi: mvm: fix kernel panic in case of assert during CSA
Johannes Berg <[email protected]>
iwlwifi: pcie: set LTR to avoid completion timeout
Mordechay Goodstein <[email protected]>
iwlwifi: sta: set max HE max A-MPDU according to HE capa
Markus Reichl <[email protected]>
arm64: dts: rockchip: Reorder LED triggers from mmc devices on rk3399-roc-pc.
Markus Reichl <[email protected]>
arm64: dts: rockchip: Assign a fixed index to mmc devices on rk3399 boards.
Johannes Berg <[email protected]>
iwlwifi: pcie: limit memory read spin time
Maciej Matuszczyk <[email protected]>
arm64: dts: rockchip: Remove system-power-controller from pmic on Odroid Go Advance
Al Cooper <[email protected]>
phy: usb: Fix incorrect clearing of tca_drv_sel bit in SETUP reg for 7211
Liu Zixian <[email protected]>
mm/mmap.c: fix mmap return value when vma is merged after call_mmap()
Randy Dunlap <[email protected]>
zlib: export S390 symbols for zlib modules
Linus Walleij <[email protected]>
usb: ohci-omap: Fix descriptor conversion
Namhyung Kim <[email protected]>
perf/x86/intel: Fix a warning on x86_pmu_stop() with large PEBS
Luca Coelho <[email protected]>
iwlwifi: pcie: invert values of NO_160 device config entries
Randy Dunlap <[email protected]>
vdpa: mlx5: fix vdpa/vhost dependencies
Randy Dunlap <[email protected]>
net: broadcom CNIC: requires MMU
Jing Xiangfeng <[email protected]>
scsi: storvsc: Fix error return in storvsc_probe()
Sami Tolvanen <[email protected]>
samples/ftrace: Mark my_tramp[12]? global
Zhang Qilong <[email protected]>
can: kvaser_pciefd: kvaser_pciefd_open(): fix error handling
Zhang Qilong <[email protected]>
can: c_can: c_can_power_up(): fix error handling
Jeroen Hofstee <[email protected]>
can: sun4i_can: sun4i_can_err(): don't count arbitration lose as an error
Jeroen Hofstee <[email protected]>
can: sja1000: sja1000_err(): don't count arbitration lose as an error
Marc Kleine-Budde <[email protected]>
can: m_can: tcan4x5x_can_probe(): fix error path: remove erroneous clk_disable_unprepare()
Sebastian Reichel <[email protected]>
drm/panel: sony-acx565akm: Fix race condition in probe
Paul Kocialkowski <[email protected]>
drm/rockchip: Avoid uninitialized use of endpoint id in LVDS
Dany Madden <[email protected]>
ibmvnic: reduce wait for completion time
Dany Madden <[email protected]>
ibmvnic: send_login should check for crq errors
Sukadev Bhattiprolu <[email protected]>
ibmvnic: track pending login
Sukadev Bhattiprolu <[email protected]>
ibmvnic: delay next reset if hard reset fails
Dany Madden <[email protected]>
ibmvnic: avoid memset null scrq msgs
Dany Madden <[email protected]>
ibmvnic: stop free_all_rwi on failed reset
Dany Madden <[email protected]>
ibmvnic: handle inconsistent login with reset
Wang Hai <[email protected]>
ipvs: fix possible memory leak in ip_vs_control_net_init
Sven Eckelmann <[email protected]>
batman-adv: Don't always reallocate the fragmentation skb head
Sven Eckelmann <[email protected]>
batman-adv: Reserve needed_*room for fragments
Sven Eckelmann <[email protected]>
batman-adv: Consider fragmentation for needed_headroom
Nicholas Piggin <[email protected]>
powerpc/64s: Fix hash ISA v3.0 TLBIEL instruction generation
Si-Wei Liu <[email protected]>
vhost-vdpa: fix page pinning leakage in error path (rework)
Zhen Lei <[email protected]>
bpftool: Fix error return value in build_btf_type_table
Björn Töpel <[email protected]>
net, xsk: Avoid taking multiple skbuff references
Masami Hiramatsu <[email protected]>
tools/bootconfig: Fix to check the write failure correctly
Hans de Goede <[email protected]>
ASoC: Intel: bytcr_rt5640: Fix HP Pavilion x2 Detachable quirks
Steven Rostedt (VMware) <[email protected]>
kprobes: Tell lockdep about kprobe nesting
Masami Hiramatsu <[email protected]>
kprobes: Remove NMI context check
Minchan Kim <[email protected]>
mm/zsmalloc.c: drop ZSMALLOC_PGTABLE_MAPPING
Nick Desaulniers <[email protected]>
Kbuild: do not emit debug info for assembly with LLVM_IAS=1
-------------
Diffstat:
Makefile | 7 +- arch/alpha/kernel/process.c | 2 +- arch/arc/kernel/stacktrace.c | 23 ++-- arch/arm/configs/omap2plus_defconfig | 1 - arch/arm/kernel/process.c | 2 +- arch/arm/mach-omap1/board-osk.c | 2 +- .../boot/dts/broadcom/stingray/stingray-usb.dtsi | 20 ++-- arch/arm64/boot/dts/nvidia/tegra186-p2771-0000.dts | 12 -- arch/arm64/boot/dts/rockchip/rk3326-odroid-go2.dts | 1 - arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtsi | 4 +- arch/arm64/boot/dts/rockchip/rk3399.dtsi | 3 + arch/arm64/kernel/process.c | 2 +- arch/csky/kernel/process.c | 2 +- arch/h8300/kernel/process.c | 2 +- arch/hexagon/kernel/process.c | 2 +- arch/ia64/kernel/process.c | 2 +- arch/microblaze/kernel/process.c | 2 +- arch/mips/kernel/idle.c | 12 +- arch/nios2/kernel/process.c | 2 +- arch/openrisc/kernel/process.c | 2 +- arch/parisc/kernel/process.c | 2 +- arch/powerpc/Makefile | 1 - arch/powerpc/kernel/idle.c | 4 +- arch/powerpc/mm/book3s64/hash_native.c | 2 +- arch/riscv/kernel/process.c | 2 +- arch/s390/kernel/entry.S | 15 --- arch/s390/kernel/idle.c | 6 +- arch/s390/lib/delay.c | 5 +- arch/sh/kernel/idle.c | 2 +- arch/sparc/kernel/leon_pmc.c | 4 +- arch/sparc/kernel/process_32.c | 2 +- arch/sparc/kernel/process_64.c | 4 +- arch/um/kernel/process.c | 2 +- arch/x86/events/intel/ds.c | 2 +- arch/x86/include/asm/mwait.h | 2 - arch/x86/include/asm/pgtable_types.h | 1 + arch/x86/include/asm/sync_core.h | 9 +- arch/x86/kernel/apic/vector.c | 24 ++-- arch/x86/kernel/kprobes/opt.c | 22 +++- arch/x86/kernel/process.c | 12 +- arch/x86/mm/mem_encrypt_identity.c | 4 +- arch/x86/mm/tlb.c | 10 +- drivers/Makefile | 1 + drivers/block/xen-blkback/blkback.c | 89 +++------------ drivers/block/xen-blkback/common.h | 4 +- drivers/block/xen-blkback/xenbus.c | 6 +- drivers/gpu/drm/amd/amdgpu/sdma_v5_2.c | 2 +- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 9 +- drivers/gpu/drm/exynos/Kconfig | 3 +- drivers/gpu/drm/i915/display/intel_dp.c | 2 +- drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c | 7 +- drivers/gpu/drm/i915/gt/intel_lrc.c | 7 +- drivers/gpu/drm/i915/gt/intel_mocs.c | 7 +- drivers/gpu/drm/panel/panel-sony-acx565akm.c | 2 +- drivers/gpu/drm/rockchip/rockchip_lvds.c | 2 +- drivers/idle/intel_idle.c | 37 ++++--- drivers/input/misc/cm109.c | 7 +- drivers/input/serio/i8042-x86ia64io.h | 42 +++++++ drivers/interconnect/qcom/msm8916.c | 12 +- drivers/interconnect/qcom/qcs404.c | 4 +- drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c | 4 + drivers/irqchip/irq-gic-v3-its.c | 16 +-- drivers/media/cec/usb/pulse8/pulse8-cec.c | 52 ++++++--- drivers/misc/habanalabs/gaudi/gaudi.c | 2 + drivers/mmc/core/block.c | 2 +- drivers/mmc/host/mtk-sd.c | 33 ++++-- drivers/mmc/host/sdhci-of-arasan.c | 3 + drivers/net/can/c_can/c_can.c | 18 ++- drivers/net/can/kvaser_pciefd.c | 4 +- drivers/net/can/m_can/m_can.c | 2 + drivers/net/can/m_can/tcan4x5x.c | 11 +- drivers/net/can/sja1000/sja1000.c | 1 - drivers/net/can/sun4i_can.c | 1 - drivers/net/ethernet/broadcom/Kconfig | 1 + drivers/net/ethernet/ibm/ibmvnic.c | 98 ++++++++++------ drivers/net/ethernet/ibm/ibmvnic.h | 1 + drivers/net/wireless/intel/iwlwifi/fw/api/sta.h | 10 +- drivers/net/wireless/intel/iwlwifi/iwl-config.h | 4 +- drivers/net/wireless/intel/iwlwifi/iwl-csr.h | 10 ++ drivers/net/wireless/intel/iwlwifi/mvm/mac80211.c | 2 +- drivers/net/wireless/intel/iwlwifi/mvm/sta.c | 18 +++ .../wireless/intel/iwlwifi/pcie/ctxt-info-gen3.c | 20 ++++ drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 36 ++++-- drivers/phy/broadcom/phy-brcm-usb-init-synopsys.c | 5 - drivers/pinctrl/intel/pinctrl-jasperlake.c | 2 +- drivers/pinctrl/pinctrl-amd.c | 7 -- drivers/platform/x86/acer-wmi.c | 1 + drivers/platform/x86/intel-vbtn.c | 6 + drivers/platform/x86/thinkpad_acpi.c | 12 +- drivers/platform/x86/touchscreen_dmi.c | 50 +++++++++ drivers/scsi/be2iscsi/be_main.c | 4 +- drivers/scsi/storvsc_drv.c | 4 +- drivers/scsi/ufs/ufshcd.c | 31 ++++-- drivers/soc/fsl/dpio/dpio-driver.c | 5 +- drivers/spi/spi-nxp-fspi.c | 7 ++ drivers/usb/host/ohci-omap.c | 4 +- drivers/vdpa/Kconfig | 1 + drivers/vhost/vdpa.c | 80 +++++++++++--- drivers/xen/grant-table.c | 123 +++++++++++++++++++++ drivers/xen/unpopulated-alloc.c | 20 ++-- drivers/xen/xen-scsiback.c | 60 ++-------- fs/btrfs/ctree.h | 5 +- fs/btrfs/qgroup.c | 66 +++++++++-- fs/proc/task_mmu.c | 8 +- fs/zonefs/super.c | 14 ++- include/asm-generic/barrier.h | 1 + include/linux/build_bug.h | 5 + include/linux/compiler-clang.h | 6 - include/linux/compiler-gcc.h | 19 ---- include/linux/compiler.h | 18 ++- include/linux/netdevice.h | 14 ++- include/linux/zsmalloc.h | 1 - include/xen/grant_table.h | 17 +++ kernel/kprobes.c | 41 ++++--- kernel/sched/idle.c | 28 ++++- lib/zlib_dfltcc/dfltcc_inflate.c | 3 + mm/Kconfig | 13 --- mm/hugetlb.c | 1 + mm/mmap.c | 26 ++--- mm/zsmalloc.c | 48 -------- net/batman-adv/fragmentation.c | 26 +++-- net/batman-adv/hard-interface.c | 3 + net/core/dev.c | 8 +- net/netfilter/ipvs/ip_vs_ctl.c | 31 +++++- net/xdp/xsk.c | 8 +- samples/ftrace/ftrace-direct-modify.c | 2 + samples/ftrace/ftrace-direct-too.c | 1 + samples/ftrace/ftrace-direct.c | 1 + sound/soc/intel/boards/bytcr_rt5640.c | 17 ++- tools/bootconfig/main.c | 30 ++++- tools/bpf/bpftool/btf.c | 1 + tools/testing/ktest/ktest.pl | 2 +- 132 files changed, 1095 insertions(+), 625 deletions(-)
Greg Kroah-Hartman
maintainerPATCH 28/105 can: kvaser_pciefd: kvaser_pciefd_open(): fix error handling
From: Zhang Qilong <[email protected]>
[ Upstream commit 13a84cf37a4cf1155a41684236c2314eb40cd65c ]
If kvaser_pciefd_bus_on() failed, we should call close_candev() to avoid reference leak.
--- drivers/net/can/kvaser_pciefd.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/net/can/kvaser_pciefd.c +3 -1
@@ -692,8 +692,10 @@ static int kvaser_pciefd_open(struct net_device *netdev)return err; err =kvaser_pciefd_bus_on (can); -if (err) +if (err) { +close_candev (netdev);return err; + }return 0 ; }
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 15/105 ibmvnic: handle inconsistent login with reset
In reply to Greg Kroah-HartmanFrom: Dany Madden <[email protected]>
[ Upstream commit 31d6b4036098f6b59bcfa20375626b500c7d7417 ]
Inconsistent login with the vnicserver is causing the device to be removed. This does not give the device a chance to recover from error state. This patch schedules a FATAL reset instead to bring the adapter up.
--- drivers/net/ethernet/ibm/ibmvnic.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/net/ethernet/ibm/ibmvnic.c +1 -1
@@ -4400,7 +4400,7 @@ static int handle_login_rsp(union ibmvnic_crq *login_rsp_crq, adapter->req_rx_add_queues != be32_to_cpu(login_rsp->num_rxadd_subcrqs))) {dev_err (dev,"FATAL: Inconsistent login and login rsp\n" ); -ibmvnic_remove (adapter->vdev); +ibmvnic_reset (adapter,VNIC_RESET_FATAL );return -EIO ; }release_login_buffer (adapter);
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 19/105 ibmvnic: track pending login
In reply to Greg Kroah-HartmanFrom: Sukadev Bhattiprolu <[email protected]>
[ Upstream commit 76cdc5c5d99ce4856ad0ac38facc33b52fa64f77 ]
If after ibmvnic sends a LOGIN it gets a FAILOVER, it is possible that the worker thread will start reset process and free the login response buffer before it gets a (now stale) LOGIN_RSP. The ibmvnic tasklet will then try to access the login response buffer and crash.
Have ibmvnic track pending logins and discard any stale login responses.
--- drivers/net/ethernet/ibm/ibmvnic.c | 17 +++++++++++++++++ drivers/net/ethernet/ibm/ibmvnic.h | 1 + 2 files changed, 18 insertions(+)
drivers/net/ethernet/ibm/ibmvnic.c +17 -0
@@ -3843,6 +3843,8 @@ static int send_login(struct ibmvnic_adapter *adapter) crq.login.cmd =LOGIN ; crq.login.ioba =cpu_to_be32 (buffer_token); crq.login.len =cpu_to_be32 (buffer_size); + + adapter->login_pending = true;ibmvnic_send_crq (adapter, &crq);return 0 ;
@@ -4374,6 +4376,15 @@ static int handle_login_rsp(union ibmvnic_crq *login_rsp_crq,struct ibmvnic_login_buffer *login = adapter->login_buf;int i; +/* CHECK: Test/set of login_pending does not need to be atomic +* because only ibmvnic_tasklet tests/clears this. +*/ +if (!adapter->login_pending) { +netdev_warn (netdev,"Ignoring unexpected login response\n" ); +return 0 ; + } + adapter->login_pending = false; +dma_unmap_single (dev, adapter->login_buf_token, adapter->login_buf_sz,DMA_TO_DEVICE ); dma_unmap_single(dev, adapter->login_rsp_buf_token,
@@ -4721,6 +4732,11 @@ static void ibmvnic_handle_crq(union ibmvnic_crq *crq,case IBMVNIC_CRQ_INIT :dev_info (dev,"Partner initialized\n" ); adapter->from_passive_init = true; +/* Discard any stale login responses from prev reset. +* CHECK: should we clear even on INIT_COMPLETE? +*/ + adapter->login_pending = false; +if (!completion_done (&adapter->init_done)) {complete (&adapter->init_done); adapter->init_done_rc = -EIO ;
@@ -5188,6 +5204,7 @@ static int ibmvnic_probe(struct vio_dev *dev, const struct vio_device_id *id)dev_set_drvdata (&dev->dev, netdev); adapter->vdev = dev; adapter->netdev = netdev; + adapter->login_pending = false;ether_addr_copy (adapter->mac_addr, mac_addr_p);ether_addr_copy (netdev->dev_addr, adapter->mac_addr);
drivers/net/ethernet/ibm/ibmvnic.h +1 -0
@@ -1084,6 +1084,7 @@ struct ibmvnic_adapter {struct delayed_work ibmvnic_delayed_reset;unsigned long resetting;bool napi_enabled, from_passive_init; +bool login_pending;bool failover_pending;bool force_reset_recovery;
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 30/105 scsi: storvsc: Fix error return in storvsc_probe()
In reply to Greg Kroah-HartmanFrom: Jing Xiangfeng <[email protected]>
[ Upstream commit 6112ff4e8f393e7e297dff04eff0987f94d37fa1 ]
Return -ENOMEM from the error handling case instead of 0.
--- drivers/scsi/storvsc_drv.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/scsi/storvsc_drv.c +3 -1
@@ -1952,8 +1952,10 @@ static int storvsc_probe(struct hv_device *device,alloc_ordered_workqueue ("storvsc_error_wq_%d" ,WQ_MEM_RECLAIM , host->host_no); -if (!host_dev->handle_error_wq) +if (!host_dev->handle_error_wq) { + ret = -ENOMEM ; goto err_out2; + }INIT_WORK (&host_dev->host_scan_work, storvsc_host_scan);/* Register the HBA and start the scsi bus scan */ ret =scsi_add_host (host, &device->device);
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 33/105 iwlwifi: pcie: invert values of NO_160 device config entries
In reply to Greg Kroah-HartmanFrom: Luca Coelho <[email protected]>
[ Upstream commit 568d3434178b00274615190a19d29c3d235b4e6d ]
The NO_160 flag specifies if the device doesn't have 160 MHz support, but we errorneously assumed the opposite. If the flag was set, we were considering that 160 MHz was supported, but it's actually the opposite. Fix it by inverting the bits, i.e. NO_160 is 0x1 and 160 is 0x0.
--- drivers/net/wireless/intel/iwlwifi/iwl-config.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/net/wireless/intel/iwlwifi/iwl-config.h +2 -2
@@ -488,8 +488,8 @@ struct iwl_cfg {#define IWL_CFG_RF_ID_HR 0x7#define IWL_CFG_RF_ID_HR1 0x4 -#define IWL_CFG_NO_160 0x0 -#define IWL_CFG_160 0x1 +#define IWL_CFG_NO_160 0x1 +#define IWL_CFG_160 0x0#define IWL_CFG_CORES_BT 0x0#define IWL_CFG_CORES_BT_GNSS 0x5
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 29/105 samples/ftrace: Mark my_tramp[12]? global
In reply to Greg Kroah-HartmanFrom: Sami Tolvanen <[email protected]>
[ Upstream commit 983df5f2699f83f78643b19d3399b160d1e64f5b ]
my_tramp[12]? are declared as global functions in C, but they are not marked global in the inline assembly definition. This mismatch confuses Clang's Control-Flow Integrity checking. Fix the definitions by adding .globl.
--- samples/ftrace/ftrace-direct-modify.c | 2 ++ samples/ftrace/ftrace-direct-too.c | 1 + samples/ftrace/ftrace-direct.c | 1 + 3 files changed, 4 insertions(+)
samples/ftrace/ftrace-direct-modify.c +2 -0
@@ -21,6 +21,7 @@ static unsigned long my_ip = (unsigned long)schedule; asm (" .pushsection .text, \"ax\", @progbits\n" " .type my_tramp1, @function\n" +" .globl my_tramp1\n" " my_tramp1:" " pushq %rbp\n" " movq %rsp, %rbp\n"
@@ -29,6 +30,7 @@ asm (" .size my_tramp1, .-my_tramp1\n" " ret\n" " .type my_tramp2, @function\n" +" .globl my_tramp2\n" " my_tramp2:" " pushq %rbp\n" " movq %rsp, %rbp\n"
samples/ftrace/ftrace-direct-too.c +1 -0
@@ -16,6 +16,7 @@ extern void my_tramp(void *); asm (" .pushsection .text, \"ax\", @progbits\n" " .type my_tramp, @function\n" +" .globl my_tramp\n" " my_tramp:" " pushq %rbp\n" " movq %rsp, %rbp\n"
samples/ftrace/ftrace-direct.c +1 -0
@@ -14,6 +14,7 @@ extern void my_tramp(void *); asm (" .pushsection .text, \"ax\", @progbits\n" " .type my_tramp, @function\n" +" .globl my_tramp\n" " my_tramp:" " pushq %rbp\n" " movq %rsp, %rbp\n"
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 16/105 ibmvnic: stop free_all_rwi on failed reset
In reply to Greg Kroah-HartmanFrom: Dany Madden <[email protected]>
[ Upstream commit 18f141bf97d42f65abfdf17fd93fb3a0dac100e7 ]
When ibmvnic fails to reset, it breaks out of the reset loop and frees all of the remaining resets from the workqueue. Doing so prevents the adapter from recovering if no reset is scheduled after that. Instead, have the driver continue to process resets on the workqueue.
Remove the no longer need free_all_rwi().
--- drivers/net/ethernet/ibm/ibmvnic.c | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-)
drivers/net/ethernet/ibm/ibmvnic.c +3 -19
@@ -2186,17 +2186,6 @@ static struct ibmvnic_rwi *get_next_rwi(struct ibmvnic_adapter *adapter)return rwi; } -static void free_all_rwi (struct ibmvnic_adapter *adapter) -{ -struct ibmvnic_rwi *rwi; - - rwi =get_next_rwi (adapter); -while (rwi) { -kfree (rwi); - rwi =get_next_rwi (adapter); - } -} -static void __ibmvnic_reset (struct work_struct *work) {struct ibmvnic_rwi *rwi;
@@ -2265,9 +2254,9 @@ static void __ibmvnic_reset(struct work_struct *work)else adapter->state = reset_state; rc =0 ; - }else if (rc && rc !=IBMVNIC_INIT_FAILED && - !adapter->force_reset_recovery) -break ; + } +if (rc) +netdev_dbg (adapter->netdev,"Reset failed, rc=%d\n" , rc); rwi =get_next_rwi (adapter);
@@ -2281,11 +2270,6 @@ static void __ibmvnic_reset(struct work_struct *work)complete (&adapter->reset_done); } -if (rc) { -netdev_dbg (adapter->netdev,"Reset failed\n" ); -free_all_rwi (adapter); - } -clear_bit_unlock (0 , &adapter->resetting); }
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 14/105 ipvs: fix possible memory leak in ip_vs_control_net_init
In reply to Greg Kroah-HartmanFrom: Wang Hai <[email protected]>
[ Upstream commit 4bc3c8dc9f5f1eff0d3bfa59491383ac11308b6b ]
kmemleak report a memory leak as follows:
BUG: memory leak unreferenced object 0xffff8880759ea000 (size 256): backtrace: [<00000000c0bf2deb>] kmem_cache_zalloc include/linux/slab.h:656 [inline] [<00000000c0bf2deb>] __proc_create+0x23d/0x7d0 fs/proc/generic.c:421 [<000000009d718d02>] proc_create_reg+0x8e/0x140 fs/proc/generic.c:535 [<0000000097bbfc4f>] proc_create_net_data+0x8c/0x1b0 fs/proc/proc_net.c:126 [<00000000652480fc>] ip_vs_control_net_init+0x308/0x13a0 net/netfilter/ipvs/ip_vs_ctl.c:4169 [<000000004c927ebe>] __ip_vs_init+0x211/0x400 net/netfilter/ipvs/ip_vs_core.c:2429 [<00000000aa6b72d9>] ops_init+0xa8/0x3c0 net/core/net_namespace.c:151 [<00000000153fd114>] setup_net+0x2de/0x7e0 net/core/net_namespace.c:341 [<00000000be4e4f07>] copy_net_ns+0x27d/0x530 net/core/net_namespace.c:482 [<00000000f1c23ec9>] create_new_namespaces+0x382/0xa30 kernel/nsproxy.c:110 [<00000000098a5757>] copy_namespaces+0x2e6/0x3b0 kernel/nsproxy.c:179 [<0000000026ce39e9>] copy_process+0x220a/0x5f00 kernel/fork.c:2072 [<00000000b71f4efe>] _do_fork+0xc7/0xda0 kernel/fork.c:2428 [<000000002974ee96>] __do_sys_clone3+0x18a/0x280 kernel/fork.c:2703 [<0000000062ac0a4d>] do_syscall_64+0x33/0x40 arch/x86/entry/common.c:46 [<0000000093f1ce2c>] entry_SYSCALL_64_after_hwframe+0x44/0xa9
In the error path of ip_vs_control_net_init(), remove_proc_entry() needs to be called to remove the added proc entry, otherwise a memory leak will occur.
Also, add some '#ifdef CONFIG_PROC_FS' because proc_create_net* return NULL when PROC is not used.
--- net/netfilter/ipvs/ip_vs_ctl.c | 31 +++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-)
net/netfilter/ipvs/ip_vs_ctl.c +25 -6
@@ -4167,12 +4167,18 @@ int __net_init ip_vs_control_net_init(struct netns_ipvs *ipvs)spin_lock_init (&ipvs->tot_stats.lock); -proc_create_net ("ip_vs" ,0 , ipvs->net->proc_net, &ip_vs_info_seq_ops, -sizeof (struct ip_vs_iter )); -proc_create_net_single ("ip_vs_stats" ,0 , ipvs->net->proc_net, - ip_vs_stats_show,NULL ); -proc_create_net_single ("ip_vs_stats_percpu" ,0 , ipvs->net->proc_net, - ip_vs_stats_percpu_show,NULL ); +#ifdef CONFIG_PROC_FS +if (!proc_create_net ("ip_vs" ,0 , ipvs->net->proc_net, + &ip_vs_info_seq_ops,sizeof (struct ip_vs_iter ))) + goto err_vs; +if (!proc_create_net_single ("ip_vs_stats" ,0 , ipvs->net->proc_net, + ip_vs_stats_show,NULL )) + goto err_stats; +if (!proc_create_net_single ("ip_vs_stats_percpu" ,0 , + ipvs->net->proc_net, + ip_vs_stats_percpu_show,NULL )) + goto err_percpu; +#endif if (ip_vs_control_net_init_sysctl (ipvs)) goto err;
@@ -4180,6 +4186,17 @@ int __net_init ip_vs_control_net_init(struct netns_ipvs *ipvs)return 0 ; err: +#ifdef CONFIG_PROC_FS +remove_proc_entry ("ip_vs_stats_percpu" , ipvs->net->proc_net); + +err_percpu: +remove_proc_entry ("ip_vs_stats" , ipvs->net->proc_net); + +err_stats: +remove_proc_entry ("ip_vs" , ipvs->net->proc_net); + +err_vs: +#endif free_percpu (ipvs->tot_stats.cpustats);return -ENOMEM ; }
@@ -4188,9 +4205,11 @@ void __net_exit ip_vs_control_net_cleanup(struct netns_ipvs *ipvs) {ip_vs_trash_cleanup (ipvs);ip_vs_control_net_cleanup_sysctl (ipvs); +#ifdef CONFIG_PROC_FS remove_proc_entry ("ip_vs_stats_percpu" , ipvs->net->proc_net);remove_proc_entry ("ip_vs_stats" , ipvs->net->proc_net);remove_proc_entry ("ip_vs" , ipvs->net->proc_net); +#endif free_percpu (ipvs->tot_stats.cpustats); }
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 12/105 batman-adv: Reserve needed_*room for fragments
In reply to Greg Kroah-HartmanFrom: Sven Eckelmann <[email protected]>
[ Upstream commit c5cbfc87558168ef4c3c27ce36eba6b83391db19 ]
The batadv net_device is trying to propagate the needed_headroom and needed_tailroom from the lower devices. This is needed to avoid cost intensive reallocations using pskb_expand_head during the transmission.
But the fragmentation code split the skb's without adding extra room at the end/beginning of the various fragments. This reduced the performance of transmissions over complex scenarios (batadv on vxlan on wireguard) because the lower devices had to perform the reallocations at least once.
--- net/batman-adv/fragmentation.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-)
net/batman-adv/fragmentation.c +10 -5
@@ -391,6 +391,7 @@ out:/** * batadv_frag_create() - create a fragment from skb +* @net_dev: outgoing device for fragment * @skb: skb to create fragment from * @frag_head: header to use in new fragment * @fragment_size: size of new fragment
@@ -401,22 +402,25 @@ out:* * Return: the new fragment, NULL on error. */ -static struct sk_buff *batadv_frag_create (struct sk_buff *skb, +static struct sk_buff *batadv_frag_create (struct net_device *net_dev, +struct sk_buff *skb,struct batadv_frag_packet *frag_head,unsigned int fragment_size) { +unsigned int ll_reserved =LL_RESERVED_SPACE (net_dev); +unsigned int tailroom = net_dev->needed_tailroom;struct sk_buff *skb_fragment;unsigned int header_size =sizeof (*frag_head);unsigned int mtu = fragment_size + header_size; - skb_fragment =netdev_alloc_skb (NULL , mtu +ETH_HLEN ); + skb_fragment =dev_alloc_skb (ll_reserved + mtu + tailroom);if (!skb_fragment) goto err; skb_fragment->priority = skb->priority;/* Eat the last mtu-bytes of the skb */ -skb_reserve (skb_fragment, header_size +ETH_HLEN ); +skb_reserve (skb_fragment, ll_reserved + header_size);skb_split (skb, skb_fragment, skb->len - fragment_size);/* Add the header */
@@ -439,11 +443,12 @@ int batadv_frag_send_packet(struct sk_buff *skb,struct batadv_orig_node *orig_node, struct batadv_neigh_node *neigh_node) { + struct net_device *net_dev = neigh_node->if_incoming->net_dev;struct batadv_priv *bat_priv;struct batadv_hard_iface *primary_if =NULL ;struct batadv_frag_packet frag_header;struct sk_buff *skb_fragment; -unsigned int mtu = neigh_node->if_incoming->net_dev->mtu; +unsigned int mtu = net_dev->mtu;unsigned int header_size =sizeof (frag_header);unsigned int max_fragment_size, num_fragments;int ret;
@@ -503,7 +508,7 @@ int batadv_frag_send_packet(struct sk_buff *skb, goto put_primary_if; } - skb_fragment =batadv_frag_create (skb, &frag_header, + skb_fragment =batadv_frag_create (net_dev, skb, &frag_header, max_fragment_size);if (!skb_fragment) { ret = -ENOMEM ;
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 6/105 tools/bootconfig: Fix to check the write failure correctly
In reply to Greg Kroah-HartmanFrom: Masami Hiramatsu <[email protected]>
[ Upstream commit a995e6bc0524450adfd6181dfdcd9d0520cfaba5 ]
Fix to check the write(2) failure including partial write correctly and try to rollback the partial write, because if there is no BOOTCONFIG_MAGIC string, we can not remove it.
--- tools/bootconfig/main.c | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-)
tools/bootconfig/main.c +26 -4
@@ -274,6 +274,7 @@ static void show_xbc_error(const char *data, const char *msg, int pos)int apply_xbc (const char *path,const char *xbc_path) { +struct stat stat;u32 size, csum;char *buf, *data;int ret, fd;
@@ -330,16 +331,26 @@ int apply_xbc(const char *path, const char *xbc_path)return fd; }/* TODO: Ensure the @path is initramfs/initrd image */ +if (fstat (fd, &stat) <0 ) { +pr_err ("Failed to get the size of %s\n" , path); + goto out; + } ret =write (fd, data, size +8 ); -if (ret <0 ) { +if (ret < size +8 ) { +if (ret <0 ) + ret = -errno;pr_err ("Failed to apply a boot config: %d\n" , ret); - goto out; +if (ret <0 ) + goto out; + goto out_rollback; }/* Write a magic word of the bootconfig */ ret =write (fd,BOOTCONFIG_MAGIC ,BOOTCONFIG_MAGIC_LEN ); -if (ret <0 ) { +if (ret <BOOTCONFIG_MAGIC_LEN ) { +if (ret <0 ) + ret = -errno;pr_err ("Failed to apply a boot config magic: %d\n" , ret); - goto out; + goto out_rollback; } ret =0 ; out:
@@ -347,6 +358,17 @@ out:free (data);return ret; + +out_rollback: +/* Map the partial write to -ENOSPC */ +if (ret >=0 ) + ret = -ENOSPC ; +if (ftruncate (fd, stat.st_size) <0 ) { + ret = -errno; +pr_err ("Failed to rollback the write error: %d\n" , ret); +pr_err ("The initrd %s may be corrupted. Recommend to rebuild.\n" , path); + } + goto out; }int usage (void )
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 10/105 powerpc/64s: Fix hash ISA v3.0 TLBIEL instruction generation
In reply to Greg Kroah-HartmanFrom: Nicholas Piggin <[email protected]>
[ Upstream commit 5844cc25fd121074de7895181a2fa1ce100a0fdd ]
A typo has the R field of the instruction assigned by lucky dip a la register allocator.
--- arch/powerpc/mm/book3s64/hash_native.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
arch/powerpc/mm/book3s64/hash_native.c +1 -1
@@ -68,7 +68,7 @@ static __always_inline void tlbiel_hash_set_isa300(unsigned int set, unsigned in rs = ((unsigned long )pid <<PPC_BITLSHIFT (31 )); asm volatile(PPC_TLBIEL(%0, %1, %2, %3, %4) - : : "r"(rb), "r"(rs), "i"(ric), "i"(prs), "r"(r) + : : "r"(rb), "r"(rs), "i"(ric), "i"(prs), "i"(r) : "memory"); }
Signature · 1 line
2.27.0
Greg Kroah-Hartman
maintainerPATCH 1/105 Kbuild: do not emit debug info for assembly with LLVM_IAS=1
In reply to Greg Kroah-HartmanFrom: Nick Desaulniers <[email protected]>
commit b8a9092330da2030496ff357272f342eb970d51b upstream.
Clang's integrated assembler produces the warning for assembly files:
warning: DWARF2 only supports one section per compilation unit
If -Wa,-gdwarf-* is unspecified, then debug info is not emitted for assembly sources (it is still emitted for C sources). This will be re-enabled for newer DWARF versions in a follow up patch.
Enables defconfig+CONFIG_DEBUG_INFO to build cleanly with LLVM=1 LLVM_IAS=1 for x86_64 and arm64.
[nd: backport to avoid conflicts from:
commit 695afd3d7d58 ("kbuild: Simplify DEBUG_INFO Kconfig handling")]
--- Makefile | 3 +++ 1 file changed, 3 insertions(+)
Makefile +3 -0
@@ -821,8 +821,11 @@ DEBUG_CFLAGS += -gsplit-dwarf else DEBUG_CFLAGS += -g endif +ifneq ($(LLVM_IAS),1) KBUILD_AFLAGS += -Wa,-gdwarf-2 endif +endif + ifdef CONFIG_DEBUG_INFO_DWARF4 DEBUG_CFLAGS += -gdwarf-4 endif
Quoted 17 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.9.15 release. There are 105 patches in this series, all will be posted as a response
to this one. If anyone has any issues with these being applied, please
let me know.Responses should be made by Wed, 16 Dec 2020 17:25:32 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.9.15-rc1.gz
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-
stable-rc.git linux-5.9.y
and the diffstat can be found below.
Quoted 3 lines
thanks,
greg k-h
hello,
Compiled and booted 5.9.15-rc1+ . No typical dmesg regression or regressions
Signature · 2 lines
software engineer rajagiri school of engineering and technology - autonomous
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.9.15 release. There are 105 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Wed, 16 Dec 2020 17:25:32 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 9 lines
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.9.15-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-5.9.y
and the diffstat can be found below.thanks,
greg k-h
Compiled and booted on my test system. No dmesg regressions.
thanks,
-- Shuah
Quoted 10 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.9.15 release. There are 105 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Wed, 16 Dec 2020 17:25:32 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.9.15-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-5.9.y
and the diffstat can be found below.thanks,
greg k-h
Results from Linaro’s test farm.
No regressions on arm64, arm, x86_64, and i386.
NOTE:
Following warning(s) reported on arm64 Juno-r2 device.
sched: core.c:7270 Illegal context switch in RCU-bh read-side critical section!
https://lore.kernel.org/stable/CA+G9fYtu1zOz8ErUzftNG4Dc9=cv1grsagBojJraGhm4arqXyw@mail.gmail.com/T/#u
Summary
------------------------------------------------------------------------
kernel: 5.9.15-rc1
git repo: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
git branch: linux-5.9.y
git commit: 609d95a959259ea4ab7ecdc39c3151321a6a7032
git describe: v5.9.14-106-g609d95a95925
Test details: https://qa-reports.linaro.org/lkft/linux-stable-rc-linux-5.9.y/build/v5.9.14-106-g609d95a95925
No regressions (compared to build v5.9.14)
No fixes (compared to build v5.9.14)
Ran 53718 total tests in the following environments and test suites.
Environments
--------------
- arc
- arm
- arm64
- dragonboard-410c
- hi6220-hikey
- i386
- juno-r2
- juno-r2-compat
- juno-r2-kasan
- mips
- nxp-ls2088
- parisc
- powerpc
- qemu-arm-clang
- qemu-arm64-clang
- qemu-arm64-kasan
- qemu-i386-clang
- qemu-x86_64-clang
- qemu-x86_64-kasan
- qemu-x86_64-kcsan
- qemu_arm
- qemu_arm64
- qemu_arm64-compat
- qemu_i386
- qemu_x86_64
- qemu_x86_64-compat
- riscv
- s390
- sh
- sparc
- x15
- x86
- x86-kasan
Test Suites
-----------
* build
* linux-log-parser
* install-android-platform-tools-r2600
* kselftest
* libhugetlbfs
* ltp-commands-tests
* ltp-containers-tests
* ltp-cve-tests
* ltp-dio-tests
* ltp-fcntl-locktests-tests
* ltp-filecaps-tests
* ltp-fs-tests
* ltp-fs_bind-tests
* ltp-fs_perms_simple-tests
* ltp-fsx-tests
* ltp-io-tests
* ltp-math-tests
* ltp-sched-tests
* v4l2-compliance
* kvm-unit-tests
* ltp-cap_bounds-tests
* ltp-cpuhotplug-tests
* ltp-crypto-tests
* ltp-hugetlb-tests
* ltp-mm-tests
* ltp-nptl-tests
* ltp-pty-tests
* ltp-securebits-tests
* ltp-syscalls-tests
* network-basic-tests
* perf
* ltp-controllers-tests
* ltp-ipc-tests
* ltp-open-posix-tests
* ltp-tracing-tests
* fwts
* kunit
* rcutorture
* kselftest-vsyscall-mode-native
* kselftest-vsyscall-mode-none
Signature · 2 lines
Linaro LKFT https://lkft.linaro.org
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.9.15 release. There are 105 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Wed, 16 Dec 2020 17:25:32 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.9.15-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-5.9.y
and the diffstat can be found below.thanks,
greg k-h
All tests passing for Tegra ...
Test results for stable-v5.9:
15 builds: 15 pass, 0 fail
26 boots: 26 pass, 0 fail
64 tests: 64 pass, 0 failLinux version: 5.9.15-rc1-g609d95a95925
Boards tested: tegra124-jetson-tk1, tegra186-p2771-0000,
tegra194-p2972-0000, tegra20-ventana,
tegra210-p2371-2180, tegra210-p3450-0000,
tegra30-cardhu-a04Jon
Quoted 8 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.9.15 release. There are 105 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Wed, 16 Dec 2020 17:25:32 +0000. Anything received after that time might be too late.
Build results:
total: 154 pass: 154 fail: 0 Qemu test results: total: 427 pass: 427 fail: 0
Guenter
Greg Kroah-Hartman
maintainerQuoted 15 lines · Shuah Khan
Quoted 14 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.9.15 release. There are 105 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Wed, 16 Dec 2020 17:25:32 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.9.15-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-5.9.y
and the diffstat can be found below.
Quoted 8 lines
Quoted 4 lines
thanks,
greg k-h
Compiled and booted on my test system. No dmesg regressions.
Tested-by Shuah Khan <[email protected]>
Thanks for testing and letting me know.
gre gk-h
Greg Kroah-Hartman
maintainerQuoted 26 lines · Naresh Kamboju
Quoted 10 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.9.15 release. There are 105 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Wed, 16 Dec 2020 17:25:32 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.9.15-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-5.9.y
and the diffstat can be found below.thanks,
greg k-h
Results from Linaro’s test farm.
No regressions on arm64, arm,x86_64, and i386.
Quoted 8 lines
NOTE:
Following warning(s) reported on arm64 Juno-r2 device.
sched: core.c:7270 Illegal context switch in RCU-bh read-side critical section!
https://lore.kernel.org/stable/CA+G9fYtu1zOz8ErUzftNG4Dc9=cv1grsagBojJraGhm4arqXyw@mail.gmail.com/T/#uSummary
------------------------------------------------------------------------
Thanks for testing and letting me know.
greg k-h
Greg Kroah-Hartman
maintainerQuoted 26 lines · Jon Hunter
Quoted 9 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.9.15 release. There are 105 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Wed, 16 Dec 2020 17:25:32 +0000. Anything received after that time might be too late.
The whole patch series can be found in one patch at:
Quoted 8 lines
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.9.15-rc1.gzor in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gitlinux-5.9.y
and the diffstat can be found below.thanks,
greg k-h
All tests passing for Tegra ...
Test results for stable-v5.9:
15 builds: 15 pass, 0 fail 26 boots: 26 pass, 0 fail 64 tests: 64 pass, 0 fail
Quoted 7 lines
Linux version: 5.9.15-rc1-g609d95a95925
Boards tested: tegra124-jetson-tk1, tegra186-p2771-0000,tegra194-p2972-0000, tegra20-ventana, tegra210-p2371-2180, tegra210-p3450-0000, tegra30-cardhu-a04Tested-by Jon Hunter <[email protected]>
Thanks for testing them all and letting me know.
greg k-h
Greg Kroah-Hartman
maintainerQuoted 10 lines · Guenter Roeck
Quoted 8 lines · Greg Kroah-Hartman
This is the start of the stable review cycle for the 5.9.15 release. There are 105 patches in this series, all will be posted as a response to this one. If anyone has any issues with these being applied, please let me know.
Responses should be made by Wed, 16 Dec 2020 17:25:32 +0000. Anything received after that time might be too late.
Quoted 6 lines
Build results:
total: 154 pass: 154 fail: 0 Qemu test results: total: 427 pass: 427 fail: 0Tested-by Guenter Roeck <[email protected]>
Thanks for testing them all and letting me know.
greg k-h