Skip to contentSkip to conversation

openrisc: remove CONFIG_SET_FS

PATCH Superseded Stafford Horne 1 participant 1 message Feb 7, 2022 Openrisc architecture

v2 of 4 Superseded Latest is v4 →

lore
Share & tools
lore

Stafford Horne

author maintainer
#0 lore raw

PATCH v2 1/1 openrisc: remove CONFIG_SET_FS

Remove the address space override API set_fs(). The OpenRISC user address space is now limited to TASK_SIZE.

To support this we implement and wire in __get_kernel_nofault and __set_kernel_nofault.

The function user_addr_max is removed as there is a default definition provided when CONFIG_SET_FS is not used.

---
since v1:
- Fix commit message with misleading comment about User Mode Linux.

 arch/openrisc/Kconfig                   |  1 -
 arch/openrisc/include/asm/thread_info.h |  7 ----
 arch/openrisc/include/asm/uaccess.h     | 48 +++++++++++--------------
 3 files changed, 20 insertions(+), 36 deletions(-)
arch/openrisc/Kconfig +0 -1
index bf047dca7ec6..ceda77fb8bc8 100644
@@ -36,7 +36,6 @@ config OPENRISC
 	select ARCH_WANT_FRAME_POINTERS
 	select GENERIC_IRQ_MULTI_HANDLER
 	select MMU_GATHER_NO_RANGE if MMU
-	select SET_FS
 	select TRACE_IRQFLAGS_SUPPORT
 
 config CPU_BIG_ENDIAN
arch/openrisc/include/asm/thread_info.h +0 -7
index 659834ab87fa..4af3049c34c2 100644
@@ -40,18 +40,12 @@
  */
 #ifndef __ASSEMBLY__
 
-typedef unsigned long mm_segment_t;
-
 struct thread_info {
 	struct task_struct	*task;		/* main task structure */
 	unsigned long		flags;		/* low level flags */
 	__u32			cpu;		/* current CPU */
 	__s32			preempt_count; /* 0 => preemptable, <0 => BUG */
 
-	mm_segment_t		addr_limit; /* thread address space:
-					       0-0x7FFFFFFF for user-thead
-					       0-0xFFFFFFFF for kernel-thread
-					     */
 	__u8			supervisor_stack[0];
 
 	/* saved context data */
@@ -71,7 +65,6 @@ struct thread_info {
 	.flags		= 0,				\
 	.cpu		= 0,				\
 	.preempt_count	= INIT_PREEMPT_COUNT,		\
-	.addr_limit	= KERNEL_DS,			\
 	.ksp            = 0,                            \
 }
 
arch/openrisc/include/asm/uaccess.h +20 -28

71 lines not on this page · raw message

Signature · 1 line
2.31.1