devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andy Shevchenko <andy.shevchenko@gmail.com>
To: "Gabriel L. Somlo" <gsomlo@gmail.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Rob Herring <robh+dt@kernel.org>,
	devicetree <devicetree@vger.kernel.org>,
	Ulf Hansson <ulf.hansson@linaro.org>,
	linux-mmc <linux-mmc@vger.kernel.org>,
	Karol Gugala <kgugala@antmicro.com>,
	Mateusz Holenko <mholenko@antmicro.com>,
	krakoczy@antmicro.com, mdudek@internships.antmicro.com,
	paulus@ozlabs.org, Joel Stanley <joel@jms.id.au>,
	Stafford Horne <shorne@gmail.com>,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	david.abdurachmanov@sifive.com, florent@enjoy-digital.fr,
	Randy Dunlap <rdunlap@infradead.org>
Subject: Re: [PATCH v5 3/3] mmc: Add driver for LiteX's LiteSDCard interface
Date: Sun, 26 Dec 2021 16:01:03 +0200	[thread overview]
Message-ID: <CAHp75VcTZzqvOLEOs50PD48P55f_EnBHjDiNBS-LPfSXhMxRAQ@mail.gmail.com> (raw)
In-Reply-To: <Ychv7z6ggZGRY08l@glsvmlin.ini.cmu.edu>

On Sun, Dec 26, 2021 at 3:36 PM Gabriel L. Somlo <gsomlo@gmail.com> wrote:
> On Sun, Dec 26, 2021 at 03:13:21PM +0200, Andy Shevchenko wrote:
> > On Sun, Dec 26, 2021 at 1:45 PM Gabriel L. Somlo <gsomlo@gmail.com> wrote:
> > > On Sat, Dec 25, 2021 at 06:43:22PM +0200, Andy Shevchenko wrote:
> > > > On Wed, Dec 15, 2021 at 10:00 PM Gabriel Somlo <gsomlo@gmail.com> wrote:

...

> > > > > +#ifdef CONFIG_ARCH_DMA_ADDR_T_64BIT
> > > >
> > > > Why under ifdeffery?
> > >
> > > Because I only want to do it on 64-bit capable architectures.
> > >
> > > The alternative would be to call
> > >
> > >   dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64));
> > >
> > > on *all* architectures, but ignore the returned error (-EIO,
> > > presumably on architetures that only support 32-bit DMA).
> >
> > I don't understand why you are supposed to ignore errors and why you
> > expect to get such.
>
> If I call `dma_set_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(64));`
> on a machine where `CONFIG_ARCH_DMA_ADDR_T_64BIT` is *not* set, I
> expect an error. The implicit default
> (per Documentation/core-api/dma-api-howto.rst), is DMA_BIT_MASK(32).
> I'm working under the impression that on machines with
> CONFIG_ARCH_DMA_ADDR_T_64BIT I should increase that to DMA_BIT_MASK(64).
>
> So if I don't #ifdef it, that call will fail on machines supporting
> only 32-bits.
>
> What am I missing?

This thread: https://lkml.org/lkml/2021/6/7/398 ?

-- 
With Best Regards,
Andy Shevchenko

  reply	other threads:[~2021-12-26 14:01 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-15 13:07 [PATCH v5 0/3] mmc: Add LiteSDCard mmc driver Gabriel Somlo
2021-12-15 13:07 ` [PATCH v5 1/3] MAINTAINERS: co-maintain LiteX platform Gabriel Somlo
2021-12-15 13:07 ` [PATCH v5 2/3] dt-bindings: mmc: Add bindings for LiteSDCard Gabriel Somlo
2021-12-15 13:07 ` [PATCH v5 3/3] mmc: Add driver for LiteX's LiteSDCard interface Gabriel Somlo
2021-12-25 16:43   ` Andy Shevchenko
2021-12-26 11:45     ` Gabriel L. Somlo
2021-12-26 13:01       ` Andy Shevchenko
2021-12-26 13:13       ` Andy Shevchenko
2021-12-26 13:36         ` Gabriel L. Somlo
2021-12-26 14:01           ` Andy Shevchenko [this message]
2021-12-26 22:37             ` Gabriel L. Somlo
2021-12-28 16:15   ` Ulf Hansson
2022-01-04  0:27     ` Gabriel L. Somlo
2022-01-06 17:08       ` Gabriel L. Somlo
2022-01-11 15:47       ` Ulf Hansson
2022-01-11 22:49         ` Gabriel L. Somlo
2022-01-12 10:24           ` Ulf Hansson
2022-01-12 18:08             ` Gabriel L. Somlo

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=CAHp75VcTZzqvOLEOs50PD48P55f_EnBHjDiNBS-LPfSXhMxRAQ@mail.gmail.com \
    --to=andy.shevchenko@gmail.com \
    --cc=david.abdurachmanov@sifive.com \
    --cc=devicetree@vger.kernel.org \
    --cc=florent@enjoy-digital.fr \
    --cc=geert@linux-m68k.org \
    --cc=gsomlo@gmail.com \
    --cc=joel@jms.id.au \
    --cc=kgugala@antmicro.com \
    --cc=krakoczy@antmicro.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=mdudek@internships.antmicro.com \
    --cc=mholenko@antmicro.com \
    --cc=paulus@ozlabs.org \
    --cc=rdunlap@infradead.org \
    --cc=robh+dt@kernel.org \
    --cc=shorne@gmail.com \
    --cc=ulf.hansson@linaro.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;
as well as URLs for NNTP newsgroup(s).