From 2e195ea7e95b5360f5e4d9c6a89dbcc4eaf70d36 Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Wed, 13 Sep 2023 16:08:29 +0200 Subject: [PATCH] m68k: sun3: Fix context restore in flush_tlb_range() MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit When building with W=1: In file included from arch/m68k/kernel/traps.c:42: arch/m68k/include/asm/tlbflush.h: In function ‘flush_tlb_range’: arch/m68k/include/asm/tlbflush.h:191:28: warning: variable ‘oldctx’ set but not used [-Wunused-but-set-variable] 191 | unsigned char seg, oldctx; | ^~~~~~ Indeed, the old context is saved, but never restored. Fix this by adding the missing call to sun3_put_context(). Signed-off-by: Geert Uytterhoeven Acked-by: Arnd Bergmann Link: https://lore.kernel.org/r/ea859b7850e061e0f7fb3fca64d9f8e6d1c0d2ad.1694613528.git.geert@linux-m68k.org --- arch/m68k/include/asm/tlbflush.h | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/m68k/include/asm/tlbflush.h b/arch/m68k/include/asm/tlbflush.h index b882e2f4f5516..3ab329a03c76c 100644 --- a/arch/m68k/include/asm/tlbflush.h +++ b/arch/m68k/include/asm/tlbflush.h @@ -208,6 +208,7 @@ static inline void flush_tlb_range (struct vm_area_struct *vma, next: start += SUN3_PMEG_SIZE; } + sun3_put_context(oldctx); } static inline void flush_tlb_kernel_range(unsigned long start, unsigned long end) -- 2.30.2