mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Andrey Smirnov <andrew.smirnov@gmail.com>
To: Sam Ravnborg <sam@ravnborg.org>
Cc: Barebox List <barebox@lists.infradead.org>
Subject: Re: [PATCH 0/3] i.MX8 malloc pool position and 32-bit only DMA
Date: Mon, 27 Aug 2018 16:32:16 -0700	[thread overview]
Message-ID: <CAHQ1cqH63_ReCQT=uO3wMY074Stb9Ct-B0igkM_57E7LM9LJmw@mail.gmail.com> (raw)
In-Reply-To: <20180824171520.GB16451@ravnborg.org>

On Fri, Aug 24, 2018 at 10:15 AM Sam Ravnborg <sam@ravnborg.org> wrote:
>
> Hi Andrey.
>
> > This series is a result of debugging FEC and uSDHC failures on
> > i.MX8MQ. Patches 1 and 2 are pretty straightforward and shouldn't be
> > controversial. Patch 3, OTOH, may or may not be a good way to solve
> > this problem, but it's a good way to start a discussion on the subject
> > which is my main goal here.
> >
> > Feedback is welcome!
> >
> > Thanks,
> > Andrey Smirnov
> >
> > Andrey Smirnov (3):
> >   mci: imx-esdhc: Bail out if DMA address is larger than 32-bits
> >   net: fec: Bail out if DMA address is larger than 32-bits
>
> In the above patches the checks are distributed to the
> users. Are there any reason why we could not centralize this
> check in the dma code?

We definitely can. As Sascha already pointed out this can be folded
into dma_mapping_error().

> As I assume it is everyone that is constrained to the
> 32BIT address space.
>
> And do we really need these checks if we teach
> malloc to only provide memory that is DMA'able?
>

I'd prefer to keep them since I'd rather not have a situation where
there's a chance of silent, hard to detect, failure, since it
manifests in really bizarre ways (in my case Ethernet would stop
working after I would probe eMMC). Also, once all of the error
checking is folded into dma_mapping_error() it wouldn't be that much
of code anyway.

Thanks,
Andrey Smirnov

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

      reply	other threads:[~2018-08-27 23:32 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-24  3:05 Andrey Smirnov
2018-08-24  3:05 ` [PATCH 1/3] mci: imx-esdhc: Bail out if DMA address is larger than 32-bits Andrey Smirnov
2018-08-27  6:53   ` Sascha Hauer
2018-08-27 23:33     ` Andrey Smirnov
2018-08-24  3:05 ` [PATCH 2/3] net: fec: " Andrey Smirnov
2018-08-24  3:05 ` [PATCH 3/3] ARM: start: Place malloc pool within 32-bit address space Andrey Smirnov
2018-08-27  9:06   ` Sascha Hauer
2018-08-27 23:38     ` Andrey Smirnov
2018-08-24 17:15 ` [PATCH 0/3] i.MX8 malloc pool position and 32-bit only DMA Sam Ravnborg
2018-08-27 23:32   ` Andrey Smirnov [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAHQ1cqH63_ReCQT=uO3wMY074Stb9Ct-B0igkM_57E7LM9LJmw@mail.gmail.com' \
    --to=andrew.smirnov@gmail.com \
    --cc=barebox@lists.infradead.org \
    --cc=sam@ravnborg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox