From: Robin Murphy <robin.murphy@arm.com>
To: Dan Williams <dan.j.williams@intel.com>
Cc: "Linux MM" <linux-mm@kvack.org>, "Jérôme Glisse" <jglisse@redhat.com>
Subject: Re: __HAVE_ARCH_PTE_DEVMAP - bug or intended behaviour?
Date: Thu, 1 Nov 2018 20:10:17 +0000 [thread overview]
Message-ID: <35bd3ed6-1a67-85a0-7b04-0b355660a950@arm.com> (raw)
In-Reply-To: <CAPcyv4gZyDWYiQ8DHwei+FQRL22LGo3Sr6a-9VPESnuRJy7jtg@mail.gmail.com>
On 31/10/2018 20:41, Dan Williams wrote:
> On Wed, Oct 31, 2018 at 10:08 AM Robin Murphy <robin.murphy@arm.com> wrote:
>>
>> Hi mm folks,
>>
>> I'm looking at ZONE_DEVICE support for arm64, and trying to make sense
>> of a build failure has led me down the rabbit hole of pfn_t.h, and
>> specifically __HAVE_ARCH_PTE_DEVMAP in this first instance.
>>
>> The failure itself is a link error in remove_migration_pte() due to a
>> missing definition of pte_mkdevmap(), but I'm a little confused at the
>> fact that it's explicitly declared without a definition, as if that
>> breakage is deliberate.
>
> It's deliberate, it's only there to allow mm/memory.c to compile. The
> compiler can see that pfn_t_devmap(pfn) is always false in the
> !__HAVE_ARCH_PTE_DEVMAP case and throws away the attempt to link to
> pte_devmap().
>
> The summary is that an architecture needs to devote a free/software
> pte bit for Linux to indicate "device pfns".
Thanks for the explanation(s), that's been super helpful. So
essentially, the WIP configuration I currently have
(ARCH_HAS_ZONE_DEVICE=y but !__HAVE_ARCH_PTE_DEVMAP) is fundamentally
incomplete, and even if I convince a ZONE_DEVICE=y config to build with
the devmap stubs, it would end up going wrong in exciting ways at
runtime - is that the gist of it? If that is the case, then I might also
have a go at streamlining some of the configs to make those dependencies
more apparent.
Cheers,
Robin.
next prev parent reply other threads:[~2018-11-01 20:10 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-10-31 17:08 __HAVE_ARCH_PTE_DEVMAP - bug or intended behaviour? Robin Murphy
2018-10-31 19:00 ` Jerome Glisse
2018-10-31 20:35 ` Dan Williams
2018-10-31 20:41 ` Dan Williams
2018-11-01 20:10 ` Robin Murphy [this message]
2018-11-01 20:58 ` Dan Williams
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=35bd3ed6-1a67-85a0-7b04-0b355660a950@arm.com \
--to=robin.murphy@arm.com \
--cc=dan.j.williams@intel.com \
--cc=jglisse@redhat.com \
--cc=linux-mm@kvack.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).