From 0c64abbd4606bf02fea7d98d0cb77810401647c8 Mon Sep 17 00:00:00 2001 From: Tk-Glitch Date: Thu, 16 Jul 2020 03:39:58 +0200 Subject: [PATCH] linux57/58-tkg: Introduce the misc-additions patch and move tty device option from base to it. That specific patchset breaks packaging on Ubuntu. https://github.com/Frogging-Family/linux-tkg/pull/26 Also temporarily add Alessio Bonfiglio's patch to restore Killer Wireless-AC 1550i support on 5.7. https://bugzilla.kernel.org/show_bug.cgi?id=208141#c21 --- linux57-tkg/PKGBUILD | 8 +- linux57-tkg/customization.cfg | 3 + linux57-tkg/linux57-tkg-config/prepare | 5 ++ .../0003-glitched-base.patch | 55 ------------- .../0012-misc-additions.patch | 79 +++++++++++++++++++ linux58-rc-tkg/PKGBUILD | 6 +- linux58-rc-tkg/customization.cfg | 3 + linux58-rc-tkg/linux58-tkg-config/prepare | 5 ++ .../0003-glitched-base.patch | 55 ------------- .../0012-misc-additions.patch | 55 +++++++++++++ 10 files changed, 159 insertions(+), 115 deletions(-) create mode 100644 linux57-tkg/linux57-tkg-patches/0012-misc-additions.patch create mode 100644 linux58-rc-tkg/linux58-tkg-patches/0012-misc-additions.patch diff --git a/linux57-tkg/PKGBUILD b/linux57-tkg/PKGBUILD index ddc4746..af21efd 100644 --- a/linux57-tkg/PKGBUILD +++ b/linux57-tkg/PKGBUILD @@ -89,7 +89,7 @@ pkgname=("${pkgbase}" "${pkgbase}-headers") _basekernel=5.7 _sub=8 pkgver="${_basekernel}"."${_sub}" -pkgrel=18 +pkgrel=19 pkgdesc='Linux-tkg' arch=('x86_64') # no i686 in here url="http://www.kernel.org/" @@ -124,6 +124,7 @@ source=("https://www.kernel.org/pub/linux/kernel/v5.x/linux-${_basekernel}.tar.x 0009-prjc_v5.7-r2.patch 0011-ZFS-fix.patch 0012-linux-hardened.patch + 0012-misc-additions.patch ) sha256sums=('de8163bb62f822d84f7a3983574ec460060bf013a78ff79cd7c979ff1ec1d7e0' 'eea2cb4ea7c2014b0daa6d702fc7087d017c55e6ea479434b1269626eda9fde5' @@ -134,7 +135,7 @@ sha256sums=('de8163bb62f822d84f7a3983574ec460060bf013a78ff79cd7c979ff1ec1d7e0' '66a03c246037451a77b4d448565b1d7e9368270c7d02872fbd0b5d024ed0a997' '31dc68e84aecfb7d069efb1305049122c65694676be8b955634abcf0675922a2' 'd02bf5ca08fd610394b9d3a0c3b176d74af206f897dee826e5cbaec97bb4a4aa' - '9eae36f2e3265b787592e64259bcd5a1de4a524a55b2eccb2e3121f1ff1c209f' + '3651d527b3c85d7fb0e0988bc1ead946d3b5cdd209895f1ddd435cbe6aee1156' '7058e57fd68367b029adc77f2a82928f1433daaf02c8c279cb2d13556c8804d7' 'c605f638d74c61861ebdc36ebd4cb8b6475eae2f6273e1ccb2bbb3e10a2ec3fe' 'bc69d6e5ee8172b0242c8fa72d13cfe2b8d2b6601468836908a7dfe8b78a3bbb' @@ -149,7 +150,8 @@ sha256sums=('de8163bb62f822d84f7a3983574ec460060bf013a78ff79cd7c979ff1ec1d7e0' '965a517a283f265a012545fbb5cc9e516efc9f6166d2aa1baf7293a32a1086b7' 'eb6697a5b1fb4e103c5725dc209b8f25a4e0f70a37ea147f91d1b15e360a66b4' '49262ce4a8089fa70275aad742fc914baa28d9c384f710c9a62f64796d13e104' - '6821f92bd2bde3a3938d17b070d70f18a2f33cae81647567b5a4d94c9cd75f3d') + '6821f92bd2bde3a3938d17b070d70f18a2f33cae81647567b5a4d94c9cd75f3d' + '9338eae7c04da16005e137a7b1e20a24550b9bda1e14621cba30ac93a79e74e8') export KBUILD_BUILD_HOST=archlinux export KBUILD_BUILD_USER=$pkgbase diff --git a/linux57-tkg/customization.cfg b/linux57-tkg/customization.cfg index d8f27f2..1fde52a 100644 --- a/linux57-tkg/customization.cfg +++ b/linux57-tkg/customization.cfg @@ -77,6 +77,9 @@ _ftracedisable="false" # Set to "true" to disable NUMA, lowering overhead, but breaking CUDA/NvEnc on Nvidia equipped systems - Kernel default is "false" _numadisable="false" +# Set to "true" to enable misc additions - May contain temporary fixes pending upstream or changes that can break on non-Arch - Kernel default is "true" +_misc_adds="true" + # Set to "1" to use CattaRappa mode (enabling full tickless), "2" for tickless idle only, or "0" for periodic ticks. # Full tickless can give higher performances in various cases but, depending on hardware, lower consistency. Just tickless idle can perform better on some platforms (mostly AMD based). _tickless="" diff --git a/linux57-tkg/linux57-tkg-config/prepare b/linux57-tkg/linux57-tkg-config/prepare index 3ea2089..05b31b8 100644 --- a/linux57-tkg/linux57-tkg-config/prepare +++ b/linux57-tkg/linux57-tkg-config/prepare @@ -28,6 +28,11 @@ _tkg_srcprep() { msg2 "Applying glitched base patch" patch -Np1 -i ../0003-glitched-base.patch + if [ "$_misc_adds" = "true" ]; then + msg2 "Applying misc additions patch" + patch -Np1 -i ../0012-misc-additions.patch + fi + if [ "${_cpusched}" == "MuQSS" ]; then # MuQSS patch -Np1 -i ../0004-5.7-ck1.patch diff --git a/linux57-tkg/linux57-tkg-patches/0003-glitched-base.patch b/linux57-tkg/linux57-tkg-patches/0003-glitched-base.patch index 8b6381f..f55575f 100644 --- a/linux57-tkg/linux57-tkg-patches/0003-glitched-base.patch +++ b/linux57-tkg/linux57-tkg-patches/0003-glitched-base.patch @@ -100,30 +100,6 @@ index 4f32c4062fb6..c0bf039e1b40 100644 } sgid_addr, dgid_addr; int ret; -diff --git a/drivers/tty/Kconfig b/drivers/tty/Kconfig -index 0840d27381ea..73aba9a31064 100644 ---- a/drivers/tty/Kconfig -+++ b/drivers/tty/Kconfig -@@ -75,6 +75,19 @@ config VT_CONSOLE_SLEEP - def_bool y - depends on VT_CONSOLE && PM_SLEEP - -+config NR_TTY_DEVICES -+ int "Maximum tty device number" -+ depends on VT -+ range 12 63 -+ default 63 -+ ---help--- -+ This option is used to change the number of tty devices in /dev. -+ The default value is 63. The lowest number you can set is 12, -+ 63 is also the upper limit so we don't overrun the serial -+ consoles. -+ -+ If unsure, say 63. -+ - config HW_CONSOLE - bool - depends on VT && !UML diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 79226ca8f80f..2a30060e7e1d 100644 --- a/include/linux/blkdev.h @@ -140,37 +116,6 @@ index 79226ca8f80f..2a30060e7e1d 100644 /* Must be consistent with blk_mq_poll_stats_bkt() */ #define BLK_MQ_POLL_STATS_BKTS 16 -diff --git a/include/uapi/linux/vt.h b/include/uapi/linux/vt.h -index e9d39c48520a..3bceead8da40 100644 ---- a/include/uapi/linux/vt.h -+++ b/include/uapi/linux/vt.h -@@ -3,12 +3,25 @@ - #define _UAPI_LINUX_VT_H - - -+/* -+ * We will make this definition solely for the purpose of making packages -+ * such as splashutils build, because they can not understand that -+ * NR_TTY_DEVICES is defined in the kernel configuration. -+ */ -+#ifndef CONFIG_NR_TTY_DEVICES -+#define CONFIG_NR_TTY_DEVICES 63 -+#endif -+ - /* - * These constants are also useful for user-level apps (e.g., VC - * resizing). - */ - #define MIN_NR_CONSOLES 1 /* must be at least 1 */ --#define MAX_NR_CONSOLES 63 /* serial lines start at 64 */ -+/* -+ * NR_TTY_DEVICES: -+ * Value MUST be at least 12 and must never be higher then 63 -+ */ -+#define MAX_NR_CONSOLES CONFIG_NR_TTY_DEVICES /* serial lines start above this */ - /* Note: the ioctl VT_GETSTATE does not work for - consoles 16 and higher (since it returns a short) */ - diff --git a/init/Kconfig b/init/Kconfig index 041f3a022122..5ed70eb1ad3a 100644 --- a/init/Kconfig diff --git a/linux57-tkg/linux57-tkg-patches/0012-misc-additions.patch b/linux57-tkg/linux57-tkg-patches/0012-misc-additions.patch new file mode 100644 index 0000000..dbc4aac --- /dev/null +++ b/linux57-tkg/linux57-tkg-patches/0012-misc-additions.patch @@ -0,0 +1,79 @@ +diff --git a/drivers/tty/Kconfig b/drivers/tty/Kconfig +index 0840d27381ea..73aba9a31064 100644 +--- a/drivers/tty/Kconfig ++++ b/drivers/tty/Kconfig +@@ -75,6 +75,19 @@ config VT_CONSOLE_SLEEP + def_bool y + depends on VT_CONSOLE && PM_SLEEP + ++config NR_TTY_DEVICES ++ int "Maximum tty device number" ++ depends on VT ++ range 12 63 ++ default 63 ++ ---help--- ++ This option is used to change the number of tty devices in /dev. ++ The default value is 63. The lowest number you can set is 12, ++ 63 is also the upper limit so we don't overrun the serial ++ consoles. ++ ++ If unsure, say 63. ++ + config HW_CONSOLE + bool + depends on VT && !UML +diff --git a/include/uapi/linux/vt.h b/include/uapi/linux/vt.h +index e9d39c48520a..3bceead8da40 100644 +--- a/include/uapi/linux/vt.h ++++ b/include/uapi/linux/vt.h +@@ -3,12 +3,25 @@ + #define _UAPI_LINUX_VT_H + + ++/* ++ * We will make this definition solely for the purpose of making packages ++ * such as splashutils build, because they can not understand that ++ * NR_TTY_DEVICES is defined in the kernel configuration. ++ */ ++#ifndef CONFIG_NR_TTY_DEVICES ++#define CONFIG_NR_TTY_DEVICES 63 ++#endif ++ + /* + * These constants are also useful for user-level apps (e.g., VC + * resizing). + */ + #define MIN_NR_CONSOLES 1 /* must be at least 1 */ +-#define MAX_NR_CONSOLES 63 /* serial lines start at 64 */ ++/* ++ * NR_TTY_DEVICES: ++ * Value MUST be at least 12 and must never be higher then 63 ++ */ ++#define MAX_NR_CONSOLES CONFIG_NR_TTY_DEVICES /* serial lines start above this */ + /* Note: the ioctl VT_GETSTATE does not work for + consoles 16 and higher (since it returns a short) */ + +From ef8ff025f1f49cfe2b53d9a636f10cdb87ed0f7e Mon Sep 17 00:00:00 2001 +From: Alessio Bonfiglio +Date: Wed, 1 Jul 2020 20:32:42 +0200 +Subject: [PATCH] Restore "Killer Wireless-AC 1550i" card support + +In a previous unknown commit the support for the card "Killer(R) Wireless-AC 1550i Wireless Network Adapter(9560NGW)" has been broken: this fix add back missing IDs used by the card in order to make the iwlwifi driver load again the right firmware. +--- + drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c +index 65d65c6baf4c..bac87cfb752f 100644 +--- a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c ++++ b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c +@@ -582,6 +582,7 @@ static const struct iwl_dev_info iwl_dev_info_table[] = { + IWL_DEV_INFO(0x30DC, 0x1552, iwl9560_2ac_cfg_soc, iwl9560_killer_1550i_name), + IWL_DEV_INFO(0x31DC, 0x1551, iwl9560_2ac_cfg_soc, iwl9560_killer_1550s_name), + IWL_DEV_INFO(0x31DC, 0x1552, iwl9560_2ac_cfg_soc, iwl9560_killer_1550i_name), ++ IWL_DEV_INFO(0xA370, 0x1552, iwl9560_2ac_cfg_soc, iwl9560_killer_1550i_name), + + IWL_DEV_INFO(0x271C, 0x0214, iwl9260_2ac_cfg, iwl9260_1_name), + +-- +2.27.0 diff --git a/linux58-rc-tkg/PKGBUILD b/linux58-rc-tkg/PKGBUILD index bd14fc0..32d962e 100644 --- a/linux58-rc-tkg/PKGBUILD +++ b/linux58-rc-tkg/PKGBUILD @@ -118,6 +118,7 @@ source=("https://git.kernel.org/torvalds/t/linux-${_basekernel}-${_sub}.tar.gz" #0009-bmq_v5.8-r0.patch 0011-ZFS-fix.patch #0012-linux-hardened.patch + 0012-misc-additions.patch ) sha256sums=('69bd59fc15211f07466d322523a13071eb039ae210b4fb60cf5cf2534783e485' '5ab29eb64e57df83b395a29a6a4f89030d142feffbfbf73b3afc6d97a2a7fd12' @@ -126,14 +127,15 @@ sha256sums=('69bd59fc15211f07466d322523a13071eb039ae210b4fb60cf5cf2534783e485' '66a03c246037451a77b4d448565b1d7e9368270c7d02872fbd0b5d024ed0a997' 'f6383abef027fd9a430fd33415355e0df492cdc3c90e9938bf2d98f4f63b32e6' 'd02bf5ca08fd610394b9d3a0c3b176d74af206f897dee826e5cbaec97bb4a4aa' - 'e36b6efad764eeede8cf90b4de6ef5f9241e8cf531530b33ee2e024e2961e9b5' + '9619efca028e7f06a33e54cf114832ef1772c443da8cf1b65ae8694df34cf536' '7058e57fd68367b029adc77f2a82928f1433daaf02c8c279cb2d13556c8804d7' '62496f9ca788996181ef145f96ad26291282fcc3fb95cdc04080dcf84365be33' '7fd8e776209dac98627453fda754bdf9aff4a09f27cb0b3766d7983612eb3c74' 'de5140936bad5c6c31f7a1b7d20d3937353cf6e26d2d9bcbbe8930db8cbfc397' '19661ec0d39f9663452b34433214c755179894528bf73a42f6ba52ccf572832a' 'cd225e86d72eaf6c31ef3d7b20df397f4cc44ddd04389850691292cdf292b204' - '49262ce4a8089fa70275aad742fc914baa28d9c384f710c9a62f64796d13e104') + '49262ce4a8089fa70275aad742fc914baa28d9c384f710c9a62f64796d13e104' + 'bdc60c83cd5fbf9912f9201d6e4fe3c84fe5f634e6823bd8e78264ad606b3a9e') export KBUILD_BUILD_HOST=archlinux export KBUILD_BUILD_USER=$pkgbase diff --git a/linux58-rc-tkg/customization.cfg b/linux58-rc-tkg/customization.cfg index f74c90f..24a8f62 100644 --- a/linux58-rc-tkg/customization.cfg +++ b/linux58-rc-tkg/customization.cfg @@ -77,6 +77,9 @@ _ftracedisable="false" # Set to "true" to disable NUMA, lowering overhead, but breaking CUDA/NvEnc on Nvidia equipped systems - Kernel default is "false" _numadisable="false" +# Set to "true" to enable misc additions - May contain temporary fixes pending upstream or changes that can break on non-Arch - Kernel default is "true" +_misc_adds="true" + # Set to "1" to use CattaRappa mode (enabling full tickless), "2" for tickless idle only, or "0" for periodic ticks. # Full tickless can give higher performances in various cases but, depending on hardware, lower consistency. Just tickless idle can perform better on some platforms (mostly AMD based). _tickless="" diff --git a/linux58-rc-tkg/linux58-tkg-config/prepare b/linux58-rc-tkg/linux58-tkg-config/prepare index 1438874..61fef59 100644 --- a/linux58-rc-tkg/linux58-tkg-config/prepare +++ b/linux58-rc-tkg/linux58-tkg-config/prepare @@ -28,6 +28,11 @@ _tkg_srcprep() { msg2 "Applying glitched base patch" patch -Np1 -i ../0003-glitched-base.patch + if [ "$_misc_adds" = "true" ]; then + msg2 "Applying misc additions patch" + patch -Np1 -i ../0012-misc-additions.patch + fi + if [ "${_cpusched}" == "MuQSS" ]; then # MuQSS patch -Np1 -i ../0004-5.8-ck1.patch diff --git a/linux58-rc-tkg/linux58-tkg-patches/0003-glitched-base.patch b/linux58-rc-tkg/linux58-tkg-patches/0003-glitched-base.patch index 9bdb32f..3fb6935 100644 --- a/linux58-rc-tkg/linux58-tkg-patches/0003-glitched-base.patch +++ b/linux58-rc-tkg/linux58-tkg-patches/0003-glitched-base.patch @@ -100,30 +100,6 @@ index 4f32c4062fb6..c0bf039e1b40 100644 } sgid_addr, dgid_addr; int ret; -diff --git a/drivers/tty/Kconfig b/drivers/tty/Kconfig -index 0840d27381ea..73aba9a31064 100644 ---- a/drivers/tty/Kconfig -+++ b/drivers/tty/Kconfig -@@ -75,6 +75,19 @@ config VT_CONSOLE_SLEEP - def_bool y - depends on VT_CONSOLE && PM_SLEEP - -+config NR_TTY_DEVICES -+ int "Maximum tty device number" -+ depends on VT -+ range 12 63 -+ default 63 -+ help -+ This option is used to change the number of tty devices in /dev. -+ The default value is 63. The lowest number you can set is 12, -+ 63 is also the upper limit so we don't overrun the serial -+ consoles. -+ -+ If unsure, say 63. -+ - config HW_CONSOLE - bool - depends on VT && !UML diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 79226ca8f80f..2a30060e7e1d 100644 --- a/include/linux/blkdev.h @@ -140,37 +116,6 @@ index 79226ca8f80f..2a30060e7e1d 100644 /* Must be consistent with blk_mq_poll_stats_bkt() */ #define BLK_MQ_POLL_STATS_BKTS 16 -diff --git a/include/uapi/linux/vt.h b/include/uapi/linux/vt.h -index e9d39c48520a..3bceead8da40 100644 ---- a/include/uapi/linux/vt.h -+++ b/include/uapi/linux/vt.h -@@ -3,12 +3,25 @@ - #define _UAPI_LINUX_VT_H - - -+/* -+ * We will make this definition solely for the purpose of making packages -+ * such as splashutils build, because they can not understand that -+ * NR_TTY_DEVICES is defined in the kernel configuration. -+ */ -+#ifndef CONFIG_NR_TTY_DEVICES -+#define CONFIG_NR_TTY_DEVICES 63 -+#endif -+ - /* - * These constants are also useful for user-level apps (e.g., VC - * resizing). - */ - #define MIN_NR_CONSOLES 1 /* must be at least 1 */ --#define MAX_NR_CONSOLES 63 /* serial lines start at 64 */ -+/* -+ * NR_TTY_DEVICES: -+ * Value MUST be at least 12 and must never be higher then 63 -+ */ -+#define MAX_NR_CONSOLES CONFIG_NR_TTY_DEVICES /* serial lines start above this */ - /* Note: the ioctl VT_GETSTATE does not work for - consoles 16 and higher (since it returns a short) */ - diff --git a/init/Kconfig b/init/Kconfig index 041f3a022122..5ed70eb1ad3a 100644 --- a/init/Kconfig diff --git a/linux58-rc-tkg/linux58-tkg-patches/0012-misc-additions.patch b/linux58-rc-tkg/linux58-tkg-patches/0012-misc-additions.patch new file mode 100644 index 0000000..33f5502 --- /dev/null +++ b/linux58-rc-tkg/linux58-tkg-patches/0012-misc-additions.patch @@ -0,0 +1,55 @@ +diff --git a/drivers/tty/Kconfig b/drivers/tty/Kconfig +index 0840d27381ea..73aba9a31064 100644 +--- a/drivers/tty/Kconfig ++++ b/drivers/tty/Kconfig +@@ -75,6 +75,19 @@ config VT_CONSOLE_SLEEP + def_bool y + depends on VT_CONSOLE && PM_SLEEP + ++config NR_TTY_DEVICES ++ int "Maximum tty device number" ++ depends on VT ++ range 12 63 ++ default 63 ++ ---help--- ++ This option is used to change the number of tty devices in /dev. ++ The default value is 63. The lowest number you can set is 12, ++ 63 is also the upper limit so we don't overrun the serial ++ consoles. ++ ++ If unsure, say 63. ++ + config HW_CONSOLE + bool + depends on VT && !UML +diff --git a/include/uapi/linux/vt.h b/include/uapi/linux/vt.h +index e9d39c48520a..3bceead8da40 100644 +--- a/include/uapi/linux/vt.h ++++ b/include/uapi/linux/vt.h +@@ -3,12 +3,25 @@ + #define _UAPI_LINUX_VT_H + + ++/* ++ * We will make this definition solely for the purpose of making packages ++ * such as splashutils build, because they can not understand that ++ * NR_TTY_DEVICES is defined in the kernel configuration. ++ */ ++#ifndef CONFIG_NR_TTY_DEVICES ++#define CONFIG_NR_TTY_DEVICES 63 ++#endif ++ + /* + * These constants are also useful for user-level apps (e.g., VC + * resizing). + */ + #define MIN_NR_CONSOLES 1 /* must be at least 1 */ +-#define MAX_NR_CONSOLES 63 /* serial lines start at 64 */ ++/* ++ * NR_TTY_DEVICES: ++ * Value MUST be at least 12 and must never be higher then 63 ++ */ ++#define MAX_NR_CONSOLES CONFIG_NR_TTY_DEVICES /* serial lines start above this */ + /* Note: the ioctl VT_GETSTATE does not work for + consoles 16 and higher (since it returns a short) */ +