From: David Hildenbrand <david@redhat.com>
To: Hongchen Zhang <zhanghongchen@loongson.cn>,
Huacai Chen <chenhuacai@kernel.org>,
WANG Xuerui <kernel@xen0n.name>,
Andrew Morton <akpm@linux-foundation.org>,
"Mike Rapoport IBM)" <rppt@kernel.org>,
Feiyang Chen <chenfeiyang@loongson.cn>,
Qi Zheng <zhengqi.arch@bytedance.com>,
"Matthew Wilcox Oracle)" <willy@infradead.org>,
Kefeng Wang <wangkefeng.wang@huawei.com>
Cc: loongarch@lists.linux.dev, linux-kernel@vger.kernel.org,
loongson-kernel@lists.loongnix.cn
Subject: Re: [PATCH] LoongArch: add p?d_leaf() definitions
Date: Wed, 6 Sep 2023 09:42:06 +0200 [thread overview]
Message-ID: <d6012fe0-9d06-f5ac-857c-c38034bf0758@redhat.com> (raw)
In-Reply-To: <20230905064955.16316-1-zhanghongchen@loongson.cn>
On 05.09.23 08:49, Hongchen Zhang wrote:
> When I do LTP test, LTP test case ksm06 caused panic at
> break_ksm_pmd_entry
> -> pmd_leaf (Huge page table but False)
> -> pte_present (panic)
>
Probably there are other problematic bits without that can trigger that?
I suspect walk_page_range*() callers might be affected,
> The reason is pmd_leaf is not defined, So like
> commit 501b81046701 ("mips: mm: add p?d_leaf() definitions")
> add p?d_leaf() definition for LoongArch.
>
We most certainly want to cc stable, no?
Can we come up with a Fixes: tag? Probably when we added THP support to
loongarch.
> Signed-off-by: Hongchen Zhang <zhanghongchen@loongson.cn>
> ---
> arch/loongarch/include/asm/pgtable.h | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/arch/loongarch/include/asm/pgtable.h b/arch/loongarch/include/asm/pgtable.h
> index 370c6568ceb8..ea54653b7aab 100644
> --- a/arch/loongarch/include/asm/pgtable.h
> +++ b/arch/loongarch/include/asm/pgtable.h
> @@ -243,6 +243,9 @@ static inline void pmd_clear(pmd_t *pmdp)
>
> #define pmd_phys(pmd) PHYSADDR(pmd_val(pmd))
>
> +#define pmd_leaf(pmd) ((pmd_val(pmd) & _PAGE_HUGE) != 0)
> +#define pud_leaf(pud) ((pud_val(pud) & _PAGE_HUGE) != 0)
> +
> #ifndef CONFIG_TRANSPARENT_HUGEPAGE
> #define pmd_page(pmd) (pfn_to_page(pmd_phys(pmd) >> PAGE_SHIFT))
> #endif /* CONFIG_TRANSPARENT_HUGEPAGE */
Acked-by: David Hildenbrand <david@redhat.com>
--
Cheers,
David / dhildenb
next prev parent reply other threads:[~2023-09-06 7:43 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-05 6:49 Hongchen Zhang
2023-09-06 7:42 ` David Hildenbrand [this message]
2023-09-06 8:06 ` Hongchen Zhang
2023-09-06 8:08 ` David Hildenbrand
2023-09-06 8:22 ` Hongchen Zhang
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=d6012fe0-9d06-f5ac-857c-c38034bf0758@redhat.com \
--to=david@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=chenfeiyang@loongson.cn \
--cc=chenhuacai@kernel.org \
--cc=kernel@xen0n.name \
--cc=linux-kernel@vger.kernel.org \
--cc=loongarch@lists.linux.dev \
--cc=loongson-kernel@lists.loongnix.cn \
--cc=rppt@kernel.org \
--cc=wangkefeng.wang@huawei.com \
--cc=willy@infradead.org \
--cc=zhanghongchen@loongson.cn \
--cc=zhengqi.arch@bytedance.com \
/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
all inboxes | Powered by JetHome®