Skip to contentSkip to conversation

allow NR_IRQS to be larger than 256

RFC PATCH New Eric Miao 3 participants 8 messages Feb 4, 2010 Arm (32-bit)

lore
Share & tools
lore

Eric Miao

author
#0 lore raw

RFC PATCH 1/3 allow NR_IRQS to be larger than 256

commit fc14e7ca387688ca63eafa16d4aa3012898d096d

Author: Eric Miao <[email protected]>
Date:   Mon Dec 28 11:05:55 2009 +0800

[ARM] allow NR_IRQS to be larger than 256

arch/arm/include/asm/hardirq.h +3 -1
index 182310b..6d7485a 100644
@@ -12,7 +12,9 @@ typedef struct {
 
 #include <linux/irq_cpustat.h>	/* Standard mappings for irq_cpustat_t above */
 
-#if NR_IRQS > 256
+#if NR_IRQS > 512
+#define HARDIRQ_BITS	10
+#elif NR_IRQS > 256
 #define HARDIRQ_BITS	9
 #else
 #define HARDIRQ_BITS	8
#1 lore raw

RFC PATCH 1/3 allow NR_IRQS to be larger than 256

Quoted 5 lines · Eric Miao

commit fc14e7ca387688ca63eafa16d4aa3012898d096d

Author: Eric Miao <[email protected]>
Date:   Mon Dec 28 11:05:55 2009 +0800

[ARM] allow NR_IRQS to be larger than 256

Don't you mean 512 ?

Quoted 5 lines
arch/arm/include/asm/hardirq.h +3 -1
-#if NR_IRQS > 256
+#if NR_IRQS > 512
+#define HARDIRQ_BITS	10
+#elif NR_IRQS > 256
 #define HARDIRQ_BITS	9
author
#2 lore raw

RFC PATCH 1/3 allow NR_IRQS to be larger than 256

Quoted 8 lines · Russell King - ARM Linux
Quoted 5 lines · Eric Miao

commit fc14e7ca387688ca63eafa16d4aa3012898d096d
Author: Eric Miao <[email protected]>
Date: ? Mon Dec 28 11:05:55 2009 +0800

? ? [ARM] allow NR_IRQS to be larger than 256

Don't you mean 512 ?

Exactly.

Quoted 7 lines
Quoted 6 lines
arch/arm/include/asm/hardirq.h +3 -1
-#if NR_IRQS > 256
+#if NR_IRQS > 512
+#define HARDIRQ_BITS 10
+#elif NR_IRQS > 256

?#define HARDIRQ_BITS 9

author
#3 lore raw

RFC PATCH 1/3 allow NR_IRQS to be larger than 256

Quoted 7 lines · Eric Miao
Quoted 5 lines · Russell King - ARM Linux
Quoted 4 lines · Eric Miao

commit fc14e7ca387688ca63eafa16d4aa3012898d096d
Author: Eric Miao <[email protected]>
Date: ? Mon Dec 28 11:05:55 2009 +0800

Quoted 6 lines
Quoted 3 lines
Quoted 1 line

? ? [ARM] allow NR_IRQS to be larger than 256

Don't you mean 512 ?

Exactly.

Maybe a subject of "allow .... to be in range of 256 to 512" will be better.

Quoted 8 lines
Quoted 7 lines
Quoted 6 lines
arch/arm/include/asm/hardirq.h +3 -1
-#if NR_IRQS > 256
+#if NR_IRQS > 512
+#define HARDIRQ_BITS 10
+#elif NR_IRQS > 256

?#define HARDIRQ_BITS 9

#4 lore raw

RFC PATCH 1/3 allow NR_IRQS to be larger than 256

Quoted 8 lines · Eric Miao
Quoted 7 lines · Eric Miao
Quoted 5 lines · Russell King - ARM Linux
Quoted 4 lines · Eric Miao

commit fc14e7ca387688ca63eafa16d4aa3012898d096d
Author: Eric Miao <[email protected]>
Date: ? Mon Dec 28 11:05:55 2009 +0800

Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
Quoted 1 line

? ? [ARM] allow NR_IRQS to be larger than 256

Don't you mean 512 ?

Exactly.

Maybe a subject of "allow .... to be in range of 256 to 512" will be better.

Which we already do - with 9 hard irq bits if NR_IRQS is larger than 256.

#5 lore raw

RFC PATCH 1/3 allow NR_IRQS to be larger than 256

In reply to Eric Miao

arch/arm/include/asm/hardirq.h typedef struct { · line 20

Quoted 7 lines · Eric Miao
arch/arm/include/asm/hardirq.h +3 -1
-#if NR_IRQS > 256
+#if NR_IRQS > 512
+#define HARDIRQ_BITS	10
+#elif NR_IRQS > 256
 #define HARDIRQ_BITS	9
 #else
 #define HARDIRQ_BITS	8

Would not it be possible to use

#define HARDIRQ_BITS order_base_2(NR_IRQS)

to remove any limitation?

Signature · 1 line
					    Gilles.
#6 lore raw

RFC PATCH 1/3 allow NR_IRQS to be larger than 256

Quoted 11 lines · Gilles Chanteperdrix

arch/arm/include/asm/hardirq.h typedef struct { · line 20

Quoted 7 lines · Eric Miao
arch/arm/include/asm/hardirq.h +3 -1
-#if NR_IRQS > 256
+#if NR_IRQS > 512
+#define HARDIRQ_BITS	10
+#elif NR_IRQS > 256
 #define HARDIRQ_BITS	9
 #else
 #define HARDIRQ_BITS	8

Would not it be possible to use

Quoted 1 line

#define HARDIRQ_BITS order_base_2(NR_IRQS)

HARDIRQ_BITS must be a preprocessor constant.

author
#7 lore raw

RFC PATCH 1/3 allow NR_IRQS to be larger than 256

Quoted 12 lines · Russell King - ARM Linux
Quoted 11 lines · Gilles Chanteperdrix
Quoted 7 lines · Eric Miao
arch/arm/include/asm/hardirq.h +3 -1
-#if NR_IRQS > 256
+#if NR_IRQS > 512
+#define HARDIRQ_BITS ? ? ? 10
+#elif NR_IRQS > 256

?#define HARDIRQ_BITS ? ? ? 9
?#else
?#define HARDIRQ_BITS ? ? ? 8

Would not it be possible to use

Quoted 4 lines
Quoted 1 line

#define HARDIRQ_BITS order_base_2(NR_IRQS)

HARDIRQ_BITS must be a preprocessor constant.

Confirmed, log_order_2() won't compile.