* [PATCH] asm-generic: Raise default NR_IRQS when using sparse IRQs
@ 2011-06-29 21:20 Mark Brown
2011-06-30 7:27 ` Thomas Gleixner
0 siblings, 1 reply; 9+ messages in thread
From: Mark Brown @ 2011-06-29 21:20 UTC (permalink / raw)
To: Arnd Bergmann; +Cc: linux-arch, linux-kernel, Mark Brown
Rather than have each platform using sparse IRQs pick a suitably large
NR_IRQS for use with sparse IRQs make the default high when they are
enabled. We pick 64k as there is still a bitmap of IRQs that is
allocated statically, and as we all know 64k should be enough for
anyone.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
include/asm-generic/irq.h | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/include/asm-generic/irq.h b/include/asm-generic/irq.h
index b90ec0b..0d95650 100644
--- a/include/asm-generic/irq.h
+++ b/include/asm-generic/irq.h
@@ -4,11 +4,15 @@
/*
* NR_IRQS is the upper bound of how many interrupts can be handled
* in the platform. It is used to size the static irq_map array,
- * so don't make it too big.
+ * so don't make it too big unless we're using sparse IRQs.
*/
#ifndef NR_IRQS
+#ifdef CONFIG_SPARSE_IRQ
+#define NR_IRQS 0xffff
+#else
#define NR_IRQS 64
#endif
+#endif
static inline int irq_canonicalize(int irq)
{
--
1.7.5.4
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH] asm-generic: Raise default NR_IRQS when using sparse IRQs
2011-06-29 21:20 [PATCH] asm-generic: Raise default NR_IRQS when using sparse IRQs Mark Brown
@ 2011-06-30 7:27 ` Thomas Gleixner
2011-06-30 15:13 ` Mark Brown
0 siblings, 1 reply; 9+ messages in thread
From: Thomas Gleixner @ 2011-06-30 7:27 UTC (permalink / raw)
To: Mark Brown; +Cc: Arnd Bergmann, linux-arch, linux-kernel
On Wed, 29 Jun 2011, Mark Brown wrote:
> Rather than have each platform using sparse IRQs pick a suitably large
> NR_IRQS for use with sparse IRQs make the default high when they are
> enabled. We pick 64k as there is still a bitmap of IRQs that is
> allocated statically, and as we all know 64k should be enough for
> anyone.
The sparse bitmap is overallocated to NR_IRQS + 8k anyway, so that's
rather pointless.
> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
> ---
> include/asm-generic/irq.h | 6 +++++-
> 1 files changed, 5 insertions(+), 1 deletions(-)
>
> diff --git a/include/asm-generic/irq.h b/include/asm-generic/irq.h
> index b90ec0b..0d95650 100644
> --- a/include/asm-generic/irq.h
> +++ b/include/asm-generic/irq.h
> @@ -4,11 +4,15 @@
> /*
> * NR_IRQS is the upper bound of how many interrupts can be handled
> * in the platform. It is used to size the static irq_map array,
> - * so don't make it too big.
> + * so don't make it too big unless we're using sparse IRQs.
> */
> #ifndef NR_IRQS
> +#ifdef CONFIG_SPARSE_IRQ
> +#define NR_IRQS 0xffff
> +#else
> #define NR_IRQS 64
> #endif
> +#endif
>
> static inline int irq_canonicalize(int irq)
> {
> --
> 1.7.5.4
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-arch" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] asm-generic: Raise default NR_IRQS when using sparse IRQs
2011-06-30 7:27 ` Thomas Gleixner
@ 2011-06-30 15:13 ` Mark Brown
0 siblings, 0 replies; 9+ messages in thread
From: Mark Brown @ 2011-06-30 15:13 UTC (permalink / raw)
To: Thomas Gleixner; +Cc: Arnd Bergmann, linux-arch, linux-kernel
On Thu, Jun 30, 2011 at 09:27:20AM +0200, Thomas Gleixner wrote:
> On Wed, 29 Jun 2011, Mark Brown wrote:
> > Rather than have each platform using sparse IRQs pick a suitably large
> > NR_IRQS for use with sparse IRQs make the default high when they are
> > enabled. We pick 64k as there is still a bitmap of IRQs that is
> > allocated statically, and as we all know 64k should be enough for
> > anyone.
> The sparse bitmap is overallocated to NR_IRQS + 8k anyway, so that's
> rather pointless.
Hrm, OK. In that case why are platforms faffing around trying to size
NR_IRQs in the first place?
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] asm-generic: Raise default NR_IRQS when using sparse IRQs
2010-11-29 20:02 ` Pavel Vasilyev
@ 2010-11-29 21:53 ` Mark Brown
0 siblings, 0 replies; 9+ messages in thread
From: Mark Brown @ 2010-11-29 21:53 UTC (permalink / raw)
To: Pavel Vasilyev; +Cc: LKML
On Mon, Nov 29, 2010 at 11:02:53PM +0300, Pavel Vasilyev wrote:
> On 29.11.2010 22:20, Mark Brown wrote:
> > Rather than have each platform using sparse IRQs pick a suitably large
> > NR_IRQS for use with sparse IRQs make the default high when they are
> > enabled. We pick 64k as there is still a bitmap of IRQs that is
> > allocated statically, and as we all know 64k should be enough for
> > anyone.
> May be
> #define NR_IRQS 15*NR_CPUS
No, this is missing the point - that's way too low for many systems
(most except x86 I guess). The idea is that since we're using sparse
IRQs we've much less reason to restrict the number of IRQs than we do
when we've got a statically allocated table so we can have a higher
default, meaning less need for platforms to individually select a higher
number.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] asm-generic: Raise default NR_IRQS when using sparse IRQs
[not found] <fUhqx-3EE-15@gated-at.bofh.it>
@ 2010-11-29 20:02 ` Pavel Vasilyev
2010-11-29 21:53 ` Mark Brown
0 siblings, 1 reply; 9+ messages in thread
From: Pavel Vasilyev @ 2010-11-29 20:02 UTC (permalink / raw)
To: LKML, Mark Brown
On 29.11.2010 22:20, Mark Brown wrote:
> Rather than have each platform using sparse IRQs pick a suitably large
> NR_IRQS for use with sparse IRQs make the default high when they are
> enabled. We pick 64k as there is still a bitmap of IRQs that is
> allocated statically, and as we all know 64k should be enough for
> anyone.
>
> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
> ---
> include/asm-generic/irq.h | 6 +++++-
> 1 files changed, 5 insertions(+), 1 deletions(-)
>
> diff --git a/include/asm-generic/irq.h b/include/asm-generic/irq.h
> index b90ec0b..0d95650 100644
> --- a/include/asm-generic/irq.h
> +++ b/include/asm-generic/irq.h
> @@ -4,11 +4,15 @@
> /*
> * NR_IRQS is the upper bound of how many interrupts can be handled
> * in the platform. It is used to size the static irq_map array,
> - * so don't make it too big.
> + * so don't make it too big unless we're using sparse IRQs.
> */
> #ifndef NR_IRQS
> +#ifdef CONFIG_SPARSE_IRQ
> +#define NR_IRQS 0xffff
> +#else
> #define NR_IRQS 64
> #endif
> +#endif
>
> static inline int irq_canonicalize(int irq)
> {
May be
#define NR_IRQS 15*NR_CPUS
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH] asm-generic: Raise default NR_IRQS when using sparse IRQs
@ 2010-11-29 19:17 Mark Brown
0 siblings, 0 replies; 9+ messages in thread
From: Mark Brown @ 2010-11-29 19:17 UTC (permalink / raw)
To: Arnd Bergmann, Thomas Gleixner; +Cc: linux-kernel, patches, Mark Brown
Rather than have each platform using sparse IRQs pick a suitably large
NR_IRQS for use with sparse IRQs make the default high when they are
enabled. We pick 64k as there is still a bitmap of IRQs that is
allocated statically, and as we all know 64k should be enough for
anyone.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
include/asm-generic/irq.h | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/include/asm-generic/irq.h b/include/asm-generic/irq.h
index b90ec0b..0d95650 100644
--- a/include/asm-generic/irq.h
+++ b/include/asm-generic/irq.h
@@ -4,11 +4,15 @@
/*
* NR_IRQS is the upper bound of how many interrupts can be handled
* in the platform. It is used to size the static irq_map array,
- * so don't make it too big.
+ * so don't make it too big unless we're using sparse IRQs.
*/
#ifndef NR_IRQS
+#ifdef CONFIG_SPARSE_IRQ
+#define NR_IRQS 0xffff
+#else
#define NR_IRQS 64
#endif
+#endif
static inline int irq_canonicalize(int irq)
{
--
1.7.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH] asm-generic: Raise default NR_IRQS when using sparse IRQs
2010-11-24 15:45 ` Thomas Gleixner
@ 2010-11-24 15:56 ` Mark Brown
0 siblings, 0 replies; 9+ messages in thread
From: Mark Brown @ 2010-11-24 15:56 UTC (permalink / raw)
To: Thomas Gleixner; +Cc: Arnd Bergmann, linux-kernel
On Wed, Nov 24, 2010 at 04:45:03PM +0100, Thomas Gleixner wrote:
> Resulting in a 256 MB bitmap. I guess you did not try to boot that on
> some random ARM board :)
Right, I don't actually have any platforms that support sparse IRQs. Ho
hum. I guess something like 16k or 4k IRQs might be more sane.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] asm-generic: Raise default NR_IRQS when using sparse IRQs
2010-11-24 15:39 Mark Brown
@ 2010-11-24 15:45 ` Thomas Gleixner
2010-11-24 15:56 ` Mark Brown
0 siblings, 1 reply; 9+ messages in thread
From: Thomas Gleixner @ 2010-11-24 15:45 UTC (permalink / raw)
To: Mark Brown; +Cc: Arnd Bergmann, linux-kernel
On Wed, 24 Nov 2010, Mark Brown wrote:
> Rather than have each platform using sparse IRQs pick a suitably large
> NR_IRQS for use with sparse IRQs make the default exceptionally high
> when they are enabled.
>
> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
> ---
> include/asm-generic/irq.h | 6 +++++-
> 1 files changed, 5 insertions(+), 1 deletions(-)
>
> diff --git a/include/asm-generic/irq.h b/include/asm-generic/irq.h
> index b90ec0b..a76bea2 100644
> --- a/include/asm-generic/irq.h
> +++ b/include/asm-generic/irq.h
> @@ -4,11 +4,15 @@
> /*
> * NR_IRQS is the upper bound of how many interrupts can be handled
> * in the platform. It is used to size the static irq_map array,
> - * so don't make it too big.
> + * so don't make it too big unless we're using sparse IRQs.
> */
> #ifndef NR_IRQS
> +#ifdef CONFIG_SPARSE_IRQ
> +#define NR_IRQS 0x7fffffff
Resulting in a 256 MB bitmap. I guess you did not try to boot that on
some random ARM board :)
Thanks,
tglx
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH] asm-generic: Raise default NR_IRQS when using sparse IRQs
@ 2010-11-24 15:39 Mark Brown
2010-11-24 15:45 ` Thomas Gleixner
0 siblings, 1 reply; 9+ messages in thread
From: Mark Brown @ 2010-11-24 15:39 UTC (permalink / raw)
To: Arnd Bergmann, Thomas Gleixner; +Cc: linux-kernel, Mark Brown
Rather than have each platform using sparse IRQs pick a suitably large
NR_IRQS for use with sparse IRQs make the default exceptionally high
when they are enabled.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
include/asm-generic/irq.h | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/include/asm-generic/irq.h b/include/asm-generic/irq.h
index b90ec0b..a76bea2 100644
--- a/include/asm-generic/irq.h
+++ b/include/asm-generic/irq.h
@@ -4,11 +4,15 @@
/*
* NR_IRQS is the upper bound of how many interrupts can be handled
* in the platform. It is used to size the static irq_map array,
- * so don't make it too big.
+ * so don't make it too big unless we're using sparse IRQs.
*/
#ifndef NR_IRQS
+#ifdef CONFIG_SPARSE_IRQ
+#define NR_IRQS 0x7fffffff
+#else
#define NR_IRQS 64
#endif
+#endif
static inline int irq_canonicalize(int irq)
{
--
1.7.1
^ permalink raw reply related [flat|nested] 9+ messages in thread
end of thread, other threads:[~2011-06-30 15:13 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-29 21:20 [PATCH] asm-generic: Raise default NR_IRQS when using sparse IRQs Mark Brown
2011-06-30 7:27 ` Thomas Gleixner
2011-06-30 15:13 ` Mark Brown
[not found] <fUhqx-3EE-15@gated-at.bofh.it>
2010-11-29 20:02 ` Pavel Vasilyev
2010-11-29 21:53 ` Mark Brown
-- strict thread matches above, loose matches on Subject: below --
2010-11-29 19:17 Mark Brown
2010-11-24 15:39 Mark Brown
2010-11-24 15:45 ` Thomas Gleixner
2010-11-24 15:56 ` Mark Brown
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.