-
-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Synchronize kernel patches with upstream (#306)
This change updates the kernel patches with the patches used by Proxmox.
- Loading branch information
1 parent
fbba234
commit f5011d2
Showing
20 changed files
with
2,248 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
pve-kernel (5.19.1-2) edge; urgency=medium | ||
|
||
* Synchronize patches with upstream. | ||
|
||
-- Fabian Mastenbroek <[email protected]> Wed, 17 Aug 2022 15:00:00 +0000 | ||
|
||
pve-kernel (5.19.1-1) edge; urgency=medium | ||
|
||
* Update to Linux 5.19.1. | ||
|
147 changes: 147 additions & 0 deletions
147
debian/patches/pve/0009-blk-cgroup-always-terminate-io.stat-lines.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,147 @@ | ||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
From: Wolfgang Bumiller <[email protected]> | ||
Date: Tue, 11 Jan 2022 09:31:59 +0100 | ||
Subject: [PATCH] blk-cgroup: always terminate io.stat lines | ||
|
||
With the removal of seq_get_buf in blkcg_print_one_stat, we | ||
cannot make adding the newline conditional on there being | ||
relevant stats because the name was already written out | ||
unconditionally. | ||
Otherwise we may end up with multiple device names in one | ||
line which is confusing and doesn't follow the nested-keyed | ||
file format. | ||
|
||
Signed-off-by: Wolfgang Bumiller <[email protected]> | ||
Fixes: 252c651a4c85 ("blk-cgroup: stop using seq_get_buf") | ||
Signed-off-by: Thomas Lamprecht <[email protected]> | ||
--- | ||
block/blk-cgroup.c | 9 ++------- | ||
block/blk-iocost.c | 5 ++--- | ||
block/blk-iolatency.c | 8 +++----- | ||
include/linux/blk-cgroup.h | 2 +- | ||
4 files changed, 8 insertions(+), 16 deletions(-) | ||
|
||
diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c | ||
index 07a2524e6efd..fd09c20a5543 100644 | ||
--- a/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) | ||
{ | ||
struct blkg_iostat_set *bis = &blkg->iostat; | ||
u64 rbytes, wbytes, rios, wios, dbytes, dios; | ||
- bool has_stats = false; | ||
const char *dname; | ||
unsigned seq; | ||
int i; | ||
@@ -913,14 +912,12 @@ static void blkcg_print_one_stat(struct blkcg_gq *blkg, struct seq_file *s) | ||
} while (u64_stats_fetch_retry(&bis->sync, seq)); | ||
|
||
if (rbytes || wbytes || rios || wios) { | ||
- has_stats = true; | ||
seq_printf(s, "rbytes=%llu wbytes=%llu rios=%llu wios=%llu dbytes=%llu dios=%llu", | ||
rbytes, wbytes, rios, wios, | ||
dbytes, dios); | ||
} | ||
|
||
if (blkcg_debug_stats && atomic_read(&blkg->use_delay)) { | ||
- has_stats = true; | ||
seq_printf(s, " use_delay=%d delay_nsec=%llu", | ||
atomic_read(&blkg->use_delay), | ||
atomic64_read(&blkg->delay_nsec)); | ||
@@ -932,12 +929,10 @@ static void blkcg_print_one_stat(struct blkcg_gq *blkg, struct seq_file *s) | ||
if (!blkg->pd[i] || !pol->pd_stat_fn) | ||
continue; | ||
|
||
- if (pol->pd_stat_fn(blkg->pd[i], s)) | ||
- has_stats = true; | ||
+ pol->pd_stat_fn(blkg->pd[i], s); | ||
} | ||
|
||
- if (has_stats) | ||
- seq_printf(s, "\n"); | ||
+ seq_puts(s, "\n"); | ||
} | ||
|
||
static int blkcg_print_stat(struct seq_file *sf, void *v) | ||
diff --git a/block/blk-iocost.c b/block/blk-iocost.c | ||
index 10851493940c..21db328c0bcc 100644 | ||
--- a/block/blk-iocost.c | ||
+++ b/block/blk-iocost.c | ||
@@ -3005,13 +3005,13 @@ static void ioc_pd_free(struct blkg_policy_data *pd) | ||
kfree(iocg); | ||
} | ||
|
||
-static bool ioc_pd_stat(struct blkg_policy_data *pd, struct seq_file *s) | ||
+static void ioc_pd_stat(struct blkg_policy_data *pd, struct seq_file *s) | ||
{ | ||
struct ioc_gq *iocg = pd_to_iocg(pd); | ||
struct ioc *ioc = iocg->ioc; | ||
|
||
if (!ioc->enabled) | ||
- return false; | ||
+ return; | ||
|
||
if (iocg->level == 0) { | ||
unsigned vp10k = DIV64_U64_ROUND_CLOSEST( | ||
@@ -3027,7 +3027,6 @@ static bool ioc_pd_stat(struct blkg_policy_data *pd, struct seq_file *s) | ||
iocg->last_stat.wait_us, | ||
iocg->last_stat.indebt_us, | ||
iocg->last_stat.indelay_us); | ||
- return true; | ||
} | ||
|
||
static u64 ioc_weight_prfill(struct seq_file *sf, struct blkg_policy_data *pd, | ||
diff --git a/block/blk-iolatency.c b/block/blk-iolatency.c | ||
index c0545f9da549..d33460f3d43d 100644 | ||
--- a/block/blk-iolatency.c | ||
+++ b/block/blk-iolatency.c | ||
@@ -890,7 +890,7 @@ static int iolatency_print_limit(struct seq_file *sf, void *v) | ||
return 0; | ||
} | ||
|
||
-static bool iolatency_ssd_stat(struct iolatency_grp *iolat, struct seq_file *s) | ||
+static void iolatency_ssd_stat(struct iolatency_grp *iolat, struct seq_file *s) | ||
{ | ||
struct latency_stat stat; | ||
int cpu; | ||
@@ -913,17 +913,16 @@ static bool iolatency_ssd_stat(struct iolatency_grp *iolat, struct seq_file *s) | ||
(unsigned long long)stat.ps.missed, | ||
(unsigned long long)stat.ps.total, | ||
iolat->rq_depth.max_depth); | ||
- return true; | ||
} | ||
|
||
-static bool iolatency_pd_stat(struct blkg_policy_data *pd, struct seq_file *s) | ||
+static void iolatency_pd_stat(struct blkg_policy_data *pd, struct seq_file *s) | ||
{ | ||
struct iolatency_grp *iolat = pd_to_lat(pd); | ||
unsigned long long avg_lat; | ||
unsigned long long cur_win; | ||
|
||
if (!blkcg_debug_stats) | ||
- return false; | ||
+ return; | ||
|
||
if (iolat->ssd) | ||
return iolatency_ssd_stat(iolat, s); | ||
@@ -936,7 +935,6 @@ static bool iolatency_pd_stat(struct blkg_policy_data *pd, struct seq_file *s) | ||
else | ||
seq_printf(s, " depth=%u avg_lat=%llu win=%llu", | ||
iolat->rq_depth.max_depth, avg_lat, cur_win); | ||
- return true; | ||
} | ||
|
||
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 | ||
index bc5c04d711bb..618359e3beca 100644 | ||
--- a/include/linux/blk-cgroup.h | ||
+++ b/include/linux/blk-cgroup.h | ||
@@ -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_free_pd_fn)(struct blkg_policy_data *pd); | ||
typedef void (blkcg_pol_reset_pd_stats_fn)(struct blkg_policy_data *pd); | ||
-typedef bool (blkcg_pol_stat_pd_fn)(struct blkg_policy_data *pd, | ||
+typedef void (blkcg_pol_stat_pd_fn)(struct blkg_policy_data *pd, | ||
struct seq_file *s); | ||
|
||
struct blkcg_policy { |
34 changes: 34 additions & 0 deletions
34
debian/patches/pve/0010-drivers-firmware-Don-t-mark-as-busy-the-simple-frame.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
From: Javier Martinez Canillas <[email protected]> | ||
Date: Tue, 25 Jan 2022 10:12:19 +0100 | ||
Subject: [PATCH] drivers/firmware: Don't mark as busy the simple-framebuffer | ||
IO resource | ||
|
||
The sysfb_create_simplefb() function requests a IO memory resource for the | ||
simple-framebuffer platform device, but it also marks it as busy which can | ||
lead to drivers requesting the same memory resource to fail. | ||
|
||
Let's drop the IORESOURCE_BUSY flag and let drivers to request it as busy | ||
instead. | ||
|
||
Signed-off-by: Javier Martinez Canillas <[email protected]> | ||
Reviewed-by: Zack Rusin <[email protected]> | ||
Reviewed-by: Thomas Zimmermann <[email protected]> | ||
Signed-off-by: Thomas Lamprecht <[email protected]> | ||
--- | ||
drivers/firmware/sysfb_simplefb.c | 2 +- | ||
1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
||
diff --git a/drivers/firmware/sysfb_simplefb.c b/drivers/firmware/sysfb_simplefb.c | ||
index 757cc8b9f3de..bda8712bfd8c 100644 | ||
--- a/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, | ||
|
||
/* setup IORESOURCE_MEM as framebuffer memory */ | ||
memset(&res, 0, sizeof(res)); | ||
- res.flags = IORESOURCE_MEM | IORESOURCE_BUSY; | ||
+ res.flags = IORESOURCE_MEM; | ||
res.name = simplefb_resname; | ||
res.start = base; | ||
res.end = res.start + length - 1; |
63 changes: 63 additions & 0 deletions
63
debian/patches/pve/0011-drm-simpledrm-Request-memory-region-in-driver.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
From: Thomas Zimmermann <[email protected]> | ||
Date: Tue, 25 Jan 2022 10:12:20 +0100 | ||
Subject: [PATCH] drm/simpledrm: Request memory region in driver | ||
|
||
Requesting the framebuffer memory in simpledrm marks the memory | ||
range as busy. This used to be done by the firmware sysfb code, | ||
but the driver is the correct place. | ||
|
||
v2: | ||
* use I/O memory if request_mem_region() fails (Jocelyn) | ||
|
||
Signed-off-by: Thomas Zimmermann <[email protected]> | ||
Reviewed-by: Javier Martinez Canillas <[email protected]> | ||
Reviewed-by: Jocelyn Falempe <[email protected]> | ||
Signed-off-by: Thomas Lamprecht <[email protected]> | ||
--- | ||
drivers/gpu/drm/tiny/simpledrm.c | 22 +++++++++++++++++----- | ||
1 file changed, 17 insertions(+), 5 deletions(-) | ||
|
||
diff --git a/drivers/gpu/drm/tiny/simpledrm.c b/drivers/gpu/drm/tiny/simpledrm.c | ||
index 3e3f9ba1e885..806fdc3237b3 100644 | ||
--- a/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) | ||
{ | ||
struct drm_device *dev = &sdev->dev; | ||
struct platform_device *pdev = sdev->pdev; | ||
- struct resource *mem; | ||
+ struct resource *res, *mem; | ||
void __iomem *screen_base; | ||
int ret; | ||
|
||
- mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); | ||
- if (!mem) | ||
+ res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | ||
+ if (!res) | ||
return -EINVAL; | ||
|
||
- ret = devm_aperture_acquire_from_firmware(dev, mem->start, resource_size(mem)); | ||
+ ret = devm_aperture_acquire_from_firmware(dev, res->start, resource_size(res)); | ||
if (ret) { | ||
drm_err(dev, "could not acquire memory range %pr: error %d\n", | ||
- mem, ret); | ||
+ res, ret); | ||
return ret; | ||
} | ||
|
||
+ mem = devm_request_mem_region(&pdev->dev, res->start, resource_size(res), | ||
+ sdev->dev.driver->name); | ||
+ if (!mem) { | ||
+ /* | ||
+ * We cannot make this fatal. Sometimes this comes from magic | ||
+ * spaces our resource handlers simply don't know about. Use | ||
+ * the I/O-memory resource as-is and try to map that instead. | ||
+ */ | ||
+ drm_warn(dev, "could not acquire memory region %pr\n", res); | ||
+ mem = res; | ||
+ } | ||
+ | ||
screen_base = devm_ioremap_wc(&pdev->dev, mem->start, | ||
resource_size(mem)); | ||
if (!screen_base) |
Oops, something went wrong.