public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead•org>
To: Julien Grall <Julien.Grall@arm•com>
Cc: Peng Fan <peng.fan@nxp•com>,
	"sstabellini@kernel•org" <sstabellini@kernel•org>,
	Catalin Marinas <Catalin.Marinas@arm•com>,
	"linux@armlinux•org.uk" <linux@armlinux•org.uk>,
	dl-linux-imx <linux-imx@nxp•com>,
	"xen-devel@lists•xenproject.org" <xen-devel@lists•xenproject.org>,
	nd <nd@arm•com>, "will@kernel•org" <will@kernel•org>,
	"linux-arm-kernel@lists•infradead.org"
	<linux-arm-kernel@lists•infradead.org>,
	Robin Murphy <Robin.Murphy@arm•com>
Subject: Re: [PATCH V2] arm: xen: mm: use __GPF_DMA32 for arm64
Date: Fri, 30 Aug 2019 01:58:07 -0700	[thread overview]
Message-ID: <20190830085807.GA15771@infradead.org> (raw)
In-Reply-To: <d7477406-a8a0-5c3c-13dc-2c84e27b8afa@arm.com>

Can we take a step back and figure out what we want to do here?

AFAICS this function allocates memory for the swiotlb-xen buffer,
and that means it must be <= 32-bit addressable to satisfy the DMA API
guarantees.  That means we generally want to use GFP_DMA32 everywhere
that exists, but on systems with odd zones we might want to dip into
GFP_DMA.  This also means swiotlb-xen doesn't actually do the right
thing on x86 at the moment.  So shouldn't we just have one common
routine in swiotlb-xen.c that checks if we have CONFIG_ZONE_DMA32
set, then try GFP_DMA32, and if not check if CONFIG_ZONE_DMA is set
and then try that, else default to GFP_KERNEL?

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists•infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2019-08-30  8:58 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-30  2:28 [PATCH V2] arm: xen: mm: use __GPF_DMA32 for arm64 Peng Fan
2019-08-30  8:39 ` Julien Grall
2019-08-30  8:58   ` Christoph Hellwig [this message]
2019-08-31  2:40     ` Stefano Stabellini
2019-09-02 15:57       ` Christoph Hellwig
2019-09-03 11:48         ` Juergen Gross
2019-09-11  2:06       ` Peng Fan
2019-09-11 19:12         ` Stefano Stabellini

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=20190830085807.GA15771@infradead.org \
    --to=hch@infradead$(echo .)org \
    --cc=Catalin.Marinas@arm$(echo .)com \
    --cc=Julien.Grall@arm$(echo .)com \
    --cc=Robin.Murphy@arm$(echo .)com \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    --cc=linux-imx@nxp$(echo .)com \
    --cc=linux@armlinux$(echo .)org.uk \
    --cc=nd@arm$(echo .)com \
    --cc=peng.fan@nxp$(echo .)com \
    --cc=sstabellini@kernel$(echo .)org \
    --cc=will@kernel$(echo .)org \
    --cc=xen-devel@lists$(echo .)xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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