From nobody Mon Dec 15 02:55:40 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 9A8AAEDEC5A for ; Wed, 13 Sep 2023 14:09:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241419AbjIMOJf (ORCPT ); Wed, 13 Sep 2023 10:09:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52902 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241279AbjIMOI5 (ORCPT ); Wed, 13 Sep 2023 10:08:57 -0400 Received: from weierstrass.telenet-ops.be (weierstrass.telenet-ops.be [195.130.137.81]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CF7BA1BE8 for ; Wed, 13 Sep 2023 07:08:50 -0700 (PDT) Received: from albert.telenet-ops.be (albert.telenet-ops.be [IPv6:2a02:1800:110:4::f00:1a]) by weierstrass.telenet-ops.be (Postfix) with ESMTPS id 4Rm2PF3F77z4xHC5 for ; Wed, 13 Sep 2023 16:08:49 +0200 (CEST) Received: from ramsan.of.borg ([84.195.187.55]) by albert.telenet-ops.be with bizsmtp id lS8n2A00U1C8whw06S8n4E; Wed, 13 Sep 2023 16:08:49 +0200 Received: from rox.of.borg ([192.168.97.57]) by ramsan.of.borg with esmtp (Exim 4.95) (envelope-from ) id 1qgQXe-003ctR-BL; Wed, 13 Sep 2023 16:08:47 +0200 Received: from geert by rox.of.borg with local (Exim 4.95) (envelope-from ) id 1qgQXv-00FV6V-M7; Wed, 13 Sep 2023 16:08:47 +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 v2 39/52] m68k: sun3: Fix context restore in flush_tlb_range() Date: Wed, 13 Sep 2023 16:08:29 +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 Acked-by: Arnd Bergmann --- v2: - Add Acked-by. 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