From: Greg Kroah-Hartman Date: Tue, 3 Nov 2020 12:04:39 +0000 (+0100) Subject: 4.4-stable patches X-Git-Tag: v4.14.204~40 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4bde5b83977d6d1a5076dbbabb60c93b8a3a4262;p=thirdparty%2Fkernel%2Fstable-queue.git 4.4-stable patches added patches: acpi-cpufreq-honor-_psd-table-setting-on-new-amd-cpus.patch acpi-extlog-check-for-rdmsr-failure.patch acpi-video-use-acpi-backlight-for-hp-635-notebook.patch leds-bcm6328-bcm6358-use-devres-led-registering-function.patch nfs-fix-nfs_path-in-case-of-a-rename-retry.patch --- diff --git a/queue-4.4/acpi-cpufreq-honor-_psd-table-setting-on-new-amd-cpus.patch b/queue-4.4/acpi-cpufreq-honor-_psd-table-setting-on-new-amd-cpus.patch new file mode 100644 index 00000000000..1f123d6bece --- /dev/null +++ b/queue-4.4/acpi-cpufreq-honor-_psd-table-setting-on-new-amd-cpus.patch @@ -0,0 +1,37 @@ +From 5368512abe08a28525d9b24abbfc2a72493e8dba Mon Sep 17 00:00:00 2001 +From: Wei Huang +Date: Sun, 18 Oct 2020 22:57:41 -0500 +Subject: acpi-cpufreq: Honor _PSD table setting on new AMD CPUs + +From: Wei Huang + +commit 5368512abe08a28525d9b24abbfc2a72493e8dba upstream. + +acpi-cpufreq has a old quirk that overrides the _PSD table supplied by +BIOS on AMD CPUs. However the _PSD table of new AMD CPUs (Family 19h+) +now accurately reports the P-state dependency of CPU cores. Hence this +quirk needs to be fixed in order to support new CPUs' frequency control. + +Fixes: acd316248205 ("acpi-cpufreq: Add quirk to disable _PSD usage on all AMD CPUs") +Signed-off-by: Wei Huang +[ rjw: Subject edit ] +Cc: 3.10+ # 3.10+ +Signed-off-by: Rafael J. Wysocki +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/cpufreq/acpi-cpufreq.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +--- a/drivers/cpufreq/acpi-cpufreq.c ++++ b/drivers/cpufreq/acpi-cpufreq.c +@@ -713,7 +713,8 @@ static int acpi_cpufreq_cpu_init(struct + cpumask_copy(policy->cpus, topology_core_cpumask(cpu)); + } + +- if (check_amd_hwpstate_cpu(cpu) && !acpi_pstate_strict) { ++ if (check_amd_hwpstate_cpu(cpu) && boot_cpu_data.x86 < 0x19 && ++ !acpi_pstate_strict) { + cpumask_clear(policy->cpus); + cpumask_set_cpu(cpu, policy->cpus); + cpumask_copy(data->freqdomain_cpus, diff --git a/queue-4.4/acpi-extlog-check-for-rdmsr-failure.patch b/queue-4.4/acpi-extlog-check-for-rdmsr-failure.patch new file mode 100644 index 00000000000..3b75d3c26b9 --- /dev/null +++ b/queue-4.4/acpi-extlog-check-for-rdmsr-failure.patch @@ -0,0 +1,42 @@ +From 7cecb47f55e00282f972a1e0b09136c8cd938221 Mon Sep 17 00:00:00 2001 +From: Ben Hutchings +Date: Sun, 27 Sep 2020 22:50:42 +0100 +Subject: ACPI / extlog: Check for RDMSR failure + +From: Ben Hutchings + +commit 7cecb47f55e00282f972a1e0b09136c8cd938221 upstream. + +extlog_init() uses rdmsrl() to read an MSR, which on older CPUs +provokes a error message at boot: + + unchecked MSR access error: RDMSR from 0x179 at rIP: 0xcd047307 (native_read_msr+0x7/0x40) + +Use rdmsrl_safe() instead, and return -ENODEV if it fails. + +Reported-by: jim@photojim.ca +References: https://bugs.debian.org/971058 +Cc: All applicable +Signed-off-by: Ben Hutchings +Signed-off-by: Rafael J. Wysocki +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/acpi/acpi_extlog.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +--- a/drivers/acpi/acpi_extlog.c ++++ b/drivers/acpi/acpi_extlog.c +@@ -223,9 +223,9 @@ static int __init extlog_init(void) + u64 cap; + int rc; + +- rdmsrl(MSR_IA32_MCG_CAP, cap); +- +- if (!(cap & MCG_ELOG_P) || !extlog_get_l1addr()) ++ if (rdmsrl_safe(MSR_IA32_MCG_CAP, &cap) || ++ !(cap & MCG_ELOG_P) || ++ !extlog_get_l1addr()) + return -ENODEV; + + if (get_edac_report_status() == EDAC_REPORTING_FORCE) { diff --git a/queue-4.4/acpi-video-use-acpi-backlight-for-hp-635-notebook.patch b/queue-4.4/acpi-video-use-acpi-backlight-for-hp-635-notebook.patch new file mode 100644 index 00000000000..4f67e3bf9ca --- /dev/null +++ b/queue-4.4/acpi-video-use-acpi-backlight-for-hp-635-notebook.patch @@ -0,0 +1,42 @@ +From b226faab4e7890bbbccdf794e8b94276414f9058 Mon Sep 17 00:00:00 2001 +From: Alex Hung +Date: Sun, 13 Sep 2020 16:34:03 -0600 +Subject: ACPI: video: use ACPI backlight for HP 635 Notebook + +From: Alex Hung + +commit b226faab4e7890bbbccdf794e8b94276414f9058 upstream. + +The default backlight interface is AMD's radeon_bl0 which does not +work on this system, so use the ACPI backlight interface on it +instead. + +BugLink: https://bugs.launchpad.net/bugs/1894667 +Cc: All applicable +Signed-off-by: Alex Hung +[ rjw: Changelog edits ] +Signed-off-by: Rafael J. Wysocki +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/acpi/video_detect.c | 9 +++++++++ + 1 file changed, 9 insertions(+) + +--- a/drivers/acpi/video_detect.c ++++ b/drivers/acpi/video_detect.c +@@ -251,6 +251,15 @@ static const struct dmi_system_id video_ + DMI_MATCH(DMI_PRODUCT_NAME, "XPS L521X"), + }, + }, ++ /* https://bugs.launchpad.net/bugs/1894667 */ ++ { ++ .callback = video_detect_force_video, ++ .ident = "HP 635 Notebook", ++ .matches = { ++ DMI_MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"), ++ DMI_MATCH(DMI_PRODUCT_NAME, "HP 635 Notebook PC"), ++ }, ++ }, + + /* Non win8 machines which need native backlight nevertheless */ + { diff --git a/queue-4.4/leds-bcm6328-bcm6358-use-devres-led-registering-function.patch b/queue-4.4/leds-bcm6328-bcm6358-use-devres-led-registering-function.patch new file mode 100644 index 00000000000..af6d54ad39f --- /dev/null +++ b/queue-4.4/leds-bcm6328-bcm6358-use-devres-led-registering-function.patch @@ -0,0 +1,53 @@ +From ff5c89d44453e7ad99502b04bf798a3fc32c758b Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Marek=20Beh=C3=BAn?= +Date: Fri, 18 Sep 2020 00:32:58 +0200 +Subject: leds: bcm6328, bcm6358: use devres LED registering function +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +From: Marek Behún + +commit ff5c89d44453e7ad99502b04bf798a3fc32c758b upstream. + +These two drivers do not provide remove method and use devres for +allocation of other resources, yet they use led_classdev_register +instead of the devres variant, devm_led_classdev_register. + +Fix this. + +Signed-off-by: Marek Behún +Cc: Álvaro Fernández Rojas +Cc: Kevin Cernekee +Cc: Jaedon Shin +Signed-off-by: Pavel Machek +Cc: stable@kernel.org +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/leds/leds-bcm6328.c | 2 +- + drivers/leds/leds-bcm6358.c | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +--- a/drivers/leds/leds-bcm6328.c ++++ b/drivers/leds/leds-bcm6328.c +@@ -325,7 +325,7 @@ static int bcm6328_led(struct device *de + led->cdev.brightness_set = bcm6328_led_set; + led->cdev.blink_set = bcm6328_blink_set; + +- rc = led_classdev_register(dev, &led->cdev); ++ rc = devm_led_classdev_register(dev, &led->cdev); + if (rc < 0) + return rc; + +--- a/drivers/leds/leds-bcm6358.c ++++ b/drivers/leds/leds-bcm6358.c +@@ -146,7 +146,7 @@ static int bcm6358_led(struct device *de + + led->cdev.brightness_set = bcm6358_led_set; + +- rc = led_classdev_register(dev, &led->cdev); ++ rc = devm_led_classdev_register(dev, &led->cdev); + if (rc < 0) + return rc; + diff --git a/queue-4.4/nfs-fix-nfs_path-in-case-of-a-rename-retry.patch b/queue-4.4/nfs-fix-nfs_path-in-case-of-a-rename-retry.patch new file mode 100644 index 00000000000..a558f9dcb39 --- /dev/null +++ b/queue-4.4/nfs-fix-nfs_path-in-case-of-a-rename-retry.patch @@ -0,0 +1,58 @@ +From 247db73560bc3e5aef6db50c443c3c0db115bc93 Mon Sep 17 00:00:00 2001 +From: Ashish Sangwan +Date: Mon, 5 Oct 2020 02:22:43 -0700 +Subject: NFS: fix nfs_path in case of a rename retry + +From: Ashish Sangwan + +commit 247db73560bc3e5aef6db50c443c3c0db115bc93 upstream. + +We are generating incorrect path in case of rename retry because +we are restarting from wrong dentry. We should restart from the +dentry which was received in the call to nfs_path. + +CC: stable@vger.kernel.org +Signed-off-by: Ashish Sangwan +Signed-off-by: Anna Schumaker +Signed-off-by: Greg Kroah-Hartman + +--- + fs/nfs/namespace.c | 12 ++++++++---- + 1 file changed, 8 insertions(+), 4 deletions(-) + +--- a/fs/nfs/namespace.c ++++ b/fs/nfs/namespace.c +@@ -30,9 +30,9 @@ int nfs_mountpoint_expiry_timeout = 500 + /* + * nfs_path - reconstruct the path given an arbitrary dentry + * @base - used to return pointer to the end of devname part of path +- * @dentry - pointer to dentry ++ * @dentry_in - pointer to dentry + * @buffer - result buffer +- * @buflen - length of buffer ++ * @buflen_in - length of buffer + * @flags - options (see below) + * + * Helper function for constructing the server pathname +@@ -47,15 +47,19 @@ int nfs_mountpoint_expiry_timeout = 500 + * the original device (export) name + * (if unset, the original name is returned verbatim) + */ +-char *nfs_path(char **p, struct dentry *dentry, char *buffer, ssize_t buflen, +- unsigned flags) ++char *nfs_path(char **p, struct dentry *dentry_in, char *buffer, ++ ssize_t buflen_in, unsigned flags) + { + char *end; + int namelen; + unsigned seq; + const char *base; ++ struct dentry *dentry; ++ ssize_t buflen; + + rename_retry: ++ buflen = buflen_in; ++ dentry = dentry_in; + end = buffer+buflen; + *--end = '\0'; + buflen--; diff --git a/queue-4.4/series b/queue-4.4/series index d771c3dfe6d..97c6b026477 100644 --- a/queue-4.4/series +++ b/queue-4.4/series @@ -33,3 +33,8 @@ memory-emif-remove-bogus-debugfs-error-handling.patch arm-dts-s5pv210-move-pmu-node-out-of-clock-controlle.patch arm-dts-s5pv210-remove-dedicated-audio-subsystem-nod.patch md-raid5-fix-oops-during-stripe-resizing.patch +leds-bcm6328-bcm6358-use-devres-led-registering-function.patch +nfs-fix-nfs_path-in-case-of-a-rename-retry.patch +acpi-extlog-check-for-rdmsr-failure.patch +acpi-video-use-acpi-backlight-for-hp-635-notebook.patch +acpi-cpufreq-honor-_psd-table-setting-on-new-amd-cpus.patch