From: Dawei Li <dawei.li@shingroup.cn>
To: geert@linux-m68k.org
Cc: gerg@snapgear.com, linux-m68k@lists.linux-m68k.org,
linux-kernel@vger.kernel.org, set_pte_at@outlook.com,
Dawei Li <dawei.li@shingroup.cn>,
stable@vger.kernel.org
Subject: [PATCH] mk68k: Fix broken THREAD_SIZE_ORDER
Date: Wed, 28 Feb 2024 16:58:24 +0800 [thread overview]
Message-ID: <20240228085824.74639-1-dawei.li@shingroup.cn> (raw)
Current THREAD_SIZE_ORDER implementation for m68k is incorrect, fix it
by ilog2().
Fixes: cddafa3500fd ("m68k/m68knommu: merge MMU and non-MMU thread_info.h")
Signed-off-by: Dawei Li <dawei.li@shingroup.cn>
Cc: stable@vger.kernel.org
---
arch/m68k/include/asm/thread_info.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/arch/m68k/include/asm/thread_info.h b/arch/m68k/include/asm/thread_info.h
index 31be2ad999ca..50faecd6fc5f 100644
--- a/arch/m68k/include/asm/thread_info.h
+++ b/arch/m68k/include/asm/thread_info.h
@@ -19,7 +19,8 @@
#else
#define THREAD_SIZE PAGE_SIZE
#endif
-#define THREAD_SIZE_ORDER ((THREAD_SIZE / PAGE_SIZE) - 1)
+
+#define THREAD_SIZE_ORDER ilog2(THREAD_SIZE / PAGE_SIZE)
#ifndef __ASSEMBLY__
--
2.27.0
next reply other threads:[~2024-02-28 8:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-28 8:58 Dawei Li [this message]
2024-02-28 9:11 ` [PATCH] mk68k: Fix broken THREAD_SIZE_ORDER Jiri Slaby
2024-02-28 9:33 ` Dawei Li
2024-02-28 10:09 ` Geert Uytterhoeven
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=20240228085824.74639-1-dawei.li@shingroup.cn \
--to=dawei.li@shingroup.cn \
--cc=geert@linux-m68k.org \
--cc=gerg@snapgear.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-m68k@lists.linux-m68k.org \
--cc=set_pte_at@outlook.com \
--cc=stable@vger.kernel.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 read-only IMAP folder(s) and NNTP newsgroup(s).