All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] Please pull last-minute fixes for ARC
@ 2020-03-31 16:08 Alexey Brodkin
  2020-03-31 19:12 ` Tom Rini
  0 siblings, 1 reply; 2+ messages in thread
From: Alexey Brodkin @ 2020-03-31 16:08 UTC (permalink / raw)
  To: u-boot

Hi Tom,

The following changes since commit 93330d4ce416208fe202e304e5a18166c57ac569:

  Prepare v2020.04-rc4 (2020-03-30 19:29:27 -0400)

are available in the Git repository at:

  git at gitlab.denx.de:u-boot/custodians/u-boot-arc.git tags/arc-last-minute-fixes-for-2020.04

for you to fetch changes up to 45bd649511155b5b5a40851ca96036636cb95e23:

  ARC: IO: add MB for __raw_* memory accessors (2020-03-31 18:31:53 +0300)

----------------------------------------------------------------
This last minute pull-request is intended to fix some drivers
when used on ARC boards. The problem was introduced by
https://gitlab.denx.de/u-boot/u-boot/-/commit/07906b3dad157bd58411664bcc6a2a7976d5e0a9

What happened while doing one pretty simple improvement to make
U-Boot port more flexible and portable (by switching accessors from
assembly-written to plain C version) we implicitly added 2 problems:

 1. Downgraded accessors from being volatile which signalled to
    the compiler that it's now possible to do all kinds of optimizations
    which may easily include merge of subsequent byte reads/writes into
    word operations. Which is OK for accessing mormal memory but
    breaks operation of peripherals if we access its memory-mapped regs
    in such a "creative" manner.
 2. As a part of assembly-written implementation we had compiler barriers
    in form of the following construction 'asm volatile("" : : : "memory")',
    and we dropped it in C implemntation. This in its turn enabled compiler
    to mess with instruction ordering. Guess what it gives us in the end :)

So with all that we had in some corner-cases veeery funny instruction flows
generated. And in particular it broke DW SPI functionality when we were
writing large amount of data. Funny enough our tests which were writing
small amount of data still worked and only by the chance we caught that
breakage and unrolled that quite interesting loop of unexpected
problems.

The road to hell is paved with good intentions. Amen :)

----------------------------------------------------------------
Eugeniy Paltsev (3):
      ARC: IO: add volatile to accessors
      ARC: IO: add compiler barriers to IO accessors
      ARC: IO: add MB for __raw_* memory accessors

 arch/arc/include/asm/io.h | 92 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---------------------------------
 1 file changed, 59 insertions(+), 33 deletions(-)

Regards,
Alexey

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [U-Boot] Please pull last-minute fixes for ARC
  2020-03-31 16:08 [U-Boot] Please pull last-minute fixes for ARC Alexey Brodkin
@ 2020-03-31 19:12 ` Tom Rini
  0 siblings, 0 replies; 2+ messages in thread
From: Tom Rini @ 2020-03-31 19:12 UTC (permalink / raw)
  To: u-boot

On Tue, Mar 31, 2020 at 04:08:59PM +0000, Alexey Brodkin wrote:

> Hi Tom,
> 
> The following changes since commit 93330d4ce416208fe202e304e5a18166c57ac569:
> 
>   Prepare v2020.04-rc4 (2020-03-30 19:29:27 -0400)
> 
> are available in the Git repository at:
> 
>   git at gitlab.denx.de:u-boot/custodians/u-boot-arc.git tags/arc-last-minute-fixes-for-2020.04
> 
> for you to fetch changes up to 45bd649511155b5b5a40851ca96036636cb95e23:
> 
>   ARC: IO: add MB for __raw_* memory accessors (2020-03-31 18:31:53 +0300)
> 

Applied to u-boot/master, thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200331/a275fc75/attachment.sig>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-03-31 19:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-31 16:08 [U-Boot] Please pull last-minute fixes for ARC Alexey Brodkin
2020-03-31 19:12 ` Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.