<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">On 1/28/2016 11:47 AM, Dan Williams
      wrote:<br>
    </div>
    <blockquote
cite="mid:CAPcyv4jaHy0R+ZT2h_O94b-eeceeezLP=yTfGguJ+PiB+9g9Ew@mail.gmail.com"
      type="cite">
      <pre wrap="">On Thu, Jan 28, 2016 at 2:41 AM, Julian Margetson <a class="moz-txt-link-rfc2396E" href="mailto:runaway@candw.ms"><runaway@candw.ms></a> wrote:
</pre>
      <blockquote type="cite">
        <pre wrap="">On 1/27/2016 3:34 PM, Dan Williams wrote:
</pre>
        <blockquote type="cite">
          <pre wrap="">
On Wed, Jan 27, 2016 at 2:18 AM, Julian Margetson <a class="moz-txt-link-rfc2396E" href="mailto:runaway@candw.ms"><runaway@candw.ms></a>
wrote:
</pre>
          <blockquote type="cite">
            <pre wrap="">
On 1/26/2016 9:43 PM, Dan Williams wrote:
diff --git a/mm/memory.c b/mm/memory.c
index 30991f83d0bf..c44e387130b2 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -1521,6 +1521,8 @@ static int insert_pfn(struct vm_area_struct
*vma, unsigned long addr,
                entry = pte_mkdevmap(pfn_t_pte(pfn, prot));
        else
                entry = pte_mkspecial(pfn_t_pte(pfn, prot));
+       pr_info("%s: entry: %#llx pfn: %#lx\n", __func__,
+                       (unsigned long long) entry, pfn_t_to_pfn(pfn));
        set_pte_at(mm, addr, pte, entry);
        update_mmu_cache(vma, addr, pte); /* XXX: why not for
insert_page? */

...of course for the passing case you'll need to drop the call to
pfn_t_to_pfn() and just print the pfn directly.

Thank you for the help tracking this down, it's much appreciated.

Happy to help out. Just need some guidance sometimes as I am relatively
new
at this.
</pre>
          </blockquote>
          <pre wrap="">
No worries.

So, below is the failing case, what does insert_pfn print in the
passing case?  No need for the full log just the first few lines after
starting X when running the commit before this failing one... (commit
69660fd797c3 "x86, mm: introduce _PAGE_DEVMAP").

I'm still stumped given that PTE_RPN_SHIFT==PAGE_SHIFT in this
configuration, so there's no 64-bit to 32-bit truncation to worry
about...
</pre>
        </blockquote>
        <pre wrap="">
Having a problem building .

  CALL    scripts/checksyscalls.sh
<stdin>:1307:2: warning: #warning syscall copy_file_range not implemented
[-Wcpp]
  CHK     include/generated/compile.h
  CALL    arch/powerpc/kernel/systbl_chk.sh
  CC      mm/memory.o
  CHK     kernel/config_data.h
mm/memory.c: In function â€˜insert_pfn’:
mm/memory.c:1520:9: error: implicit declaration of function
‘pfn_t_to_pfn’ [-Werror=implicit-function-declaration]
         pr_info("%s: entry: %#llx pfn: %#lx\n", __func__,
         ^
mm/memory.c:1520:9: warning: format â€˜%lx’ expects argument of type
‘long unsigned int’, but argument 4 has type â€˜int’ [-Wformat=]
</pre>
      </blockquote>
      <pre wrap="">
Yes, when you go to the preceding commit pfn_t_to_pfn() no longer
exists.  You'll need to change the debug statement to:

pr_info("%s: entry: %#llx pfn: %#lx\n", __func__,
                       (unsigned long long) entry, pfn);


</pre>
    </blockquote>
    Thank you .<br>
    Not getting any debug output .<br>
    <meta http-equiv="content-type" content="text/html; charset=utf-8">
    <pre class="western">============================================================================================
        /* Ok, finally just insert the thing.. */
        entry = pte_mkspecial(pfn_pte(pfn, prot));
        pr_info("%s: entry: %#llx pfn: %#lx\n", __func__,
                      (unsigned long long) entry, pfn);
        set_pte_at(mm, addr, pte, entry);
        update_mmu_cache(vma, addr, pte); /* XXX: why not for insert_page? */

=============================================================================================

[   15.622581] systemd[1]: Mounted POSIX Message Queue File System.
[   15.785050] systemd[1]: Mounting Configuration File System...
[   15.888907] systemd[1]: Starting Apply Kernel Variables...
[   15.994762] systemd[1]: Mounting FUSE Control File System...
[   16.153688] systemd[1]: Mounted FUSE Control File System.

Ubuntu Xenial Xerus (development branch) Sam460ex ttyS0

Sam460ex login:</pre>
    <title></title>
    <meta name="generator" content="LibreOffice 4.4.5.2 (Windows)">
    <style type="text/css">
                @page { margin: 0.79in }
                pre.cjk { font-family: "NSimSun", monospace }
                p { margin-bottom: 0.1in; line-height: 120% }
        </style><br>
    <br>
    <br>
  </body>
</html>