diff options
author | Björn Bidar | 2018-05-27 16:52:25 +0200 |
---|---|---|
committer | Björn Bidar | 2018-05-27 16:52:25 +0200 |
commit | 37451a46f014b047ae5cdcc92f0e35dc28cd00d5 (patch) | |
tree | 7a781c7639da480400c98464e715ead173657040 | |
parent | 9589988fbad9a1ce06ca942ca6cb4d04c71c441b (diff) | |
download | aur-37451a46f014b047ae5cdcc92f0e35dc28cd00d5.tar.gz |
upkg
-rw-r--r-- | .SRCINFO | 20 | ||||
-rw-r--r-- | 0002-ACPI-watchdog-Prefer-iTCO_wdt-on-Lenovo-Z50-70.patch | 125 | ||||
-rw-r--r-- | PKGBUILD | 15 |
3 files changed, 146 insertions, 14 deletions
@@ -1,9 +1,9 @@ # Generated by mksrcinfo v8 -# Sun May 6 21:43:43 UTC 2018 +# Sun May 27 14:51:40 UTC 2018 pkgbase = linux-pf pkgdesc = Linux kernel and modules with the pf-kernel patch (uksm, PDS). - pkgver = 4.16.4 - pkgrel = 2 + pkgver = 4.16.6 + pkgrel = 1 url = https://pfactum.github.io/pf-kernel arch = i686 arch = x86_64 @@ -20,16 +20,18 @@ pkgbase = linux-pf source = config.i686 source = config.x86_64 source = linux.preset - source = https://github.com/pfactum/pf-kernel/compare/v4.16...v4.16-pf4.diff + source = https://github.com/pfactum/pf-kernel/compare/v4.16...v4.16-pf6.diff source = 90-linux.hook source = 60-linux.hook + source = 0002-ACPI-watchdog-Prefer-iTCO_wdt-on-Lenovo-Z50-70.patch sha256sums = 63f6dc8e3c9f3a0273d5d6f4dca38a2413ca3a5f689329d05b750e4c87bb21b9 sha256sums = 102d518779dc312af35faf7e07ff01df3c04521d40d8757fc4e8eba9c595c395 sha256sums = 36190e1af132b6c2d717c49354b8e615f78acf15645c396092a085d74baf420e sha256sums = 82d660caa11db0cd34fd550a049d7296b4a9dcd28f2a50c81418066d6e598864 - sha256sums = e723d238fcda5cdaadc1fda518c4298cee51cf108ea5141881896519fa1f62c1 + sha256sums = b610ffc6d591fe20e1683cbc62271c47966068ce08ead7555774063d7edd1594 sha256sums = 75f99f5239e03238f88d1a834c50043ec32b1dc568f2cc291b07d04718483919 sha256sums = ae2e95db94ef7176207c690224169594d49445e04249d2499e9d2fbc117a0b21 + sha256sums = 2454c1ee5e0f5aa119fafb4c8d3b402c5e4e10b2e868fe3e4ced3b1e2aa48446 pkgname = linux-pf pkgdesc = Linux kernel and modules with the pf-kernel patch (uksm, PDS) @@ -44,7 +46,7 @@ pkgname = linux-pf optdepends = nvidia-pf: NVIDIA drivers for linux-pf optdepends = nvidia-beta-all: NVIDIA drivers for all installed kernels optdepends = modprobed-db: Keeps track of EVERY kernel module that has ever been probed. Useful for make localmodconfig. - provides = linux-pf=4.16.4 + provides = linux-pf=4.16.6 provides = linux-tomoyo conflicts = linux-pf conflicts = kernel26-pf @@ -53,13 +55,13 @@ pkgname = linux-pf pkgname = linux-pf-headers pkgdesc = Header files and scripts for building modules for linux-pf kernel. depends = linux-pf - provides = linux-pf-headers=4.16.4 + provides = linux-pf-headers=4.16.6 conflicts = linux-pf-headers pkgname = linux-pf-preset-default pkgdesc = Linux-pf default preset install = linux.install - depends = linux-pf=4.16.4 - provides = linux-pf-preset=4.16.4 + depends = linux-pf=4.16.6 + provides = linux-pf-preset=4.16.6 backup = etc/mkinitcpio.d/linux-pf.preset diff --git a/0002-ACPI-watchdog-Prefer-iTCO_wdt-on-Lenovo-Z50-70.patch b/0002-ACPI-watchdog-Prefer-iTCO_wdt-on-Lenovo-Z50-70.patch new file mode 100644 index 000000000000..ecd2d721d1c1 --- /dev/null +++ b/0002-ACPI-watchdog-Prefer-iTCO_wdt-on-Lenovo-Z50-70.patch @@ -0,0 +1,125 @@ +From f593e0bde601ff2b4f84b7363e4dfcbbda652e6d Mon Sep 17 00:00:00 2001 +Message-Id: <f593e0bde601ff2b4f84b7363e4dfcbbda652e6d.1527290717.git.jan.steffens@gmail.com> +In-Reply-To: <ee91df95bf010fad44be5d2564e7d40038987f19.1527290717.git.jan.steffens@gmail.com> +References: <ee91df95bf010fad44be5d2564e7d40038987f19.1527290717.git.jan.steffens@gmail.com> +From: Mika Westerberg <mika.westerberg@linux.intel.com> +Date: Mon, 23 Apr 2018 14:16:03 +0300 +Subject: [PATCH 2/3] ACPI / watchdog: Prefer iTCO_wdt on Lenovo Z50-70 + +WDAT table on Lenovo Z50-70 is using RTC SRAM (ports 0x70 and 0x71) to +store state of the timer. This conflicts with Linux RTC driver +(rtc-cmos.c) who fails to reserve those ports for itself preventing RTC +from functioning. In addition the WDAT table seems not to be fully +functional because it does not reset the system when the watchdog times +out. + +On this system iTCO_wdt works just fine so we simply prefer to use it +instead of WDAT. This makes RTC working again and also results working +watchdog via iTCO_wdt. + +Reported-by: Peter Milley <pbmilley@gmail.com> +Link: https://bugzilla.kernel.org/show_bug.cgi?id=199033 +Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> +Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> +--- + drivers/acpi/acpi_watchdog.c | 59 ++++++++++++++++++++++++++++++------ + 1 file changed, 49 insertions(+), 10 deletions(-) + +diff --git a/drivers/acpi/acpi_watchdog.c b/drivers/acpi/acpi_watchdog.c +index ebb626ffb5fa..4bde16fb97d8 100644 +--- a/drivers/acpi/acpi_watchdog.c ++++ b/drivers/acpi/acpi_watchdog.c +@@ -12,41 +12,80 @@ + #define pr_fmt(fmt) "ACPI: watchdog: " fmt + + #include <linux/acpi.h> ++#include <linux/dmi.h> + #include <linux/ioport.h> + #include <linux/platform_device.h> + + #include "internal.h" + ++static const struct dmi_system_id acpi_watchdog_skip[] = { ++ { ++ /* ++ * On Lenovo Z50-70 there are two issues with the WDAT ++ * table. First some of the instructions use RTC SRAM ++ * to store persistent information. This does not work well ++ * with Linux RTC driver. Second, more important thing is ++ * that the instructions do not actually reset the system. ++ * ++ * On this particular system iTCO_wdt seems to work just ++ * fine so we prefer that over WDAT for now. ++ * ++ * See also https://bugzilla.kernel.org/show_bug.cgi?id=199033. ++ */ ++ .ident = "Lenovo Z50-70", ++ .matches = { ++ DMI_MATCH(DMI_SYS_VENDOR, "LENOVO"), ++ DMI_MATCH(DMI_PRODUCT_NAME, "20354"), ++ DMI_MATCH(DMI_PRODUCT_VERSION, "Lenovo Z50-70"), ++ }, ++ }, ++ {} ++}; ++ ++static const struct acpi_table_wdat *acpi_watchdog_get_wdat(void) ++{ ++ const struct acpi_table_wdat *wdat = NULL; ++ acpi_status status; ++ ++ if (acpi_disabled) ++ return NULL; ++ ++ if (dmi_check_system(acpi_watchdog_skip)) ++ return NULL; ++ ++ status = acpi_get_table(ACPI_SIG_WDAT, 0, ++ (struct acpi_table_header **)&wdat); ++ if (ACPI_FAILURE(status)) { ++ /* It is fine if there is no WDAT */ ++ return NULL; ++ } ++ ++ return wdat; ++} ++ + /** + * Returns true if this system should prefer ACPI based watchdog instead of + * the native one (which are typically the same hardware). + */ + bool acpi_has_watchdog(void) + { +- struct acpi_table_header hdr; +- +- if (acpi_disabled) +- return false; +- +- return ACPI_SUCCESS(acpi_get_table_header(ACPI_SIG_WDAT, 0, &hdr)); ++ return !!acpi_watchdog_get_wdat(); + } + EXPORT_SYMBOL_GPL(acpi_has_watchdog); + + void __init acpi_watchdog_init(void) + { + const struct acpi_wdat_entry *entries; + const struct acpi_table_wdat *wdat; + struct list_head resource_list; + struct resource_entry *rentry; + struct platform_device *pdev; + struct resource *resources; + size_t nresources = 0; +- acpi_status status; + int i; + +- status = acpi_get_table(ACPI_SIG_WDAT, 0, +- (struct acpi_table_header **)&wdat); +- if (ACPI_FAILURE(status)) { ++ wdat = acpi_watchdog_get_wdat(); ++ if (!wdat) { + /* It is fine if there is no WDAT */ + return; + } +-- +2.17.0 + @@ -10,7 +10,7 @@ _minor=16 _basekernel=${_major}.${_minor} _srcname=linux-${_major}.${_minor} pkgbase=linux-pf -_pfrel=4 +_pfrel=6 _kernelname=-pf _pfpatchhome="https://github.com/pfactum/pf-kernel/compare" _pfpatchname="v$_major.$_minor...v$_major.$_minor-pf$_pfrel.diff" @@ -71,7 +71,7 @@ _BATCH_MODE=n pkgname=('linux-pf') true && pkgname=('linux-pf' 'linux-pf-headers' 'linux-pf-preset-default') pkgver=${_basekernel}.${_pfrel} -pkgrel=2 +pkgrel=1 arch=('i686' 'x86_64') url="https://pfactum.github.io/pf-kernel" license=('GPL2') @@ -83,6 +83,7 @@ source=("https://www.kernel.org/pub/linux/kernel/v${_major}.x/linux-${_basekerne "${_pfpatchhome}/${_pfpatchname}" # the -pf patchset "90-linux.hook" "60-linux.hook" + '0002-ACPI-watchdog-Prefer-iTCO_wdt-on-Lenovo-Z50-70.patch' ) # 'cx23885_move_CI_AC_registration_to_a_separate_function.patch' @@ -106,7 +107,10 @@ prepare() { #patch -Np1 -i ../0003-ssb-Do-not-disable-PCI-host-on-non-Mips.patch # end - + + # https://bugs.archlinux.org/task/56780 + patch -Np1 -i ../0002-ACPI-watchdog-Prefer-iTCO_wdt-on-Lenovo-Z50-70.patch + # end linux-ARCH patches # fix ci invalid PC card inserted issue hopefully @@ -645,7 +649,8 @@ sha256sums=('63f6dc8e3c9f3a0273d5d6f4dca38a2413ca3a5f689329d05b750e4c87bb21b9' '102d518779dc312af35faf7e07ff01df3c04521d40d8757fc4e8eba9c595c395' '36190e1af132b6c2d717c49354b8e615f78acf15645c396092a085d74baf420e' '82d660caa11db0cd34fd550a049d7296b4a9dcd28f2a50c81418066d6e598864' - 'e723d238fcda5cdaadc1fda518c4298cee51cf108ea5141881896519fa1f62c1' + 'b610ffc6d591fe20e1683cbc62271c47966068ce08ead7555774063d7edd1594' '75f99f5239e03238f88d1a834c50043ec32b1dc568f2cc291b07d04718483919' - 'ae2e95db94ef7176207c690224169594d49445e04249d2499e9d2fbc117a0b21') + 'ae2e95db94ef7176207c690224169594d49445e04249d2499e9d2fbc117a0b21' + '2454c1ee5e0f5aa119fafb4c8d3b402c5e4e10b2e868fe3e4ced3b1e2aa48446') |