aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2024-02-06 23:35:56 +0100
committerHauke Mehrtens <hauke@hauke-m.de>2024-04-10 00:45:39 +0200
commit5d0dc190c34ebc912bd50684bce179ebb3143d57 (patch)
treebdf67e613732f3c45f840ab313f375a84c9555bf
parentd2e5f8516905902192665a65b0986704615e5b45 (diff)
downloadbackports-5d0dc190c34ebc912bd50684bce179ebb3143d57.tar.gz
backports: Remove support for kernel smaller than 4.13
This removes all the code which is needed to support kernel 4.12. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
-rw-r--r--.github/workflows/create.yml1
-rw-r--r--README2
-rw-r--r--backport/backport-include/acpi/acpi_bus.h15
-rw-r--r--backport/backport-include/linux/acpi.h15
-rw-r--r--backport/backport-include/linux/build_bug.h4
-rw-r--r--backport/backport-include/linux/kernel.h7
-rw-r--r--backport/backport-include/linux/skbuff.h54
-rw-r--r--backport/backport-include/linux/uuid.h34
-rw-r--r--backport/backport-include/linux/wait.h25
-rw-r--r--patches/0082-pci_error_handlers.cocci32
10 files changed, 1 insertions, 188 deletions
diff --git a/.github/workflows/create.yml b/.github/workflows/create.yml
index f99cdf88..7850b8f0 100644
--- a/.github/workflows/create.yml
+++ b/.github/workflows/create.yml
@@ -55,7 +55,6 @@ jobs:
strategy:
matrix:
kernel: [
- "4.12",
"4.13",
"4.14",
"4.15",
diff --git a/README b/README
index 1b76bcee..2eb53ab1 100644
--- a/README
+++ b/README
@@ -8,7 +8,7 @@ down to older kernels. It currently backports the following subsystems:
* WWAN
This package provides the latest Linux kernel subsystem enhancements
-for kernels 4.12 and above.
+for kernels 4.13 and above.
# Documentation
diff --git a/backport/backport-include/acpi/acpi_bus.h b/backport/backport-include/acpi/acpi_bus.h
deleted file mode 100644
index fbd68a16..00000000
--- a/backport/backport-include/acpi/acpi_bus.h
+++ /dev/null
@@ -1,15 +0,0 @@
-#ifndef _BACKPORTS_ACPI_BUS_H__
-#define _BACKPORTS_ACPI_BUS_H__ 1
-
-#include_next <acpi/acpi_bus.h>
-
-#if LINUX_VERSION_IS_LESS(4,13,0)
-static inline union acpi_object *
-backport_acpi_evaluate_dsm(acpi_handle handle, const guid_t *guid, u64 rev, u64 func, union acpi_object *argv4)
-{
- return acpi_evaluate_dsm(handle, guid->b, rev, func, argv4);
-}
-#define acpi_evaluate_dsm LINUX_BACKPORT(acpi_evaluate_dsm)
-#endif /* x < 4.13.0 */
-
-#endif /* _BACKPORTS_ACPI_BUS_H__ */
diff --git a/backport/backport-include/linux/acpi.h b/backport/backport-include/linux/acpi.h
deleted file mode 100644
index bee7ae17..00000000
--- a/backport/backport-include/linux/acpi.h
+++ /dev/null
@@ -1,15 +0,0 @@
-#ifndef __BACKPORT_LINUX_ACPI_H
-#define __BACKPORT_LINUX_ACPI_H
-#include_next <linux/acpi.h>
-#include <linux/version.h>
-
-#if LINUX_VERSION_IS_LESS(4,13,0)
-#define devm_acpi_dev_add_driver_gpios LINUX_BACKPORT(devm_acpi_dev_add_driver_gpios)
-static inline int devm_acpi_dev_add_driver_gpios(struct device *dev,
- const struct acpi_gpio_mapping *gpios)
-{
- return -ENXIO;
-}
-#endif /* LINUX_VERSION_IS_LESS(4,13,0) */
-
-#endif /* __BACKPORT_LINUX_ACPI_H */
diff --git a/backport/backport-include/linux/build_bug.h b/backport/backport-include/linux/build_bug.h
index c883e525..356ac044 100644
--- a/backport/backport-include/linux/build_bug.h
+++ b/backport/backport-include/linux/build_bug.h
@@ -1,11 +1,7 @@
#ifndef __BP_BUILD_BUG_H
#define __BP_BUILD_BUG_H
-#if LINUX_VERSION_IS_GEQ(4,13,0)
#include_next <linux/build_bug.h>
-#else /* LINUX_VERSION_IS_GEQ(4,13,0) */
-#include <linux/bug.h>
-#endif /* LINUX_VERSION_IS_GEQ(4,13,0) */
#ifndef static_assert
/**
diff --git a/backport/backport-include/linux/kernel.h b/backport/backport-include/linux/kernel.h
deleted file mode 100644
index ae73f8db..00000000
--- a/backport/backport-include/linux/kernel.h
+++ /dev/null
@@ -1,7 +0,0 @@
-#ifndef __BACKPORT_KERNEL_H
-#define __BACKPORT_KERNEL_H
-#include_next <linux/kernel.h>
-/* needed to include BUILD_BUG_ON_ZERO on <= 4.12 */
-#include <linux/bug.h>
-
-#endif /* __BACKPORT_KERNEL_H */
diff --git a/backport/backport-include/linux/skbuff.h b/backport/backport-include/linux/skbuff.h
index d0466daa..2bcd1036 100644
--- a/backport/backport-include/linux/skbuff.h
+++ b/backport/backport-include/linux/skbuff.h
@@ -3,60 +3,6 @@
#include_next <linux/skbuff.h>
#include <linux/version.h>
-
-#if LINUX_VERSION_IS_LESS(4,13,0) && \
- RHEL_RELEASE_CODE < RHEL_RELEASE_VERSION(7,6)
-static inline void *backport_skb_put(struct sk_buff *skb, unsigned int len)
-{
- return skb_put(skb, len);
-}
-#define skb_put LINUX_BACKPORT(skb_put)
-
-static inline void *backport_skb_push(struct sk_buff *skb, unsigned int len)
-{
- return skb_push(skb, len);
-}
-#define skb_push LINUX_BACKPORT(skb_push)
-
-static inline void *backport___skb_push(struct sk_buff *skb, unsigned int len)
-{
- return __skb_push(skb, len);
-}
-#define __skb_push LINUX_BACKPORT(__skb_push)
-
-static inline void *__skb_put_zero(struct sk_buff *skb, unsigned int len)
-{
- void *tmp = __skb_put(skb, len);
-
- memset(tmp, 0, len);
- return tmp;
-}
-
-static inline void *skb_put_zero(struct sk_buff *skb, unsigned int len)
-{
- void *tmp = skb_put(skb, len);
-
- memset(tmp, 0, len);
-
- return tmp;
-}
-
-static inline void *skb_put_data(struct sk_buff *skb, const void *data,
- unsigned int len)
-{
- void *tmp = skb_put(skb, len);
-
- memcpy(tmp, data, len);
-
- return tmp;
-}
-
-static inline void skb_put_u8(struct sk_buff *skb, u8 val)
-{
- *(u8 *)skb_put(skb, 1) = val;
-}
-#endif
-
#if LINUX_VERSION_IS_LESS(4,20,0)
static inline struct sk_buff *__skb_peek(const struct sk_buff_head *list_)
{
diff --git a/backport/backport-include/linux/uuid.h b/backport/backport-include/linux/uuid.h
deleted file mode 100644
index 90352f1b..00000000
--- a/backport/backport-include/linux/uuid.h
+++ /dev/null
@@ -1,34 +0,0 @@
-#ifndef __BACKPORT_LINUX_UUID_H_
-#define __BACKPORT_LINUX_UUID_H_
-#include <linux/version.h>
-#include_next <linux/uuid.h>
-
-#ifndef UUID_STRING_LEN
-/*
- * The length of a UUID string ("aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee")
- * not including trailing NUL.
- */
-#define UUID_STRING_LEN 36
-#endif
-
-#if LINUX_VERSION_IS_LESS(4,13,0)
-#define guid_t uuid_le
-#define uuid_t uuid_be
-#define GUID_INIT UUID_LE
-
-static inline void guid_gen(guid_t *u)
-{
- return uuid_le_gen(u);
-}
-static inline void uuid_gen(uuid_t *u)
-{
- return uuid_be_gen(u);
-}
-
-static inline void guid_copy(guid_t *dst, const guid_t *src)
-{
- memcpy(dst, src, sizeof(guid_t));
-}
-#endif
-
-#endif /* __BACKPORT_LINUX_UUID_H_ */
diff --git a/backport/backport-include/linux/wait.h b/backport/backport-include/linux/wait.h
deleted file mode 100644
index f07f6099..00000000
--- a/backport/backport-include/linux/wait.h
+++ /dev/null
@@ -1,25 +0,0 @@
-#ifndef __BACKPORT_LINUX_WAIT_H
-#define __BACKPORT_LINUX_WAIT_H
-#include_next <linux/wait.h>
-
-
-#if LINUX_VERSION_IS_LESS(4,13,0)
-#define wait_queue_entry_t wait_queue_t
-
-#define wait_event_killable_timeout(wq_head, condition, timeout) \
-({ \
- long __ret = timeout; \
- might_sleep(); \
- if (!___wait_cond_timeout(condition)) \
- __ret = __wait_event_killable_timeout(wq_head, \
- condition, timeout); \
- __ret; \
-})
-
-#define __wait_event_killable_timeout(wq_head, condition, timeout) \
- ___wait_event(wq_head, ___wait_cond_timeout(condition), \
- TASK_KILLABLE, 0, timeout, \
- __ret = schedule_timeout(__ret))
-#endif
-
-#endif /* __BACKPORT_LINUX_WAIT_H */
diff --git a/patches/0082-pci_error_handlers.cocci b/patches/0082-pci_error_handlers.cocci
deleted file mode 100644
index 9b5573d4..00000000
--- a/patches/0082-pci_error_handlers.cocci
+++ /dev/null
@@ -1,32 +0,0 @@
-@r@
-identifier OPS;
-identifier pcie_reset_prepare_fn;
-identifier pcie_reset_done_fn;
-fresh identifier pcie_reset_notify_fn = pcie_reset_prepare_fn ## "_notify";
-position p;
-@@
-struct pci_error_handlers OPS@p = {
-+#if LINUX_VERSION_IS_GEQ(4,13,0)
- .reset_prepare = pcie_reset_prepare_fn,
- .reset_done = pcie_reset_done_fn,
-+#else
-+ .reset_notify = pcie_reset_notify_fn,
-+#endif
-};
-
-
-@@
-identifier r.pcie_reset_prepare_fn;
-identifier r.pcie_reset_done_fn;
-identifier r.pcie_reset_notify_fn;
-@@
-void pcie_reset_done_fn(...) {...}
-+#if LINUX_VERSION_IS_LESS(4,13,0)
-+static void pcie_reset_notify_fn(struct pci_dev *dev, bool prepare)
-+{
-+ if (prepare)
-+ pcie_reset_prepare_fn(dev);
-+ else
-+ pcie_reset_done_fn(dev);
-+}
-+#endif