lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240506175612.1141095-1-jacob.jun.pan@linux.intel.com>
Date: Mon,  6 May 2024 10:56:12 -0700
From: Jacob Pan <jacob.jun.pan@...ux.intel.com>
To: X86 Kernel <x86@...nel.org>,
	LKML <linux-kernel@...r.kernel.org>,
	Thomas Gleixner <tglx@...utronix.de>,
	Dave Hansen <dave.hansen@...el.com>,
	"H. Peter Anvin" <hpa@...or.com>,
	"Ingo Molnar" <mingo@...hat.com>,
	"Borislav Petkov" <bp@...en8.de>
Cc: Jacob Pan <jacob.jun.pan@...ux.intel.com>,
	Imran Khan <imran.f.khan@...cle.com>
Subject: [PATCH] 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 <jacob.jun.pan@...ux.intel.com>
Cc: Imran Khan <imran.f.khan@...cle.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 9122e93b89ea..d7a8ac961af8 100644
--- a/arch/x86/include/asm/apic.h
+++ b/arch/x86/include/asm/apic.h
@@ -505,13 +505,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);
 }
 
 /*
-- 
2.25.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ