From nobody Sun Feb 8 07:44: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 9E5AD13C8F3; Wed, 7 Aug 2024 16:25:31 +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=1723047933; cv=none; b=d5bQn0sGSXvfHZ2tQL9ODfRJtCuD6HzUQM4sX+UuNolsHNc8xB70bZ8BtIU5t0D8sAl1OAkmQL2ZxFnTxUnqIu57PtR8So2mV7KjR1TAYVEBRJpwuAwRmoII801ClbPN4odAG4f9nxUOPtGiW6sMEywcrcDi0N1ibGPGlJBQSUo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1723047933; c=relaxed/simple; bh=mRs68dRA/guASrX6h5faX1PKz17n6ieEjb1GiePH7Hw=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=Tgl0PP5CFOsDgvV2+aRdJ2pBhvStR9Jc/aWhxpbzqUK9YgwK7BFEX3K+WZJAg/L3oiJPC+ZNSIQW7RZuNi86eqcPMCv3jMcS0BbNpr/iH2QlgHtYNYDiGpJCVsGyyG/TYvodit+GXV7kk2xX9CxLZve/uiUWYlIQRgvw3QxI4nY= 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=XvQCGGrA; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=f4taxt/q; 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="XvQCGGrA"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="f4taxt/q" Date: Wed, 07 Aug 2024 16:25:29 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1723047929; 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=5E1dsamfab7g06H5ynHG8FZDV90Fpjl6fJjc+v5w4Vg=; b=XvQCGGrAFz5IRV/VAd8vpxgpoiVWuYPok4dHTPO8/Iyc2DMV6OwiRKR8/BvklQIIbkImnU XOyxrIk4bEzqkXiHzb/y+uppZ1vss+2f/VrVD5uTb38rOmiGoT2kgiGUOox9JUlm0uwGCr QqE4fUPLitk6EycUG7fyQ9FY/30M4sef4aTE1qKuKQsx9yVz7wNw0E4DW7G4Z9rKby2DWJ V9rAkprrSJzt+kwl30XoXz9wGICMf61iePt6ifjZsaFEsTsgBv/zidudMuIFaHrS2ZzBsR lN7vTes/nlI5gF5Qxooe26BlsNO6RXME9RcDf8IpvLoW1IX/1J+Cy0S2wWaGyw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1723047929; 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=5E1dsamfab7g06H5ynHG8FZDV90Fpjl6fJjc+v5w4Vg=; b=f4taxt/qczpE5hz0+b7xudZNndXH0npS4x+o76mlKoSD3G59RWwzds9ZQtJlpIz17WX7x3 8KHPyUyRStKkBdBw== From: "tip-bot2 for Thomas Gleixner" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/apic] x86/apic: Provide apic_printk() helpers Cc: Thomas Gleixner , Qiuxu Zhuo , Breno Leitao , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20240802155440.527510045@linutronix.de> References: <20240802155440.527510045@linutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <172304792925.2215.4089404378024732356.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/apic branch of tip: Commit-ID: d768e3f3e3fb43df2559d4c053b0f68c9649b2c7 Gitweb: https://git.kernel.org/tip/d768e3f3e3fb43df2559d4c053b0f68c9= 649b2c7 Author: Thomas Gleixner AuthorDate: Fri, 02 Aug 2024 18:15:39 +02:00 Committer: Thomas Gleixner CommitterDate: Wed, 07 Aug 2024 18:13:28 +02:00 x86/apic: Provide apic_printk() helpers apic_printk() requires the APIC verbosity level and printk level which is tedious and horrible to read. Provide helpers to simplify all of that. Signed-off-by: Thomas Gleixner Tested-by: Qiuxu Zhuo Tested-by: Breno Leitao Link: https://lore.kernel.org/all/20240802155440.527510045@linutronix.de --- arch/x86/include/asm/apic.h | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/arch/x86/include/asm/apic.h b/arch/x86/include/asm/apic.h index 9327eb0..34eaebe 100644 --- a/arch/x86/include/asm/apic.h +++ b/arch/x86/include/asm/apic.h @@ -18,6 +18,11 @@ =20 #define ARCH_APICTIMER_STOPS_ON_C3 1 =20 +/* Macros for apic_extnmi which controls external NMI masking */ +#define APIC_EXTNMI_BSP 0 /* Default */ +#define APIC_EXTNMI_ALL 1 +#define APIC_EXTNMI_NONE 2 + /* * Debugging macros */ @@ -25,22 +30,22 @@ #define APIC_VERBOSE 1 #define APIC_DEBUG 2 =20 -/* Macros for apic_extnmi which controls external NMI masking */ -#define APIC_EXTNMI_BSP 0 /* Default */ -#define APIC_EXTNMI_ALL 1 -#define APIC_EXTNMI_NONE 2 - /* - * Define the default level of output to be very little - * This can be turned up by using apic=3Dverbose for more - * information and apic=3Ddebug for _lots_ of information. - * apic_verbosity is defined in apic.c + * Define the default level of output to be very little This can be turned + * up by using apic=3Dverbose for more information and apic=3Ddebug for _l= ots_ + * of information. apic_verbosity is defined in apic.c */ -#define apic_printk(v, s, a...) do { \ - if ((v) <=3D apic_verbosity) \ - printk(s, ##a); \ - } while (0) - +#define apic_printk(v, s, a...) \ +do { \ + if ((v) <=3D apic_verbosity) \ + printk(s, ##a); \ +} while (0) + +#define apic_pr_verbose(s, a...) apic_printk(APIC_VERBOSE, KERN_INFO s, ##= a) +#define apic_pr_debug(s, a...) apic_printk(APIC_DEBUG, KERN_DEBUG s, ##a) +#define apic_pr_debug_cont(s, a...) apic_printk(APIC_DEBUG, KERN_CONT s, #= #a) +/* Unconditional debug prints for code which is guarded by apic_verbosity = already */ +#define apic_dbg(s, a...) printk(KERN_DEBUG s, ##a) =20 #if defined(CONFIG_X86_LOCAL_APIC) && defined(CONFIG_X86_32) extern void x86_32_probe_apic(void);