linux/arch/ia64
Steven Rostedt 5a5fb7dbe8 preempt-count: force hardirq-count to max of 10
To add a bit in the preempt_count to be set when in NMI context, we
found that some archs did not have enough bits to spare. This is
due to the hardirq_count being a mask that can hold NR_IRQS.

Some archs allow for over 16000 IRQs, and that would require a mask
of 14 bits. The sofitrq mask is 8 bits and the preempt disable mask
is also 8 bits.  The PREEMP_ACTIVE bit is bit 30, and bit 31 would
make the preempt_count (which is type int) a negative number.
A negative preempt_count is a sign of failure.

Add them up 14+8+8+1+1 you get 32 bits. No room for the NMI bit.

But the hardirq_count is to track the number of nested IRQs, not
the number of total IRQs.  This originally took the paranoid approach
of setting the max nesting to NR_IRQS. But when we have archs with
over 1000 IRQs, it is not practical to think they will ever all
nest on a single CPU. Not to mention that this would most definitely
cause a stack overflow.

This patch sets a max of 10 bits to be used for IRQ nesting.
I did a 'git grep HARDIRQ' to examine all users of HARDIRQ_BITS and
HARDIRQ_MASK, and found that making it a max of 10 would not hurt
anyone. I did find that the m68k expected it to be 8 bits, so
I allow for the archs to set the number to be less than 10.

I removed the setting of HARDIRQ_BITS from the archs that set it
to more than 10. This includes ALPHA, ia64 and avr32.

This will always allow room for the NMI bit, and if we need to allow
for NMI nesting, we have 4 bits to play with.

Signed-off-by: Steven Rostedt <srostedt@redhat.com>
2009-02-12 11:19:05 -05:00
..
configs eeprom: More consistent symbol names 2009-01-26 21:19:57 +01:00
dig [IA64] Add Variable Page Size and IA64 Support in Intel IOMMU 2008-10-17 12:14:13 -07:00
hp Documentation: move DMA-mapping.txt to Doc/PCI/ 2009-01-29 18:19:29 -08:00
ia32 [CVE-2009-0029] Remove __attribute__((weak)) from sys_pipe/sys_pipe2 2009-01-14 14:15:15 +01:00
include/asm preempt-count: force hardirq-count to max of 10 2009-02-12 11:19:05 -05:00
kernel Merge branch 'tracing/ftrace'; commit 'v2.6.29-rc2' into tracing/core 2009-01-18 20:15:05 +01:00
kvm KVM: change KVM to use IOMMU API 2009-01-03 14:11:07 +01:00
lib [IA64] Add Variable Page Size and IA64 Support in Intel IOMMU 2008-10-17 12:14:13 -07:00
mm mm: show node to memory section relationship with symlinks in sysfs 2009-01-06 15:59:00 -08:00
oprofile oprofile: more whitespace fixes 2008-10-15 20:55:51 +02:00
pci [IA64] SN specific version of dma_get_required_mask() 2009-01-15 10:42:16 -08:00
scripts ia64/pv_ops: paravirtualized instruction checker. 2008-10-17 10:12:54 -07:00
sn PCI: return error on failure to read PCI ROMs 2009-02-04 16:58:41 -08:00
uv [IA64] Simplify SGI uv vs. sn2 driver issues 2008-11-04 11:29:39 -08:00
xen [IA64] Update to use account_{steal,idle}_ticks 2009-01-15 09:43:24 -08:00
install.sh
Kconfig Merge branch 'tracing/ftrace'; commit 'v2.6.29-rc2' into tracing/core 2009-01-18 20:15:05 +01:00
Kconfig.debug [PATCH] Move Kprobes and Oprofile to "Instrumentation Support" menu 2005-11-07 07:53:35 -08:00
Makefile Pull vtd-iommu into release branch 2008-10-17 13:52:22 -07:00
module.lds