Re: [BUG/REGRESSION] Kernel 4.5-rc1 on Acube Sam460ex AMCC 460ex Power PC motherboards

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jan 25, 2016 at 12:35 PM, Julian Margetson <runaway@xxxxxxxx> wrote:
> On 1/25/2016 3:20 PM, Dan Williams wrote:
[..]
> Hmm, this commit could only cause a behavior change if it modifies the
> value of the pfn as seen by insert_pfn().  Can you try the attached
> debug patch to see if that assumption is being violated?
>
> Had to manually delete the lines in the second part of the patch.

Sorry about that I had based direct on that failing commit rather than
4.5-rc1.  A reflowed version in the attached.

> [   42.557813] Oops: Machine check, sig: 7 [#1]
> [   42.562350] PREEMPT Canyonlands
> [   42.565692] Modules linked in:
> [   42.568933] CPU: 0 PID: 495 Comm: Xorg Tainted: G        W
> 4.5.0-rc1-Sam460ex #1
> [   42.577291] task: ee3adcc0 ti: ee260000 task.ti: ee260000
> [   42.582984] NIP: 1ff72480 LR: 1ff72404 CTR: 1ff724d0
> [   42.588220] REGS: ee261f10 TRAP: 0214   Tainted: G        W
> (4.5.0-rc1-Sam460ex)
> [   42.596663] MSR: 0002d000 <CE,EE,PR,ME>  CR: 24004242  XER: 00000000
> [   42.603512]
> GPR00: 1f436134 bfc4dac0 b79cb6f0 b718dffc b69a4008 00000780 00000004
> 00000000
> GPR08: 00000000 b718dffc 00000000 bfc4da70 1ff72404 2080dff4 00000000
> 00000780
> GPR16: 00000000 00000020 00000000 00000000 00001e00 20aaa620 00000438
> b69a4008
> GPR24: 00000780 bfc4db18 20a94760 b718e000 b718e000 b69a4008 2007aff4
> 00001e00
> [   42.635363] NIP [1ff72480] 0x1ff72480
> [   42.639225] LR [1ff72404] 0x1ff72404
> [   42.642991] Call Trace:
> [   42.798393] ---[ end trace 8fcfa5f0e9942055 ]---

I'm not familiar with powerpc crash dumps, so there's not much
information I can glean from this.  Any folks on the cc can translate
a powerpc "Machine check"?

I'm down to looking a differences between the passing and failing
case.  Can you print out the value the pte entry and the in
insert_pfn, like the following:

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.
pfn_t debug

From: Dan Williams <dan.j.williams@xxxxxxxxx>


---
 include/linux/pfn_t.h |   27 +++++++++++++++------------
 1 file changed, 15 insertions(+), 12 deletions(-)

diff --git a/include/linux/pfn_t.h b/include/linux/pfn_t.h
index 0703b5360d31..3b1051af409a 100644
--- a/include/linux/pfn_t.h
+++ b/include/linux/pfn_t.h
@@ -16,10 +16,25 @@
 #define PFN_DEV (1UL << (BITS_PER_LONG - 3))
 #define PFN_MAP (1UL << (BITS_PER_LONG - 4))
 
+extern pfn_t phys_to_pfn_t(phys_addr_t addr, unsigned long flags);
+
+static inline bool pfn_t_has_page(pfn_t pfn)
+{
+	return (pfn.val & PFN_MAP) == PFN_MAP || (pfn.val & PFN_DEV) == 0;
+}
+
+static inline unsigned long pfn_t_to_pfn(pfn_t pfn)
+{
+	return pfn.val & ~PFN_FLAGS_MASK;
+}
+
 static inline pfn_t __pfn_to_pfn_t(unsigned long pfn, unsigned long flags)
 {
 	pfn_t pfn_t = { .val = pfn | (flags & PFN_FLAGS_MASK), };
 
+	WARN_ONCE(pfn_t_to_pfn(pfn_t) != pfn, "pfn: %#lx pfn_t: %#lx\n",
+			pfn, pfn_t_to_pfn(pfn_t));
+
 	return pfn_t;
 }
 
@@ -29,18 +44,6 @@ static inline pfn_t pfn_to_pfn_t(unsigned long pfn)
 	return __pfn_to_pfn_t(pfn, 0);
 }
 
-extern pfn_t phys_to_pfn_t(dma_addr_t addr, unsigned long flags);
-
-static inline bool pfn_t_has_page(pfn_t pfn)
-{
-	return (pfn.val & PFN_MAP) == PFN_MAP || (pfn.val & PFN_DEV) == 0;
-}
-
-static inline unsigned long pfn_t_to_pfn(pfn_t pfn)
-{
-	return pfn.val & ~PFN_FLAGS_MASK;
-}
-
 static inline struct page *pfn_t_to_page(pfn_t pfn)
 {
 	if (pfn_t_has_page(pfn))
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel

[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux