On Mon, 09 Apr 2018 15:57:55 +1000
Benjamin Herrenschmidt wrote:
> On Mon, 2018-04-09 at 15:40 +1000, Nicholas Piggin wrote:
> > The RAW console does not need writes to be atomic, so implement a
> > _nonatomic variant which does not take a spinlock. This API is used
> > in xmon, so the less locki
On Mon, 09 Apr 2018 15:53:33 +1000
Benjamin Herrenschmidt wrote:
> On Mon, 2018-04-09 at 15:24 +1000, Nicholas Piggin wrote:
> > Convert to using the standard delay poll/delay form.
> >
> > The console code:
> >
> > - Did not previously delay or sleep in its busy loop.
> >
> > Cc: Benjamin Her
On Mon, 2018-04-09 at 15:40 +1000, Nicholas Piggin wrote:
> This delay was in the very first OPAL console commit 6.5 years ago.
> The firmware console has hardened sufficiently to remove it.
>
Reviewed-by: Benjamin Herrenschmidt
> Signed-off-by: Nicholas Piggin
> ---
> drivers/tty/hvc/hvc_opal
On Mon, 2018-04-09 at 15:40 +1000, Nicholas Piggin wrote:
> The RAW console does not need writes to be atomic, so implement a
> _nonatomic variant which does not take a spinlock. This API is used
> in xmon, so the less locking thta's used, the better chance there is
> that a crash can be debugged.
On Mon, 2018-04-09 at 15:24 +1000, Nicholas Piggin wrote:
> Convert to using the standard delay poll/delay form.
>
> The console code:
>
> - Did not previously delay or sleep in its busy loop.
>
> Cc: Benjamin Herrenschmidt
> Signed-off-by: Nicholas Piggin
Does it help with anything ? We don'
On Mon, 2018-04-09 at 15:24 +1000, Nicholas Piggin wrote:
> The intention here is to consume and discard the remaining buffer
> upon error. This works if there has not been a previous partial write.
> If there has been, then total_len is no longer total number of bytes
> to copy. total_len is alway
This delay was in the very first OPAL console commit 6.5 years ago.
The firmware console has hardened sufficiently to remove it.
Cc: Benjamin Herrenschmidt
Signed-off-by: Nicholas Piggin
---
drivers/tty/hvc/hvc_opal.c | 8 +---
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/dr
The RAW console does not need writes to be atomic, so implement a
_nonatomic variant which does not take a spinlock. This API is used
in xmon, so the less locking thta's used, the better chance there is
that a crash can be debugged.
Cc: Benjamin Herrenschmidt
Signed-off-by: Nicholas Piggin
---
OPAL console writes do not have to synchronously flush firmware /
hardware buffers unless they are going through the udbg path.
Remove the unconditional flushing from opal_put_chars. Flush if
there was no space in the buffer as an optimisation (callers loop
waiting for success in that case). udbg
opal_put_chars deals with partial writes because in OPALv1,
opal_console_write_buffer_space did not work correctly. That firmware
is not supported.
This reworks the opal_put_chars code to no longer deal with partial
writes and turn them into full writes. Partial write handling is still
supported i
A new console flushing firmware API was introduced to replace event
polling loops, and implemented in opal-kmsg with affddff69c55e
("powerpc/powernv: Add a kmsg_dumper that flushes console output on
panic"), to flush the console in the panic path.
The OPAL console driver has other situations where
Use the more refined and tested event polling loop from opal_put_chars
as the fallback console flush in the opal-kmsg path. This loop is used
by the console driver today, whereas the opal-kmsg fallback is not
likely to have been used for years.
Use WARN_ONCE rather than a printk when the fallback
This series of patches aims to improve the robustness of the OPAL
console by simplifying and removing locks. If this code is interrupted
due to a panic or xmon request, it may block the xmon IO or panic
console flush because they use the opal console too.
So reducing locking and relaxing atomicity
OPAL_CONSOLE_FLUSH is documented as being able to return OPAL_BUSY,
so implement the standard OPAL_BUSY handling for it.
Cc: Russell Currey
Signed-off-by: Nicholas Piggin
---
arch/powerpc/platforms/powernv/opal-kmsg.c | 24 ++
1 file changed, 16 insertions(+), 8 deletions(-)
Convert to using the standard delay poll/delay form.
The XIVE driver:
- Did not previously loop on the OPAL_BUSY_EVENT case.
- Used a 1ms sleep.
Cc: Benjamin Herrenschmidt
Signed-off-by: Nicholas Piggin
---
arch/powerpc/sysdev/xive/native.c | 193 +-
1 file changed
Convert to using the standard delay poll/delay form.
The dump code:
- Did not previously delay or sleep in the OPAL_BUSY case.
- Used a 20ms sleep.
Cc: Vasant Hegde
Signed-off-by: Nicholas Piggin
---
arch/powerpc/platforms/powernv/opal-dump.c | 6 --
1 file changed, 4 insertions(+), 2 del
Convert to using the standard delay poll/delay form.
The NVRAM driver:
- Did not previously delay or sleep in its busy loop.
Signed-off-by: Nicholas Piggin
---
arch/powerpc/platforms/powernv/opal-nvram.c | 7 ++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/arch/powerpc/pla
Convert to using the standard delay poll/delay form.
The platform code:
- Used delay when called from a schedule()able context.
- Did not previously delay or sleep in the OPAL_BUSY_EVENT case.
Signed-off-by: Nicholas Piggin
---
arch/powerpc/platforms/powernv/opal.c | 8 +---
arch/powerpc
Convert to using the standard delay poll/delay form.
The console code:
- Did not previously delay or sleep in its busy loop.
Cc: Benjamin Herrenschmidt
Signed-off-by: Nicholas Piggin
---
arch/powerpc/platforms/powernv/opal.c | 38 ---
1 file changed, 23 insertions(+),
The intention here is to consume and discard the remaining buffer
upon error. This works if there has not been a previous partial write.
If there has been, then total_len is no longer total number of bytes
to copy. total_len is always "bytes left to copy", so it should be
added to written bytes.
T
Convert to using the standard delay poll/delay form.
The OPAL RTC driver:
- Did not previously delay or sleep in the OPAL_BUSY_EVENT case.
There have been scheduling delays of up to 50 seconds observed here
(BMC reboot can do it), which this should fix.
Cc: linux-...@vger.kernel.org
Signed-o
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. Th
Since v1:
- Added console and opal-kmsg
- Fix a missing case in opal_shutdown that would delay even if
OPAL_SUCCESS was returned.
Thanks,
Nick
Nicholas Piggin (9):
powerpc/powernv: define a standard delay for OPAL_BUSY type retry
loops
powerpc/powernv: OPAL RTC driver standardise OPAL_B
Hi Nicolin,
On Sun, Apr 8, 2018 at 8:57 PM, Nicolin Chen wrote:
> When the desired ratio is less than 256, the savesub (tolerance)
> in the calculation would become 0. This will then fail the loop-
> search immediately without reporting any errors.
>
> But if the ratio is smaller enough, there is
On Sun, Apr 8, 2018 at 9:33 PM, Nicolin Chen wrote:
> The freq parameter indicates the physical frequency of an actual
> input clock or a desired frequency of an output clock for HCKT/R.
> It should never be passed 0. This might cause Division-by-zero.
>
> So this patch adds a check to fix it.
>
>
The freq parameter indicates the physical frequency of an actual
input clock or a desired frequency of an output clock for HCKT/R.
It should never be passed 0. This might cause Division-by-zero.
So this patch adds a check to fix it.
Signed-off-by: Nicolin Chen
---
sound/soc/fsl/fsl_esai.c | 6 +
When the desired ratio is less than 256, the savesub (tolerance)
in the calculation would become 0. This will then fail the loop-
search immediately without reporting any errors.
But if the ratio is smaller enough, there is no need to calculate
the tolerance because PM divisor alone is enough to g
On 04/08/2018 12:44 PM, Mathieu Malaterre wrote:
> In commit 7a22d6321c3d ("powerpc/mm/radix: Update command line parsing for
> disable_radix") an `if` statement was added for a possible empty body
> (prom_debug).
>
> Fix the following warning, treated as error with W=1:
>
> arch/powerpc/kernel
In commit 4aea909eeba3 ("powerpc: Add missing prototypes in setup_32.c")
prototypes for
- ppc_setup_l2cr
- ppc_setup_l3cr
- ppc_init
were added but at the same time in commit d15a261d876d ("powerpc/32: Make
some functions static") those same functions were made static. Fix
conflicting changes by
In commit 7a22d6321c3d ("powerpc/mm/radix: Update command line parsing for
disable_radix") an `if` statement was added for a possible empty body
(prom_debug).
Fix the following warning, treated as error with W=1:
arch/powerpc/kernel/prom_init.c:656:46: error: suggest braces around empty
body i
In commit 4aea909eeba3 ("powerpc: Add missing prototypes in setup_32.c")
prototypes for
- ppc_setup_l2cr
- ppc_setup_l3cr
- ppc_init
were added but at the same time in commit d15a261d876d ("powerpc/32: Make
some functions static") those same functions were made static. Fix
conflicting changes by
On Sun, 8 Apr 2018 20:17:47 +1000
Balbir Singh wrote:
> On Fri, Apr 6, 2018 at 3:56 AM, Nicholas Piggin wrote:
> > This crashes with a "Bad real address for load" attempting to load
> > from the vmalloc region in realmode (faulting address is in DAR).
> >
> > Oops: Bad interrupt in KVM entry/e
On Fri, Apr 6, 2018 at 3:56 AM, Nicholas Piggin wrote:
> This crashes with a "Bad real address for load" attempting to load
> from the vmalloc region in realmode (faulting address is in DAR).
>
> Oops: Bad interrupt in KVM entry/exit code, sig: 6 [#1]
> LE SMP NR_CPUS=2048 NUMA PowerNV
> CPU
33 matches
Mail list logo