From nobody Sun Feb 8 16:11:53 2026 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (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 1C5C217BEB6; Tue, 4 Mar 2025 10:36:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741084585; cv=none; b=Hqh3MikSRrCgwFjf8tQ4uEADL2bb6ZWAbiq/0dqiEDaabnaKLO3JFKSHYLmMhEZlwzYvFEyqHzea4uS97f1bZyny/ItTuKc9dg29ahN5LM+zzoRYT+ES3PbJjVPqH/8TtCm/Kp11tJUA5QK4xWCWfuY7adFZcBSt8F/1iQBSAHw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1741084585; c=relaxed/simple; bh=atwoKtjkq39Lgnl8VEtxY1WBRWYaCILXQ7NGoX3pOHg=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=ms3uexXc+f/RN/u7xXHcdw+uFO+W/fRKsl33m0CRX9LyKSwrPKN9RHEx/or+9uXvULGCEU2i3B2saB7jhw5lRBzpDEm7vrIAE7z+1T2BMssqyragCn1kq1toHVk2GRghRVHMteG30fVybziIXcmsKzey4q/svHkP7UOhGDeoXkM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=ta7JD2Yp; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=hTEqZD6j; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="ta7JD2Yp"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="hTEqZD6j" Date: Tue, 04 Mar 2025 10:36:21 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1741084582; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=cH3JP62yPqm7RPjKRzc6b5ZqKoctRZls6XQawQpr3K4=; b=ta7JD2YpJECvAk4KlrIBkqIF8TGKooohyJCDXnZDGMru5k2n82kVBhLVl3EbkabPkGNpyW wtwDFHoiD3UXEF+Glcuk0CcZoUot5YLRY/MqgjmDP8ealvngbaKIUT84J5e0AD4w4T1cIc WpgJMa4TM5rURMvcygLWAGAWU2+p7vV7/Wd6w6MYwfV44mXQDnHDoGQWd4VQ/5NbKlePlT vD1jpeZ/GmjRLRrNG8uIPq0WLEjN6USZwhZ/vlcPZdLXBeAglpF9qU6Tly5ETKeAadtSS8 B4/IBCl6/lNZLf5p1hEn9C3qWXdU9GxEiH8vkWfCwHBOcJQ4yEcYWHruX8kUGw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1741084582; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=cH3JP62yPqm7RPjKRzc6b5ZqKoctRZls6XQawQpr3K4=; b=hTEqZD6jLCDv9L3XfIUU9SKcZd7IO5G2f0VZ7+D2LjZpuNkkDrGofPzDSk8hNRgXISNHta 0Zb28OWHH1BctLAA== From: "tip-bot2 for Uros Bizjak" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/asm] x86/irq/32: Change some static functions to bool Cc: Uros Bizjak , Ingo Molnar , Andy Lutomirski , Brian Gerst , "H. Peter Anvin" , Linus Torvalds , Peter Zijlstra , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20250303155446.112769-5-ubizjak@gmail.com> References: <20250303155446.112769-5-ubizjak@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <174108458127.14745.15826467197695209761.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable The following commit has been merged into the x86/asm branch of tip: Commit-ID: 7b52de3a2811bf16f52b895478920113e1b39878 Gitweb: https://git.kernel.org/tip/7b52de3a2811bf16f52b895478920113e= 1b39878 Author: Uros Bizjak AuthorDate: Mon, 03 Mar 2025 16:54:25 +01:00 Committer: Ingo Molnar CommitterDate: Tue, 04 Mar 2025 11:21:40 +01:00 x86/irq/32: Change some static functions to bool The return values of these functions is 0/1, but they use an int type instead of bool: check_stack_overflow() execute_on_irq_stack() Change the type of these function to bool and adjust their return values and affected helper variables. [ mingo: Rewrote the changelog ] Signed-off-by: Uros Bizjak Signed-off-by: Ingo Molnar Cc: Andy Lutomirski Cc: Brian Gerst Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Link: https://lore.kernel.org/r/20250303155446.112769-5-ubizjak@gmail.com --- arch/x86/kernel/irq_32.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/x86/kernel/irq_32.c b/arch/x86/kernel/irq_32.c index 2428d66..566a93d 100644 --- a/arch/x86/kernel/irq_32.c +++ b/arch/x86/kernel/irq_32.c @@ -29,7 +29,7 @@ int sysctl_panic_on_stackoverflow __read_mostly; =20 /* Debugging check for stack overflow: is there less than 1KB free? */ -static int check_stack_overflow(void) +static bool check_stack_overflow(void) { unsigned long sp =3D current_stack_pointer & (THREAD_SIZE - 1); =20 @@ -45,7 +45,7 @@ static void print_stack_overflow(void) } =20 #else -static inline int check_stack_overflow(void) { return 0; } +static inline bool check_stack_overflow(void) { return false; } static inline void print_stack_overflow(void) { } #endif =20 @@ -65,7 +65,7 @@ static inline void *current_stack(void) return (void *)(current_stack_pointer & ~(THREAD_SIZE - 1)); } =20 -static inline int execute_on_irq_stack(int overflow, struct irq_desc *desc) +static inline bool execute_on_irq_stack(bool overflow, struct irq_desc *de= sc) { struct irq_stack *curstk, *irqstk; u32 *isp, *prev_esp; @@ -80,7 +80,7 @@ static inline int execute_on_irq_stack(int overflow, stru= ct irq_desc *desc) * current stack (which is the irq stack already after all) */ if (unlikely(curstk =3D=3D irqstk)) - return 0; + return false; =20 isp =3D (u32 *) ((char *)irqstk + sizeof(*irqstk)); =20 @@ -98,7 +98,7 @@ static inline int execute_on_irq_stack(int overflow, stru= ct irq_desc *desc) : [thunk_target] "D" (desc->handle_irq) COMMA(ASM_CALL_CONSTRAINT) : "memory", "cc", "edx", "ecx"); - return 1; + return true; } =20 /* @@ -147,7 +147,7 @@ void do_softirq_own_stack(void) =20 void __handle_irq(struct irq_desc *desc, struct pt_regs *regs) { - int overflow =3D check_stack_overflow(); + bool overflow =3D check_stack_overflow(); =20 if (user_mode(regs) || !execute_on_irq_stack(overflow, desc)) { if (unlikely(overflow))