From 8b6aaebef14286fe6ab0da98616d235552785992 Mon Sep 17 00:00:00 2001 From: David P Date: Fri, 6 Dec 2019 13:15:18 -0300 Subject: updpkg: libre/linux-libre 5.4.2-1 Signed-off-by: David P --- ...RM-atags-add-support-for-Marvell-s-u-boot.patch | 4 +- ...ctl-and-CONFIG-to-disallow-unprivileged-C.patch | 20 +- ...dt-retrieve-MAC-addresses-from-Marvell-bo.patch | 4 +- ...idp-Fix-assumptions-on-the-return-value-o.patch | 63 ----- ...vres-add-a-helper-function-for-ioremap_uc.patch | 79 ++++++ .../0003-SMILE-Plug-device-tree-file.patch | 8 +- ...d-intel-lpss-Use-devm_ioremap_uc-for-MMIO.patch | 48 ++++ ...Do-not-disable-interrupt-twice-on-suspend.patch | 99 ++++++++ .../linux-libre/0004-fix-mvsdio-eMMC-timing.patch | 4 +- ...PCI-pciehp-Prevent-deadlock-on-disconnect.patch | 272 ++++++++++++++++++++ ...x-Allow-mac-address-to-be-set-as-a-parame.patch | 4 +- .../0006-set-default-cubietruck-led-triggers.patch | 6 +- ...odroid-set-higher-minimum-buck2-regulator.patch | 4 +- .../0008-ARM-dove-enable-ethernet-on-D3Plug.patch | 4 +- .../linux-libre/0009-USB-Armory-MkII-support.patch | 14 +- libre/linux-libre/PKGBUILD | 89 +++---- libre/linux-libre/config.armv7h | 183 ++++++++------ libre/linux-libre/config.i686 | 266 +++++++++++++++----- libre/linux-libre/config.x86_64 | 273 +++++++++++++++------ 19 files changed, 1080 insertions(+), 364 deletions(-) delete mode 100644 libre/linux-libre/0002-Bluetooth-hidp-Fix-assumptions-on-the-return-value-o.patch create mode 100644 libre/linux-libre/0002-lib-devres-add-a-helper-function-for-ioremap_uc.patch create mode 100644 libre/linux-libre/0003-mfd-intel-lpss-Use-devm_ioremap_uc-for-MMIO.patch create mode 100644 libre/linux-libre/0004-PCI-pciehp-Do-not-disable-interrupt-twice-on-suspend.patch create mode 100644 libre/linux-libre/0005-PCI-pciehp-Prevent-deadlock-on-disconnect.patch (limited to 'libre/linux-libre') diff --git a/libre/linux-libre/0001-ARM-atags-add-support-for-Marvell-s-u-boot.patch b/libre/linux-libre/0001-ARM-atags-add-support-for-Marvell-s-u-boot.patch index 5aa8ac6da..074903c47 100644 --- a/libre/linux-libre/0001-ARM-atags-add-support-for-Marvell-s-u-boot.patch +++ b/libre/linux-libre/0001-ARM-atags-add-support-for-Marvell-s-u-boot.patch @@ -1,4 +1,4 @@ -From 7e6e05267a620ba306a999982e685de549316c1d Mon Sep 17 00:00:00 2001 +From 88f69b1dcdda406ba9e4c6ad51f0577623d238b1 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Sun, 2 Dec 2012 19:59:28 +0100 Subject: [PATCH 1/9] ARM: atags: add support for Marvell's u-boot @@ -47,5 +47,5 @@ index 25ceda63b284..83578c54975b 100644 }; -- -2.22.0 +2.23.0 diff --git a/libre/linux-libre/0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch b/libre/linux-libre/0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch index 4f5e8626a..bcd694ec0 100644 --- a/libre/linux-libre/0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch +++ b/libre/linux-libre/0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch @@ -1,7 +1,7 @@ -From 9927eac296fb506ef31e1c926dfbfc1ceeb44852 Mon Sep 17 00:00:00 2001 +From 270144c854dea695a7721fdd3a5503eb4acae7e4 Mon Sep 17 00:00:00 2001 From: "Jan Alexander Steffens (heftig)" Date: Mon, 16 Sep 2019 04:53:20 +0200 -Subject: [PATCH 1/2] ZEN: Add sysctl and CONFIG to disallow unprivileged +Subject: [PATCH 1/5] ZEN: Add sysctl and CONFIG to disallow unprivileged CLONE_NEWUSER Our default behavior continues to match the vanilla kernel. @@ -13,10 +13,10 @@ Our default behavior continues to match the vanilla kernel. 4 files changed, 50 insertions(+) diff --git a/init/Kconfig b/init/Kconfig -index bd7d650d4a99..658f9c052151 100644 +index b4daad2bac23..362f82c5ec07 100644 --- a/init/Kconfig +++ b/init/Kconfig -@@ -1091,6 +1091,22 @@ config USER_NS +@@ -1118,6 +1118,22 @@ config USER_NS If unsure, say N. @@ -40,7 +40,7 @@ index bd7d650d4a99..658f9c052151 100644 bool "PID Namespaces" default y diff --git a/kernel/fork.c b/kernel/fork.c -index 3647097e6783..f092d7be6847 100644 +index 6cabc124378c..fda4986da9eb 100644 --- a/kernel/fork.c +++ b/kernel/fork.c @@ -106,6 +106,11 @@ @@ -55,7 +55,7 @@ index 3647097e6783..f092d7be6847 100644 /* * Minimum number of threads to boot the kernel -@@ -1788,6 +1793,10 @@ static __latent_entropy struct task_struct *copy_process( +@@ -1779,6 +1784,10 @@ static __latent_entropy struct task_struct *copy_process( if ((clone_flags & (CLONE_NEWUSER|CLONE_FS)) == (CLONE_NEWUSER|CLONE_FS)) return ERR_PTR(-EINVAL); @@ -66,7 +66,7 @@ index 3647097e6783..f092d7be6847 100644 /* * Thread groups must share signals as well, and detached threads * can only be started up within the thread group. -@@ -2819,6 +2828,12 @@ int ksys_unshare(unsigned long unshare_flags) +@@ -2826,6 +2835,12 @@ int ksys_unshare(unsigned long unshare_flags) if (unshare_flags & CLONE_NEWNS) unshare_flags |= CLONE_FS; @@ -80,7 +80,7 @@ index 3647097e6783..f092d7be6847 100644 if (err) goto bad_unshare_out; diff --git a/kernel/sysctl.c b/kernel/sysctl.c -index 078950d9605b..baead3605bbe 100644 +index b6f2f35d0bcf..2e9c273990e8 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c @@ -110,6 +110,9 @@ extern int core_uses_pid; @@ -93,7 +93,7 @@ index 078950d9605b..baead3605bbe 100644 extern int pid_max; extern int pid_max_min, pid_max_max; extern int percpu_pagelist_fraction; -@@ -545,6 +548,15 @@ static struct ctl_table kern_table[] = { +@@ -546,6 +549,15 @@ static struct ctl_table kern_table[] = { .proc_handler = proc_dointvec, }, #endif @@ -128,5 +128,5 @@ index 8eadadc478f9..c36ecd19562c 100644 static DEFINE_MUTEX(userns_state_mutex); -- -2.23.0 +2.24.0 diff --git a/libre/linux-libre/0002-ARM-atags-fdt-retrieve-MAC-addresses-from-Marvell-bo.patch b/libre/linux-libre/0002-ARM-atags-fdt-retrieve-MAC-addresses-from-Marvell-bo.patch index cb71b2f2f..546120041 100644 --- a/libre/linux-libre/0002-ARM-atags-fdt-retrieve-MAC-addresses-from-Marvell-bo.patch +++ b/libre/linux-libre/0002-ARM-atags-fdt-retrieve-MAC-addresses-from-Marvell-bo.patch @@ -1,4 +1,4 @@ -From b59d7aa4ef5ee2411cb65395dac623ed598095b6 Mon Sep 17 00:00:00 2001 +From cb931641740269a78b002b438904292a1110a5a7 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Sun, 2 Dec 2012 19:56:58 +0100 Subject: [PATCH 2/9] ARM: atags/fdt: retrieve MAC addresses from Marvell boot @@ -43,5 +43,5 @@ index 330cd3c2eae5..82f3802ff695 100644 } -- -2.22.0 +2.23.0 diff --git a/libre/linux-libre/0002-Bluetooth-hidp-Fix-assumptions-on-the-return-value-o.patch b/libre/linux-libre/0002-Bluetooth-hidp-Fix-assumptions-on-the-return-value-o.patch deleted file mode 100644 index aaefa37bb..000000000 --- a/libre/linux-libre/0002-Bluetooth-hidp-Fix-assumptions-on-the-return-value-o.patch +++ /dev/null @@ -1,63 +0,0 @@ -From 0bee55974a73eed4a9b9c9e87000df34117e7f69 Mon Sep 17 00:00:00 2001 -From: Dan Elkouby -Date: Fri, 6 Sep 2019 14:06:44 +0300 -Subject: [PATCH 2/2] Bluetooth: hidp: Fix assumptions on the return value of - hidp_send_message - -hidp_send_message was changed to return non-zero values on success, -which some other bits did not expect. This caused spurious errors to be -propagated through the stack, breaking some drivers, such as hid-sony -for the Dualshock 4 in Bluetooth mode. - -As pointed out by Dan Carpenter, hid-microsoft directly relied on that -assumption as well. - -Fixes: 48d9cc9d85dd ("Bluetooth: hidp: Let hidp_send_message return number of queued bytes") - -Signed-off-by: Dan Elkouby -Reviewed-by: Dan Carpenter -Reviewed-by: Jiri Kosina -Signed-off-by: Marcel Holtmann ---- - drivers/hid/hid-microsoft.c | 2 +- - net/bluetooth/hidp/core.c | 4 ++-- - 2 files changed, 3 insertions(+), 3 deletions(-) - -diff --git a/drivers/hid/hid-microsoft.c b/drivers/hid/hid-microsoft.c -index 8b3a922bdad3..2cf83856f2e4 100644 ---- a/drivers/hid/hid-microsoft.c -+++ b/drivers/hid/hid-microsoft.c -@@ -303,7 +303,7 @@ static void ms_ff_worker(struct work_struct *work) - r->magnitude[MAGNITUDE_WEAK] = ms->weak; /* right actuator */ - - ret = hid_hw_output_report(hdev, (__u8 *)r, sizeof(*r)); -- if (ret) -+ if (ret < 0) - hid_warn(hdev, "failed to send FF report\n"); - } - -diff --git a/net/bluetooth/hidp/core.c b/net/bluetooth/hidp/core.c -index 8d889969ae7e..bef84b95e2c4 100644 ---- a/net/bluetooth/hidp/core.c -+++ b/net/bluetooth/hidp/core.c -@@ -267,7 +267,7 @@ static int hidp_get_raw_report(struct hid_device *hid, - set_bit(HIDP_WAITING_FOR_RETURN, &session->flags); - data[0] = report_number; - ret = hidp_send_ctrl_message(session, report_type, data, 1); -- if (ret) -+ if (ret < 0) - goto err; - - /* Wait for the return of the report. The returned report -@@ -343,7 +343,7 @@ static int hidp_set_raw_report(struct hid_device *hid, unsigned char reportnum, - data[0] = reportnum; - set_bit(HIDP_WAITING_FOR_SEND_ACK, &session->flags); - ret = hidp_send_ctrl_message(session, report_type, data, count); -- if (ret) -+ if (ret < 0) - goto err; - - /* Wait for the ACK from the device. */ --- -2.23.0 - diff --git a/libre/linux-libre/0002-lib-devres-add-a-helper-function-for-ioremap_uc.patch b/libre/linux-libre/0002-lib-devres-add-a-helper-function-for-ioremap_uc.patch new file mode 100644 index 000000000..9befdd67a --- /dev/null +++ b/libre/linux-libre/0002-lib-devres-add-a-helper-function-for-ioremap_uc.patch @@ -0,0 +1,79 @@ +From f20221735640685313d5020d7e6db4aad293a3ae Mon Sep 17 00:00:00 2001 +From: Tuowen Zhao +Date: Wed, 16 Oct 2019 15:06:28 -0600 +Subject: [PATCH 2/5] lib: devres: add a helper function for ioremap_uc + +Implement a resource managed strongly uncachable ioremap function. + +Cc: # v4.19+ +Tested-by: AceLan Kao +Signed-off-by: Tuowen Zhao +Acked-by: Mika Westerberg +Acked-by: Andy Shevchenko +Acked-by: Luis Chamberlain +Signed-off-by: Lee Jones +--- + include/linux/io.h | 2 ++ + lib/devres.c | 19 +++++++++++++++++++ + 2 files changed, 21 insertions(+) + +diff --git a/include/linux/io.h b/include/linux/io.h +index accac822336a..a59834bc0a11 100644 +--- a/include/linux/io.h ++++ b/include/linux/io.h +@@ -64,6 +64,8 @@ static inline void devm_ioport_unmap(struct device *dev, void __iomem *addr) + + void __iomem *devm_ioremap(struct device *dev, resource_size_t offset, + resource_size_t size); ++void __iomem *devm_ioremap_uc(struct device *dev, resource_size_t offset, ++ resource_size_t size); + void __iomem *devm_ioremap_nocache(struct device *dev, resource_size_t offset, + resource_size_t size); + void __iomem *devm_ioremap_wc(struct device *dev, resource_size_t offset, +diff --git a/lib/devres.c b/lib/devres.c +index 6a0e9bd6524a..17624d35e82d 100644 +--- a/lib/devres.c ++++ b/lib/devres.c +@@ -9,6 +9,7 @@ + enum devm_ioremap_type { + DEVM_IOREMAP = 0, + DEVM_IOREMAP_NC, ++ DEVM_IOREMAP_UC, + DEVM_IOREMAP_WC, + }; + +@@ -39,6 +40,9 @@ static void __iomem *__devm_ioremap(struct device *dev, resource_size_t offset, + case DEVM_IOREMAP_NC: + addr = ioremap_nocache(offset, size); + break; ++ case DEVM_IOREMAP_UC: ++ addr = ioremap_uc(offset, size); ++ break; + case DEVM_IOREMAP_WC: + addr = ioremap_wc(offset, size); + break; +@@ -68,6 +72,21 @@ void __iomem *devm_ioremap(struct device *dev, resource_size_t offset, + } + EXPORT_SYMBOL(devm_ioremap); + ++/** ++ * devm_ioremap_uc - Managed ioremap_uc() ++ * @dev: Generic device to remap IO address for ++ * @offset: Resource address to map ++ * @size: Size of map ++ * ++ * Managed ioremap_uc(). Map is automatically unmapped on driver detach. ++ */ ++void __iomem *devm_ioremap_uc(struct device *dev, resource_size_t offset, ++ resource_size_t size) ++{ ++ return __devm_ioremap(dev, offset, size, DEVM_IOREMAP_UC); ++} ++EXPORT_SYMBOL_GPL(devm_ioremap_uc); ++ + /** + * devm_ioremap_nocache - Managed ioremap_nocache() + * @dev: Generic device to remap IO address for +-- +2.24.0 + diff --git a/libre/linux-libre/0003-SMILE-Plug-device-tree-file.patch b/libre/linux-libre/0003-SMILE-Plug-device-tree-file.patch index 8ab6b76b8..b07e149b7 100644 --- a/libre/linux-libre/0003-SMILE-Plug-device-tree-file.patch +++ b/libre/linux-libre/0003-SMILE-Plug-device-tree-file.patch @@ -1,4 +1,4 @@ -From 0d1cf24a03256d2a666e720babcd174ae97bfddb Mon Sep 17 00:00:00 2001 +From 8dc29eb34efbef2aa3ce6e499cea11765286ffbd Mon Sep 17 00:00:00 2001 From: Kevin Mihelich Date: Fri, 5 Sep 2014 15:41:19 -0600 Subject: [PATCH 3/9] SMILE Plug device tree file @@ -14,10 +14,10 @@ Signed-off-by: Kevin Mihelich 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 9159fa2cea90..b73aca44d87a 100644 +index b21b3a64641a..a0f92b9dbd7d 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile -@@ -1206,6 +1206,7 @@ dtb-$(CONFIG_MACH_ARMADA_370) += \ +@@ -1216,6 +1216,7 @@ dtb-$(CONFIG_MACH_ARMADA_370) += \ armada-370-db.dtb \ armada-370-dlink-dns327l.dtb \ armada-370-mirabox.dtb \ @@ -205,5 +205,5 @@ index 000000000000..d01308ab848b + }; +}; -- -2.22.0 +2.23.0 diff --git a/libre/linux-libre/0003-mfd-intel-lpss-Use-devm_ioremap_uc-for-MMIO.patch b/libre/linux-libre/0003-mfd-intel-lpss-Use-devm_ioremap_uc-for-MMIO.patch new file mode 100644 index 000000000..926097948 --- /dev/null +++ b/libre/linux-libre/0003-mfd-intel-lpss-Use-devm_ioremap_uc-for-MMIO.patch @@ -0,0 +1,48 @@ +From affb9e39e0d2b1eefff47e2dc0a0aa3893b9bb5d Mon Sep 17 00:00:00 2001 +From: Tuowen Zhao +Date: Wed, 16 Oct 2019 15:06:29 -0600 +Subject: [PATCH 3/5] mfd: intel-lpss: Use devm_ioremap_uc for MMIO + +Some BIOS erroneously specifies write-combining BAR for intel-lpss-pci +in MTRR. This will cause the system to hang during boot. If possible, +this bug could be corrected with a firmware update. + +This patch use devm_ioremap_uc to overwrite/ignore the MTRR settings +by forcing the use of strongly uncachable pages for intel-lpss. + +The BIOS bug is present on Dell XPS 13 7390 2-in-1: + +[ 0.001734] 5 base 4000000000 mask 6000000000 write-combining + +4000000000-7fffffffff : PCI Bus 0000:00 + 4000000000-400fffffff : 0000:00:02.0 (i915) + 4010000000-4010000fff : 0000:00:15.0 (intel-lpss-pci) + +Link: https://bugzilla.kernel.org/show_bug.cgi?id=203485 +Cc: # v4.19+ +Tested-by: AceLan Kao +Signed-off-by: Tuowen Zhao +Acked-by: Mika Westerberg +Acked-by: Andy Shevchenko +Tested-by: Roman Gilg +Signed-off-by: Lee Jones +--- + drivers/mfd/intel-lpss.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/mfd/intel-lpss.c b/drivers/mfd/intel-lpss.c +index bfe4ff337581..b0f0781a6b9c 100644 +--- a/drivers/mfd/intel-lpss.c ++++ b/drivers/mfd/intel-lpss.c +@@ -384,7 +384,7 @@ int intel_lpss_probe(struct device *dev, + if (!lpss) + return -ENOMEM; + +- lpss->priv = devm_ioremap(dev, info->mem->start + LPSS_PRIV_OFFSET, ++ lpss->priv = devm_ioremap_uc(dev, info->mem->start + LPSS_PRIV_OFFSET, + LPSS_PRIV_SIZE); + if (!lpss->priv) + return -ENOMEM; +-- +2.24.0 + diff --git a/libre/linux-libre/0004-PCI-pciehp-Do-not-disable-interrupt-twice-on-suspend.patch b/libre/linux-libre/0004-PCI-pciehp-Do-not-disable-interrupt-twice-on-suspend.patch new file mode 100644 index 000000000..f3cba134a --- /dev/null +++ b/libre/linux-libre/0004-PCI-pciehp-Do-not-disable-interrupt-twice-on-suspend.patch @@ -0,0 +1,99 @@ +From bdbb6d41bab0f525b679cf5018f77d5299773568 Mon Sep 17 00:00:00 2001 +From: Mika Westerberg +Date: Tue, 29 Oct 2019 20:00:21 +0300 +Subject: [PATCH 4/5] PCI: pciehp: Do not disable interrupt twice on suspend + +We try to keep PCIe hotplug ports runtime suspended when entering system +suspend. Because the PCIe portdrv sets the DPM_FLAG_NEVER_SKIP flag, the PM +core always calls system suspend/resume hooks even if the device is left +runtime suspended. Since PCIe hotplug driver re-used the same function for +both runtime suspend and system suspend, it ended up disabling hotplug +interrupt twice and the second time following was printed: + + pciehp 0000:03:01.0:pcie204: pcie_do_write_cmd: no response from device + +Prevent this from happening by checking whether the device is already +runtime suspended when the system suspend hook is called. + +Fixes: 9c62f0bfb832 ("PCI: pciehp: Implement runtime PM callbacks") +Link: https://lore.kernel.org/r/20191029170022.57528-1-mika.westerberg@linux.intel.com +Reported-by: Kai-Heng Feng +Tested-by: Kai-Heng Feng +Signed-off-by: Mika Westerberg +Signed-off-by: Bjorn Helgaas +Reviewed-by: Rafael J. Wysocki +--- + drivers/pci/hotplug/pciehp_core.c | 25 +++++++++++++++++++++++-- + 1 file changed, 23 insertions(+), 2 deletions(-) + +diff --git a/drivers/pci/hotplug/pciehp_core.c b/drivers/pci/hotplug/pciehp_core.c +index b3122c151b80..56daad828c9e 100644 +--- a/drivers/pci/hotplug/pciehp_core.c ++++ b/drivers/pci/hotplug/pciehp_core.c +@@ -253,7 +253,7 @@ static bool pme_is_native(struct pcie_device *dev) + return pcie_ports_native || host->native_pme; + } + +-static int pciehp_suspend(struct pcie_device *dev) ++static void pciehp_disable_interrupt(struct pcie_device *dev) + { + /* + * Disable hotplug interrupt so that it does not trigger +@@ -261,7 +261,19 @@ static int pciehp_suspend(struct pcie_device *dev) + */ + if (pme_is_native(dev)) + pcie_disable_interrupt(get_service_data(dev)); ++} + ++#ifdef CONFIG_PM_SLEEP ++static int pciehp_suspend(struct pcie_device *dev) ++{ ++ /* ++ * If the port is already runtime suspended we can keep it that ++ * way. ++ */ ++ if (dev_pm_smart_suspend_and_suspended(&dev->port->dev)) ++ return 0; ++ ++ pciehp_disable_interrupt(dev); + return 0; + } + +@@ -279,6 +291,7 @@ static int pciehp_resume_noirq(struct pcie_device *dev) + + return 0; + } ++#endif + + static int pciehp_resume(struct pcie_device *dev) + { +@@ -292,6 +305,12 @@ static int pciehp_resume(struct pcie_device *dev) + return 0; + } + ++static int pciehp_runtime_suspend(struct pcie_device *dev) ++{ ++ pciehp_disable_interrupt(dev); ++ return 0; ++} ++ + static int pciehp_runtime_resume(struct pcie_device *dev) + { + struct controller *ctrl = get_service_data(dev); +@@ -318,10 +337,12 @@ static struct pcie_port_service_driver hpdriver_portdrv = { + .remove = pciehp_remove, + + #ifdef CONFIG_PM ++#ifdef CONFIG_PM_SLEEP + .suspend = pciehp_suspend, + .resume_noirq = pciehp_resume_noirq, + .resume = pciehp_resume, +- .runtime_suspend = pciehp_suspend, ++#endif ++ .runtime_suspend = pciehp_runtime_suspend, + .runtime_resume = pciehp_runtime_resume, + #endif /* PM */ + }; +-- +2.24.0 + diff --git a/libre/linux-libre/0004-fix-mvsdio-eMMC-timing.patch b/libre/linux-libre/0004-fix-mvsdio-eMMC-timing.patch index a114fabb3..791a546d6 100644 --- a/libre/linux-libre/0004-fix-mvsdio-eMMC-timing.patch +++ b/libre/linux-libre/0004-fix-mvsdio-eMMC-timing.patch @@ -1,4 +1,4 @@ -From a3c359493c03401d2f40c6536d7715260d83d50b Mon Sep 17 00:00:00 2001 +From 579d132a05177e4b85d3ff2321762948fd78b420 Mon Sep 17 00:00:00 2001 From: Kevin Mihelich Date: Fri, 5 Sep 2014 15:43:56 -0600 Subject: [PATCH 4/9] fix mvsdio eMMC timing @@ -34,5 +34,5 @@ index 74a0a7fbbf7f..92eadb116762 100644 host->clock = ios->clock; host->ns_per_clk = 1000000000 / (host->base_clock / (m+1)); -- -2.22.0 +2.23.0 diff --git a/libre/linux-libre/0005-PCI-pciehp-Prevent-deadlock-on-disconnect.patch b/libre/linux-libre/0005-PCI-pciehp-Prevent-deadlock-on-disconnect.patch new file mode 100644 index 000000000..0fc654b74 --- /dev/null +++ b/libre/linux-libre/0005-PCI-pciehp-Prevent-deadlock-on-disconnect.patch @@ -0,0 +1,272 @@ +From 23db61d908b9a4854c9b15565d4cbfa800c45cfe Mon Sep 17 00:00:00 2001 +From: Mika Westerberg +Date: Tue, 29 Oct 2019 20:00:22 +0300 +Subject: [PATCH 5/5] PCI: pciehp: Prevent deadlock on disconnect + +This addresses deadlocks in these common cases in hierarchies containing +two switches: + + - All involved ports are runtime suspended and they are unplugged. This + can happen easily if the drivers involved automatically enable runtime + PM (xHCI for example does that). + + - System is suspended (e.g., closing the lid on a laptop) with a dock + + something else connected, and the dock is unplugged while suspended. + +These cases lead to the following deadlock: + + INFO: task irq/126-pciehp:198 blocked for more than 120 seconds. + irq/126-pciehp D 0 198 2 0x80000000 + Call Trace: + schedule+0x2c/0x80 + schedule_timeout+0x246/0x350 + wait_for_completion+0xb7/0x140 + kthread_stop+0x49/0x110 + free_irq+0x32/0x70 + pcie_shutdown_notification+0x2f/0x50 + pciehp_remove+0x27/0x50 + pcie_port_remove_service+0x36/0x50 + device_release_driver+0x12/0x20 + bus_remove_device+0xec/0x160 + device_del+0x13b/0x350 + device_unregister+0x1a/0x60 + remove_iter+0x1e/0x30 + device_for_each_child+0x56/0x90 + pcie_port_device_remove+0x22/0x40 + pcie_portdrv_remove+0x20/0x60 + pci_device_remove+0x3e/0xc0 + device_release_driver_internal+0x18c/0x250 + device_release_driver+0x12/0x20 + pci_stop_bus_device+0x6f/0x90 + pci_stop_bus_device+0x31/0x90 + pci_stop_and_remove_bus_device+0x12/0x20 + pciehp_unconfigure_device+0x88/0x140 + pciehp_disable_slot+0x6a/0x110 + pciehp_handle_presence_or_link_change+0x263/0x400 + pciehp_ist+0x1c9/0x1d0 + irq_thread_fn+0x24/0x60 + irq_thread+0xeb/0x190 + kthread+0x120/0x140 + + INFO: task irq/190-pciehp:2288 blocked for more than 120 seconds. + irq/190-pciehp D 0 2288 2 0x80000000 + Call Trace: + __schedule+0x2a2/0x880 + schedule+0x2c/0x80 + schedule_preempt_disabled+0xe/0x10 + mutex_lock+0x2c/0x30 + pci_lock_rescan_remove+0x15/0x20 + pciehp_unconfigure_device+0x4d/0x140 + pciehp_disable_slot+0x6a/0x110 + pciehp_handle_presence_or_link_change+0x263/0x400 + pciehp_ist+0x1c9/0x1d0 + irq_thread_fn+0x24/0x60 + irq_thread+0xeb/0x190 + kthread+0x120/0x140 + +What happens here is that the whole hierarchy is runtime resumed and the +parent PCIe downstream port, which got the hot-remove event, starts +removing devices below it, taking pci_lock_rescan_remove() lock. When the +child PCIe port is runtime resumed it calls pciehp_check_presence() which +ends up calling pciehp_card_present() and pciehp_check_link_active(). Both +of these use pcie_capability_read_word(), which notices that the underlying +device is already gone and returns PCIBIOS_DEVICE_NOT_FOUND with the +capability value set to 0. When pciehp gets this value it thinks that its +child device is also hot-removed and schedules its IRQ thread to handle the +event. + +The deadlock happens when the child's IRQ thread runs and tries to acquire +pci_lock_rescan_remove() which is already taken by the parent and the +parent waits for the child's IRQ thread to finish. + +Prevent this from happening by checking the return value of +pcie_capability_read_word() and if it is PCIBIOS_DEVICE_NOT_FOUND stop +performing any hot-removal activities. + +[bhelgaas: add common scenarios to commit log] +Link: https://lore.kernel.org/r/20191029170022.57528-2-mika.westerberg@linux.intel.com +Tested-by: Kai-Heng Feng +Signed-off-by: Mika Westerberg +Signed-off-by: Bjorn Helgaas +--- + drivers/pci/hotplug/pciehp.h | 6 ++-- + drivers/pci/hotplug/pciehp_core.c | 11 ++++-- + drivers/pci/hotplug/pciehp_ctrl.c | 4 +-- + drivers/pci/hotplug/pciehp_hpc.c | 59 +++++++++++++++++++++++++------ + 4 files changed, 61 insertions(+), 19 deletions(-) + +diff --git a/drivers/pci/hotplug/pciehp.h b/drivers/pci/hotplug/pciehp.h +index 654c972b8ea0..afea59a3aad2 100644 +--- a/drivers/pci/hotplug/pciehp.h ++++ b/drivers/pci/hotplug/pciehp.h +@@ -172,10 +172,10 @@ void pciehp_set_indicators(struct controller *ctrl, int pwr, int attn); + + void pciehp_get_latch_status(struct controller *ctrl, u8 *status); + int pciehp_query_power_fault(struct controller *ctrl); +-bool pciehp_card_present(struct controller *ctrl); +-bool pciehp_card_present_or_link_active(struct controller *ctrl); ++int pciehp_card_present(struct controller *ctrl); ++int pciehp_card_present_or_link_active(struct controller *ctrl); + int pciehp_check_link_status(struct controller *ctrl); +-bool pciehp_check_link_active(struct controller *ctrl); ++int pciehp_check_link_active(struct controller *ctrl); + void pciehp_release_ctrl(struct controller *ctrl); + + int pciehp_sysfs_enable_slot(struct hotplug_slot *hotplug_slot); +diff --git a/drivers/pci/hotplug/pciehp_core.c b/drivers/pci/hotplug/pciehp_core.c +index 56daad828c9e..312cc45c44c7 100644 +--- a/drivers/pci/hotplug/pciehp_core.c ++++ b/drivers/pci/hotplug/pciehp_core.c +@@ -139,10 +139,15 @@ static int get_adapter_status(struct hotplug_slot *hotplug_slot, u8 *value) + { + struct controller *ctrl = to_ctrl(hotplug_slot); + struct pci_dev *pdev = ctrl->pcie->port; ++ int ret; + + pci_config_pm_runtime_get(pdev); +- *value = pciehp_card_present_or_link_active(ctrl); ++ ret = pciehp_card_present_or_link_active(ctrl); + pci_config_pm_runtime_put(pdev); ++ if (ret < 0) ++ return ret; ++ ++ *value = ret; + return 0; + } + +@@ -158,13 +163,13 @@ static int get_adapter_status(struct hotplug_slot *hotplug_slot, u8 *value) + */ + static void pciehp_check_presence(struct controller *ctrl) + { +- bool occupied; ++ int occupied; + + down_read(&ctrl->reset_lock); + mutex_lock(&ctrl->state_lock); + + occupied = pciehp_card_present_or_link_active(ctrl); +- if ((occupied && (ctrl->state == OFF_STATE || ++ if ((occupied > 0 && (ctrl->state == OFF_STATE || + ctrl->state == BLINKINGON_STATE)) || + (!occupied && (ctrl->state == ON_STATE || + ctrl->state == BLINKINGOFF_STATE))) +diff --git a/drivers/pci/hotplug/pciehp_ctrl.c b/drivers/pci/hotplug/pciehp_ctrl.c +index 21af7b16d7a4..c760a13ec7b1 100644 +--- a/drivers/pci/hotplug/pciehp_ctrl.c ++++ b/drivers/pci/hotplug/pciehp_ctrl.c +@@ -226,7 +226,7 @@ void pciehp_handle_disable_request(struct controller *ctrl) + + void pciehp_handle_presence_or_link_change(struct controller *ctrl, u32 events) + { +- bool present, link_active; ++ int present, link_active; + + /* + * If the slot is on and presence or link has changed, turn it off. +@@ -257,7 +257,7 @@ void pciehp_handle_presence_or_link_change(struct controller *ctrl, u32 events) + mutex_lock(&ctrl->state_lock); + present = pciehp_card_present(ctrl); + link_active = pciehp_check_link_active(ctrl); +- if (!present && !link_active) { ++ if (present <= 0 && link_active <= 0) { + mutex_unlock(&ctrl->state_lock); + return; + } +diff --git a/drivers/pci/hotplug/pciehp_hpc.c b/drivers/pci/hotplug/pciehp_hpc.c +index 1a522c1c4177..526a8f70bac5 100644 +--- a/drivers/pci/hotplug/pciehp_hpc.c ++++ b/drivers/pci/hotplug/pciehp_hpc.c +@@ -201,17 +201,29 @@ static void pcie_write_cmd_nowait(struct controller *ctrl, u16 cmd, u16 mask) + pcie_do_write_cmd(ctrl, cmd, mask, false); + } + +-bool pciehp_check_link_active(struct controller *ctrl) ++/** ++ * pciehp_check_link_active() - Is the link active ++ * @ctrl: PCIe hotplug controller ++ * ++ * Check whether the downstream link is currently active. Note it is ++ * possible that the card is removed immediately after this so the ++ * caller may need to take it into account. ++ * ++ * If the hotplug controller itself is not available anymore returns ++ * %-ENODEV. ++ */ ++int pciehp_check_link_active(struct controller *ctrl) + { + struct pci_dev *pdev = ctrl_dev(ctrl); + u16 lnk_status; +- bool ret; ++ int ret; + +- pcie_capability_read_word(pdev, PCI_EXP_LNKSTA, &lnk_status); +- ret = !!(lnk_status & PCI_EXP_LNKSTA_DLLLA); ++ ret = pcie_capability_read_word(pdev, PCI_EXP_LNKSTA, &lnk_status); ++ if (ret == PCIBIOS_DEVICE_NOT_FOUND || lnk_status == (u16)~0) ++ return -ENODEV; + +- if (ret) +- ctrl_dbg(ctrl, "%s: lnk_status = %x\n", __func__, lnk_status); ++ ret = !!(lnk_status & PCI_EXP_LNKSTA_DLLLA); ++ ctrl_dbg(ctrl, "%s: lnk_status = %x\n", __func__, lnk_status); + + return ret; + } +@@ -373,13 +385,29 @@ void pciehp_get_latch_status(struct controller *ctrl, u8 *status) + *status = !!(slot_status & PCI_EXP_SLTSTA_MRLSS); + } + +-bool pciehp_card_present(struct controller *ctrl) ++/** ++ * pciehp_card_present() - Is the card present ++ * @ctrl: PCIe hotplug controller ++ * ++ * Function checks whether the card is currently present in the slot and ++ * in that case returns true. Note it is possible that the card is ++ * removed immediately after the check so the caller may need to take ++ * this into account. ++ * ++ * It the hotplug controller itself is not available anymore returns ++ * %-ENODEV. ++ */ ++int pciehp_card_present(struct controller *ctrl) + { + struct pci_dev *pdev = ctrl_dev(ctrl); + u16 slot_status; ++ int ret; + +- pcie_capability_read_word(pdev, PCI_EXP_SLTSTA, &slot_status); +- return slot_status & PCI_EXP_SLTSTA_PDS; ++ ret = pcie_capability_read_word(pdev, PCI_EXP_SLTSTA, &slot_status); ++ if (ret == PCIBIOS_DEVICE_NOT_FOUND || slot_status == (u16)~0) ++ return -ENODEV; ++ ++ return !!(slot_status & PCI_EXP_SLTSTA_PDS); + } + + /** +@@ -390,10 +418,19 @@ bool pciehp_card_present(struct controller *ctrl) + * Presence Detect State bit, this helper also returns true if the Link Active + * bit is set. This is a concession to broken hotplug ports which hardwire + * Presence Detect State to zero, such as Wilocity's [1ae9:0200]. ++ * ++ * Returns: %1 if the slot is occupied and %0 if it is not. If the hotplug ++ * port is not present anymore returns %-ENODEV. + */ +-bool pciehp_card_present_or_link_active(struct controller *ctrl) ++int pciehp_card_present_or_link_active(struct controller *ctrl) + { +- return pciehp_card_present(ctrl) || pciehp_check_link_active(ctrl); ++ int ret; ++ ++ ret = pciehp_card_present(ctrl); ++ if (ret) ++ return ret; ++ ++ return pciehp_check_link_active(ctrl); + } + + int pciehp_query_power_fault(struct controller *ctrl) +-- +2.24.0 + diff --git a/libre/linux-libre/0005-net-smsc95xx-Allow-mac-address-to-be-set-as-a-parame.patch b/libre/linux-libre/0005-net-smsc95xx-Allow-mac-address-to-be-set-as-a-parame.patch index b3b0bedc4..e95960163 100644 --- a/libre/linux-libre/0005-net-smsc95xx-Allow-mac-address-to-be-set-as-a-parame.patch +++ b/libre/linux-libre/0005-net-smsc95xx-Allow-mac-address-to-be-set-as-a-parame.patch @@ -1,4 +1,4 @@ -From 244e51135d32faaa70f40a083be88bf8e6f184dd Mon Sep 17 00:00:00 2001 +From 585c73f82751043ebcf1e097a29bb9c6d2c3fbd1 Mon Sep 17 00:00:00 2001 From: popcornmix Date: Tue, 18 Feb 2014 01:43:50 -0300 Subject: [PATCH 5/9] net/smsc95xx: Allow mac address to be set as a parameter @@ -91,5 +91,5 @@ index 355be77f4241..c94a7193e0b9 100644 /* maybe the boot loader passed the MAC address in devicetree */ -- -2.22.0 +2.23.0 diff --git a/libre/linux-libre/0006-set-default-cubietruck-led-triggers.patch b/libre/linux-libre/0006-set-default-cubietruck-led-triggers.patch index 4fb0e57ae..efbbb49c4 100644 --- a/libre/linux-libre/0006-set-default-cubietruck-led-triggers.patch +++ b/libre/linux-libre/0006-set-default-cubietruck-led-triggers.patch @@ -1,4 +1,4 @@ -From 146490c16460ae11321acaafc6bff5b99c7e9392 Mon Sep 17 00:00:00 2001 +From 8fb925eac047386a298303e501042a0fd30e9ef9 Mon Sep 17 00:00:00 2001 From: Kevin Mihelich Date: Sat, 14 Feb 2015 12:32:27 +0100 Subject: [PATCH 6/9] set default cubietruck led triggers @@ -9,7 +9,7 @@ Signed-off-by: Kevin Mihelich 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 99f531b8d2a7..534392a72621 100644 +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 @@ @@ -29,5 +29,5 @@ index 99f531b8d2a7..534392a72621 100644 }; -- -2.22.0 +2.23.0 diff --git a/libre/linux-libre/0007-exynos4412-odroid-set-higher-minimum-buck2-regulator.patch b/libre/linux-libre/0007-exynos4412-odroid-set-higher-minimum-buck2-regulator.patch index 664e54e21..40413f479 100644 --- a/libre/linux-libre/0007-exynos4412-odroid-set-higher-minimum-buck2-regulator.patch +++ b/libre/linux-libre/0007-exynos4412-odroid-set-higher-minimum-buck2-regulator.patch @@ -1,4 +1,4 @@ -From 4d87a361938887b04909018827f861a51b0f4dc4 Mon Sep 17 00:00:00 2001 +From 054ac5f337ad4f79b22c9b191dc47f001722f0d6 Mon Sep 17 00:00:00 2001 From: Kevin Mihelich Date: Thu, 11 Aug 2016 00:42:37 -0600 Subject: [PATCH 7/9] exynos4412-odroid: set higher minimum buck2 regulator @@ -26,5 +26,5 @@ index ea55f377d17c..a7bfc58bbc79 100644 regulator-always-on; regulator-boot-on; -- -2.22.0 +2.23.0 diff --git a/libre/linux-libre/0008-ARM-dove-enable-ethernet-on-D3Plug.patch b/libre/linux-libre/0008-ARM-dove-enable-ethernet-on-D3Plug.patch index 6a48dd41b..b1687bf5c 100644 --- a/libre/linux-libre/0008-ARM-dove-enable-ethernet-on-D3Plug.patch +++ b/libre/linux-libre/0008-ARM-dove-enable-ethernet-on-D3Plug.patch @@ -1,4 +1,4 @@ -From 7e2691572ccf30a35c91f1c79b6e85f1c0817c68 Mon Sep 17 00:00:00 2001 +From 8b696580b73c7f6e7f3e9635bd2ad1c5c59e9082 Mon Sep 17 00:00:00 2001 From: Kevin Mihelich Date: Sun, 7 May 2017 13:32:25 -0600 Subject: [PATCH 8/9] ARM: dove: enable ethernet on D3Plug @@ -27,5 +27,5 @@ index 826026c28f90..a4c9963e1261 100644 /* Samsung M8G2F eMMC */ &sdio0 { -- -2.22.0 +2.23.0 diff --git a/libre/linux-libre/0009-USB-Armory-MkII-support.patch b/libre/linux-libre/0009-USB-Armory-MkII-support.patch index d6bdea885..4c8f8fed3 100644 --- a/libre/linux-libre/0009-USB-Armory-MkII-support.patch +++ b/libre/linux-libre/0009-USB-Armory-MkII-support.patch @@ -1,4 +1,4 @@ -From c4035052543c9d990ea439a1a1b4cc28c335196a Mon Sep 17 00:00:00 2001 +From 55e7015aa06dd943b55a0101beddae1c811a2be5 Mon Sep 17 00:00:00 2001 From: Kevin Mihelich Date: Sun, 11 Aug 2019 12:34:17 -0600 Subject: [PATCH 9/9] USB Armory MkII support @@ -12,10 +12,10 @@ Subject: [PATCH 9/9] USB Armory MkII support 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 b73aca44d87a..f45a644a2e9e 100644 +index a0f92b9dbd7d..5d6e9f76f6db 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile -@@ -577,9 +577,11 @@ dtb-$(CONFIG_SOC_IMX6UL) += \ +@@ -580,9 +580,11 @@ dtb-$(CONFIG_SOC_IMX6UL) += \ imx6ul-tx6ul-0010.dtb \ imx6ul-tx6ul-0011.dtb \ imx6ul-tx6ul-mainboard.dtb \ @@ -24,9 +24,9 @@ index b73aca44d87a..f45a644a2e9e 100644 imx6ull-colibri-eval-v3.dtb \ imx6ull-colibri-wifi-eval-v3.dtb \ + imx6ull-usbarmory.dtb \ - imx6ulz-14x14-evk.dtb - dtb-$(CONFIG_SOC_IMX7D) += \ - imx7d-cl-som-imx7.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 @@ -551,5 +551,5 @@ index 000000000000..85cf30bff527 + status = "okay"; +}; -- -2.22.0 +2.23.0 diff --git a/libre/linux-libre/PKGBUILD b/libre/linux-libre/PKGBUILD index 457b37567..926f47e80 100644 --- a/libre/linux-libre/PKGBUILD +++ b/libre/linux-libre/PKGBUILD @@ -14,24 +14,24 @@ _replacesoldkernels=() # '%' gets replaced with kernel suffix _replacesoldmodules=() # '%' gets replaced with kernel suffix pkgbase=linux-libre -pkgver=5.3.13_gnu +pkgver=5.4.2 pkgrel=1 pkgdesc='Linux-libre' -rcnver=5.3.10 -rcnrel=armv7-x15 +rcnver=5.4.1 +rcnrel=armv7-x9 url='https://linux-libre.fsfla.org/' arch=(i686 x86_64 armv7h) license=(GPL2) makedepends=( - xmlto kmod inetutils bc libelf - python-sphinx python-sphinx_rtd_theme graphviz imagemagick + bc kmod libelf + xmlto python-sphinx python-sphinx_rtd_theme graphviz imagemagick ) makedepends_armv7h=(uboot-tools vboot-utils dtc) # for linux-libre-chromebook options=('!strip') -_srcname=linux-5.3 +_srcname=linux-5.4 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//_/-}/patch-${_srcname##*-}-gnu-${pkgver//_/-}.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 @@ -44,20 +44,16 @@ source=( # https://labs.parabola.nu/issues/877 # http://www.fsfla.org/pipermail/linux-libre/2015-November/003202.html 0002-fix-Atmel-maXTouch-touchscreen-support.patch - - # Arch's custom linux patches + # extracted patches from Arch Linux kernel sources 0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch - 0002-Bluetooth-hidp-Fix-assumptions-on-the-return-value-o.patch + 0002-lib-devres-add-a-helper-function-for-ioremap_uc.patch + 0003-mfd-intel-lpss-Use-devm_ioremap_uc-for-MMIO.patch + 0004-PCI-pciehp-Do-not-disable-interrupt-twice-on-suspend.patch + 0005-PCI-pciehp-Prevent-deadlock-on-disconnect.patch ) source_armv7h=( - # armv7h patches, put in the source_armv7h variable just for a more comfortable loop patching - - # RCN patch (CM3 firmware deblobbed and AUFS/WireGuard removed) - # Note: For stability reasons, AUFS has been removed in the RCN patch. - # We are supporting AUFS in linux-libre-pck through PCK patch. - # See https://wiki.parabola.nu/PCK for further details. + # 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 @@ -73,9 +69,9 @@ validpgpkeys=( '474402C8C582DAFBE389C427BCB7CF877E7D47A7' # Alexandre Oliva '6DB9C4B4F0D8C0DC432CF6E4227CA7C556B2BA78' # David P. ) -sha512sums=('85d83c973ef96ab414354414da70ab3e1c3df19c3088458498cec1594952878b7967a8988bd9e36d4e728cc573a36e6eac056dbcab2f9aa742f18cbb4fb3164f' +sha512sums=('0d0915133864eb031adfc6700066147dcf3e768a50a31c39754950c95ef4fd322dc701cd50af49c403ef0325adfcb07e354d5e46c1be3dcdd719a7a55c963f37' 'SKIP' - '3e9c95825f6852a0721a940c80b01b9772c17ae1680c1ce5a151e4f5b577a4a50f030aa0f2fbbc2b53b898b081bf33e67bfdeb513fe5535f95c4b479452264c3' + '0b177b5ab5e7b65769c7b1176590f9fadd134f32af4db2bd0fa362dccfefb28d7fd0865b46418f54f10f039623d86012b49bcfb968bae77274447d7a97da35f5' 'SKIP' '13cb5bc42542e7b8bb104d5f68253f6609e463b6799800418af33eb0272cc269aaa36163c3e6f0aacbdaaa1d05e2827a4a7c4a08a029238439ed08b89c564bb3' 'SKIP' @@ -83,28 +79,31 @@ sha512sums=('85d83c973ef96ab414354414da70ab3e1c3df19c3088458498cec1594952878b796 'SKIP' '267295aa0cea65684968420c68b32f1a66a22d018b9d2b2c1ef14267bcf4cb68aaf7099d073cbfefe6c25c8608bdcbbd45f7ac8893fdcecbf1e621abdfe9ecc1' 'SKIP' - '27530b503b3325e00c82918e490dace2ab1bcf54f861fb30a148f45a5941b10b70edde71235452b4e2125141f14f9844cda3422ad5a48c4cff5481d3211f1427' - '9320d2417e5039bb10f6026ae630c9ed5b429a376cdba45d07fc322b9d6adea034ae67cfef51f6e18474fda6f4a4dbab3c54d43c5c7c3537feb4460d43c95769' - '0e80454eb0672d10d9497ef716a6474d3efc6ccdc4052fbd28146176167ca0d292124fc19e2b348bd31433dc046ed95ea40d61b49237ad72c6230d76fadb3419' + '9b6ff300b0d443dd15852acb7a643f6e8481256b51f2938bad0de38b0226cbd11d06ed02ad3f1e93a7eed6d1064bff2c1e68face11bc8813ff250c900d8c37d3' + 'bbca13af6ecb060956420ee19713a980d6bf1f01b990607f5701450c4b75a7c0c433b1f3fcf1afd65987a3480373305fb58a2797e99d7617c91d945061c2d7af' + 'a777070b3b52084a8ef49b7617581c0d5459f08452ff73616930e6f15c2ffac64faeb445a2fe7b1ec5e91088ef880f0a7e09bb91efc20c20303e418cd0bb698c' 'f01e7925b262d2874a8a991b1f27d057356a2a384d2012b61be5a631d4e4d7cf87461c8fb9e7f183831f5a829ad204897f1f0545a52df6288a0e04a5c2e31b96' '167bc73c6c1c63931806238905dc44c7d87c5a5c0f6293159f2133dfe717fb44081018d810675716d1605ec7dff5e8333b87b19e09e2de21d0448e447437873b' 'bb6718984a7357c9b00c37e4788480e5b8b75018c172ecc1441bc3fc5d2d42444eb5d8c7f9d2e3a7d6fed6d03acb565e3c0559486e494c40a7fe6bd0570c9ede' '143dea30c6da00e504c99984a98a0eb2411f558fcdd9dfa7f607d6c14e9e7dffff9cb00121d9317044b07e3e210808286598c785ee854084b993ec9cb14d8232' '02af4dd2a007e41db0c63822c8ab3b80b5d25646af1906dc85d0ad9bb8bbf5236f8e381d7f91cf99ed4b0978c50aee37cb9567cdeef65b7ec3d91b882852b1af' 'b8fe56e14006ab866970ddbd501c054ae37186ddc065bb869cf7d18db8c0d455118d5bda3255fb66a0dde38b544655cfe9040ffe46e41d19830b47959b2fb168' - '5c48b0092ab6a31453e27e6345347fd2d066e1c306c4c8a9144260bf37d0d13879b5cfe688906a06627d39a40a37e229e5300a479b2c9159e93e05ea7adc6b0a' - 'b07d84cac1c784f5652a4681efd54ef89ce9cb0778bd2a633709b7150f9fb59db978dc290b92bcb69b8d211471c22a0be2a81a129318cd7efff601a3c591483c') -sha512sums_armv7h=('ffb94962db829fb1f86e3da3558f469dd51d12bb352f17a82daa67a03497b52409b2f53e52eb36569e7be8b3fa7460c3b3ce3ebe3589e8a202c45cbbde0d3162' + '5bb7fa615301014045383b5421901892565ba7f7fd67da93e34a2b032d3721f6f3e677f8fc87072a33d0d79089541e37b5a34a14bfab2a71b587e3abe3e9743f' + '3ff6fc2cdf541b73e53b22213dd1b218544b15f363d6ce15f42a6ac2deb928dd8f536962a8162a648751cadde827d25427105d0bac4e596288ef839943b71f3a' + 'cfa690ea2e500b4a9670cfff96c9ffc675ffd34799b6ee41a7e173fb71d4fb915a8ff8b50f8802bbc59d1e9fe1ac458bdbdd3f0af249fbc44d3cc80b09a9da75' + 'd71a80d180f4f0a5491fc87dcda6237e53cb309d21d497a76a4f914ce376b53885cd767db2603e6a7ee5b0e6c1f926ac85865614f0997122a73e1e8d1c127749' + '56e94bb21c2f233c61f91336b08263bfc28a755e65cd8ddad89186e8f157417f51925927182bca106f03ddae6a5139e78647c48b6961b669444c4337c7b64731') +sha512sums_armv7h=('f0fcf0697f4ea10df04418b4fab6f5a34d7a1c183bd1d72eae18a1103ae0eb3b0da68f35c6cb60e78aae692afe3c11bc1bbb0d232e8e015b4d4bc96451e0c9e3' 'SKIP' - '9724026836feefa67acb9644acf3ee89d465734af50b6637b8232b705c6259035d485cd1a1f0f08d189921eb75ad095b3e1f7f7e5e0e52302352c453f03ac820' - '41f9f7d58bb29311e09dd58105d173fb2e2a955c0e7d632bc8788c2f0a803a45281dfd2be1712d6ec93b58b9f440f3f8398f234bd7ded1c49b1c33b328478203' - '9d29a3d22aae6533d048280f3a1bf1cc325e1c1304268b6d129a29e1d74c105c55077306e6350105a9445e2a1de621cb6759b71177badbaa0e384e9800427acf' - 'c7b99f64d148b7ef140d3621b3d3fa922739f2a393ce99038d0dd539d0bb8e2e3ffe92ccbc3fe9d8dea5f3f4ddc433eb6ddd9d46939f04f38cd82ee32f5d53ec' - '618d84d26338dfeb15c88fc6d9d7c68d0151f50e000032b2d21d30d05ec62f2d36ef5a50d3671e4e9777a2db6c40d71878a9fcc89420fbe9f59e7e30406c9064' - '464d1622fd79d7f6811799bd27e16204979db3c372e03aae8285fbff584d39928d7ddb5da8139f4ce535c70406fcf73cc20dd44ffe83fd7cda36ca915fb0b931' - '114067bfafa63bbb3aef73d05909b520355a757d15aa2ce07c6bfeae200192282782980b3d8963c0d984cf0c410d2613639444dffe21007ae6a7359be6a5ff76' - 'c1191d35ef8ce8ffaa817e952916dfe5fff45758c13394bb3fc7eba7376fd2cdc94ef32a2a54d431d8258da10fa7ce2284b092b6871e9b357b71ac0144a655b8' - 'e8e73026ac02645b5914ac97bfada4c94f48e490331a28960ee5939feb18dc5630831748cdd210b27d91590322cf564d3265feee9a8246a373cc117cd520c10d') + 'b576a9c40ba59485c350f71b9234d9e71f245e25b26382bd2f67019f3309c3b5705a6020eae0a9dfccacc763fb2056a5937c0a8ff4e64f99ba1d60f0b2acb03f' + '85a13a274d4cbaca3ddbe8eaf883f1a1184765f8d09d6d40bb32defbe0876cb0153513e8db8671d7fc053e383ced793b74245ff29364a760e1a52bb36ebc8e85' + 'f9ce0bb4f06be6f742d8a31384e90fdab1a4686f14d5a8845e0c341dcfa62ae59db933237174223de9b32f9d91f99125c20ede7dff664755f1d42ea0cecdefdb' + 'b32623904f984118ebdd8ec31816885d73776ed80a68fa23925e67451f28a8f080dd8545307bb2f857435894adfa8b3db7c8a99aa02b8b3f2b5f8e3223d98a47' + 'd114f1e69504413e81dd67684f5b1ce69aa09d5bc768c7eee96a7d6b7ec47b32cd8f02593c878b0e9091475467de36a3d7c478e34a39148fa849548f53637b84' + 'bc0c6b1726679498393be8d4c417c62e1f356fe5c617c71ff23532652fdd5f314e5bfc6172eaca79cd4806b81031bf2f879d7d1a6050ad4c616c04e6bdf93c2a' + 'b13bea6412580325dba0d02cf0dc712e860f659569ffcb968aa4836fdb2882448cfee4659a675a70affccae02c8d2589d80b7239eef5ae7b615162aeaa76f3bb' + 'cff59f974651614587313674455a968ae5390a5ca825d204f0e2f8de2b422d577b007f5297a398e2afeb33ed0d324d34ad58ff4cd56e645bd4ca9a6bdc1354c5' + '54adbec4b6b85cda901df7d2b3eb1f517f10d3528326e60c7afa4b49ccc7cfb43b0d1f574ceb5d7d03c94a0fbcc97c0ef785258292dd26ed46728355da27332c') _replacesarchkernel=("${_replacesarchkernel[@]/\%/${pkgbase#linux-libre}}") _replacesoldkernels=("${_replacesoldkernels[@]/\%/${pkgbase#linux-libre}}") @@ -122,9 +121,9 @@ export KBUILD_BUILD_TIMESTAMP="$(date -Ru${SOURCE_DATE_EPOCH:+d @$SOURCE_DATE_EP prepare() { cd $_srcname - if [ "${_srcname##*-}-gnu" != "${pkgver//_/-}" ]; then + if [ "${_srcname##*-}" != "$pkgver" ]; then msg2 "Applying upstream patch..." - patch -p1 -i ../patch-${_srcname##*-}-gnu-${pkgver//_/-} + patch -Np1 -i ../patch-${_srcname##*-}-gnu-$pkgver-gnu fi msg2 "Adding freedo as boot logo..." @@ -319,7 +318,7 @@ _package-headers() { } _package-docs() { - pkgdesc="Kernel hacker's manual for the $pkgdesc kernel" + pkgdesc="Documentation for the $pkgdesc kernel" provides=("${_replacesarchkernel[@]/%/-docs=${pkgver%%_*}}") conflicts=("${_replacesarchkernel[@]/%/-docs}" "${_replacesoldkernels[@]/%/-docs}") replaces=("${_replacesarchkernel[@]/%/-docs}" "${_replacesoldkernels[@]/%/-docs}") @@ -328,20 +327,12 @@ _package-docs() { local builddir="$pkgdir/usr/lib/modules/$(