]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
Drop minmax-avoid-overly-complex-min-max-macro-arguments-.patch
authorSasha Levin <sashal@kernel.org>
Sun, 6 Oct 2024 08:06:49 +0000 (04:06 -0400)
committerSasha Levin <sashal@kernel.org>
Sun, 6 Oct 2024 08:06:49 +0000 (04:06 -0400)
Signed-off-by: Sasha Levin <sashal@kernel.org>
queue-4.19/minmax-avoid-overly-complex-min-max-macro-arguments-.patch [deleted file]
queue-4.19/series
queue-5.10/minmax-avoid-overly-complex-min-max-macro-arguments-.patch [deleted file]
queue-5.10/series
queue-5.15/minmax-avoid-overly-complex-min-max-macro-arguments-.patch [deleted file]
queue-5.15/series
queue-5.4/minmax-avoid-overly-complex-min-max-macro-arguments-.patch [deleted file]
queue-5.4/series
queue-6.1/minmax-avoid-overly-complex-min-max-macro-arguments-.patch [deleted file]
queue-6.1/series

diff --git a/queue-4.19/minmax-avoid-overly-complex-min-max-macro-arguments-.patch b/queue-4.19/minmax-avoid-overly-complex-min-max-macro-arguments-.patch
deleted file mode 100644 (file)
index b062034..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-From 67040aee5f7d6230e3d41bce54fa185fc6918a57 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Fri, 26 Jul 2024 15:09:07 -0700
-Subject: minmax: avoid overly complex min()/max() macro arguments in xen
-
-From: Linus Torvalds <torvalds@linux-foundation.org>
-
-[ Upstream commit e8432ac802a028eaee6b1e86383d7cd8e9fb8431 ]
-
-We have some very fancy min/max macros that have tons of sanity checking
-to warn about mixed signedness etc.
-
-This is all things that a sane compiler should warn about, but there are
-no sane compiler interfaces for this, and '-Wsign-compare' is broken [1]
-and not useful.
-
-So then we compensate (some would say over-compensate) by doing the
-checks manually with some truly horrid macro games.
-
-And no, we can't just use __builtin_types_compatible_p(), because the
-whole question of "does it make sense to compare these two values" is a
-lot more complicated than that.
-
-For example, it makes a ton of sense to compare unsigned values with
-simple constants like "5", even if that is indeed a signed type.  So we
-have these very strange macros to try to make sensible type checking
-decisions on the arguments to 'min()' and 'max()'.
-
-But that can cause enormous code expansion if the min()/max() macros are
-used with complicated expressions, and particularly if you nest these
-things so that you get the first big expansion then expanded again.
-
-The xen setup.c file ended up ballooning to over 50MB of preprocessed
-noise that takes 15s to compile (obviously depending on the build host),
-largely due to one single line.
-
-So let's split that one single line to just be simpler.  I think it ends
-up being more legible to humans too at the same time.  Now that single
-file compiles in under a second.
-
-Reported-and-reviewed-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
-Link: https://lore.kernel.org/all/c83c17bb-be75-4c67-979d-54eee38774c6@lucifer.local/
-Link: https://staticthinking.wordpress.com/2023/07/25/wsign-compare-is-garbage/ [1]
-Cc: David Laight <David.Laight@aculab.com>
-Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-Stable-dep-of: be35d91c8880 ("xen: tolerate ACPI NVS memory overlapping with Xen allocated memory")
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- arch/x86/xen/setup.c | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/arch/x86/xen/setup.c b/arch/x86/xen/setup.c
-index 69fd1134b7fcf..ad69e5796cd0c 100644
---- a/arch/x86/xen/setup.c
-+++ b/arch/x86/xen/setup.c
-@@ -737,6 +737,7 @@ char * __init xen_memory_setup(void)
-       struct xen_memory_map memmap;
-       unsigned long max_pages;
-       unsigned long extra_pages = 0;
-+      unsigned long maxmem_pages;
-       int i;
-       int op;
-@@ -802,8 +803,8 @@ char * __init xen_memory_setup(void)
-        * the initial memory is also very large with respect to
-        * lowmem, but we won't try to deal with that here.
-        */
--      extra_pages = min3(EXTRA_MEM_RATIO * min(max_pfn, PFN_DOWN(MAXMEM)),
--                         extra_pages, max_pages - max_pfn);
-+      maxmem_pages = EXTRA_MEM_RATIO * min(max_pfn, PFN_DOWN(MAXMEM));
-+      extra_pages = min3(maxmem_pages, extra_pages, max_pages - max_pfn);
-       i = 0;
-       addr = xen_e820_table.entries[0].addr;
-       size = xen_e820_table.entries[0].size;
--- 
-2.43.0
-
index 873d63b21a27806a6fcabd8c6bacb32839e1f626..0cba482f4fefda0e67f32f4eb3edff261381b7d5 100644 (file)
@@ -62,7 +62,6 @@ ipmi-docs-don-t-advertise-deprecated-sysfs-entries.patch
 drm-msm-fix-s-null-argument-error.patch
 xen-use-correct-end-address-of-kernel-for-conflict-c.patch
 mm-add-page_align_down-macro.patch
-minmax-avoid-overly-complex-min-max-macro-arguments-.patch
 xen-introduce-generic-helper-checking-for-memory-map.patch
 xen-move-max_pfn-in-xen_memory_setup-out-of-function.patch
 xen-add-capability-to-remap-non-ram-pages-to-differe.patch
diff --git a/queue-5.10/minmax-avoid-overly-complex-min-max-macro-arguments-.patch b/queue-5.10/minmax-avoid-overly-complex-min-max-macro-arguments-.patch
deleted file mode 100644 (file)
index 6e176d9..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-From 93f26258df267ffeab534e270df29f63129d2926 Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Fri, 26 Jul 2024 15:09:07 -0700
-Subject: minmax: avoid overly complex min()/max() macro arguments in xen
-
-From: Linus Torvalds <torvalds@linux-foundation.org>
-
-[ Upstream commit e8432ac802a028eaee6b1e86383d7cd8e9fb8431 ]
-
-We have some very fancy min/max macros that have tons of sanity checking
-to warn about mixed signedness etc.
-
-This is all things that a sane compiler should warn about, but there are
-no sane compiler interfaces for this, and '-Wsign-compare' is broken [1]
-and not useful.
-
-So then we compensate (some would say over-compensate) by doing the
-checks manually with some truly horrid macro games.
-
-And no, we can't just use __builtin_types_compatible_p(), because the
-whole question of "does it make sense to compare these two values" is a
-lot more complicated than that.
-
-For example, it makes a ton of sense to compare unsigned values with
-simple constants like "5", even if that is indeed a signed type.  So we
-have these very strange macros to try to make sensible type checking
-decisions on the arguments to 'min()' and 'max()'.
-
-But that can cause enormous code expansion if the min()/max() macros are
-used with complicated expressions, and particularly if you nest these
-things so that you get the first big expansion then expanded again.
-
-The xen setup.c file ended up ballooning to over 50MB of preprocessed
-noise that takes 15s to compile (obviously depending on the build host),
-largely due to one single line.
-
-So let's split that one single line to just be simpler.  I think it ends
-up being more legible to humans too at the same time.  Now that single
-file compiles in under a second.
-
-Reported-and-reviewed-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
-Link: https://lore.kernel.org/all/c83c17bb-be75-4c67-979d-54eee38774c6@lucifer.local/
-Link: https://staticthinking.wordpress.com/2023/07/25/wsign-compare-is-garbage/ [1]
-Cc: David Laight <David.Laight@aculab.com>
-Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-Stable-dep-of: be35d91c8880 ("xen: tolerate ACPI NVS memory overlapping with Xen allocated memory")
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- arch/x86/xen/setup.c | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/arch/x86/xen/setup.c b/arch/x86/xen/setup.c
-index 629c94d1ab24c..dfb11a7420a3f 100644
---- a/arch/x86/xen/setup.c
-+++ b/arch/x86/xen/setup.c
-@@ -734,6 +734,7 @@ char * __init xen_memory_setup(void)
-       struct xen_memory_map memmap;
-       unsigned long max_pages;
-       unsigned long extra_pages = 0;
-+      unsigned long maxmem_pages;
-       int i;
-       int op;
-@@ -796,8 +797,8 @@ char * __init xen_memory_setup(void)
-        * Make sure we have no memory above max_pages, as this area
-        * isn't handled by the p2m management.
-        */
--      extra_pages = min3(EXTRA_MEM_RATIO * min(max_pfn, PFN_DOWN(MAXMEM)),
--                         extra_pages, max_pages - max_pfn);
-+      maxmem_pages = EXTRA_MEM_RATIO * min(max_pfn, PFN_DOWN(MAXMEM));
-+      extra_pages = min3(maxmem_pages, extra_pages, max_pages - max_pfn);
-       i = 0;
-       addr = xen_e820_table.entries[0].addr;
-       size = xen_e820_table.entries[0].size;
--- 
-2.43.0
-
index 449229885a0da7d009f81d66902679f7d7bd4b22..16afda1e565d5fc895a83d2dda1278a60ad73625 100644 (file)
@@ -132,7 +132,6 @@ drm-msm-fix-s-null-argument-error.patch
 drivers-drm-exynos_drm_gsc-fix-wrong-assignment-in-g.patch
 xen-use-correct-end-address-of-kernel-for-conflict-c.patch
 mm-add-page_align_down-macro.patch
-minmax-avoid-overly-complex-min-max-macro-arguments-.patch
 xen-introduce-generic-helper-checking-for-memory-map.patch
 xen-move-max_pfn-in-xen_memory_setup-out-of-function.patch
 xen-add-capability-to-remap-non-ram-pages-to-differe.patch
diff --git a/queue-5.15/minmax-avoid-overly-complex-min-max-macro-arguments-.patch b/queue-5.15/minmax-avoid-overly-complex-min-max-macro-arguments-.patch
deleted file mode 100644 (file)
index 6be7276..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-From 194be39a007696bbdabe9cdafb1e02ad4d28230d Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Fri, 26 Jul 2024 15:09:07 -0700
-Subject: minmax: avoid overly complex min()/max() macro arguments in xen
-
-From: Linus Torvalds <torvalds@linux-foundation.org>
-
-[ Upstream commit e8432ac802a028eaee6b1e86383d7cd8e9fb8431 ]
-
-We have some very fancy min/max macros that have tons of sanity checking
-to warn about mixed signedness etc.
-
-This is all things that a sane compiler should warn about, but there are
-no sane compiler interfaces for this, and '-Wsign-compare' is broken [1]
-and not useful.
-
-So then we compensate (some would say over-compensate) by doing the
-checks manually with some truly horrid macro games.
-
-And no, we can't just use __builtin_types_compatible_p(), because the
-whole question of "does it make sense to compare these two values" is a
-lot more complicated than that.
-
-For example, it makes a ton of sense to compare unsigned values with
-simple constants like "5", even if that is indeed a signed type.  So we
-have these very strange macros to try to make sensible type checking
-decisions on the arguments to 'min()' and 'max()'.
-
-But that can cause enormous code expansion if the min()/max() macros are
-used with complicated expressions, and particularly if you nest these
-things so that you get the first big expansion then expanded again.
-
-The xen setup.c file ended up ballooning to over 50MB of preprocessed
-noise that takes 15s to compile (obviously depending on the build host),
-largely due to one single line.
-
-So let's split that one single line to just be simpler.  I think it ends
-up being more legible to humans too at the same time.  Now that single
-file compiles in under a second.
-
-Reported-and-reviewed-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
-Link: https://lore.kernel.org/all/c83c17bb-be75-4c67-979d-54eee38774c6@lucifer.local/
-Link: https://staticthinking.wordpress.com/2023/07/25/wsign-compare-is-garbage/ [1]
-Cc: David Laight <David.Laight@aculab.com>
-Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-Stable-dep-of: be35d91c8880 ("xen: tolerate ACPI NVS memory overlapping with Xen allocated memory")
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- arch/x86/xen/setup.c | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/arch/x86/xen/setup.c b/arch/x86/xen/setup.c
-index 629c94d1ab24c..dfb11a7420a3f 100644
---- a/arch/x86/xen/setup.c
-+++ b/arch/x86/xen/setup.c
-@@ -734,6 +734,7 @@ char * __init xen_memory_setup(void)
-       struct xen_memory_map memmap;
-       unsigned long max_pages;
-       unsigned long extra_pages = 0;
-+      unsigned long maxmem_pages;
-       int i;
-       int op;
-@@ -796,8 +797,8 @@ char * __init xen_memory_setup(void)
-        * Make sure we have no memory above max_pages, as this area
-        * isn't handled by the p2m management.
-        */
--      extra_pages = min3(EXTRA_MEM_RATIO * min(max_pfn, PFN_DOWN(MAXMEM)),
--                         extra_pages, max_pages - max_pfn);
-+      maxmem_pages = EXTRA_MEM_RATIO * min(max_pfn, PFN_DOWN(MAXMEM));
-+      extra_pages = min3(maxmem_pages, extra_pages, max_pages - max_pfn);
-       i = 0;
-       addr = xen_e820_table.entries[0].addr;
-       size = xen_e820_table.entries[0].size;
--- 
-2.43.0
-
index 1c416681c42bd0fb8e3523465092805e64c3adcc..63b2d4b10f0b21c1d61e3dce47a055d44998e028 100644 (file)
@@ -173,7 +173,6 @@ drm-msm-fix-s-null-argument-error.patch
 drivers-drm-exynos_drm_gsc-fix-wrong-assignment-in-g.patch
 xen-use-correct-end-address-of-kernel-for-conflict-c.patch
 mm-add-page_align_down-macro.patch
-minmax-avoid-overly-complex-min-max-macro-arguments-.patch
 xen-introduce-generic-helper-checking-for-memory-map.patch
 xen-move-max_pfn-in-xen_memory_setup-out-of-function.patch
 xen-add-capability-to-remap-non-ram-pages-to-differe.patch
diff --git a/queue-5.4/minmax-avoid-overly-complex-min-max-macro-arguments-.patch b/queue-5.4/minmax-avoid-overly-complex-min-max-macro-arguments-.patch
deleted file mode 100644 (file)
index 2f91cd6..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-From 591f1dea020d6398bebbbf0eb10967d1eca8a53e Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Fri, 26 Jul 2024 15:09:07 -0700
-Subject: minmax: avoid overly complex min()/max() macro arguments in xen
-
-From: Linus Torvalds <torvalds@linux-foundation.org>
-
-[ Upstream commit e8432ac802a028eaee6b1e86383d7cd8e9fb8431 ]
-
-We have some very fancy min/max macros that have tons of sanity checking
-to warn about mixed signedness etc.
-
-This is all things that a sane compiler should warn about, but there are
-no sane compiler interfaces for this, and '-Wsign-compare' is broken [1]
-and not useful.
-
-So then we compensate (some would say over-compensate) by doing the
-checks manually with some truly horrid macro games.
-
-And no, we can't just use __builtin_types_compatible_p(), because the
-whole question of "does it make sense to compare these two values" is a
-lot more complicated than that.
-
-For example, it makes a ton of sense to compare unsigned values with
-simple constants like "5", even if that is indeed a signed type.  So we
-have these very strange macros to try to make sensible type checking
-decisions on the arguments to 'min()' and 'max()'.
-
-But that can cause enormous code expansion if the min()/max() macros are
-used with complicated expressions, and particularly if you nest these
-things so that you get the first big expansion then expanded again.
-
-The xen setup.c file ended up ballooning to over 50MB of preprocessed
-noise that takes 15s to compile (obviously depending on the build host),
-largely due to one single line.
-
-So let's split that one single line to just be simpler.  I think it ends
-up being more legible to humans too at the same time.  Now that single
-file compiles in under a second.
-
-Reported-and-reviewed-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
-Link: https://lore.kernel.org/all/c83c17bb-be75-4c67-979d-54eee38774c6@lucifer.local/
-Link: https://staticthinking.wordpress.com/2023/07/25/wsign-compare-is-garbage/ [1]
-Cc: David Laight <David.Laight@aculab.com>
-Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-Stable-dep-of: be35d91c8880 ("xen: tolerate ACPI NVS memory overlapping with Xen allocated memory")
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- arch/x86/xen/setup.c | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/arch/x86/xen/setup.c b/arch/x86/xen/setup.c
-index d19fcca0b30b3..858de52cfacff 100644
---- a/arch/x86/xen/setup.c
-+++ b/arch/x86/xen/setup.c
-@@ -746,6 +746,7 @@ char * __init xen_memory_setup(void)
-       struct xen_memory_map memmap;
-       unsigned long max_pages;
-       unsigned long extra_pages = 0;
-+      unsigned long maxmem_pages;
-       int i;
-       int op;
-@@ -815,8 +816,8 @@ char * __init xen_memory_setup(void)
-        * the initial memory is also very large with respect to
-        * lowmem, but we won't try to deal with that here.
-        */
--      extra_pages = min3(EXTRA_MEM_RATIO * min(max_pfn, PFN_DOWN(MAXMEM)),
--                         extra_pages, max_pages - max_pfn);
-+      maxmem_pages = EXTRA_MEM_RATIO * min(max_pfn, PFN_DOWN(MAXMEM));
-+      extra_pages = min3(maxmem_pages, extra_pages, max_pages - max_pfn);
-       i = 0;
-       addr = xen_e820_table.entries[0].addr;
-       size = xen_e820_table.entries[0].size;
--- 
-2.43.0
-
index e8c3c891201c3140cfacb915b2ccf51a6c48f939..5bfd3096f6f06a87e4dbef3e43a11d46384aa87b 100644 (file)
@@ -84,7 +84,6 @@ drm-msm-fix-s-null-argument-error.patch
 drivers-drm-exynos_drm_gsc-fix-wrong-assignment-in-g.patch
 xen-use-correct-end-address-of-kernel-for-conflict-c.patch
 mm-add-page_align_down-macro.patch
-minmax-avoid-overly-complex-min-max-macro-arguments-.patch
 xen-introduce-generic-helper-checking-for-memory-map.patch
 xen-move-max_pfn-in-xen_memory_setup-out-of-function.patch
 xen-add-capability-to-remap-non-ram-pages-to-differe.patch
diff --git a/queue-6.1/minmax-avoid-overly-complex-min-max-macro-arguments-.patch b/queue-6.1/minmax-avoid-overly-complex-min-max-macro-arguments-.patch
deleted file mode 100644 (file)
index 67ac95c..0000000
+++ /dev/null
@@ -1,77 +0,0 @@
-From c135851d72faadad85ace268fc01c300d9f1b13e Mon Sep 17 00:00:00 2001
-From: Sasha Levin <sashal@kernel.org>
-Date: Fri, 26 Jul 2024 15:09:07 -0700
-Subject: minmax: avoid overly complex min()/max() macro arguments in xen
-
-From: Linus Torvalds <torvalds@linux-foundation.org>
-
-[ Upstream commit e8432ac802a028eaee6b1e86383d7cd8e9fb8431 ]
-
-We have some very fancy min/max macros that have tons of sanity checking
-to warn about mixed signedness etc.
-
-This is all things that a sane compiler should warn about, but there are
-no sane compiler interfaces for this, and '-Wsign-compare' is broken [1]
-and not useful.
-
-So then we compensate (some would say over-compensate) by doing the
-checks manually with some truly horrid macro games.
-
-And no, we can't just use __builtin_types_compatible_p(), because the
-whole question of "does it make sense to compare these two values" is a
-lot more complicated than that.
-
-For example, it makes a ton of sense to compare unsigned values with
-simple constants like "5", even if that is indeed a signed type.  So we
-have these very strange macros to try to make sensible type checking
-decisions on the arguments to 'min()' and 'max()'.
-
-But that can cause enormous code expansion if the min()/max() macros are
-used with complicated expressions, and particularly if you nest these
-things so that you get the first big expansion then expanded again.
-
-The xen setup.c file ended up ballooning to over 50MB of preprocessed
-noise that takes 15s to compile (obviously depending on the build host),
-largely due to one single line.
-
-So let's split that one single line to just be simpler.  I think it ends
-up being more legible to humans too at the same time.  Now that single
-file compiles in under a second.
-
-Reported-and-reviewed-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
-Link: https://lore.kernel.org/all/c83c17bb-be75-4c67-979d-54eee38774c6@lucifer.local/
-Link: https://staticthinking.wordpress.com/2023/07/25/wsign-compare-is-garbage/ [1]
-Cc: David Laight <David.Laight@aculab.com>
-Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-Stable-dep-of: be35d91c8880 ("xen: tolerate ACPI NVS memory overlapping with Xen allocated memory")
-Signed-off-by: Sasha Levin <sashal@kernel.org>
----
- arch/x86/xen/setup.c | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/arch/x86/xen/setup.c b/arch/x86/xen/setup.c
-index 46a2cb782ab7d..f0bb5e350990d 100644
---- a/arch/x86/xen/setup.c
-+++ b/arch/x86/xen/setup.c
-@@ -731,6 +731,7 @@ char * __init xen_memory_setup(void)
-       struct xen_memory_map memmap;
-       unsigned long max_pages;
-       unsigned long extra_pages = 0;
-+      unsigned long maxmem_pages;
-       int i;
-       int op;
-@@ -793,8 +794,8 @@ char * __init xen_memory_setup(void)
-        * Make sure we have no memory above max_pages, as this area
-        * isn't handled by the p2m management.
-        */
--      extra_pages = min3(EXTRA_MEM_RATIO * min(max_pfn, PFN_DOWN(MAXMEM)),
--                         extra_pages, max_pages - max_pfn);
-+      maxmem_pages = EXTRA_MEM_RATIO * min(max_pfn, PFN_DOWN(MAXMEM));
-+      extra_pages = min3(maxmem_pages, extra_pages, max_pages - max_pfn);
-       i = 0;
-       addr = xen_e820_table.entries[0].addr;
-       size = xen_e820_table.entries[0].size;
--- 
-2.43.0
-
index 6f67705d44da7b8d824a9bba3c102170e1bfffaf..19c1fbf419a1bd0fa4954d08dc8c43b552ef82b6 100644 (file)
@@ -132,7 +132,6 @@ drivers-drm-exynos_drm_gsc-fix-wrong-assignment-in-g.patch
 xen-use-correct-end-address-of-kernel-for-conflict-c.patch
 hid-wacom-support-sequence-numbers-smaller-than-16-b.patch
 hid-wacom-do-not-warn-about-dropped-packets-for-firs.patch
-minmax-avoid-overly-complex-min-max-macro-arguments-.patch
 xen-introduce-generic-helper-checking-for-memory-map.patch
 xen-move-max_pfn-in-xen_memory_setup-out-of-function.patch
 xen-add-capability-to-remap-non-ram-pages-to-differe.patch