Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1516520

Re: [PATCH 2/2] swiotlb: Add swiotlb=nobounce debug option

From Geert Uytterhoeven <geert@linux-m68k.org>
Newsgroups linux.kernel
Subject Re: [PATCH 2/2] swiotlb: Add swiotlb=nobounce debug option
Date 2016-11-07 20:20 +0100
Message-ID <sAXCx-7rh-11@gated-at.bofh.it> (permalink)
References <syn0t-4i5-5@gated-at.bofh.it> <syn0t-4i5-7@gated-at.bofh.it> <syp2i-5zh-43@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hi Konrad,

On Mon, Oct 31, 2016 at 6:52 PM, Konrad Rzeszutek Wilk
<konrad.wilk@oracle.com> wrote:
> On Mon, Oct 31, 2016 at 04:45:04PM +0100, Geert Uytterhoeven wrote:
>> On architectures like arm64, swiotlb is tied intimately to the core
>> architecture DMA support. In addition, ZONE_DMA cannot be disabled.
>>
>> To aid debugging and catch devices not supporting DMA to memory outside
>> the 32-bit address space, add a kernel command line option
>> "swiotlb=nobounce", which disables the use of bounce buffers.
>> If specified, trying to map memory that cannot be used with DMA will
>> fail, and a warning will be printed (rate-limited).
>
> I would make the 'swiotlb_force' an enum. And then instead of this
> being 'nobounce' just do the inverse of 'force', that is the
> 'noforce' would trigger this no bounce effect.
>
> So:
>
> enum {
>         NORMAL,         /* Default - depending on the hardware DMA mask and such. */
>         FORCE,          /* swiotlb=force */
>         NO_FORCE,       /* swiotlb=noforce */

Fine for me, but swiotlb_force is exported to platform code. Hence all users
should be updated?

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 0/2] swiotlb: Rate-limit printing and 64-bit memory debugging Geert Uytterhoeven <geert+renesas@glider.be> - 2016-10-31 16:50 +0100
  [PATCH 1/2] swiotlb: Rate-limit printing when running out of SW-IOMMU space Geert Uytterhoeven <geert+renesas@glider.be> - 2016-10-31 16:50 +0100
    Re: [PATCH 1/2] swiotlb: Rate-limit printing when running out of  SW-IOMMU space Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> - 2016-10-31 17:10 +0100
    Re: [PATCH 1/2] swiotlb: Rate-limit printing when running out of  SW-IOMMU space Konrad Rzeszutek Wilk <konrad@darnok.org> - 2016-11-05 20:50 +0100
  [PATCH 2/2] swiotlb: Add swiotlb=nobounce debug option Geert Uytterhoeven <geert+renesas@glider.be> - 2016-10-31 16:50 +0100
    Re: [PATCH 2/2] swiotlb: Add swiotlb=nobounce debug option Robin Murphy <robin.murphy@arm.com> - 2016-10-31 18:50 +0100
      Re: [PATCH 2/2] swiotlb: Add swiotlb=nobounce debug option Geert Uytterhoeven <geert@linux-m68k.org> - 2016-10-31 19:30 +0100
        Re: [PATCH 2/2] swiotlb: Add swiotlb=nobounce debug option Robin Murphy <robin.murphy@arm.com> - 2016-11-01 12:50 +0100
          Re: [PATCH 2/2] swiotlb: Add swiotlb=nobounce debug option Geert Uytterhoeven <geert@linux-m68k.org> - 2016-11-07 16:50 +0100
            Re: [PATCH 2/2] swiotlb: Add swiotlb=nobounce debug option Robin Murphy <robin.murphy@arm.com> - 2016-11-07 18:20 +0100
    Re: [PATCH 2/2] swiotlb: Add swiotlb=nobounce debug option Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> - 2016-10-31 19:00 +0100
      Re: [PATCH 2/2] swiotlb: Add swiotlb=nobounce debug option Geert Uytterhoeven <geert@linux-m68k.org> - 2016-11-07 20:20 +0100
        Re: [PATCH 2/2] swiotlb: Add swiotlb=nobounce debug option Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> - 2016-11-07 20:30 +0100

csiph-web