]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
4.9-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 3 Mar 2020 10:50:55 +0000 (11:50 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 3 Mar 2020 10:50:55 +0000 (11:50 +0100)
added patches:
include-linux-bitops.h-introduce-bits_per_type.patch

queue-4.9/include-linux-bitops.h-introduce-bits_per_type.patch [new file with mode: 0644]
queue-4.9/series

diff --git a/queue-4.9/include-linux-bitops.h-introduce-bits_per_type.patch b/queue-4.9/include-linux-bitops.h-introduce-bits_per_type.patch
new file mode 100644 (file)
index 0000000..079ec9d
--- /dev/null
@@ -0,0 +1,42 @@
+From 9144d75e22cad3c89e6b2ccab551db9ee28d250a Mon Sep 17 00:00:00 2001
+From: Chris Wilson <chris@chris-wilson.co.uk>
+Date: Tue, 21 Aug 2018 21:57:03 -0700
+Subject: include/linux/bitops.h: introduce BITS_PER_TYPE
+
+From: Chris Wilson <chris@chris-wilson.co.uk>
+
+commit 9144d75e22cad3c89e6b2ccab551db9ee28d250a upstream.
+
+net_dim.h has a rather useful extension to BITS_PER_BYTE to compute the
+number of bits in a type (BITS_PER_BYTE * sizeof(T)), so promote the macro
+to bitops.h, alongside BITS_PER_BYTE, for wider usage.
+
+Link: http://lkml.kernel.org/r/20180706094458.14116-1-chris@chris-wilson.co.uk
+Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
+Reviewed-by: Jani Nikula <jani.nikula@intel.com>
+Cc: Randy Dunlap <rdunlap@infradead.org>
+Cc: Andy Gospodarek <gospo@broadcom.com>
+Cc: David S. Miller <davem@davemloft.net>
+Cc: Thomas Gleixner <tglx@linutronix.de>
+Cc: Ingo Molnar <mingo@kernel.org>
+Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
+Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+[only take the bitops.h portion for stable kernels - gregkh]
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ include/linux/bitops.h |    3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/include/linux/bitops.h
++++ b/include/linux/bitops.h
+@@ -3,7 +3,8 @@
+ #include <asm/types.h>
+ #include <linux/bits.h>
+-#define BITS_TO_LONGS(nr)     DIV_ROUND_UP(nr, BITS_PER_BYTE * sizeof(long))
++#define BITS_PER_TYPE(type) (sizeof(type) * BITS_PER_BYTE)
++#define BITS_TO_LONGS(nr)     DIV_ROUND_UP(nr, BITS_PER_TYPE(long))
+ extern unsigned int __sw_hweight8(unsigned int w);
+ extern unsigned int __sw_hweight16(unsigned int w);
index 7d850b7ace14e04f3af27490d6b3ec19d6a14a7d..170076a89be2dab83fef11dc61c59a396fa1c9ee 100644 (file)
@@ -37,4 +37,5 @@ mips-vpe-fix-a-double-free-and-a-memory-leak-in-release_vpe.patch
 i2c-jz4780-silence-log-flood-on-txabrt.patch
 ecryptfs-fix-up-bad-backport-of-fe2e082f5da5b4a0a92ae32978f81507ef37ec66.patch
 serial-8250-check-upf_irq_shared-in-advance.patch
+include-linux-bitops.h-introduce-bits_per_type.patch
 net-netlink-cap-max-groups-which-will-be-considered-in-netlink_bind.patch