diff options
7 files changed, 115 insertions, 40 deletions
diff --git a/libre-testing/linux-libre-cros/0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch b/libre-testing/linux-libre-cros/0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch index bcd694ec0..792ee6feb 100644 --- a/libre-testing/linux-libre-cros/0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch +++ b/libre-testing/linux-libre-cros/0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch @@ -1,7 +1,7 @@ -From 270144c854dea695a7721fdd3a5503eb4acae7e4 Mon Sep 17 00:00:00 2001 +From ad4dbce36dd2083de69815f613342257535f6274 Mon Sep 17 00:00:00 2001 From: "Jan Alexander Steffens (heftig)" <jan.steffens@gmail.com> Date: Mon, 16 Sep 2019 04:53:20 +0200 -Subject: [PATCH 1/5] ZEN: Add sysctl and CONFIG to disallow unprivileged +Subject: [PATCH 1/6] ZEN: Add sysctl and CONFIG to disallow unprivileged CLONE_NEWUSER Our default behavior continues to match the vanilla kernel. @@ -128,5 +128,5 @@ index 8eadadc478f9..c36ecd19562c 100644 static DEFINE_MUTEX(userns_state_mutex); -- -2.24.0 +2.24.1 diff --git a/libre-testing/linux-libre-cros/0002-lib-devres-add-a-helper-function-for-ioremap_uc.patch b/libre-testing/linux-libre-cros/0002-lib-devres-add-a-helper-function-for-ioremap_uc.patch index 9befdd67a..c5b45a1c8 100644 --- a/libre-testing/linux-libre-cros/0002-lib-devres-add-a-helper-function-for-ioremap_uc.patch +++ b/libre-testing/linux-libre-cros/0002-lib-devres-add-a-helper-function-for-ioremap_uc.patch @@ -1,7 +1,7 @@ -From f20221735640685313d5020d7e6db4aad293a3ae Mon Sep 17 00:00:00 2001 +From 5925138606a245d43d8a6db47b754cea6f6049ae Mon Sep 17 00:00:00 2001 From: Tuowen Zhao <ztuowen@gmail.com> Date: Wed, 16 Oct 2019 15:06:28 -0600 -Subject: [PATCH 2/5] lib: devres: add a helper function for ioremap_uc +Subject: [PATCH 2/6] lib: devres: add a helper function for ioremap_uc Implement a resource managed strongly uncachable ioremap function. @@ -75,5 +75,5 @@ index 6a0e9bd6524a..17624d35e82d 100644 * devm_ioremap_nocache - Managed ioremap_nocache() * @dev: Generic device to remap IO address for -- -2.24.0 +2.24.1 diff --git a/libre-testing/linux-libre-cros/0003-mfd-intel-lpss-Use-devm_ioremap_uc-for-MMIO.patch b/libre-testing/linux-libre-cros/0003-mfd-intel-lpss-Use-devm_ioremap_uc-for-MMIO.patch index 926097948..8dcd2ad1a 100644 --- a/libre-testing/linux-libre-cros/0003-mfd-intel-lpss-Use-devm_ioremap_uc-for-MMIO.patch +++ b/libre-testing/linux-libre-cros/0003-mfd-intel-lpss-Use-devm_ioremap_uc-for-MMIO.patch @@ -1,7 +1,7 @@ -From affb9e39e0d2b1eefff47e2dc0a0aa3893b9bb5d Mon Sep 17 00:00:00 2001 +From 3cec19068653e77d311382d7467728f5d424d4a3 Mon Sep 17 00:00:00 2001 From: Tuowen Zhao <ztuowen@gmail.com> Date: Wed, 16 Oct 2019 15:06:29 -0600 -Subject: [PATCH 3/5] mfd: intel-lpss: Use devm_ioremap_uc for MMIO +Subject: [PATCH 3/6] 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, @@ -44,5 +44,5 @@ index bfe4ff337581..b0f0781a6b9c 100644 if (!lpss->priv) return -ENOMEM; -- -2.24.0 +2.24.1 diff --git a/libre-testing/linux-libre-cros/0004-PCI-pciehp-Do-not-disable-interrupt-twice-on-suspend.patch b/libre-testing/linux-libre-cros/0004-PCI-pciehp-Do-not-disable-interrupt-twice-on-suspend.patch index f3cba134a..570983bb3 100644 --- a/libre-testing/linux-libre-cros/0004-PCI-pciehp-Do-not-disable-interrupt-twice-on-suspend.patch +++ b/libre-testing/linux-libre-cros/0004-PCI-pciehp-Do-not-disable-interrupt-twice-on-suspend.patch @@ -1,7 +1,7 @@ -From bdbb6d41bab0f525b679cf5018f77d5299773568 Mon Sep 17 00:00:00 2001 +From 271c8fe698d3ba5b3b135ffacfd1dc0c87243e32 Mon Sep 17 00:00:00 2001 From: Mika Westerberg <mika.westerberg@linux.intel.com> Date: Tue, 29 Oct 2019 20:00:21 +0300 -Subject: [PATCH 4/5] PCI: pciehp: Do not disable interrupt twice on suspend +Subject: [PATCH 4/6] 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 @@ -95,5 +95,5 @@ index b3122c151b80..56daad828c9e 100644 #endif /* PM */ }; -- -2.24.0 +2.24.1 diff --git a/libre-testing/linux-libre-cros/0005-PCI-pciehp-Prevent-deadlock-on-disconnect.patch b/libre-testing/linux-libre-cros/0005-PCI-pciehp-Prevent-deadlock-on-disconnect.patch index 0fc654b74..3ac640caf 100644 --- a/libre-testing/linux-libre-cros/0005-PCI-pciehp-Prevent-deadlock-on-disconnect.patch +++ b/libre-testing/linux-libre-cros/0005-PCI-pciehp-Prevent-deadlock-on-disconnect.patch @@ -1,7 +1,7 @@ -From 23db61d908b9a4854c9b15565d4cbfa800c45cfe Mon Sep 17 00:00:00 2001 +From 8d032e7fc1d1d37974785ccdb994524d60201ca3 Mon Sep 17 00:00:00 2001 From: Mika Westerberg <mika.westerberg@linux.intel.com> Date: Tue, 29 Oct 2019 20:00:22 +0300 -Subject: [PATCH 5/5] PCI: pciehp: Prevent deadlock on disconnect +Subject: [PATCH 5/6] PCI: pciehp: Prevent deadlock on disconnect This addresses deadlocks in these common cases in hierarchies containing two switches: @@ -96,10 +96,10 @@ Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> 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 +index 882ce82c4699..aa61d4c219d7 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); +@@ -174,10 +174,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); @@ -151,7 +151,7 @@ index 56daad828c9e..312cc45c44c7 100644 (!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 +index dd8e4a5fb282..6503d15effbb 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) @@ -173,7 +173,7 @@ index 21af7b16d7a4..c760a13ec7b1 100644 return; } diff --git a/drivers/pci/hotplug/pciehp_hpc.c b/drivers/pci/hotplug/pciehp_hpc.c -index 1a522c1c4177..526a8f70bac5 100644 +index 86d97f3112f0..a2a263764ef8 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) @@ -268,5 +268,5 @@ index 1a522c1c4177..526a8f70bac5 100644 int pciehp_query_power_fault(struct controller *ctrl) -- -2.24.0 +2.24.1 diff --git a/libre-testing/linux-libre-cros/0006-ACPI-PM-s2idle-Rework-ACPI-events-synchronization.patch b/libre-testing/linux-libre-cros/0006-ACPI-PM-s2idle-Rework-ACPI-events-synchronization.patch new file mode 100644 index 000000000..c5b27c966 --- /dev/null +++ b/libre-testing/linux-libre-cros/0006-ACPI-PM-s2idle-Rework-ACPI-events-synchronization.patch @@ -0,0 +1,78 @@ +From 9888be9033e8e79a055df2ae8d388baf5970f83b Mon Sep 17 00:00:00 2001 +From: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com> +Date: Thu, 28 Nov 2019 23:50:40 +0100 +Subject: [PATCH 6/6] ACPI: PM: s2idle: Rework ACPI events synchronization + +Note that the EC GPE processing need not be synchronized in +acpi_s2idle_wake() after invoking acpi_ec_dispatch_gpe(), because +that function checks the GPE status and dispatches its handler if +need be and the SCI action handler is not going to run anyway at +that point. + +Moreover, it is better to drain all of the pending ACPI events +before restoring the working-state configuration of GPEs in +acpi_s2idle_restore(), because those events are likely to be related +to system wakeup, in which case they will not be relevant going +forward. + +Rework the code to take these observations into account. + +Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> +--- + drivers/acpi/sleep.c | 26 +++++++++++++++++++------- + 1 file changed, 19 insertions(+), 7 deletions(-) + +diff --git a/drivers/acpi/sleep.c b/drivers/acpi/sleep.c +index 2af937a8b1c5..6747a279621b 100644 +--- a/drivers/acpi/sleep.c ++++ b/drivers/acpi/sleep.c +@@ -977,6 +977,16 @@ static int acpi_s2idle_prepare_late(void) + return 0; + } + ++static void acpi_s2idle_sync(void) ++{ ++ /* ++ * The EC driver uses the system workqueue and an additional special ++ * one, so those need to be flushed too. ++ */ ++ acpi_ec_flush_work(); ++ acpi_os_wait_events_complete(); /* synchronize Notify handling */ ++} ++ + static void acpi_s2idle_wake(void) + { + /* +@@ -1001,13 +1011,8 @@ static void acpi_s2idle_wake(void) + * should be missed by canceling the wakeup here. + */ + pm_system_cancel_wakeup(); +- /* +- * The EC driver uses the system workqueue and an additional +- * special one, so those need to be flushed too. +- */ +- acpi_os_wait_events_complete(); /* synchronize EC GPE processing */ +- acpi_ec_flush_work(); +- acpi_os_wait_events_complete(); /* synchronize Notify handling */ ++ ++ acpi_s2idle_sync(); + + rearm_wake_irq(acpi_sci_irq); + } +@@ -1024,6 +1029,13 @@ static void acpi_s2idle_restore_early(void) + + static void acpi_s2idle_restore(void) + { ++ /* ++ * Drain pending events before restoring the working-state configuration ++ * of GPEs. ++ */ ++ acpi_os_wait_events_complete(); /* synchronize GPE processing */ ++ acpi_s2idle_sync(); ++ + s2idle_wakeup = false; + + acpi_enable_all_runtime_gpes(); +-- +2.24.1 + diff --git a/libre-testing/linux-libre-cros/PKGBUILD b/libre-testing/linux-libre-cros/PKGBUILD index c4391af24..b2675b305 100644 --- a/libre-testing/linux-libre-cros/PKGBUILD +++ b/libre-testing/linux-libre-cros/PKGBUILD @@ -5,23 +5,24 @@ _replacesoldkernels=() # '%' gets replaced with kernel suffix _replacesoldmodules=() # '%' gets replaced with kernel suffix pkgbase=linux-libre-cros -pkgver=5.4.2 +pkgver=5.4.6 pkgrel=1 -pkgdesc='Linux-libre' -rcnver=5.4.1 -rcnrel=armv7-x9 -url='https://gitlab.com/libreforks/linux-libre-cros' +pkgdesc='Linux-libre (Veyron Chromebooks)' +rcnver=5.4.5 +rcnrel=armv7-x13 +url='https://git.parabola.nu/~megver83/cros-kernel.git' arch=(armv7h) license=(GPL2) makedepends=( bc kmod libelf xmlto python-sphinx python-sphinx_rtd_theme graphviz imagemagick + git uboot-tools vboot-utils dtc ) options=('!strip') -_srcname=$pkgbase-chromeos-libre-v$pkgver +_srcname=cros-kernel source=( - "$pkgbase-$pkgver.tar.gz::https://gitlab.com/libreforks/$pkgbase/-/archive/chromeos-libre-v$pkgver/$_srcname.tar.gz" + "git+$url?signed#tag=v$pkgver-gnu" "https://repo.parabola.nu/other/linux-libre/logos/logo_linux_"{clut224.ppm,vga16.ppm,mono.pbm}{,.sig} config # the main kernel config files linux.preset # preset file for mkinitcpio ramdisk @@ -40,6 +41,8 @@ source=( 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 + 0006-ACPI-PM-s2idle-Rework-ACPI-events-synchronization.patch + # 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 @@ -54,10 +57,9 @@ source=( 0009-USB-Armory-MkII-support.patch ) validpgpkeys=( - '474402C8C582DAFBE389C427BCB7CF877E7D47A7' # Alexandre Oliva '6DB9C4B4F0D8C0DC432CF6E4227CA7C556B2BA78' # David P. ) -sha512sums=('4084fd2fbb4d40212180bfe998aaa7b11e612801849750e53e14c9ef3fafd1fb59105206cbfc62d555d735407810b1a66f7dffd382ffac188a10cf9b682d5d2f' +sha512sums=('SKIP' '13cb5bc42542e7b8bb104d5f68253f6609e463b6799800418af33eb0272cc269aaa36163c3e6f0aacbdaaa1d05e2827a4a7c4a08a029238439ed08b89c564bb3' 'SKIP' '7a3716bfe3b9f546da309c7492f3e08f8f506813afeb1c737a474c83313d5c313cf4582b65215c2cfce3b74d9d1021c96e8badafe8f6e5b01fe28d2b5c61ae78' @@ -71,12 +73,13 @@ sha512sums=('4084fd2fbb4d40212180bfe998aaa7b11e612801849750e53e14c9ef3fafd1fb591 '143dea30c6da00e504c99984a98a0eb2411f558fcdd9dfa7f607d6c14e9e7dffff9cb00121d9317044b07e3e210808286598c785ee854084b993ec9cb14d8232' '02af4dd2a007e41db0c63822c8ab3b80b5d25646af1906dc85d0ad9bb8bbf5236f8e381d7f91cf99ed4b0978c50aee37cb9567cdeef65b7ec3d91b882852b1af' 'b8fe56e14006ab866970ddbd501c054ae37186ddc065bb869cf7d18db8c0d455118d5bda3255fb66a0dde38b544655cfe9040ffe46e41d19830b47959b2fb168' - '5bb7fa615301014045383b5421901892565ba7f7fd67da93e34a2b032d3721f6f3e677f8fc87072a33d0d79089541e37b5a34a14bfab2a71b587e3abe3e9743f' - '3ff6fc2cdf541b73e53b22213dd1b218544b15f363d6ce15f42a6ac2deb928dd8f536962a8162a648751cadde827d25427105d0bac4e596288ef839943b71f3a' - 'cfa690ea2e500b4a9670cfff96c9ffc675ffd34799b6ee41a7e173fb71d4fb915a8ff8b50f8802bbc59d1e9fe1ac458bdbdd3f0af249fbc44d3cc80b09a9da75' - 'd71a80d180f4f0a5491fc87dcda6237e53cb309d21d497a76a4f914ce376b53885cd767db2603e6a7ee5b0e6c1f926ac85865614f0997122a73e1e8d1c127749' - '56e94bb21c2f233c61f91336b08263bfc28a755e65cd8ddad89186e8f157417f51925927182bca106f03ddae6a5139e78647c48b6961b669444c4337c7b64731' - 'f0fcf0697f4ea10df04418b4fab6f5a34d7a1c183bd1d72eae18a1103ae0eb3b0da68f35c6cb60e78aae692afe3c11bc1bbb0d232e8e015b4d4bc96451e0c9e3' + 'c8b2258f0b4206a8a0a2c6b6e9a9877b4c914b401842c7f00d1ddde78bd6734a6cde32db56e3d4e99caa45ae0da0c02593828cadeb1ca813f19d23f6d08be4d2' + '3893afefd914017a2932159233fdaffc722a3278755b5a5c6617dd9dd66c2d0d26103e04148709ab7a7e4b74f5efbdba7949c093046592f8d872de864404437f' + '6acb44d5da656c154a024ecaa6e071b76bbc1c44cee7fdf317a8b908b71d9d2e9796130abc4b547609cbf898c4a763ba9676963d37eb81d94c44d4695962d02a' + '4e2996b2a377324314447e56b7dfd2ac0c4796387f125f6141baa23c0fe331f6225aacce6e32a6ea9b04ae6f70371a0f71ce8b1b7a3cb47c1147d51b0d05054f' + 'ccee6c7997bf6c9885ea0d2996df9d86c7cfec98748b3947ecd98060fa6bb5a8fed9261586b73d2901718ee1e1e9b8955631f5669ff04e5ef86e82ecce213515' + '126d979a1ee72a74259f2afce0947a741a37b23d2c012422e94a498b5afc29361396d8ee8ab96f7c91b6e399f8a3ef3839270e0871bc144eeb26b91609096964' + 'bc449032f904b5ef5c4506124871230587dd72849f7fed1d7e9f6ab6f530c24415dfa0f29b27fa98191a671c9646b6066fbf163b5533774307dc68f610e3958f' 'SKIP' 'b576a9c40ba59485c350f71b9234d9e71f245e25b26382bd2f67019f3309c3b5705a6020eae0a9dfccacc763fb2056a5937c0a8ff4e64f99ba1d60f0b2acb03f' '85a13a274d4cbaca3ddbe8eaf883f1a1184765f8d09d6d40bb32defbe0876cb0153513e8db8671d7fc053e383ced793b74245ff29364a760e1a52bb36ebc8e85' @@ -99,11 +102,6 @@ export KBUILD_BUILD_TIMESTAMP="$(date -Ru${SOURCE_DATE_EPOCH:+d @$SOURCE_DATE_EP prepare() { cd $_srcname -# if [ "${_srcname##*-}" != "$pkgver" ]; then -# msg2 "Applying upstream patch..." -# patch -Np1 -i ../patch-${_srcname##*-}-gnu-$pkgver-gnu -# fi - msg2 "Adding freedo as boot logo..." install -m644 -t drivers/video/logo \ ../logo_linux_{clut224.ppm,vga16.ppm,mono.pbm} @@ -188,7 +186,6 @@ _package() { --bootloader bootloader.bin msg2 "Installing kernel sign..." - mkdir -p "$pkgdir/boot" cp vmlinux.kpart "$pkgdir/boot" msg2 "Fixing permissions..." |