From nobody Sat Feb 7 07:37:46 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 ED5DD26AFF; Wed, 8 May 2024 13:25:59 +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=1715174761; cv=none; b=fZf7akGT1vDKzvThBUyANnJQUIvuMT8orq4TNJEsrRMP96VquWSZkCLlvz9Kx2ZWE0Jy0f/ylmKRpsdQJo2BgwgoH81y01JUNqEwDLek9YXnv0DeI4puzOCT8pjKr5l0M3x5zIQgfZRzsUnZ6lD9HxPbtsUss6vo6qcmNKUx3BQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1715174761; c=relaxed/simple; bh=JcTv18sDO3NgTJrLL5P7Kt3KYTRCy3pnv0msXUafur0=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=nP8CcsjkTlFtT655Le1De8vKSFBVCRPcj99Xmhw6A0v+CPjND8ehaoNK5LSclac8aLAUrJ2GWvYsffPmbYH6sjBSuiSs2fLczI4eo83P7SXW79h5Q6XLIRLuZT5TK4z+Byg4QqNZY1dJkW+Fvz0J+sP3awWk8IPsayM+CRmI+9o= 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=pzY6gdMP; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=tGwkKn+u; 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="pzY6gdMP"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="tGwkKn+u" Date: Wed, 08 May 2024 13:25:57 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1715174757; 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=RIzTXlk0BbMU/gkh1XIZNmB1y05fF1wLb5M1xoUXdBQ=; b=pzY6gdMPMKjsv9nH6jmWmGU1aAneZLyw98wm6tseUgxLhTXOk+FNDfn27OFpQzIQCEb85r f/Fn4NOZclap5O9zfhM6H1QGAOaDXINY61gW8y+F2aYWEXgZz7u1+XEIKGhywm2+v4adZs sTC7jI2n0jreZs9u08QpJ+BsH25gi48Swjvn/aRuYyX0C7FXAq+81q0eICiIzo/M7z1aMW El8+EwOK72XAhE+YBgi6qlJQ+EYAR2xB7Sp+CZy+GzuEYQChNVAVq0X/5jQTWUG4M3V6xQ tLp0F0TcXIAwLeZIGxaSrx881Nv1qrqeZ4D0ecThfBeG6G106zeJyXBR0FNB+A== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1715174757; 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=RIzTXlk0BbMU/gkh1XIZNmB1y05fF1wLb5M1xoUXdBQ=; b=tGwkKn+un1vTqh3tF6H7pKJxpA1Ue9F7+bliVHcoIhjLdBF4WcsVt+DrrGceBr66f7CreO yZm/NQZT1HbywpCg== From: "tip-bot2 for Jacob Pan" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/irq] x86/irq: Use existing helper for pending vector check Cc: Jacob Pan , Thomas Gleixner , Imran Khan , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20240506175612.1141095-1-jacob.jun.pan@linux.intel.com> References: <20240506175612.1141095-1-jacob.jun.pan@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <171517475718.10875.16618789278156468301.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/irq branch of tip: Commit-ID: 6ecc2e7932fe8f132d3b671685f9995785f19e9a Gitweb: https://git.kernel.org/tip/6ecc2e7932fe8f132d3b671685f999578= 5f19e9a Author: Jacob Pan AuthorDate: Mon, 06 May 2024 10:56:12 -07:00 Committer: Thomas Gleixner CommitterDate: Wed, 08 May 2024 15:15:15 +02:00 x86/irq: Use existing helper for pending vector check lapic_vector_set_in_irr() is already available, use it for checking pending vectors at the local APIC. No functional change. Signed-off-by: Jacob Pan Signed-off-by: Thomas Gleixner Reviewed-by: Imran Khan Link: https://lore.kernel.org/r/20240506175612.1141095-1-jacob.jun.pan@linu= x.intel.com --- arch/x86/include/asm/apic.h | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/arch/x86/include/asm/apic.h b/arch/x86/include/asm/apic.h index 5644c39..467532b 100644 --- a/arch/x86/include/asm/apic.h +++ b/arch/x86/include/asm/apic.h @@ -503,13 +503,7 @@ static inline bool lapic_vector_set_in_irr(unsigned in= t vector) =20 static inline bool is_vector_pending(unsigned int vector) { - unsigned int irr; - - irr =3D apic_read(APIC_IRR + (vector / 32 * 0x10)); - if (irr & (1 << (vector % 32))) - return true; - - return pi_pending_this_cpu(vector); + return lapic_vector_set_in_irr(vector) || pi_pending_this_cpu(vector); } =20 /*