* [PATCH 00/10] backports: Remove support for kernel older than 4.14
@ 2024-04-01 22:03 Hauke Mehrtens
2024-04-01 22:03 ` [PATCH 01/10] backports: Remove support for kernel smaller than 4.5 Hauke Mehrtens
` (10 more replies)
0 siblings, 11 replies; 14+ messages in thread
From: Hauke Mehrtens @ 2024-04-01 22:03 UTC (permalink / raw)
To: backports; +Cc: Hauke Mehrtens
Remove support for older kernel versions to make maintenance of backports easier in
the future.
Hauke Mehrtens (10):
backports: Remove support for kernel smaller than 4.5
backports: Remove support for kernel smaller than 4.6
backports: Remove support for kernel smaller than 4.7
backports: Remove support for kernel smaller than 4.8
backports: Remove support for kernel smaller than 4.9
backports: Remove support for kernel smaller than 4.10
backports: Remove support for kernel smaller than 4.11
backports: Remove support for kernel smaller than 4.12
backports: Remove support for kernel smaller than 4.13
backports: Remove support for kernel smaller than 4.14
.github/workflows/create.yml | 10 -
README | 2 +-
backport/backport-include/acpi/acpi_bus.h | 15 -
backport/backport-include/crypto/hash.h | 38 ---
backport/backport-include/linux/acpi.h | 15 -
backport/backport-include/linux/atomic.h | 48 ---
backport/backport-include/linux/bits.h | 4 +-
backport/backport-include/linux/build_bug.h | 4 -
backport/backport-include/linux/debugfs.h | 14 -
backport/backport-include/linux/devcoredump.h | 30 --
backport/backport-include/linux/etherdevice.h | 41 ---
backport/backport-include/linux/fs.h | 5 -
backport/backport-include/linux/gfp.h | 25 --
backport/backport-include/linux/interrupt.h | 40 ---
backport/backport-include/linux/io.h | 5 -
backport/backport-include/linux/kcov.h | 2 -
backport/backport-include/linux/kernel.h | 44 ---
backport/backport-include/linux/leds.h | 29 --
backport/backport-include/linux/mii.h | 14 -
backport/backport-include/linux/mm.h | 42 ---
backport/backport-include/linux/netdevice.h | 73 +----
backport/backport-include/linux/netlink.h | 47 ---
backport/backport-include/linux/nospec.h | 4 +-
backport/backport-include/linux/of_device.h | 5 +-
backport/backport-include/linux/page_ref.h | 25 --
backport/backport-include/linux/pci.h | 50 ----
backport/backport-include/linux/phy.h | 65 -----
backport/backport-include/linux/random.h | 14 -
backport/backport-include/linux/rbtree.h | 59 ----
backport/backport-include/linux/rhashtable.h | 31 --
backport/backport-include/linux/sched.h | 7 -
backport/backport-include/linux/skbuff.h | 66 +----
backport/backport-include/linux/string.h | 15 -
backport/backport-include/linux/thermal.h | 23 --
backport/backport-include/linux/time.h | 8 -
backport/backport-include/linux/usb.h | 10 -
backport/backport-include/linux/usb/cdc.h | 61 ----
backport/backport-include/linux/usb/ch9.h | 12 -
backport/backport-include/linux/uuid.h | 34 ---
.../backport-include/linux/verification.h | 4 +-
.../backport-include/linux/virtio_config.h | 31 --
backport/backport-include/linux/wait.h | 25 --
backport/backport-include/net/genetlink.h | 49 ----
backport/backport-include/net/ipv6.h | 25 --
backport/backport-include/net/iw_handler.h | 11 -
backport/backport-include/net/netlink.h | 200 -------------
backport/backport-include/net/sock.h | 17 --
backport/compat/Kconfig | 18 --
backport/compat/Makefile | 7 -
backport/compat/backport-4.10.c | 274 ------------------
backport/compat/backport-4.11.c | 12 -
backport/compat/backport-4.12.c | 94 ------
backport/compat/backport-4.5.c | 165 -----------
backport/compat/backport-4.6.c | 103 -------
backport/compat/backport-4.7.c | 176 -----------
backport/compat/backport-4.8.c | 196 -------------
backport/compat/backport-5.15.c | 2 -
backport/compat/backport-genetlink.c | 170 +----------
dependencies | 14 -
patches/0002-gpio-parent.cocci | 25 --
.../0013-fix-makefile-includes/brcmfmac.patch | 13 -
patches/0013-fix-makefile-includes/mt76.patch | 22 --
.../0013-fix-makefile-includes/wilc1000.patch | 24 +-
patches/0067-mdio-addr.cocci | 5 -
patches/0073-netdevice-mtu-range.cocci | 100 -------
patches/0074-netdevice-mtu-range-ifdefs.cocci | 26 --
patches/0075-ndo-stats-64.cocci | 32 --
patches/0077-genl-ro-after-init/hwsim.patch | 11 -
patches/0077-genl-ro-after-init/nl80211.patch | 11 -
patches/0078-genl-extack.cocci | 12 -
patches/0079-netdev-destructor.cocci | 116 --------
patches/0079-netdev-destructor/brcmfmac.patch | 38 ---
patches/0080-i2c-proble-new.cocci | 25 --
patches/0082-pci_error_handlers.cocci | 32 --
patches/0095-spi-delay/wilc1000.patch | 6 +-
75 files changed, 14 insertions(+), 3113 deletions(-)
delete mode 100644 backport/backport-include/acpi/acpi_bus.h
delete mode 100644 backport/backport-include/crypto/hash.h
delete mode 100644 backport/backport-include/linux/acpi.h
delete mode 100644 backport/backport-include/linux/devcoredump.h
delete mode 100644 backport/backport-include/linux/etherdevice.h
delete mode 100644 backport/backport-include/linux/gfp.h
delete mode 100644 backport/backport-include/linux/kernel.h
delete mode 100644 backport/backport-include/linux/leds.h
delete mode 100644 backport/backport-include/linux/mii.h
delete mode 100644 backport/backport-include/linux/page_ref.h
delete mode 100644 backport/backport-include/linux/phy.h
delete mode 100644 backport/backport-include/linux/random.h
delete mode 100644 backport/backport-include/linux/rbtree.h
delete mode 100644 backport/backport-include/linux/rhashtable.h
delete mode 100644 backport/backport-include/linux/string.h
delete mode 100644 backport/backport-include/linux/usb/cdc.h
delete mode 100644 backport/backport-include/linux/usb/ch9.h
delete mode 100644 backport/backport-include/linux/uuid.h
delete mode 100644 backport/backport-include/linux/virtio_config.h
delete mode 100644 backport/backport-include/linux/wait.h
delete mode 100644 backport/backport-include/net/ipv6.h
delete mode 100644 backport/backport-include/net/iw_handler.h
delete mode 100644 backport/compat/backport-4.10.c
delete mode 100644 backport/compat/backport-4.11.c
delete mode 100644 backport/compat/backport-4.12.c
delete mode 100644 backport/compat/backport-4.5.c
delete mode 100644 backport/compat/backport-4.6.c
delete mode 100644 backport/compat/backport-4.7.c
delete mode 100644 backport/compat/backport-4.8.c
delete mode 100644 patches/0002-gpio-parent.cocci
delete mode 100644 patches/0013-fix-makefile-includes/brcmfmac.patch
delete mode 100644 patches/0067-mdio-addr.cocci
delete mode 100644 patches/0073-netdevice-mtu-range.cocci
delete mode 100644 patches/0074-netdevice-mtu-range-ifdefs.cocci
delete mode 100644 patches/0075-ndo-stats-64.cocci
delete mode 100644 patches/0077-genl-ro-after-init/hwsim.patch
delete mode 100644 patches/0077-genl-ro-after-init/nl80211.patch
delete mode 100644 patches/0079-netdev-destructor.cocci
delete mode 100644 patches/0079-netdev-destructor/brcmfmac.patch
delete mode 100644 patches/0080-i2c-proble-new.cocci
delete mode 100644 patches/0082-pci_error_handlers.cocci
--
2.44.0
^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH 01/10] backports: Remove support for kernel smaller than 4.5
2024-04-01 22:03 [PATCH 00/10] backports: Remove support for kernel older than 4.14 Hauke Mehrtens
@ 2024-04-01 22:03 ` Hauke Mehrtens
2024-04-01 22:03 ` [PATCH 02/10] backports: Remove support for kernel smaller than 4.6 Hauke Mehrtens
` (9 subsequent siblings)
10 siblings, 0 replies; 14+ messages in thread
From: Hauke Mehrtens @ 2024-04-01 22:03 UTC (permalink / raw)
To: backports; +Cc: Hauke Mehrtens
This removes all the code which is needed to support kernel 4.4.
---
.github/workflows/create.yml | 1 -
README | 2 +-
backport/backport-include/linux/bits.h | 3 +-
backport/backport-include/linux/fs.h | 5 -
backport/backport-include/linux/io.h | 5 -
backport/backport-include/linux/kernel.h | 28 ----
backport/backport-include/linux/leds.h | 29 ----
backport/backport-include/linux/netdevice.h | 22 ---
backport/backport-include/linux/nospec.h | 3 +-
backport/backport-include/linux/page_ref.h | 2 -
backport/backport-include/linux/pci.h | 3 +-
backport/backport-include/linux/phy.h | 65 --------
backport/backport-include/linux/skbuff.h | 3 +-
backport/backport-include/linux/string.h | 5 -
backport/backport-include/net/genetlink.h | 6 -
backport/backport-include/net/ipv6.h | 25 ---
backport/backport-include/net/iw_handler.h | 11 --
backport/backport-include/net/sock.h | 17 --
backport/compat/Makefile | 1 -
backport/compat/backport-4.5.c | 165 --------------------
patches/0002-gpio-parent.cocci | 25 ---
patches/0067-mdio-addr.cocci | 5 -
22 files changed, 5 insertions(+), 426 deletions(-)
delete mode 100644 backport/backport-include/linux/leds.h
delete mode 100644 backport/backport-include/linux/phy.h
delete mode 100644 backport/backport-include/net/ipv6.h
delete mode 100644 backport/backport-include/net/iw_handler.h
delete mode 100644 backport/compat/backport-4.5.c
delete mode 100644 patches/0002-gpio-parent.cocci
delete mode 100644 patches/0067-mdio-addr.cocci
diff --git a/.github/workflows/create.yml b/.github/workflows/create.yml
index 3fa4628b..2c937b5c 100644
--- a/.github/workflows/create.yml
+++ b/.github/workflows/create.yml
@@ -55,7 +55,6 @@ jobs:
strategy:
matrix:
kernel: [
- "4.4",
"4.5",
"4.6",
"4.7",
diff --git a/README b/README
index f9cf7248..92512d5c 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.4 and above.
+for kernels 4.5 and above.
# Documentation
diff --git a/backport/backport-include/linux/bits.h b/backport/backport-include/linux/bits.h
index db792196..7c66169f 100644
--- a/backport/backport-include/linux/bits.h
+++ b/backport/backport-include/linux/bits.h
@@ -4,8 +4,7 @@
#if LINUX_VERSION_IS_GEQ(4,19,0) || \
LINUX_VERSION_IN_RANGE(4,14,119, 4,15,0) || \
- LINUX_VERSION_IN_RANGE(4,9,176, 4,10,0) || \
- LINUX_VERSION_IN_RANGE(4,4,180, 4,5,0)
+ LINUX_VERSION_IN_RANGE(4,9,176, 4,10,0)
#include_next <linux/bits.h>
#else
#include <linux/bitops.h>
diff --git a/backport/backport-include/linux/fs.h b/backport/backport-include/linux/fs.h
index 005c3564..98116793 100644
--- a/backport/backport-include/linux/fs.h
+++ b/backport/backport-include/linux/fs.h
@@ -4,11 +4,6 @@
#include <linux/version.h>
-#if LINUX_VERSION_IS_LESS(4,5,0)
-#define no_seek_end_llseek LINUX_BACKPORT(no_seek_end_llseek)
-extern loff_t no_seek_end_llseek(struct file *, loff_t, int);
-#endif /* < 4.5 */
-
#if LINUX_VERSION_IS_LESS(5,5,0)
#ifdef CONFIG_COMPAT
#define compat_ptr_ioctl LINUX_BACKPORT(compat_ptr_ioctl)
diff --git a/backport/backport-include/linux/io.h b/backport/backport-include/linux/io.h
index e04305c3..72586527 100644
--- a/backport/backport-include/linux/io.h
+++ b/backport/backport-include/linux/io.h
@@ -6,11 +6,6 @@
#define IOMEM_ERR_PTR(err) (__force void __iomem *)ERR_PTR(err)
#endif
-#if LINUX_VERSION_IS_LESS(4,5,0)
-#define __ioread32_copy LINUX_BACKPORT(__ioread32_copy)
-void __ioread32_copy(void *to, const void __iomem *from, size_t count);
-#endif
-
#ifndef writel_relaxed
#define writel_relaxed writel_relaxed
static inline void writel_relaxed(u32 value, volatile void __iomem *addr)
diff --git a/backport/backport-include/linux/kernel.h b/backport/backport-include/linux/kernel.h
index 36bb755e..23a451b9 100644
--- a/backport/backport-include/linux/kernel.h
+++ b/backport/backport-include/linux/kernel.h
@@ -13,32 +13,4 @@ int __must_check kstrtobool(const char *s, bool *res);
int __must_check kstrtobool_from_user(const char __user *s, size_t count, bool *res);
#endif
-#if LINUX_VERSION_IS_LESS(4,5,0)
-
-#undef abs
-/**
- * abs - return absolute value of an argument
- * @x: the value. If it is unsigned type, it is converted to signed type first.
- * char is treated as if it was signed (regardless of whether it really is)
- * but the macro's return type is preserved as char.
- *
- * Return: an absolute value of x.
- */
-#define abs(x) __abs_choose_expr(x, long long, \
- __abs_choose_expr(x, long, \
- __abs_choose_expr(x, int, \
- __abs_choose_expr(x, short, \
- __abs_choose_expr(x, char, \
- __builtin_choose_expr( \
- __builtin_types_compatible_p(typeof(x), char), \
- (char)({ signed char __x = (x); __x<0?-__x:__x; }), \
- ((void)0)))))))
-
-#define __abs_choose_expr(x, type, other) __builtin_choose_expr( \
- __builtin_types_compatible_p(typeof(x), signed type) || \
- __builtin_types_compatible_p(typeof(x), unsigned type), \
- ({ signed type __x = (x); __x < 0 ? -__x : __x; }), other)
-
-#endif
-
#endif /* __BACKPORT_KERNEL_H */
diff --git a/backport/backport-include/linux/leds.h b/backport/backport-include/linux/leds.h
deleted file mode 100644
index dbafd413..00000000
--- a/backport/backport-include/linux/leds.h
+++ /dev/null
@@ -1,29 +0,0 @@
-#ifndef __BACKPORT_LINUX_LEDS_H
-#define __BACKPORT_LINUX_LEDS_H
-#include_next <linux/leds.h>
-#include <linux/version.h>
-
-#if LINUX_VERSION_IS_LESS(4,5,0)
-#define led_set_brightness_sync LINUX_BACKPORT(led_set_brightness_sync)
-/**
- * led_set_brightness_sync - set LED brightness synchronously
- * @led_cdev: the LED to set
- * @brightness: the brightness to set it to
- *
- * Set an LED's brightness immediately. This function will block
- * the caller for the time required for accessing device registers,
- * and it can sleep.
- *
- * Returns: 0 on success or negative error value on failure
- */
-extern int led_set_brightness_sync(struct led_classdev *led_cdev,
- enum led_brightness value);
-#endif /* < 4.5 */
-
-#if LINUX_VERSION_IS_LESS(4,5,0)
-#define devm_led_trigger_register LINUX_BACKPORT(devm_led_trigger_register)
-extern int devm_led_trigger_register(struct device *dev,
- struct led_trigger *trigger);
-#endif /* < 4.5 */
-
-#endif /* __BACKPORT_LINUX_LEDS_H */
diff --git a/backport/backport-include/linux/netdevice.h b/backport/backport-include/linux/netdevice.h
index e1773190..f6d53f8a 100644
--- a/backport/backport-include/linux/netdevice.h
+++ b/backport/backport-include/linux/netdevice.h
@@ -23,28 +23,6 @@ static inline bool backport_napi_complete(struct napi_struct *n)
#define napi_complete LINUX_BACKPORT(napi_complete)
#endif /* < 4.10 */
-#if LINUX_VERSION_IS_LESS(4,5,0)
-#define netif_tx_napi_add LINUX_BACKPORT(netif_tx_napi_add)
-/**
- * netif_tx_napi_add - initialize a napi context
- * @dev: network device
- * @napi: napi context
- * @poll: polling function
- * @weight: default weight
- *
- * This variant of netif_napi_add() should be used from drivers using NAPI
- * to exclusively poll a TX queue.
- * This will avoid we add it into napi_hash[], thus polluting this hash table.
- */
-static inline void netif_tx_napi_add(struct net_device *dev,
- struct napi_struct *napi,
- int (*poll)(struct napi_struct *, int),
- int weight)
-{
- netif_napi_add(dev, napi, poll, weight);
-}
-#endif /* < 4.5 */
-
#ifndef NETIF_F_CSUM_MASK
#define NETIF_F_CSUM_MASK NETIF_F_ALL_CSUM
#endif
diff --git a/backport/backport-include/linux/nospec.h b/backport/backport-include/linux/nospec.h
index 07647241..d4de80a4 100644
--- a/backport/backport-include/linux/nospec.h
+++ b/backport/backport-include/linux/nospec.h
@@ -3,8 +3,7 @@
#if LINUX_VERSION_IS_GEQ(4,15,2) || \
LINUX_VERSION_IN_RANGE(4,14,18, 4,15,0) || \
- LINUX_VERSION_IN_RANGE(4,9,81, 4,10,0) || \
- LINUX_VERSION_IN_RANGE(4,4,118, 4,5,0)
+ LINUX_VERSION_IN_RANGE(4,9,81, 4,10,0)
#include_next <linux/nospec.h>
#else
#define array_index_nospec(index, size) (index)
diff --git a/backport/backport-include/linux/page_ref.h b/backport/backport-include/linux/page_ref.h
index 12fd86c9..e45734ec 100644
--- a/backport/backport-include/linux/page_ref.h
+++ b/backport/backport-include/linux/page_ref.h
@@ -9,12 +9,10 @@ static inline void page_ref_inc(struct page *page)
atomic_inc(&page->_count);
}
-#if !LINUX_VERSION_IN_RANGE(4,4,216, 4,5,0)
static inline int page_ref_count(struct page *page)
{
return atomic_read(&page->_count);
}
-#endif /* 4.4.216 <= x < 4.5 */
static inline int page_ref_sub_and_test(struct page *page, int nr)
{
diff --git a/backport/backport-include/linux/pci.h b/backport/backport-include/linux/pci.h
index caf15db3..75eb2359 100644
--- a/backport/backport-include/linux/pci.h
+++ b/backport/backport-include/linux/pci.h
@@ -30,7 +30,6 @@ static inline void pci_free_irq_vectors(struct pci_dev *dev)
#if LINUX_VERSION_IS_LESS(4,9,0) && \
- !LINUX_VERSION_IN_RANGE(4,4,37, 4,5,0) && \
!LINUX_VERSION_IN_RANGE(4,8,13, 4,9,0)
static inline struct pci_dev *pcie_find_root_port(struct pci_dev *dev)
@@ -47,7 +46,7 @@ static inline struct pci_dev *pcie_find_root_port(struct pci_dev *dev)
return NULL;
}
-#endif/* <4.9.0 but not >= 4.4.37, 4.8.13 */
+#endif/* <4.9.0 but not >= 4.8.13 */
#ifndef PCI_IRQ_LEGACY
#define PCI_IRQ_LEGACY (1 << 0) /* Allow legacy interrupts */
diff --git a/backport/backport-include/linux/phy.h b/backport/backport-include/linux/phy.h
deleted file mode 100644
index 4d6f37e8..00000000
--- a/backport/backport-include/linux/phy.h
+++ /dev/null
@@ -1,65 +0,0 @@
-#ifndef __BACKPORT_LINUX_PHY_H
-#define __BACKPORT_LINUX_PHY_H
-#include_next <linux/phy.h>
-#include <linux/compiler.h>
-#include <linux/version.h>
-
-#if LINUX_VERSION_IS_LESS(4,5,0)
-#define phydev_name LINUX_BACKPORT(phydev_name)
-static inline const char *phydev_name(const struct phy_device *phydev)
-{
- return dev_name(&phydev->dev);
-}
-
-#define mdiobus_is_registered_device LINUX_BACKPORT(mdiobus_is_registered_device)
-static inline bool mdiobus_is_registered_device(struct mii_bus *bus, int addr)
-{
- return bus->phy_map[addr];
-}
-
-#define phy_attached_print LINUX_BACKPORT(phy_attached_print)
-void phy_attached_print(struct phy_device *phydev, const char *fmt, ...)
- __printf(2, 3);
-#define phy_attached_info LINUX_BACKPORT(phy_attached_info)
-void phy_attached_info(struct phy_device *phydev);
-
-static inline int backport_mdiobus_register(struct mii_bus *bus)
-{
- bus->irq = kmalloc(sizeof(int) * PHY_MAX_ADDR, GFP_KERNEL);
- if (!bus->irq) {
- pr_err("mii_bus irq allocation failed\n");
- return -ENOMEM;
- }
-
- memset(bus->irq, PHY_POLL, sizeof(int) * PHY_MAX_ADDR);
-
- return __mdiobus_register(bus, THIS_MODULE);
-}
-#ifdef mdiobus_register
-#undef mdiobus_register
-#endif
-#define mdiobus_register LINUX_BACKPORT(mdiobus_register)
-
-static inline void backport_mdiobus_unregister(struct mii_bus *bus)
-{
- kfree(bus->irq);
- mdiobus_unregister(bus);
-}
-#define mdiobus_unregister LINUX_BACKPORT(mdiobus_unregister)
-#endif /* < 4.5 */
-
-#if LINUX_VERSION_IS_LESS(4,5,0)
-#define phydev_get_addr LINUX_BACKPORT(phydev_get_addr)
-static inline int phydev_get_addr(struct phy_device *phydev)
-{
- return phydev->addr;
-}
-#else
-#define phydev_get_addr LINUX_BACKPORT(phydev_get_addr)
-static inline int phydev_get_addr(struct phy_device *phydev)
-{
- return phydev->mdio.addr;
-}
-#endif
-
-#endif /* __BACKPORT_LINUX_PHY_H */
diff --git a/backport/backport-include/linux/skbuff.h b/backport/backport-include/linux/skbuff.h
index fffe2345..b8a16ed3 100644
--- a/backport/backport-include/linux/skbuff.h
+++ b/backport/backport-include/linux/skbuff.h
@@ -108,8 +108,7 @@ static inline void nf_reset_ct(struct sk_buff *skb)
!LINUX_VERSION_IN_RANGE(5,4,69, 5,5,0) && \
!LINUX_VERSION_IN_RANGE(4,19,149, 4,20,0) && \
!LINUX_VERSION_IN_RANGE(4,14,200, 4,15,0) && \
- !LINUX_VERSION_IN_RANGE(4,9,238, 4,10,0) && \
- !LINUX_VERSION_IN_RANGE(4,4,238, 4,5,0)
+ !LINUX_VERSION_IN_RANGE(4,9,238, 4,10,0)
/**
* skb_queue_len_lockless - get queue length
* @list_: list to measure
diff --git a/backport/backport-include/linux/string.h b/backport/backport-include/linux/string.h
index 39257e5f..bbb076e0 100644
--- a/backport/backport-include/linux/string.h
+++ b/backport/backport-include/linux/string.h
@@ -3,11 +3,6 @@
#include_next <linux/string.h>
#include <linux/version.h>
-#if LINUX_VERSION_IS_LESS(4,5,0)
-#define memdup_user_nul LINUX_BACKPORT(memdup_user_nul)
-extern void *memdup_user_nul(const void __user *, size_t);
-#endif
-
#if LINUX_VERSION_IS_LESS(4,6,0)
int match_string(const char * const *array, size_t n, const char *string);
#endif /* LINUX_VERSION_IS_LESS(4,5,0) */
diff --git a/backport/backport-include/net/genetlink.h b/backport/backport-include/net/genetlink.h
index 3b75b47d..3ad8ebe8 100644
--- a/backport/backport-include/net/genetlink.h
+++ b/backport/backport-include/net/genetlink.h
@@ -91,10 +91,7 @@ struct backport_genl_ops {
void *__dummy_was_policy_must_be_null;
int (*doit)(struct sk_buff *skb,
struct genl_info *info);
-#if LINUX_VERSION_IS_GEQ(4,5,0) || \
- LINUX_VERSION_IN_RANGE(4,4,104, 4,5,0)
int (*start)(struct netlink_callback *cb);
-#endif
int (*dumpit)(struct sk_buff *skb,
struct netlink_callback *cb);
int (*done)(struct netlink_callback *cb);
@@ -111,10 +108,7 @@ __real_backport_genl_register_family(struct genl_family *family)
BUILD_BUG_ON(offsetof(struct genl_ops, f) != \
offsetof(struct backport_genl_ops, f))
OPS_VALIDATE(doit);
-#if LINUX_VERSION_IS_GEQ(4,5,0) || \
- LINUX_VERSION_IN_RANGE(4,4,104, 4,5,0)
OPS_VALIDATE(start);
-#endif
OPS_VALIDATE(dumpit);
OPS_VALIDATE(done);
OPS_VALIDATE(cmd);
diff --git a/backport/backport-include/net/ipv6.h b/backport/backport-include/net/ipv6.h
deleted file mode 100644
index 2532710c..00000000
--- a/backport/backport-include/net/ipv6.h
+++ /dev/null
@@ -1,25 +0,0 @@
-#ifndef __BACKPORT_NET_IPV6_H
-#define __BACKPORT_NET_IPV6_H
-#include_next <net/ipv6.h>
-#include <linux/version.h>
-
-
-#if LINUX_VERSION_IS_LESS(4,5,0)
-#define ipv6_addr_prefix_copy LINUX_BACKPORT(ipv6_addr_prefix_copy)
-static inline void ipv6_addr_prefix_copy(struct in6_addr *addr,
- const struct in6_addr *pfx,
- int plen)
-{
- /* caller must guarantee 0 <= plen <= 128 */
- int o = plen >> 3,
- b = plen & 0x7;
-
- memcpy(addr->s6_addr, pfx, o);
- if (b != 0) {
- addr->s6_addr[o] &= ~(0xff00 >> b);
- addr->s6_addr[o] |= (pfx->s6_addr[o] & (0xff00 >> b));
- }
-}
-#endif
-
-#endif /* __BACKPORT_NET_IPV6_H */
diff --git a/backport/backport-include/net/iw_handler.h b/backport/backport-include/net/iw_handler.h
deleted file mode 100644
index 7deca730..00000000
--- a/backport/backport-include/net/iw_handler.h
+++ /dev/null
@@ -1,11 +0,0 @@
-#ifndef __BACKPORT_IW_HANDLER_H
-#define __BACKPORT_IW_HANDLER_H
-#include_next <net/iw_handler.h>
-
-
-/* this was added in v3.2.79, v3.18.30, v4.1.21, v4.4.6 and 4.5 */
-#if !LINUX_VERSION_IS_GEQ(4,4,6)
-#define wireless_nlevent_flush LINUX_BACKPORT(wireless_nlevent_flush)
-static inline void wireless_nlevent_flush(void) {}
-#endif
-#endif /* __BACKPORT_IW_HANDLER_H */
diff --git a/backport/backport-include/net/sock.h b/backport/backport-include/net/sock.h
index 80e0f117..2a872b64 100644
--- a/backport/backport-include/net/sock.h
+++ b/backport/backport-include/net/sock.h
@@ -3,23 +3,6 @@
#include_next <net/sock.h>
#include <linux/version.h>
-
-#if LINUX_VERSION_IS_LESS(4,5,0)
-#define sk_set_bit LINUX_BACKPORT(sk_set_bit)
-static inline void sk_set_bit(int nr, struct sock *sk)
-{
- set_bit(nr, &sk->sk_socket->flags);
-}
-#endif /* < 4.5 */
-
-#if LINUX_VERSION_IS_LESS(4,5,0)
-#define sk_clear_bit LINUX_BACKPORT(sk_clear_bit)
-static inline void sk_clear_bit(int nr, struct sock *sk)
-{
- clear_bit(nr, &sk->sk_socket->flags);
-}
-#endif /* < 4.5 */
-
#if LINUX_VERSION_IS_LESS(4,16,0)
#define sk_pacing_shift_update LINUX_BACKPORT(sk_pacing_shift_update)
static inline void sk_pacing_shift_update(struct sock *sk, int val)
diff --git a/backport/compat/Makefile b/backport/compat/Makefile
index a1be9e83..dfd72d2d 100644
--- a/backport/compat/Makefile
+++ b/backport/compat/Makefile
@@ -7,7 +7,6 @@ endif
compat-y += main.o
# Kernel backport compatibility code
-compat-$(CPTCFG_KERNEL_4_5) += backport-4.5.o
compat-$(CPTCFG_KERNEL_4_6) += backport-4.6.o
compat-$(CPTCFG_KERNEL_4_7) += backport-4.7.o
compat-$(CPTCFG_KERNEL_4_8) += backport-4.8.o
diff --git a/backport/compat/backport-4.5.c b/backport/compat/backport-4.5.c
deleted file mode 100644
index 4b673845..00000000
--- a/backport/compat/backport-4.5.c
+++ /dev/null
@@ -1,165 +0,0 @@
-/*
- * Copyright(c) 2015 Hauke Mehrtens <hauke@hauke-m.de>
- *
- * Backport functionality introduced in Linux 4.5.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-
-#include <linux/device.h>
-#include <linux/export.h>
-#include <linux/errno.h>
-#include <linux/fs.h>
-#include <linux/leds.h>
-#include <linux/phy.h>
-#include <linux/printk.h>
-#include <linux/slab.h>
-#include <linux/string.h>
-#include <asm/uaccess.h>
-#include <linux/io.h>
-
-int led_set_brightness_sync(struct led_classdev *led_cdev,
- enum led_brightness value)
-{
- if (led_cdev->blink_delay_on || led_cdev->blink_delay_off)
- return -EBUSY;
-
- led_cdev->brightness = min(value, led_cdev->max_brightness);
-
- if (led_cdev->flags & LED_SUSPENDED)
- return 0;
-
- if (led_cdev->brightness_set_sync)
- return led_cdev->brightness_set_sync(led_cdev,
- led_cdev->brightness);
- return -ENOTSUPP;
-}
-EXPORT_SYMBOL_GPL(led_set_brightness_sync);
-
-/**
- * no_seek_end_llseek - llseek implementation for fixed-sized devices
- * @file: file structure to seek on
- * @offset: file offset to seek to
- * @whence: type of seek
- *
- */
-loff_t no_seek_end_llseek(struct file *file, loff_t offset, int whence)
-{
- switch (whence) {
- case SEEK_SET: case SEEK_CUR:
- return generic_file_llseek_size(file, offset, whence,
- ~0ULL, 0);
- default:
- return -EINVAL;
- }
-}
-EXPORT_SYMBOL_GPL(no_seek_end_llseek);
-
-/**
- * memdup_user_nul - duplicate memory region from user space and NUL-terminate
- *
- * @src: source address in user space
- * @len: number of bytes to copy
- *
- * Returns an ERR_PTR() on failure.
- */
-void *memdup_user_nul(const void __user *src, size_t len)
-{
- char *p;
-
- /*
- * Always use GFP_KERNEL, since copy_from_user() can sleep and
- * cause pagefault, which makes it pointless to use GFP_NOFS
- * or GFP_ATOMIC.
- */
- p = kmalloc(len + 1, GFP_KERNEL);
- if (!p)
- return ERR_PTR(-ENOMEM);
-
- if (copy_from_user(p, src, len)) {
- kfree(p);
- return ERR_PTR(-EFAULT);
- }
- p[len] = '\0';
-
- return p;
-}
-EXPORT_SYMBOL_GPL(memdup_user_nul);
-
-void phy_attached_info(struct phy_device *phydev)
-{
- phy_attached_print(phydev, NULL);
-}
-EXPORT_SYMBOL_GPL(phy_attached_info);
-
-#define ATTACHED_FMT "attached PHY driver [%s] (mii_bus:phy_addr=%s, irq=%d)"
-void phy_attached_print(struct phy_device *phydev, const char *fmt, ...)
-{
- if (!fmt) {
- dev_info(&phydev->dev, ATTACHED_FMT "\n",
- phydev->drv->name, phydev_name(phydev),
- phydev->irq);
- } else {
- va_list ap;
-
- dev_info(&phydev->dev, ATTACHED_FMT,
- phydev->drv->name, phydev_name(phydev),
- phydev->irq);
-
- va_start(ap, fmt);
- vprintk(fmt, ap);
- va_end(ap);
- }
-}
-EXPORT_SYMBOL_GPL(phy_attached_print);
-
-static void devm_led_trigger_release(struct device *dev, void *res)
-{
- led_trigger_unregister(*(struct led_trigger **)res);
-}
-
-int devm_led_trigger_register(struct device *dev,
- struct led_trigger *trig)
-{
- struct led_trigger **dr;
- int rc;
-
- dr = devres_alloc(devm_led_trigger_release, sizeof(*dr),
- GFP_KERNEL);
- if (!dr)
- return -ENOMEM;
-
- *dr = trig;
-
- rc = led_trigger_register(trig);
- if (rc)
- devres_free(dr);
- else
- devres_add(dev, dr);
-
- return rc;
-}
-EXPORT_SYMBOL_GPL(devm_led_trigger_register);
-
-/**
- * __ioread32_copy - copy data from MMIO space, in 32-bit units
- * @to: destination (must be 32-bit aligned)
- * @from: source, in MMIO space (must be 32-bit aligned)
- * @count: number of 32-bit quantities to copy
- *
- * Copy data from MMIO space to kernel space, in units of 32 bits at a
- * time. Order of access is not guaranteed, nor is a memory barrier
- * performed afterwards.
- */
-void __ioread32_copy(void *to, const void __iomem *from, size_t count)
-{
- u32 *dst = to;
- const u32 __iomem *src = from;
- const u32 __iomem *end = src + count;
-
- while (src < end)
- *dst++ = __raw_readl(src++);
-}
-EXPORT_SYMBOL_GPL(__ioread32_copy);
diff --git a/patches/0002-gpio-parent.cocci b/patches/0002-gpio-parent.cocci
deleted file mode 100644
index fd953447..00000000
--- a/patches/0002-gpio-parent.cocci
+++ /dev/null
@@ -1,25 +0,0 @@
-/* convert gpio: change member .dev to .parent
- *
- * add semantic patch which uses the dev member of struct gpio_chip on
- * kenrel version < 4.5 This change was done in upstream kernel commit
- * 58383c78 "gpio: change member .dev to .parent".
- */
-
-@r1@
-struct gpio_chip *chip;
-expression E1;
-@@
-+#if LINUX_VERSION_IS_GEQ(4,5,0)
- chip->parent = E1;
-+#else
-+chip->dev = E1;
-+#endif /* LINUX_VERSION_IS_GEQ(4,5,0) */
-@r2@
-struct gpio_chip chip;
-expression E2;
-@@
-+#if LINUX_VERSION_IS_GEQ(4,5,0)
- chip.parent = E2;
-+#else
-+chip.dev = E2;
-+#endif /* LINUX_VERSION_IS_GEQ(4,5,0) */
diff --git a/patches/0067-mdio-addr.cocci b/patches/0067-mdio-addr.cocci
deleted file mode 100644
index 1346585c..00000000
--- a/patches/0067-mdio-addr.cocci
+++ /dev/null
@@ -1,5 +0,0 @@
-@ r1 @
-struct phy_device *phydev;
-@@
--phydev->mdio.addr
-+phydev_get_addr(phydev)
--
2.44.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 02/10] backports: Remove support for kernel smaller than 4.6
2024-04-01 22:03 [PATCH 00/10] backports: Remove support for kernel older than 4.14 Hauke Mehrtens
2024-04-01 22:03 ` [PATCH 01/10] backports: Remove support for kernel smaller than 4.5 Hauke Mehrtens
@ 2024-04-01 22:03 ` Hauke Mehrtens
2024-04-01 22:03 ` [PATCH 03/10] backports: Remove support for kernel smaller than 4.7 Hauke Mehrtens
` (8 subsequent siblings)
10 siblings, 0 replies; 14+ messages in thread
From: Hauke Mehrtens @ 2024-04-01 22:03 UTC (permalink / raw)
To: backports; +Cc: Hauke Mehrtens
This removes all the code which is needed to support kernel 4.5.
---
.github/workflows/create.yml | 1 -
README | 2 +-
backport/backport-include/crypto/hash.h | 38 --------
backport/backport-include/linux/kcov.h | 2 -
backport/backport-include/linux/kernel.h | 9 --
backport/backport-include/linux/mii.h | 4 +-
backport/backport-include/linux/netdevice.h | 2 +-
backport/backport-include/linux/page_ref.h | 23 -----
backport/backport-include/linux/sched.h | 5 -
backport/backport-include/linux/string.h | 10 --
backport/backport-include/linux/usb/ch9.h | 12 ---
backport/compat/Makefile | 1 -
backport/compat/backport-4.10.c | 2 -
backport/compat/backport-4.6.c | 103 --------------------
backport/compat/backport-5.15.c | 2 -
dependencies | 6 --
16 files changed, 4 insertions(+), 218 deletions(-)
delete mode 100644 backport/backport-include/crypto/hash.h
delete mode 100644 backport/backport-include/linux/page_ref.h
delete mode 100644 backport/backport-include/linux/string.h
delete mode 100644 backport/backport-include/linux/usb/ch9.h
delete mode 100644 backport/compat/backport-4.6.c
diff --git a/.github/workflows/create.yml b/.github/workflows/create.yml
index 2c937b5c..f181da62 100644
--- a/.github/workflows/create.yml
+++ b/.github/workflows/create.yml
@@ -55,7 +55,6 @@ jobs:
strategy:
matrix:
kernel: [
- "4.5",
"4.6",
"4.7",
"4.8",
diff --git a/README b/README
index 92512d5c..31add70f 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.5 and above.
+for kernels 4.6 and above.
# Documentation
diff --git a/backport/backport-include/crypto/hash.h b/backport/backport-include/crypto/hash.h
deleted file mode 100644
index 96ae799d..00000000
--- a/backport/backport-include/crypto/hash.h
+++ /dev/null
@@ -1,38 +0,0 @@
-#ifndef _BACKPORT_CRYPTO_HASH_H
-#define _BACKPORT_CRYPTO_HASH_H
-#include_next <crypto/hash.h>
-#include <linux/version.h>
-
-#if LINUX_VERSION_IS_LESS(4,6,0)
-#define shash_desc_zero LINUX_BACKPORT(shash_desc_zero)
-static inline void shash_desc_zero(struct shash_desc *desc)
-{
- memzero_explicit(desc,
- sizeof(*desc) + crypto_shash_descsize(desc->tfm));
-}
-#endif
-
-#if LINUX_VERSION_IS_LESS(4,6,0)
-#define ahash_request_zero LINUX_BACKPORT(ahash_request_zero)
-static inline void ahash_request_zero(struct ahash_request *req)
-{
- memzero_explicit(req, sizeof(*req) +
- crypto_ahash_reqsize(crypto_ahash_reqtfm(req)));
-}
-#endif
-
-#ifndef AHASH_REQUEST_ON_STACK
-#define AHASH_REQUEST_ON_STACK(name, ahash) \
- char __##name##_desc[sizeof(struct ahash_request) + \
- crypto_ahash_reqsize(ahash)] CRYPTO_MINALIGN_ATTR; \
- struct ahash_request *name = (void *)__##name##_desc
-#endif
-
-#ifndef SHASH_DESC_ON_STACK
-#define SHASH_DESC_ON_STACK(shash, ctx) \
- char __##shash##_desc[sizeof(struct shash_desc) + \
- crypto_shash_descsize(ctx)] CRYPTO_MINALIGN_ATTR; \
- struct shash_desc *shash = (struct shash_desc *)__##shash##_desc
-#endif
-
-#endif /* _BACKPORT_CRYPTO_HASH_H */
diff --git a/backport/backport-include/linux/kcov.h b/backport/backport-include/linux/kcov.h
index 92095e63..2bea9057 100644
--- a/backport/backport-include/linux/kcov.h
+++ b/backport/backport-include/linux/kcov.h
@@ -2,9 +2,7 @@
#ifndef __BACKPORTS_LINUX_KCOV_H
#define __BACKPORTS_LINUX_KCOV_H
#include <linux/version.h>
-#if LINUX_VERSION_IS_GEQ(4,6,0)
#include_next <linux/kcov.h>
-#endif
#if LINUX_VERSION_IS_LESS(5,5,0)
#define kcov_remote_stop LINUX_BACKPORT(kcov_remote_stop)
diff --git a/backport/backport-include/linux/kernel.h b/backport/backport-include/linux/kernel.h
index 23a451b9..ae73f8db 100644
--- a/backport/backport-include/linux/kernel.h
+++ b/backport/backport-include/linux/kernel.h
@@ -3,14 +3,5 @@
#include_next <linux/kernel.h>
/* needed to include BUILD_BUG_ON_ZERO on <= 4.12 */
#include <linux/bug.h>
-#include <linux/version.h>
-
-
-#if LINUX_VERSION_IS_LESS(4,6,0)
-#define kstrtobool LINUX_BACKPORT(kstrtobool)
-int __must_check kstrtobool(const char *s, bool *res);
-#define kstrtobool_from_user LINUX_BACKPORT(kstrtobool_from_user)
-int __must_check kstrtobool_from_user(const char __user *s, size_t count, bool *res);
-#endif
#endif /* __BACKPORT_KERNEL_H */
diff --git a/backport/backport-include/linux/mii.h b/backport/backport-include/linux/mii.h
index 06bdc9b8..dcabbcc8 100644
--- a/backport/backport-include/linux/mii.h
+++ b/backport/backport-include/linux/mii.h
@@ -4,11 +4,11 @@
#include <linux/version.h>
-#if LINUX_VERSION_IN_RANGE(4,6,0, 4,11,0)
+#if LINUX_VERSION_IS_LESS(4,11,0)
extern int mii_ethtool_get_link_ksettings(
struct mii_if_info *mii, struct ethtool_link_ksettings *cmd);
extern int mii_ethtool_set_link_ksettings(
struct mii_if_info *mii, const struct ethtool_link_ksettings *cmd);
-#endif /* LINUX_VERSION_IN_RANGE(4,6,0, 4,11,0) */
+#endif /* < 4,11,0 */
#endif /* __BACKPORT_LINUX_MII_H */
diff --git a/backport/backport-include/linux/netdevice.h b/backport/backport-include/linux/netdevice.h
index f6d53f8a..71961625 100644
--- a/backport/backport-include/linux/netdevice.h
+++ b/backport/backport-include/linux/netdevice.h
@@ -129,7 +129,7 @@ struct rtnl_link_stats64 *
bp_dev_get_tstats64(struct net_device *dev, struct rtnl_link_stats64 *s);
#endif /* < 4.11 */
-#if LINUX_VERSION_IN_RANGE(4,6,0, 5,15,0)
+#if LINUX_VERSION_IS_LESS(5,15,0)
#define get_user_ifreq LINUX_BACKPORT(get_user_ifreq)
int get_user_ifreq(struct ifreq *ifr, void __user **ifrdata, void __user *arg);
#define put_user_ifreq LINUX_BACKPORT(put_user_ifreq)
diff --git a/backport/backport-include/linux/page_ref.h b/backport/backport-include/linux/page_ref.h
deleted file mode 100644
index e45734ec..00000000
--- a/backport/backport-include/linux/page_ref.h
+++ /dev/null
@@ -1,23 +0,0 @@
-#ifndef __BP_PAGE_REF_H
-#define __BP_PAGE_REF_H
-#include <linux/version.h>
-#if LINUX_VERSION_IS_GEQ(4,6,0)
-#include_next <linux/page_ref.h>
-#else
-static inline void page_ref_inc(struct page *page)
-{
- atomic_inc(&page->_count);
-}
-
-static inline int page_ref_count(struct page *page)
-{
- return atomic_read(&page->_count);
-}
-
-static inline int page_ref_sub_and_test(struct page *page, int nr)
-{
- return atomic_sub_and_test(nr, &page->_count);
-}
-#endif
-
-#endif /* __BP_PAGE_REF_H */
diff --git a/backport/backport-include/linux/sched.h b/backport/backport-include/linux/sched.h
index 6a5cf8db..36263857 100644
--- a/backport/backport-include/linux/sched.h
+++ b/backport/backport-include/linux/sched.h
@@ -4,11 +4,6 @@
#include_next <linux/sched.h>
#include <linux/version.h>
-/* kcov was added in 4.6 and is included since then */
-#if LINUX_VERSION_IS_LESS(4,6,0)
-#include <linux/kcov.h>
-#endif
-
#if LINUX_VERSION_IS_LESS(5,9,0)
#if LINUX_VERSION_IS_GEQ(4,11,0)
#include <uapi/linux/sched/types.h>
diff --git a/backport/backport-include/linux/string.h b/backport/backport-include/linux/string.h
deleted file mode 100644
index bbb076e0..00000000
--- a/backport/backport-include/linux/string.h
+++ /dev/null
@@ -1,10 +0,0 @@
-#ifndef __BACKPORT_LINUX_STRING_H
-#define __BACKPORT_LINUX_STRING_H
-#include_next <linux/string.h>
-#include <linux/version.h>
-
-#if LINUX_VERSION_IS_LESS(4,6,0)
-int match_string(const char * const *array, size_t n, const char *string);
-#endif /* LINUX_VERSION_IS_LESS(4,5,0) */
-
-#endif /* __BACKPORT_LINUX_STRING_H */
diff --git a/backport/backport-include/linux/usb/ch9.h b/backport/backport-include/linux/usb/ch9.h
deleted file mode 100644
index d8d9a48b..00000000
--- a/backport/backport-include/linux/usb/ch9.h
+++ /dev/null
@@ -1,12 +0,0 @@
-#ifndef __BACKPORT__LINUX_USB_CH9_H
-#define __BACKPORT__LINUX_USB_CH9_H
-
-#include <linux/version.h>
-#include_next <linux/usb/ch9.h>
-
-
-#if LINUX_VERSION_IS_LESS(4,6,0)
-#define USB_SPEED_SUPER_PLUS 6
-#endif
-
-#endif /* __BACKPORT__LINUX_USB_CH9_H */
diff --git a/backport/compat/Makefile b/backport/compat/Makefile
index dfd72d2d..87238c70 100644
--- a/backport/compat/Makefile
+++ b/backport/compat/Makefile
@@ -7,7 +7,6 @@ endif
compat-y += main.o
# Kernel backport compatibility code
-compat-$(CPTCFG_KERNEL_4_6) += backport-4.6.o
compat-$(CPTCFG_KERNEL_4_7) += backport-4.7.o
compat-$(CPTCFG_KERNEL_4_8) += backport-4.8.o
compat-$(CPTCFG_KERNEL_4_10) += backport-4.10.o
diff --git a/backport/compat/backport-4.10.c b/backport/compat/backport-4.10.c
index d1d69115..497d51ab 100644
--- a/backport/compat/backport-4.10.c
+++ b/backport/compat/backport-4.10.c
@@ -15,7 +15,6 @@
#include <linux/page_ref.h>
#include <linux/gfp.h>
-#if LINUX_VERSION_IS_GEQ(4,6,0)
#if LINUX_VERSION_IS_LESS(4,7,0)
static bool ethtool_convert_link_mode_to_legacy_u32(u32 *legacy_u32,
const unsigned long *src)
@@ -253,7 +252,6 @@ int mii_ethtool_get_link_ksettings(struct mii_if_info *mii,
return 0;
}
EXPORT_SYMBOL(mii_ethtool_get_link_ksettings);
-#endif /* LINUX_VERSION_IS_GEQ(4,6,0) */
void __page_frag_cache_drain(struct page *page, unsigned int count)
{
diff --git a/backport/compat/backport-4.6.c b/backport/compat/backport-4.6.c
deleted file mode 100644
index 8d0ecf56..00000000
--- a/backport/compat/backport-4.6.c
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * Copyright(c) 2016 Hauke Mehrtens <hauke@hauke-m.de>
- *
- * Backport functionality introduced in Linux 4.6.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-
-#include <linux/kernel.h>
-#include <linux/uaccess.h>
-#include <linux/export.h>
-
-/**
- * kstrtobool - convert common user inputs into boolean values
- * @s: input string
- * @res: result
- *
- * This routine returns 0 iff the first character is one of 'Yy1Nn0', or
- * [oO][NnFf] for "on" and "off". Otherwise it will return -EINVAL. Value
- * pointed to by res is updated upon finding a match.
- */
-int kstrtobool(const char *s, bool *res)
-{
- if (!s)
- return -EINVAL;
-
- switch (s[0]) {
- case 'y':
- case 'Y':
- case '1':
- *res = true;
- return 0;
- case 'n':
- case 'N':
- case '0':
- *res = false;
- return 0;
- case 'o':
- case 'O':
- switch (s[1]) {
- case 'n':
- case 'N':
- *res = true;
- return 0;
- case 'f':
- case 'F':
- *res = false;
- return 0;
- default:
- break;
- }
- default:
- break;
- }
-
- return -EINVAL;
-}
-EXPORT_SYMBOL_GPL(kstrtobool);
-
-/*
- * Since "base" would be a nonsense argument, this open-codes the
- * _from_user helper instead of using the helper macro below.
- */
-int kstrtobool_from_user(const char __user *s, size_t count, bool *res)
-{
- /* Longest string needed to differentiate, newline, terminator */
- char buf[4];
-
- count = min(count, sizeof(buf) - 1);
- if (copy_from_user(buf, s, count))
- return -EFAULT;
- buf[count] = '\0';
- return kstrtobool(buf, res);
-}
-EXPORT_SYMBOL_GPL(kstrtobool_from_user);
-
-/**
- * match_string - matches given string in an array
- * @array: array of strings
- * @n: number of strings in the array or -1 for NULL terminated arrays
- * @string: string to match with
- *
- * Return:
- * index of a @string in the @array if matches, or %-EINVAL otherwise.
- */
-int match_string(const char * const *array, size_t n, const char *string)
-{
- int index;
- const char *item;
-
- for (index = 0; index < n; index++) {
- item = array[index];
- if (!item)
- break;
- if (!strcmp(item, string))
- return index;
- }
-
- return -EINVAL;
-}
-EXPORT_SYMBOL(match_string);
diff --git a/backport/compat/backport-5.15.c b/backport/compat/backport-5.15.c
index 11aa74f6..bfafaec5 100644
--- a/backport/compat/backport-5.15.c
+++ b/backport/compat/backport-5.15.c
@@ -8,7 +8,6 @@
#include <uapi/linux/if.h>
-#if LINUX_VERSION_IS_GEQ(4,6,0)
int get_user_ifreq(struct ifreq *ifr, void __user **ifrdata, void __user *arg)
{
@@ -53,7 +52,6 @@ int put_user_ifreq(struct ifreq *ifr, void __user *arg)
}
EXPORT_SYMBOL(put_user_ifreq);
-#endif /* >= 4.6.0 */
/**
* usb_find_endpoint() - Given an endpoint address, search for the endpoint's
diff --git a/dependencies b/dependencies
index 3f88c446..e25d08e9 100644
--- a/dependencies
+++ b/dependencies
@@ -11,12 +11,6 @@ ATMEL 4.18
QTNFMAC 5.1
QTNFMAC_PCIE 5.1
-# needs GPIO stuff we didn't backport
-SSB_DRIVER_GPIO 4.5
-
-# Uses gpiochip_get_data()
-BCMA_DRIVER_GPIO 4.5
-
# struct ethtool_link_ksettings is missing, I'm lazy
USB_USBNET 4.6
USB_NET_RNDIS_WLAN 4.6
--
2.44.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 03/10] backports: Remove support for kernel smaller than 4.7
2024-04-01 22:03 [PATCH 00/10] backports: Remove support for kernel older than 4.14 Hauke Mehrtens
2024-04-01 22:03 ` [PATCH 01/10] backports: Remove support for kernel smaller than 4.5 Hauke Mehrtens
2024-04-01 22:03 ` [PATCH 02/10] backports: Remove support for kernel smaller than 4.6 Hauke Mehrtens
@ 2024-04-01 22:03 ` Hauke Mehrtens
2024-04-01 22:03 ` [PATCH 04/10] backports: Remove support for kernel smaller than 4.8 Hauke Mehrtens
` (7 subsequent siblings)
10 siblings, 0 replies; 14+ messages in thread
From: Hauke Mehrtens @ 2024-04-01 22:03 UTC (permalink / raw)
To: backports; +Cc: Hauke Mehrtens
This removes all the code which is needed to support kernel 4.6.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
.github/workflows/create.yml | 1 -
README | 2 +-
backport/backport-include/linux/devcoredump.h | 30 ---
backport/backport-include/linux/netdevice.h | 8 -
.../backport-include/linux/verification.h | 4 +-
backport/backport-include/net/netlink.h | 98 ----------
backport/compat/Makefile | 1 -
backport/compat/backport-4.10.c | 31 ---
backport/compat/backport-4.7.c | 176 ------------------
dependencies | 8 -
10 files changed, 3 insertions(+), 356 deletions(-)
delete mode 100644 backport/backport-include/linux/devcoredump.h
delete mode 100644 backport/compat/backport-4.7.c
diff --git a/.github/workflows/create.yml b/.github/workflows/create.yml
index f181da62..9d5873b2 100644
--- a/.github/workflows/create.yml
+++ b/.github/workflows/create.yml
@@ -55,7 +55,6 @@ jobs:
strategy:
matrix:
kernel: [
- "4.6",
"4.7",
"4.8",
"4.9",
diff --git a/README b/README
index 31add70f..46c734d3 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.6 and above.
+for kernels 4.7 and above.
# Documentation
diff --git a/backport/backport-include/linux/devcoredump.h b/backport/backport-include/linux/devcoredump.h
deleted file mode 100644
index 49b7c30d..00000000
--- a/backport/backport-include/linux/devcoredump.h
+++ /dev/null
@@ -1,30 +0,0 @@
-#ifndef __BACKPORT_LINUX_DEVCOREDUMP_H
-#define __BACKPORT_LINUX_DEVCOREDUMP_H
-#include_next <linux/devcoredump.h>
-#include <linux/version.h>
-#include <linux/scatterlist.h>
-
-/* We only need to add our wrapper inside the range from 3.18 until
- * 4.6, outside that we can let our BPAUTO mechanism handle it.
- */
-#if LINUX_VERSION_IS_LESS(4,7,0)
-static inline
-void backport_dev_coredumpm(struct device *dev, struct module *owner,
- void *data, size_t datalen, gfp_t gfp,
- ssize_t (*read_fn)(char *buffer, loff_t offset,
- size_t count, void *data,
- size_t datalen),
- void (*free_fn)(void *data))
-{
- dev_coredumpm(dev, owner, (const void *)data, datalen, gfp,
- (void *)read_fn, (void *)free_fn);
-}
-#define dev_coredumpm LINUX_BACKPORT(dev_coredumpm)
-
-#define dev_coredumpsg LINUX_BACKPORT(dev_coredumpsg)
-void dev_coredumpsg(struct device *dev, struct scatterlist *table,
- size_t datalen, gfp_t gfp);
-
-#endif /* LINUX_VERSION_IS_LESS(4,7,0) */
-
-#endif /* __BACKPORT_LINUX_DEVCOREDUMP_H */
diff --git a/backport/backport-include/linux/netdevice.h b/backport/backport-include/linux/netdevice.h
index 71961625..156bcade 100644
--- a/backport/backport-include/linux/netdevice.h
+++ b/backport/backport-include/linux/netdevice.h
@@ -27,14 +27,6 @@ static inline bool backport_napi_complete(struct napi_struct *n)
#define NETIF_F_CSUM_MASK NETIF_F_ALL_CSUM
#endif
-#if LINUX_VERSION_IS_LESS(4,7,0)
-#define netif_trans_update LINUX_BACKPORT(netif_trans_update)
-static inline void netif_trans_update(struct net_device *dev)
-{
- dev->trans_start = jiffies;
-}
-#endif
-
#if LINUX_VERSION_IS_LESS(4,11,9)
#define netdev_set_priv_destructor(_dev, _destructor) \
(_dev)->destructor = __ ## _destructor
diff --git a/backport/backport-include/linux/verification.h b/backport/backport-include/linux/verification.h
index 908d1a26..ce5811e2 100644
--- a/backport/backport-include/linux/verification.h
+++ b/backport/backport-include/linux/verification.h
@@ -1,7 +1,7 @@
#ifndef __BP_VERIFICATION_H
#define __BP_VERIFICATION_H
#include <linux/version.h>
-#if (LINUX_VERSION_IS_GEQ(4,7,0) && !defined(CPTCFG_BPAUTO_BUILD_SYSTEM_DATA_VERIFICATION)) && \
+#if !defined(CPTCFG_BPAUTO_BUILD_SYSTEM_DATA_VERIFICATION) && \
defined(CONFIG_CRYPTO_HASH_INFO)
#include_next <linux/verification.h>
#else
@@ -25,5 +25,5 @@ extern int verify_pkcs7_signature(const void *data, size_t len,
const void *data, size_t len,
size_t asn1hdrlen),
void *ctx);
-#endif /* LINUX_VERSION_IS_GEQ(4,7,0) && !defined(CPTCFG_BPAUTO_BUILD_SYSTEM_DATA_VERIFICATION) */
+#endif /* !defined(CPTCFG_BPAUTO_BUILD_SYSTEM_DATA_VERIFICATION) */
#endif /* __BP_VERIFICATION_H */
diff --git a/backport/backport-include/net/netlink.h b/backport/backport-include/net/netlink.h
index 3c7fdc7e..c8ea6af3 100644
--- a/backport/backport-include/net/netlink.h
+++ b/backport/backport-include/net/netlink.h
@@ -435,104 +435,6 @@ static inline int _nla_parse_nested4(struct nlattr *tb[], int maxtype,
macro_dispatcher(_nla_parse_nested, __VA_ARGS__)(__VA_ARGS__)
#endif /* LINUX_VERSION_IS_LESS(4,12,0) */
-#if LINUX_VERSION_IS_LESS(4,7,0)
-/**
- * nla_need_padding_for_64bit - test 64-bit alignment of the next attribute
- * @skb: socket buffer the message is stored in
- *
- * Return true if padding is needed to align the next attribute (nla_data()) to
- * a 64-bit aligned area.
- */
-#define nla_need_padding_for_64bit LINUX_BACKPORT(nla_need_padding_for_64bit)
-static inline bool nla_need_padding_for_64bit(struct sk_buff *skb)
-{
-#ifndef CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS
- /* The nlattr header is 4 bytes in size, that's why we test
- * if the skb->data _is_ aligned. A NOP attribute, plus
- * nlattr header for next attribute, will make nla_data()
- * 8-byte aligned.
- */
- if (IS_ALIGNED((unsigned long)skb_tail_pointer(skb), 8))
- return true;
-#endif
- return false;
-}
-/**
- * nla_align_64bit - 64-bit align the nla_data() of next attribute
- * @skb: socket buffer the message is stored in
- * @padattr: attribute type for the padding
- *
- * Conditionally emit a padding netlink attribute in order to make
- * the next attribute we emit have a 64-bit aligned nla_data() area.
- * This will only be done in architectures which do not have
- * HAVE_EFFICIENT_UNALIGNED_ACCESS defined.
- *
- * Returns zero on success or a negative error code.
- */
-#define nla_align_64bit LINUX_BACKPORT(nla_align_64bit)
-static inline int nla_align_64bit(struct sk_buff *skb, int padattr)
-{
- if (nla_need_padding_for_64bit(skb) &&
- !nla_reserve(skb, padattr, 0))
- return -EMSGSIZE;
- return 0;
-}
-
-/**
- * nla_total_size_64bit - total length of attribute including padding
- * @payload: length of payload
- */
-#define nla_total_size_64bit LINUX_BACKPORT(nla_total_size_64bit)
-static inline int nla_total_size_64bit(int payload)
-{
- return NLA_ALIGN(nla_attr_size(payload))
-#ifndef HAVE_EFFICIENT_UNALIGNED_ACCESS
- + NLA_ALIGN(nla_attr_size(0))
-#endif
- ;
-}
-#define __nla_reserve_64bit LINUX_BACKPORT(__nla_reserve_64bit)
-struct nlattr *__nla_reserve_64bit(struct sk_buff *skb, int attrtype,
- int attrlen, int padattr);
-#define nla_reserve_64bit LINUX_BACKPORT(nla_reserve_64bit)
-struct nlattr *nla_reserve_64bit(struct sk_buff *skb, int attrtype,
- int attrlen, int padattr);
-#define __nla_put_64bit LINUX_BACKPORT(__nla_put_64bit)
-void __nla_put_64bit(struct sk_buff *skb, int attrtype, int attrlen,
- const void *data, int padattr);
-#define nla_put_64bit LINUX_BACKPORT(nla_put_64bit)
-int nla_put_64bit(struct sk_buff *skb, int attrtype, int attrlen,
- const void *data, int padattr);
-/**
- * nla_put_u64_64bit - Add a u64 netlink attribute to a skb and align it
- * @skb: socket buffer to add attribute to
- * @attrtype: attribute type
- * @value: numeric value
- * @padattr: attribute type for the padding
- */
-#define nla_put_u64_64bit LINUX_BACKPORT(nla_put_u64_64bit)
-static inline int nla_put_u64_64bit(struct sk_buff *skb, int attrtype,
- u64 value, int padattr)
-{
- return nla_put_64bit(skb, attrtype, sizeof(u64), &value, padattr);
-}
-
-
-/**
- * nla_put_s64 - Add a s64 netlink attribute to a socket buffer and align it
- * @skb: socket buffer to add attribute to
- * @attrtype: attribute type
- * @value: numeric value
- * @padattr: attribute type for the padding
- */
-#define nla_put_s64 LINUX_BACKPORT(nla_put_s64)
-static inline int nla_put_s64(struct sk_buff *skb, int attrtype, s64 value,
- int padattr)
-{
- return nla_put_64bit(skb, attrtype, sizeof(s64), &value, padattr);
-}
-#endif /* < 4.7 */
-
#if LINUX_VERSION_IS_LESS(4,10,0)
/**
* nla_memdup - duplicate attribute memory (kmemdup)
diff --git a/backport/compat/Makefile b/backport/compat/Makefile
index 87238c70..e5ec7092 100644
--- a/backport/compat/Makefile
+++ b/backport/compat/Makefile
@@ -7,7 +7,6 @@ endif
compat-y += main.o
# Kernel backport compatibility code
-compat-$(CPTCFG_KERNEL_4_7) += backport-4.7.o
compat-$(CPTCFG_KERNEL_4_8) += backport-4.8.o
compat-$(CPTCFG_KERNEL_4_10) += backport-4.10.o
compat-$(CPTCFG_KERNEL_4_11) += backport-4.11.o
diff --git a/backport/compat/backport-4.10.c b/backport/compat/backport-4.10.c
index 497d51ab..565dc3aa 100644
--- a/backport/compat/backport-4.10.c
+++ b/backport/compat/backport-4.10.c
@@ -15,37 +15,6 @@
#include <linux/page_ref.h>
#include <linux/gfp.h>
-#if LINUX_VERSION_IS_LESS(4,7,0)
-static bool ethtool_convert_link_mode_to_legacy_u32(u32 *legacy_u32,
- const unsigned long *src)
-{
- bool retval = true;
-
- /* TODO: following test will soon always be true */
- if (__ETHTOOL_LINK_MODE_MASK_NBITS > 32) {
- __ETHTOOL_DECLARE_LINK_MODE_MASK(ext);
-
- bitmap_zero(ext, __ETHTOOL_LINK_MODE_MASK_NBITS);
- bitmap_fill(ext, 32);
- bitmap_complement(ext, ext, __ETHTOOL_LINK_MODE_MASK_NBITS);
- if (bitmap_intersects(ext, src,
- __ETHTOOL_LINK_MODE_MASK_NBITS)) {
- /* src mask goes beyond bit 31 */
- retval = false;
- }
- }
- *legacy_u32 = src[0];
- return retval;
-}
-
-static void ethtool_convert_legacy_u32_to_link_mode(unsigned long *dst,
- u32 legacy_u32)
-{
- bitmap_zero(dst, __ETHTOOL_LINK_MODE_MASK_NBITS);
- dst[0] = legacy_u32;
-}
-#endif
-
static u32 mii_get_an(struct mii_if_info *mii, u16 addr)
{
int advert;
diff --git a/backport/compat/backport-4.7.c b/backport/compat/backport-4.7.c
deleted file mode 100644
index d261abe6..00000000
--- a/backport/compat/backport-4.7.c
+++ /dev/null
@@ -1,176 +0,0 @@
-/*
- * Copyright(c) 2016 Hauke Mehrtens <hauke@hauke-m.de>
- *
- * Backport functionality introduced in Linux 4.7.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-
-#include <linux/devcoredump.h>
-#include <linux/export.h>
-#include <linux/list.h>
-#include <linux/rcupdate.h>
-#include <linux/scatterlist.h>
-#include <linux/slab.h>
-#include <linux/spinlock.h>
-#include <linux/skbuff.h>
-#include <net/netlink.h>
-
-/**
- * __nla_reserve_64bit - reserve room for attribute on the skb and align it
- * @skb: socket buffer to reserve room on
- * @attrtype: attribute type
- * @attrlen: length of attribute payload
- *
- * Adds a netlink attribute header to a socket buffer and reserves
- * room for the payload but does not copy it. It also ensure that this
- * attribute will be 64-bit aign.
- *
- * The caller is responsible to ensure that the skb provides enough
- * tailroom for the attribute header and payload.
- */
-struct nlattr *__nla_reserve_64bit(struct sk_buff *skb, int attrtype,
- int attrlen, int padattr)
-{
- if (nla_need_padding_for_64bit(skb))
- nla_align_64bit(skb, padattr);
-
- return __nla_reserve(skb, attrtype, attrlen);
-}
-EXPORT_SYMBOL_GPL(__nla_reserve_64bit);
-
-/**
- * nla_reserve_64bit - reserve room for attribute on the skb and align it
- * @skb: socket buffer to reserve room on
- * @attrtype: attribute type
- * @attrlen: length of attribute payload
- *
- * Adds a netlink attribute header to a socket buffer and reserves
- * room for the payload but does not copy it. It also ensure that this
- * attribute will be 64-bit aign.
- *
- * Returns NULL if the tailroom of the skb is insufficient to store
- * the attribute header and payload.
- */
-struct nlattr *nla_reserve_64bit(struct sk_buff *skb, int attrtype, int attrlen,
- int padattr)
-{
- size_t len;
-
- if (nla_need_padding_for_64bit(skb))
- len = nla_total_size_64bit(attrlen);
- else
- len = nla_total_size(attrlen);
- if (unlikely(skb_tailroom(skb) < len))
- return NULL;
-
- return __nla_reserve_64bit(skb, attrtype, attrlen, padattr);
-}
-EXPORT_SYMBOL_GPL(nla_reserve_64bit);
-
-/**
- * __nla_put_64bit - Add a netlink attribute to a socket buffer and align it
- * @skb: socket buffer to add attribute to
- * @attrtype: attribute type
- * @attrlen: length of attribute payload
- * @data: head of attribute payload
- *
- * The caller is responsible to ensure that the skb provides enough
- * tailroom for the attribute header and payload.
- */
-void __nla_put_64bit(struct sk_buff *skb, int attrtype, int attrlen,
- const void *data, int padattr)
-{
- struct nlattr *nla;
-
- nla = __nla_reserve_64bit(skb, attrtype, attrlen, padattr);
- memcpy(nla_data(nla), data, attrlen);
-}
-EXPORT_SYMBOL_GPL(__nla_put_64bit);
-
-/**
- * nla_put_64bit - Add a netlink attribute to a socket buffer and align it
- * @skb: socket buffer to add attribute to
- * @attrtype: attribute type
- * @attrtype: attribute type
- * @attrlen: length of attribute payload
- * @data: head of attribute payload
- *
- * Returns -EMSGSIZE if the tailroom of the skb is insufficient to store
- * the attribute header and payload.
- */
-int nla_put_64bit(struct sk_buff *skb, int attrtype, int attrlen,
- const void *data, int padattr)
-{
- size_t len;
-
- if (nla_need_padding_for_64bit(skb))
- len = nla_total_size_64bit(attrlen);
- else
- len = nla_total_size(attrlen);
- if (unlikely(skb_tailroom(skb) < len))
- return -EMSGSIZE;
-
- __nla_put_64bit(skb, attrtype, attrlen, data, padattr);
- return 0;
-}
-EXPORT_SYMBOL_GPL(nla_put_64bit);
-
-static void devcd_free_sgtable(void *data)
-{
- struct scatterlist *table = data;
- int i;
- struct page *page;
- struct scatterlist *iter;
- struct scatterlist *delete_iter;
-
- /* free pages */
- iter = table;
- for_each_sg(table, iter, sg_nents(table), i) {
- page = sg_page(iter);
- if (page)
- __free_page(page);
- }
-
- /* then free all chained tables */
- iter = table;
- delete_iter = table; /* always points on a head of a table */
- while (!sg_is_last(iter)) {
- iter++;
- if (sg_is_chain(iter)) {
- iter = sg_chain_ptr(iter);
- kfree(delete_iter);
- delete_iter = iter;
- }
- }
-
- /* free the last table */
- kfree(delete_iter);
-}
-
-static ssize_t devcd_read_from_sgtable(char *buffer, loff_t offset,
- size_t buf_len, void *data,
- size_t data_len)
-{
- struct scatterlist *table = data;
-
- if (offset > data_len)
- return -EINVAL;
-
- if (offset + buf_len > data_len)
- buf_len = data_len - offset;
- return sg_pcopy_to_buffer(table, sg_nents(table), buffer, buf_len,
- offset);
-}
-
-void dev_coredumpsg(struct device *dev, struct scatterlist *table,
- size_t datalen, gfp_t gfp)
-{
- dev_coredumpm(dev, THIS_MODULE, table, datalen, gfp,
- /* cast away some const problems */
- (void *)devcd_read_from_sgtable,
- (void *)devcd_free_sgtable);
-}
-EXPORT_SYMBOL_GPL(dev_coredumpsg);
diff --git a/dependencies b/dependencies
index e25d08e9..1377b1b6 100644
--- a/dependencies
+++ b/dependencies
@@ -11,17 +11,9 @@ ATMEL 4.18
QTNFMAC 5.1
QTNFMAC_PCIE 5.1
-# struct ethtool_link_ksettings is missing, I'm lazy
-USB_USBNET 4.6
-USB_NET_RNDIS_WLAN 4.6
-
# For Coexsitence the BT driver has to export rsi_bt_ops
RSI_COEX 4.17
-# needs napi_consume_skb()
-MT7915E 4.6
-MT7921E 4.6
-
# depends on crypto_sync_skcipher()
AIRO 4.20
AIRO_CS 4.20
--
2.44.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 04/10] backports: Remove support for kernel smaller than 4.8
2024-04-01 22:03 [PATCH 00/10] backports: Remove support for kernel older than 4.14 Hauke Mehrtens
` (2 preceding siblings ...)
2024-04-01 22:03 ` [PATCH 03/10] backports: Remove support for kernel smaller than 4.7 Hauke Mehrtens
@ 2024-04-01 22:03 ` Hauke Mehrtens
2024-04-01 22:03 ` [PATCH 05/10] backports: Remove support for kernel smaller than 4.9 Hauke Mehrtens
` (6 subsequent siblings)
10 siblings, 0 replies; 14+ messages in thread
From: Hauke Mehrtens @ 2024-04-01 22:03 UTC (permalink / raw)
To: backports; +Cc: Hauke Mehrtens
This removes all the code which is needed to support kernel 4.7.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
.github/workflows/create.yml | 1 -
README | 2 +-
backport/backport-include/linux/atomic.h | 48 ------
backport/backport-include/linux/debugfs.h | 5 +-
backport/backport-include/linux/pci.h | 22 ---
backport/backport-include/linux/time.h | 8 -
backport/backport-include/linux/usb/cdc.h | 61 -------
backport/compat/Makefile | 1 -
backport/compat/backport-4.8.c | 196 ----------------------
9 files changed, 3 insertions(+), 341 deletions(-)
delete mode 100644 backport/backport-include/linux/usb/cdc.h
delete mode 100644 backport/compat/backport-4.8.c
diff --git a/.github/workflows/create.yml b/.github/workflows/create.yml
index 9d5873b2..3bdbc2a8 100644
--- a/.github/workflows/create.yml
+++ b/.github/workflows/create.yml
@@ -55,7 +55,6 @@ jobs:
strategy:
matrix:
kernel: [
- "4.7",
"4.8",
"4.9",
"4.10",
diff --git a/README b/README
index 46c734d3..e1f40943 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.7 and above.
+for kernels 4.8 and above.
# Documentation
diff --git a/backport/backport-include/linux/atomic.h b/backport/backport-include/linux/atomic.h
index 6669831c..18d2df21 100644
--- a/backport/backport-include/linux/atomic.h
+++ b/backport/backport-include/linux/atomic.h
@@ -2,30 +2,6 @@
#define __BP_ATOMIC_H
#include_next <linux/atomic.h>
-/* atomic_cmpxchg_relaxed */
-#ifndef atomic_cmpxchg_relaxed
-#define atomic_cmpxchg_relaxed atomic_cmpxchg
-#define atomic_cmpxchg_acquire atomic_cmpxchg
-#define atomic_cmpxchg_release atomic_cmpxchg
-
-#else /* atomic_cmpxchg_relaxed */
-
-#ifndef atomic_cmpxchg_acquire
-#define atomic_cmpxchg_acquire(...) \
- __atomic_op_acquire(atomic_cmpxchg, __VA_ARGS__)
-#endif
-
-#ifndef atomic_cmpxchg_release
-#define atomic_cmpxchg_release(...) \
- __atomic_op_release(atomic_cmpxchg, __VA_ARGS__)
-#endif
-
-#ifndef atomic_cmpxchg
-#define atomic_cmpxchg(...) \
- __atomic_op_fence(atomic_cmpxchg, __VA_ARGS__)
-#endif
-#endif /* atomic_cmpxchg_relaxed */
-
/* these were introduced together, so just a single check is enough */
#ifndef atomic_try_cmpxchg_acquire
#ifndef atomic_try_cmpxchg
@@ -68,28 +44,4 @@ static inline int atomic_fetch_add_unless(atomic_t *v, int a, int u)
#define __atomic_post_full_fence smp_mb__after_atomic
#endif
-#if LINUX_VERSION_IS_LESS(4,8,0)
-static inline int
-atomic_fetch_add(int i, atomic_t *v)
-{
- return atomic_add_return(i, v) - i;
-}
-
-static inline int
-atomic_fetch_sub(int i, atomic_t *v)
-{
- return atomic_sub_return(i, v) + i;
-}
-#endif
-
-#ifndef atomic_fetch_add_relaxed
-#define atomic_fetch_add_relaxed atomic_fetch_add
-#endif
-
-#ifndef atomic_fetch_sub_relaxed
-#define atomic_fetch_sub_acquire atomic_fetch_sub
-#define atomic_fetch_sub_release atomic_fetch_sub
-#define atomic_fetch_sub_relaxed atomic_fetch_sub
-#endif
-
#endif /* __BP_ATOMIC_H */
diff --git a/backport/backport-include/linux/debugfs.h b/backport/backport-include/linux/debugfs.h
index af401cf5..5c671d2d 100644
--- a/backport/backport-include/linux/debugfs.h
+++ b/backport/backport-include/linux/debugfs.h
@@ -5,8 +5,7 @@
#include <linux/device.h>
#if LINUX_VERSION_IS_LESS(4,9,0) && \
- !LINUX_VERSION_IN_RANGE(4,8,4, 4,9,0) && \
- !LINUX_VERSION_IN_RANGE(4,7,10, 4,8,0)
+ !LINUX_VERSION_IN_RANGE(4,8,4, 4,9,0)
static inline const struct file_operations *
debugfs_real_fops(const struct file *filp)
{
@@ -16,7 +15,7 @@ debugfs_real_fops(const struct file *filp)
*/
return filp->f_path.dentry->d_fsdata;
}
-#endif /* <4.9.0 but not >= 4.8.4, 4.7.10 */
+#endif /* <4.9.0 but not >= 4.8.4 */
#ifndef DEFINE_DEBUGFS_ATTRIBUTE
#define DEFINE_DEBUGFS_ATTRIBUTE(__fops, __get, __set, __fmt) \
diff --git a/backport/backport-include/linux/pci.h b/backport/backport-include/linux/pci.h
index 75eb2359..2a5309d9 100644
--- a/backport/backport-include/linux/pci.h
+++ b/backport/backport-include/linux/pci.h
@@ -7,28 +7,6 @@
#include <linux/pci-aspm.h>
#endif
-
-
-#if LINUX_VERSION_IS_LESS(4,8,0)
-#define pci_alloc_irq_vectors LINUX_BACKPORT(pci_alloc_irq_vectors)
-#ifdef CONFIG_PCI_MSI
-int pci_alloc_irq_vectors(struct pci_dev *dev, unsigned int min_vecs,
- unsigned int max_vecs, unsigned int flags);
-#else
-static inline int pci_alloc_irq_vectors(struct pci_dev *dev, unsigned int min_vecs,
- unsigned int max_vecs, unsigned int flags)
-{ return -ENOSYS; }
-#endif
-#endif
-
-#if LINUX_VERSION_IS_LESS(4,8,0)
-#define pci_free_irq_vectors LINUX_BACKPORT(pci_free_irq_vectors)
-static inline void pci_free_irq_vectors(struct pci_dev *dev)
-{
-}
-#endif
-
-
#if LINUX_VERSION_IS_LESS(4,9,0) && \
!LINUX_VERSION_IN_RANGE(4,8,13, 4,9,0)
diff --git a/backport/backport-include/linux/time.h b/backport/backport-include/linux/time.h
index 712881db..1678c91a 100644
--- a/backport/backport-include/linux/time.h
+++ b/backport/backport-include/linux/time.h
@@ -4,14 +4,6 @@
#include <linux/time64.h>
-#if LINUX_VERSION_IS_LESS(4,8,0)
-static inline void time64_to_tm(time64_t totalsecs, int offset,
- struct tm *result)
-{
- time_to_tm((time_t)totalsecs, 0, result);
-}
-#endif
-
#ifndef time_after32
/**
* time_after32 - compare two 32-bit relative times
diff --git a/backport/backport-include/linux/usb/cdc.h b/backport/backport-include/linux/usb/cdc.h
deleted file mode 100644
index 5ad31bf1..00000000
--- a/backport/backport-include/linux/usb/cdc.h
+++ /dev/null
@@ -1,61 +0,0 @@
-#ifndef __BP_USB_CDC_H
-#define __BP_USB_CDC_H
-#include <linux/version.h>
-
-#if LINUX_VERSION_IS_GEQ(4,8,0)
-#include_next <linux/usb/cdc.h>
-#else
-#include <uapi/linux/usb/cdc.h>
-
-/*
- * inofficial magic numbers
- */
-
-#define CDC_PHONET_MAGIC_NUMBER 0xAB
-
-#ifndef USB_CDC_MBIM_EXTENDED_TYPE
-#define USB_CDC_MBIM_EXTENDED_TYPE 0x1c
-
-/* "MBIM Extended Functional Descriptor" from CDC MBIM spec 1.0 errata-1 */
-struct usb_cdc_mbim_extended_desc {
- __u8 bLength;
- __u8 bDescriptorType;
- __u8 bDescriptorSubType;
-
- __le16 bcdMBIMExtendedVersion;
- __u8 bMaxOutstandingCommandMessages;
- __le16 wMTU;
-} __attribute__ ((packed));
-#endif
-
-/*
- * parsing CDC headers
- */
-
-struct usb_cdc_parsed_header {
- struct usb_cdc_union_desc *usb_cdc_union_desc;
- struct usb_cdc_header_desc *usb_cdc_header_desc;
-
- struct usb_cdc_call_mgmt_descriptor *usb_cdc_call_mgmt_descriptor;
- struct usb_cdc_acm_descriptor *usb_cdc_acm_descriptor;
- struct usb_cdc_country_functional_desc *usb_cdc_country_functional_desc;
- struct usb_cdc_network_terminal_desc *usb_cdc_network_terminal_desc;
- struct usb_cdc_ether_desc *usb_cdc_ether_desc;
- struct usb_cdc_dmm_desc *usb_cdc_dmm_desc;
- struct usb_cdc_mdlm_desc *usb_cdc_mdlm_desc;
- struct usb_cdc_mdlm_detail_desc *usb_cdc_mdlm_detail_desc;
- struct usb_cdc_obex_desc *usb_cdc_obex_desc;
- struct usb_cdc_ncm_desc *usb_cdc_ncm_desc;
- struct usb_cdc_mbim_desc *usb_cdc_mbim_desc;
- struct usb_cdc_mbim_extended_desc *usb_cdc_mbim_extended_desc;
-
- bool phonet_magic_present;
-};
-
-#define cdc_parse_cdc_header LINUX_BACKPORT(cdc_parse_cdc_header)
-int cdc_parse_cdc_header(struct usb_cdc_parsed_header *hdr,
- struct usb_interface *intf,
- u8 *buffer, int buflen);
-#endif
-
-#endif /* __BP_USB_CDC_H */
diff --git a/backport/compat/Makefile b/backport/compat/Makefile
index e5ec7092..7bc66fb1 100644
--- a/backport/compat/Makefile
+++ b/backport/compat/Makefile
@@ -7,7 +7,6 @@ endif
compat-y += main.o
# Kernel backport compatibility code
-compat-$(CPTCFG_KERNEL_4_8) += backport-4.8.o
compat-$(CPTCFG_KERNEL_4_10) += backport-4.10.o
compat-$(CPTCFG_KERNEL_4_11) += backport-4.11.o
compat-$(CPTCFG_KERNEL_4_12) += backport-4.12.o
diff --git a/backport/compat/backport-4.8.c b/backport/compat/backport-4.8.c
deleted file mode 100644
index 11b2e7d7..00000000
--- a/backport/compat/backport-4.8.c
+++ /dev/null
@@ -1,196 +0,0 @@
-/*
- * Copyright(c) 2017 Intel Deutschland GmbH
- *
- * Backport functionality introduced in Linux 4.8.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-#include <linux/usb.h>
-#include <linux/usb/cdc.h>
-#include <linux/pci.h>
-
-int cdc_parse_cdc_header(struct usb_cdc_parsed_header *hdr,
- struct usb_interface *intf,
- u8 *buffer, int buflen)
-{
- /* duplicates are ignored */
- struct usb_cdc_union_desc *union_header = NULL;
-
- /* duplicates are not tolerated */
- struct usb_cdc_header_desc *header = NULL;
- struct usb_cdc_ether_desc *ether = NULL;
- struct usb_cdc_mdlm_detail_desc *detail = NULL;
- struct usb_cdc_mdlm_desc *desc = NULL;
-
- unsigned int elength;
- int cnt = 0;
-
- memset(hdr, 0x00, sizeof(struct usb_cdc_parsed_header));
- hdr->phonet_magic_present = false;
- while (buflen > 0) {
- elength = buffer[0];
- if (!elength) {
- dev_err(&intf->dev, "skipping garbage byte\n");
- elength = 1;
- goto next_desc;
- }
- if (buffer[1] != USB_DT_CS_INTERFACE) {
- dev_err(&intf->dev, "skipping garbage\n");
- goto next_desc;
- }
-
- switch (buffer[2]) {
- case USB_CDC_UNION_TYPE: /* we've found it */
- if (elength < sizeof(struct usb_cdc_union_desc))
- goto next_desc;
- if (union_header) {
- dev_err(&intf->dev, "More than one union descriptor, skipping ...\n");
- goto next_desc;
- }
- union_header = (struct usb_cdc_union_desc *)buffer;
- break;
- case USB_CDC_COUNTRY_TYPE:
- if (elength < sizeof(struct usb_cdc_country_functional_desc))
- goto next_desc;
- hdr->usb_cdc_country_functional_desc =
- (struct usb_cdc_country_functional_desc *)buffer;
- break;
- case USB_CDC_HEADER_TYPE:
- if (elength != sizeof(struct usb_cdc_header_desc))
- goto next_desc;
- if (header)
- return -EINVAL;
- header = (struct usb_cdc_header_desc *)buffer;
- break;
- case USB_CDC_ACM_TYPE:
- if (elength < sizeof(struct usb_cdc_acm_descriptor))
- goto next_desc;
- hdr->usb_cdc_acm_descriptor =
- (struct usb_cdc_acm_descriptor *)buffer;
- break;
- case USB_CDC_ETHERNET_TYPE:
- if (elength != sizeof(struct usb_cdc_ether_desc))
- goto next_desc;
- if (ether)
- return -EINVAL;
- ether = (struct usb_cdc_ether_desc *)buffer;
- break;
- case USB_CDC_CALL_MANAGEMENT_TYPE:
- if (elength < sizeof(struct usb_cdc_call_mgmt_descriptor))
- goto next_desc;
- hdr->usb_cdc_call_mgmt_descriptor =
- (struct usb_cdc_call_mgmt_descriptor *)buffer;
- break;
- case USB_CDC_DMM_TYPE:
- if (elength < sizeof(struct usb_cdc_dmm_desc))
- goto next_desc;
- hdr->usb_cdc_dmm_desc =
- (struct usb_cdc_dmm_desc *)buffer;
- break;
- case USB_CDC_MDLM_TYPE:
- if (elength < sizeof(struct usb_cdc_mdlm_desc *))
- goto next_desc;
- if (desc)
- return -EINVAL;
- desc = (struct usb_cdc_mdlm_desc *)buffer;
- break;
- case USB_CDC_MDLM_DETAIL_TYPE:
- if (elength < sizeof(struct usb_cdc_mdlm_detail_desc *))
- goto next_desc;
- if (detail)
- return -EINVAL;
- detail = (struct usb_cdc_mdlm_detail_desc *)buffer;
- break;
- case USB_CDC_NCM_TYPE:
- if (elength < sizeof(struct usb_cdc_ncm_desc))
- goto next_desc;
- hdr->usb_cdc_ncm_desc = (struct usb_cdc_ncm_desc *)buffer;
- break;
- case USB_CDC_MBIM_TYPE:
- if (elength < sizeof(struct usb_cdc_mbim_desc))
- goto next_desc;
-
- hdr->usb_cdc_mbim_desc = (struct usb_cdc_mbim_desc *)buffer;
- break;
- case USB_CDC_MBIM_EXTENDED_TYPE:
- if (elength < sizeof(struct usb_cdc_mbim_extended_desc))
- break;
- hdr->usb_cdc_mbim_extended_desc =
- (struct usb_cdc_mbim_extended_desc *)buffer;
- break;
- case CDC_PHONET_MAGIC_NUMBER:
- hdr->phonet_magic_present = true;
- break;
- default:
- /*
- * there are LOTS more CDC descriptors that
- * could legitimately be found here.
- */
- dev_dbg(&intf->dev, "Ignoring descriptor: type %02x, length %ud\n",
- buffer[2], elength);
- goto next_desc;
- }
- cnt++;
-next_desc:
- buflen -= elength;
- buffer += elength;
- }
- hdr->usb_cdc_union_desc = union_header;
- hdr->usb_cdc_header_desc = header;
- hdr->usb_cdc_mdlm_detail_desc = detail;
- hdr->usb_cdc_mdlm_desc = desc;
- hdr->usb_cdc_ether_desc = ether;
- return cnt;
-}
-EXPORT_SYMBOL_GPL(cdc_parse_cdc_header);
-
-#ifdef CONFIG_PCI
-#ifdef CONFIG_PCI_MSI
-
-/**
- * pci_alloc_irq_vectors - allocate multiple IRQs for a device
- * @dev: PCI device to operate on
- * @min_vecs: minimum number of vectors required (must be >= 1)
- * @max_vecs: maximum (desired) number of vectors
- * @flags: flags or quirks for the allocation
- *
- * Allocate up to @max_vecs interrupt vectors for @dev, using MSI-X or MSI
- * vectors if available, and fall back to a single legacy vector
- * if neither is available. Return the number of vectors allocated,
- * (which might be smaller than @max_vecs) if successful, or a negative
- * error code on error. If less than @min_vecs interrupt vectors are
- * available for @dev the function will fail with -ENOSPC.
- *
- * To get the Linux IRQ number used for a vector that can be passed to
- * request_irq() use the pci_irq_vector() helper.
- */
-int pci_alloc_irq_vectors(struct pci_dev *dev, unsigned int min_vecs,
- unsigned int max_vecs, unsigned int flags)
-{
- int vecs = -ENOSPC;
-
- if (flags & PCI_IRQ_MSIX) {
- vecs = pci_enable_msix_range(dev, NULL, min_vecs, max_vecs);
- if (vecs > 0)
- return vecs;
- }
-
- if (flags & PCI_IRQ_MSI) {
- vecs = pci_enable_msi_range(dev, min_vecs, max_vecs);
- if (vecs > 0)
- return vecs;
- }
-
- /* use legacy irq if allowed */
- if ((flags & PCI_IRQ_LEGACY) && min_vecs == 1) {
- pci_intx(dev, 1);
- return 1;
- }
-
- return vecs;
-}
-EXPORT_SYMBOL_GPL(pci_alloc_irq_vectors);
-#endif /* CONFIG_PCI_MSI */
-#endif /* CONFIG_PCI */
--
2.44.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 05/10] backports: Remove support for kernel smaller than 4.9
2024-04-01 22:03 [PATCH 00/10] backports: Remove support for kernel older than 4.14 Hauke Mehrtens
` (3 preceding siblings ...)
2024-04-01 22:03 ` [PATCH 04/10] backports: Remove support for kernel smaller than 4.8 Hauke Mehrtens
@ 2024-04-01 22:03 ` Hauke Mehrtens
2024-04-01 22:03 ` [PATCH 06/10] backports: Remove support for kernel smaller than 4.10 Hauke Mehrtens
` (5 subsequent siblings)
10 siblings, 0 replies; 14+ messages in thread
From: Hauke Mehrtens @ 2024-04-01 22:03 UTC (permalink / raw)
To: backports; +Cc: Hauke Mehrtens
This removes all the code which is needed to support kernel 4.8.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
.github/workflows/create.yml | 1 -
README | 2 +-
backport/backport-include/linux/debugfs.h | 13 ---------
backport/backport-include/linux/pci.h | 27 -------------------
backport/backport-include/linux/thermal.h | 23 ----------------
backport/compat/Kconfig | 18 -------------
.../0013-fix-makefile-includes/brcmfmac.patch | 13 ---------
7 files changed, 1 insertion(+), 96 deletions(-)
delete mode 100644 patches/0013-fix-makefile-includes/brcmfmac.patch
diff --git a/.github/workflows/create.yml b/.github/workflows/create.yml
index 3bdbc2a8..fb85a0e9 100644
--- a/.github/workflows/create.yml
+++ b/.github/workflows/create.yml
@@ -55,7 +55,6 @@ jobs:
strategy:
matrix:
kernel: [
- "4.8",
"4.9",
"4.10",
"4.11",
diff --git a/README b/README
index e1f40943..994baa4d 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.8 and above.
+for kernels 4.9 and above.
# Documentation
diff --git a/backport/backport-include/linux/debugfs.h b/backport/backport-include/linux/debugfs.h
index 5c671d2d..6020c210 100644
--- a/backport/backport-include/linux/debugfs.h
+++ b/backport/backport-include/linux/debugfs.h
@@ -4,19 +4,6 @@
#include <linux/version.h>
#include <linux/device.h>
-#if LINUX_VERSION_IS_LESS(4,9,0) && \
- !LINUX_VERSION_IN_RANGE(4,8,4, 4,9,0)
-static inline const struct file_operations *
-debugfs_real_fops(const struct file *filp)
-{
- /*
- * Neither the pointer to the struct file_operations, nor its
- * contents ever change -- srcu_dereference() is not needed here.
- */
- return filp->f_path.dentry->d_fsdata;
-}
-#endif /* <4.9.0 but not >= 4.8.4 */
-
#ifndef DEFINE_DEBUGFS_ATTRIBUTE
#define DEFINE_DEBUGFS_ATTRIBUTE(__fops, __get, __set, __fmt) \
DEFINE_SIMPLE_ATTRIBUTE(__fops, __get, __set, __fmt)
diff --git a/backport/backport-include/linux/pci.h b/backport/backport-include/linux/pci.h
index 2a5309d9..2c5d5dd9 100644
--- a/backport/backport-include/linux/pci.h
+++ b/backport/backport-include/linux/pci.h
@@ -7,33 +7,6 @@
#include <linux/pci-aspm.h>
#endif
-#if LINUX_VERSION_IS_LESS(4,9,0) && \
- !LINUX_VERSION_IN_RANGE(4,8,13, 4,9,0)
-
-static inline struct pci_dev *pcie_find_root_port(struct pci_dev *dev)
-{
- while (1) {
- if (!pci_is_pcie(dev))
- break;
- if (pci_pcie_type(dev) == PCI_EXP_TYPE_ROOT_PORT)
- return dev;
- if (!dev->bus->self)
- break;
- dev = dev->bus->self;
- }
- return NULL;
-}
-
-#endif/* <4.9.0 but not >= 4.8.13 */
-
-#ifndef PCI_IRQ_LEGACY
-#define PCI_IRQ_LEGACY (1 << 0) /* Allow legacy interrupts */
-#define PCI_IRQ_MSI (1 << 1) /* Allow MSI interrupts */
-#define PCI_IRQ_MSIX (1 << 2) /* Allow MSI-X interrupts */
-#define PCI_IRQ_ALL_TYPES \
- (PCI_IRQ_LEGACY | PCI_IRQ_MSI | PCI_IRQ_MSIX)
-#endif
-
#if defined(CONFIG_PCI)
#if LINUX_VERSION_IS_LESS(5,3,0)
static inline int
diff --git a/backport/backport-include/linux/thermal.h b/backport/backport-include/linux/thermal.h
index 8210facf..d9b8153e 100644
--- a/backport/backport-include/linux/thermal.h
+++ b/backport/backport-include/linux/thermal.h
@@ -13,27 +13,4 @@ static inline int thermal_zone_device_disable(struct thermal_zone_device *tz)
{ return 0; }
#endif /* < 5.9 */
-#if LINUX_VERSION_IS_LESS(4,9,0)
-/* Thermal notification reason */
-enum thermal_notify_event {
- THERMAL_EVENT_UNSPECIFIED, /* Unspecified event */
- THERMAL_EVENT_TEMP_SAMPLE, /* New Temperature sample */
- THERMAL_TRIP_VIOLATED, /* TRIP Point violation */
- THERMAL_TRIP_CHANGED, /* TRIP Point temperature changed */
- THERMAL_DEVICE_DOWN, /* Thermal device is down */
- THERMAL_DEVICE_UP, /* Thermal device is up after a down event */
- THERMAL_DEVICE_POWER_CAPABILITY_CHANGED, /* power capability changed */
- THERMAL_TABLE_CHANGED, /* Thermal table(s) changed */
- THERMAL_EVENT_KEEP_ALIVE, /* Request for user space handler to respond */
-};
-
-static inline void
-backport_thermal_zone_device_update(struct thermal_zone_device *tz,
- enum thermal_notify_event event)
-{
- thermal_zone_device_update(tz);
-}
-#define thermal_zone_device_update LINUX_BACKPORT(thermal_zone_device_update)
-#endif /* < 4.9 */
-
#endif /* __BACKPORT_LINUX_THERMAL_H */
diff --git a/backport/compat/Kconfig b/backport/compat/Kconfig
index 174322d8..f7266780 100644
--- a/backport/compat/Kconfig
+++ b/backport/compat/Kconfig
@@ -79,24 +79,6 @@ config BPAUTO_USERSEL_BUILD_ALL
config BPAUTO_WANT_DEV_COREDUMP
bool
-config BPAUTO_RHASHTABLE
- bool
- # current API of rhashtable was introduced in version 4.9
- # (the one including rhltable)
- depends on KERNEL_4_9
- # not very nice - but better than always having it
- default y if BACKPORTED_MAC80211
- #h-file linux/rhashtable.h
- #h-file linux/rhashtable-types.h
- #c-file lib/rhashtable.c
-
-config BPAUTO_BUCKET_LOCKS
- bool
- # the API of bucket_locks that we need was introduced in version 4.16
- depends on KERNEL_4_16
- default y if BPAUTO_RHASHTABLE
- #c-file lib/bucket_locks.c
-
config BPAUTO_REFCOUNT
bool
default y
diff --git a/patches/0013-fix-makefile-includes/brcmfmac.patch b/patches/0013-fix-makefile-includes/brcmfmac.patch
deleted file mode 100644
index f4781c8e..00000000
--- a/patches/0013-fix-makefile-includes/brcmfmac.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-brcmf_bus_ops.txdata() uses a paramater of type struct sk_buff which
-was not declared here when compiling against kernele 4.8 and older.
-
---- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bus.h
-+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/bus.h
-@@ -6,6 +6,7 @@
- #ifndef BRCMFMAC_BUS_H
- #define BRCMFMAC_BUS_H
-
-+#include <linux/skbuff.h>
- #include "debug.h"
-
- /* IDs of the 6 default common rings of msgbuf protocol */
--
2.44.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 06/10] backports: Remove support for kernel smaller than 4.10
2024-04-01 22:03 [PATCH 00/10] backports: Remove support for kernel older than 4.14 Hauke Mehrtens
` (4 preceding siblings ...)
2024-04-01 22:03 ` [PATCH 05/10] backports: Remove support for kernel smaller than 4.9 Hauke Mehrtens
@ 2024-04-01 22:03 ` Hauke Mehrtens
2024-04-01 22:03 ` [PATCH 07/10] backports: Remove support for kernel smaller than 4.11 Hauke Mehrtens
` (4 subsequent siblings)
10 siblings, 0 replies; 14+ messages in thread
From: Hauke Mehrtens @ 2024-04-01 22:03 UTC (permalink / raw)
To: backports; +Cc: Hauke Mehrtens
This removes all the code which is needed to support kernel 4.9.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
.github/workflows/create.yml | 1 -
README | 2 +-
backport/backport-include/linux/bits.h | 3 +-
backport/backport-include/linux/gfp.h | 25 --
backport/backport-include/linux/interrupt.h | 40 ---
backport/backport-include/linux/mii.h | 14 -
backport/backport-include/linux/netdevice.h | 22 --
backport/backport-include/linux/nospec.h | 3 +-
backport/backport-include/linux/skbuff.h | 3 +-
.../backport-include/linux/virtio_config.h | 4 -
backport/backport-include/net/genetlink.h | 6 -
backport/backport-include/net/netlink.h | 13 -
backport/compat/Makefile | 1 -
backport/compat/backport-4.10.c | 241 ------------------
patches/0073-netdevice-mtu-range.cocci | 100 --------
patches/0074-netdevice-mtu-range-ifdefs.cocci | 26 --
patches/0077-genl-ro-after-init/hwsim.patch | 11 -
patches/0077-genl-ro-after-init/nl80211.patch | 11 -
patches/0080-i2c-proble-new.cocci | 25 --
19 files changed, 4 insertions(+), 547 deletions(-)
delete mode 100644 backport/backport-include/linux/gfp.h
delete mode 100644 backport/backport-include/linux/mii.h
delete mode 100644 backport/compat/backport-4.10.c
delete mode 100644 patches/0073-netdevice-mtu-range.cocci
delete mode 100644 patches/0074-netdevice-mtu-range-ifdefs.cocci
delete mode 100644 patches/0077-genl-ro-after-init/hwsim.patch
delete mode 100644 patches/0077-genl-ro-after-init/nl80211.patch
delete mode 100644 patches/0080-i2c-proble-new.cocci
diff --git a/.github/workflows/create.yml b/.github/workflows/create.yml
index fb85a0e9..f2f778ad 100644
--- a/.github/workflows/create.yml
+++ b/.github/workflows/create.yml
@@ -55,7 +55,6 @@ jobs:
strategy:
matrix:
kernel: [
- "4.9",
"4.10",
"4.11",
"4.12",
diff --git a/README b/README
index 994baa4d..7d90c543 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.9 and above.
+for kernels 4.10 and above.
# Documentation
diff --git a/backport/backport-include/linux/bits.h b/backport/backport-include/linux/bits.h
index 7c66169f..387c9884 100644
--- a/backport/backport-include/linux/bits.h
+++ b/backport/backport-include/linux/bits.h
@@ -3,8 +3,7 @@
#include <linux/version.h>
#if LINUX_VERSION_IS_GEQ(4,19,0) || \
- LINUX_VERSION_IN_RANGE(4,14,119, 4,15,0) || \
- LINUX_VERSION_IN_RANGE(4,9,176, 4,10,0)
+ LINUX_VERSION_IN_RANGE(4,14,119, 4,15,0)
#include_next <linux/bits.h>
#else
#include <linux/bitops.h>
diff --git a/backport/backport-include/linux/gfp.h b/backport/backport-include/linux/gfp.h
deleted file mode 100644
index bfc8cbca..00000000
--- a/backport/backport-include/linux/gfp.h
+++ /dev/null
@@ -1,25 +0,0 @@
-#ifndef __BACKPORT_LINUX_GFP_H
-#define __BACKPORT_LINUX_GFP_H
-#include_next <linux/gfp.h>
-
-#ifndef ___GFP_KSWAPD_RECLAIM
-#define ___GFP_KSWAPD_RECLAIM 0x0u
-#endif
-
-#ifndef __GFP_KSWAPD_RECLAIM
-#define __GFP_KSWAPD_RECLAIM ((__force gfp_t)___GFP_KSWAPD_RECLAIM) /* kswapd can wake */
-#endif
-
-#if LINUX_VERSION_IS_LESS(4,10,0)
-#define page_frag_alloc LINUX_BACKPORT(page_frag_alloc)
-static inline void *page_frag_alloc(struct page_frag_cache *nc,
- unsigned int fragsz, gfp_t gfp_mask)
-{
- return __alloc_page_frag(nc, fragsz, gfp_mask);
-}
-
-#define __page_frag_cache_drain LINUX_BACKPORT(__page_frag_cache_drain)
-void __page_frag_cache_drain(struct page *page, unsigned int count);
-#endif /* < 4.10*/
-
-#endif /* __BACKPORT_LINUX_GFP_H */
diff --git a/backport/backport-include/linux/interrupt.h b/backport/backport-include/linux/interrupt.h
index f42f2ddd..4629fb18 100644
--- a/backport/backport-include/linux/interrupt.h
+++ b/backport/backport-include/linux/interrupt.h
@@ -2,46 +2,6 @@
#define _BP_LINUX_INTERRUPT_H
#include <linux/version.h>
#include_next <linux/interrupt.h>
-#include <linux/ktime.h>
-
-#if LINUX_VERSION_IS_LESS(4,10,0)
-
-/* Forward a hrtimer so it expires after now: */
-static inline u64
-backport_hrtimer_forward(struct hrtimer *timer, ktime_t now, s64 interval)
-{
- ktime_t _interval = { .tv64 = interval };
-
- return hrtimer_forward(timer, now, _interval);
-}
-#define hrtimer_forward LINUX_BACKPORT(hrtimer_forward)
-
-static inline u64
-backport_hrtimer_forward_now(struct hrtimer *timer, s64 interval)
-{
- ktime_t _interval = { .tv64 = interval };
-
- return hrtimer_forward_now(timer, _interval);
-}
-#define hrtimer_forward_now LINUX_BACKPORT(hrtimer_forward_now)
-
-static inline s64 backport_ns_to_ktime(u64 ns)
-{
- ktime_t _time = ns_to_ktime(ns);
-
- return _time.tv64;
-}
-#define ns_to_ktime LINUX_BACKPORT(ns_to_ktime)
-
-static inline void backport_hrtimer_start(struct hrtimer *timer, s64 time,
- const enum hrtimer_mode mode)
-{
- ktime_t _time = { .tv64 = time };
- hrtimer_start(timer, _time, mode);
-}
-#define hrtimer_start LINUX_BACKPORT(hrtimer_start)
-
-#endif
#if LINUX_VERSION_IS_LESS(5,9,0)
diff --git a/backport/backport-include/linux/mii.h b/backport/backport-include/linux/mii.h
deleted file mode 100644
index dcabbcc8..00000000
--- a/backport/backport-include/linux/mii.h
+++ /dev/null
@@ -1,14 +0,0 @@
-#ifndef __BACKPORT_LINUX_MII_H
-#define __BACKPORT_LINUX_MII_H
-#include_next <linux/mii.h>
-#include <linux/version.h>
-
-
-#if LINUX_VERSION_IS_LESS(4,11,0)
-extern int mii_ethtool_get_link_ksettings(
- struct mii_if_info *mii, struct ethtool_link_ksettings *cmd);
-extern int mii_ethtool_set_link_ksettings(
- struct mii_if_info *mii, const struct ethtool_link_ksettings *cmd);
-#endif /* < 4,11,0 */
-
-#endif /* __BACKPORT_LINUX_MII_H */
diff --git a/backport/backport-include/linux/netdevice.h b/backport/backport-include/linux/netdevice.h
index 156bcade..f692b425 100644
--- a/backport/backport-include/linux/netdevice.h
+++ b/backport/backport-include/linux/netdevice.h
@@ -5,28 +5,6 @@
#include <backport/magic.h>
-#if LINUX_VERSION_IS_LESS(4,10,0)
-static inline bool backport_napi_complete_done(struct napi_struct *n, int work_done)
-{
- if (unlikely(test_bit(NAPI_STATE_NPSVC, &n->state)))
- return false;
-
- napi_complete_done(n, work_done);
- return true;
-}
-
-static inline bool backport_napi_complete(struct napi_struct *n)
-{
- return backport_napi_complete_done(n, 0);
-}
-#define napi_complete_done LINUX_BACKPORT(napi_complete_done)
-#define napi_complete LINUX_BACKPORT(napi_complete)
-#endif /* < 4.10 */
-
-#ifndef NETIF_F_CSUM_MASK
-#define NETIF_F_CSUM_MASK NETIF_F_ALL_CSUM
-#endif
-
#if LINUX_VERSION_IS_LESS(4,11,9)
#define netdev_set_priv_destructor(_dev, _destructor) \
(_dev)->destructor = __ ## _destructor
diff --git a/backport/backport-include/linux/nospec.h b/backport/backport-include/linux/nospec.h
index d4de80a4..f5ba8980 100644
--- a/backport/backport-include/linux/nospec.h
+++ b/backport/backport-include/linux/nospec.h
@@ -2,8 +2,7 @@
#define _BACKPORT_LINUX_NOSPEC_H
#if LINUX_VERSION_IS_GEQ(4,15,2) || \
- LINUX_VERSION_IN_RANGE(4,14,18, 4,15,0) || \
- LINUX_VERSION_IN_RANGE(4,9,81, 4,10,0)
+ LINUX_VERSION_IN_RANGE(4,14,18, 4,15,0)
#include_next <linux/nospec.h>
#else
#define array_index_nospec(index, size) (index)
diff --git a/backport/backport-include/linux/skbuff.h b/backport/backport-include/linux/skbuff.h
index b8a16ed3..09bf33fd 100644
--- a/backport/backport-include/linux/skbuff.h
+++ b/backport/backport-include/linux/skbuff.h
@@ -107,8 +107,7 @@ static inline void nf_reset_ct(struct sk_buff *skb)
#if LINUX_VERSION_IS_LESS(5,6,0) && \
!LINUX_VERSION_IN_RANGE(5,4,69, 5,5,0) && \
!LINUX_VERSION_IN_RANGE(4,19,149, 4,20,0) && \
- !LINUX_VERSION_IN_RANGE(4,14,200, 4,15,0) && \
- !LINUX_VERSION_IN_RANGE(4,9,238, 4,10,0)
+ !LINUX_VERSION_IN_RANGE(4,14,200, 4,15,0)
/**
* skb_queue_len_lockless - get queue length
* @list_: list to measure
diff --git a/backport/backport-include/linux/virtio_config.h b/backport/backport-include/linux/virtio_config.h
index aeb1ba10..fadac0d2 100644
--- a/backport/backport-include/linux/virtio_config.h
+++ b/backport/backport-include/linux/virtio_config.h
@@ -12,11 +12,7 @@ struct irq_affinity;
static inline
int virtio_find_vqs(struct virtio_device *vdev, unsigned nvqs,
struct virtqueue *vqs[], vq_callback_t *callbacks[],
-#if LINUX_VERSION_IS_LESS(4,10,0)
- const char * const names[],
-#else
const char *names[],
-#endif
struct irq_affinity *desc)
{
#if LINUX_VERSION_IS_LESS(4,11,0)
diff --git a/backport/backport-include/net/genetlink.h b/backport/backport-include/net/genetlink.h
index 3ad8ebe8..9a9bfcd4 100644
--- a/backport/backport-include/net/genetlink.h
+++ b/backport/backport-include/net/genetlink.h
@@ -50,12 +50,6 @@ static inline void *genl_info_userhdr(struct genl_info *info)
return (u8 *)info->genlhdr + GENL_HDRLEN;
}
-#if LINUX_VERSION_IS_LESS(4,10,0)
-#define __genl_ro_after_init
-#else
-#define __genl_ro_after_init __ro_after_init
-#endif
-
#if LINUX_VERSION_IS_LESS(4,15,0)
#define genlmsg_nlhdr LINUX_BACKPORT(genlmsg_nlhdr)
static inline struct nlmsghdr *genlmsg_nlhdr(void *user_hdr)
diff --git a/backport/backport-include/net/netlink.h b/backport/backport-include/net/netlink.h
index c8ea6af3..8fa76676 100644
--- a/backport/backport-include/net/netlink.h
+++ b/backport/backport-include/net/netlink.h
@@ -435,19 +435,6 @@ static inline int _nla_parse_nested4(struct nlattr *tb[], int maxtype,
macro_dispatcher(_nla_parse_nested, __VA_ARGS__)(__VA_ARGS__)
#endif /* LINUX_VERSION_IS_LESS(4,12,0) */
-#if LINUX_VERSION_IS_LESS(4,10,0)
-/**
- * nla_memdup - duplicate attribute memory (kmemdup)
- * @src: netlink attribute to duplicate from
- * @gfp: GFP mask
- */
-#define nla_memdump LINUX_BACKPORT(nla_memdup)
-static inline void *nla_memdup(const struct nlattr *src, gfp_t gfp)
-{
- return kmemdup(nla_data(src), nla_len(src), gfp);
-}
-#endif /* < 4.9 */
-
#ifndef NLA_POLICY_MIN_LEN
#define NLA_POLICY_MIN_LEN(_len) { \
.type = NLA_BINARY \
diff --git a/backport/compat/Makefile b/backport/compat/Makefile
index 7bc66fb1..795b5267 100644
--- a/backport/compat/Makefile
+++ b/backport/compat/Makefile
@@ -7,7 +7,6 @@ endif
compat-y += main.o
# Kernel backport compatibility code
-compat-$(CPTCFG_KERNEL_4_10) += backport-4.10.o
compat-$(CPTCFG_KERNEL_4_11) += backport-4.11.o
compat-$(CPTCFG_KERNEL_4_12) += backport-4.12.o
compat-$(CPTCFG_KERNEL_4_18) += backport-4.18.o
diff --git a/backport/compat/backport-4.10.c b/backport/compat/backport-4.10.c
deleted file mode 100644
index 565dc3aa..00000000
--- a/backport/compat/backport-4.10.c
+++ /dev/null
@@ -1,241 +0,0 @@
-/*
- * Copyright(c) 2017 Hauke Mehrtens <hauke@hauke-m.de>
- *
- * Backport functionality introduced in Linux 4.10.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-#include <linux/kernel.h>
-#include <linux/module.h>
-#include <linux/netdevice.h>
-#include <linux/ethtool.h>
-#include <linux/mii.h>
-#include <linux/page_ref.h>
-#include <linux/gfp.h>
-
-static u32 mii_get_an(struct mii_if_info *mii, u16 addr)
-{
- int advert;
-
- advert = mii->mdio_read(mii->dev, mii->phy_id, addr);
-
- return mii_lpa_to_ethtool_lpa_t(advert);
-}
-
-/**
- * mii_ethtool_set_link_ksettings - set settings that are specified in @cmd
- * @mii: MII interfaces
- * @cmd: requested ethtool_link_ksettings
- *
- * Returns 0 for success, negative on error.
- */
-int mii_ethtool_set_link_ksettings(struct mii_if_info *mii,
- const struct ethtool_link_ksettings *cmd)
-{
- struct net_device *dev = mii->dev;
- u32 speed = cmd->base.speed;
-
- if (speed != SPEED_10 &&
- speed != SPEED_100 &&
- speed != SPEED_1000)
- return -EINVAL;
- if (cmd->base.duplex != DUPLEX_HALF && cmd->base.duplex != DUPLEX_FULL)
- return -EINVAL;
- if (cmd->base.port != PORT_MII)
- return -EINVAL;
- if (cmd->base.phy_address != mii->phy_id)
- return -EINVAL;
- if (cmd->base.autoneg != AUTONEG_DISABLE &&
- cmd->base.autoneg != AUTONEG_ENABLE)
- return -EINVAL;
- if ((speed == SPEED_1000) && (!mii->supports_gmii))
- return -EINVAL;
-
- /* ignore supported, maxtxpkt, maxrxpkt */
-
- if (cmd->base.autoneg == AUTONEG_ENABLE) {
- u32 bmcr, advert, tmp;
- u32 advert2 = 0, tmp2 = 0;
- u32 advertising;
-
- ethtool_convert_link_mode_to_legacy_u32(
- &advertising, cmd->link_modes.advertising);
-
- if ((advertising & (ADVERTISED_10baseT_Half |
- ADVERTISED_10baseT_Full |
- ADVERTISED_100baseT_Half |
- ADVERTISED_100baseT_Full |
- ADVERTISED_1000baseT_Half |
- ADVERTISED_1000baseT_Full)) == 0)
- return -EINVAL;
-
- /* advertise only what has been requested */
- advert = mii->mdio_read(dev, mii->phy_id, MII_ADVERTISE);
- tmp = advert & ~(ADVERTISE_ALL | ADVERTISE_100BASE4);
- if (mii->supports_gmii) {
- advert2 = mii->mdio_read(dev, mii->phy_id,
- MII_CTRL1000);
- tmp2 = advert2 &
- ~(ADVERTISE_1000HALF | ADVERTISE_1000FULL);
- }
- tmp |= ethtool_adv_to_mii_adv_t(advertising);
-
- if (mii->supports_gmii)
- tmp2 |= ethtool_adv_to_mii_ctrl1000_t(advertising);
- if (advert != tmp) {
- mii->mdio_write(dev, mii->phy_id, MII_ADVERTISE, tmp);
- mii->advertising = tmp;
- }
- if ((mii->supports_gmii) && (advert2 != tmp2))
- mii->mdio_write(dev, mii->phy_id, MII_CTRL1000, tmp2);
-
- /* turn on autonegotiation, and force a renegotiate */
- bmcr = mii->mdio_read(dev, mii->phy_id, MII_BMCR);
- bmcr |= (BMCR_ANENABLE | BMCR_ANRESTART);
- mii->mdio_write(dev, mii->phy_id, MII_BMCR, bmcr);
-
- mii->force_media = 0;
- } else {
- u32 bmcr, tmp;
-
- /* turn off auto negotiation, set speed and duplexity */
- bmcr = mii->mdio_read(dev, mii->phy_id, MII_BMCR);
- tmp = bmcr & ~(BMCR_ANENABLE | BMCR_SPEED100 |
- BMCR_SPEED1000 | BMCR_FULLDPLX);
- if (speed == SPEED_1000)
- tmp |= BMCR_SPEED1000;
- else if (speed == SPEED_100)
- tmp |= BMCR_SPEED100;
- if (cmd->base.duplex == DUPLEX_FULL) {
- tmp |= BMCR_FULLDPLX;
- mii->full_duplex = 1;
- } else {
- mii->full_duplex = 0;
- }
- if (bmcr != tmp)
- mii->mdio_write(dev, mii->phy_id, MII_BMCR, tmp);
-
- mii->force_media = 1;
- }
- return 0;
-}
-EXPORT_SYMBOL(mii_ethtool_set_link_ksettings);
-
-
-/**
- * mii_ethtool_get_link_ksettings - get settings that are specified in @cmd
- * @mii: MII interface
- * @cmd: requested ethtool_link_ksettings
- *
- * The @cmd parameter is expected to have been cleared before calling
- * mii_ethtool_get_link_ksettings().
- *
- * Returns 0 for success, negative on error.
- */
-int mii_ethtool_get_link_ksettings(struct mii_if_info *mii,
- struct ethtool_link_ksettings *cmd)
-{
- struct net_device *dev = mii->dev;
- u16 bmcr, bmsr, ctrl1000 = 0, stat1000 = 0;
- u32 nego, supported, advertising, lp_advertising;
-
- supported = (SUPPORTED_10baseT_Half | SUPPORTED_10baseT_Full |
- SUPPORTED_100baseT_Half | SUPPORTED_100baseT_Full |
- SUPPORTED_Autoneg | SUPPORTED_TP | SUPPORTED_MII);
- if (mii->supports_gmii)
- supported |= SUPPORTED_1000baseT_Half |
- SUPPORTED_1000baseT_Full;
-
- /* only supports twisted-pair */
- cmd->base.port = PORT_MII;
-
- /* this isn't fully supported at higher layers */
- cmd->base.phy_address = mii->phy_id;
- cmd->base.mdio_support = ETH_MDIO_SUPPORTS_C22;
-
- advertising = ADVERTISED_TP | ADVERTISED_MII;
-
- bmcr = mii->mdio_read(dev, mii->phy_id, MII_BMCR);
- bmsr = mii->mdio_read(dev, mii->phy_id, MII_BMSR);
- if (mii->supports_gmii) {
- ctrl1000 = mii->mdio_read(dev, mii->phy_id, MII_CTRL1000);
- stat1000 = mii->mdio_read(dev, mii->phy_id, MII_STAT1000);
- }
- if (bmcr & BMCR_ANENABLE) {
- advertising |= ADVERTISED_Autoneg;
- cmd->base.autoneg = AUTONEG_ENABLE;
-
- advertising |= mii_get_an(mii, MII_ADVERTISE);
- if (mii->supports_gmii)
- advertising |= mii_ctrl1000_to_ethtool_adv_t(ctrl1000);
-
- if (bmsr & BMSR_ANEGCOMPLETE) {
- lp_advertising = mii_get_an(mii, MII_LPA);
- lp_advertising |=
- mii_stat1000_to_ethtool_lpa_t(stat1000);
- } else {
- lp_advertising = 0;
- }
-
- nego = advertising & lp_advertising;
-
- if (nego & (ADVERTISED_1000baseT_Full |
- ADVERTISED_1000baseT_Half)) {
- cmd->base.speed = SPEED_1000;
- cmd->base.duplex = !!(nego & ADVERTISED_1000baseT_Full);
- } else if (nego & (ADVERTISED_100baseT_Full |
- ADVERTISED_100baseT_Half)) {
- cmd->base.speed = SPEED_100;
- cmd->base.duplex = !!(nego & ADVERTISED_100baseT_Full);
- } else {
- cmd->base.speed = SPEED_10;
- cmd->base.duplex = !!(nego & ADVERTISED_10baseT_Full);
- }
- } else {
- cmd->base.autoneg = AUTONEG_DISABLE;
-
- cmd->base.speed = ((bmcr & BMCR_SPEED1000 &&
- (bmcr & BMCR_SPEED100) == 0) ?
- SPEED_1000 :
- ((bmcr & BMCR_SPEED100) ?
- SPEED_100 : SPEED_10));
- cmd->base.duplex = (bmcr & BMCR_FULLDPLX) ?
- DUPLEX_FULL : DUPLEX_HALF;
-
- lp_advertising = 0;
- }
-
- mii->full_duplex = cmd->base.duplex;
-
- ethtool_convert_legacy_u32_to_link_mode(cmd->link_modes.supported,
- supported);
- ethtool_convert_legacy_u32_to_link_mode(cmd->link_modes.advertising,
- advertising);
- ethtool_convert_legacy_u32_to_link_mode(cmd->link_modes.lp_advertising,
- lp_advertising);
-
- /* ignore maxtxpkt, maxrxpkt for now */
-
- return 0;
-}
-EXPORT_SYMBOL(mii_ethtool_get_link_ksettings);
-
-void __page_frag_cache_drain(struct page *page, unsigned int count)
-{
- VM_BUG_ON_PAGE(page_ref_count(page) == 0, page);
-
- if (page_ref_sub_and_test(page, count)) {
- unsigned int order = compound_order(page);
-
- /*
- * __free_pages_ok() is not exported so call
- * __free_pages() which decrements the ref counter
- * and increment the ref counter before.
- */
- page_ref_inc(page);
- __free_pages(page, order);
- }
-}
-EXPORT_SYMBOL_GPL(__page_frag_cache_drain);
diff --git a/patches/0073-netdevice-mtu-range.cocci b/patches/0073-netdevice-mtu-range.cocci
deleted file mode 100644
index 7afe900e..00000000
--- a/patches/0073-netdevice-mtu-range.cocci
+++ /dev/null
@@ -1,100 +0,0 @@
-@initialize:python@
-@@
-
-first_ops = 0
-
-@both@
-struct net_device *ndevexp;
-constant e1, e2;
-identifier func;
-position p;
-@@
-func(...) {
- <+...
- ndevexp->min_mtu = e1;
- ndevexp->max_mtu@p = e2;
- ...+>
-}
-
-@@
-struct net_device *ndevexp;
-constant MAX;
-identifier func;
-position p != both.p;
-@@
-func(...) {
- <+...
-+ ndevexp->min_mtu = 0;
- ndevexp->max_mtu@p = MAX;
- ...+>
-}
-
-@r@
-identifier OPS;
-position p;
-@@
-
-struct net_device_ops OPS@p = { ... };
-
-@script:python depends on r@
-@@
-
-first_ops = 0
-
-@script:python@
-p << r.p;
-@@
-
-ln = int(p[0].line)
-if first_ops == 0 or ln < first_ops:
- first_ops = ln
-
-@script:python@
-p << r.p;
-@@
-
-ln = int(p[0].line)
-if not(first_ops == ln):
- cocci.include_match(False)
-
-@r1 exists@
-struct net_device *ndevexp;
-constant e1, e2;
-identifier func;
-@@
-func(...) {
- <+...
- ndevexp->min_mtu = e1;
- ndevexp->max_mtu = e2;
- ...+>
-}
-
-@r2@
-constant r1.e1,r1.e2;
-identifier r.OPS;
-@@
-+#if LINUX_VERSION_IS_LESS(4,10,0)
-+ static int __change_mtu(struct net_device *ndev, int new_mtu)
-+ {
-+ if (new_mtu < e1 || new_mtu > e2)
-+ return -EINVAL;
-+ ndev->mtu = new_mtu;
-+ return 0;
-+ }
-+#endif
-+
-struct net_device_ops OPS = {
- ...
-};
-
-@depends on r2@
-identifier OPS;
-@@
-
-struct net_device_ops OPS = {
-+#if LINUX_VERSION_IS_LESS(4,10,0)
-+ .ndo_change_mtu = __change_mtu,
-+#endif
- ...
-};
-
diff --git a/patches/0074-netdevice-mtu-range-ifdefs.cocci b/patches/0074-netdevice-mtu-range-ifdefs.cocci
deleted file mode 100644
index bb1ca95c..00000000
--- a/patches/0074-netdevice-mtu-range-ifdefs.cocci
+++ /dev/null
@@ -1,26 +0,0 @@
-@@
-struct net_device *ndevexp;
-expression E;
-identifier func;
-@@
-func(...) {
- <+...
-+#if LINUX_VERSION_IS_GEQ(4,10,0)
- ndevexp->min_mtu = E;
-+#endif
- ...+>
-}
-
-@@
-struct net_device *ndevexp;
-expression E;
-identifier func;
-@@
-func(...) {
- <+...
-+#if LINUX_VERSION_IS_GEQ(4,10,0)
- ndevexp->max_mtu = E;
-+#endif
- ...+>
-}
-
diff --git a/patches/0077-genl-ro-after-init/hwsim.patch b/patches/0077-genl-ro-after-init/hwsim.patch
deleted file mode 100644
index 9029a443..00000000
--- a/patches/0077-genl-ro-after-init/hwsim.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/drivers/net/wireless/mac80211_hwsim.c
-+++ b/drivers/net/wireless/mac80211_hwsim.c
-@@ -4129,7 +4129,7 @@ static const struct genl_small_ops hwsim
- },
- };
-
--static struct genl_family hwsim_genl_family __ro_after_init = {
-+static struct genl_family hwsim_genl_family __genl_ro_after_init = {
- .name = "MAC80211_HWSIM",
- .version = 1,
- .maxattr = HWSIM_ATTR_MAX,
diff --git a/patches/0077-genl-ro-after-init/nl80211.patch b/patches/0077-genl-ro-after-init/nl80211.patch
deleted file mode 100644
index 0bed66d3..00000000
--- a/patches/0077-genl-ro-after-init/nl80211.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/net/wireless/nl80211.c
-+++ b/net/wireless/nl80211.c
-@@ -15941,7 +15941,7 @@ static const struct genl_small_ops nl802
- },
- };
-
--static struct genl_family nl80211_fam __ro_after_init = {
-+static struct genl_family nl80211_fam __genl_ro_after_init = {
- .name = NL80211_GENL_NAME, /* have users key off the name instead */
- .hdrsize = 0, /* no private header */
- .version = 1, /* no particular meaning now */
diff --git a/patches/0080-i2c-proble-new.cocci b/patches/0080-i2c-proble-new.cocci
deleted file mode 100644
index 35580aca..00000000
--- a/patches/0080-i2c-proble-new.cocci
+++ /dev/null
@@ -1,25 +0,0 @@
-@r@
-identifier OPS;
-identifier i2c_probe;
-fresh identifier i2c_probe_wrap = "bp_" ## i2c_probe;
-position p;
-@@
-struct i2c_driver OPS@p = {
-+#if LINUX_VERSION_IS_GEQ(4,10,0)
- .probe_new = i2c_probe,
-+#else
-+ .probe = i2c_probe_wrap,
-+#endif
-};
-
-@@
-identifier r.i2c_probe_wrap;
-identifier r.i2c_probe;
-@@
-int i2c_probe(...) {...}
-+#if LINUX_VERSION_IS_LESS(4,10,0)
-+static int i2c_probe_wrap(struct i2c_client *client, const struct i2c_device_id *id)
-+{
-+ return i2c_probe(client);
-+}
-+#endif
--
2.44.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 07/10] backports: Remove support for kernel smaller than 4.11
2024-04-01 22:03 [PATCH 00/10] backports: Remove support for kernel older than 4.14 Hauke Mehrtens
` (5 preceding siblings ...)
2024-04-01 22:03 ` [PATCH 06/10] backports: Remove support for kernel smaller than 4.10 Hauke Mehrtens
@ 2024-04-01 22:03 ` Hauke Mehrtens
2024-04-01 22:03 ` [PATCH 08/10] backports: Remove support for kernel smaller than 4.12 Hauke Mehrtens
` (3 subsequent siblings)
10 siblings, 0 replies; 14+ messages in thread
From: Hauke Mehrtens @ 2024-04-01 22:03 UTC (permalink / raw)
To: backports; +Cc: Hauke Mehrtens
This removes all the code which is needed to support kernel 4.10.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
.github/workflows/create.yml | 1 -
README | 2 +-
backport/backport-include/linux/etherdevice.h | 41 -------------------
backport/backport-include/linux/netdevice.h | 5 ---
backport/backport-include/linux/random.h | 14 -------
backport/backport-include/linux/sched.h | 2 -
backport/backport-include/linux/skbuff.h | 8 ----
.../backport-include/linux/virtio_config.h | 8 ----
backport/compat/Makefile | 1 -
backport/compat/backport-4.11.c | 12 ------
patches/0075-ndo-stats-64.cocci | 32 ---------------
11 files changed, 1 insertion(+), 125 deletions(-)
delete mode 100644 backport/backport-include/linux/etherdevice.h
delete mode 100644 backport/backport-include/linux/random.h
delete mode 100644 backport/compat/backport-4.11.c
delete mode 100644 patches/0075-ndo-stats-64.cocci
diff --git a/.github/workflows/create.yml b/.github/workflows/create.yml
index f2f778ad..068e53df 100644
--- a/.github/workflows/create.yml
+++ b/.github/workflows/create.yml
@@ -55,7 +55,6 @@ jobs:
strategy:
matrix:
kernel: [
- "4.10",
"4.11",
"4.12",
"4.13",
diff --git a/README b/README
index 7d90c543..1dc8e6e6 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.10 and above.
+for kernels 4.11 and above.
# Documentation
diff --git a/backport/backport-include/linux/etherdevice.h b/backport/backport-include/linux/etherdevice.h
deleted file mode 100644
index 55672f69..00000000
--- a/backport/backport-include/linux/etherdevice.h
+++ /dev/null
@@ -1,41 +0,0 @@
-#ifndef _BACKPORT_LINUX_ETHERDEVICE_H
-#define _BACKPORT_LINUX_ETHERDEVICE_H
-#include_next <linux/etherdevice.h>
-#include <linux/version.h>
-
-
-#if LINUX_VERSION_IS_LESS(4,11,0)
-/**
- * ether_addr_to_u64 - Convert an Ethernet address into a u64 value.
- * @addr: Pointer to a six-byte array containing the Ethernet address
- *
- * Return a u64 value of the address
- */
-static inline u64 ether_addr_to_u64(const u8 *addr)
-{
- u64 u = 0;
- int i;
-
- for (i = 0; i < ETH_ALEN; i++)
- u = u << 8 | addr[i];
-
- return u;
-}
-
-/**
- * u64_to_ether_addr - Convert a u64 to an Ethernet address.
- * @u: u64 to convert to an Ethernet MAC address
- * @addr: Pointer to a six-byte array to contain the Ethernet address
- */
-static inline void u64_to_ether_addr(u64 u, u8 *addr)
-{
- int i;
-
- for (i = ETH_ALEN - 1; i >= 0; i--) {
- addr[i] = u & 0xff;
- u = u >> 8;
- }
-}
-#endif /* LINUX_VERSION_IS_LESS(4,11,0) */
-
-#endif /* _BACKPORT_LINUX_ETHERDEVICE_H */
diff --git a/backport/backport-include/linux/netdevice.h b/backport/backport-include/linux/netdevice.h
index f692b425..87719c77 100644
--- a/backport/backport-include/linux/netdevice.h
+++ b/backport/backport-include/linux/netdevice.h
@@ -94,11 +94,6 @@ static inline void dev_sw_netstats_tx_add(struct net_device *dev,
void dev_get_tstats64(struct net_device *dev, struct rtnl_link_stats64 *s);
#endif /* < 5.11 */
-#if LINUX_VERSION_IS_LESS(4,11,0)
-struct rtnl_link_stats64 *
-bp_dev_get_tstats64(struct net_device *dev, struct rtnl_link_stats64 *s);
-#endif /* < 4.11 */
-
#if LINUX_VERSION_IS_LESS(5,15,0)
#define get_user_ifreq LINUX_BACKPORT(get_user_ifreq)
int get_user_ifreq(struct ifreq *ifr, void __user **ifrdata, void __user *arg);
diff --git a/backport/backport-include/linux/random.h b/backport/backport-include/linux/random.h
deleted file mode 100644
index f59ab8bc..00000000
--- a/backport/backport-include/linux/random.h
+++ /dev/null
@@ -1,14 +0,0 @@
-#ifndef __BACKPORT_RANDOM_H
-#define __BACKPORT_RANDOM_H
-#include_next <linux/random.h>
-#include <linux/version.h>
-
-
-#if LINUX_VERSION_IS_LESS(4,11,0)
-static inline u32 get_random_u32(void)
-{
- return get_random_int();
-}
-#endif
-
-#endif /* __BACKPORT_RANDOM_H */
diff --git a/backport/backport-include/linux/sched.h b/backport/backport-include/linux/sched.h
index 36263857..b6f2c8e3 100644
--- a/backport/backport-include/linux/sched.h
+++ b/backport/backport-include/linux/sched.h
@@ -5,9 +5,7 @@
#include <linux/version.h>
#if LINUX_VERSION_IS_LESS(5,9,0)
-#if LINUX_VERSION_IS_GEQ(4,11,0)
#include <uapi/linux/sched/types.h>
-#endif
static inline void sched_set_fifo_low(struct task_struct *p)
{
diff --git a/backport/backport-include/linux/skbuff.h b/backport/backport-include/linux/skbuff.h
index 09bf33fd..d0466daa 100644
--- a/backport/backport-include/linux/skbuff.h
+++ b/backport/backport-include/linux/skbuff.h
@@ -72,14 +72,6 @@ static inline void skb_mark_not_on_list(struct sk_buff *skb)
#endif /* 4.19.10 <= x < 4.20 */
#endif
-#if LINUX_VERSION_IS_LESS(4,11,0)
-#define skb_mac_offset LINUX_BACKPORT(skb_mac_offset)
-static inline int skb_mac_offset(const struct sk_buff *skb)
-{
- return skb_mac_header(skb) - skb->data;
-}
-#endif
-
#if LINUX_VERSION_IS_LESS(5,4,0)
/**
* skb_frag_off() - Returns the offset of a skb fragment
diff --git a/backport/backport-include/linux/virtio_config.h b/backport/backport-include/linux/virtio_config.h
index fadac0d2..f445fd64 100644
--- a/backport/backport-include/linux/virtio_config.h
+++ b/backport/backport-include/linux/virtio_config.h
@@ -4,10 +4,6 @@
#include <linux/version.h>
-#if LINUX_VERSION_IS_LESS(4,11,0)
-struct irq_affinity;
-#endif
-
#if LINUX_VERSION_IS_LESS(4,12,0)
static inline
int virtio_find_vqs(struct virtio_device *vdev, unsigned nvqs,
@@ -15,11 +11,7 @@ int virtio_find_vqs(struct virtio_device *vdev, unsigned nvqs,
const char *names[],
struct irq_affinity *desc)
{
-#if LINUX_VERSION_IS_LESS(4,11,0)
- return vdev->config->find_vqs(vdev, nvqs, vqs, callbacks, names);
-#else
return vdev->config->find_vqs(vdev, nvqs, vqs, callbacks, names, desc);
-#endif
}
#endif /* < 4.12 */
diff --git a/backport/compat/Makefile b/backport/compat/Makefile
index 795b5267..71057ca9 100644
--- a/backport/compat/Makefile
+++ b/backport/compat/Makefile
@@ -7,7 +7,6 @@ endif
compat-y += main.o
# Kernel backport compatibility code
-compat-$(CPTCFG_KERNEL_4_11) += backport-4.11.o
compat-$(CPTCFG_KERNEL_4_12) += backport-4.12.o
compat-$(CPTCFG_KERNEL_4_18) += backport-4.18.o
compat-$(CPTCFG_KERNEL_5_2) += backport-5.2.o backport-genetlink.o
diff --git a/backport/compat/backport-4.11.c b/backport/compat/backport-4.11.c
deleted file mode 100644
index 83445856..00000000
--- a/backport/compat/backport-4.11.c
+++ /dev/null
@@ -1,12 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-
-#include <linux/export.h>
-#include <linux/netdevice.h>
-
-struct rtnl_link_stats64 *
-bp_dev_get_tstats64(struct net_device *dev, struct rtnl_link_stats64 *s)
-{
- dev_get_tstats64(dev, s);
- return s;
-}
-EXPORT_SYMBOL_GPL(bp_dev_get_tstats64);
diff --git a/patches/0075-ndo-stats-64.cocci b/patches/0075-ndo-stats-64.cocci
deleted file mode 100644
index 8971a97c..00000000
--- a/patches/0075-ndo-stats-64.cocci
+++ /dev/null
@@ -1,32 +0,0 @@
-@r@
-identifier OPS;
-identifier stats64_fn;
-fresh identifier stats64_fn_wrap = "bp_" ## stats64_fn;
-position p;
-@@
-struct net_device_ops OPS@p = {
-+#if LINUX_VERSION_IS_GEQ(4,11,0)
- .ndo_get_stats64 = stats64_fn,
-+#else
-+ .ndo_get_stats64 = stats64_fn_wrap,
-+#endif
-};
-
-@@
-identifier r.stats64_fn_wrap;
-identifier r.stats64_fn;
-@@
-void stats64_fn(...) {...}
-+#if LINUX_VERSION_IS_LESS(4,11,0)
-+/* Just declare it here to keep sparse happy */
-+struct rtnl_link_stats64 *
-+stats64_fn_wrap(struct net_device *dev,
-+ struct rtnl_link_stats64 *stats);
-+struct rtnl_link_stats64 *
-+stats64_fn_wrap(struct net_device *dev,
-+ struct rtnl_link_stats64 *stats)
-+{
-+ stats64_fn(dev, stats);
-+ return stats;
-+}
-+#endif
--
2.44.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 08/10] backports: Remove support for kernel smaller than 4.12
2024-04-01 22:03 [PATCH 00/10] backports: Remove support for kernel older than 4.14 Hauke Mehrtens
` (6 preceding siblings ...)
2024-04-01 22:03 ` [PATCH 07/10] backports: Remove support for kernel smaller than 4.11 Hauke Mehrtens
@ 2024-04-01 22:03 ` Hauke Mehrtens
2024-04-01 22:03 ` [PATCH 09/10] backports: Remove support for kernel smaller than 4.13 Hauke Mehrtens
` (2 subsequent siblings)
10 siblings, 0 replies; 14+ messages in thread
From: Hauke Mehrtens @ 2024-04-01 22:03 UTC (permalink / raw)
To: backports; +Cc: Hauke Mehrtens
This removes all the code which is needed to support kernel 4.11.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
.github/workflows/create.yml | 1 -
README | 2 +-
backport/backport-include/linux/mm.h | 42 -----
backport/backport-include/linux/netdevice.h | 14 --
backport/backport-include/linux/netlink.h | 20 ---
backport/backport-include/linux/of_device.h | 5 +-
backport/backport-include/linux/rhashtable.h | 31 ----
backport/backport-include/linux/usb.h | 10 --
.../backport-include/linux/virtio_config.h | 19 --
backport/backport-include/net/genetlink.h | 37 ----
backport/backport-include/net/netlink.h | 89 ---------
backport/compat/Makefile | 1 -
backport/compat/backport-4.12.c | 94 ----------
backport/compat/backport-genetlink.c | 170 +-----------------
patches/0078-genl-extack.cocci | 12 --
patches/0079-netdev-destructor.cocci | 116 ------------
patches/0079-netdev-destructor/brcmfmac.patch | 38 ----
17 files changed, 4 insertions(+), 697 deletions(-)
delete mode 100644 backport/backport-include/linux/rhashtable.h
delete mode 100644 backport/backport-include/linux/virtio_config.h
delete mode 100644 backport/compat/backport-4.12.c
delete mode 100644 patches/0079-netdev-destructor.cocci
delete mode 100644 patches/0079-netdev-destructor/brcmfmac.patch
diff --git a/.github/workflows/create.yml b/.github/workflows/create.yml
index 068e53df..f99cdf88 100644
--- a/.github/workflows/create.yml
+++ b/.github/workflows/create.yml
@@ -55,7 +55,6 @@ jobs:
strategy:
matrix:
kernel: [
- "4.11",
"4.12",
"4.13",
"4.14",
diff --git a/README b/README
index 1dc8e6e6..1b76bcee 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.11 and above.
+for kernels 4.12 and above.
# Documentation
diff --git a/backport/backport-include/linux/mm.h b/backport/backport-include/linux/mm.h
index 30eedfde..46c7ecaf 100644
--- a/backport/backport-include/linux/mm.h
+++ b/backport/backport-include/linux/mm.h
@@ -1,49 +1,7 @@
#ifndef __BACKPORT_MM_H
#define __BACKPORT_MM_H
#include_next <linux/mm.h>
-#include <linux/page_ref.h>
-#include <linux/sched.h>
#include <linux/overflow.h>
-#include <linux/vmalloc.h>
-#include <linux/slab.h>
-
-#if LINUX_VERSION_IS_LESS(4,12,0)
-#define kvmalloc LINUX_BACKPORT(kvmalloc)
-static inline void *kvmalloc(size_t size, gfp_t flags)
-{
- gfp_t kmalloc_flags = flags;
- void *ret;
-
- if ((flags & GFP_KERNEL) != GFP_KERNEL)
- return kmalloc(size, flags);
-
- if (size > PAGE_SIZE)
- kmalloc_flags |= __GFP_NOWARN | __GFP_NORETRY;
-
- ret = kmalloc(size, flags);
- if (ret || size < PAGE_SIZE)
- return ret;
-
- return vmalloc(size);
-}
-
-#define kvmalloc_array LINUX_BACKPORT(kvmalloc_array)
-static inline void *kvmalloc_array(size_t n, size_t size, gfp_t flags)
-{
- size_t bytes;
-
- if (unlikely(check_mul_overflow(n, size, &bytes)))
- return NULL;
-
- return kvmalloc(bytes, flags);
-}
-
-#define kvzalloc LINUX_BACKPORT(kvzalloc)
-static inline void *kvzalloc(size_t size, gfp_t flags)
-{
- return kvmalloc(size, flags | __GFP_ZERO);
-}
-#endif
#if LINUX_VERSION_IS_LESS(4,18,0)
#define kvcalloc LINUX_BACKPORT(kvcalloc)
diff --git a/backport/backport-include/linux/netdevice.h b/backport/backport-include/linux/netdevice.h
index 87719c77..354b399b 100644
--- a/backport/backport-include/linux/netdevice.h
+++ b/backport/backport-include/linux/netdevice.h
@@ -4,20 +4,6 @@
#include <linux/version.h>
#include <backport/magic.h>
-
-#if LINUX_VERSION_IS_LESS(4,11,9)
-#define netdev_set_priv_destructor(_dev, _destructor) \
- (_dev)->destructor = __ ## _destructor
-#define netdev_set_def_destructor(_dev) \
- (_dev)->destructor = free_netdev
-#else
-#define netdev_set_priv_destructor(_dev, _destructor) \
- (_dev)->needs_free_netdev = true; \
- (_dev)->priv_destructor = (_destructor);
-#define netdev_set_def_destructor(_dev) \
- (_dev)->needs_free_netdev = true;
-#endif
-
#if LINUX_VERSION_IS_LESS(4,15,0)
static inline int _bp_netdev_upper_dev_link(struct net_device *dev,
struct net_device *upper_dev)
diff --git a/backport/backport-include/linux/netlink.h b/backport/backport-include/linux/netlink.h
index f1860243..b7afaf9d 100644
--- a/backport/backport-include/linux/netlink.h
+++ b/backport/backport-include/linux/netlink.h
@@ -10,26 +10,6 @@ struct nla_bitfield32 {
};
#endif
-#if LINUX_VERSION_IS_LESS(4,12,0)
-#define NETLINK_MAX_COOKIE_LEN 20
-
-struct netlink_ext_ack {
- const char *_msg;
- const struct nlattr *bad_attr;
- u8 cookie[NETLINK_MAX_COOKIE_LEN];
- u8 cookie_len;
-
- /* backport only field */
- void *__bp_doit;
-};
-
-#define NL_SET_ERR_MSG(extack, msg) do { \
- static const char _msg[] = (msg); \
- \
- (extack)->_msg = _msg; \
-} while (0)
-#endif
-
#ifndef NL_SET_ERR_MSG_ATTR
#define NL_SET_ERR_MSG_ATTR(extack, attr, msg) do { \
static const char __msg[] = msg; \
diff --git a/backport/backport-include/linux/of_device.h b/backport/backport-include/linux/of_device.h
index 2a4d02b8..9a0fad45 100644
--- a/backport/backport-include/linux/of_device.h
+++ b/backport/backport-include/linux/of_device.h
@@ -11,11 +11,8 @@ static inline int backport_of_dma_configure(struct device *dev,
#if LINUX_VERSION_IS_GEQ(4,15,0)
dev->bus->force_dma = force_dma;
return of_dma_configure(dev, np);
-#elif LINUX_VERSION_IS_GEQ(4,12,0)
- return of_dma_configure(dev, np);
#else
- of_dma_configure(dev, np);
- return 0;
+ return of_dma_configure(dev, np);
#endif
}
#define of_dma_configure LINUX_BACKPORT(of_dma_configure)
diff --git a/backport/backport-include/linux/rhashtable.h b/backport/backport-include/linux/rhashtable.h
deleted file mode 100644
index 8e493bc5..00000000
--- a/backport/backport-include/linux/rhashtable.h
+++ /dev/null
@@ -1,31 +0,0 @@
-#ifndef __BACKPORT_RHASHTABLE_H
-#define __BACKPORT_RHASHTABLE_H
-#include_next <linux/rhashtable.h>
-#include <linux/version.h>
-
-#if LINUX_VERSION_IS_LESS(4,12,0)
-/**
- * rhashtable_lookup_get_insert_fast - lookup and insert object into hash table
- * @ht: hash table
- * @obj: pointer to hash head inside object
- * @params: hash table parameters
- *
- * Just like rhashtable_lookup_insert_fast(), but this function returns the
- * object if it exists, NULL if it did not and the insertion was successful,
- * and an ERR_PTR otherwise.
- */
-#define rhashtable_lookup_get_insert_fast LINUX_BACKPORT(rhashtable_lookup_get_insert_fast)
-static inline void *rhashtable_lookup_get_insert_fast(
- struct rhashtable *ht, struct rhash_head *obj,
- const struct rhashtable_params params)
-{
- const char *key = rht_obj(ht, obj);
-
- BUG_ON(ht->p.obj_hashfn);
-
- return __rhashtable_insert_fast(ht, key + ht->p.key_offset, obj, params,
- false);
-}
-#endif
-
-#endif /* __BACKPORT_RHASHTABLE_H */
diff --git a/backport/backport-include/linux/usb.h b/backport/backport-include/linux/usb.h
index 4830aebd..bedc405b 100644
--- a/backport/backport-include/linux/usb.h
+++ b/backport/backport-include/linux/usb.h
@@ -3,16 +3,6 @@
#include_next <linux/usb.h>
#include <linux/version.h>
-#if LINUX_VERSION_IS_LESS(4,12,0)
-#define usb_find_common_endpoints LINUX_BACKPORT(usb_find_common_endpoints)
-int __must_check
-usb_find_common_endpoints(struct usb_host_interface *alt,
- struct usb_endpoint_descriptor **bulk_in,
- struct usb_endpoint_descriptor **bulk_out,
- struct usb_endpoint_descriptor **int_in,
- struct usb_endpoint_descriptor **int_out);
-#endif /* < 4.12 */
-
#if LINUX_VERSION_IS_LESS(5,15,0)
#define usb_check_bulk_endpoints LINUX_BACKPORT(usb_check_bulk_endpoints)
bool usb_check_bulk_endpoints(
diff --git a/backport/backport-include/linux/virtio_config.h b/backport/backport-include/linux/virtio_config.h
deleted file mode 100644
index f445fd64..00000000
--- a/backport/backport-include/linux/virtio_config.h
+++ /dev/null
@@ -1,19 +0,0 @@
-#ifndef _COMPAT_LINUX_VIRTIO_CONFIG_H
-#define _COMPAT_LINUX_VIRTIO_CONFIG_H
-#include_next <linux/virtio_config.h>
-
-#include <linux/version.h>
-
-#if LINUX_VERSION_IS_LESS(4,12,0)
-static inline
-int virtio_find_vqs(struct virtio_device *vdev, unsigned nvqs,
- struct virtqueue *vqs[], vq_callback_t *callbacks[],
- const char *names[],
- struct irq_affinity *desc)
-{
- return vdev->config->find_vqs(vdev, nvqs, vqs, callbacks, names, desc);
-}
-#endif /* < 4.12 */
-
-
-#endif /* _COMPAT_LINUX_VIRTIO_CONFIG_H */
diff --git a/backport/backport-include/net/genetlink.h b/backport/backport-include/net/genetlink.h
index 9a9bfcd4..016e96c1 100644
--- a/backport/backport-include/net/genetlink.h
+++ b/backport/backport-include/net/genetlink.h
@@ -3,37 +3,6 @@
#include_next <net/genetlink.h>
#include <linux/version.h>
-static inline void __bp_genl_info_userhdr_set(struct genl_info *info,
- void *userhdr)
-{
- info->userhdr = userhdr;
-}
-
-static inline void *__bp_genl_info_userhdr(struct genl_info *info)
-{
- return info->userhdr;
-}
-
-#if LINUX_VERSION_IS_LESS(4,12,0)
-#define GENL_SET_ERR_MSG(info, msg) NL_SET_ERR_MSG(genl_info_extack(info), msg)
-
-static inline int genl_err_attr(struct genl_info *info, int err,
- struct nlattr *attr)
-{
- return err;
-}
-#endif /* < 4.12 */
-
-/* this is for patches we apply */
-static inline struct netlink_ext_ack *genl_info_extack(struct genl_info *info)
-{
-#if LINUX_VERSION_IS_GEQ(4,12,0)
- return info->extack;
-#else
- return info->userhdr;
-#endif
-}
-
/* this is for patches we apply */
static inline struct netlink_ext_ack *genl_callback_extack(struct netlink_callback *cb)
{
@@ -44,12 +13,6 @@ static inline struct netlink_ext_ack *genl_callback_extack(struct netlink_callba
#endif
}
-/* this gets put in place of info->userhdr, since we use that above */
-static inline void *genl_info_userhdr(struct genl_info *info)
-{
- return (u8 *)info->genlhdr + GENL_HDRLEN;
-}
-
#if LINUX_VERSION_IS_LESS(4,15,0)
#define genlmsg_nlhdr LINUX_BACKPORT(genlmsg_nlhdr)
static inline struct nlmsghdr *genlmsg_nlhdr(void *user_hdr)
diff --git a/backport/backport-include/net/netlink.h b/backport/backport-include/net/netlink.h
index 8fa76676..ad588234 100644
--- a/backport/backport-include/net/netlink.h
+++ b/backport/backport-include/net/netlink.h
@@ -346,95 +346,6 @@ enum nla_policy_validation {
}
#endif /* < 4.20 */
-#if LINUX_VERSION_IS_LESS(4,12,0)
-#include <backport/magic.h>
-
-static inline int _nla_validate5(const struct nlattr *head,
- int len, int maxtype,
- const struct nla_policy *policy,
- struct netlink_ext_ack *extack)
-{
- return nla_validate(head, len, maxtype, policy, extack);
-}
-static inline int _nla_validate4(const struct nlattr *head,
- int len, int maxtype,
- const struct nla_policy *policy)
-{
- return nla_validate(head, len, maxtype, policy, NULL);
-}
-#undef nla_validate
-#define nla_validate(...) \
- macro_dispatcher(_nla_validate, __VA_ARGS__)(__VA_ARGS__)
-
-static inline int _nla_parse6(struct nlattr **tb, int maxtype,
- const struct nlattr *head,
- int len, const struct nla_policy *policy,
- struct netlink_ext_ack *extack)
-{
- return nla_parse(tb, maxtype, head, len, policy, extack);
-}
-static inline int _nla_parse5(struct nlattr **tb, int maxtype,
- const struct nlattr *head,
- int len, const struct nla_policy *policy)
-{
- return nla_parse(tb, maxtype, head, len, policy, NULL);
-}
-#undef nla_parse
-#define nla_parse(...) \
- macro_dispatcher(_nla_parse, __VA_ARGS__)(__VA_ARGS__)
-
-static inline int _nlmsg_parse6(const struct nlmsghdr *nlh, int hdrlen,
- struct nlattr *tb[], int maxtype,
- const struct nla_policy *policy,
- struct netlink_ext_ack *extack)
-{
- return nlmsg_parse(nlh, hdrlen, tb, maxtype, policy, extack);
-}
-static inline int _nlmsg_parse5(const struct nlmsghdr *nlh, int hdrlen,
- struct nlattr *tb[], int maxtype,
- const struct nla_policy *policy)
-{
- return nlmsg_parse(nlh, hdrlen, tb, maxtype, policy, NULL);
-}
-#undef nlmsg_parse
-#define nlmsg_parse(...) \
- macro_dispatcher(_nlmsg_parse, __VA_ARGS__)(__VA_ARGS__)
-
-static inline int _nlmsg_validate5(const struct nlmsghdr *nlh,
- int hdrlen, int maxtype,
- const struct nla_policy *policy,
- struct netlink_ext_ack *extack)
-{
- return nlmsg_validate(nlh, hdrlen, maxtype, policy, extack);
-}
-static inline int _nlmsg_validate4(const struct nlmsghdr *nlh,
- int hdrlen, int maxtype,
- const struct nla_policy *policy)
-{
- return nlmsg_validate(nlh, hdrlen, maxtype, policy, NULL);
-}
-#undef nlmsg_validate
-#define nlmsg_validate(...) \
- macro_dispatcher(_nlmsg_validate, __VA_ARGS__)(__VA_ARGS__)
-
-static inline int _nla_parse_nested5(struct nlattr *tb[], int maxtype,
- const struct nlattr *nla,
- const struct nla_policy *policy,
- struct netlink_ext_ack *extack)
-{
- return nla_parse_nested(tb, maxtype, nla, policy, extack);
-}
-static inline int _nla_parse_nested4(struct nlattr *tb[], int maxtype,
- const struct nlattr *nla,
- const struct nla_policy *policy)
-{
- return nla_parse_nested(tb, maxtype, nla, policy, NULL);
-}
-#undef nla_parse_nested
-#define nla_parse_nested(...) \
- macro_dispatcher(_nla_parse_nested, __VA_ARGS__)(__VA_ARGS__)
-#endif /* LINUX_VERSION_IS_LESS(4,12,0) */
-
#ifndef NLA_POLICY_MIN_LEN
#define NLA_POLICY_MIN_LEN(_len) { \
.type = NLA_BINARY \
diff --git a/backport/compat/Makefile b/backport/compat/Makefile
index 71057ca9..7c56e92f 100644
--- a/backport/compat/Makefile
+++ b/backport/compat/Makefile
@@ -7,7 +7,6 @@ endif
compat-y += main.o
# Kernel backport compatibility code
-compat-$(CPTCFG_KERNEL_4_12) += backport-4.12.o
compat-$(CPTCFG_KERNEL_4_18) += backport-4.18.o
compat-$(CPTCFG_KERNEL_5_2) += backport-5.2.o backport-genetlink.o
compat-$(CPTCFG_KERNEL_5_3) += backport-5.3.o
diff --git a/backport/compat/backport-4.12.c b/backport/compat/backport-4.12.c
deleted file mode 100644
index 1307a69e..00000000
--- a/backport/compat/backport-4.12.c
+++ /dev/null
@@ -1,94 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-
-#include <linux/export.h>
-#include <linux/usb.h>
-#include <linux/usb/ch9.h>
-
-static bool match_endpoint(struct usb_endpoint_descriptor *epd,
- struct usb_endpoint_descriptor **bulk_in,
- struct usb_endpoint_descriptor **bulk_out,
- struct usb_endpoint_descriptor **int_in,
- struct usb_endpoint_descriptor **int_out)
-{
- switch (usb_endpoint_type(epd)) {
- case USB_ENDPOINT_XFER_BULK:
- if (usb_endpoint_dir_in(epd)) {
- if (bulk_in && !*bulk_in) {
- *bulk_in = epd;
- break;
- }
- } else {
- if (bulk_out && !*bulk_out) {
- *bulk_out = epd;
- break;
- }
- }
-
- return false;
- case USB_ENDPOINT_XFER_INT:
- if (usb_endpoint_dir_in(epd)) {
- if (int_in && !*int_in) {
- *int_in = epd;
- break;
- }
- } else {
- if (int_out && !*int_out) {
- *int_out = epd;
- break;
- }
- }
-
- return false;
- default:
- return false;
- }
-
- return (!bulk_in || *bulk_in) && (!bulk_out || *bulk_out) &&
- (!int_in || *int_in) && (!int_out || *int_out);
-}
-
-/**
- * usb_find_common_endpoints() -- look up common endpoint descriptors
- * @alt: alternate setting to search
- * @bulk_in: pointer to descriptor pointer, or NULL
- * @bulk_out: pointer to descriptor pointer, or NULL
- * @int_in: pointer to descriptor pointer, or NULL
- * @int_out: pointer to descriptor pointer, or NULL
- *
- * Search the alternate setting's endpoint descriptors for the first bulk-in,
- * bulk-out, interrupt-in and interrupt-out endpoints and return them in the
- * provided pointers (unless they are NULL).
- *
- * If a requested endpoint is not found, the corresponding pointer is set to
- * NULL.
- *
- * Return: Zero if all requested descriptors were found, or -ENXIO otherwise.
- */
-int usb_find_common_endpoints(struct usb_host_interface *alt,
- struct usb_endpoint_descriptor **bulk_in,
- struct usb_endpoint_descriptor **bulk_out,
- struct usb_endpoint_descriptor **int_in,
- struct usb_endpoint_descriptor **int_out)
-{
- struct usb_endpoint_descriptor *epd;
- int i;
-
- if (bulk_in)
- *bulk_in = NULL;
- if (bulk_out)
- *bulk_out = NULL;
- if (int_in)
- *int_in = NULL;
- if (int_out)
- *int_out = NULL;
-
- for (i = 0; i < alt->desc.bNumEndpoints; ++i) {
- epd = &alt->endpoint[i].desc;
-
- if (match_endpoint(epd, bulk_in, bulk_out, int_in, int_out))
- return 0;
- }
-
- return -ENXIO;
-}
-EXPORT_SYMBOL_GPL(usb_find_common_endpoints);
diff --git a/backport/compat/backport-genetlink.c b/backport/compat/backport-genetlink.c
index 6ba31b6e..b7abfeee 100644
--- a/backport/compat/backport-genetlink.c
+++ b/backport/compat/backport-genetlink.c
@@ -33,139 +33,13 @@ static const struct genl_family *find_family_real_ops(const struct genl_ops **op
return family;
}
-#if LINUX_VERSION_IS_LESS(4,12,0)
-enum nlmsgerr_attrs {
- NLMSGERR_ATTR_UNUSED,
- NLMSGERR_ATTR_MSG,
- NLMSGERR_ATTR_OFFS,
- NLMSGERR_ATTR_COOKIE,
- __NLMSGERR_ATTR_MAX,
- NLMSGERR_ATTR_MAX = __NLMSGERR_ATTR_MAX - 1
-};
-
-#define NLM_F_CAPPED 0x100 /* request was capped */
-#define NLM_F_ACK_TLVS 0x200 /* extended ACK TVLs were included */
-
-static void extack_netlink_ack(struct sk_buff *in_skb, struct nlmsghdr *nlh,
- int err, const struct netlink_ext_ack *extack)
-{
- struct sk_buff *skb;
- struct nlmsghdr *rep;
- struct nlmsgerr *errmsg;
- size_t payload = sizeof(*errmsg);
- size_t tlvlen = 0;
- unsigned int flags = 0;
- /* backports assumes everyone supports this - libnl does so it's true */
- bool nlk_has_extack = true;
-
- /* Error messages get the original request appened, unless the user
- * requests to cap the error message, and get extra error data if
- * requested.
- * (ignored in backports)
- */
- if (nlk_has_extack && extack && extack->_msg)
- tlvlen += nla_total_size(strlen(extack->_msg) + 1);
-
- if (err) {
- if (1)
- payload += nlmsg_len(nlh);
- else
- flags |= NLM_F_CAPPED;
- if (nlk_has_extack && extack && extack->bad_attr)
- tlvlen += nla_total_size(sizeof(u32));
- } else {
- flags |= NLM_F_CAPPED;
-
- if (nlk_has_extack && extack && extack->cookie_len)
- tlvlen += nla_total_size(extack->cookie_len);
- }
-
- if (tlvlen)
- flags |= NLM_F_ACK_TLVS;
-
- skb = nlmsg_new(payload + tlvlen, GFP_KERNEL);
- if (!skb) {
- NETLINK_CB(in_skb).sk->sk_err = ENOBUFS;
- sk_error_report(NETLINK_CB(in_skb).sk);
- return;
- }
-
- rep = __nlmsg_put(skb, NETLINK_CB(in_skb).portid, nlh->nlmsg_seq,
- NLMSG_ERROR, payload, flags);
- errmsg = nlmsg_data(rep);
- errmsg->error = err;
- memcpy(&errmsg->msg, nlh, payload > sizeof(*errmsg) ? nlh->nlmsg_len : sizeof(*nlh));
-
- if (nlk_has_extack && extack) {
- if (extack->_msg) {
- WARN_ON(nla_put_string(skb, NLMSGERR_ATTR_MSG,
- extack->_msg));
- }
- if (err) {
- if (extack->bad_attr &&
- !WARN_ON((u8 *)extack->bad_attr < in_skb->data ||
- (u8 *)extack->bad_attr >= in_skb->data +
- in_skb->len))
- WARN_ON(nla_put_u32(skb, NLMSGERR_ATTR_OFFS,
- (u8 *)extack->bad_attr -
- in_skb->data));
- } else {
- if (extack->cookie_len)
- WARN_ON(nla_put(skb, NLMSGERR_ATTR_COOKIE,
- extack->cookie_len,
- extack->cookie));
- }
- }
-
- nlmsg_end(skb, rep);
-
- netlink_unicast(in_skb->sk, skb, NETLINK_CB(in_skb).portid, MSG_DONTWAIT);
-}
-
-static int extack_doit(struct sk_buff *skb, struct genl_info *info)
-{
- int (*doit)(struct sk_buff *, struct genl_info *);
- int err;
-
- doit = genl_info_extack(info)->__bp_doit;
-
- /* signal from our pre_doit to not do anything */
- if (!doit)
- return 0;
-
- err = doit(skb, info);
-
- if (err == -EINTR)
- return err;
-
- if (info->nlhdr->nlmsg_flags & NLM_F_ACK || err)
- extack_netlink_ack(skb, info->nlhdr, err,
- genl_info_extack(info));
-
- /* suppress sending ACK from normal netlink code */
- info->nlhdr->nlmsg_flags &= ~NLM_F_ACK;
- return 0;
-}
-#endif /* LINUX_VERSION_IS_LESS(4,12,0) */
-
static int backport_pre_doit(const struct genl_ops *ops,
struct sk_buff *skb,
struct genl_info *info)
{
const struct genl_family *family = find_family_real_ops(&ops);
int err;
-#if LINUX_VERSION_IS_LESS(4,12,0)
- struct netlink_ext_ack *extack = kzalloc(sizeof(*extack), GFP_KERNEL);
-
- if (!extack)
- return -ENOMEM;
-
- __bp_genl_info_userhdr_set(info, extack);
-
- extack->__bp_doit = ops->doit;
-#else
struct netlink_ext_ack *extack = info->extack;
-#endif
if (ops->validate & GENL_DONT_VALIDATE_STRICT)
err = nlmsg_validate_deprecated(info->nlhdr,
@@ -179,22 +53,6 @@ static int backport_pre_doit(const struct genl_ops *ops,
if (!err && family->pre_doit)
err = family->pre_doit(ops, skb, info);
-#if LINUX_VERSION_IS_LESS(4,12,0)
- if (err) {
- /* signal to do nothing */
- extack->__bp_doit = NULL;
-
- extack_netlink_ack(skb, info->nlhdr, err, extack);
-
- /* suppress sending ACK from normal netlink code */
- info->nlhdr->nlmsg_flags &= ~NLM_F_ACK;
-
- /* extack will be freed in post_doit as usual */
-
- return 0;
- }
-#endif
-
return err;
}
@@ -204,17 +62,8 @@ static void backport_post_doit(const struct genl_ops *ops,
{
const struct genl_family *family = find_family_real_ops(&ops);
-#if LINUX_VERSION_IS_LESS(4,12,0)
- if (genl_info_extack(info)->__bp_doit)
-#else
- if (1)
-#endif
- if (family->post_doit)
- family->post_doit(ops, skb, info);
-
-#if LINUX_VERSION_IS_LESS(4,12,0)
- kfree(__bp_genl_info_userhdr(info));
-#endif
+ if (family->post_doit)
+ family->post_doit(ops, skb, info);
}
int backport_genl_register_family(struct genl_family *family)
@@ -232,21 +81,6 @@ int backport_genl_register_family(struct genl_family *family)
memcpy(ops, family->ops, sizeof(*ops) * family->n_ops);
- /*
- * Remove policy to skip validation as the struct nla_policy
- * memory layout isn't compatible with the old version
- */
- for (i = 0; i < family->n_ops; i++) {
-#if LINUX_VERSION_IS_LESS(4,12,0)
- if (ops[i].doit)
- ops[i].doit = extack_doit;
-#endif
-/*
- * TODO: add dumpit redirect (like extack_doit) that will
- * make this code honor !GENL_DONT_VALIDATE_DUMP and
- * actually validate in this case ...
- */
- }
/* keep doit/dumpit NULL - that's invalid */
ops[family->n_ops].done = (void *)family;
diff --git a/patches/0078-genl-extack.cocci b/patches/0078-genl-extack.cocci
index 860d68b4..ddae4331 100644
--- a/patches/0078-genl-extack.cocci
+++ b/patches/0078-genl-extack.cocci
@@ -1,15 +1,3 @@
-@@
-struct genl_info *info;
-@@
--info->extack
-+genl_info_extack(info)
-
-@@
-struct genl_info *info;
-@@
--info->userhdr
-+genl_info_userhdr(info)
-
@@
struct netlink_callback *cb;
@@
diff --git a/patches/0079-netdev-destructor.cocci b/patches/0079-netdev-destructor.cocci
deleted file mode 100644
index 8d7228ec..00000000
--- a/patches/0079-netdev-destructor.cocci
+++ /dev/null
@@ -1,116 +0,0 @@
-@r1@
-struct net_device *NDEV;
-identifier D, C;
-identifier TRUE =~ "true";
-@@
-C(...)
-{
- <+...
-- NDEV->needs_free_netdev = TRUE;
-- NDEV->priv_destructor = D;
-+ netdev_set_priv_destructor(NDEV, D);
- ...+>
-}
-
-@r2 depends on r1@
-identifier r1.D, r1.C;
-fresh identifier E = "__" ## D;
-@@
-
-+#if LINUX_VERSION_IS_LESS(4,12,0)
-+static void E(struct net_device *ndev)
-+{
-+ D(ndev);
-+ free_netdev(ndev);
-+}
-+#endif
-+
-C(...)
-{
- ...
-}
-
-@r3 depends on r1@
-type T;
-identifier NDEV;
-identifier r1.D;
-T RET;
-@@
-
-RET = \(register_netdevice\|register_ndev\)(NDEV);
-if (<+... RET ...+>) {
- <...
-+#if LINUX_VERSION_IS_LESS(4,12,0)
-+ D(NDEV);
-+#endif
- free_netdev(NDEV);
- ...>
-}
-
-@r4 depends on r1@
-identifier NDEV;
-identifier r1.D;
-type T;
-T RET;
-@@
-
-if (...)
- RET = register_netdevice(NDEV);
-else
- RET = register_netdev(NDEV);
-if (<+... RET ...+>) {
- <...
-+#if LINUX_VERSION_IS_LESS(4,12,0)
-+ D(NDEV);
-+#endif
- free_netdev(NDEV);
- ...>
-}
-
-@r11@
-struct net_device *NDEV;
-identifier D, C;
-identifier TRUE =~ "true";
-@@
-C(...)
-{
- <+...
-- NDEV->priv_destructor = D;
-- NDEV->needs_free_netdev = TRUE;
-+ netdev_set_priv_destructor(NDEV, D);
- ...+>
-}
-
-@r12 depends on r11@
-identifier r11.D, r11.C;
-fresh identifier E = "__" ## D;
-@@
-
-+#if LINUX_VERSION_IS_LESS(4,12,0)
-+static void E(struct net_device *ndev)
-+{
-+ D(ndev);
-+ free_netdev(ndev);
-+}
-+#endif
-+
-C(...)
-{
- ...
-}
-
-@r5@
-struct net_device *NDEV;
-identifier TRUE =~ "true";
-@@
-
--NDEV->needs_free_netdev = TRUE;
-+netdev_set_def_destructor(NDEV);
-
-@r6@
-struct net_device *NDEV;
-identifier D;
-@@
-
--NDEV->priv_destructor = D;
-+netdev_set_priv_destructor(NDEV, D);
diff --git a/patches/0079-netdev-destructor/brcmfmac.patch b/patches/0079-netdev-destructor/brcmfmac.patch
deleted file mode 100644
index 0e32a83c..00000000
--- a/patches/0079-netdev-destructor/brcmfmac.patch
+++ /dev/null
@@ -1,38 +0,0 @@
---- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
-+++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/core.c
-@@ -640,6 +640,23 @@ static const struct net_device_ops brcmf
- .ndo_set_rx_mode = brcmf_netdev_set_multicast_list
- };
-
-+#undef netdev_set_priv_destructor
-+#if LINUX_VERSION_IS_LESS(4,11,9)
-+#define netdev_set_priv_destructor(_dev, _destructor) \
-+ (_dev)->destructor = (_destructor)
-+#else
-+#define netdev_set_priv_destructor(_dev, _destructor) \
-+ (_dev)->priv_destructor = (_destructor)
-+#endif
-+
-+#if LINUX_VERSION_IS_LESS(4,12,0)
-+static void __brcmf_cfg80211_free_netdev(struct net_device *ndev)
-+{
-+ brcmf_cfg80211_free_netdev(ndev);
-+ free_netdev(ndev);
-+}
-+#endif
-+
- int brcmf_net_attach(struct brcmf_if *ifp, bool locked)
- {
- struct brcmf_pub *drvr = ifp->drvr;
-@@ -890,7 +907,11 @@ struct brcmf_if *brcmf_add_if(struct brc
- if (!ndev)
- return ERR_PTR(-ENOMEM);
-
-+#if LINUX_VERSION_IS_LESS(4,12,0)
-+ ndev->priv_destructor = __brcmf_cfg80211_free_netdev;
-+#else
- ndev->needs_free_netdev = true;
-+#endif
- ifp = netdev_priv(ndev);
- ifp->ndev = ndev;
- /* store mapping ifidx to bsscfgidx */
--
2.44.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 09/10] backports: Remove support for kernel smaller than 4.13
2024-04-01 22:03 [PATCH 00/10] backports: Remove support for kernel older than 4.14 Hauke Mehrtens
` (7 preceding siblings ...)
2024-04-01 22:03 ` [PATCH 08/10] backports: Remove support for kernel smaller than 4.12 Hauke Mehrtens
@ 2024-04-01 22:03 ` Hauke Mehrtens
2024-04-01 22:03 ` [PATCH 10/10] backports: Remove support for kernel smaller than 4.14 Hauke Mehrtens
2024-04-08 13:49 ` [PATCH 00/10] backports: Remove support for kernel older " Johannes Berg
10 siblings, 0 replies; 14+ messages in thread
From: Hauke Mehrtens @ 2024-04-01 22:03 UTC (permalink / raw)
To: backports; +Cc: Hauke Mehrtens
This removes all the code which is needed to support kernel 4.12.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
.github/workflows/create.yml | 1 -
README | 2 +-
backport/backport-include/acpi/acpi_bus.h | 15 ------
backport/backport-include/linux/acpi.h | 15 ------
backport/backport-include/linux/build_bug.h | 4 --
backport/backport-include/linux/kernel.h | 7 ---
backport/backport-include/linux/skbuff.h | 54 ---------------------
backport/backport-include/linux/uuid.h | 34 -------------
backport/backport-include/linux/wait.h | 25 ----------
patches/0082-pci_error_handlers.cocci | 32 ------------
10 files changed, 1 insertion(+), 188 deletions(-)
delete mode 100644 backport/backport-include/acpi/acpi_bus.h
delete mode 100644 backport/backport-include/linux/acpi.h
delete mode 100644 backport/backport-include/linux/kernel.h
delete mode 100644 backport/backport-include/linux/uuid.h
delete mode 100644 backport/backport-include/linux/wait.h
delete mode 100644 patches/0082-pci_error_handlers.cocci
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
--
2.44.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* [PATCH 10/10] backports: Remove support for kernel smaller than 4.14
2024-04-01 22:03 [PATCH 00/10] backports: Remove support for kernel older than 4.14 Hauke Mehrtens
` (8 preceding siblings ...)
2024-04-01 22:03 ` [PATCH 09/10] backports: Remove support for kernel smaller than 4.13 Hauke Mehrtens
@ 2024-04-01 22:03 ` Hauke Mehrtens
2024-04-08 13:49 ` [PATCH 00/10] backports: Remove support for kernel older " Johannes Berg
10 siblings, 0 replies; 14+ messages in thread
From: Hauke Mehrtens @ 2024-04-01 22:03 UTC (permalink / raw)
To: backports; +Cc: Hauke Mehrtens
This removes all the code which is needed to support kernel 4.13.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
.github/workflows/create.yml | 1 -
README | 2 +-
backport/backport-include/linux/netlink.h | 27 ---------
backport/backport-include/linux/rbtree.h | 59 -------------------
patches/0013-fix-makefile-includes/mt76.patch | 22 -------
.../0013-fix-makefile-includes/wilc1000.patch | 24 +-------
patches/0095-spi-delay/wilc1000.patch | 6 +-
7 files changed, 5 insertions(+), 136 deletions(-)
delete mode 100644 backport/backport-include/linux/rbtree.h
diff --git a/.github/workflows/create.yml b/.github/workflows/create.yml
index 7850b8f0..36e6c930 100644
--- a/.github/workflows/create.yml
+++ b/.github/workflows/create.yml
@@ -55,7 +55,6 @@ jobs:
strategy:
matrix:
kernel: [
- "4.13",
"4.14",
"4.15",
"4.16",
diff --git a/README b/README
index 2eb53ab1..505300a8 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.13 and above.
+for kernels 4.14 and above.
# Documentation
diff --git a/backport/backport-include/linux/netlink.h b/backport/backport-include/linux/netlink.h
index b7afaf9d..1c15d201 100644
--- a/backport/backport-include/linux/netlink.h
+++ b/backport/backport-include/linux/netlink.h
@@ -3,33 +3,6 @@
#include_next <linux/netlink.h>
#include <linux/version.h>
-#if LINUX_VERSION_IS_LESS(4,14,0)
-struct nla_bitfield32 {
- __u32 value;
- __u32 selector;
-};
-#endif
-
-#ifndef NL_SET_ERR_MSG_ATTR
-#define NL_SET_ERR_MSG_ATTR(extack, attr, msg) do { \
- static const char __msg[] = msg; \
- struct netlink_ext_ack *__extack = (extack); \
- \
- if (__extack) { \
- __extack->_msg = __msg; \
- __extack->bad_attr = (attr); \
- } \
-} while (0)
-#endif
-
-
-#ifndef NL_SET_BAD_ATTR
-#define NL_SET_BAD_ATTR(extack, attr) do { \
- if ((extack)) \
- (extack)->bad_attr = (attr); \
-} while (0)
-#endif /* NL_SET_BAD_ATTR */
-
#if LINUX_VERSION_IS_LESS(5,0,0)
static inline void nl_set_extack_cookie_u64(struct netlink_ext_ack *extack,
u64 cookie)
diff --git a/backport/backport-include/linux/rbtree.h b/backport/backport-include/linux/rbtree.h
deleted file mode 100644
index a364f07b..00000000
--- a/backport/backport-include/linux/rbtree.h
+++ /dev/null
@@ -1,59 +0,0 @@
-#ifndef __BACKPORT_LINUX_RBTREE_H
-#define __BACKPORT_LINUX_RBTREE_H
-#include_next <linux/rbtree.h>
-
-#if LINUX_VERSION_IS_LESS(4,14,0)
-/*
- * Leftmost-cached rbtrees.
- *
- * We do not cache the rightmost node based on footprint
- * size vs number of potential users that could benefit
- * from O(1) rb_last(). Just not worth it, users that want
- * this feature can always implement the logic explicitly.
- * Furthermore, users that want to cache both pointers may
- * find it a bit asymmetric, but that's ok.
- */
-struct rb_root_cached {
- struct rb_root rb_root;
- struct rb_node *rb_leftmost;
-};
-
-#define RB_ROOT_CACHED (struct rb_root_cached) { {NULL, }, NULL }
-
-/* Same as rb_first(), but O(1) */
-#define rb_first_cached(root) (root)->rb_leftmost
-
-static inline void rb_insert_color_cached(struct rb_node *node,
- struct rb_root_cached *root,
- bool leftmost)
-{
- if (leftmost)
- root->rb_leftmost = node;
- rb_insert_color(node, &root->rb_root);
-}
-
-
-static inline struct rb_node *
-rb_erase_cached(struct rb_node *node, struct rb_root_cached *root)
-{
- struct rb_node *leftmost = NULL;
-
- if (root->rb_leftmost == node)
- leftmost = root->rb_leftmost = rb_next(node);
-
- rb_erase(node, &root->rb_root);
-
- return leftmost;
-}
-
-static inline void rb_replace_node_cached(struct rb_node *victim,
- struct rb_node *new,
- struct rb_root_cached *root)
-{
- if (root->rb_leftmost == victim)
- root->rb_leftmost = new;
- rb_replace_node(victim, new, &root->rb_root);
-}
-#endif
-
-#endif /* __BACKPORT_LINUX_RBTREE_H */
diff --git a/patches/0013-fix-makefile-includes/mt76.patch b/patches/0013-fix-makefile-includes/mt76.patch
index 7c5f0d45..46fe75c5 100644
--- a/patches/0013-fix-makefile-includes/mt76.patch
+++ b/patches/0013-fix-makefile-includes/mt76.patch
@@ -1,27 +1,5 @@
-additional include needed for kernel 4.2, 4.11, 4.12 and 4.13
-
linux/kthread.h include needed against kernel 4.19.
---- a/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
-+++ b/drivers/net/wireless/mediatek/mt76/mt7615/mcu.c
-@@ -6,6 +6,7 @@
- */
-
- #include <linux/firmware.h>
-+#include <linux/module.h>
- #include "mt7615.h"
- #include "mcu.h"
- #include "mac.h"
---- a/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c
-+++ b/drivers/net/wireless/mediatek/mt76/mt76_connac_mcu.c
-@@ -2,6 +2,7 @@
- /* Copyright (C) 2020 MediaTek Inc. */
-
- #include "mt76_connac_mcu.h"
-+#include <linux/module.h>
-
- int mt76_connac_mcu_start_firmware(struct mt76_dev *dev, u32 addr, u32 option)
- {
--- a/drivers/net/wireless/mediatek/mt76/mt7615/sdio.c
+++ b/drivers/net/wireless/mediatek/mt76/mt7615/sdio.c
@@ -9,6 +9,7 @@
diff --git a/patches/0013-fix-makefile-includes/wilc1000.patch b/patches/0013-fix-makefile-includes/wilc1000.patch
index 6304b3d7..73e02955 100644
--- a/patches/0013-fix-makefile-includes/wilc1000.patch
+++ b/patches/0013-fix-makefile-includes/wilc1000.patch
@@ -1,34 +1,12 @@
linux/interrupt.h include needed for kernel 4.14
-linux/module.h include needed for kernel 3.18
--- a/drivers/net/wireless/microchip/wilc1000/netdev.c
+++ b/drivers/net/wireless/microchip/wilc1000/netdev.c
-@@ -9,6 +9,8 @@
+@@ -9,6 +9,7 @@
#include <linux/firmware.h>
#include <linux/netdevice.h>
#include <linux/inetdevice.h>
+#include <linux/interrupt.h>
-+#include <linux/module.h>
#include "cfg80211.h"
#include "wlan_cfg.h"
---- a/drivers/net/wireless/microchip/wilc1000/sdio.c
-+++ b/drivers/net/wireless/microchip/wilc1000/sdio.c
-@@ -10,6 +10,7 @@
- #include <linux/mmc/host.h>
- #include <linux/mmc/sdio.h>
- #include <linux/of_irq.h>
-+#include <linux/module.h>
-
- #include "netdev.h"
- #include "cfg80211.h"
---- a/drivers/net/wireless/microchip/wilc1000/spi.c
-+++ b/drivers/net/wireless/microchip/wilc1000/spi.c
-@@ -8,6 +8,7 @@
- #include <linux/spi/spi.h>
- #include <linux/crc7.h>
- #include <linux/crc-itu-t.h>
-+#include <linux/module.h>
-
- #include "netdev.h"
- #include "cfg80211.h"
diff --git a/patches/0095-spi-delay/wilc1000.patch b/patches/0095-spi-delay/wilc1000.patch
index 71111710..1d3e6d6a 100644
--- a/patches/0095-spi-delay/wilc1000.patch
+++ b/patches/0095-spi-delay/wilc1000.patch
@@ -1,6 +1,6 @@
--- a/drivers/net/wireless/microchip/wilc1000/spi.c
+++ b/drivers/net/wireless/microchip/wilc1000/spi.c
-@@ -219,10 +219,14 @@ static int wilc_spi_tx(struct wilc *wilc
+@@ -218,10 +218,14 @@ static int wilc_spi_tx(struct wilc *wilc
struct spi_transfer tr = {
.tx_buf = b,
.len = len,
@@ -15,7 +15,7 @@
};
char *r_buffer = kzalloc(len, GFP_KERNEL);
-@@ -263,10 +267,14 @@ static int wilc_spi_rx(struct wilc *wilc
+@@ -262,10 +266,14 @@ static int wilc_spi_rx(struct wilc *wilc
struct spi_transfer tr = {
.rx_buf = rb,
.len = rlen,
@@ -30,7 +30,7 @@
};
char *t_buffer = kzalloc(rlen, GFP_KERNEL);
-@@ -308,10 +316,14 @@ static int wilc_spi_tx_rx(struct wilc *w
+@@ -307,10 +315,14 @@ static int wilc_spi_tx_rx(struct wilc *w
.tx_buf = wb,
.len = rlen,
.bits_per_word = 8,
--
2.44.0
^ permalink raw reply related [flat|nested] 14+ messages in thread
* Re: [PATCH 00/10] backports: Remove support for kernel older than 4.14
2024-04-01 22:03 [PATCH 00/10] backports: Remove support for kernel older than 4.14 Hauke Mehrtens
` (9 preceding siblings ...)
2024-04-01 22:03 ` [PATCH 10/10] backports: Remove support for kernel smaller than 4.14 Hauke Mehrtens
@ 2024-04-08 13:49 ` Johannes Berg
2024-04-08 14:15 ` Johannes Berg
10 siblings, 1 reply; 14+ messages in thread
From: Johannes Berg @ 2024-04-08 13:49 UTC (permalink / raw)
To: Hauke Mehrtens, backports
On Tue, 2024-04-02 at 00:03 +0200, Hauke Mehrtens wrote:
> Remove support for older kernel versions to make maintenance of backports easier in
> the future.
>
No objections, I think (**), but why not also remove 4.15-4.18 since the
oldest stable kernel is 4.19.x now? Seems there'd be little value in
those then.
(**) checking internally if we still have a need for any, but in that
case we can maintain it anyway
johannes
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 00/10] backports: Remove support for kernel older than 4.14
2024-04-08 13:49 ` [PATCH 00/10] backports: Remove support for kernel older " Johannes Berg
@ 2024-04-08 14:15 ` Johannes Berg
2024-04-08 22:31 ` Hauke Mehrtens
0 siblings, 1 reply; 14+ messages in thread
From: Johannes Berg @ 2024-04-08 14:15 UTC (permalink / raw)
To: Hauke Mehrtens, backports
On Mon, 2024-04-08 at 15:49 +0200, Johannes Berg wrote:
> On Tue, 2024-04-02 at 00:03 +0200, Hauke Mehrtens wrote:
> > Remove support for older kernel versions to make maintenance of backports easier in
> > the future.
> >
>
> No objections, I think (**), but why not also remove 4.15-4.18 since the
> oldest stable kernel is 4.19.x now? Seems there'd be little value in
> those then.
Oh wait, I misread, you're keeping 4.14 which was previously still
released as a stable kernel, so I guess never mind.
johannes
^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH 00/10] backports: Remove support for kernel older than 4.14
2024-04-08 14:15 ` Johannes Berg
@ 2024-04-08 22:31 ` Hauke Mehrtens
0 siblings, 0 replies; 14+ messages in thread
From: Hauke Mehrtens @ 2024-04-08 22:31 UTC (permalink / raw)
To: Johannes Berg, backports
On 4/8/24 4:15 PM, Johannes Berg wrote:
> On Mon, 2024-04-08 at 15:49 +0200, Johannes Berg wrote:
>> On Tue, 2024-04-02 at 00:03 +0200, Hauke Mehrtens wrote:
>>> Remove support for older kernel versions to make maintenance of backports easier in
>>> the future.
>>>
>>
>> No objections, I think (**), but why not also remove 4.15-4.18 since the
>> oldest stable kernel is 4.19.x now? Seems there'd be little value in
>> those then.
>
> Oh wait, I misread, you're keeping 4.14 which was previously still
> released as a stable kernel, so I guess never mind.
>
> johannes
Hi Johannes,
I kept it in for now, but will only build test it. If I run into
problems I will remove 4.14 to 4.18 too.
Hauke
^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2024-04-08 22:32 UTC | newest]
Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-01 22:03 [PATCH 00/10] backports: Remove support for kernel older than 4.14 Hauke Mehrtens
2024-04-01 22:03 ` [PATCH 01/10] backports: Remove support for kernel smaller than 4.5 Hauke Mehrtens
2024-04-01 22:03 ` [PATCH 02/10] backports: Remove support for kernel smaller than 4.6 Hauke Mehrtens
2024-04-01 22:03 ` [PATCH 03/10] backports: Remove support for kernel smaller than 4.7 Hauke Mehrtens
2024-04-01 22:03 ` [PATCH 04/10] backports: Remove support for kernel smaller than 4.8 Hauke Mehrtens
2024-04-01 22:03 ` [PATCH 05/10] backports: Remove support for kernel smaller than 4.9 Hauke Mehrtens
2024-04-01 22:03 ` [PATCH 06/10] backports: Remove support for kernel smaller than 4.10 Hauke Mehrtens
2024-04-01 22:03 ` [PATCH 07/10] backports: Remove support for kernel smaller than 4.11 Hauke Mehrtens
2024-04-01 22:03 ` [PATCH 08/10] backports: Remove support for kernel smaller than 4.12 Hauke Mehrtens
2024-04-01 22:03 ` [PATCH 09/10] backports: Remove support for kernel smaller than 4.13 Hauke Mehrtens
2024-04-01 22:03 ` [PATCH 10/10] backports: Remove support for kernel smaller than 4.14 Hauke Mehrtens
2024-04-08 13:49 ` [PATCH 00/10] backports: Remove support for kernel older " Johannes Berg
2024-04-08 14:15 ` Johannes Berg
2024-04-08 22:31 ` Hauke Mehrtens
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).