linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Christophe Leroy <christophe.leroy@csgroup.eu>
To: Anshuman Khandual <anshuman.khandual@arm.com>,
	"Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com>,
	"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>
Subject: Re: Fwd: [Bug 213069] New: kernel BUG at arch/powerpc/include/asm/book3s/64/hash-4k.h:147! Oops: Exception in kernel mode, sig: 5 [#1]
Date: Mon, 17 May 2021 07:47:04 +0200	[thread overview]
Message-ID: <7ebc28ad-61e3-ef43-d670-9b80a61268c4@csgroup.eu> (raw)
In-Reply-To: <a8841b4e-3bff-f600-eac7-501f78ced54b@arm.com>

+aneesh
+linuxppc-dev list

Le 17/05/2021 à 07:44, Anshuman Khandual a écrit :
> Hello Christophe,
> 
> DEBUG_VM_PGTABLE has now been re-enabled on powerpc recently ? was not
> aware about this. From the error log, it failed explicitly on 4K page
> size hash config.
> 
> static inline pmd_t hash__pmd_mkhuge(pmd_t pmd)
> {
>          BUG();		------> Failed
>          return pmd;
> }
> 
> static inline pmd_t __pmd_mkhuge(pmd_t pmd)
> {
>          if (radix_enabled())
>                  return radix__pmd_mkhuge(pmd);
>          return hash__pmd_mkhuge(pmd);
> }
> 
> pmd_t pfn_pmd(unsigned long pfn, pgprot_t pgprot)
> {
>          unsigned long pmdv;
> 
>          pmdv = (pfn << PAGE_SHIFT) & PTE_RPN_MASK;
> 
>          return __pmd_mkhuge(pmd_set_protbits(__pmd(pmdv), pgprot));
> }
> 
> It seems like on powerpc, where pfn_pmd() makes a huge page but which
> is not supported on 4K hash config thus triggering the BUG(). But all
> pfn_pmd() call sites inside the debug_vm_pgtable() test are protected
> with CONFIG_TRANSPARENT_HUGEPAGE. IIUC unlike powerpc, pfn_pmd() does
> not directly make a huge page on other platforms.
> 
> Looking at arch/powerpc/include/asm/book3s/64/hash-4k.h, all relevant
> THP helpers has BUG() or 0 which indicates THP might not be supported
> on 4K page size hash config ?
> 
> But looking at arch/powerpc/platforms/Kconfig.cputype, it seems like
> HAVE_ARCH_TRANSPARENT_HUGEPAGE is invariably selected on PPC_BOOK3S_64
> platforms which I assume includes 4K page size hash config as well.
> 
> Is THP some how getting enabled on this 4K page size hash config where
> it should not be (thus triggering the BUG) ? OR am I missing something
> here.
> 
> - Anshuman
> 
> On 5/15/21 7:52 PM, Christophe Leroy wrote:
>> ------------[ cut here ]------------
>> kernel BUG at arch/powerpc/include/asm/book3s/64/hash-4k.h:147!
>> Oops: Exception in kernel mode, sig: 5 [#1]
>> BE PAGE_SIZE=4K MMU=Hash SMP NR_CPUS=4 NUMA PowerMac
>> Modules linked in:
>> CPU: 0 PID: 1 Comm: swapper/0 Tainted: G        W         5.13.0-rc1-PowerMacG5
>> #2
>> NIP:  c00000000003d6fc LR: c000000001024bc8 CTR: c0000000000f778c
>> REGS: c0000000025f7840 TRAP: 0700   Tainted: G        W
>> (5.13.0-rc1-PowerMacG5)
>> MSR:  9000000000029032 <SF,HV,EE,ME,IR,DR,RI>  CR: 44002448  XER: 00000000
>> IRQMASK: 0
>> GPR00: c000000001024a5c c0000000025f7ae0 c00000000129f800 c0000000025f7b58
>> GPR04: 0000000000001000 8000000000000108 0000000000000000 0000000000000001
>> GPR08: 0000000000000000 0000000000000000 0000000000000008 0000000000000200
>> GPR12: 0000000024002440 c000000002366000 c00000000001003c 0000000000000000
>> GPR16: 0000000000000000 0000000000000000 0000000000000000 0000000000000000
>> GPR20: c0000000011b3388 c000000000b013e8 c0000000011b3108 4000000000000006
>> GPR24: 4000000000000280 00000000011b3000 0000000000000000 8000000000000105
>> GPR28: 0000000000001000 ffffffffffffff7f c000000000b01460 80000000011b3108
>> NIP [c00000000003d6fc] .pfn_pmd+x0x/0x4
>> LR [c000000001024bc8] .debug_vm_pgtable+0x3f4/0x51c
>> Call Trace:
>> [c0000000025f7ae0] [c000000001024a5c] .debug_vm_pgtable+0x288/0x51c
>> (unreliable)
>> [c0000000025f7bd0] [c00000000000fa58] .do_one_initcall+0x104/0x2c4
>> [c0000000025f7cb0] [c000000001003dec] .kernel_init_freeable+0x3d4/0x410
>> [c0000000025f7da0] [c00000000001004c] .kernel_init+0x10/0x15c
>> [c0000000025f7e10] [c00000000000bbf4] .ret_from_kernel_thread+0x58/0x64
>> Instruction dump:
>> 4bffcd05 60000000 e9210078 e94d0370 7d295279 39400000 4182000c 487d3829
>> 60000000 38210090 7fe3fb78 487dacf4 <0fe00000> 7c0802a6 f8010010 f821ff71
>> ---[ end trace 21fc0fb84dac9a9b ]---

  parent reply	other threads:[~2021-05-17  5:48 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-14 23:44 bugzilla-daemon
2021-05-15 10:20 ` [Bug 213069] " bugzilla-daemon
     [not found] ` <4deb5cd5-c713-b020-9143-c74a031e3fd5@csgroup.eu>
     [not found]   ` <a8841b4e-3bff-f600-eac7-501f78ced54b@arm.com>
2021-05-17  5:47     ` Christophe Leroy [this message]
2021-05-17  5:55       ` Fwd: [Bug 213069] New: " Aneesh Kumar K.V
2021-05-17  7:25         ` Anshuman Khandual
2021-05-17  7:44           ` Aneesh Kumar K.V
2021-05-17 10:53             ` Anshuman Khandual
2021-05-17 11:14               ` Aneesh Kumar K.V
2021-05-17 12:49         ` Anshuman Khandual
2021-05-17 12:59           ` Christophe Leroy
2021-05-17 13:12             ` Anshuman Khandual
2021-05-17 15:26               ` Christophe Leroy
2021-05-17 13:52           ` Aneesh Kumar K.V
2021-05-17 14:12             ` Anshuman Khandual
2021-05-17  6:21 ` [Bug 213069] " bugzilla-daemon
2021-05-17 10:36 ` bugzilla-daemon
2021-05-17 12:57 ` bugzilla-daemon
2021-05-19  1:56 ` bugzilla-daemon
2021-06-04  0:36 ` bugzilla-daemon
2021-06-18 23:18 ` bugzilla-daemon

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=7ebc28ad-61e3-ef43-d670-9b80a61268c4@csgroup.eu \
    --to=christophe.leroy@csgroup.eu \
    --cc=aneesh.kumar@linux.ibm.com \
    --cc=anshuman.khandual@arm.com \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --subject='Re: Fwd: [Bug 213069] New: kernel BUG at arch/powerpc/include/asm/book3s/64/hash-4k.h:147'\!' Oops: Exception in kernel mode, sig: 5 [#1]' \
    /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

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).