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: <496AD895.10701@kernel.org>
Date:	Sun, 11 Jan 2009 21:43:49 -0800
From:	Yinghai Lu <yinghai@...nel.org>
To:	Ingo Molnar <mingo@...e.hu>, Mike Travis <travis@....com>
CC:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: [PATCH] x86: use nr_cpus in max_nr_irqs()


Impact: get more small nr_irqs

Signed-off-by: Yinghai Lu <yinghai@...nel.org>

---
 arch/x86/include/asm/apicdef.h     |    7 +------
 arch/x86/include/asm/irq_vectors.h |    4 ++--
 2 files changed, 3 insertions(+), 8 deletions(-)

Index: linux-2.6/arch/x86/include/asm/irq_vectors.h
===================================================================
--- linux-2.6.orig/arch/x86/include/asm/irq_vectors.h
+++ linux-2.6/arch/x86/include/asm/irq_vectors.h
@@ -122,8 +122,8 @@
 
 /* defined as a macro so nr_irqs = max_nr_irqs(nr_cpu_ids) can be used */
 # define max_nr_irqs(nr_cpus)				\
-	((8 * nr_cpus) > (32 * MAX_IO_APICS) ?		\
-		(NR_VECTORS + (8 * NR_CPUS)) :		\
+	((8 * (nr_cpus)) > (32 * MAX_IO_APICS) ?		\
+		(NR_VECTORS + (8 * (nr_cpus)) :		\
 		(NR_VECTORS + (32 * MAX_IO_APICS)))	\
 
 # define NR_IRQS max_nr_irqs(NR_CPUS)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ