Signed-off-by: Cyril Bur
---
arch/powerpc/kernel/process.c | 34 +-
1 file changed, 17 insertions(+), 17 deletions(-)
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
index 56444a6..7625976 100644
--- a/arch/powerpc/kernel/process.c
Currently copy_thread() doesn't flush SPRs to the parent thread struct.
Currently this only affects the TAR register as perf takes care of some of the
others and the remaining ones are all Event Based Branch (EBB) registers which
are cleared across fork().
Signed-off-by: Cyril Bur
---
Signed-off-by: Cyril Bur
---
tools/testing/selftests/powerpc/syscalls/Makefile | 3 +-
.../testing/selftests/powerpc/syscalls/spr_fork.c | 78 ++
2 files changed, 80 insertions(+), 1 deletion(-)
create mode 100644 tools/testing/selftests/powerpc/syscalls/spr_fork.c
diff
the parent thread to sanitise what it
deems necessary.
Signed-off-by: Cyril Bur
---
arch/powerpc/kernel/process.c | 14 ++
1 file changed, 14 insertions(+)
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel/process.c
index d7a9df5..56444a6 100644
--- a/arch/powe
;
> NOTE: this is for userspace only, not in kernel, and does not deal
> with KVM guests.
>
> Patch created with much assistance from Michael Neuling
>
>
Hi Chris,
Patch looks good. Looks like you've put 8 spaces (instead of a tab) on the
PPC_CP_ABORT line.
Apart from t
taking locks is unsafe therefore the
best course of action is to simply do nothing. Concurrent tlbie()s are not
possible in the first case as secondary CPUs have not come up yet.
Signed-off-by: Cyril Bur
---
arch/powerpc/mm/hash_native_64.c | 23 +++
1 file changed, 11
taking locks is unsafe therefore the
best course of action is to simply do nothing. Concurrent tlbie()s are not
possible in the first case as secondary CPUs have not come up yet.
Signed-off-by: Cyril Bur
---
Tested on POWER8 system by applying this patch to the petitboot kernel,
kexecing into Linus
ance when touching all three only 5%. There is a compounding effect
in so far as the cost of taking multiple unavailable exception is removed.
This testing also demonstrates that the cost of the exception is by far the
most expensive part of the current lazy approach.
Cyril Bur (8):
selftests
Loop in assembly checking the registers with many threads.
Signed-off-by: Cyril Bur
---
tools/testing/selftests/powerpc/math/Makefile | 7 +-
tools/testing/selftests/powerpc/math/fpu_asm.S | 34
tools/testing/selftests/powerpc/math/fpu_preempt.c | 92
With threads leaving the math bits enabled in their saved MSR to indicate
that the hardware is hot and a restore is not needed, children need to turn
it off as when they do get scheduled, there's no way their registers could
have been hot.
Signed-off-by: Cyril Bur
---
arch/powerpc/k
userspace with hot
registers avoiding a possibly pointless reload of FPU register state.
Signed-off-by: Cyril Bur
---
arch/powerpc/include/asm/switch_to.h | 2 +-
arch/powerpc/kernel/fpu.S| 21
arch/powerpc/kernel/process.c| 46
counter is used to detect if the registers have been used in the
past and the registers are always loaded until the value wraps to back to
zero.
Signed-off-by: Cyril Bur
---
arch/powerpc/include/asm/processor.h | 2 ++
arch/powerpc/kernel/asm-offsets.c| 2 ++
arch/powerpc/kernel/entry_64.S
reload of VEC state.
Signed-off-by: Cyril Bur
---
arch/powerpc/include/asm/switch_to.h | 2 +-
arch/powerpc/kernel/process.c| 12 +++-
arch/powerpc/kernel/vector.S | 24
3 files changed, 16 insertions(+), 22 deletions(-)
diff --git a/arch/powerpc
pointless reload of VSX state.
Signed-off-by: Cyril Bur
---
arch/powerpc/include/asm/switch_to.h | 1 -
arch/powerpc/kernel/ppc_ksyms.c | 4
arch/powerpc/kernel/process.c| 23 ++-
arch/powerpc/kernel/vector.S | 17 -
4 files changed, 18
Test that the non volatile floating point and Altivec registers get
correctly preserved across the fork() syscall.
fork() works nicely for this purpose, the registers should be the same for
both parent and child
Signed-off-by: Cyril Bur
---
tools/testing/selftests/powerpc/Makefile
Load up the non volatile FPU and VMX regs and ensure that they are the
expected value in a signal handler
Signed-off-by: Cyril Bur
---
tools/testing/selftests/powerpc/math/Makefile | 4 +-
tools/testing/selftests/powerpc/math/fpu_signal.c | 119 +
tools/testing
On Wed, 18 Nov 2015 14:51:25 +
David Laight wrote:
> From: Cyril Bur
> > Sent: 18 November 2015 03:27
> ...
> > The goal of these patches is to rework how the 'math' registers (FP, VEC
> > and VSX) are context switched. Currently the kernel adopts a l
On Fri, 20 Nov 2015 22:01:04 +1100
Michael Ellerman wrote:
> On Wed, 2015-11-18 at 14:26 +1100, Cyril Bur wrote:
> > diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S
> > index c8b4225..46e9869 100644
> > --- a/arch/powerpc/kernel/entry_64.S
&
On Mon, 23 Nov 2015 11:23:13 +1100
Michael Neuling wrote:
> On Wed, 2015-11-18 at 14:26 +1100, Cyril Bur wrote:
> > Test that the non volatile floating point and Altivec registers get
> > correctly preserved across the fork() syscall.
>
> Can we add a test for VSX too
On Mon, 23 Nov 2015 12:08:38 +1100
Michael Neuling wrote:
> On Wed, 2015-11-18 at 14:26 +1100, Cyril Bur wrote:
> > With threads leaving the math bits enabled in their saved MSR to
> > indicate
> > that the hardware is hot and a restore is not needed, children need
> >
such as adding .gitignore and forcing 64 bit compiles of the
tests as they use 64 bit only instructions.
Cyril Bur (8):
selftests/powerpc: Test the preservation of FPU and VMX regs across
syscall
selftests/powerpc: Test preservation of FPU and VMX regs across
preemption
selftests/powe
With threads leaving the math bits enabled in their saved MSR to indicate
that the hardware is hot and a restore is not needed, children need to turn
it off as when they do get scheduled, there's no way their registers could
have been hot.
Signed-off-by: Cyril Bur
---
arch/powerpc/k
Loop in assembly checking the registers with many threads.
Signed-off-by: Cyril Bur
---
tools/testing/selftests/powerpc/math/.gitignore| 2 +
tools/testing/selftests/powerpc/math/Makefile | 5 +-
tools/testing/selftests/powerpc/math/fpu_asm.S | 34 +++
tools/testing
Load up the non volatile FPU and VMX regs and ensure that they are the
expected value in a signal handler
Signed-off-by: Cyril Bur
---
tools/testing/selftests/powerpc/math/.gitignore | 2 +
tools/testing/selftests/powerpc/math/Makefile | 4 +-
tools/testing/selftests/powerpc/math
Test that the non volatile floating point and Altivec registers get
correctly preserved across the fork() syscall.
fork() works nicely for this purpose, the registers should be the same for
both parent and child
Signed-off-by: Cyril Bur
---
tools/testing/selftests/powerpc/Makefile
pointless reload of VSX state.
Signed-off-by: Cyril Bur
---
arch/powerpc/include/asm/switch_to.h | 1 -
arch/powerpc/kernel/ppc_ksyms.c | 4
arch/powerpc/kernel/process.c| 23 ++-
arch/powerpc/kernel/vector.S | 17 -
4 files changed, 18
reload of VEC state.
Signed-off-by: Cyril Bur
---
arch/powerpc/include/asm/switch_to.h | 2 +-
arch/powerpc/kernel/process.c| 12 +++-
arch/powerpc/kernel/vector.S | 24
3 files changed, 16 insertions(+), 22 deletions(-)
diff --git a/arch/powerpc
benchmarking it was determined that avoiding C in the
common case is a performance benefit. The full check in asm greatly
complicated that codepath for a negligible performance gain and the
trade-off was deemed not worth it.
Signed-off-by: Cyril Bur
---
arch/powerpc/include/asm/processor.h | 2
userspace with hot
registers avoiding a possibly pointless reload of FPU register state.
Signed-off-by: Cyril Bur
---
arch/powerpc/include/asm/switch_to.h | 2 +-
arch/powerpc/kernel/fpu.S| 21
arch/powerpc/kernel/process.c| 46
On Fri, 15 Jan 2016 16:42:22 +1100
Michael Neuling wrote:
> On Fri, 2016-01-15 at 16:04 +1100, Cyril Bur wrote:
> > With threads leaving the math bits enabled in their saved MSR to indicate
> > that the hardware is hot and a restore is not needed, children need to turn
> > i
regs);
> > +
> > #endif /* CONFIG_PPC_BOOK3S_64 */
>
> > return last;
> > diff --git a/arch/powerpc/kernel/vector.S b/arch/powerpc/kernel/vector.S
> > index 162d0f7..038cff8 100644
> > --- a/arch/powerpc/ke
On Fri, 15 Jan 2016 17:25:26 +1100
Michael Neuling wrote:
> On Fri, 2016-01-15 at 16:04 +1100, Cyril Bur wrote:
> > This patch adds the ability to be able to save the VSX registers to
> > the
> > thread struct without giving up (disabling the facility) next time
> >
Test that the non volatile floating point and Altivec registers get
correctly preserved across the fork() syscall.
fork() works nicely for this purpose, the registers should be the same for
both parent and child
Signed-off-by: Cyril Bur
---
tools/testing/selftests/powerpc/Makefile
hot while not having MSR_{FP,VEC,VSX} means that the
registers must be loaded. This allows for a smarter return to userspace.
Signed-off-by: Cyril Bur
---
arch/powerpc/kernel/process.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel
benchmarking it was determined that avoiding C in the
common case is a performance benefit. The full check in asm greatly
complicated that codepath for a negligible performance gain and the
trade-off was deemed not worth it.
Signed-off-by: Cyril Bur
---
arch/powerpc/include/asm/processor.h | 2
pointless reload of VSX state.
Signed-off-by: Cyril Bur
---
arch/powerpc/include/asm/switch_to.h | 4
arch/powerpc/kernel/ppc_ksyms.c | 4
arch/powerpc/kernel/process.c| 42 +---
arch/powerpc/kernel/vector.S | 17 ---
4 files
reload of VEC state.
Signed-off-by: Cyril Bur
---
arch/powerpc/include/asm/switch_to.h | 3 ++-
arch/powerpc/kernel/process.c| 12 +++-
arch/powerpc/kernel/vector.S | 24
3 files changed, 17 insertions(+), 22 deletions(-)
diff --git a/arch/powerpc
userspace with hot
registers avoiding a possibly pointless reload of FPU register state.
Signed-off-by: Cyril Bur
---
arch/powerpc/include/asm/switch_to.h | 3 ++-
arch/powerpc/kernel/fpu.S| 21 -
arch/powerpc/kernel/process.c| 12 +++-
3 files changed
saving of registers to thread structs and leave
threads MSR with bits enabled.
This patch introduces no functional change.
Signed-off-by: Cyril Bur
---
arch/powerpc/include/asm/switch_to.h | 7 +++
arch/powerpc/kernel/process.c| 39 +++-
2 files changed
Load up the non volatile FPU and VMX regs and ensure that they are the
expected value in a signal handler
Signed-off-by: Cyril Bur
---
tools/testing/selftests/powerpc/math/.gitignore | 2 +
tools/testing/selftests/powerpc/math/Makefile | 4 +-
tools/testing/selftests/powerpc/math
commit message in 4/9 better reflect the patch
- Removed overuse of #ifdef blocks and redundant condition in 5/9
- Split 6/8 in two to better prepare for 7,8,9
- Removed #ifdefs in 6/9
Cyril Bur (9):
selftests/powerpc: Test the preservation of FPU and VMX regs across
syscall
selftests
Loop in assembly checking the registers with many threads.
Signed-off-by: Cyril Bur
---
tools/testing/selftests/powerpc/math/.gitignore| 2 +
tools/testing/selftests/powerpc/math/Makefile | 5 +-
tools/testing/selftests/powerpc/math/fpu_asm.S | 34 +++
tools/testing
On Mon, 25 Jan 2016 11:04:23 +1100
Balbir Singh wrote:
> On Thu, 21 Jan 2016 11:55:44 +1100
> Cyril Bur wrote:
>
> > Currently when threads get scheduled off they always giveup the FPU,
> > Altivec (VMX) and Vector (VSX) units if they were using them. When they are
&g
On Wed, 27 Jan 2016 23:01:59 +1100
Balbir Singh wrote:
> On Wed, Jan 27, 2016 at 10:50 AM, Cyril Bur wrote:
> > On Mon, 25 Jan 2016 11:04:23 +1100
> > Balbir Singh wrote:
> >
> >> On Thu, 21 Jan 2016 11:55:44 +1100
> >> Cyril Bur wrote:
> >>
#ifdefs in V3 (6/9)
- Reordered some conditions in if statements
Cyril Bur (9):
selftests/powerpc: Test the preservation of FPU and VMX regs across
syscall
selftests/powerpc: Test preservation of FPU and VMX regs across
preemption
selftests/powerpc: Test FPU and VMX regs in signal ucontext
Loop in assembly checking the registers with many threads.
Signed-off-by: Cyril Bur
---
tools/testing/selftests/powerpc/math/.gitignore| 2 +
tools/testing/selftests/powerpc/math/Makefile | 5 +-
tools/testing/selftests/powerpc/math/fpu_asm.S | 34 +++
tools/testing
Load up the non volatile FPU and VMX regs and ensure that they are the
expected value in a signal handler
Signed-off-by: Cyril Bur
---
tools/testing/selftests/powerpc/math/.gitignore | 2 +
tools/testing/selftests/powerpc/math/Makefile | 4 +-
tools/testing/selftests/powerpc/math
Test that the non volatile floating point and Altivec registers get
correctly preserved across the fork() syscall.
fork() works nicely for this purpose, the registers should be the same for
both parent and child
Signed-off-by: Cyril Bur
---
tools/testing/selftests/powerpc/Makefile
hot while not having MSR_{FP,VEC,VSX} means that the
registers must be loaded. This allows for a smarter return to userspace.
Signed-off-by: Cyril Bur
---
arch/powerpc/kernel/process.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/powerpc/kernel/process.c b/arch/powerpc/kernel
benchmarking it was determined that avoiding C in the
common case is a performance benefit. The full check in asm greatly
complicated that codepath for a negligible performance gain and the
trade-off was deemed not worth it.
Signed-off-by: Cyril Bur
---
arch/powerpc/include/asm/processor.h | 2
saving of registers to thread structs and leave
threads MSR with bits enabled.
This patch introduces no functional change.
Signed-off-by: Cyril Bur
---
arch/powerpc/include/asm/reg.h | 8
arch/powerpc/include/asm/switch_to.h | 7 +++
arch/powerpc/kernel/process.c| 31
reload of VEC state.
Signed-off-by: Cyril Bur
---
arch/powerpc/include/asm/switch_to.h | 3 ++-
arch/powerpc/kernel/process.c| 12 +++-
arch/powerpc/kernel/vector.S | 24
3 files changed, 17 insertions(+), 22 deletions(-)
diff --git a/arch/powerpc
userspace with hot
registers avoiding a possibly pointless reload of FPU register state.
Signed-off-by: Cyril Bur
---
arch/powerpc/include/asm/switch_to.h | 3 ++-
arch/powerpc/kernel/fpu.S| 21 -
arch/powerpc/kernel/process.c| 12 +++-
3 files changed
pointless reload of VSX state.
Signed-off-by: Cyril Bur
---
arch/powerpc/include/asm/switch_to.h | 4
arch/powerpc/kernel/ppc_ksyms.c | 4
arch/powerpc/kernel/process.c| 42 +---
arch/powerpc/kernel/vector.S | 17 ---
4 files
On Mon, 15 Feb 2016 22:29:17 +0530
"Naveen N. Rao" wrote:
> On 2016/02/15 04:07PM, Cyril Bur wrote:
> > Test that the non volatile floating point and Altivec registers get
> > correctly preserved across the fork() syscall.
> >
> > fork() works nicely for
register comparisons the big endian
only byte ordering for stxvd2x and lxvd2x does not impact the test.
Signed-off-by: Cyril Bur
---
tools/testing/selftests/powerpc/include/vsx_asm.h | 48 +++
1 file changed, 24 insertions(+), 24 deletions(-)
diff --git a/tools/testing
e CPU loads the values from memory since
the tests only performs register comparisons, using stxvd2x/lxvd2x does
not impact the test.
Signed-off-by: Cyril Bur
Acked-by: Balbir Singh
---
V2: Reword last sentence of commit message
tools/testing/selftests/powerpc/include/vsx_asm.h
piler is not 32bit capable), the Makefile should first fall back to
the compiler it used for the rest of the kernel.
Signed-off-by: Cyril Bur
---
arch/powerpc/Makefile | 10 ++
1 file changed, 10 insertions(+)
diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
index 8b4
s based heavily on.
>
Good looking test!
> Signed-off-by: Michael Neuling
Reviewed-by: Cyril Bur
> ---
> tools/testing/selftests/powerpc/tm/Makefile| 4 +-
> .../testing/selftests/powerpc/tm/tm-vmx-unavail.c | 118
> +
> 2 files changed, 121 inse
On Mon, 2017-05-08 at 17:16 +1000, Michael Neuling wrote:
> In this commit:
> commit dc3106690b20305c3df06b42456fe386dd632ac9
> Author: Cyril Bur
> powerpc: tm: Always use fp_state and vr_state to store live registers
>
> A section of code was removed that copied th
BUG_ON() should be reserved in situations where we can not longer
guarantee the integrity of the system. In the case where
powernv_flash_async_op() receives an impossible op, we can still
guarantee the integrity of the system.
Signed-off-by: Cyril Bur
---
I think patches to powernv_flash have
OPAL can only manage one flash access at a time and will return an
OPAL_BUSY error for each concurrent access to the flash. The simplest
way to prevent this from happening is with a mutex.
Signed-off-by: Cyril Bur
---
This is to address https://github.com/open-power/skiboot/issues/80
drivers
On Mon, 2017-06-05 at 11:43 +0530, Shilpasri G Bhat wrote:
> In P9, OCC (On-Chip-Controller) supports shared memory based
> commad-response interface. Within the shared memory there is an OPAL
> command buffer and OCC response buffer that can be used to send
> inband commands to OCC. This patch add
On Tue, 2017-06-13 at 23:26 +0530, Shilpasri G Bhat wrote:
> In P9, OCC (On-Chip-Controller) supports shared memory based
> commad-response interface. Within the shared memory there is an OPAL
> command buffer and OCC response buffer that can be used to send
> inband commands to OCC. This patch add
On Mon, 2017-06-19 at 11:44 +0530, Shilpasri G Bhat wrote:
> In P9, OCC (On-Chip-Controller) supports shared memory based
> commad-response interface. Within the shared memory there is an OPAL
> command buffer and OCC response buffer that can be used to send
> inband commands to OCC. This patch add
On Wed, 2017-06-21 at 13:36 +0530, Shilpasri G Bhat wrote:
> In P9, OCC (On-Chip-Controller) supports shared memory based
> commad-response interface. Within the shared memory there is an OPAL
> command buffer and OCC response buffer that can be used to send
> inband commands to OCC. This patch add
On Thu, 2017-06-22 at 09:57 +0530, Shilpasri G Bhat wrote:
> Hi Cyril,
>
> On 06/22/2017 06:28 AM, Cyril Bur wrote:
> > On Wed, 2017-06-21 at 13:36 +0530, Shilpasri G Bhat wrote:
> > > In P9, OCC (On-Chip-Controller) supports shared memory based
> > > commad-resp
On Thu, 2017-06-22 at 17:27 -0300, Breno Leitao wrote:
> Currently giveup_all() calls __giveup_fpu(), __giveup_altivec(), and
> __giveup_vsx(). But __giveup_vsx() also calls __giveup_fpu() and
> __giveup_altivec() again, in a redudant manner.
>
> Other than giving up FP and Altivec, __giveup_vsx()
the OCC works or
anything so I would be best if there were other eyes on this.
Provided zero is an ok request_id:
Reviewed-by: Cyril Bur
> Signed-off-by: Shilpasri G Bhat
> ---
> The skiboot patch for the interface is posted here:
> https://lists.ozlabs.org/pipermail/skiboot/20
functions would take upwards of two minutes
causing the wait_event() to block long enough to cause hung task
warnings. Furthermore, wait_event_interruptible() is preferable as
otherwise there is no way for signals to stop the process which is going
to be confusing in userspace.
Signed-off-by: Cyril Bur
Signed-off-by: Cyril Bur
---
arch/powerpc/platforms/powernv/opal.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/powerpc/platforms/powernv/opal.c
b/arch/powerpc/platforms/powernv/opal.c
index 59684b4af4d1..f87e000e7c28 100644
--- a/arch/powerpc/platforms/powernv/opal.c
+++ b/arch
tokens there can be - it is possible that OPAL
will inform Linux that there are more than 64 tokens.
Rather than add a bitfield to track the extra state, rework the
internals slightly.
Signed-off-by: Cyril Bur
---
arch/powerpc/platforms/powernv/opal-async.c | 99 -
1
ts to quieten down the use of dev_err() when
errors haven't actually occurred and also to return better information up
the stack rather than always -EIO.
Signed-off-by: Cyril Bur
---
drivers/mtd/devices/powernv_flash.c | 18 +++---
1 file changed, 11 insertions(+), 7 deletions(-)
di
ync
tokens.
Signed-off-by: Cyril Bur
---
arch/powerpc/include/asm/opal.h | 2 --
arch/powerpc/platforms/powernv/opal-async.c | 10 +++---
2 files changed, 3 insertions(+), 9 deletions(-)
diff --git a/arch/powerpc/include/asm/opal.h b/arch/powerpc/include/asm/opal.h
index 58
problem that the
powernv_flash MTD driver can use in patch 5/5.
Hello MTD folk, traditionally Michael Ellerman takes powernv_flash
driver patches through the powerpc tree, as always your feedback is
very welcome.
Thanks,
Cyril
Cyril Bur (5):
powerpc/opal: Make __opal_async_{get,release}_token
On Thu, 2017-06-29 at 20:44 -0400, Gustavo Romero wrote:
> Currently tm_reclaim() can return with a corrupted vs0 (fp0) or vs32 (v0)
> due to the fact vs0 is used to save FPSCR and vs32 is used to save VSCR.
>
> Later, we recheckpoint trusting that the live state of FP and VEC are ok
> depending o
On Fri, 2017-06-30 at 13:41 -0300, Breno Leitao wrote:
> Thanks Gustavo for the patch.
>
> On Thu, Jun 29, 2017 at 08:39:23PM -0400, Gustavo Romero wrote:
> > Currently tm_reclaim() can return with a corrupted vs0 (fp0) or vs32 (v0)
> > due to the fact vs0 is used to save FPSCR and vs32 is used to
ood, its a nice test for a very difficult (difficult on purpose
but still possible by accident!) to hit bug.
Reviewed-by: Cyril Bur
> ---
> tools/testing/selftests/powerpc/tm/Makefile| 3 +-
> .../testing/selftests/powerpc/tm/tm-vsx-unavail.c | 144
> ++
Turns out pthreads returns an errno and doesn't set errno. This doesn't
play well with perror().
Signed-off-by: Cyril Bur
---
.../selftests/powerpc/benchmarks/context_switch.c| 16 +---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/tools/testing
On Sat, 2017-07-08 at 14:59 -0500, Benjamin Herrenschmidt wrote:
> On Thu, 2017-06-29 at 16:54 +1000, Cyril Bur wrote:
> > The OPAL calls performed in this driver shouldn't be using
> > opal_async_wait_response() as this performs a wait_event() which, on
> > long running
Signed-off-by: Cyril Bur
---
drivers/mtd/devices/powernv_flash.c | 16 ++--
1 file changed, 6 insertions(+), 10 deletions(-)
diff --git a/drivers/mtd/devices/powernv_flash.c
b/drivers/mtd/devices/powernv_flash.c
index d50b5f200f73..d7243b72ba6e 100644
--- a/drivers/mtd/devices
BUG_ON() should be reserved in situations where we can not longer
guarantee the integrity of the system. In the case where
powernv_flash_async_op() receives an impossible op, we can still
guarantee the integrity of the system.
Signed-off-by: Cyril Bur
---
drivers/mtd/devices/powernv_flash.c | 3
c tree, as always your feedback is
very welcome.
Thanks,
Cyril
Cyril Bur (9):
mtd: powernv_flash: Use WARN_ON_ONCE() rather than BUG_ON()
mtd: powernv_flash: Lock around concurrent access to OPAL
mtd: powernv_flash: Don't treat OPAL_SUCCESS as an error
mtd: powernv_flash: Remove po
ieten down the use of dev_err() when
errors haven't actually occurred and also to return better information up
the stack rather than always -EIO.
Signed-off-by: Cyril Bur
---
drivers/mtd/devices/powernv_flash.c | 28 +++-
1 file changed, 23 insertions(+), 5 deletion
the mutex.
Additionally, we shouldn't be printing out an error when we don't
get a token as the only way this should happen is if we've been
interrupted in down_interruptible() on the semaphore.
Reported-by: Robert Lippert
Signed-off-by: Stewart Smith
Signed-off-by: Cyril Bur
--
ync
tokens.
Signed-off-by: Cyril Bur
---
arch/powerpc/include/asm/opal.h | 2 --
arch/powerpc/platforms/powernv/opal-async.c | 10 +++---
2 files changed, 3 insertions(+), 9 deletions(-)
diff --git a/arch/powerpc/include/asm/opal.h b/arch/powerpc/include/asm/opal.h
index 58
Signed-off-by: Cyril Bur
---
arch/powerpc/platforms/powernv/opal.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/powerpc/platforms/powernv/opal.c
b/arch/powerpc/platforms/powernv/opal.c
index 59684b4af4d1..f87e000e7c28 100644
--- a/arch/powerpc/platforms/powernv/opal.c
+++ b/arch
functions would take upwards of two minutes
causing the wait_event() to block long enough to cause hung task
warnings. Furthermore, wait_event_interruptible() is preferable as
otherwise there is no way for signals to stop the process which is going
to be confusing in userspace.
Signed-off-by: Cyril Bur
tokens there can be - it is possible that
OPAL will inform Linux that there are more than 64 tokens.
Rather than add a bitfield to track the extra state, rework the
internals slightly.
Signed-off-by: Cyril Bur
---
arch/powerpc/platforms/powernv/opal-async.c | 97 -
1
d-off-by: Cyril Bur
---
I'll note here that currently no OPAL exists that will return
OPAL_SUCCESS so there isn't the possibility of a bug today.
drivers/mtd/devices/powernv_flash.c | 17 +
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/drivers/mtd/devices/
OPAL can only manage one flash access at a time and will return an
OPAL_BUSY error for each concurrent access to the flash. The simplest
way to prevent this from happening is with a mutex.
Signed-off-by: Cyril Bur
---
drivers/mtd/devices/powernv_flash.c | 18 +++---
1 file changed
On Mon, 2017-07-10 at 14:05 +, David Laight wrote:
> From: Cyril Bur
> > Sent: 10 July 2017 02:31
> > This patch adds an _interruptible version of opal_async_wait_response().
> > This is useful when a long running OPAL call is performed on behalf of a
> > userspa
Also export opal_error_code() so that it can be used in modules
Signed-off-by: Cyril Bur
---
arch/powerpc/platforms/powernv/opal.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/powerpc/platforms/powernv/opal.c
b/arch/powerpc/platforms/powernv/opal.c
index 59684b4af4d1
BUG_ON() should be reserved in situations where we can not longer
guarantee the integrity of the system. In the case where
powernv_flash_async_op() receives an impossible op, we can still
guarantee the integrity of the system.
Signed-off-by: Cyril Bur
---
drivers/mtd/devices/powernv_flash.c | 3
OPAL can only manage one flash access at a time and will return an
OPAL_BUSY error for each concurrent access to the flash. The simplest
way to prevent this from happening is with a mutex.
Signed-off-by: Cyril Bur
---
drivers/mtd/devices/powernv_flash.c | 18 +++---
1 file changed
the mutex.
Additionally, we shouldn't be printing out an error when we don't
get a token as the only way this should happen is if we've been
interrupted in down_interruptible() on the semaphore.
Reported-by: Robert Lippert
Signed-off-by: Stewart Smith
Signed-off-by: Cyril Bur
--
ly Michael Ellerman takes powernv_flash
driver patches through the powerpc tree, as always your feedback is
very welcome.
Thanks,
Cyril
Cyril Bur (9):
mtd: powernv_flash: Use WARN_ON_ONCE() rather than BUG_ON()
mtd: powernv_flash: Lock around concurrent access to OPAL
mtd: powernv_flash: D
ync
tokens.
Signed-off-by: Cyril Bur
---
arch/powerpc/include/asm/opal.h | 2 --
arch/powerpc/platforms/powernv/opal-async.c | 10 +++---
2 files changed, 3 insertions(+), 9 deletions(-)
diff --git a/arch/powerpc/include/asm/opal.h b/arch/powerpc/include/asm/opal.h
index 58
ieten down the use of dev_err() when
errors haven't actually occurred and also to return better information up
the stack rather than always -EIO.
Signed-off-by: Cyril Bur
---
drivers/mtd/devices/powernv_flash.c | 28 +++-
1 file changed, 23 insertions(+), 5 deletion
tokens there can be - it is possible that
OPAL will inform Linux that there are more than 64 tokens.
Rather than add a bitfield to track the extra state, rework the
internals slightly.
Signed-off-by: Cyril Bur
---
arch/powerpc/platforms/powernv/opal-async.c | 97 -
1
101 - 200 of 440 matches
Mail list logo