[PATCH 05/10] backports: Remove support for kernel smaller than 4.9

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This removes all the code which is needed to support kernel 4.8.

Signed-off-by: Hauke Mehrtens <hauke@xxxxxxxxxx>
---
 .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





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux