Revision 8339f0008c47cdd921c73f6d53d5588b5484f93c authored by Eric W. Biederman on 29 January 2007, 20:19:05 UTC, committed by Linus Torvalds on 30 January 2007, 16:29:58 UTC
When the world was a simple and static place setting up irqs was easy. It sufficed to allocate a linux irq number and a find a free cpu vector we could receive that linux irq on. In those days it was a safe assumption that any allocated vector was actually in use so after one global pass through all of the vectors we would have none left. These days things are much more dynamic with interrupt controllers (in the form of MSI or MSI-X) appearing on plug in cards and linux irqs appearing and disappearing. As these irqs come and go vectors are allocated and freed, invalidating the ancient assumption that all allocated vectors stayed in use forever. So this patch modifies the vector allocator to walk through every possible vector before giving up, and to check to see if a vector is in use before assigning it. With these changes we stop leaking freed vectors and it becomes possible to allocate and free irq vectors all day long. This changed was modeled after the vector allocator on x86_64 where this limitation has already been removed. In essence we don't update the static variables that hold the position of the last vector we allocated until have successfully allocated another vector. This allows us to detect if we have completed one complete scan through all of the possible vectors. Acked-by: Auke Kok <auke-jan.h.kok@intel.com> Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent c9cc8e7
File | Mode | Size |
---|---|---|
8253pit.h | -rw-r--r-- | 129 bytes |
Kbuild | -rw-r--r-- | 404 bytes |
a.out.h | -rw-r--r-- | 813 bytes |
acpi.h | -rw-r--r-- | 4.0 KB |
agp.h | -rw-r--r-- | 1.0 KB |
alternative-asm.i | -rw-r--r-- | 149 bytes |
alternative.h | -rw-r--r-- | 5.2 KB |
apic.h | -rw-r--r-- | 2.7 KB |
apicdef.h | -rw-r--r-- | 9.9 KB |
atomic.h | -rw-r--r-- | 9.7 KB |
auxvec.h | -rw-r--r-- | 68 bytes |
bitops.h | -rw-r--r-- | 10.1 KB |
boot.h | -rw-r--r-- | 409 bytes |
bootsetup.h | -rw-r--r-- | 1.7 KB |
bug.h | -rw-r--r-- | 725 bytes |
bugs.h | -rw-r--r-- | 549 bytes |
byteorder.h | -rw-r--r-- | 726 bytes |
cache.h | -rw-r--r-- | 604 bytes |
cacheflush.h | -rw-r--r-- | 1.3 KB |
calgary.h | -rw-r--r-- | 2.1 KB |
calling.h | -rw-r--r-- | 3.0 KB |
checksum.h | -rw-r--r-- | 5.2 KB |
compat.h | -rw-r--r-- | 4.5 KB |
cpu.h | -rw-r--r-- | 26 bytes |
cpufeature.h | -rw-r--r-- | 6.1 KB |
cputime.h | -rw-r--r-- | 121 bytes |
current.h | -rw-r--r-- | 434 bytes |
debugreg.h | -rw-r--r-- | 2.7 KB |
delay.h | -rw-r--r-- | 852 bytes |
desc.h | -rw-r--r-- | 4.8 KB |
desc_defs.h | -rw-r--r-- | 1.3 KB |
device.h | -rw-r--r-- | 261 bytes |
div64.h | -rw-r--r-- | 31 bytes |
dma-mapping.h | -rw-r--r-- | 6.0 KB |
dma.h | -rw-r--r-- | 9.7 KB |
dmi.h | -rw-r--r-- | 640 bytes |
dwarf2.h | -rw-r--r-- | 1.4 KB |
e820.h | -rw-r--r-- | 1.8 KB |
edac.h | -rw-r--r-- | 422 bytes |
elf.h | -rw-r--r-- | 5.6 KB |
emergency-restart.h | -rw-r--r-- | 151 bytes |
errno.h | -rw-r--r-- | 86 bytes |
fcntl.h | -rw-r--r-- | 31 bytes |
fixmap.h | -rw-r--r-- | 2.7 KB |
floppy.h | -rw-r--r-- | 6.5 KB |
fpu32.h | -rw-r--r-- | 279 bytes |
futex.h | -rw-r--r-- | 2.9 KB |
genapic.h | -rw-r--r-- | 877 bytes |
hardirq.h | -rw-r--r-- | 579 bytes |
hpet.h | -rw-r--r-- | 2.0 KB |
hw_irq.h | -rw-r--r-- | 3.4 KB |
hypertransport.h | -rw-r--r-- | 1.3 KB |
i387.h | -rw-r--r-- | 5.8 KB |
ia32.h | -rw-r--r-- | 3.9 KB |
ia32_unistd.h | -rw-r--r-- | 550 bytes |
ide.h | -rw-r--r-- | 26 bytes |
idle.h | -rw-r--r-- | 287 bytes |
intel_arch_perfmon.h | -rw-r--r-- | 948 bytes |
io.h | -rw-r--r-- | 7.8 KB |
io_apic.h | -rw-r--r-- | 2.7 KB |
ioctl.h | -rw-r--r-- | 31 bytes |
ioctls.h | -rw-r--r-- | 2.7 KB |
ipcbuf.h | -rw-r--r-- | 636 bytes |
ipi.h | -rw-r--r-- | 2.5 KB |
irq.h | -rw-r--r-- | 1.2 KB |
irq_regs.h | -rw-r--r-- | 34 bytes |
irqflags.h | -rw-r--r-- | 2.6 KB |
k8.h | -rw-r--r-- | 298 bytes |
kdebug.h | -rw-r--r-- | 1.3 KB |
kexec.h | -rw-r--r-- | 3.1 KB |
kmap_types.h | -rw-r--r-- | 255 bytes |
kprobes.h | -rw-r--r-- | 2.8 KB |
ldt.h | -rw-r--r-- | 909 bytes |
linkage.h | -rw-r--r-- | 88 bytes |
local.h | -rw-r--r-- | 2.3 KB |
mach_apic.h | -rw-r--r-- | 968 bytes |
mc146818rtc.h | -rw-r--r-- | 639 bytes |
mce.h | -rw-r--r-- | 3.0 KB |
mman.h | -rw-r--r-- | 657 bytes |
mmsegment.h | -rw-r--r-- | 114 bytes |
mmu.h | -rw-r--r-- | 357 bytes |
mmu_context.h | -rw-r--r-- | 1.7 KB |
mmzone.h | -rw-r--r-- | 1.3 KB |
module.h | -rw-r--r-- | 179 bytes |
mpspec.h | -rw-r--r-- | 6.5 KB |
msgbuf.h | -rw-r--r-- | 838 bytes |
msidef.h | -rw-r--r-- | 1.5 KB |
msr.h | -rw-r--r-- | 12.3 KB |
mtrr.h | -rw-r--r-- | 5.1 KB |
mutex.h | -rw-r--r-- | 2.9 KB |
namei.h | -rw-r--r-- | 226 bytes |
nmi.h | -rw-r--r-- | 2.1 KB |
node.h | -rw-r--r-- | 27 bytes |
numa.h | -rw-r--r-- | 808 bytes |
page.h | -rw-r--r-- | 4.4 KB |
param.h | -rw-r--r-- | 460 bytes |
parport.h | -rw-r--r-- | 481 bytes |
pci-direct.h | -rw-r--r-- | 588 bytes |
pci.h | -rw-r--r-- | 4.1 KB |
pda.h | -rw-r--r-- | 3.6 KB |
percpu.h | -rw-r--r-- | 2.1 KB |
pgalloc.h | -rw-r--r-- | 3.3 KB |
pgtable.h | -rw-r--r-- | 15.3 KB |
poll.h | -rw-r--r-- | 545 bytes |
posix_types.h | -rw-r--r-- | 3.2 KB |
prctl.h | -rw-r--r-- | 166 bytes |
processor.h | -rw-r--r-- | 13.3 KB |
proto.h | -rw-r--r-- | 3.5 KB |
ptrace-abi.h | -rw-r--r-- | 1.2 KB |
ptrace.h | -rw-r--r-- | 1.9 KB |
resource.h | -rw-r--r-- | 95 bytes |
rio.h | -rw-r--r-- | 3.0 KB |
rtc.h | -rw-r--r-- | 142 bytes |
rwlock.h | -rw-r--r-- | 758 bytes |
scatterlist.h | -rw-r--r-- | 592 bytes |
seccomp.h | -rw-r--r-- | 587 bytes |
sections.h | -rw-r--r-- | 128 bytes |
segment.h | -rw-r--r-- | 1.2 KB |
semaphore.h | -rw-r--r-- | 5.0 KB |
sembuf.h | -rw-r--r-- | 705 bytes |
serial.h | -rw-r--r-- | 1007 bytes |
setup.h | -rw-r--r-- | 85 bytes |
shmbuf.h | -rw-r--r-- | 1023 bytes |
shmparam.h | -rw-r--r-- | 158 bytes |
sigcontext.h | -rw-r--r-- | 1.2 KB |
sigcontext32.h | -rw-r--r-- | 1.5 KB |
siginfo.h | -rw-r--r-- | 143 bytes |
signal.h | -rw-r--r-- | 3.8 KB |
smp.h | -rw-r--r-- | 2.7 KB |
socket.h | -rw-r--r-- | 1.1 KB |
sockios.h | -rw-r--r-- | 279 bytes |
sparsemem.h | -rw-r--r-- | 678 bytes |
spinlock.h | -rw-r--r-- | 3.7 KB |
spinlock_types.h | -rw-r--r-- | 362 bytes |
stacktrace.h | -rw-r--r-- | 581 bytes |
stat.h | -rw-r--r-- | 904 bytes |
statfs.h | -rw-r--r-- | 900 bytes |
string.h | -rw-r--r-- | 1.4 KB |
suspend.h | -rw-r--r-- | 1.6 KB |
swiotlb.h | -rw-r--r-- | 1.9 KB |
system.h | -rw-r--r-- | 6.4 KB |
tce.h | -rw-r--r-- | 1.7 KB |
termbits.h | -rw-r--r-- | 4.5 KB |
termios.h | -rw-r--r-- | 3.3 KB |
therm_throt.h | -rw-r--r-- | 34 bytes |
thread_info.h | -rw-r--r-- | 5.1 KB |
timex.h | -rw-r--r-- | 1.1 KB |
tlb.h | -rw-r--r-- | 282 bytes |
tlbflush.h | -rw-r--r-- | 3.1 KB |
topology.h | -rw-r--r-- | 1.9 KB |
types.h | -rw-r--r-- | 979 bytes |
uaccess.h | -rw-r--r-- | 11.5 KB |
ucontext.h | -rw-r--r-- | 255 bytes |
unaligned.h | -rw-r--r-- | 1.2 KB |
unistd.h | -rw-r--r-- | 24.9 KB |
unwind.h | -rw-r--r-- | 251 bytes |
user.h | -rw-r--r-- | 4.9 KB |
user32.h | -rw-r--r-- | 2.1 KB |
vga.h | -rw-r--r-- | 379 bytes |
vsyscall.h | -rw-r--r-- | 2.0 KB |
vsyscall32.h | -rw-r--r-- | 670 bytes |
xor.h | -rw-r--r-- | 7.8 KB |
Computing file changes ...