Received: by 2002:ab2:6991:0:b0:1f7:f6c3:9cb1 with SMTP id v17csp497989lqo; Wed, 8 May 2024 06:29:51 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUwlbg7mX+yw7L2s+hMGzeiFYIdKadKSD5fEYxGg5cNbO+Ij2F2/3mt/U4UYGZIwkpKVB37Ify95EQaELBJz3cIXqAxlwDt3cHywKf24g== X-Google-Smtp-Source: AGHT+IFVyqr0S44WuZjlHLQl/ane22vSeEZD57vBskazMd4XOcWVwzi5mTfAfUUkQGkyRic5hAB0 X-Received: by 2002:a05:6e02:1d09:b0:36c:72e:4a88 with SMTP id e9e14a558f8ab-36caecc8596mr27965875ab.3.1715174991056; Wed, 08 May 2024 06:29:51 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1715174991; cv=pass; d=google.com; s=arc-20160816; b=VXIe04UzHt4QzHZcILmk3a9lIOiOSLnSi29gnwRgYqG8j5Q5UGHQKIeaS6kXsQe+f3 LhAqA3nH74iUHoBPJCQAVJVfa5nuD1c1wvNyzRjjFQWybuGjWkiurXNqd9JaAtue1Jo8 SLpzBqdQV9fTBvhLxkrhTS6c9n/n/20DrIulpLm/Xttf+B0TFl2eP5h7pFbg2mMD2lKL W6wGfVAeyldJgCbyTu6uLWap5A8I8VNz0nAw74gPL2igTNwhKBC8/LFjH6BGym1A9LE7 KJ7tzI/RnRR/KZk6HSWapvjdNJ3vAuc9G+qZY/MI3x3S4uU/6aQP1K+JrDMnt18GDWlh jQ8w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:precedence:robot-unsubscribe:robot-id :message-id:mime-version:list-unsubscribe:list-subscribe:list-id :precedence:references:in-reply-to:cc:subject:to:reply-to:sender :from:dkim-signature:dkim-signature:date; bh=RIzTXlk0BbMU/gkh1XIZNmB1y05fF1wLb5M1xoUXdBQ=; fh=21bWs/viVmKlE4bjar3tW3pu/YK1ocPtST5xQYmLp/g=; b=tLyx7LBrzw8jxjy5ezL2pOKwVsKAkzuuU5RT1/KB5j3Mppmjv6Kf+y39JJwpASC20I NQXUTqlUtIMbNUFCmB7FlUga//QiEKByrd9qh/D/mtdETAz+gDNMWRV0qicsyWXBnqt6 83nNAG27Q/U9ZuNhBB4YN+elBwNdPzjFyotPSOpaO8s0ICuWtapxedX5WP2na+xda6KY fy9zd0vC/8Cm3vkIjrMY/RZLz51VcnqDE6gvPJIcGFOefklcmIBL+0e6hTX3hVqpCPX3 6PV8lBQbtAs9Ryu0s0LVKthEEkHKs3yCp0NxzY4Kj2Z1Eyt1v0UhTTh6N90lUwBvBCdD CyCQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=pzY6gdMP; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=tGwkKn+u; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-173302-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-173302-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id d62-20020a633641000000b00608f63aee25si13105529pga.46.2024.05.08.06.29.50 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 May 2024 06:29:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-173302-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=pzY6gdMP; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=tGwkKn+u; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-173302-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-173302-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 7A18028856B for ; Wed, 8 May 2024 13:26:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 228BD79B9D; Wed, 8 May 2024 13:26:02 +0000 (UTC) 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" 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 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: 7bit The following commit has been merged into the x86/irq branch of tip: Commit-ID: 6ecc2e7932fe8f132d3b671685f9995785f19e9a Gitweb: https://git.kernel.org/tip/6ecc2e7932fe8f132d3b671685f9995785f19e9a 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@linux.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 int vector) static inline bool is_vector_pending(unsigned int vector) { - unsigned int irr; - - irr = 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); } /*