aboutsummaryrefslogtreecommitdiff
path: root/arch/m68k/kernel/process.c
diff options
context:
space:
mode:
authorChristoph Hellwig <[email protected]>2021-09-16 09:04:05 +0200
committerGeert Uytterhoeven <[email protected]>2021-09-24 13:35:07 +0200
commit9fde0348640252c79d462c4d29a09a14e8741f5c (patch)
treed4f9ba0894c1dd7701ae122d90b7dc227130501c /arch/m68k/kernel/process.c
parent8ade83390930d61c64fe3ab49081990c9d43d0d2 (diff)
m68k: Remove set_fs()
Add a m68k-only set_fc helper to set the SFC and DFC registers for the few places that need to override it for special MM operations, but disconnect that from the deprecated kernel-wide set_fs() API. Note that the SFC/DFC registers are context switched, so there is no need to disable preemption. Partially based on an earlier patch from Linus Torvalds <[email protected]>. Signed-off-by: Christoph Hellwig <[email protected]> Reviewed-by: Michael Schmitz <[email protected]> Tested-by: Michael Schmitz <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Geert Uytterhoeven <[email protected]>
Diffstat (limited to 'arch/m68k/kernel/process.c')
-rw-r--r--arch/m68k/kernel/process.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/m68k/kernel/process.c b/arch/m68k/kernel/process.c
index db49f9091711..1ab692b952cd 100644
--- a/arch/m68k/kernel/process.c
+++ b/arch/m68k/kernel/process.c
@@ -92,7 +92,7 @@ void show_regs(struct pt_regs * regs)
void flush_thread(void)
{
- current->thread.fs = __USER_DS;
+ current->thread.fc = USER_DATA;
#ifdef CONFIG_FPU
if (!FPU_IS_EMU) {
unsigned long zero = 0;
@@ -155,7 +155,7 @@ int copy_thread(unsigned long clone_flags, unsigned long usp, unsigned long arg,
* Must save the current SFC/DFC value, NOT the value when
* the parent was last descheduled - RGH 10-08-96
*/
- p->thread.fs = get_fs().seg;
+ p->thread.fc = USER_DATA;
if (unlikely(p->flags & (PF_KTHREAD | PF_IO_WORKER))) {
/* kernel thread */