Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761589AbZFMObc (ORCPT ); Sat, 13 Jun 2009 10:31:32 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1757145AbZFMObM (ORCPT ); Sat, 13 Jun 2009 10:31:12 -0400 Received: from smtp.gentoo.org ([140.211.166.183]:52804 "EHLO smtp.gentoo.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753629AbZFMObK (ORCPT ); Sat, 13 Jun 2009 10:31:10 -0400 From: Mike Frysinger To: Arnd Bergmann Cc: linux-kernel@vger.kernel.org Subject: [PATCH] asm-generic: hard_irqs: handle NR_IRQS > 256 automatically Date: Sat, 13 Jun 2009 10:30:47 -0400 Message-Id: <1244903447-23579-2-git-send-email-vapier@gentoo.org> X-Mailer: git-send-email 1.6.3.1 In-Reply-To: <1244903447-23579-1-git-send-email-vapier@gentoo.org> References: <1244903447-23579-1-git-send-email-vapier@gentoo.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1025 Lines: 34 If we're going to automatically set HARDIRQ_BITS for the arch, might as well be a little bit smart about it and set it to 9 automatically if NR_IRQS is larger than 8 bits. Signed-off-by: Mike Frysinger --- include/asm-generic/hardirq.h | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/include/asm-generic/hardirq.h b/include/asm-generic/hardirq.h index 3d5d2c9..d93acec 100644 --- a/include/asm-generic/hardirq.h +++ b/include/asm-generic/hardirq.h @@ -12,7 +12,11 @@ typedef struct { #include /* Standard mappings for irq_cpustat_t above */ #ifndef HARDIRQ_BITS -#define HARDIRQ_BITS 8 +# if NR_IRQS > 256 +# define HARDIRQ_BITS 9 +# else +# define HARDIRQ_BITS 8 +# endif #endif /* -- 1.6.3.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/