From nobody Fri Dec 19 06:38:56 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0FFC6EC8742 for ; Thu, 7 Sep 2023 17:34:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237376AbjIGReM (ORCPT ); Thu, 7 Sep 2023 13:34:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34648 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235776AbjIGReJ (ORCPT ); Thu, 7 Sep 2023 13:34:09 -0400 Received: from cantor.telenet-ops.be (cantor.telenet-ops.be [IPv6:2a02:1800:120:4::f00:10]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 406D392 for ; Thu, 7 Sep 2023 10:33:43 -0700 (PDT) Received: from albert.telenet-ops.be (albert.telenet-ops.be [IPv6:2a02:1800:110:4::f00:1a]) by cantor.telenet-ops.be (Postfix) with ESMTPS id 4RhL535PX0z4xT4x for ; Thu, 7 Sep 2023 15:41:59 +0200 (CEST) Received: from ramsan.of.borg ([84.195.187.55]) by albert.telenet-ops.be with bizsmtp id j1hy2A00T1C8whw061hyaQ; Thu, 07 Sep 2023 15:41:59 +0200 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtp (Exim 4.95) (envelope-from ) id 1qeFGQ-002mAD-Ux; Thu, 07 Sep 2023 15:41:58 +0200 Received: from geert by rox.of.borg with local (Exim 4.95) (envelope-from ) id 1qeFGg-00CMi7-6v; Thu, 07 Sep 2023 15:41:58 +0200 From: Geert Uytterhoeven To: linux-m68k@lists.linux-m68k.org Cc: Arnd Bergmann , Finn Thain , Michael Schmitz , Philip Blundell , Greg Ungerer , Joshua Thompson , Sam Creasey , Laurent Vivier , linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH 39/52] m68k: sun3: Fix context restore in flush_tlb_range() Date: Thu, 7 Sep 2023 15:41:40 +0200 Message-Id: X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org When building with W=3D1: In file included from arch/m68k/kernel/traps.c:42: arch/m68k/include/asm/tlbflush.h: In function =E2=80=98flush_tlb_range= =E2=80=99: arch/m68k/include/asm/tlbflush.h:191:28: warning: variable =E2=80=98old= ctx=E2=80=99 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 --- Compile-tested only. This issue seems to have been present since the introduction of Sun3 support in v2.4.0. --- 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/tlbfl= ush.h index b882e2f4f5516f8d..3ab329a03c76c8d8 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_stru= ct *vma, next: start +=3D SUN3_PMEG_SIZE; } + sun3_put_context(oldctx); } =20 static inline void flush_tlb_kernel_range(unsigned long start, unsigned lo= ng end) --=20 2.34.1