From nobody Mon Feb 9 10:26:35 2026 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6096F156F5F; Thu, 28 Nov 2024 09:44:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=90.155.50.34 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732787048; cv=none; b=SXppiGBkxg579WlXlD1vc2q3aJOW6ebKCPnMvc7SOrUbB5QrJtmMxroqv81Z5J+VFcxQ8LtDi0ZZGL+W7loB56jfMPCIYLLXEXmKP3hkBuBPDgayegSS0pTRMFVUyDAB18ZBTnnuvdQrBPz3IDnmwNHyJP5nOsvMl0HEmwpOMmU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732787048; c=relaxed/simple; bh=TQ9vA3Xg6DGKteBrAHo0E53uE8gHWzdmqn/rZhL7+P8=; h=Message-ID:Date:From:To:Cc:Subject:References:MIME-Version: Content-Type; b=Ask/2/vGrEewaMCVh+fmbPz0Bf9VWlZsKSV45dhEMiy1qLiA1tNKaGUudcz3bEfrM7vesI+vgZ5hsA+hD9BFtogR2o99VIBGMQNR8mp2wx5i9GqDbGvED6RVy4G27PMc5B4adXibyOUoji/JuQeuZKJ5azK0gmEovHVIUtzMOQ4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=odzhO0mw; arc=none smtp.client-ip=90.155.50.34 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="odzhO0mw" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Type:MIME-Version:References: Subject:Cc:To:From:Date:Message-ID:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:In-Reply-To; bh=TrdAdZztiIjpmt3VeZGYbi5G41ypkPElwux/Td18Xc0=; b=odzhO0mw6rKwadCrRb/CbtqKeV hCit0UAFeApZFAiTRUHsst1Yy/tvfbDMX8wV2ZsAVT1lIWfwqrfZWY6yq1GJ3J7j/mKM6vDZKo7dK GlcMZ3qI2ev3nuKa19Xk7mj1wgh6cAucyY4HeGAf3VOMZ7sKyEnYgW8rDAa5oKfaw7miZGAS5mSDV R9B0ZrDj/8S3aYTcUI6yrff9bUkIxVAqSbXg6zX+ZHfgsUfzpSlxSSjfsqTK9ksZXKyAjtg3DPiYW cDhr4S1ucTXDvPBHKrmC0Fpm3XCAOh4INmhKXFOISd/9FyDMVevOwhiu74RzMT3MLjaaMv6LV2+p9 RncZOxXQ==; Received: from 77-249-17-89.cable.dynamic.v4.ziggo.nl ([77.249.17.89] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.98 #2 (Red Hat Linux)) id 1tGb47-00000002Tpy-0eHV; Thu, 28 Nov 2024 09:44:04 +0000 Received: by noisy.programming.kicks-ass.net (Postfix, from userid 0) id 2ADA2301C34; Thu, 28 Nov 2024 10:44:03 +0100 (CET) Message-ID: <20241128094312.133437051@infradead.org> User-Agent: quilt/0.66 Date: Thu, 28 Nov 2024 10:39:03 +0100 From: Peter Zijlstra To: jpoimboe@kernel.org Cc: chenhuacai@kernel.org, kernel@xen0n.name, x86@kernel.org, peterz@infradead.org, loongarch@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH v2 12/16] loongarch: Use ASM_REACHABLE References: <20241128093851.469225872@infradead.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" annotate_reachable() is unreliable since the compiler is free to place random code inbetween two consecutive asm() statements. This removes the last and only annotate_reachable() user. Signed-off-by: Peter Zijlstra (Intel) --- arch/loongarch/include/asm/bug.h | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) --- a/arch/loongarch/include/asm/bug.h +++ b/arch/loongarch/include/asm/bug.h @@ -4,6 +4,7 @@ =20 #include #include +#include =20 #ifndef CONFIG_DEBUG_BUGVERBOSE #define _BUGVERBOSE_LOCATION(file, line) @@ -33,25 +34,25 @@ =20 #define ASM_BUG_FLAGS(flags) \ __BUG_ENTRY(flags) \ - break BRK_BUG + break BRK_BUG; =20 #define ASM_BUG() ASM_BUG_FLAGS(0) =20 -#define __BUG_FLAGS(flags) \ - asm_inline volatile (__stringify(ASM_BUG_FLAGS(flags))); +#define __BUG_FLAGS(flags, extra) \ + asm_inline volatile (__stringify(ASM_BUG_FLAGS(flags)) \ + extra); =20 #define __WARN_FLAGS(flags) \ do { \ instrumentation_begin(); \ - __BUG_FLAGS(BUGFLAG_WARNING|(flags)); \ - annotate_reachable(); \ + __BUG_FLAGS(BUGFLAG_WARNING|(flags), ASM_REACHABLE); \ instrumentation_end(); \ } while (0) =20 #define BUG() \ do { \ instrumentation_begin(); \ - __BUG_FLAGS(0); \ + __BUG_FLAGS(0, ""); \ unreachable(); \ } while (0)