[PATCH v3 2/2] sparc64: remove dead THREAD_SIZE branches for non-8K pages

From: Stian Halseth

Date: Sun Sep 27 2026 - 17:29:44 EST


Commit 15b9350a177b ("sparc64: Only support 4MB huge pages and 8KB
base pages.") made 8K the only base page size, so PAGE_SHIFT is
always 13 here and the else branches have been dead since. Remove
them.

Fixes: 15b9350a177b ("sparc64: Only support 4MB huge pages and 8KB base pages.")
Suggested-by: Andreas Larsson <andreas@xxxxxxxxxxx>
Signed-off-by: Stian Halseth <stian@xxxxxx>
---
arch/sparc/include/asm/thread_info_64.h | 10 ----------
1 file changed, 10 deletions(-)

diff --git a/arch/sparc/include/asm/thread_info_64.h b/arch/sparc/include/asm/thread_info_64.h
--- a/arch/sparc/include/asm/thread_info_64.h
+++ b/arch/sparc/include/asm/thread_info_64.h
@@ -99,13 +99,8 @@
#define FAULT_CODE_BLKCOMMIT 0x10 /* Use blk-commit ASI in copy_page */
#define FAULT_CODE_BAD_RA 0x20 /* Bad RA for sun4v */

-#if PAGE_SHIFT == 13
#define THREAD_SIZE (4*PAGE_SIZE)
#define THREAD_SHIFT (PAGE_SHIFT + 2)
-#else /* PAGE_SHIFT == 13 */
-#define THREAD_SIZE PAGE_SIZE
-#define THREAD_SHIFT PAGE_SHIFT
-#endif /* PAGE_SHIFT == 13 */

/*
* macros/functions for gaining access to the thread information structure
@@ -128,11 +123,7 @@
#endif

/* thread information allocation */
-#if PAGE_SHIFT == 13
#define THREAD_SIZE_ORDER 2
-#else /* PAGE_SHIFT == 13 */
-#define THREAD_SIZE_ORDER 0
-#endif /* PAGE_SHIFT == 13 */

#define __thread_flag_byte_ptr(ti) \
((unsigned char *)(&((ti)->flags)))
--
2.53.0