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-prev] [day] [month] [year] [list]
Message-ID: <176102967712.2601451.1941450016815014156.tip-bot2@tip-bot2>
Date: Tue, 21 Oct 2025 06:54:37 -0000
From: "tip-bot2 for Christophe JAILLET" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Christophe JAILLET <christophe.jaillet@...adoo.fr>,
 Ingo Molnar <mingo@...nel.org>, Thomas Gleixner <tglx@...utronix.de>,
 kernel-janitors@...r.kernel.org, x86@...nel.org, linux-kernel@...r.kernel.org
Subject: [tip: x86/apic] x86/ioapic: Simplify mp_irqdomain_alloc() slightly

The following commit has been merged into the x86/apic branch of tip:

Commit-ID:     27d2afa3b4eab5fb2a03b6ad8b74a3a700e92dce
Gitweb:        https://git.kernel.org/tip/27d2afa3b4eab5fb2a03b6ad8b74a3a700e92dce
Author:        Christophe JAILLET <christophe.jaillet@...adoo.fr>
AuthorDate:    Sun, 19 Oct 2025 10:18:20 +02:00
Committer:     Ingo Molnar <mingo@...nel.org>
CommitterDate: Tue, 21 Oct 2025 08:47:33 +02:00

x86/ioapic: Simplify mp_irqdomain_alloc() slightly

The IRQ return value of irq_find_mapping() is only tested
for existence, not used for anything else.

So, this call can be replaced by a slightly simpler
irq_resolve_mapping() call, which reduces generated
code size a bit (x86-64 allmodconfig):

   text	   data	    bss	    dec	    hex	filename
  82142	  38633	  18048	 138823	  21e47	arch/x86/kernel/apic/io_apic.o.before
  81932	  38633	  18048	 138613	  21d75	arch/x86/kernel/apic/io_apic.o.after

[ mingo: Fixed & simplified the changelog ]

Signed-off-by: Christophe JAILLET <christophe.jaillet@...adoo.fr>
Signed-off-by: Ingo Molnar <mingo@...nel.org>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: kernel-janitors@...r.kernel.org
Link: https://patch.msgid.link/cb3a4968538637aac3a5ae4f5ecc4f5eb43376ea.1760861877.git.christophe.jaillet@wanadoo.fr
---
 arch/x86/kernel/apic/io_apic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/x86/kernel/apic/io_apic.c b/arch/x86/kernel/apic/io_apic.c
index 5ba2feb..1e0442e 100644
--- a/arch/x86/kernel/apic/io_apic.c
+++ b/arch/x86/kernel/apic/io_apic.c
@@ -2864,7 +2864,7 @@ int mp_irqdomain_alloc(struct irq_domain *domain, unsigned int virq,
 
 	ioapic = mp_irqdomain_ioapic_idx(domain);
 	pin = info->ioapic.pin;
-	if (irq_find_mapping(domain, (irq_hw_number_t)pin) > 0)
+	if (irq_resolve_mapping(domain, (irq_hw_number_t)pin))
 		return -EEXIST;
 
 	data = kzalloc(sizeof(*data), GFP_KERNEL);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ