diff options
author | Ben Hutchings <ben@decadent.org.uk> | 2018-10-13 15:38:22 +0100 |
---|---|---|
committer | Ben Hutchings <ben@decadent.org.uk> | 2018-10-13 15:38:22 +0100 |
commit | 46ac9617fd71119730c653e0e4a13d93e34f7f50 (patch) | |
tree | f54a520552c4d58314811e41177b48816b978d33 | |
parent | 51f217dbf49688552be41f791fe9d531952ce508 (diff) | |
download | linux-stable-queue-46ac9617fd71119730c653e0e4a13d93e34f7f50.tar.gz |
Fix build failures on powerpc and some other architectures
-rw-r--r-- | queue-3.16/powerpc-powernv-define-a-standard-delay-for-opal_busy-type-retry.patch | 43 | ||||
-rw-r--r-- | queue-3.16/rtc-snvs-fix-usage-of-snvs_rtc_enable.patch | 6 | ||||
-rw-r--r-- | queue-3.16/series | 1 |
3 files changed, 48 insertions, 2 deletions
diff --git a/queue-3.16/powerpc-powernv-define-a-standard-delay-for-opal_busy-type-retry.patch b/queue-3.16/powerpc-powernv-define-a-standard-delay-for-opal_busy-type-retry.patch new file mode 100644 index 00000000..254962fa --- /dev/null +++ b/queue-3.16/powerpc-powernv-define-a-standard-delay-for-opal_busy-type-retry.patch @@ -0,0 +1,43 @@ +From: Nicholas Piggin <npiggin@gmail.com> +Date: Tue, 10 Apr 2018 21:49:31 +1000 +Subject: powerpc/powernv: define a standard delay for OPAL_BUSY type retry + loops + +commit 34dd25de9fe3f60bfdb31b473bf04b28262d0896 upstream. + +This is the start of an effort to tidy up and standardise all the +delays. Existing loops have a range of delay/sleep periods from 1ms +to 20ms, and some have no delay. They all loop forever except rtc, +which times out after 10 retries, and that uses 10ms delays. So use +10ms as our standard delay. The OPAL maintainer agrees 10ms is a +reasonable starting point. + +The idea is to use the same recipe everywhere, once this is proven to +work then it will be documented as an OPAL API standard. Then both +firmware and OS can agree, and if a particular call needs something +else, then that can be documented with reasoning. + +This is not the end-all of this effort, it's just a relatively easy +change that fixes some existing high latency delays. There should be +provision for standardising timeouts and/or interruptible loops where +possible, so non-fatal firmware errors don't cause hangs. + +Signed-off-by: Nicholas Piggin <npiggin@gmail.com> +Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> +Signed-off-by: Ben Hutchings <ben@decadent.org.uk> +--- + arch/powerpc/include/asm/opal.h | 3 +++ + 1 file changed, 3 insertions(+) + +--- a/arch/powerpc/include/asm/opal.h ++++ b/arch/powerpc/include/asm/opal.h +@@ -707,6 +707,9 @@ typedef struct oppanel_line { + uint64_t line_len; + } oppanel_line_t; + ++/* Default time to sleep or delay between OPAL_BUSY/OPAL_BUSY_EVENT loops */ ++#define OPAL_BUSY_DELAY_MS 10 ++ + /* /sys/firmware/opal */ + extern struct kobject *opal_kobj; + diff --git a/queue-3.16/rtc-snvs-fix-usage-of-snvs_rtc_enable.patch b/queue-3.16/rtc-snvs-fix-usage-of-snvs_rtc_enable.patch index 82ffd69f..1e014009 100644 --- a/queue-3.16/rtc-snvs-fix-usage-of-snvs_rtc_enable.patch +++ b/queue-3.16/rtc-snvs-fix-usage-of-snvs_rtc_enable.patch @@ -38,7 +38,9 @@ Fixes: 179a502f8c46 ("rtc: snvs: add Freescale rtc-snvs driver") Signed-off-by: Bryan O'Donoghue <pure.logic@nexus-software.ie> Acked-by: Shawn Guo <shawn.guo@linaro.org> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> -[bwh: Backported to 3.16: adjust context] +[bwh: Backported to 3.16: + - No cleanup is needed on error in snvs_rtc_probe(); just return + - Adjust context] Signed-off-by: Ben Hutchings <ben@decadent.org.uk> --- drivers/rtc/rtc-snvs.c | 15 +++++++++++---- @@ -81,7 +83,7 @@ Signed-off-by: Ben Hutchings <ben@decadent.org.uk> + ret = snvs_rtc_enable(data, true); + if (ret) { + dev_err(&pdev->dev, "failed to enable rtc %d\n", ret); -+ goto error_rtc_device_register; ++ return ret; + } device_init_wakeup(&pdev->dev, true); diff --git a/queue-3.16/series b/queue-3.16/series index 2fd63a7f..1560db8b 100644 --- a/queue-3.16/series +++ b/queue-3.16/series @@ -129,6 +129,7 @@ scsi-qla2xxx-avoid-double-completion-of-abort-command.patch s390-ipl-ensure-loadparm-valid-flag-is-set.patch x86-apic-fix-signedness-bug-in-apic-id-validity-checks.patch tracing-uprobe_event-fix-strncpy-corner-case.patch +powerpc-powernv-define-a-standard-delay-for-opal_busy-type-retry.patch powerpc-powernv-fix-opal-nvram-driver-opal_busy-loops.patch fs-proc-proc_sysctl.c-fix-potential-page-fault-while-unregistering.patch fs-reiserfs-journal.c-add-missing-resierfs_warning-arg.patch |