rebase patches on top of Ubuntu-5.15.0-29.30
(generated with debian/scripts/import-upstream-tag) Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
ce41152248
commit
6ef2b41a1e
@ -55,10 +55,10 @@ Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
|
|||||||
2 files changed, 111 insertions(+)
|
2 files changed, 111 insertions(+)
|
||||||
|
|
||||||
diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
|
diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt
|
||||||
index 369d7f3f63cb..92f35bf44f49 100644
|
index 9b448ff43c4d..259fce98a308 100644
|
||||||
--- a/Documentation/admin-guide/kernel-parameters.txt
|
--- a/Documentation/admin-guide/kernel-parameters.txt
|
||||||
+++ b/Documentation/admin-guide/kernel-parameters.txt
|
+++ b/Documentation/admin-guide/kernel-parameters.txt
|
||||||
@@ -3908,6 +3908,15 @@
|
@@ -3907,6 +3907,15 @@
|
||||||
Also, it enforces the PCI Local Bus spec
|
Also, it enforces the PCI Local Bus spec
|
||||||
rule that those bits should be 0 in system reset
|
rule that those bits should be 0 in system reset
|
||||||
events (useful for kexec/kdump cases).
|
events (useful for kexec/kdump cases).
|
||||||
@ -75,7 +75,7 @@ index 369d7f3f63cb..92f35bf44f49 100644
|
|||||||
Safety option to keep boot IRQs enabled. This
|
Safety option to keep boot IRQs enabled. This
|
||||||
should never be necessary.
|
should never be necessary.
|
||||||
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
|
diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c
|
||||||
index bf3af7d81bdc..04ef248fb1af 100644
|
index 1c566b0cbee9..d49c54c579bb 100644
|
||||||
--- a/drivers/pci/quirks.c
|
--- a/drivers/pci/quirks.c
|
||||||
+++ b/drivers/pci/quirks.c
|
+++ b/drivers/pci/quirks.c
|
||||||
@@ -193,6 +193,106 @@ static int __init pci_apply_final_quirks(void)
|
@@ -193,6 +193,106 @@ static int __init pci_apply_final_quirks(void)
|
||||||
@ -185,7 +185,7 @@ index bf3af7d81bdc..04ef248fb1af 100644
|
|||||||
/*
|
/*
|
||||||
* Decoding should be disabled for a PCI device during BAR sizing to avoid
|
* Decoding should be disabled for a PCI device during BAR sizing to avoid
|
||||||
* conflict. But doing so may cause problems on host bridge and perhaps other
|
* conflict. But doing so may cause problems on host bridge and perhaps other
|
||||||
@@ -4915,6 +5015,8 @@ static const struct pci_dev_acs_enabled {
|
@@ -4927,6 +5027,8 @@ static const struct pci_dev_acs_enabled {
|
||||||
{ PCI_VENDOR_ID_CAVIUM, 0xA060, pci_quirk_mf_endpoint_acs },
|
{ PCI_VENDOR_ID_CAVIUM, 0xA060, pci_quirk_mf_endpoint_acs },
|
||||||
/* APM X-Gene */
|
/* APM X-Gene */
|
||||||
{ PCI_VENDOR_ID_AMCC, 0xE004, pci_quirk_xgene_acs },
|
{ PCI_VENDOR_ID_AMCC, 0xE004, pci_quirk_xgene_acs },
|
||||||
|
@ -13,7 +13,7 @@ Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
|
|||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
|
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
|
||||||
index fcceb8443aa9..f26717dea65f 100644
|
index fefdf3a6dae3..b1f35bc88be5 100644
|
||||||
--- a/virt/kvm/kvm_main.c
|
--- a/virt/kvm/kvm_main.c
|
||||||
+++ b/virt/kvm/kvm_main.c
|
+++ b/virt/kvm/kvm_main.c
|
||||||
@@ -79,7 +79,7 @@ module_param(halt_poll_ns, uint, 0644);
|
@@ -79,7 +79,7 @@ module_param(halt_poll_ns, uint, 0644);
|
||||||
|
@ -10,7 +10,7 @@ Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
|
|||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
diff --git a/net/core/dev.c b/net/core/dev.c
|
diff --git a/net/core/dev.c b/net/core/dev.c
|
||||||
index 33dc2a3ff7d7..b797bc32a088 100644
|
index 804aba2228c2..72bcbef321a8 100644
|
||||||
--- a/net/core/dev.c
|
--- a/net/core/dev.c
|
||||||
+++ b/net/core/dev.c
|
+++ b/net/core/dev.c
|
||||||
@@ -10524,7 +10524,7 @@ static void netdev_wait_allrefs(struct net_device *dev)
|
@@ -10524,7 +10524,7 @@ static void netdev_wait_allrefs(struct net_device *dev)
|
||||||
|
@ -14,7 +14,7 @@ Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
|
|||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
|
diff --git a/lib/Kconfig.debug b/lib/Kconfig.debug
|
||||||
index 12649e4c2b29..7c2d1c272c9d 100644
|
index 5d5f53f242da..790b372e6fd0 100644
|
||||||
--- a/lib/Kconfig.debug
|
--- a/lib/Kconfig.debug
|
||||||
+++ b/lib/Kconfig.debug
|
+++ b/lib/Kconfig.debug
|
||||||
@@ -325,7 +325,7 @@ config PAHOLE_HAS_SPLIT_BTF
|
@@ -325,7 +325,7 @@ config PAHOLE_HAS_SPLIT_BTF
|
||||||
|
@ -22,7 +22,7 @@ Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
|
|||||||
4 files changed, 8 insertions(+), 16 deletions(-)
|
4 files changed, 8 insertions(+), 16 deletions(-)
|
||||||
|
|
||||||
diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c
|
diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c
|
||||||
index 0eec59e4df65..38c62a44905a 100644
|
index 07a2524e6efd..fd09c20a5543 100644
|
||||||
--- a/block/blk-cgroup.c
|
--- a/block/blk-cgroup.c
|
||||||
+++ b/block/blk-cgroup.c
|
+++ b/block/blk-cgroup.c
|
||||||
@@ -887,7 +887,6 @@ static void blkcg_print_one_stat(struct blkcg_gq *blkg, struct seq_file *s)
|
@@ -887,7 +887,6 @@ static void blkcg_print_one_stat(struct blkcg_gq *blkg, struct seq_file *s)
|
||||||
@ -133,10 +133,10 @@ index c0545f9da549..d33460f3d43d 100644
|
|||||||
|
|
||||||
static struct blkg_policy_data *iolatency_pd_alloc(gfp_t gfp,
|
static struct blkg_policy_data *iolatency_pd_alloc(gfp_t gfp,
|
||||||
diff --git a/include/linux/blk-cgroup.h b/include/linux/blk-cgroup.h
|
diff --git a/include/linux/blk-cgroup.h b/include/linux/blk-cgroup.h
|
||||||
index b4de2010fba5..132e05ed6935 100644
|
index bc5c04d711bb..618359e3beca 100644
|
||||||
--- a/include/linux/blk-cgroup.h
|
--- a/include/linux/blk-cgroup.h
|
||||||
+++ b/include/linux/blk-cgroup.h
|
+++ b/include/linux/blk-cgroup.h
|
||||||
@@ -152,7 +152,7 @@ typedef void (blkcg_pol_online_pd_fn)(struct blkg_policy_data *pd);
|
@@ -153,7 +153,7 @@ typedef void (blkcg_pol_online_pd_fn)(struct blkg_policy_data *pd);
|
||||||
typedef void (blkcg_pol_offline_pd_fn)(struct blkg_policy_data *pd);
|
typedef void (blkcg_pol_offline_pd_fn)(struct blkg_policy_data *pd);
|
||||||
typedef void (blkcg_pol_free_pd_fn)(struct blkg_policy_data *pd);
|
typedef void (blkcg_pol_free_pd_fn)(struct blkg_policy_data *pd);
|
||||||
typedef void (blkcg_pol_reset_pd_stats_fn)(struct blkg_policy_data *pd);
|
typedef void (blkcg_pol_reset_pd_stats_fn)(struct blkg_policy_data *pd);
|
||||||
|
@ -20,7 +20,7 @@ Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
|
|||||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
diff --git a/drivers/firmware/sysfb_simplefb.c b/drivers/firmware/sysfb_simplefb.c
|
diff --git a/drivers/firmware/sysfb_simplefb.c b/drivers/firmware/sysfb_simplefb.c
|
||||||
index 303a491e520d..76c4abc42a30 100644
|
index 757cc8b9f3de..bda8712bfd8c 100644
|
||||||
--- a/drivers/firmware/sysfb_simplefb.c
|
--- a/drivers/firmware/sysfb_simplefb.c
|
||||||
+++ b/drivers/firmware/sysfb_simplefb.c
|
+++ b/drivers/firmware/sysfb_simplefb.c
|
||||||
@@ -99,7 +99,7 @@ __init int sysfb_create_simplefb(const struct screen_info *si,
|
@@ -99,7 +99,7 @@ __init int sysfb_create_simplefb(const struct screen_info *si,
|
@ -1,117 +0,0 @@
|
|||||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Thomas Zimmermann <tzimmermann@suse.de>
|
|
||||||
Date: Tue, 25 Jan 2022 10:12:18 +0100
|
|
||||||
Subject: [PATCH] fbdev: Hot-unplug firmware fb devices on forced removal
|
|
||||||
|
|
||||||
Hot-unplug all firmware-framebuffer devices as part of removing
|
|
||||||
them via remove_conflicting_framebuffers() et al. Releases all
|
|
||||||
memory regions to be acquired by native drivers.
|
|
||||||
|
|
||||||
Firmware, such as EFI, install a framebuffer while posting the
|
|
||||||
computer. After removing the firmware-framebuffer device from fbdev,
|
|
||||||
a native driver takes over the hardware and the firmware framebuffer
|
|
||||||
becomes invalid.
|
|
||||||
|
|
||||||
Firmware-framebuffer drivers, specifically simplefb, don't release
|
|
||||||
their device from Linux' device hierarchy. It still owns the firmware
|
|
||||||
framebuffer and blocks the native drivers from loading. This has been
|
|
||||||
observed in the vmwgfx driver. [1]
|
|
||||||
|
|
||||||
Initiating a device removal (i.e., hot unplug) as part of
|
|
||||||
remove_conflicting_framebuffers() removes the underlying device and
|
|
||||||
returns the memory range to the system.
|
|
||||||
|
|
||||||
[1] https://lore.kernel.org/dri-devel/20220117180359.18114-1-zack@kde.org/
|
|
||||||
|
|
||||||
v2:
|
|
||||||
* rename variable 'dev' to 'device' (Javier)
|
|
||||||
|
|
||||||
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
|
|
||||||
Reported-by: Zack Rusin <zackr@vmware.com>
|
|
||||||
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
|
|
||||||
Reviewed-by: Zack Rusin <zackr@vmware.com>
|
|
||||||
CC: stable@vger.kernel.org # v5.11+
|
|
||||||
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
|
|
||||||
---
|
|
||||||
drivers/video/fbdev/core/fbmem.c | 29 ++++++++++++++++++++++++++---
|
|
||||||
include/linux/fb.h | 1 +
|
|
||||||
2 files changed, 27 insertions(+), 3 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/drivers/video/fbdev/core/fbmem.c b/drivers/video/fbdev/core/fbmem.c
|
|
||||||
index 7bd5e2a4a9da..91145d93990a 100644
|
|
||||||
--- a/drivers/video/fbdev/core/fbmem.c
|
|
||||||
+++ b/drivers/video/fbdev/core/fbmem.c
|
|
||||||
@@ -25,6 +25,7 @@
|
|
||||||
#include <linux/init.h>
|
|
||||||
#include <linux/linux_logo.h>
|
|
||||||
#include <linux/proc_fs.h>
|
|
||||||
+#include <linux/platform_device.h>
|
|
||||||
#include <linux/seq_file.h>
|
|
||||||
#include <linux/console.h>
|
|
||||||
#include <linux/kmod.h>
|
|
||||||
@@ -1557,18 +1558,36 @@ static void do_remove_conflicting_framebuffers(struct apertures_struct *a,
|
|
||||||
/* check all firmware fbs and kick off if the base addr overlaps */
|
|
||||||
for_each_registered_fb(i) {
|
|
||||||
struct apertures_struct *gen_aper;
|
|
||||||
+ struct device *device;
|
|
||||||
|
|
||||||
if (!(registered_fb[i]->flags & FBINFO_MISC_FIRMWARE))
|
|
||||||
continue;
|
|
||||||
|
|
||||||
gen_aper = registered_fb[i]->apertures;
|
|
||||||
+ device = registered_fb[i]->device;
|
|
||||||
if (fb_do_apertures_overlap(gen_aper, a) ||
|
|
||||||
(primary && gen_aper && gen_aper->count &&
|
|
||||||
gen_aper->ranges[0].base == VGA_FB_PHYS)) {
|
|
||||||
|
|
||||||
printk(KERN_INFO "fb%d: switching to %s from %s\n",
|
|
||||||
i, name, registered_fb[i]->fix.id);
|
|
||||||
- do_unregister_framebuffer(registered_fb[i]);
|
|
||||||
+
|
|
||||||
+ /*
|
|
||||||
+ * If we kick-out a firmware driver, we also want to remove
|
|
||||||
+ * the underlying platform device, such as simple-framebuffer,
|
|
||||||
+ * VESA, EFI, etc. A native driver will then be able to
|
|
||||||
+ * allocate the memory range.
|
|
||||||
+ *
|
|
||||||
+ * If it's not a platform device, at least print a warning. A
|
|
||||||
+ * fix would add code to remove the device from the system.
|
|
||||||
+ */
|
|
||||||
+ if (dev_is_platform(device)) {
|
|
||||||
+ registered_fb[i]->forced_out = true;
|
|
||||||
+ platform_device_unregister(to_platform_device(device));
|
|
||||||
+ } else {
|
|
||||||
+ pr_warn("fb%d: cannot remove device\n", i);
|
|
||||||
+ do_unregister_framebuffer(registered_fb[i]);
|
|
||||||
+ }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1895,9 +1914,13 @@ EXPORT_SYMBOL(register_framebuffer);
|
|
||||||
void
|
|
||||||
unregister_framebuffer(struct fb_info *fb_info)
|
|
||||||
{
|
|
||||||
- mutex_lock(®istration_lock);
|
|
||||||
+ bool forced_out = fb_info->forced_out;
|
|
||||||
+
|
|
||||||
+ if (!forced_out)
|
|
||||||
+ mutex_lock(®istration_lock);
|
|
||||||
do_unregister_framebuffer(fb_info);
|
|
||||||
- mutex_unlock(®istration_lock);
|
|
||||||
+ if (!forced_out)
|
|
||||||
+ mutex_unlock(®istration_lock);
|
|
||||||
}
|
|
||||||
EXPORT_SYMBOL(unregister_framebuffer);
|
|
||||||
|
|
||||||
diff --git a/include/linux/fb.h b/include/linux/fb.h
|
|
||||||
index 02f362c661c8..3d7306c9a706 100644
|
|
||||||
--- a/include/linux/fb.h
|
|
||||||
+++ b/include/linux/fb.h
|
|
||||||
@@ -502,6 +502,7 @@ struct fb_info {
|
|
||||||
} *apertures;
|
|
||||||
|
|
||||||
bool skip_vt_switch; /* no VT switch on suspend/resume required */
|
|
||||||
+ bool forced_out; /* set when being removed by another driver */
|
|
||||||
};
|
|
||||||
|
|
||||||
static inline struct apertures_struct *alloc_apertures(unsigned int max_num) {
|
|
@ -19,7 +19,7 @@ Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
|
|||||||
1 file changed, 17 insertions(+), 5 deletions(-)
|
1 file changed, 17 insertions(+), 5 deletions(-)
|
||||||
|
|
||||||
diff --git a/drivers/gpu/drm/tiny/simpledrm.c b/drivers/gpu/drm/tiny/simpledrm.c
|
diff --git a/drivers/gpu/drm/tiny/simpledrm.c b/drivers/gpu/drm/tiny/simpledrm.c
|
||||||
index 5a6e89825bc2..6da507960af6 100644
|
index 3e3f9ba1e885..806fdc3237b3 100644
|
||||||
--- a/drivers/gpu/drm/tiny/simpledrm.c
|
--- a/drivers/gpu/drm/tiny/simpledrm.c
|
||||||
+++ b/drivers/gpu/drm/tiny/simpledrm.c
|
+++ b/drivers/gpu/drm/tiny/simpledrm.c
|
||||||
@@ -525,21 +525,33 @@ static int simpledrm_device_init_mm(struct simpledrm_device *sdev)
|
@@ -525,21 +525,33 @@ static int simpledrm_device_init_mm(struct simpledrm_device *sdev)
|
@ -1,57 +0,0 @@
|
|||||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Jens Axboe <axboe@kernel.dk>
|
|
||||||
Date: Fri, 8 Apr 2022 11:08:58 -0600
|
|
||||||
Subject: [PATCH] io_uring: fix race between timeout flush and removal
|
|
||||||
|
|
||||||
commit e677edbcabee849bfdd43f1602bccbecf736a646 upstream.
|
|
||||||
|
|
||||||
io_flush_timeouts() assumes the timeout isn't in progress of triggering
|
|
||||||
or being removed/canceled, so it unconditionally removes it from the
|
|
||||||
timeout list and attempts to cancel it.
|
|
||||||
|
|
||||||
Leave it on the list and let the normal timeout cancelation take care
|
|
||||||
of it.
|
|
||||||
|
|
||||||
Cc: stable@vger.kernel.org # 5.5+
|
|
||||||
Signed-off-by: Jens Axboe <axboe@kernel.dk>
|
|
||||||
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
|
|
||||||
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
|
|
||||||
---
|
|
||||||
fs/io_uring.c | 7 +++----
|
|
||||||
1 file changed, 3 insertions(+), 4 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/fs/io_uring.c b/fs/io_uring.c
|
|
||||||
index 156c54ebb62b..367b7ba2fcb0 100644
|
|
||||||
--- a/fs/io_uring.c
|
|
||||||
+++ b/fs/io_uring.c
|
|
||||||
@@ -1546,12 +1546,11 @@ static void io_flush_timeouts(struct io_ring_ctx *ctx)
|
|
||||||
__must_hold(&ctx->completion_lock)
|
|
||||||
{
|
|
||||||
u32 seq = ctx->cached_cq_tail - atomic_read(&ctx->cq_timeouts);
|
|
||||||
+ struct io_kiocb *req, *tmp;
|
|
||||||
|
|
||||||
spin_lock_irq(&ctx->timeout_lock);
|
|
||||||
- while (!list_empty(&ctx->timeout_list)) {
|
|
||||||
+ list_for_each_entry_safe(req, tmp, &ctx->timeout_list, timeout.list) {
|
|
||||||
u32 events_needed, events_got;
|
|
||||||
- struct io_kiocb *req = list_first_entry(&ctx->timeout_list,
|
|
||||||
- struct io_kiocb, timeout.list);
|
|
||||||
|
|
||||||
if (io_is_timeout_noseq(req))
|
|
||||||
break;
|
|
||||||
@@ -1568,7 +1567,6 @@ static void io_flush_timeouts(struct io_ring_ctx *ctx)
|
|
||||||
if (events_got < events_needed)
|
|
||||||
break;
|
|
||||||
|
|
||||||
- list_del_init(&req->timeout.list);
|
|
||||||
io_kill_timeout(req, 0);
|
|
||||||
}
|
|
||||||
ctx->cq_last_tm_flush = seq;
|
|
||||||
@@ -6209,6 +6207,7 @@ static int io_timeout_prep(struct io_kiocb *req, const struct io_uring_sqe *sqe,
|
|
||||||
if (get_timespec64(&data->ts, u64_to_user_ptr(sqe->addr)))
|
|
||||||
return -EFAULT;
|
|
||||||
|
|
||||||
+ INIT_LIST_HEAD(&req->timeout.list);
|
|
||||||
data->mode = io_translate_timeout_mode(flags);
|
|
||||||
hrtimer_init(&data->timer, io_timeout_get_clock(data), data->mode);
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user