From: Greg Kroah-Hartman Date: Thu, 29 Aug 2024 16:10:25 +0000 (+0200) Subject: 5.4-stable patches X-Git-Tag: v4.19.321~87 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e0afea3e3bb8a01422cf17fe8edc60e122e77826;p=thirdparty%2Fkernel%2Fstable-queue.git 5.4-stable patches added patches: tools-move-alignment-related-macros-to-new-linux-align.h.patch --- diff --git a/queue-5.4/series b/queue-5.4/series index a5e604117f6..bde882fb369 100644 --- a/queue-5.4/series +++ b/queue-5.4/series @@ -105,3 +105,4 @@ mmc-dw_mmc-allow-biu-and-ciu-clocks-to-defer.patch alsa-timer-relax-start-tick-time-check-for-slave-timer-elements.patch bluetooth-hci_ldisc-check-hci_uart_proto_ready-flag-in-hciuartgetproto.patch input-mt-limit-max-slots.patch +tools-move-alignment-related-macros-to-new-linux-align.h.patch diff --git a/queue-5.4/tools-move-alignment-related-macros-to-new-linux-align.h.patch b/queue-5.4/tools-move-alignment-related-macros-to-new-linux-align.h.patch new file mode 100644 index 00000000000..da336b27b12 --- /dev/null +++ b/queue-5.4/tools-move-alignment-related-macros-to-new-linux-align.h.patch @@ -0,0 +1,51 @@ +From 10a04ff09bcc39e0044190ffe9f00f998f13647c Mon Sep 17 00:00:00 2001 +From: Alexander Lobakin +Date: Wed, 27 Mar 2024 16:23:48 +0100 +Subject: tools: move alignment-related macros to new + +From: Alexander Lobakin + +commit 10a04ff09bcc39e0044190ffe9f00f998f13647c upstream. + +Currently, tools have *ALIGN*() macros scattered across the unrelated +headers, as there are only 3 of them and they were added separately +each time on an as-needed basis. +Anyway, let's make it more consistent with the kernel headers and allow +using those macros outside of the mentioned headers. Create + inside the tools/ folder and include it where needed. + +Signed-off-by: Yury Norov +Signed-off-by: Alexander Lobakin +Signed-off-by: David S. Miller +Signed-off-by: Greg Kroah-Hartman +--- + tools/include/linux/align.h | 12 ++++++++++++ + tools/include/linux/bitmap.h | 1 + + 2 files changed, 13 insertions(+) + create mode 100644 tools/include/linux/align.h + +--- /dev/null ++++ b/tools/include/linux/align.h +@@ -0,0 +1,12 @@ ++/* SPDX-License-Identifier: GPL-2.0-only */ ++ ++#ifndef _TOOLS_LINUX_ALIGN_H ++#define _TOOLS_LINUX_ALIGN_H ++ ++#include ++ ++#define ALIGN(x, a) __ALIGN_KERNEL((x), (a)) ++#define ALIGN_DOWN(x, a) __ALIGN_KERNEL((x) - ((a) - 1), (a)) ++#define IS_ALIGNED(x, a) (((x) & ((typeof(x))(a) - 1)) == 0) ++ ++#endif /* _TOOLS_LINUX_ALIGN_H */ +--- a/tools/include/linux/bitmap.h ++++ b/tools/include/linux/bitmap.h +@@ -3,6 +3,7 @@ + #define _PERF_BITOPS_H + + #include ++#include + #include + #include + #include