android_kernel_xiaomi_sm8350/arch/ia64/include/asm
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
..
native ia64/pv_ops: paravirtualized instruction checker. 2008-10-17 10:12:54 -07:00
sn ACPI: remove private acpica headers from driver files 2008-12-31 01:15:22 -05:00
uv
xen ia64/pv_ops/xen: define the nubmer of irqs which xen needs. 2008-10-17 10:06:59 -07:00
acpi-ext.h ACPI: remove private acpica headers from driver files 2008-12-31 01:15:22 -05:00
acpi.h
agp.h
asmmacro.h
atomic.h atomic_t: unify all arch definitions 2009-01-06 15:59:10 -08:00
auxvec.h
bitops.h
break.h ia64/xen: reserve "break" numbers used for xen hypercalls. 2008-10-17 09:52:52 -07:00
bug.h
bugs.h
byteorder.h byteorder: make swab.h include asm/swab.h like a regular header 2009-01-14 19:56:50 -08:00
cache.h
cacheflush.h [IA64] Add Variable Page Size and IA64 Support in Intel IOMMU 2008-10-17 12:14:13 -07:00
checksum.h
compat.h
cpu.h
cputime.h
current.h
cyclone.h
delay.h
device.h [IA64] Add Variable Page Size and IA64 Support in Intel IOMMU 2008-10-17 12:14:13 -07:00
div64.h
dma-mapping.h [IA64] SN specific version of dma_get_required_mask() 2009-01-15 10:42:16 -08:00
dma.h
dmi.h
elf.h [PATCH] remove unused ibcs2/PER_SVR4 in SET_PERSONALITY 2008-10-16 15:40:05 +02:00
emergency-restart.h
errno.h
esi.h
fb.h
fcntl.h
fpswa.h
fpu.h
ftrace.h ftrace, ia64: IA64 dynamic ftrace support 2009-01-14 12:11:31 +01:00
futex.h
gcc_intrin.h
hardirq.h preempt-count: force hardirq-count to max of 10 2009-02-12 11:19:05 -05:00
hpsim.h
hugetlb.h
hw_irq.h
ia32.h
ia64regs.h
intel_intrin.h
intrinsics.h [IA64] ia64/pv_ops/pv_cpu_ops: fix _IA64_REG_IP case. 2008-11-20 13:41:20 -08:00
io.h [IA64] remove dead BIO_VMERGE_BOUNDARY definition 2008-11-04 11:31:58 -08:00
ioctl.h
ioctls.h
iommu.h x86/PCI: build failure at x86/kernel/pci-dma.c with !CONFIG_PCI 2008-10-24 11:09:43 -07:00
iosapic.h
ipcbuf.h
irq_regs.h
irq.h ia64: cpumask fix for is_affinity_mask_valid() 2009-01-04 15:39:24 +01:00
Kbuild byteorder: make swab.h include asm/swab.h like a regular header 2009-01-14 19:56:50 -08:00
kdebug.h
kexec.h kexec jump: rename KEXEC_CONTROL_CODE_SIZE to KEXEC_CONTROL_PAGE_SIZE 2008-08-15 08:35:42 -07:00
kmap_types.h
kprobes.h
kregs.h [IA64] Fix annoying IA64_TR_ALLOC_MAX message. 2008-10-17 13:47:53 -07:00
kvm_host.h KVM: change KVM to use IOMMU API 2009-01-03 14:11:07 +01:00
kvm_para.h
kvm.h KVM: ia64: Fix kvm_arch_vcpu_ioctl_[gs]et_regs() 2008-12-31 16:55:47 +02:00
libata-portmap.h
linkage.h
local.h
machvec_dig_vtd.h [IA64] Add Variable Page Size and IA64 Support in Intel IOMMU 2008-10-17 12:14:13 -07:00
machvec_dig.h
machvec_hpsim.h
machvec_hpzx1_swiotlb.h
machvec_hpzx1.h
machvec_init.h [IA64] SN specific version of dma_get_required_mask() 2009-01-15 10:42:16 -08:00
machvec_sn2.h [IA64] SN specific version of dma_get_required_mask() 2009-01-15 10:42:16 -08:00
machvec_uv.h
machvec_xen.h ia64/xen: define xen machine vector for domU. 2008-10-17 10:08:56 -07:00
machvec.h [IA64] SN specific version of dma_get_required_mask() 2009-01-15 10:42:16 -08:00
mc146818rtc.h
mca_asm.h
mca.h
meminit.h [IA64] fix the difference between node_mem_map and node_start_pfn 2008-11-04 11:31:12 -08:00
mman.h
mmu_context.h
mmu.h
mmzone.h
module.h
msgbuf.h
mutex.h
nodedata.h
numa.h
page.h
pal.h
param.h
paravirt_privop.h [IA64] remove BUILD_BUG_ON from paravirt_getreg() 2008-12-09 10:01:26 -08:00
paravirt.h ia64/pv_ops: avoid name conflict of get_irq_chip(). 2008-10-17 09:50:55 -07:00
parport.h
patch.h
pci.h Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6 2008-10-23 08:07:35 -07:00
percpu.h
perfmon_default_smpl.h
perfmon.h
pgalloc.h
pgtable.h
poll.h
posix_types.h
processor.h
ptrace_offsets.h
ptrace.h remove __ARCH_WANT_COMPAT_SYS_PTRACE 2008-11-30 11:00:15 -08:00
pvclock-abi.h ia64/xen: add a necessary header file to compile include/xen/interface/xen.h 2008-10-17 09:57:28 -07:00
resource.h
rse.h
rwsem.h
sal.h [IA64] Add error_recovery_info field to SAL section header 2008-11-04 11:30:43 -08:00
scatterlist.h
sections.h [IA64] Put the space for cpu0 per-cpu area into .data section 2008-09-29 16:39:19 -07:00
segment.h
sembuf.h
serial.h
setup.h
shmbuf.h
shmparam.h
sigcontext.h
siginfo.h signals: demultiplexing SIGTRAP signal 2008-09-23 13:26:52 +02:00
signal.h
smp.h cpumask: centralize cpu_online_map and cpu_possible_map 2008-12-13 21:19:41 +10:30
socket.h
sockios.h
sparsemem.h
spinlock_types.h
spinlock.h
stat.h
statfs.h IA64: Use <asm-generic/statfs.h> 2008-09-04 09:46:13 +01:00
string.h
suspend.h
swab.h ia64: introduce asm/swab.h 2009-01-06 18:10:28 -08:00
swiotlb.h swiotlb: replace architecture-specific swiotlb.h with linux/swiotlb.h 2008-12-28 10:04:00 +01:00
sync_bitops.h ia64/xen: introduce sync bitops which is necessary for ia64/xen support. 2008-10-17 09:53:33 -07:00
syscall.h [IA64] utrace Convert compat ptrace to use compat_sys_ptrace 2008-10-06 10:45:29 -07:00
system.h
termbits.h
termios.h
thread_info.h [IA64] utrace use generic trace hook 2008-10-06 10:43:06 -07:00
timex.h ia64: move function declaration, ia64_cpu_local_tick() from .c to .h 2008-10-17 09:52:08 -07:00
tlb.h
tlbflush.h
topology.h [IA64] fix typo in cpumask_of_pcibus() 2009-01-06 16:19:22 +01:00
types.h
uaccess.h
ucontext.h
unaligned.h
uncached.h
unistd.h [CVE-2009-0029] Remove __attribute__((weak)) from sys_pipe/sys_pipe2 2009-01-14 14:15:15 +01:00
unwind.h
user.h
ustack.h
vga.h
xor.h