From a5dea4f2300de846d3d9967ffdfd3b3bea4e8d70 Mon Sep 17 00:00:00 2001 From: David P Date: Mon, 27 Apr 2020 18:24:44 -0400 Subject: rmpkg: kernels/linux-libre-xtreme Reason: Linux-libre{-hardened} enables all LSM by default in i686 and x86_64 since a long time. Although it kinda made sense because it had AppArmor enabled by default, it's not worth to maintain it since anyone can enable it by passing a kernel parameter, as explained in the AppArmor page in ArchWiki. This isn't the case for armv7h, but will see if users want AppArmor for ARM in the future. Signed-off-by: David P --- ...RM-atags-add-support-for-Marvell-s-u-boot.patch | 51 - ...ctl-and-CONFIG-to-disallow-unprivileged-C.patch | 132 - ...gadget-no-TTY-hangup-on-USB-disconnect-WI.patch | 39 - ...dt-retrieve-MAC-addresses-from-Marvell-bo.patch | 38 - ...02-fix-Atmel-maXTouch-touchscreen-support.patch | 37 - ...cie-restore-support-for-Killer-Qu-C0-NICs.patch | 42 - .../0003-SMILE-Plug-device-tree-file.patch | 209 - ...PageReserved-manipulation-from-drm_pci_al.patch | 92 - ...rialise-i915_active_acquire-with-__active.patch | 79 - .../0004-fix-mvsdio-eMMC-timing.patch | 38 - ...m-Take-runtime-pm-wakeref-prior-to-unbind.patch | 130 - ...x-Allow-mac-address-to-be-set-as-a-parame.patch | 96 - ...15-gem-Avoid-parking-the-vma-as-we-unbind.patch | 63 - .../0006-set-default-cubietruck-led-triggers.patch | 33 - ...15-gem-Try-to-flush-pending-unbind-events.patch | 64 - ...odroid-set-higher-minimum-buck2-regulator.patch | 30 - .../0008-ARM-dove-enable-ethernet-on-D3Plug.patch | 31 - ...m-Reinitialise-the-local-list-before-repe.patch | 34 - .../0009-USB-Armory-MkII-support.patch | 556 - ...d-a-simple-is-bound-check-before-unbindin.patch | 41 - ...8947-1-Fix-__arch_get_hw_counter-access-t.patch | 28 - .../0010-drm-i915-Introduce-a-vma.kref.patch | 252 - ...-t-send-GEO_TX_POWER_LIMIT-if-no-wgds-tab.patch | 152 - kernels/linux-libre-xtreme/PKGBUILD | 371 - kernels/linux-libre-xtreme/config.armv7h | 9710 ----------------- kernels/linux-libre-xtreme/config.i686 | 10574 ------------------ kernels/linux-libre-xtreme/config.x86_64 | 10581 ------------------- kernels/linux-libre-xtreme/linux-armv7h.preset | 14 - 28 files changed, 33517 deletions(-) delete mode 100644 kernels/linux-libre-xtreme/0001-ARM-atags-add-support-for-Marvell-s-u-boot.patch delete mode 100644 kernels/linux-libre-xtreme/0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch delete mode 100644 kernels/linux-libre-xtreme/0001-usb-serial-gadget-no-TTY-hangup-on-USB-disconnect-WI.patch delete mode 100644 kernels/linux-libre-xtreme/0002-ARM-atags-fdt-retrieve-MAC-addresses-from-Marvell-bo.patch delete mode 100644 kernels/linux-libre-xtreme/0002-fix-Atmel-maXTouch-touchscreen-support.patch delete mode 100644 kernels/linux-libre-xtreme/0002-iwlwifi-pcie-restore-support-for-Killer-Qu-C0-NICs.patch delete mode 100644 kernels/linux-libre-xtreme/0003-SMILE-Plug-device-tree-file.patch delete mode 100644 kernels/linux-libre-xtreme/0003-drm-Remove-PageReserved-manipulation-from-drm_pci_al.patch delete mode 100644 kernels/linux-libre-xtreme/0004-drm-i915-Serialise-i915_active_acquire-with-__active.patch delete mode 100644 kernels/linux-libre-xtreme/0004-fix-mvsdio-eMMC-timing.patch delete mode 100644 kernels/linux-libre-xtreme/0005-drm-i915-gem-Take-runtime-pm-wakeref-prior-to-unbind.patch delete mode 100644 kernels/linux-libre-xtreme/0005-net-smsc95xx-Allow-mac-address-to-be-set-as-a-parame.patch delete mode 100644 kernels/linux-libre-xtreme/0006-drm-i915-gem-Avoid-parking-the-vma-as-we-unbind.patch delete mode 100644 kernels/linux-libre-xtreme/0006-set-default-cubietruck-led-triggers.patch delete mode 100644 kernels/linux-libre-xtreme/0007-drm-i915-gem-Try-to-flush-pending-unbind-events.patch delete mode 100644 kernels/linux-libre-xtreme/0007-exynos4412-odroid-set-higher-minimum-buck2-regulator.patch delete mode 100644 kernels/linux-libre-xtreme/0008-ARM-dove-enable-ethernet-on-D3Plug.patch delete mode 100644 kernels/linux-libre-xtreme/0008-drm-i915-gem-Reinitialise-the-local-list-before-repe.patch delete mode 100644 kernels/linux-libre-xtreme/0009-USB-Armory-MkII-support.patch delete mode 100644 kernels/linux-libre-xtreme/0009-drm-i915-Add-a-simple-is-bound-check-before-unbindin.patch delete mode 100644 kernels/linux-libre-xtreme/0010-Revert-ARM-8947-1-Fix-__arch_get_hw_counter-access-t.patch delete mode 100644 kernels/linux-libre-xtreme/0010-drm-i915-Introduce-a-vma.kref.patch delete mode 100644 kernels/linux-libre-xtreme/0011-iwlwifi-don-t-send-GEO_TX_POWER_LIMIT-if-no-wgds-tab.patch delete mode 100644 kernels/linux-libre-xtreme/PKGBUILD delete mode 100644 kernels/linux-libre-xtreme/config.armv7h delete mode 100644 kernels/linux-libre-xtreme/config.i686 delete mode 100644 kernels/linux-libre-xtreme/config.x86_64 delete mode 100644 kernels/linux-libre-xtreme/linux-armv7h.preset (limited to 'kernels/linux-libre-xtreme') diff --git a/kernels/linux-libre-xtreme/0001-ARM-atags-add-support-for-Marvell-s-u-boot.patch b/kernels/linux-libre-xtreme/0001-ARM-atags-add-support-for-Marvell-s-u-boot.patch deleted file mode 100644 index 0d038219b..000000000 --- a/kernels/linux-libre-xtreme/0001-ARM-atags-add-support-for-Marvell-s-u-boot.patch +++ /dev/null @@ -1,51 +0,0 @@ -From 970026f1d5752c5d9f3d7f524b18ad5d81f7f436 Mon Sep 17 00:00:00 2001 -From: Willy Tarreau -Date: Sun, 2 Dec 2012 19:59:28 +0100 -Subject: [PATCH 01/10] ARM: atags: add support for Marvell's u-boot - -Marvell uses a specific atag in its u-boot which includes among other -information the MAC addresses for up to 4 network interfaces. - -Signed-off-by: Willy Tarreau ---- - arch/arm/include/uapi/asm/setup.h | 17 +++++++++++++++++ - 1 file changed, 17 insertions(+) - -diff --git a/arch/arm/include/uapi/asm/setup.h b/arch/arm/include/uapi/asm/setup.h -index 25ceda63b284..83578c54975b 100644 ---- a/arch/arm/include/uapi/asm/setup.h -+++ b/arch/arm/include/uapi/asm/setup.h -@@ -144,6 +144,18 @@ struct tag_memclk { - __u32 fmemclk; - }; - -+/* Marvell uboot parameters */ -+#define ATAG_MV_UBOOT 0x41000403 -+struct tag_mv_uboot { -+ __u32 uboot_version; -+ __u32 tclk; -+ __u32 sysclk; -+ __u32 isUsbHost; -+ __u8 macAddr[4][6]; -+ __u16 mtu[4]; -+ __u32 nand_ecc; -+}; -+ - struct tag { - struct tag_header hdr; - union { -@@ -166,6 +178,11 @@ struct tag { - * DC21285 specific - */ - struct tag_memclk memclk; -+ -+ /* -+ * Marvell specific -+ */ -+ struct tag_mv_uboot mv_uboot; - } u; - }; - --- -2.25.0 - diff --git a/kernels/linux-libre-xtreme/0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch b/kernels/linux-libre-xtreme/0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch deleted file mode 100644 index f2a08ca64..000000000 --- a/kernels/linux-libre-xtreme/0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch +++ /dev/null @@ -1,132 +0,0 @@ -From b7ea2fa503702cbbd1eb2d38371b5650aab88666 Mon Sep 17 00:00:00 2001 -From: "Jan Alexander Steffens (heftig)" -Date: Mon, 16 Sep 2019 04:53:20 +0200 -Subject: [PATCH 01/11] ZEN: Add sysctl and CONFIG to disallow unprivileged - CLONE_NEWUSER - -Our default behavior continues to match the vanilla kernel. ---- - init/Kconfig | 16 ++++++++++++++++ - kernel/fork.c | 15 +++++++++++++++ - kernel/sysctl.c | 12 ++++++++++++ - kernel/user_namespace.c | 7 +++++++ - 4 files changed, 50 insertions(+) - -diff --git a/init/Kconfig b/init/Kconfig -index 74297c392dd4..44221292a9eb 100644 ---- a/init/Kconfig -+++ b/init/Kconfig -@@ -1102,6 +1102,22 @@ config USER_NS - - If unsure, say N. - -+config USER_NS_UNPRIVILEGED -+ bool "Allow unprivileged users to create namespaces" -+ default y -+ depends on USER_NS -+ help -+ When disabled, unprivileged users will not be able to create -+ new namespaces. Allowing users to create their own namespaces -+ has been part of several recent local privilege escalation -+ exploits, so if you need user namespaces but are -+ paranoid^Wsecurity-conscious you want to disable this. -+ -+ This setting can be overridden at runtime via the -+ kernel.unprivileged_userns_clone sysctl. -+ -+ If unsure, say Y. -+ - config PID_NS - bool "PID Namespaces" - default y -diff --git a/kernel/fork.c b/kernel/fork.c -index 080809560072..1cb7b827b57b 100644 ---- a/kernel/fork.c -+++ b/kernel/fork.c -@@ -106,6 +106,11 @@ - - #define CREATE_TRACE_POINTS - #include -+#ifdef CONFIG_USER_NS -+extern int unprivileged_userns_clone; -+#else -+#define unprivileged_userns_clone 0 -+#endif - - /* - * Minimum number of threads to boot the kernel -@@ -1843,6 +1848,10 @@ static __latent_entropy struct task_struct *copy_process( - if ((clone_flags & (CLONE_NEWUSER|CLONE_FS)) == (CLONE_NEWUSER|CLONE_FS)) - return ERR_PTR(-EINVAL); - -+ if ((clone_flags & CLONE_NEWUSER) && !unprivileged_userns_clone) -+ if (!capable(CAP_SYS_ADMIN)) -+ return ERR_PTR(-EPERM); -+ - /* - * Thread groups must share signals as well, and detached threads - * can only be started up within the thread group. -@@ -2923,6 +2932,12 @@ int ksys_unshare(unsigned long unshare_flags) - if (unshare_flags & CLONE_NEWNS) - unshare_flags |= CLONE_FS; - -+ if ((unshare_flags & CLONE_NEWUSER) && !unprivileged_userns_clone) { -+ err = -EPERM; -+ if (!capable(CAP_SYS_ADMIN)) -+ goto bad_unshare_out; -+ } -+ - err = check_unshare_flags(unshare_flags); - if (err) - goto bad_unshare_out; -diff --git a/kernel/sysctl.c b/kernel/sysctl.c -index 70665934d53e..9797869ed829 100644 ---- a/kernel/sysctl.c -+++ b/kernel/sysctl.c -@@ -110,6 +110,9 @@ extern int core_uses_pid; - extern char core_pattern[]; - extern unsigned int core_pipe_limit; - #endif -+#ifdef CONFIG_USER_NS -+extern int unprivileged_userns_clone; -+#endif - extern int pid_max; - extern int pid_max_min, pid_max_max; - extern int percpu_pagelist_fraction; -@@ -546,6 +549,15 @@ static struct ctl_table kern_table[] = { - .proc_handler = proc_dointvec, - }, - #endif -+#ifdef CONFIG_USER_NS -+ { -+ .procname = "unprivileged_userns_clone", -+ .data = &unprivileged_userns_clone, -+ .maxlen = sizeof(int), -+ .mode = 0644, -+ .proc_handler = proc_dointvec, -+ }, -+#endif - #ifdef CONFIG_PROC_SYSCTL - { - .procname = "tainted", -diff --git a/kernel/user_namespace.c b/kernel/user_namespace.c -index 8eadadc478f9..c36ecd19562c 100644 ---- a/kernel/user_namespace.c -+++ b/kernel/user_namespace.c -@@ -21,6 +21,13 @@ - #include - #include - -+/* sysctl */ -+#ifdef CONFIG_USER_NS_UNPRIVILEGED -+int unprivileged_userns_clone = 1; -+#else -+int unprivileged_userns_clone; -+#endif -+ - static struct kmem_cache *user_ns_cachep __read_mostly; - static DEFINE_MUTEX(userns_state_mutex); - --- -2.26.0 - diff --git a/kernels/linux-libre-xtreme/0001-usb-serial-gadget-no-TTY-hangup-on-USB-disconnect-WI.patch b/kernels/linux-libre-xtreme/0001-usb-serial-gadget-no-TTY-hangup-on-USB-disconnect-WI.patch deleted file mode 100644 index e9de435fd..000000000 --- a/kernels/linux-libre-xtreme/0001-usb-serial-gadget-no-TTY-hangup-on-USB-disconnect-WI.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 716120e8010a7f400c6bed7384000e95e1465c94 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Ky=C3=B6sti=20M=C3=A4lkki?= -Date: Mon, 26 Aug 2013 19:19:44 +0300 -Subject: [PATCH 1/2] usb serial gadget: no TTY hangup on USB disconnect [WIP] -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -We may want to maintain the TTY over USB disconnects. - -This is useful when we have a terminal console to a host which -power-cycles or for other reasons resets the USB host controller. - -Signed-off-by: Kyösti Mälkki ---- - drivers/usb/gadget/function/u_serial.c | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/drivers/usb/gadget/function/u_serial.c b/drivers/usb/gadget/function/u_serial.c -index b369292..d156a28 100644 ---- a/drivers/usb/gadget/function/u_serial.c -+++ b/drivers/usb/gadget/function/u_serial.c -@@ -1258,8 +1258,13 @@ void gserial_disconnect(struct gserial *gser) - gser->ioport = NULL; - if (port->port.count > 0 || port->openclose) { - wake_up_interruptible(&port->drain_wait); -+#if 0 - if (port->port.tty) - tty_hangup(port->port.tty); -+#else -+ if (port->port.tty) -+ stop_tty(port->port.tty); -+#endif - } - spin_unlock_irqrestore(&port->port_lock, flags); - --- -1.8.1.1 - diff --git a/kernels/linux-libre-xtreme/0002-ARM-atags-fdt-retrieve-MAC-addresses-from-Marvell-bo.patch b/kernels/linux-libre-xtreme/0002-ARM-atags-fdt-retrieve-MAC-addresses-from-Marvell-bo.patch deleted file mode 100644 index 7e8f17fb2..000000000 --- a/kernels/linux-libre-xtreme/0002-ARM-atags-fdt-retrieve-MAC-addresses-from-Marvell-bo.patch +++ /dev/null @@ -1,38 +0,0 @@ -From ba8c3d62a09ad9582879577a1a71f36213cdc179 Mon Sep 17 00:00:00 2001 -From: Willy Tarreau -Date: Sun, 2 Dec 2012 19:56:58 +0100 -Subject: [PATCH 02/10] ARM: atags/fdt: retrieve MAC addresses from Marvell - boot loader - -The atags are parsed and if a Marvell atag is found, up to 4 MAC -addresses are extracted there and assigned to node aliases eth0..3 -with the name "mac-address". - -This was tested on my Mirabox and the two NICs had their correct -address set. - -Signed-off-by: Willy Tarreau ---- - arch/arm/boot/compressed/atags_to_fdt.c | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git a/arch/arm/boot/compressed/atags_to_fdt.c b/arch/arm/boot/compressed/atags_to_fdt.c -index 64c49747f8a3..60cd5e5bac93 100644 ---- a/arch/arm/boot/compressed/atags_to_fdt.c -+++ b/arch/arm/boot/compressed/atags_to_fdt.c -@@ -203,6 +203,12 @@ int atags_to_fdt(void *atag_list, void *fdt, int total_space) - hex_str(serno, atag->u.serialnr.high); - hex_str(serno+8, atag->u.serialnr.low); - setprop_string(fdt, "/", "serial-number", serno); -+ } else if (atag->hdr.tag == ATAG_MV_UBOOT) { -+ /* This ATAG provides up to 4 MAC addresses */ -+ setprop(fdt, "eth0", "mac-address", atag->u.mv_uboot.macAddr[0], 6); -+ setprop(fdt, "eth1", "mac-address", atag->u.mv_uboot.macAddr[1], 6); -+ setprop(fdt, "eth2", "mac-address", atag->u.mv_uboot.macAddr[2], 6); -+ setprop(fdt, "eth3", "mac-address", atag->u.mv_uboot.macAddr[3], 6); - } - } - --- -2.25.0 - diff --git a/kernels/linux-libre-xtreme/0002-fix-Atmel-maXTouch-touchscreen-support.patch b/kernels/linux-libre-xtreme/0002-fix-Atmel-maXTouch-touchscreen-support.patch deleted file mode 100644 index 5ad26fc9e..000000000 --- a/kernels/linux-libre-xtreme/0002-fix-Atmel-maXTouch-touchscreen-support.patch +++ /dev/null @@ -1,37 +0,0 @@ -From ab8cc1b2dc1b716d5c08f72dacbe1eded269f304 Mon Sep 17 00:00:00 2001 -From: André Silva -Date: Tue, 22 Mar 2016 17:58:59 -0300 -Subject: [PATCH 2/2] fix Atmel maXTouch touchscreen support - -The Atmel maXTouch touchscreen works with Linux-libre 3.13-gnu, -but not with the current longterm and mainline kernels in -Parabola. - -Now it needs to load nonfree firmware in mxt_initialize(), -which is in drivers/input/touchscreen/atmel_mxt_ts.c, and the -atmel_mxt_ts driver fails to work. - -This driver works if changing reject_firmware_nowait to -request_firmware_nowait in atmel_mxt_ts.c. This line is -requesting the file named MXT_CFG_NAME, and it's a config file, -not the firmware blob. - -Signed-off-by: André Silva -Signed-off-by: mytbk ---- - drivers/input/touchscreen/atmel_mxt_ts.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c -index 726a83e..d818834 100644 ---- a/drivers/input/touchscreen/atmel_mxt_ts.c -+++ b/drivers/input/touchscreen/atmel_mxt_ts.c -@@ -1989,7 +1989,7 @@ static int mxt_initialize(struct mxt_data *data) - if (error) - goto err_free_object_table; - -- error = reject_firmware_nowait(THIS_MODULE, true, MXT_CFG_NAME, -+ error = request_firmware_nowait(THIS_MODULE, true, MXT_CFG_NAME, - &client->dev, GFP_KERNEL, data, - mxt_config_cb); - if (error) { diff --git a/kernels/linux-libre-xtreme/0002-iwlwifi-pcie-restore-support-for-Killer-Qu-C0-NICs.patch b/kernels/linux-libre-xtreme/0002-iwlwifi-pcie-restore-support-for-Killer-Qu-C0-NICs.patch deleted file mode 100644 index c729cbd74..000000000 --- a/kernels/linux-libre-xtreme/0002-iwlwifi-pcie-restore-support-for-Killer-Qu-C0-NICs.patch +++ /dev/null @@ -1,42 +0,0 @@ -From 09ad81782f04168200af2f7dc4345830bfee9eef Mon Sep 17 00:00:00 2001 -From: "Jan Alexander Steffens (heftig)" -Date: Tue, 24 Dec 2019 06:16:39 +0100 -Subject: [PATCH 02/11] iwlwifi: pcie: restore support for Killer Qu C0 NICs - -Commit 809805a820c6 ("iwlwifi: pcie: move some cfg mangling from -trans_pcie_alloc to probe") refactored the cfg mangling. Unfortunately, -in this process the lines which picked the right cfg for Killer Qu C0 -NICs after C0 detection were lost. These lines were added by commit -b9500577d361 ("iwlwifi: pcie: handle switching killer Qu B0 NICs to -C0"). - -I suspect this is more of the "merge damage" which commit 7cded5658329 -("iwlwifi: pcie: fix merge damage on making QnJ exclusive") talks about. - -Restore the missing lines so the driver loads the right firmware for -these NICs. - -Fixes: 809805a820c6 ("iwlwifi: pcie: move some cfg mangling from trans_pcie_alloc to probe") -Signed-off-by: Jan Alexander Steffens (heftig) ---- - drivers/net/wireless/intel/iwlwifi/pcie/drv.c | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c -index b0b7eca1754e..de62a6dc4e73 100644 ---- a/drivers/net/wireless/intel/iwlwifi/pcie/drv.c -+++ b/drivers/net/wireless/intel/iwlwifi/pcie/drv.c -@@ -1107,6 +1107,10 @@ static int iwl_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) - cfg = &iwl9560_2ac_cfg_qu_c0_jf_b0; - else if (cfg == &iwl9560_2ac_160_cfg_qu_b0_jf_b0) - cfg = &iwl9560_2ac_160_cfg_qu_c0_jf_b0; -+ else if (cfg == &killer1650s_2ax_cfg_qu_b0_hr_b0) -+ cfg = &killer1650s_2ax_cfg_qu_c0_hr_b0; -+ else if (cfg == &killer1650i_2ax_cfg_qu_b0_hr_b0) -+ cfg = &killer1650i_2ax_cfg_qu_c0_hr_b0; - } - - /* same thing for QuZ... */ --- -2.26.0 - diff --git a/kernels/linux-libre-xtreme/0003-SMILE-Plug-device-tree-file.patch b/kernels/linux-libre-xtreme/0003-SMILE-Plug-device-tree-file.patch deleted file mode 100644 index 683074a2f..000000000 --- a/kernels/linux-libre-xtreme/0003-SMILE-Plug-device-tree-file.patch +++ /dev/null @@ -1,209 +0,0 @@ -From 2fd36c0086abd28bbbc98d4d147939c0a588c9e2 Mon Sep 17 00:00:00 2001 -From: Kevin Mihelich -Date: Fri, 5 Sep 2014 15:41:19 -0600 -Subject: [PATCH 03/10] SMILE Plug device tree file - -This adds a dts file for the SMILE Plug, which only differs from the Mirabox -dts with the LED definitions. - -Signed-off-by: Kevin Mihelich ---- - arch/arm/boot/dts/Makefile | 1 + - arch/arm/boot/dts/armada-370-smileplug.dts | 173 +++++++++++++++++++++ - 2 files changed, 174 insertions(+) - create mode 100644 arch/arm/boot/dts/armada-370-smileplug.dts - -diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile -index 08011dc8c7a6..9f10323ecfde 100644 ---- a/arch/arm/boot/dts/Makefile -+++ b/arch/arm/boot/dts/Makefile -@@ -1227,6 +1227,7 @@ dtb-$(CONFIG_MACH_ARMADA_370) += \ - armada-370-db.dtb \ - armada-370-dlink-dns327l.dtb \ - armada-370-mirabox.dtb \ -+ armada-370-smileplug.dtb \ - armada-370-netgear-rn102.dtb \ - armada-370-netgear-rn104.dtb \ - armada-370-rd.dtb \ -diff --git a/arch/arm/boot/dts/armada-370-smileplug.dts b/arch/arm/boot/dts/armada-370-smileplug.dts -new file mode 100644 -index 000000000000..d01308ab848b ---- /dev/null -+++ b/arch/arm/boot/dts/armada-370-smileplug.dts -@@ -0,0 +1,173 @@ -+/* -+ * Device Tree file for Marvell SMILE Plug -+ * -+ * Kevin Mihelich -+ * Gregory CLEMENT -+ * -+ * This file is licensed under the terms of the GNU General Public -+ * License version 2. This program is licensed "as is" without any -+ * warranty of any kind, whether express or implied. -+ */ -+ -+/dts-v1/; -+#include -+#include "armada-370.dtsi" -+ -+/ { -+ model = "Marvell SMILE Plug"; -+ compatible = "marvell,smileplug", "marvell,armada370", "marvell,armada-370-xp"; -+ -+ chosen { -+ bootargs = "console=ttyS0,115200 earlyprintk"; -+ }; -+ -+ memory { -+ device_type = "memory"; -+ reg = <0x00000000 0x20000000>; /* 512 MB */ -+ }; -+ -+ soc { -+ ranges = ; -+ -+ pcie-controller { -+ status = "okay"; -+ -+ /* Internal mini-PCIe connector */ -+ pcie@1,0 { -+ /* Port 0, Lane 0 */ -+ status = "okay"; -+ }; -+ -+ /* Connected on the PCB to a USB 3.0 XHCI controller */ -+ pcie@2,0 { -+ /* Port 1, Lane 0 */ -+ status = "okay"; -+ }; -+ }; -+ -+ internal-regs { -+ serial@12000 { -+ status = "okay"; -+ }; -+ timer@20300 { -+ clock-frequency = <600000000>; -+ status = "okay"; -+ }; -+ -+ gpio_leds { -+ compatible = "gpio-leds"; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&smile_led_pins>; -+ -+ red_eyes_led { -+ label = "smileplug:red:eyes"; -+ gpios = <&gpio1 31 0>; -+ default-state = "off"; -+ }; -+ -+ green_eyes_led { -+ label = "smileplug:green:eyes"; -+ gpios = <&gpio2 0 0>; -+ linux,default-trigger = "default-on"; -+ }; -+ -+ red_smile_led { -+ label = "smileplug:red:smile"; -+ gpios = <&gpio1 15 0>; -+ default-state = "off"; -+ }; -+ -+ green_smile_led { -+ label = "smileplug:green:smile"; -+ gpios = <&gpio1 27 0>; -+ linux,default-trigger = "default-on"; -+ }; -+ }; -+ -+ mdio { -+ pinctrl-0 = <&mdio_pins>; -+ pinctrl-names = "default"; -+ phy0: ethernet-phy@0 { -+ reg = <0>; -+ }; -+ -+ phy1: ethernet-phy@1 { -+ reg = <1>; -+ }; -+ }; -+ ethernet@70000 { -+ pinctrl-0 = <&ge0_rgmii_pins>; -+ pinctrl-names = "default"; -+ status = "okay"; -+ phy = <&phy0>; -+ phy-mode = "rgmii-id"; -+ }; -+ ethernet@74000 { -+ pinctrl-0 = <&ge1_rgmii_pins>; -+ pinctrl-names = "default"; -+ status = "okay"; -+ phy = <&phy1>; -+ phy-mode = "rgmii-id"; -+ }; -+ -+ mvsdio@d4000 { -+ pinctrl-0 = <&sdio_pins3>; -+ pinctrl-names = "default"; -+ status = "okay"; -+ /* -+ * No CD or WP GPIOs: SDIO interface used for -+ * Wifi/Bluetooth chip -+ */ -+ broken-cd; -+ }; -+ -+ usb@50000 { -+ status = "okay"; -+ }; -+ -+ usb@51000 { -+ status = "okay"; -+ }; -+ -+ i2c@11000 { -+ status = "okay"; -+ clock-frequency = <100000>; -+ pca9505: pca9505@25 { -+ compatible = "nxp,pca9505"; -+ gpio-controller; -+ #gpio-cells = <2>; -+ reg = <0x25>; -+ }; -+ }; -+ -+ nand@d0000 { -+ status = "okay"; -+ num-cs = <1>; -+ marvell,nand-keep-config; -+ marvell,nand-enable-arbiter; -+ nand-on-flash-bbt; -+ -+ partition@0 { -+ label = "U-Boot"; -+ reg = <0 0x400000>; -+ }; -+ partition@400000 { -+ label = "Linux"; -+ reg = <0x400000 0x400000>; -+ }; -+ partition@800000 { -+ label = "Filesystem"; -+ reg = <0x800000 0x3f800000>; -+ }; -+ }; -+ }; -+ }; -+}; -+ -+&pinctrl { -+ smile_led_pins: smile-led-pins { -+ marvell,pins = "mpp63", "mpp64", "mpp47", "mpp59"; -+ marvell,function = "gpio"; -+ }; -+}; --- -2.25.0 - diff --git a/kernels/linux-libre-xtreme/0003-drm-Remove-PageReserved-manipulation-from-drm_pci_al.patch b/kernels/linux-libre-xtreme/0003-drm-Remove-PageReserved-manipulation-from-drm_pci_al.patch deleted file mode 100644 index 9ce302035..000000000 --- a/kernels/linux-libre-xtreme/0003-drm-Remove-PageReserved-manipulation-from-drm_pci_al.patch +++ /dev/null @@ -1,92 +0,0 @@ -From 7e8f0d17203665f1e6cb110ecbfc90e9ebed8c28 Mon Sep 17 00:00:00 2001 -From: Chris Wilson -Date: Sun, 2 Feb 2020 17:16:31 +0000 -Subject: [PATCH 03/11] drm: Remove PageReserved manipulation from - drm_pci_alloc - -drm_pci_alloc/drm_pci_free are very thin wrappers around the core dma -facilities, and we have no special reason within the drm layer to behave -differently. In particular, since - -commit de09d31dd38a50fdce106c15abd68432eebbd014 -Author: Kirill A. Shutemov -Date: Fri Jan 15 16:51:42 2016 -0800 - - page-flags: define PG_reserved behavior on compound pages - - As far as I can see there's no users of PG_reserved on compound pages. - Let's use PF_NO_COMPOUND here. - -it has been illegal to combine GFP_COMP with SetPageReserved, so lets -stop doing both and leave the dma layer to its own devices. - -Reported-by: Taketo Kabe -Bug: https://gitlab.freedesktop.org/drm/intel/issues/1027 -Fixes: de09d31dd38a ("page-flags: define PG_reserved behavior on compound pages") -Signed-off-by: Chris Wilson -Cc: # v4.5+ -Reviewed-by: Alex Deucher -Link: https://patchwork.freedesktop.org/patch/msgid/20200202171635.4039044-1-chris@chris-wilson.co.uk ---- - drivers/gpu/drm/drm_pci.c | 23 ++--------------------- - 1 file changed, 2 insertions(+), 21 deletions(-) - -diff --git a/drivers/gpu/drm/drm_pci.c b/drivers/gpu/drm/drm_pci.c -index a86a3ab2771c..235729f4aadb 100644 ---- a/drivers/gpu/drm/drm_pci.c -+++ b/drivers/gpu/drm/drm_pci.c -@@ -51,8 +51,6 @@ - drm_dma_handle_t *drm_pci_alloc(struct drm_device * dev, size_t size, size_t align) - { - drm_dma_handle_t *dmah; -- unsigned long addr; -- size_t sz; - - /* pci_alloc_consistent only guarantees alignment to the smallest - * PAGE_SIZE order which is greater than or equal to the requested size. -@@ -68,20 +66,13 @@ drm_dma_handle_t *drm_pci_alloc(struct drm_device * dev, size_t size, size_t ali - dmah->size = size; - dmah->vaddr = dma_alloc_coherent(&dev->pdev->dev, size, - &dmah->busaddr, -- GFP_KERNEL | __GFP_COMP); -+ GFP_KERNEL); - - if (dmah->vaddr == NULL) { - kfree(dmah); - return NULL; - } - -- /* XXX - Is virt_to_page() legal for consistent mem? */ -- /* Reserve */ -- for (addr = (unsigned long)dmah->vaddr, sz = size; -- sz > 0; addr += PAGE_SIZE, sz -= PAGE_SIZE) { -- SetPageReserved(virt_to_page((void *)addr)); -- } -- - return dmah; - } - -@@ -94,19 +85,9 @@ EXPORT_SYMBOL(drm_pci_alloc); - */ - void __drm_legacy_pci_free(struct drm_device * dev, drm_dma_handle_t * dmah) - { -- unsigned long addr; -- size_t sz; -- -- if (dmah->vaddr) { -- /* XXX - Is virt_to_page() legal for consistent mem? */ -- /* Unreserve */ -- for (addr = (unsigned long)dmah->vaddr, sz = dmah->size; -- sz > 0; addr += PAGE_SIZE, sz -= PAGE_SIZE) { -- ClearPageReserved(virt_to_page((void *)addr)); -- } -+ if (dmah->vaddr) - dma_free_coherent(&dev->pdev->dev, dmah->size, dmah->vaddr, - dmah->busaddr); -- } - } - - /** --- -2.26.0 - diff --git a/kernels/linux-libre-xtreme/0004-drm-i915-Serialise-i915_active_acquire-with-__active.patch b/kernels/linux-libre-xtreme/0004-drm-i915-Serialise-i915_active_acquire-with-__active.patch deleted file mode 100644 index 791b3ae6c..000000000 --- a/kernels/linux-libre-xtreme/0004-drm-i915-Serialise-i915_active_acquire-with-__active.patch +++ /dev/null @@ -1,79 +0,0 @@ -From bb4e672920c042aea805e1d47933e2f26b02fbd8 Mon Sep 17 00:00:00 2001 -From: Chris Wilson -Date: Thu, 5 Dec 2019 18:33:32 +0000 -Subject: [PATCH 04/11] drm/i915: Serialise i915_active_acquire() with - __active_retire() - -As __active_retire() does it's final atomic_dec() under the -ref->tree_lock spinlock, in order to prevent ourselves from reusing the -ref->cache and ref->tree as they are being destroyed, we need to -serialise with the retirement during i915_active_acquire(). - -[ +0.000005] kernel BUG at drivers/gpu/drm/i915/i915_active.c:157! -[ +0.000011] invalid opcode: 0000 [#1] SMP -[ +0.000004] CPU: 7 PID: 188 Comm: kworker/u16:4 Not tainted 5.4.0-rc8-03070-gac5e57322614 #89 -[ +0.000002] Hardware name: Razer Razer Blade Stealth 13 Late 2019/LY320, BIOS 1.02 09/10/2019 -[ +0.000082] Workqueue: events_unbound active_work [i915] -[ +0.000059] RIP: 0010:__active_retire+0x115/0x120 [i915] -[ +0.000003] Code: 75 28 48 8b 3d 8c 6e 1a 00 48 89 ee e8 e4 5f a5 c0 48 8b 44 24 10 65 48 33 04 25 28 00 00 00 75 0f 48 83 c4 18 5b 5d 41 5c c3 <0f> 0b 0f 0b 0f 0b e8 a0 90 87 c0 0f 1f 44 00 00 48 8b 3d 54 6e 1a -[ +0.000002] RSP: 0018:ffffb833003f7e48 EFLAGS: 00010286 -[ +0.000003] RAX: ffff8d6e8d726d00 RBX: ffff8d6f9db4e840 RCX: 0000000000000000 -[ +0.000001] RDX: ffffffff82605930 RSI: ffff8d6f9adc4908 RDI: ffff8d6e96cefe28 -[ +0.000002] RBP: ffff8d6e96cefe00 R08: 0000000000000000 R09: ffff8d6f9ffe9a50 -[ +0.000002] R10: 0000000000000048 R11: 0000000000000018 R12: ffff8d6f9adc4930 -[ +0.000001] R13: ffff8d6f9e04fb00 R14: 0000000000000000 R15: ffff8d6f9adc4988 -[ +0.000002] FS: 0000000000000000(0000) GS:ffff8d6f9ffc0000(0000) knlGS:0000000000000000 -[ +0.000002] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 -[ +0.000002] CR2: 000055eb5a34cf10 CR3: 000000018d609002 CR4: 0000000000760ee0 -[ +0.000002] PKRU: 55555554 -[ +0.000001] Call Trace: -[ +0.000010] process_one_work+0x1aa/0x350 -[ +0.000004] worker_thread+0x4d/0x3a0 -[ +0.000004] kthread+0xfb/0x130 -[ +0.000004] ? process_one_work+0x350/0x350 -[ +0.000003] ? kthread_park+0x90/0x90 -[ +0.000005] ret_from_fork+0x1f/0x40 - -Reported-by: Kenneth Graunke -Fixes: c9ad602feabe ("drm/i915: Split i915_active.mutex into an irq-safe spinlock for the rbtree") -Signed-off-by: Chris Wilson -Cc: Tvrtko Ursulin -Cc: Kenneth Graunke -Cc: Matthew Auld -Tested-by: Kenneth Graunke -Reviewed-by: Kenneth Graunke -Link: https://patchwork.freedesktop.org/patch/msgid/20191205183332.801237-1-chris@chris-wilson.co.uk ---- - drivers/gpu/drm/i915/i915_active.c | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) - -diff --git a/drivers/gpu/drm/i915/i915_active.c b/drivers/gpu/drm/i915/i915_active.c -index a19e7d89bc8a..378b52d1ab74 100644 ---- a/drivers/gpu/drm/i915/i915_active.c -+++ b/drivers/gpu/drm/i915/i915_active.c -@@ -91,10 +91,9 @@ static void debug_active_init(struct i915_active *ref) - - static void debug_active_activate(struct i915_active *ref) - { -- spin_lock_irq(&ref->tree_lock); -+ lockdep_assert_held(&ref->tree_lock); - if (!atomic_read(&ref->count)) /* before the first inc */ - debug_object_activate(ref, &active_debug_desc); -- spin_unlock_irq(&ref->tree_lock); - } - - static void debug_active_deactivate(struct i915_active *ref) -@@ -407,8 +406,10 @@ int i915_active_acquire(struct i915_active *ref) - if (!atomic_read(&ref->count) && ref->active) - err = ref->active(ref); - if (!err) { -+ spin_lock_irq(&ref->tree_lock); /* vs __active_retire() */ - debug_active_activate(ref); - atomic_inc(&ref->count); -+ spin_unlock_irq(&ref->tree_lock); - } - - mutex_unlock(&ref->mutex); --- -2.26.0 - diff --git a/kernels/linux-libre-xtreme/0004-fix-mvsdio-eMMC-timing.patch b/kernels/linux-libre-xtreme/0004-fix-mvsdio-eMMC-timing.patch deleted file mode 100644 index 81f90ebd9..000000000 --- a/kernels/linux-libre-xtreme/0004-fix-mvsdio-eMMC-timing.patch +++ /dev/null @@ -1,38 +0,0 @@ -From c49db8d7558931cf54a5e3ed4565ecbfda2a989a Mon Sep 17 00:00:00 2001 -From: Kevin Mihelich -Date: Fri, 5 Sep 2014 15:43:56 -0600 -Subject: [PATCH 04/10] fix mvsdio eMMC timing - -These changes from Globalscale change the MMC timing to allow the eMMC versions -of the Mirabox and SMILE Plug to work. - -Signed-off-by: Kevin Mihelich ---- - drivers/mmc/host/mvsdio.c | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/drivers/mmc/host/mvsdio.c b/drivers/mmc/host/mvsdio.c -index 74a0a7fbbf7f..92eadb116762 100644 ---- a/drivers/mmc/host/mvsdio.c -+++ b/drivers/mmc/host/mvsdio.c -@@ -90,7 +90,7 @@ static int mvsd_setup_data(struct mvsd_host *host, struct mmc_data *data) - tmout_index = fls(tmout - 1) - 12; - if (tmout_index < 0) - tmout_index = 0; -- if (tmout_index > MVSD_HOST_CTRL_TMOUT_MAX) -+// if (tmout_index > MVSD_HOST_CTRL_TMOUT_MAX) //by steven, try to setup the timeout to maximum value - tmout_index = MVSD_HOST_CTRL_TMOUT_MAX; - - dev_dbg(host->dev, "data %s at 0x%08x: blocks=%d blksz=%d tmout=%u (%d)\n", -@@ -613,6 +613,8 @@ static void mvsd_set_ios(struct mmc_host *mmc, struct mmc_ios *ios) - u32 m = DIV_ROUND_UP(host->base_clock, ios->clock) - 1; - if (m > MVSD_BASE_DIV_MAX) - m = MVSD_BASE_DIV_MAX; -+ if(ios->clock==50000000 ) //by steven -+ m=1; - mvsd_write(MVSD_CLK_DIV, m); - host->clock = ios->clock; - host->ns_per_clk = 1000000000 / (host->base_clock / (m+1)); --- -2.25.0 - diff --git a/kernels/linux-libre-xtreme/0005-drm-i915-gem-Take-runtime-pm-wakeref-prior-to-unbind.patch b/kernels/linux-libre-xtreme/0005-drm-i915-gem-Take-runtime-pm-wakeref-prior-to-unbind.patch deleted file mode 100644 index f984a0174..000000000 --- a/kernels/linux-libre-xtreme/0005-drm-i915-gem-Take-runtime-pm-wakeref-prior-to-unbind.patch +++ /dev/null @@ -1,130 +0,0 @@ -From aa9a02673b4cffa21cc6742edba6b42fb0e8fc62 Mon Sep 17 00:00:00 2001 -From: Chris Wilson -Date: Tue, 3 Dec 2019 10:13:46 +0000 -Subject: [PATCH 05/11] drm/i915/gem: Take runtime-pm wakeref prior to - unbinding - -Some machines require ACPI for runtime resume, and ACPI is quite kmalloc -happy. We cannot handle kmalloc from inside the vm->mutex, as they are -used by the shrinker, and so we must ensure the global runtime-pm is -awake prior to unbinding to avoid the potential inversion. - -<4> [57.121748] ====================================================== -<4> [57.121750] WARNING: possible circular locking dependency detected -<4> [57.121753] 5.4.0-rc8-CI-CI_DRM_7466+ #1 Tainted: G U -<4> [57.121754] ------------------------------------------------------ -<4> [57.121756] i915_pm_rpm/1105 is trying to acquire lock: -<4> [57.121758] ffffffff82263a40 (fs_reclaim){+.+.}, at: fs_reclaim_acquire.part.117+0x0/0x30 -<4> [57.121766] -but task is already holding lock: -<4> [57.121768] ffff888475a593c0 (&vm->mutex){+.+.}, at: i915_vma_unbind+0x21/0x50 [i915] -<4> [57.121868] -which lock already depends on the new lock. - -<4> [57.121869] -the existing dependency chain (in reverse order) is: -<4> [57.121871] --> #1 (&vm->mutex){+.+.}: -<4> [57.121951] i915_gem_shrinker_taints_mutex+0xa2/0xd0 [i915] -<4> [57.122028] i915_address_space_init+0xa9/0x170 [i915] -<4> [57.122104] i915_ggtt_init_hw+0x47/0x130 [i915] -<4> [57.122150] i915_driver_probe+0xbb4/0x15f0 [i915] -<4> [57.122197] i915_pci_probe+0x43/0x1c0 [i915] -<4> [57.122202] pci_device_probe+0x9e/0x120 -<4> [57.122206] really_probe+0xea/0x420 -<4> [57.122209] driver_probe_device+0x10b/0x120 -<4> [57.122212] device_driver_attach+0x4a/0x50 -<4> [57.122214] __driver_attach+0x97/0x130 -<4> [57.122217] bus_for_each_dev+0x74/0xc0 -<4> [57.122220] bus_add_driver+0x142/0x220 -<4> [57.122222] driver_register+0x56/0xf0 -<4> [57.122226] do_one_initcall+0x58/0x2ff -<4> [57.122230] do_init_module+0x56/0x1f8 -<4> [57.122233] load_module+0x243e/0x29f0 -<4> [57.122236] __do_sys_finit_module+0xe9/0x110 -<4> [57.122239] do_syscall_64+0x4f/0x210 -<4> [57.122242] entry_SYSCALL_64_after_hwframe+0x49/0xbe -<4> [57.122244] --> #0 (fs_reclaim){+.+.}: -<4> [57.122249] __lock_acquire+0x1328/0x15d0 -<4> [57.122251] lock_acquire+0xa7/0x1c0 -<4> [57.122254] fs_reclaim_acquire.part.117+0x24/0x30 -<4> [57.122257] __kmalloc+0x48/0x320 -<4> [57.122261] acpi_ns_internalize_name+0x44/0x9b -<4> [57.122264] acpi_ns_get_node_unlocked+0x6b/0xd3 -<4> [57.122267] acpi_ns_get_node+0x3b/0x50 -<4> [57.122271] acpi_get_handle+0x8a/0xb4 -<4> [57.122274] acpi_has_method+0x1c/0x40 -<4> [57.122278] acpi_pci_set_power_state+0x40/0xe0 -<4> [57.122281] pci_platform_power_transition+0x3e/0x90 -<4> [57.122284] pci_set_power_state+0x83/0xf0 -<4> [57.122287] pci_restore_standard_config+0x22/0x40 -<4> [57.122289] pci_pm_runtime_resume+0x23/0xc0 -<4> [57.122293] __rpm_callback+0xb1/0x110 -<4> [57.122296] rpm_callback+0x1a/0x70 -<4> [57.122299] rpm_resume+0x50e/0x790 -<4> [57.122302] __pm_runtime_resume+0x42/0x80 -<4> [57.122357] __intel_runtime_pm_get+0x15/0x60 [i915] -<4> [57.122435] ggtt_unbind_vma+0x24/0x60 [i915] -<4> [57.122514] __i915_vma_unbind.part.39+0xb5/0x500 [i915] -<4> [57.122593] i915_vma_unbind+0x2d/0x50 [i915] -<4> [57.122668] i915_gem_object_unbind+0x11c/0x260 [i915] -<4> [57.122740] i915_gem_object_set_cache_level+0x32/0x90 [i915] -<4> [57.122810] i915_gem_set_caching_ioctl+0x1f7/0x2f0 [i915] -<4> [57.122815] drm_ioctl_kernel+0xa7/0xf0 -<4> [57.122818] drm_ioctl+0x2e1/0x390 -<4> [57.122822] do_vfs_ioctl+0xa0/0x6f0 -<4> [57.122825] ksys_ioctl+0x35/0x60 -<4> [57.122828] __x64_sys_ioctl+0x11/0x20 -<4> [57.122830] do_syscall_64+0x4f/0x210 -<4> [57.122833] entry_SYSCALL_64_after_hwframe+0x49/0xbe - -Closes: https://gitlab.freedesktop.org/drm/intel/issues/711 -Signed-off-by: Chris Wilson -Reviewed-by: Matthew Auld -Link: https://patchwork.freedesktop.org/patch/msgid/20191203101347.2836057-1-chris@chris-wilson.co.uk ---- - drivers/gpu/drm/i915/i915_gem.c | 17 ++++++++++++++++- - 1 file changed, 16 insertions(+), 1 deletion(-) - -diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c -index 3f07948ea4da..ed2436db5dd2 100644 ---- a/drivers/gpu/drm/i915/i915_gem.c -+++ b/drivers/gpu/drm/i915/i915_gem.c -@@ -119,10 +119,23 @@ i915_gem_get_aperture_ioctl(struct drm_device *dev, void *data, - int i915_gem_object_unbind(struct drm_i915_gem_object *obj, - unsigned long flags) - { -- struct i915_vma *vma; -+ struct intel_runtime_pm *rpm = &to_i915(obj->base.dev)->runtime_pm; - LIST_HEAD(still_in_list); -+ intel_wakeref_t wakeref; -+ struct i915_vma *vma; - int ret = 0; - -+ if (!atomic_read(&obj->bind_count)) -+ return 0; -+ -+ /* -+ * As some machines use ACPI to handle runtime-resume callbacks, and -+ * ACPI is quite kmalloc happy, we cannot resume beneath the vm->mutex -+ * as they are required by the shrinker. Ergo, we wake the device up -+ * first just in case. -+ */ -+ wakeref = intel_runtime_pm_get(rpm); -+ - spin_lock(&obj->vma.lock); - while (!ret && (vma = list_first_entry_or_null(&obj->vma.list, - struct i915_vma, -@@ -146,6 +159,8 @@ int i915_gem_object_unbind(struct drm_i915_gem_object *obj, - list_splice(&still_in_list, &obj->vma.list); - spin_unlock(&obj->vma.lock); - -+ intel_runtime_pm_put(rpm, wakeref); -+ - return ret; - } - --- -2.26.0 - diff --git a/kernels/linux-libre-xtreme/0005-net-smsc95xx-Allow-mac-address-to-be-set-as-a-parame.patch b/kernels/linux-libre-xtreme/0005-net-smsc95xx-Allow-mac-address-to-be-set-as-a-parame.patch deleted file mode 100644 index 3ae8471eb..000000000 --- a/kernels/linux-libre-xtreme/0005-net-smsc95xx-Allow-mac-address-to-be-set-as-a-parame.patch +++ /dev/null @@ -1,96 +0,0 @@ -From afac272fddea145b4ba7532370818ada190b4058 Mon Sep 17 00:00:00 2001 -From: popcornmix -Date: Tue, 18 Feb 2014 01:43:50 -0300 -Subject: [PATCH 05/10] net/smsc95xx: Allow mac address to be set as a - parameter - ---- - drivers/net/usb/smsc95xx.c | 56 ++++++++++++++++++++++++++++++++++++++ - 1 file changed, 56 insertions(+) - -diff --git a/drivers/net/usb/smsc95xx.c b/drivers/net/usb/smsc95xx.c -index 355be77f4241..c94a7193e0b9 100644 ---- a/drivers/net/usb/smsc95xx.c -+++ b/drivers/net/usb/smsc95xx.c -@@ -48,6 +48,7 @@ - #define SUSPEND_SUSPEND3 (0x08) - #define SUSPEND_ALLMODES (SUSPEND_SUSPEND0 | SUSPEND_SUSPEND1 | \ - SUSPEND_SUSPEND2 | SUSPEND_SUSPEND3) -+#define MAC_ADDR_LEN (6) - - #define CARRIER_CHECK_DELAY (2 * HZ) - -@@ -70,6 +71,10 @@ static bool turbo_mode = true; - module_param(turbo_mode, bool, 0644); - MODULE_PARM_DESC(turbo_mode, "Enable multiple frames per Rx transaction"); - -+static char *macaddr = ":"; -+module_param(macaddr, charp, 0); -+MODULE_PARM_DESC(macaddr, "MAC address"); -+ - static int __must_check __smsc95xx_read_reg(struct usbnet *dev, u32 index, - u32 *data, int in_pm) - { -@@ -899,8 +904,59 @@ static int smsc95xx_ioctl(struct net_device *netdev, struct ifreq *rq, int cmd) - return generic_mii_ioctl(&dev->mii, if_mii(rq), cmd, NULL); - } - -+/* Check the macaddr module parameter for a MAC address */ -+static int smsc95xx_is_macaddr_param(struct usbnet *dev, u8 *dev_mac) -+{ -+ int i, j, got_num, num; -+ u8 mtbl[MAC_ADDR_LEN]; -+ -+ if (macaddr[0] == ':') -+ return 0; -+ -+ i = 0; -+ j = 0; -+ num = 0; -+ got_num = 0; -+ while (j < MAC_ADDR_LEN) { -+ if (macaddr[i] && macaddr[i] != ':') { -+ got_num++; -+ if ('0' <= macaddr[i] && macaddr[i] <= '9') -+ num = num * 16 + macaddr[i] - '0'; -+ else if ('A' <= macaddr[i] && macaddr[i] <= 'F') -+ num = num * 16 + 10 + macaddr[i] - 'A'; -+ else if ('a' <= macaddr[i] && macaddr[i] <= 'f') -+ num = num * 16 + 10 + macaddr[i] - 'a'; -+ else -+ break; -+ i++; -+ } else if (got_num == 2) { -+ mtbl[j++] = (u8) num; -+ num = 0; -+ got_num = 0; -+ i++; -+ } else { -+ break; -+ } -+ } -+ -+ if (j == MAC_ADDR_LEN) { -+ netif_dbg(dev, ifup, dev->net, "Overriding MAC address with: " -+ "%02x:%02x:%02x:%02x:%02x:%02x\n", mtbl[0], mtbl[1], mtbl[2], -+ mtbl[3], mtbl[4], mtbl[5]); -+ for (i = 0; i < MAC_ADDR_LEN; i++) -+ dev_mac[i] = mtbl[i]; -+ return 1; -+ } else { -+ return 0; -+ } -+} -+ - static void smsc95xx_init_mac_address(struct usbnet *dev) - { -+ /* Check module parameters */ -+ if (smsc95xx_is_macaddr_param(dev, dev->net->dev_addr)) -+ return; -+ - const u8 *mac_addr; - - /* maybe the boot loader passed the MAC address in devicetree */ --- -2.25.0 - diff --git a/kernels/linux-libre-xtreme/0006-drm-i915-gem-Avoid-parking-the-vma-as-we-unbind.patch b/kernels/linux-libre-xtreme/0006-drm-i915-gem-Avoid-parking-the-vma-as-we-unbind.patch deleted file mode 100644 index 0ff019a0f..000000000 --- a/kernels/linux-libre-xtreme/0006-drm-i915-gem-Avoid-parking-the-vma-as-we-unbind.patch +++ /dev/null @@ -1,63 +0,0 @@ -From 6d55f899daa078d167aa497b71c9e7fd5f3d57fb Mon Sep 17 00:00:00 2001 -From: Chris Wilson -Date: Tue, 3 Dec 2019 15:50:32 +0000 -Subject: [PATCH 06/11] drm/i915/gem: Avoid parking the vma as we unbind - -In order to avoid keeping a reference on the i915_vma (which is long -overdue!) we have to coordinate all the possible lifetimes and only use -the vma while we know it is alive. In this episode, we are reminded that -while idle, the closed vma are destroyed. So if the GT idles while we are -working with the vma, the vma itself becomes invalid. - -First class i915_vma here we come, but in the meantime keep piling on -the straw. - -Signed-off-by: Chris Wilson -Reviewed-by: Matthew Auld -Link: https://patchwork.freedesktop.org/patch/msgid/20191203155032.3137263-1-chris@chris-wilson.co.uk ---- - drivers/gpu/drm/i915/i915_gem.c | 17 ++++++++++++++++- - 1 file changed, 16 insertions(+), 1 deletion(-) - -diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c -index ed2436db5dd2..739543812422 100644 ---- a/drivers/gpu/drm/i915/i915_gem.c -+++ b/drivers/gpu/drm/i915/i915_gem.c -@@ -141,18 +141,33 @@ int i915_gem_object_unbind(struct drm_i915_gem_object *obj, - struct i915_vma, - obj_link))) { - struct i915_address_space *vm = vma->vm; -+ bool awake = false; - -- ret = -EBUSY; -+ ret = -EAGAIN; - if (!i915_vm_tryopen(vm)) - break; - -+ /* Prevent vma being freed by i915_vma_parked as we unbind */ -+ if (intel_gt_pm_get_if_awake(vm->gt)) { -+ awake = true; -+ } else { -+ if (i915_vma_is_closed(vma)) { -+ spin_unlock(&obj->vma.lock); -+ goto err_vm; -+ } -+ } -+ - list_move_tail(&vma->obj_link, &still_in_list); - spin_unlock(&obj->vma.lock); - -+ ret = -EBUSY; - if (flags & I915_GEM_OBJECT_UNBIND_ACTIVE || - !i915_vma_is_active(vma)) - ret = i915_vma_unbind(vma); - -+ if (awake) -+ intel_gt_pm_put(vm->gt); -+err_vm: - i915_vm_close(vm); - spin_lock(&obj->vma.lock); - } --- -2.26.0 - diff --git a/kernels/linux-libre-xtreme/0006-set-default-cubietruck-led-triggers.patch b/kernels/linux-libre-xtreme/0006-set-default-cubietruck-led-triggers.patch deleted file mode 100644 index 05a6eeabd..000000000 --- a/kernels/linux-libre-xtreme/0006-set-default-cubietruck-led-triggers.patch +++ /dev/null @@ -1,33 +0,0 @@ -From f99f3a8c0e2db1d9dd487cd70569098f36bb325e Mon Sep 17 00:00:00 2001 -From: Kevin Mihelich -Date: Sat, 14 Feb 2015 12:32:27 +0100 -Subject: [PATCH 06/10] set default cubietruck led triggers - -Signed-off-by: Kevin Mihelich ---- - arch/arm/boot/dts/sun7i-a20-cubietruck.dts | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/arch/arm/boot/dts/sun7i-a20-cubietruck.dts b/arch/arm/boot/dts/sun7i-a20-cubietruck.dts -index 8c8dee6ea461..4f52a11b913e 100644 ---- a/arch/arm/boot/dts/sun7i-a20-cubietruck.dts -+++ b/arch/arm/boot/dts/sun7i-a20-cubietruck.dts -@@ -78,6 +78,7 @@ leds { - blue { - label = "cubietruck:blue:usr"; - gpios = <&pio 7 21 GPIO_ACTIVE_HIGH>; -+ linux,default-trigger = "heartbeat"; - }; - - orange { -@@ -93,6 +94,7 @@ white { - green { - label = "cubietruck:green:usr"; - gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>; -+ linux,default-trigger = "mmc0"; - }; - }; - --- -2.25.0 - diff --git a/kernels/linux-libre-xtreme/0007-drm-i915-gem-Try-to-flush-pending-unbind-events.patch b/kernels/linux-libre-xtreme/0007-drm-i915-gem-Try-to-flush-pending-unbind-events.patch deleted file mode 100644 index 8ff7e17cb..000000000 --- a/kernels/linux-libre-xtreme/0007-drm-i915-gem-Try-to-flush-pending-unbind-events.patch +++ /dev/null @@ -1,64 +0,0 @@ -From 589899b9b2b46961ccb096262b8e85b1656a4d15 Mon Sep 17 00:00:00 2001 -From: Chris Wilson -Date: Wed, 4 Dec 2019 12:35:56 +0000 -Subject: [PATCH 07/11] drm/i915/gem: Try to flush pending unbind events - -If we cannot handle a vma within the unbind loop, try to flush the -pending events (i915_vma_parked, i915_vm_release) and try again. This -avoids a round trip to userspace that is not guaranteed to make forward -progress, as the events we wait upon require being idle. - -References: cb6c3d45f948 ("drm/i915/gem: Avoid parking the vma as we unbind") -Signed-off-by: Chris Wilson -Cc: Matthew Auld -Reviewed-by: Matthew Auld -Link: https://patchwork.freedesktop.org/patch/msgid/20191204123556.3740002-1-chris@chris-wilson.co.uk ---- - drivers/gpu/drm/i915/i915_gem.c | 10 +++++++++- - 1 file changed, 9 insertions(+), 1 deletion(-) - -diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c -index 739543812422..85b12228c2cf 100644 ---- a/drivers/gpu/drm/i915/i915_gem.c -+++ b/drivers/gpu/drm/i915/i915_gem.c -@@ -123,7 +123,7 @@ int i915_gem_object_unbind(struct drm_i915_gem_object *obj, - LIST_HEAD(still_in_list); - intel_wakeref_t wakeref; - struct i915_vma *vma; -- int ret = 0; -+ int ret; - - if (!atomic_read(&obj->bind_count)) - return 0; -@@ -136,6 +136,8 @@ int i915_gem_object_unbind(struct drm_i915_gem_object *obj, - */ - wakeref = intel_runtime_pm_get(rpm); - -+try_again: -+ ret = 0; - spin_lock(&obj->vma.lock); - while (!ret && (vma = list_first_entry_or_null(&obj->vma.list, - struct i915_vma, -@@ -153,6 +155,7 @@ int i915_gem_object_unbind(struct drm_i915_gem_object *obj, - } else { - if (i915_vma_is_closed(vma)) { - spin_unlock(&obj->vma.lock); -+ i915_vma_parked(vm->gt); - goto err_vm; - } - } -@@ -174,6 +177,11 @@ int i915_gem_object_unbind(struct drm_i915_gem_object *obj, - list_splice(&still_in_list, &obj->vma.list); - spin_unlock(&obj->vma.lock); - -+ if (ret == -EAGAIN && flags & I915_GEM_OBJECT_UNBIND_ACTIVE) { -+ rcu_barrier(); /* flush the i915_vm_release() */ -+ goto try_again; -+ } -+ - intel_runtime_pm_put(rpm, wakeref); - - return ret; --- -2.26.0 - diff --git a/kernels/linux-libre-xtreme/0007-exynos4412-odroid-set-higher-minimum-buck2-regulator.patch b/kernels/linux-libre-xtreme/0007-exynos4412-odroid-set-higher-minimum-buck2-regulator.patch deleted file mode 100644 index 0bac600f6..000000000 --- a/kernels/linux-libre-xtreme/0007-exynos4412-odroid-set-higher-minimum-buck2-regulator.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 318282bc517494fa1b17c1b6433b3005337d07b4 Mon Sep 17 00:00:00 2001 -From: Kevin Mihelich -Date: Thu, 11 Aug 2016 00:42:37 -0600 -Subject: [PATCH 07/10] exynos4412-odroid: set higher minimum buck2 regulator - voltage - -Set a higher minimum voltage to help reboot issue. -http://www.spinics.net/lists/linux-samsung-soc/msg54434.html - -Signed-off-by: Kevin Mihelich ---- - arch/arm/boot/dts/exynos4412-odroid-common.dtsi | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/arch/arm/boot/dts/exynos4412-odroid-common.dtsi b/arch/arm/boot/dts/exynos4412-odroid-common.dtsi -index ea55f377d17c..a7bfc58bbc79 100644 ---- a/arch/arm/boot/dts/exynos4412-odroid-common.dtsi -+++ b/arch/arm/boot/dts/exynos4412-odroid-common.dtsi -@@ -430,7 +430,7 @@ buck1_reg: BUCK1 { - - buck2_reg: BUCK2 { - regulator-name = "vdd_arm"; -- regulator-min-microvolt = <900000>; -+ regulator-min-microvolt = <1100000>; - regulator-max-microvolt = <1350000>; - regulator-always-on; - regulator-boot-on; --- -2.25.0 - diff --git a/kernels/linux-libre-xtreme/0008-ARM-dove-enable-ethernet-on-D3Plug.patch b/kernels/linux-libre-xtreme/0008-ARM-dove-enable-ethernet-on-D3Plug.patch deleted file mode 100644 index a31dc210e..000000000 --- a/kernels/linux-libre-xtreme/0008-ARM-dove-enable-ethernet-on-D3Plug.patch +++ /dev/null @@ -1,31 +0,0 @@ -From 9409129a50f721937f0b16f00f6ba45e3b9d066a Mon Sep 17 00:00:00 2001 -From: Kevin Mihelich -Date: Sun, 7 May 2017 13:32:25 -0600 -Subject: [PATCH 08/10] ARM: dove: enable ethernet on D3Plug - -Signed-off-by: Kevin Mihelich ---- - arch/arm/boot/dts/dove-d3plug.dts | 7 +++++++ - 1 file changed, 7 insertions(+) - -diff --git a/arch/arm/boot/dts/dove-d3plug.dts b/arch/arm/boot/dts/dove-d3plug.dts -index 826026c28f90..a4c9963e1261 100644 ---- a/arch/arm/boot/dts/dove-d3plug.dts -+++ b/arch/arm/boot/dts/dove-d3plug.dts -@@ -61,6 +61,13 @@ usb_power: regulator@1 { - &uart0 { status = "okay"; }; - &sata0 { status = "okay"; }; - &i2c0 { status = "okay"; }; -+&mdio { status = "okay"; }; -+ð { status = "okay"; }; -+ -+ðphy { -+ compatible = "marvell,88e1310"; -+ reg = <1>; -+}; - - /* Samsung M8G2F eMMC */ - &sdio0 { --- -2.25.0 - diff --git a/kernels/linux-libre-xtreme/0008-drm-i915-gem-Reinitialise-the-local-list-before-repe.patch b/kernels/linux-libre-xtreme/0008-drm-i915-gem-Reinitialise-the-local-list-before-repe.patch deleted file mode 100644 index f6311e266..000000000 --- a/kernels/linux-libre-xtreme/0008-drm-i915-gem-Reinitialise-the-local-list-before-repe.patch +++ /dev/null @@ -1,34 +0,0 @@ -From 442f9ca36769ea043af37729382044afd7f18676 Mon Sep 17 00:00:00 2001 -From: Chris Wilson -Date: Thu, 5 Dec 2019 13:29:12 +0000 -Subject: [PATCH 08/11] drm/i915/gem: Reinitialise the local list before - repeating - -As we may start the loop again, we require our local list of i915_vma -we've processed to be reinitialised. - -Fixes: aa5e4453dc05 ("drm/i915/gem: Try to flush pending unbind events") -Closes: https://gitlab.freedesktop.org/drm/intel/issues/731 -Signed-off-by: Chris Wilson -Reviewed-by: Andi Shyti -Link: https://patchwork.freedesktop.org/patch/msgid/20191205132912.606868-1-chris@chris-wilson.co.uk ---- - drivers/gpu/drm/i915/i915_gem.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c -index 85b12228c2cf..c2c025c4f4ad 100644 ---- a/drivers/gpu/drm/i915/i915_gem.c -+++ b/drivers/gpu/drm/i915/i915_gem.c -@@ -174,7 +174,7 @@ int i915_gem_object_unbind(struct drm_i915_gem_object *obj, - i915_vm_close(vm); - spin_lock(&obj->vma.lock); - } -- list_splice(&still_in_list, &obj->vma.list); -+ list_splice_init(&still_in_list, &obj->vma.list); - spin_unlock(&obj->vma.lock); - - if (ret == -EAGAIN && flags & I915_GEM_OBJECT_UNBIND_ACTIVE) { --- -2.26.0 - diff --git a/kernels/linux-libre-xtreme/0009-USB-Armory-MkII-support.patch b/kernels/linux-libre-xtreme/0009-USB-Armory-MkII-support.patch deleted file mode 100644 index bcb8556ce..000000000 --- a/kernels/linux-libre-xtreme/0009-USB-Armory-MkII-support.patch +++ /dev/null @@ -1,556 +0,0 @@ -From 9c5a1645cef4d1ba381db9c4b375b9dc900a4475 Mon Sep 17 00:00:00 2001 -From: Kevin Mihelich -Date: Sun, 11 Aug 2019 12:34:17 -0600 -Subject: [PATCH 09/10] USB Armory MkII support - ---- - arch/arm/boot/dts/Makefile | 2 + - arch/arm/boot/dts/imx6ul-usbarmory.dts | 255 +++++++++++++++++++++++ - arch/arm/boot/dts/imx6ull-usbarmory.dts | 256 ++++++++++++++++++++++++ - 3 files changed, 513 insertions(+) - create mode 100644 arch/arm/boot/dts/imx6ul-usbarmory.dts - create mode 100644 arch/arm/boot/dts/imx6ull-usbarmory.dts - -diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile -index 9f10323ecfde..ab24e8e9d0c2 100644 ---- a/arch/arm/boot/dts/Makefile -+++ b/arch/arm/boot/dts/Makefile -@@ -585,10 +585,12 @@ dtb-$(CONFIG_SOC_IMX6UL) += \ - imx6ul-tx6ul-0010.dtb \ - imx6ul-tx6ul-0011.dtb \ - imx6ul-tx6ul-mainboard.dtb \ -+ imx6ul-usbarmory.dtb \ - imx6ull-14x14-evk.dtb \ - imx6ull-colibri-eval-v3.dtb \ - imx6ull-colibri-wifi-eval-v3.dtb \ - imx6ull-opos6uldev.dtb \ -+ imx6ull-usbarmory.dtb \ - imx6ull-phytec-segin-ff-rdk-nand.dtb \ - imx6ull-phytec-segin-ff-rdk-emmc.dtb \ - imx6ull-phytec-segin-lc-rdk-nand.dtb \ -diff --git a/arch/arm/boot/dts/imx6ul-usbarmory.dts b/arch/arm/boot/dts/imx6ul-usbarmory.dts -new file mode 100644 -index 000000000000..3936ef8a64f1 ---- /dev/null -+++ b/arch/arm/boot/dts/imx6ul-usbarmory.dts -@@ -0,0 +1,255 @@ -+/* -+ * USB armory Mk II device tree file -+ * https://inversepath.com/usbarmory -+ * -+ * Copyright (C) 2019, F-Secure Corporation -+ * Andrej Rosano -+ * -+ * This file is dual-licensed: you can use it either under the terms -+ * of the GPL or the X11 license, at your option. Note that this dual -+ * licensing only applies to this file, and not this project as a -+ * whole. -+ * -+ * a) This file is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License as -+ * published by the Free Software Foundation; either version 2 of the -+ * License, or (at your option) any later version. -+ * -+ * This file is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * Or, alternatively, -+ * -+ * b) Permission is hereby granted, free of charge, to any person -+ * obtaining a copy of this software and associated documentation -+ * files (the "Software"), to deal in the Software without -+ * restriction, including without limitation the rights to use, -+ * copy, modify, merge, publish, distribute, sublicense, and/or -+ * sell copies of the Software, and to permit persons to whom the -+ * Software is furnished to do so, subject to the following -+ * conditions: -+ * -+ * The above copyright notice and this permission notice shall be -+ * included in all copies or substantial portions of the Software. -+ * -+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -+ * OTHER DEALINGS IN THE SOFTWARE. -+ */ -+ -+/dts-v1/; -+ -+#include "imx6ul.dtsi" -+ -+/ { -+ model = "F-Secure USB armory Mk II"; -+ compatible = "inversepath,imx6ul-usbarmory-mkII", "fsl,imx6ul"; -+ -+ chosen { -+ stdout-path = &uart2; -+ }; -+ -+ memory { -+ reg = <0x80000000 0x20000000>; -+ }; -+ -+ leds { -+ compatible = "gpio-leds"; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_led>; -+ -+ led-white { -+ label = "LED_WHITE"; -+ gpios = <&gpio4 21 GPIO_ACTIVE_LOW>; -+ linux,default-trigger = "heartbeat"; -+ }; -+ -+ led-blue { -+ label = "LED_BLUE"; -+ gpios = <&gpio4 22 GPIO_ACTIVE_LOW>; -+ }; -+ }; -+ -+ regulators { -+ compatible = "simple-bus"; -+ #address-cells = <1>; -+ #size-cells = <0>; -+ -+ reg_sd1_vmmc: sd1_regulator { -+ compatible = "regulator-fixed"; -+ regulator-name = "VSD_3V3"; -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ }; -+ }; -+}; -+ -+&uart1 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_bluetooth>; -+ uart-has-rtscts; -+ status = "okay"; -+}; -+ -+&uart2 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_uart2>; -+ status = "okay"; -+}; -+ -+&usdhc1 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_usdhc1>; -+ no-1-8-v; -+ keep-power-in-suspend; -+ wakeup-source; -+ status = "okay"; -+}; -+ -+&usdhc2 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_usdhc2>; -+ non-removable; -+ status = "okay"; -+}; -+ -+&i2c1 { -+ pinctrl-0 = <&pinctrl_i2c1>; -+ status = "okay"; -+}; -+ -+&iomuxc { -+ pinctrl_uart2: uart2grp { -+ fsl,pins = < -+ MX6UL_PAD_UART2_TX_DATA__UART2_DCE_TX 0x1b0b1 -+ MX6UL_PAD_UART2_RX_DATA__UART2_DCE_RX 0x1b0b1 -+ >; -+ }; -+ -+ pinctrl_bluetooth: uart1grp { -+ fsl,pins = < -+ MX6UL_PAD_UART1_TX_DATA__UART1_DCE_TX 0x1b0b0 /* BT_UART_TX */ -+ MX6UL_PAD_UART1_RX_DATA__UART1_DCE_RX 0x1b0b0 /* BT_UART_RX */ -+ MX6UL_PAD_UART1_CTS_B__UART1_DCE_CTS 0x1b0b0 /* BT_UART_CTS */ -+ MX6UL_PAD_GPIO1_IO07__UART1_DCE_RTS 0x130b0 /* BT_UART_RTS */ -+ MX6UL_PAD_UART3_TX_DATA__GPIO1_IO24 0x1f020 /* BT_UART_DSR */ -+ MX6UL_PAD_UART3_RX_DATA__GPIO1_IO25 0x10020 /* BT_UART_DTR */ -+ MX6UL_PAD_GPIO1_IO04__GPIO1_IO04 0x1f020 /* BT_SWDCLK */ -+ MX6UL_PAD_GPIO1_IO05__GPIO1_IO05 0x1f020 /* BT_SWDIO */ -+ MX6UL_PAD_GPIO1_IO09__GPIO1_IO09 0x1f020 /* BT_RESET */ -+ MX6UL_PAD_UART3_RTS_B__GPIO1_IO27 0x1f020 /* BT_SWITCH_1 */ -+ MX6UL_PAD_UART3_CTS_B__GPIO1_IO26 0x1f020 /* BT_SWITCH_2 */ -+ >; -+ }; -+ -+ pinctrl_i2c1: i2c1grp { -+ fsl,pins = < -+ MX6UL_PAD_GPIO1_IO02__I2C1_SCL 0x4001b8b0 -+ MX6UL_PAD_GPIO1_IO03__I2C1_SDA 0x4001b8b0 -+ >; -+ }; -+ -+ pinctrl_led: ledgrp { -+ fsl,pins = < -+ MX6UL_PAD_CSI_DATA06__GPIO4_IO27 0x1f020 -+ MX6UL_PAD_CSI_DATA07__GPIO4_IO28 0x1f020 -+ >; -+ }; -+ -+ pinctrl_usdhc1: usdhc1grp { -+ fsl,pins = < -+ MX6UL_PAD_SD1_CMD__USDHC1_CMD 0x1f019 -+ MX6UL_PAD_SD1_CLK__USDHC1_CLK 0x1f019 -+ MX6UL_PAD_SD1_DATA0__USDHC1_DATA0 0x1f019 -+ MX6UL_PAD_SD1_DATA1__USDHC1_DATA1 0x1f019 -+ MX6UL_PAD_SD1_DATA2__USDHC1_DATA2 0x1f019 -+ MX6UL_PAD_SD1_DATA3__USDHC1_DATA3 0x1f019 -+ >; -+ }; -+ -+ pinctrl_usdhc2: usdhc2grp { -+ fsl,pins = < -+ MX6UL_PAD_NAND_RE_B__USDHC2_CLK 0x10071 -+ MX6UL_PAD_NAND_WE_B__USDHC2_CMD 0x17059 -+ MX6UL_PAD_NAND_DATA00__USDHC2_DATA0 0x17059 -+ MX6UL_PAD_NAND_DATA01__USDHC2_DATA1 0x17059 -+ MX6UL_PAD_NAND_DATA02__USDHC2_DATA2 0x17059 -+ MX6UL_PAD_NAND_DATA03__USDHC2_DATA3 0x17059 -+ MX6UL_PAD_NAND_DATA04__USDHC2_DATA4 0x17059 -+ MX6UL_PAD_NAND_DATA05__USDHC2_DATA5 0x17059 -+ MX6UL_PAD_NAND_DATA06__USDHC2_DATA6 0x17059 -+ MX6UL_PAD_NAND_DATA07__USDHC2_DATA7 0x17059 -+ >; -+ }; -+}; -+ -+&aips2 { -+ crypto: caam@2140000 { -+ compatible = "fsl,imx6ul-caam", "fsl,sec-v4.0"; -+ #address-cells = <1>; -+ #size-cells = <1>; -+ reg = <0x2140000 0x3c000>; -+ ranges = <0 0x2140000 0x3c000>; -+ interrupts = ; -+ clocks = <&clks IMX6UL_CLK_CAAM_IPG>, <&clks IMX6UL_CLK_CAAM_ACLK>, -+ <&clks IMX6UL_CLK_CAAM_MEM>; -+ clock-names = "ipg", "aclk", "mem"; -+ -+ sec_jr0: jr0@1000 { -+ compatible = "fsl,sec-v4.0-job-ring"; -+ reg = <0x1000 0x1000>; -+ interrupts = ; -+ }; -+ -+ sec_jr1: jr1@2000 { -+ compatible = "fsl,sec-v4.0-job-ring"; -+ reg = <0x2000 0x1000>; -+ interrupts = ; -+ }; -+ sec_jr2: jr2@3000 { -+ compatible = "fsl,sec-v4.0-job-ring"; -+ reg = <0x3000 0x1000>; -+ interrupts = ; -+ }; -+ }; -+}; -+ -+/ { -+ soc { -+ caam_sm: caam-sm@00100000 { -+ compatible = "fsl,imx7d-caam-sm", "fsl,imx6q-caam-sm"; -+ reg = <0x00100000 0x3fff>; -+ }; -+ -+ irq_sec_vio: caam_secvio { -+ compatible = "fsl,imx7d-caam-secvio", "fsl,imx6q-caam-secvio"; -+ interrupts = ; -+ }; -+ }; -+ -+ caam_keyblob: caam-keyblob { -+ compatible = "fsl,sec-v4.0-keyblob"; -+ status = "okay"; -+ }; -+}; -+ -+&usbotg1 { -+ dr_mode = "otg"; -+ disable-over-current; -+ tpl-support; -+ status = "okay"; -+}; -+ -+&usbotg2 { -+ dr_mode = "host"; -+ disable-over-current; -+ tpl-support; -+ status = "okay"; -+}; -diff --git a/arch/arm/boot/dts/imx6ull-usbarmory.dts b/arch/arm/boot/dts/imx6ull-usbarmory.dts -new file mode 100644 -index 000000000000..85cf30bff527 ---- /dev/null -+++ b/arch/arm/boot/dts/imx6ull-usbarmory.dts -@@ -0,0 +1,256 @@ -+/* -+ * USB armory Mk II device tree file -+ * https://inversepath.com/usbarmory -+ * -+ * Copyright (C) 2019, F-Secure Corporation -+ * Andrej Rosano -+ * -+ * This file is dual-licensed: you can use it either under the terms -+ * of the GPL or the X11 license, at your option. Note that this dual -+ * licensing only applies to this file, and not this project as a -+ * whole. -+ * -+ * a) This file is free software; you can redistribute it and/or -+ * modify it under the terms of the GNU General Public License as -+ * published by the Free Software Foundation; either version 2 of the -+ * License, or (at your option) any later version. -+ * -+ * This file is distributed in the hope that it will be useful, -+ * but WITHOUT ANY WARRANTY; without even the implied warranty of -+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -+ * GNU General Public License for more details. -+ * -+ * Or, alternatively, -+ * -+ * b) Permission is hereby granted, free of charge, to any person -+ * obtaining a copy of this software and associated documentation -+ * files (the "Software"), to deal in the Software without -+ * restriction, including without limitation the rights to use, -+ * copy, modify, merge, publish, distribute, sublicense, and/or -+ * sell copies of the Software, and to permit persons to whom the -+ * Software is furnished to do so, subject to the following -+ * conditions: -+ * -+ * The above copyright notice and this permission notice shall be -+ * included in all copies or substantial portions of the Software. -+ * -+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT -+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING -+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR -+ * OTHER DEALINGS IN THE SOFTWARE. -+ */ -+ -+/dts-v1/; -+ -+#include "imx6ul.dtsi" -+ -+/ { -+ model = "F-Secure USB armory Mk II"; -+ compatible = "inversepath,imx6ull-usbarmory-mkII", "fsl,imx6ull"; -+ -+ chosen { -+ stdout-path = &uart2; -+ }; -+ -+ memory { -+ reg = <0x80000000 0x20000000>; -+ }; -+ -+ leds { -+ compatible = "gpio-leds"; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_led>; -+ -+ led-white { -+ label = "LED_WHITE"; -+ gpios = <&gpio4 21 GPIO_ACTIVE_LOW>; -+ linux,default-trigger = "heartbeat"; -+ }; -+ -+ led-blue { -+ label = "LED_BLUE"; -+ gpios = <&gpio4 22 GPIO_ACTIVE_LOW>; -+ }; -+ }; -+ -+ regulators { -+ compatible = "simple-bus"; -+ #address-cells = <1>; -+ #size-cells = <0>; -+ -+ reg_sd1_vmmc: sd1_regulator { -+ compatible = "regulator-fixed"; -+ regulator-name = "VSD_3V3"; -+ regulator-min-microvolt = <3300000>; -+ regulator-max-microvolt = <3300000>; -+ }; -+ }; -+}; -+ -+/* Delete CAAM node in AIPS-2 (i.MX6UL specific) */ -+/delete-node/ &crypto; -+ -+&cpu0 { -+ operating-points = < -+ /* kHz uV */ -+ 900000 1275000 -+ 792000 1225000 -+ 528000 1175000 -+ 396000 1025000 -+ 198000 950000 -+ >; -+ fsl,soc-operating-points = < -+ /* KHz uV */ -+ 900000 1250000 -+ 792000 1175000 -+ 528000 1175000 -+ 396000 1175000 -+ 198000 1175000 -+ >; -+}; -+ -+&uart1 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_bluetooth>; -+ uart-has-rtscts; -+ status = "okay"; -+}; -+ -+&uart2 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_uart2>; -+ status = "okay"; -+}; -+ -+&usdhc1 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_usdhc1>; -+ no-1-8-v; -+ keep-power-in-suspend; -+ wakeup-source; -+ status = "okay"; -+}; -+ -+&usdhc2 { -+ pinctrl-names = "default"; -+ pinctrl-0 = <&pinctrl_usdhc2>; -+ non-removable; -+ status = "okay"; -+}; -+ -+&i2c1 { -+ pinctrl-0 = <&pinctrl_i2c1>; -+ status = "okay"; -+}; -+ -+&iomuxc { -+ pinctrl_uart2: uart2grp { -+ fsl,pins = < -+ MX6UL_PAD_UART2_TX_DATA__UART2_DCE_TX 0x1b0b1 -+ MX6UL_PAD_UART2_RX_DATA__UART2_DCE_RX 0x1b0b1 -+ >; -+ }; -+ -+ pinctrl_bluetooth: uart1grp { -+ fsl,pins = < -+ MX6UL_PAD_UART1_TX_DATA__UART1_DCE_TX 0x1b0b0 /* BT_UART_TX */ -+ MX6UL_PAD_UART1_RX_DATA__UART1_DCE_RX 0x1b0b0 /* BT_UART_RX */ -+ MX6UL_PAD_UART1_CTS_B__UART1_DCE_CTS 0x1b0b0 /* BT_UART_CTS */ -+ MX6UL_PAD_GPIO1_IO07__UART1_DCE_RTS 0x130b0 /* BT_UART_RTS */ -+ MX6UL_PAD_UART3_TX_DATA__GPIO1_IO24 0x1f020 /* BT_UART_DSR */ -+ MX6UL_PAD_UART3_RX_DATA__GPIO1_IO25 0x10020 /* BT_UART_DTR */ -+ MX6UL_PAD_GPIO1_IO04__GPIO1_IO04 0x1f020 /* BT_SWDCLK */ -+ MX6UL_PAD_GPIO1_IO05__GPIO1_IO05 0x1f020 /* BT_SWDIO */ -+ MX6UL_PAD_GPIO1_IO09__GPIO1_IO09 0x1f020 /* BT_RESET */ -+ MX6UL_PAD_UART3_RTS_B__GPIO1_IO27 0x1f020 /* BT_SWITCH_1 */ -+ MX6UL_PAD_UART3_CTS_B__GPIO1_IO26 0x1f020 /* BT_SWITCH_2 */ -+ >; -+ }; -+ -+ pinctrl_i2c1: i2c1grp { -+ fsl,pins = < -+ MX6UL_PAD_GPIO1_IO02__I2C1_SCL 0x4001b8b0 -+ MX6UL_PAD_GPIO1_IO03__I2C1_SDA 0x4001b8b0 -+ >; -+ }; -+ -+ pinctrl_led: ledgrp { -+ fsl,pins = < -+ MX6UL_PAD_CSI_DATA06__GPIO4_IO27 0x1f020 -+ MX6UL_PAD_CSI_DATA07__GPIO4_IO28 0x1f020 -+ >; -+ }; -+ -+ pinctrl_usdhc1: usdhc1grp { -+ fsl,pins = < -+ MX6UL_PAD_SD1_CMD__USDHC1_CMD 0x1f019 -+ MX6UL_PAD_SD1_CLK__USDHC1_CLK 0x1f019 -+ MX6UL_PAD_SD1_DATA0__USDHC1_DATA0 0x1f019 -+ MX6UL_PAD_SD1_DATA1__USDHC1_DATA1 0x1f019 -+ MX6UL_PAD_SD1_DATA2__USDHC1_DATA2 0x1f019 -+ MX6UL_PAD_SD1_DATA3__USDHC1_DATA3 0x1f019 -+ >; -+ }; -+ -+ pinctrl_usdhc2: usdhc2grp { -+ fsl,pins = < -+ MX6UL_PAD_NAND_RE_B__USDHC2_CLK 0x10071 -+ MX6UL_PAD_NAND_WE_B__USDHC2_CMD 0x17059 -+ MX6UL_PAD_NAND_DATA00__USDHC2_DATA0 0x17059 -+ MX6UL_PAD_NAND_DATA01__USDHC2_DATA1 0x17059 -+ MX6UL_PAD_NAND_DATA02__USDHC2_DATA2 0x17059 -+ MX6UL_PAD_NAND_DATA03__USDHC2_DATA3 0x17059 -+ MX6UL_PAD_NAND_DATA04__USDHC2_DATA4 0x17059 -+ MX6UL_PAD_NAND_DATA05__USDHC2_DATA5 0x17059 -+ MX6UL_PAD_NAND_DATA06__USDHC2_DATA6 0x17059 -+ MX6UL_PAD_NAND_DATA07__USDHC2_DATA7 0x17059 -+ >; -+ }; -+}; -+ -+/ { -+ soc { -+ aips3: aips-bus@02200000 { -+ compatible = "fsl,aips-bus", "simple-bus"; -+ #address-cells = <1>; -+ #size-cells = <1>; -+ reg = <0x02200000 0x100000>; -+ ranges; -+ -+ dcp: dcp@02280000 { -+ compatible = "fsl,imx6ull-dcp", "fsl,imx6sl-dcp", "fsl,imx28-dcp"; -+ reg = <0x02280000 0x4000>; -+ interrupts = , -+ , -+ ; -+ clocks = <&clks IMX6ULL_CLK_DCP_CLK>; -+ clock-names = "dcp"; -+ }; -+ -+ rngb: rngb@02284000 { -+ compatible = "fsl,imx6sl-rng", "fsl,imx25-rngb", "fsl,imx-rng", "imx-rng"; -+ reg = <0x02284000 0x4000>; -+ interrupts = ; -+ clocks = <&clks IMX6UL_CLK_DUMMY>; -+ }; -+ }; -+ }; -+}; -+ -+&usbotg1 { -+ dr_mode = "peripheral"; -+ disable-over-current; -+ tpl-support; -+ status = "okay"; -+}; -+ -+&usbotg2 { -+ dr_mode = "host"; -+ disable-over-current; -+ tpl-support; -+ status = "okay"; -+}; --- -2.25.0 - diff --git a/kernels/linux-libre-xtreme/0009-drm-i915-Add-a-simple-is-bound-check-before-unbindin.patch b/kernels/linux-libre-xtreme/0009-drm-i915-Add-a-simple-is-bound-check-before-unbindin.patch deleted file mode 100644 index 2cfe9d67c..000000000 --- a/kernels/linux-libre-xtreme/0009-drm-i915-Add-a-simple-is-bound-check-before-unbindin.patch +++ /dev/null @@ -1,41 +0,0 @@ -From eaf3c3bb64d3ca5da3ccfdc6b3d181eaf6c22ec8 Mon Sep 17 00:00:00 2001 -From: Chris Wilson -Date: Sun, 22 Dec 2019 21:02:54 +0000 -Subject: [PATCH 09/11] drm/i915: Add a simple is-bound check before unbinding - -Only acquire the various atomic references required to unbind the vma if -we do need to unbind the vma. - -Signed-off-by: Chris Wilson -Acked-by: Imre Deak -Link: https://patchwork.freedesktop.org/patch/msgid/20191222210256.2066451-1-chris@chris-wilson.co.uk ---- - drivers/gpu/drm/i915/i915_gem.c | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c -index c2c025c4f4ad..83eed642cbcd 100644 ---- a/drivers/gpu/drm/i915/i915_gem.c -+++ b/drivers/gpu/drm/i915/i915_gem.c -@@ -145,6 +145,10 @@ int i915_gem_object_unbind(struct drm_i915_gem_object *obj, - struct i915_address_space *vm = vma->vm; - bool awake = false; - -+ list_move_tail(&vma->obj_link, &still_in_list); -+ if (!i915_vma_is_bound(vma, I915_VMA_BIND_MASK)) -+ continue; -+ - ret = -EAGAIN; - if (!i915_vm_tryopen(vm)) - break; -@@ -160,7 +164,6 @@ int i915_gem_object_unbind(struct drm_i915_gem_object *obj, - } - } - -- list_move_tail(&vma->obj_link, &still_in_list); - spin_unlock(&obj->vma.lock); - - ret = -EBUSY; --- -2.26.0 - diff --git a/kernels/linux-libre-xtreme/0010-Revert-ARM-8947-1-Fix-__arch_get_hw_counter-access-t.patch b/kernels/linux-libre-xtreme/0010-Revert-ARM-8947-1-Fix-__arch_get_hw_counter-access-t.patch deleted file mode 100644 index 8f3349acc..000000000 --- a/kernels/linux-libre-xtreme/0010-Revert-ARM-8947-1-Fix-__arch_get_hw_counter-access-t.patch +++ /dev/null @@ -1,28 +0,0 @@ -From d8639dab6b5256a2f409da50a6ce73b9502a6823 Mon Sep 17 00:00:00 2001 -From: Kevin Mihelich -Date: Sun, 2 Feb 2020 18:38:22 -0700 -Subject: [PATCH 10/10] Revert "ARM: 8947/1: Fix __arch_get_hw_counter() access - to CNTVCT" - -This reverts commit 04bb96427d4ee33fbdf15648ddf578c6ba1aef54. ---- - arch/arm/include/asm/vdso/gettimeofday.h | 3 --- - 1 file changed, 3 deletions(-) - -diff --git a/arch/arm/include/asm/vdso/gettimeofday.h b/arch/arm/include/asm/vdso/gettimeofday.h -index 0ad2429c324f..5b879ae7afc1 100644 ---- a/arch/arm/include/asm/vdso/gettimeofday.h -+++ b/arch/arm/include/asm/vdso/gettimeofday.h -@@ -75,9 +75,6 @@ static __always_inline u64 __arch_get_hw_counter(int clock_mode) - #ifdef CONFIG_ARM_ARCH_TIMER - u64 cycle_now; - -- if (!clock_mode) -- return -EINVAL; -- - isb(); - cycle_now = read_sysreg(CNTVCT); - --- -2.25.0 - diff --git a/kernels/linux-libre-xtreme/0010-drm-i915-Introduce-a-vma.kref.patch b/kernels/linux-libre-xtreme/0010-drm-i915-Introduce-a-vma.kref.patch deleted file mode 100644 index d19487298..000000000 --- a/kernels/linux-libre-xtreme/0010-drm-i915-Introduce-a-vma.kref.patch +++ /dev/null @@ -1,252 +0,0 @@ -From 6bd575b4b4a9d1cb898608d25df5e6aefe5a0240 Mon Sep 17 00:00:00 2001 -From: Chris Wilson -Date: Sun, 22 Dec 2019 21:02:55 +0000 -Subject: [PATCH 10/11] drm/i915: Introduce a vma.kref - -Start introducing a kref on i915_vma in order to protect the vma unbind -(i915_gem_object_unbind) from a parallel destruction (i915_vma_parked). -Later, we will use the refcount to manage all access and turn i915_vma -into a first class container. - -Signed-off-by: Chris Wilson -Cc: Imre Deak -Acked-by: Imre Deak -Link: https://patchwork.freedesktop.org/patch/msgid/20191222210256.2066451-2-chris@chris-wilson.co.uk ---- - drivers/gpu/drm/i915/gem/i915_gem_object.c | 2 +- - .../gpu/drm/i915/gem/selftests/huge_pages.c | 3 +-- - .../drm/i915/gem/selftests/i915_gem_mman.c | 4 +-- - drivers/gpu/drm/i915/i915_gem.c | 27 +++++++------------ - drivers/gpu/drm/i915/i915_gem_gtt.c | 5 ++-- - drivers/gpu/drm/i915/i915_vma.c | 9 ++++--- - drivers/gpu/drm/i915/i915_vma.h | 25 ++++++++++++++--- - 7 files changed, 44 insertions(+), 31 deletions(-) - -diff --git a/drivers/gpu/drm/i915/gem/i915_gem_object.c b/drivers/gpu/drm/i915/gem/i915_gem_object.c -index a596548c07bf..b6937469ffd3 100644 ---- a/drivers/gpu/drm/i915/gem/i915_gem_object.c -+++ b/drivers/gpu/drm/i915/gem/i915_gem_object.c -@@ -174,7 +174,7 @@ static void __i915_gem_free_objects(struct drm_i915_private *i915, - GEM_BUG_ON(vma->obj != obj); - spin_unlock(&obj->vma.lock); - -- i915_vma_destroy(vma); -+ __i915_vma_put(vma); - - spin_lock(&obj->vma.lock); - } -diff --git a/drivers/gpu/drm/i915/gem/selftests/huge_pages.c b/drivers/gpu/drm/i915/gem/selftests/huge_pages.c -index 688c49a24f32..bd1e2c12de63 100644 ---- a/drivers/gpu/drm/i915/gem/selftests/huge_pages.c -+++ b/drivers/gpu/drm/i915/gem/selftests/huge_pages.c -@@ -1110,8 +1110,7 @@ static int __igt_write_huge(struct intel_context *ce, - out_vma_unpin: - i915_vma_unpin(vma); - out_vma_close: -- i915_vma_destroy(vma); -- -+ __i915_vma_put(vma); - return err; - } - -diff --git a/drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c b/drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c -index e81c2726f7fd..3d8f00d40d42 100644 ---- a/drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c -+++ b/drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c -@@ -161,7 +161,7 @@ static int check_partial_mapping(struct drm_i915_gem_object *obj, - kunmap(p); - - out: -- i915_vma_destroy(vma); -+ __i915_vma_put(vma); - return err; - } - -@@ -255,7 +255,7 @@ static int check_partial_mappings(struct drm_i915_gem_object *obj, - if (err) - return err; - -- i915_vma_destroy(vma); -+ __i915_vma_put(vma); - - if (igt_timeout(end_time, - "%s: timed out after tiling=%d stride=%d\n", -diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c -index 83eed642cbcd..0475a0343487 100644 ---- a/drivers/gpu/drm/i915/i915_gem.c -+++ b/drivers/gpu/drm/i915/i915_gem.c -@@ -143,7 +143,6 @@ int i915_gem_object_unbind(struct drm_i915_gem_object *obj, - struct i915_vma, - obj_link))) { - struct i915_address_space *vm = vma->vm; -- bool awake = false; - - list_move_tail(&vma->obj_link, &still_in_list); - if (!i915_vma_is_bound(vma, I915_VMA_BIND_MASK)) -@@ -154,26 +153,18 @@ int i915_gem_object_unbind(struct drm_i915_gem_object *obj, - break; - - /* Prevent vma being freed by i915_vma_parked as we unbind */ -- if (intel_gt_pm_get_if_awake(vm->gt)) { -- awake = true; -- } else { -- if (i915_vma_is_closed(vma)) { -- spin_unlock(&obj->vma.lock); -- i915_vma_parked(vm->gt); -- goto err_vm; -- } -- } -- -+ vma = __i915_vma_get(vma); - spin_unlock(&obj->vma.lock); - -- ret = -EBUSY; -- if (flags & I915_GEM_OBJECT_UNBIND_ACTIVE || -- !i915_vma_is_active(vma)) -- ret = i915_vma_unbind(vma); -+ if (vma) { -+ ret = -EBUSY; -+ if (flags & I915_GEM_OBJECT_UNBIND_ACTIVE || -+ !i915_vma_is_active(vma)) -+ ret = i915_vma_unbind(vma); -+ -+ __i915_vma_put(vma); -+ } - -- if (awake) -- intel_gt_pm_put(vm->gt); --err_vm: - i915_vm_close(vm); - spin_lock(&obj->vma.lock); - } -diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c -index 44727806dfd7..dd2c20f7d4d2 100644 ---- a/drivers/gpu/drm/i915/i915_gem_gtt.c -+++ b/drivers/gpu/drm/i915/i915_gem_gtt.c -@@ -522,7 +522,7 @@ void __i915_vm_close(struct i915_address_space *vm) - - atomic_and(~I915_VMA_PIN_MASK, &vma->flags); - WARN_ON(__i915_vma_unbind(vma)); -- i915_vma_destroy(vma); -+ __i915_vma_put(vma); - - i915_gem_object_put(obj); - } -@@ -1790,7 +1790,7 @@ static void gen6_ppgtt_cleanup(struct i915_address_space *vm) - { - struct gen6_ppgtt *ppgtt = to_gen6_ppgtt(i915_vm_to_ppgtt(vm)); - -- i915_vma_destroy(ppgtt->vma); -+ __i915_vma_put(ppgtt->vma); - - gen6_ppgtt_free_pd(ppgtt); - free_scratch(vm); -@@ -1878,6 +1878,7 @@ static struct i915_vma *pd_vma_create(struct gen6_ppgtt *ppgtt, int size) - - i915_active_init(&vma->active, NULL, NULL); - -+ kref_init(&vma->ref); - mutex_init(&vma->pages_mutex); - vma->vm = i915_vm_get(&ggtt->vm); - vma->ops = &pd_vma_ops; -diff --git a/drivers/gpu/drm/i915/i915_vma.c b/drivers/gpu/drm/i915/i915_vma.c -index 01c822256b39..00973017abba 100644 ---- a/drivers/gpu/drm/i915/i915_vma.c -+++ b/drivers/gpu/drm/i915/i915_vma.c -@@ -112,6 +112,7 @@ vma_create(struct drm_i915_gem_object *obj, - if (vma == NULL) - return ERR_PTR(-ENOMEM); - -+ kref_init(&vma->ref); - mutex_init(&vma->pages_mutex); - vma->vm = i915_vm_get(vm); - vma->ops = &vm->vma_ops; -@@ -978,8 +979,10 @@ void i915_vma_reopen(struct i915_vma *vma) - __i915_vma_remove_closed(vma); - } - --void i915_vma_destroy(struct i915_vma *vma) -+void i915_vma_release(struct kref *ref) - { -+ struct i915_vma *vma = container_of(ref, typeof(*vma), ref); -+ - if (drm_mm_node_allocated(&vma->node)) { - mutex_lock(&vma->vm->mutex); - atomic_and(~I915_VMA_PIN_MASK, &vma->flags); -@@ -1027,7 +1030,7 @@ void i915_vma_parked(struct intel_gt *gt) - spin_unlock_irq(>->closed_lock); - - if (obj) { -- i915_vma_destroy(vma); -+ __i915_vma_put(vma); - i915_gem_object_put(obj); - } - -@@ -1192,7 +1195,7 @@ int __i915_vma_unbind(struct i915_vma *vma) - i915_vma_detach(vma); - vma_unbind_pages(vma); - -- drm_mm_remove_node(&vma->node); /* pairs with i915_vma_destroy() */ -+ drm_mm_remove_node(&vma->node); /* pairs with i915_vma_release() */ - return 0; - } - -diff --git a/drivers/gpu/drm/i915/i915_vma.h b/drivers/gpu/drm/i915/i915_vma.h -index 465932813bc5..ce1db908ad69 100644 ---- a/drivers/gpu/drm/i915/i915_vma.h -+++ b/drivers/gpu/drm/i915/i915_vma.h -@@ -51,14 +51,19 @@ enum i915_cache_level; - */ - struct i915_vma { - struct drm_mm_node node; -- struct drm_i915_gem_object *obj; -+ - struct i915_address_space *vm; - const struct i915_vma_ops *ops; -- struct i915_fence_reg *fence; -+ -+ struct drm_i915_gem_object *obj; - struct dma_resv *resv; /** Alias of obj->resv */ -+ - struct sg_table *pages; - void __iomem *iomap; - void *private; /* owned by creator */ -+ -+ struct i915_fence_reg *fence; -+ - u64 size; - u64 display_alignment; - struct i915_page_sizes page_sizes; -@@ -71,6 +76,7 @@ struct i915_vma { - * handles (but same file) for execbuf, i.e. the number of aliases - * that exist in the ctx->handle_vmas LUT for this vma. - */ -+ struct kref ref; - atomic_t open_count; - atomic_t flags; - /** -@@ -333,7 +339,20 @@ int __must_check i915_vma_unbind(struct i915_vma *vma); - void i915_vma_unlink_ctx(struct i915_vma *vma); - void i915_vma_close(struct i915_vma *vma); - void i915_vma_reopen(struct i915_vma *vma); --void i915_vma_destroy(struct i915_vma *vma); -+ -+static inline struct i915_vma *__i915_vma_get(struct i915_vma *vma) -+{ -+ if (kref_get_unless_zero(&vma->ref)) -+ return vma; -+ -+ return NULL; -+} -+ -+void i915_vma_release(struct kref *ref); -+static inline void __i915_vma_put(struct i915_vma *vma) -+{ -+ kref_put(&vma->ref, i915_vma_release); -+} - - #define assert_vma_held(vma) dma_resv_assert_held((vma)->resv) - --- -2.26.0 - diff --git a/kernels/linux-libre-xtreme/0011-iwlwifi-don-t-send-GEO_TX_POWER_LIMIT-if-no-wgds-tab.patch b/kernels/linux-libre-xtreme/0011-iwlwifi-don-t-send-GEO_TX_POWER_LIMIT-if-no-wgds-tab.patch deleted file mode 100644 index 2003d7b14..000000000 --- a/kernels/linux-libre-xtreme/0011-iwlwifi-don-t-send-GEO_TX_POWER_LIMIT-if-no-wgds-tab.patch +++ /dev/null @@ -1,152 +0,0 @@ -From c596b143fad6e865f3f9de19c10c4b02998371f0 Mon Sep 17 00:00:00 2001 -From: Golan Ben Ami -Date: Wed, 18 Mar 2020 08:12:54 +0200 -Subject: [PATCH 11/11] iwlwifi: don't send GEO_TX_POWER_LIMIT if no wgds table - -The GEO_TX_POWER_LIMIT command was sent although -there is no wgds table, so the fw got wrong SAR values -from the driver. - -Fix this by avoiding sending the command if no wgds -tables are available. - -Signed-off-by: Golan Ben Ami -Fixes: 39c1a9728f93 ("iwlwifi: refactor the SAR tables from mvm to acpi") -Signed-off-by: Luca Coelho -Tested-By: Jonathan McDowell -Tested-by: Len Brown ---- - drivers/net/wireless/intel/iwlwifi/fw/acpi.c | 14 ++++++++------ - drivers/net/wireless/intel/iwlwifi/fw/acpi.h | 14 ++++++++------ - drivers/net/wireless/intel/iwlwifi/mvm/fw.c | 9 ++++++++- - 3 files changed, 24 insertions(+), 13 deletions(-) - -diff --git a/drivers/net/wireless/intel/iwlwifi/fw/acpi.c b/drivers/net/wireless/intel/iwlwifi/fw/acpi.c -index 48d375a86d86..ba2aff3af0fe 100644 ---- a/drivers/net/wireless/intel/iwlwifi/fw/acpi.c -+++ b/drivers/net/wireless/intel/iwlwifi/fw/acpi.c -@@ -6,7 +6,7 @@ - * GPL LICENSE SUMMARY - * - * Copyright(c) 2017 Intel Deutschland GmbH -- * Copyright (C) 2019 Intel Corporation -+ * Copyright (C) 2019 - 2020 Intel Corporation - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of version 2 of the GNU General Public License as -@@ -27,7 +27,7 @@ - * BSD LICENSE - * - * Copyright(c) 2017 Intel Deutschland GmbH -- * Copyright (C) 2019 Intel Corporation -+ * Copyright (C) 2019 - 2020 Intel Corporation - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without -@@ -491,13 +491,13 @@ int iwl_validate_sar_geo_profile(struct iwl_fw_runtime *fwrt, - } - IWL_EXPORT_SYMBOL(iwl_validate_sar_geo_profile); - --void iwl_sar_geo_init(struct iwl_fw_runtime *fwrt, -- struct iwl_per_chain_offset_group *table) -+int iwl_sar_geo_init(struct iwl_fw_runtime *fwrt, -+ struct iwl_per_chain_offset_group *table) - { - int ret, i, j; - - if (!iwl_sar_geo_support(fwrt)) -- return; -+ return -EOPNOTSUPP; - - ret = iwl_sar_get_wgds_table(fwrt); - if (ret < 0) { -@@ -505,7 +505,7 @@ void iwl_sar_geo_init(struct iwl_fw_runtime *fwrt, - "Geo SAR BIOS table invalid or unavailable. (%d)\n", - ret); - /* we don't fail if the table is not available */ -- return; -+ return -ENOENT; - } - - BUILD_BUG_ON(ACPI_NUM_GEO_PROFILES * ACPI_WGDS_NUM_BANDS * -@@ -530,5 +530,7 @@ void iwl_sar_geo_init(struct iwl_fw_runtime *fwrt, - i, j, value[1], value[2], value[0]); - } - } -+ -+ return 0; - } - IWL_EXPORT_SYMBOL(iwl_sar_geo_init); -diff --git a/drivers/net/wireless/intel/iwlwifi/fw/acpi.h b/drivers/net/wireless/intel/iwlwifi/fw/acpi.h -index 4a6e8262974b..5590e5cc8fbb 100644 ---- a/drivers/net/wireless/intel/iwlwifi/fw/acpi.h -+++ b/drivers/net/wireless/intel/iwlwifi/fw/acpi.h -@@ -6,7 +6,7 @@ - * GPL LICENSE SUMMARY - * - * Copyright(c) 2017 Intel Deutschland GmbH -- * Copyright(c) 2018 - 2019 Intel Corporation -+ * Copyright(c) 2018 - 2020 Intel Corporation - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of version 2 of the GNU General Public License as -@@ -27,7 +27,7 @@ - * BSD LICENSE - * - * Copyright(c) 2017 Intel Deutschland GmbH -- * Copyright(c) 2018 - 2019 Intel Corporation -+ * Copyright(c) 2018 - 2020 Intel Corporation - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without -@@ -171,8 +171,9 @@ bool iwl_sar_geo_support(struct iwl_fw_runtime *fwrt); - int iwl_validate_sar_geo_profile(struct iwl_fw_runtime *fwrt, - struct iwl_host_cmd *cmd); - --void iwl_sar_geo_init(struct iwl_fw_runtime *fwrt, -- struct iwl_per_chain_offset_group *table); -+int iwl_sar_geo_init(struct iwl_fw_runtime *fwrt, -+ struct iwl_per_chain_offset_group *table); -+ - #else /* CONFIG_ACPI */ - - static inline void *iwl_acpi_get_object(struct device *dev, acpi_string method) -@@ -243,9 +244,10 @@ static inline int iwl_validate_sar_geo_profile(struct iwl_fw_runtime *fwrt, - return -ENOENT; - } - --static inline void iwl_sar_geo_init(struct iwl_fw_runtime *fwrt, -- struct iwl_per_chain_offset_group *table) -+static inline int iwl_sar_geo_init(struct iwl_fw_runtime *fwrt, -+ struct iwl_per_chain_offset_group *table) - { -+ return -ENOENT; - } - - #endif /* CONFIG_ACPI */ -diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c -index c09624d8d7ee..81b7da5815eb 100644 ---- a/drivers/net/wireless/intel/iwlwifi/mvm/fw.c -+++ b/drivers/net/wireless/intel/iwlwifi/mvm/fw.c -@@ -749,10 +749,17 @@ static int iwl_mvm_sar_geo_init(struct iwl_mvm *mvm) - u16 cmd_wide_id = WIDE_ID(PHY_OPS_GROUP, GEO_TX_POWER_LIMIT); - union geo_tx_power_profiles_cmd cmd; - u16 len; -+ int ret; - - cmd.geo_cmd.ops = cpu_to_le32(IWL_PER_CHAIN_OFFSET_SET_TABLES); - -- iwl_sar_geo_init(&mvm->fwrt, cmd.geo_cmd.table); -+ ret = iwl_sar_geo_init(&mvm->fwrt, cmd.geo_cmd.table); -+ /* -+ * It is a valid scenario to not support SAR, or miss wgds table, -+ * but in that case there is no need to send the command. -+ */ -+ if (ret) -+ return 0; - - cmd.geo_cmd.table_revision = cpu_to_le32(mvm->fwrt.geo_rev); - --- -2.26.0 - diff --git a/kernels/linux-libre-xtreme/PKGBUILD b/kernels/linux-libre-xtreme/PKGBUILD deleted file mode 100644 index ea07b3d51..000000000 --- a/kernels/linux-libre-xtreme/PKGBUILD +++ /dev/null @@ -1,371 +0,0 @@ -# Maintainer: David P. - -# Based on linux package - -_replacesarchkernel=('linux%') # '%' gets replaced with kernel suffix -_replacesoldkernels=() # '%' gets replaced with kernel suffix -_replacesoldmodules=() # '%' gets replaced with kernel suffix - -pkgbase=linux-libre-xtreme -pkgver=5.5.13 -_hrdedrel=a -pkgrel=1 -pkgdesc='Security-Hardened Linux-libre (with Apparmor by default)' -rcnver=5.5.11 -rcnrel=armv7-x14 -url='https://wiki.parabola.nu/Xtreme' -arch=(i686 x86_64 armv7h) -license=(GPL2) -makedepends=( - bc kmod libelf - xmlto python-sphinx python-sphinx_rtd_theme graphviz imagemagick -) -options=('!strip') -_srcname=linux-5.5 -source=( - "https://linux-libre.fsfla.org/pub/linux-libre/releases/${_srcname##*-}-gnu/linux-libre-${_srcname##*-}-gnu.tar.xz"{,.sign} - "https://linux-libre.fsfla.org/pub/linux-libre/releases/$pkgver-gnu/patch-${_srcname##*-}-gnu-$pkgver-gnu.xz"{,.sign} - "https://repo.parabola.nu/other/linux-libre/logos/logo_linux_"{clut224.ppm,vga16.ppm,mono.pbm}{,.sig} - config.i686 config.x86_64 config.armv7h # the main kernel config files - linux-armv7h.preset # armv7h preset file for mkinitcpio ramdisk - - # maintain the TTY over USB disconnects - # http://www.coreboot.org/EHCI_Gadget_Debug - 0001-usb-serial-gadget-no-TTY-hangup-on-USB-disconnect-WI.patch - # fix Atmel maXTouch touchscreen support - # https://labs.parabola.nu/issues/877 - # http://www.fsfla.org/pipermail/linux-libre/2015-November/003202.html - 0002-fix-Atmel-maXTouch-touchscreen-support.patch - # extracted patches from Arch Linux kernel sources - 0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch - 0002-iwlwifi-pcie-restore-support-for-Killer-Qu-C0-NICs.patch - 0003-drm-Remove-PageReserved-manipulation-from-drm_pci_al.patch - 0004-drm-i915-Serialise-i915_active_acquire-with-__active.patch - 0005-drm-i915-gem-Take-runtime-pm-wakeref-prior-to-unbind.patch - 0006-drm-i915-gem-Avoid-parking-the-vma-as-we-unbind.patch - 0007-drm-i915-gem-Try-to-flush-pending-unbind-events.patch - 0008-drm-i915-gem-Reinitialise-the-local-list-before-repe.patch - 0009-drm-i915-Add-a-simple-is-bound-check-before-unbindin.patch - 0010-drm-i915-Introduce-a-vma.kref.patch - 0011-iwlwifi-don-t-send-GEO_TX_POWER_LIMIT-if-no-wgds-tab.patch -) -source_armv7h=( - # RCN patch (CM3 firmware deblobbed and bloatware removed) - "https://repo.parabola.nu/other/rcn-libre/patches/$rcnver/rcn-libre-$rcnver-$rcnrel.patch"{,.sig} - # Arch Linux ARM patches - 0001-ARM-atags-add-support-for-Marvell-s-u-boot.patch - 0002-ARM-atags-fdt-retrieve-MAC-addresses-from-Marvell-bo.patch - 0003-SMILE-Plug-device-tree-file.patch - 0004-fix-mvsdio-eMMC-timing.patch - 0005-net-smsc95xx-Allow-mac-address-to-be-set-as-a-parame.patch - 0006-set-default-cubietruck-led-triggers.patch - 0007-exynos4412-odroid-set-higher-minimum-buck2-regulator.patch - 0008-ARM-dove-enable-ethernet-on-D3Plug.patch - 0009-USB-Armory-MkII-support.patch - 0010-Revert-ARM-8947-1-Fix-__arch_get_hw_counter-access-t.patch -) -source_x86_64=("https://github.com/anthraxx/linux-hardened/releases/download/$pkgver.$_hrdedrel/linux-hardened-$pkgver.$_hrdedrel.patch"{,.sig}) -validpgpkeys=( - '474402C8C582DAFBE389C427BCB7CF877E7D47A7' # Alexandre Oliva - '65EEFE022108E2B708CBFCF7F9E712E59AF5F22A' # Daniel Micay - '6DB9C4B4F0D8C0DC432CF6E4227CA7C556B2BA78' # David P. - 'E240B57E2C4630BA768E2F26FC1B547C8D8172C8' # Levente Polyak -) -sha512sums=('187368a8fb4e04acfd7d18a024d6cdbc2841bcc06dcfbc3a053706e8512c3e3f573755228347c11bd791b296ec60eb2d67d5075ece2aef234a847e72f2b3e746' - 'SKIP' - '2c882f6256bb9409b59fde28183e71701e969aab8a0e36821550a639a5c5de3e3b129a708f0f9c83135653cfccc837601850b631fb6d63449e2083319aba1d30' - 'SKIP' - '13cb5bc42542e7b8bb104d5f68253f6609e463b6799800418af33eb0272cc269aaa36163c3e6f0aacbdaaa1d05e2827a4a7c4a08a029238439ed08b89c564bb3' - 'SKIP' - '7a3716bfe3b9f546da309c7492f3e08f8f506813afeb1c737a474c83313d5c313cf4582b65215c2cfce3b74d9d1021c96e8badafe8f6e5b01fe28d2b5c61ae78' - 'SKIP' - '267295aa0cea65684968420c68b32f1a66a22d018b9d2b2c1ef14267bcf4cb68aaf7099d073cbfefe6c25c8608bdcbbd45f7ac8893fdcecbf1e621abdfe9ecc1' - 'SKIP' - 'a5b2c5c1f3ef457b61d63c6df4a4d13b5020ab6317e4c66b280306d19de7ef56f5eb93e3b80fa8dc63a19660da47b070368acf3e65171913b17ed8aafd4bf178' - '6b3b28e59d40f78239bfda230a55182e53b32dd530a2cc1da5e4f19606aad9b6c20d1a5150a2faa4013a6881080577eb85442ee6831627984f48791b19ed6477' - '2390b976f5c7fb4044d079ee38129e9fbf793c9e93a4b4033c7e4df9d8482eb4f1ec436895500912f4d4301fd3339b1dbcdad80667c2d6521f240b4d63497744' - 'aca591b5a2e838754e3c5fd2c0e50098ad54c2d0f990de5bf9cff8608e881daf0e37132294ed1a0e0a7b9e1c194c0b89f95da001d94febdb25a01c409060e3ac' - '02af4dd2a007e41db0c63822c8ab3b80b5d25646af1906dc85d0ad9bb8bbf5236f8e381d7f91cf99ed4b0978c50aee37cb9567cdeef65b7ec3d91b882852b1af' - 'b8fe56e14006ab866970ddbd501c054ae37186ddc065bb869cf7d18db8c0d455118d5bda3255fb66a0dde38b544655cfe9040ffe46e41d19830b47959b2fb168' - 'dfe4fb9f41247bde1c0b7b53922f98d30efe6e2fa810673b4f897f3a54c02ea6aa2a37a0532a8b5d4e6a0e0b016d931757bd4d3e6b2e3ef03cf05e61fc748b20' - 'fb8a16c9c5cc398f2ce0bacdad37adcd740a6e48829a29f2991a5451f8ef455060d39ead11030ca7bff8d6317faff5a705b811eae935a33c990972840a74befa' - '7904b2463445f7bd6cbae2325d189cba99b61f363eb8b34decbd0074d9e54fbc5d2077b63491ba10a3a02021ce7f35dd8ee86561f523d032b1ce50193f83c0ac' - '96ad606769ef0d3b1dd7c86444675908ed79c10b4db82d6c8090d33ee1945da9c166f516dc2394ea0fe03e9333194c225239f8f5e712dd3d1fa490ddc461f655' - '3ad7761dbdf10b857239765cd72179d0fe95d5dd654dd83591f177886bc3f5b52d4c82994e77f86ac2a250003ca707003e8b576d37923f1412822ca8b44110b9' - 'af8823fd0a61177f31866e89050554b145cea13b73e9f907dda8dd8d07d1448b01bfb8057795f3ec83764639d1a5abc0d51c03fe4b7c9dd54a067568f488f04b' - '74009876f1ea4e5e3a705659ed0af28d1535c1dd4a42b478fafd75d7a2879a0138e67d29783252833ddda84c7703f155025f7cd4b2d775f385df3f4fa9bb8f02' - '0b4a6fdaaf9e4b65aca8910c78cf30749db0deaa2dbf8e38786e0483b81fdf7862e8bcb4c18e1612432c5a1f307e318a18df8c2e3410217d0e3aded1c1d917be' - '7dda55bfaf3b4f77901e6378ff7c6617cb65b1c731f908f6e64371aed02dee17f15530e74c4243255bb27a4a7d0db0254ea93de191b599e541501f726883bd7f' - '4f4bc1de6375276d38207d0a82aab58c422c0bb7f8565791f984693f4254bc1a1b5989b39fb765457294f56e6b2d17d1e753bd56b98c5c17f556b7992a08afac' - '8cabc3719077e6c2fc092b746f030182aeff2373fc670726fd96df1f9004f507f5631b47ee7c7e4ddf37fc11e90180308c1969285411558e18fda3818d74d9fb') -sha512sums_x86_64=('5356887d1d0ad4406ff1e090947e5c107b072fe4edb040ac5dc6f431c276ee24297f4a4b485ff016ea9024dea861bb4817cf07dcfb39e922e3caa5e4c069d185' - 'SKIP') -sha512sums_armv7h=('53b5ab4baaf9e58f31e72d5395a7bbb187bc90c75c3ef00a927e282a336e2f5dfe9e54c0d4ad5ab901037ddd7d5c472ae2539f5a6d44a02105bce95b2c23269c' - 'SKIP' - '4ad93d447d8671402dd7a2886b5c1329ffd5dd7b7f87e895f792ae937258c5016c7c0512ad03c4065da7520e656d0764d565171be463a378320fb210b54e3dee' - '780e4ce45b35b271dd3459b543681603c1f112f68d5f3500b7c01fdcac205a9d06e9ec13700e8841d4beb831e3e2dda1664a0ac38ef23bb5a47e2df0534767d7' - '7b5faabd9f4a766f92a285857ff750eff4ae08abb8435483ca5bc9a38c4852d373a960ed272ea35b6a055c7ca53d2f3ff869023f91b9dcd0c5adac912c16b109' - '1a75ee9c6a51a95f39a6cbe5b27c034b239dad232961033df0ce9ce01dea8aaa3aa819a0a6b724a468bee8b275f2d7c8a5c56992f3237a18c19cd8ecb3a930e8' - '42e8fa85e9aee0624a120c1260c187b6402d48334dc5db78f753ce5c4edab6d2f8c3d0bfcd65e8fc638c448c7a0ddec9c4f0f9fc6236651c30a5eba1d092453c' - '13e3f21591cd0952d0c29e99998edad4a594225007d3fbb2486a92c235f85246b68030dfb5d5d427cfc82627f85d60dd561add8dcc5570e431706394c14145a0' - 'e253bc19cd306a7b435d507761f3534677136c448885e7b6bf92b5bb28e79e2aad794a0e0b0874828a75146cbeb8586df7ab052effafb8484747c4d4d43f89a4' - 'a8203472a924b720c9f4d8eb05976028cf3ca1e595fddee1801f7594c0bef00b1cd788410b5f8fa28ee2d6ebf1403b6052334f777c53fce0b8958e8e66931d98' - 'dfdd22d4cb803e7dd3fd3455689147c5441392001d8695993f5e7dcad02ff0b4846dd6c53a1fdb67134022ef77e6433c52d38cbbbaccb9d9d849acb8d19c854e' - 'b1eb6025017cb5d73d330e3bf304252c8ec4ae607350d358cc2a78ac765982dec6029b94e85966c34f015d50a39e639caf27c5907bc8dd1a36a5e1f9de206f7f') - -_replacesarchkernel=("${_replacesarchkernel[@]/\%/${pkgbase#linux-libre}}") -_replacesoldkernels=("${_replacesoldkernels[@]/\%/${pkgbase#linux-libre}}") -_replacesoldmodules=("${_replacesoldmodules[@]/\%/${pkgbase#linux-libre}}") - -case "$CARCH" in - i686|x86_64) KARCH=x86;; - armv7h) KARCH=arm;; -esac - -export KBUILD_BUILD_HOST=parabola -export KBUILD_BUILD_USER=$pkgbase -export KBUILD_BUILD_TIMESTAMP="$(date -Ru${SOURCE_DATE_EPOCH:+d @$SOURCE_DATE_EPOCH})" - -prepare() { - cd $_srcname - - if [ "${_srcname##*-}" != "$pkgver" ]; then - echo "Applying upstream patch..." - patch -Np1 < "../patch-${_srcname##*-}-gnu-$pkgver-gnu" - fi - - echo "Adding freedo as boot logo..." - install -m644 -t drivers/video/logo \ - ../logo_linux_{clut224.ppm,vga16.ppm,mono.pbm} - - echo "Setting version..." - scripts/setlocalversion --save-scmversion - echo "-$pkgrel" > localversion.10-pkgrel - echo "${pkgbase#linux-libre}" > localversion.20-pkgname - - if [ "$CARCH" = "armv7h" ]; then - local src_armv7h - for src_armv7h in "${source_armv7h[@]}"; do - src_armv7h="${src_armv7h%%::*}" - src_armv7h="${src_armv7h##*/}" - [[ $src_armv7h = *.patch ]] || continue - echo "Applying patch $src_armv7h..." - patch -Np1 < "../$src_armv7h" - done - fi - - if [ "$CARCH" = "x86_64" ]; then - local src_x86_64 - for src_x86_64 in "${source_x86_64[@]}"; do - src_x86_64="${src_x86_64%%::*}" - src_x86_64="${src_x86_64##*/}" - [[ src_x86_64 = *.patch ]] || continue - echo "Applying patch $src_x86_64..." - patch -Np1 < "../$src_x86_64" - done - else - local src - for src in "${source[@]}"; do - src="${src%%::*}" - src="${src##*/}" - [[ $src = *.patch ]] || continue - echo "Applying patch $src..." - patch -Np1 < "../$src" - done - fi - - echo "Setting config..." - cp ../config.$CARCH .config - make olddefconfig - - make -s kernelrelease > version - echo "Prepared $pkgbase version $(