[PATCH] mk68k: Fix broken THREAD_SIZE_ORDER

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

 



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@xxxxxxxxxxxx>
Cc: stable@xxxxxxxxxxxxxxx
---
 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





[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux