Skip to contentSkip to conversation

x86: ia32.h: Remove unused code

PATCH Applied YueHaibing 3 participants 4 messages Jun 25, 2023 – Apr 2, 2024 x86

lore
Share & tools
lore

YueHaibing

author
#0 lore raw

PATCH 1/1 x86: ia32.h: Remove unused code

Since commit 32974ad4907c ("[IA64] Remove COMPAT_IA32 support") IA32_STACK_TOP and ia32_setup_arg_pages() is not used anymore. And commit 675a0813609f ("x86: unify mmap_{32|64}.c") left behind ia32_pick_mmap_layout() extern declaration.

---
 arch/x86/include/asm/ia32.h | 11 -----------
 1 file changed, 11 deletions(-)
arch/x86/include/asm/ia32.h +0 -11
index fada857f0a1e..68f7eefe63d3 100644
@@ -57,17 +57,6 @@ struct stat64 {
 	unsigned long long	st_ino;
 } __attribute__((packed));
 
-#define IA32_STACK_TOP IA32_PAGE_OFFSET
-
-#ifdef __KERNEL__
-struct linux_binprm;
-extern int ia32_setup_arg_pages(struct linux_binprm *bprm,
-				unsigned long stack_top, int exec_stack);
-struct mm_struct;
-extern void ia32_pick_mmap_layout(struct mm_struct *mm);
-
-#endif
-
 #endif /* CONFIG_IA32_EMULATION */
 
 #endif /* _ASM_X86_IA32_H */
Signature · 1 line
2.34.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 22 lines · YueHaibing

Since commit 32974ad4907c ("[IA64] Remove COMPAT_IA32 support") IA32_STACK_TOP and ia32_setup_arg_pages() is not used anymore. And commit 675a0813609f ("x86: unify mmap_{32|64}.c") left behind ia32_pick_mmap_layout() extern declaration.

---
  arch/x86/include/asm/ia32.h | 11 -----------
  1 file changed, 11 deletions(-)
arch/x86/include/asm/ia32.h +0 -4
index fada857f0a1e..68f7eefe63d3 100644
@@ -57,17 +57,6 @@ struct stat64 {
  	unsigned long long	st_ino;
  } __attribute__((packed));
 
-#define IA32_STACK_TOP IA32_PAGE_OFFSET
-
-#ifdef __KERNEL__
-struct linux_binprm;

arch/x86/include/asm/ia32.h struct stat64 { · line 62

Quoted 10 lines
arch/x86/include/asm/ia32.h +0 -7
-extern int ia32_setup_arg_pages(struct linux_binprm *bprm,
-				unsigned long stack_top, int exec_stack);
-struct mm_struct;
-extern void ia32_pick_mmap_layout(struct mm_struct *mm);
-
-#endif
-
  #endif /* CONFIG_IA32_EMULATION */
 
  #endif /* _ASM_X86_IA32_H */

I've sent very similar patch (minus removal of IA32_STACK_TOP define) on 12.06 - https://lore.kernel.org/all/[email protected]/

author
#2 lore raw
In reply to YueHaibing

ping...

Quoted 33 lines · YueHaibing

Since commit 32974ad4907c ("[IA64] Remove COMPAT_IA32 support") IA32_STACK_TOP and ia32_setup_arg_pages() is not used anymore. And commit 675a0813609f ("x86: unify mmap_{32|64}.c") left behind ia32_pick_mmap_layout() extern declaration.

---
 arch/x86/include/asm/ia32.h | 11 -----------
 1 file changed, 11 deletions(-)
arch/x86/include/asm/ia32.h +0 -11
index fada857f0a1e..68f7eefe63d3 100644
@@ -57,17 +57,6 @@ struct stat64 {
 	unsigned long long	st_ino;
 } __attribute__((packed));
 
-#define IA32_STACK_TOP IA32_PAGE_OFFSET
-
-#ifdef __KERNEL__
-struct linux_binprm;
-extern int ia32_setup_arg_pages(struct linux_binprm *bprm,
-				unsigned long stack_top, int exec_stack);
-struct mm_struct;
-extern void ia32_pick_mmap_layout(struct mm_struct *mm);
-
-#endif
-
 #endif /* CONFIG_IA32_EMULATION */
 
 #endif /* _ASM_X86_IA32_H */
merge bot Applied
#3 lore raw

[tip: x86/cleanups] x86/32: Remove unused IA32_STACK_TOP and two externs

In reply to YueHaibing
The following commit has been merged into the x86/cleanups branch of tip:

The following commit has been merged into the x86/cleanups branch of tip:

Commit-ID:     52b2c101b9ce3b954ebbed4c24396ec28f66fcd9
Gitweb:        https://git.kernel.org/tip/52b2c101b9ce3b954ebbed4c24396ec28f66fcd9
Author:        YueHaibing <[email protected]>
AuthorDate:    Sun, 25 Jun 2023 20:54:11 +08:00
Committer:     Borislav Petkov (AMD) <[email protected]>
CommitterDate: Tue, 02 Apr 2024 15:01:40 +02:00

x86/32: Remove unused IA32_STACK_TOP and two externs

Since

32974ad4907c ("[IA64] Remove COMPAT_IA32 support")

IA32_STACK_TOP and ia32_setup_arg_pages() are not used anymore.

And

675a0813609f ("x86: unify mmap_{32|64}.c")

left behind ia32_pick_mmap_layout() extern declaration.

Remove them all.

[ bp: Massage commit message. ]

---
 arch/x86/include/asm/ia32.h | 11 -----------
 1 file changed, 11 deletions(-)
arch/x86/include/asm/ia32.h +0 -11
index 4212c00..9d69f3f 100644
@@ -56,17 +56,6 @@ struct stat64 {
 	unsigned long long	st_ino;
 } __attribute__((packed));
 
-#define IA32_STACK_TOP IA32_PAGE_OFFSET
-
-#ifdef __KERNEL__
-struct linux_binprm;
-extern int ia32_setup_arg_pages(struct linux_binprm *bprm,
-				unsigned long stack_top, int exec_stack);
-struct mm_struct;
-extern void ia32_pick_mmap_layout(struct mm_struct *mm);
-
-#endif
-
 extern bool __ia32_enabled;
 
 static __always_inline bool ia32_enabled(void)