lkml.org 
[lkml]   [2009]   [Jun]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] asm-generic: hard_irqs: handle NR_IRQS > 256 automatically
Date
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 <vapier@gentoo.org>
---
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 <linux/irq_cpustat.h> /* 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


\
 
 \ /
  Last update: 2009-06-13 16:33    [W:0.054 / U:0.296 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site