summaryrefslogtreecommitdiff
path: root/include/linux/interrupt.h
AgeCommit message (Collapse)Author
2006-01-09[SCSI] Kill the SCSI softirq handlingJens Axboe
This patch moves the SCSI softirq handling to the block layer version. There should be no functional changes. Signed-off-by: Jens Axboe <axboe@suse.de>
2006-01-09[BLOCK] ll_rw_blk: Enable out-of-order request completions through softirqJens Axboe
Request completion can be a quite heavy process, since it needs to iterate through the entire request and complete the bio's it holds. This patch adds blk_complete_request() which moves this processing into a dedicated block softirq. Signed-off-by: Jens Axboe <axboe@suse.de>
2006-01-08[PATCH] remove semicolons from save_flags()Andrew Morton
Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-11-13[PATCH] m68k: thread_info header cleanupAl Viro
a) in smp_lock.h #include of sched.h and spinlock.h moved under #ifdef CONFIG_LOCK_KERNEL. b) interrupt.h now explicitly pulls sched.h (not via smp_lock.h from hardirq.h as it used to) c) in three more places we need changes to compensate for (a) - one place in arch/sparc needs string.h now, hardirq.h needs forward declaration of task_struct and preempt.h needs direct include of thread_info.h. d) thread_info-related helpers in sched.h and thread_info.h put under ifndef __HAVE_THREAD_FUNCTIONS. Obviously safe. Signed-off-by: Al Viro <viro@parcelfarce.linux.theplanet.co.uk> Signed-off-by: Roman Zippel <zippel@linux-m68k.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-12[PATCH] x86-64: Some cleanup and optimization to the processor data area.Andi Kleen
- Remove unused irqrsp field - Remove pda->me - Optimize set_softirq_pending slightly Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-01-10[PATCH] warn about cli, sti & co uses even on UPChristoph Hellwig
These don't exist on SMP at all, at least warn on compiling for UP. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-01-07[PATCH] remove the BKL by turning it into a semaphoreIngo Molnar
This is the current remove-BKL patch. I test-booted it on x86 and x64, trying every conceivable combination of SMP, PREEMPT and PREEMPT_BKL. All other architectures should compile as well. (most of the testing was done with the zaphod patch undone but it applies cleanly on vanilla -mm3 as well and should work fine.) this is the debugging-enabled variant of the patch which has two main debugging features: - debug potentially illegal smp_processor_id() use. Has caught a number of real bugs - e.g. look at the printk.c fix in the patch. - make it possible to enable/disable the BKL via a .config. If this goes upstream we dont want this of course, but for now it gives people a chance to find out whether any particular problem was caused by this patch. This patch has one important fix over the previous BKL patch: on PREEMPT kernels if we preempted BKL-using code then the code still auto-dropped the BKL by mistake. This caused a number of breakages for testers, which breakages went away once this bug was fixed. Also the debugging mechanism has been improved alot relative to the previous BKL patch. Would be nice to test-drive this in -mm. There will likely be some more smp_processor_id() false positives but they are 1) harmless 2) easy to fix up. We could as well find more real smp_processor_id() related breakages as well. The most noteworthy fact is that no BKL-using code was found yet that relied on smp_processor_id(), which is promising from a compatibility POV. Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2004-10-27[PATCH] remove invoke_softirqChristoph Hellwig
This was used by the early irqstacks implementation on s390 and has been replaced by __ARCH_HAS_DO_SOFTIRQ now. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2004-10-21[PATCH] ppc: Disable IRQ probe on ppcBenjamin Herrenschmidt
The current "generic" implementation of IRQ probing isn't well suited for ppc in it's current form, and causes issues with yenta_socket (and possibly others) on pmac laptops. We didn't have a probe implementation in the past, we probably don't need one anyway, so for now, the fix is to make this optional and enable it on x86 and x86_64 but not ppc and ppc64 (the 4 archs to use the generic IRQ code). Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2004-10-18[PATCH] generic irq subsystem: coreIngo Molnar
The main goal of this patch is to consolidate all the different but still fundamentally similar arch/*/kernel/irq.c code into the kernel/irq/ subsystem. There are 4 new files in the kernel/irq/ directory: - handle.c: core bits: __do_IRQ() and handle_IRQ_event(), callable from arch-specific irq.c code. - manage.c: the main driver apis - spurious.c: the handling of buggy interrupt sources. - autoprobe.c: probing of interrupts - older code but still in use. - proc.c: /proc/irq/ code. - internals.h for irq-core-internal interfaces not visible to drivers nor arch PIC code. An architecture enables the generic hardirq code by defining CONFIG_GENERIC_HARDIRQS in its arch Kconfig. People doing this conversion should check out the x86/x64/ppc/ppc64 patches for details - the conversion is quite straightforward but every converted function (i.e. every function removed from the arch irq.c) _must_ be matched to the generic version and if there is any detail that the generic code should do it has to be added to the generic code. All of the currently converted 4 architectures were converted like that, and the generic code was extended/fixed along the way. Other changes related to this patchset: - clean up the irq include files (linux/irq.h, linux/interrupt.h, linux/hardirq.h) and consolidate asm-*/[hard]irq.h. Note, to keep all non-touched architectures in an untouched state this consolidation is done carefully and strictly under CONFIG_GENERIC_HARDIRQS. Once the consolidation is done we can do a couple of final cleanups to reach the following logical splitup of 3 include files: linux/interrupt.h: driver-visible APIs and details linux/irq.h: core irq and arch-PIC code, internals asm-*/irq.h: arch PIC and irq delivery details the following include files will likely vanish: linux/hardirq.h merges into linux/irq.h asm-*/hardirq.h: merges into asm-*/irq.h asm-*/hw_irq.h: merges into asm-*/irq.h Christoph would like to do these once the current wave of cleanups gets in. Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2004-09-07[PATCH] factor out common <asm/hardirq.h> codeChristoph Hellwig
Since the irq handling rework in 2.5 lots of code in the individual <asm/hardirq.h> files is the same. This patch moves that common code to <linux/hardirq.h>. The following differences existed: - alpha, m68k, m68knommu and v850 were missing the ~PREEMPT_ACTIVE masking in the CONFIG_PREEMPT case of in_atomic(). These architectures don't support CONFIG_PREEMPT else this would have been an easily-spottbale bug - S390 didn't provide synchronize_irq as it doesn't fit into their I/O model. They now get a spurious prototype/macro - ppc added a new preemptible() macro that is provided for all architectures now. Most drivers were using <linux/interrupt.h> as they should, but a few drivers and lots of architecture code has been updated to use <linux/hardirq.h> instead of <asm/hardirq.h> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2004-06-23[PATCH] make irqaction use a cpu maskAndrew Morton
From: William Lee Irwin III <wli@holomorphy.com> The following patch makes irqaction's ->mask a cpumask as it was intended to be and wraps up the rest of the sweep. Only struct irqaction is usefully greppable, so there may be some assignments to ->mask missing still. This removes more code than it adds. From: William Lee Irwin III <wli@holomorphy.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2004-03-18[PATCH] Hotplug CPUs: Read Copy Update ChangesRusty Russell
Add hook for RCU to handle jobs on dead cpu. Requires new tasklet_kill_immediate for RCU to clean up its tasklet (which might have been about to run, so tasklet_kill won't work).
2003-09-09[PATCH] interrupt.h needs kernel.hMatthew Wilcox
<linux/interrupt.h> uses barrier() but does not include <linux/kernel.h>.
2003-07-02[PATCH] Remove cpu arg from cpu_raise_irqRusty Russell
The function cpu_raise_softirq() takes a softirq number, and a cpu number, but cannot be used with cpu != smp_processor_id(), because there's no locking around the pending softirq lists. Since noone does this, remove that arg. As per Linus' suggestion, names changed: raise_softirq(int nr) cpu_raise_softirq(int cpu, int nr) -> raise_softirq_irqoff(int nr) __cpu_raise_softirq(int cpu, int nr) -> __raise_softirq_irqoff(int nr)
2003-05-22[TIMERS]: No more SMP_TIMER_* users, kill it.David S. Miller
2003-04-25s/#if/#ifdef/ for a few CONFIG_SMP tests in public headersJeff Garzik
Headers touched: linux/interrupt.h, linux/sched.h, linux/timer.h
2003-04-20Allow gcc to generate better code for irq handling.Linus Torvalds
Ok, now that most drivers have been converted to the new irqreturn_t, we can remove the fascist type-checks and just use a regular integer type which has a simpler calling convention.
2003-04-20Interrupt handlers should return whether the interruptLinus Torvalds
was for them or not, so that the irq subsystem can properly handle screaming shared interrupts. So change the irq handlers to return a "irqretval_t", which is either IRQ_HANDLED or IRQ_NONE.
2003-04-13[PATCH] s390: base s390 fixes.Martin Schwidefsky
s390 fixes: - Initialize timing related variables first and then enable the timer interrupt. - Normalize nano seconds to micro seconds in do_gettimeofday. - Add types for __kernel_timer_t and __kernel_clockid_t. - Fix ugly bug in switch_to: set prev to the return value of resume, otherwise prev still contains the previous process at the time resume was called and not the previous process at the time resume returned. They differ... - Add missing include to get the kernel compiled. - Get a closer match with the i386 termios.h file. - Cope with INITIAL_JIFFIES. - Define cpu_relax to do a cpu yield on VM and LPAR. - Don't reenable interrupts in program check handler. - Add pte_file definitions. - Fix PT_IEEE_IP special case in ptrace. - Use compare and swap to release the lock in _raw_spin_unlock. - Introduce invoke_softirq to switch to async. interrupt stack.
2003-03-30[SOFTIRQ]: interrupt.h needs preempt.hDavid S. Miller
2003-03-30[SOFTIRQ]: Move softirq implementation to common area, add debug check.David S. Miller
1) Every arch implemented local_bh_foo identically, move to linux/interrupt.h 2) Kill all asm/softirq.h references 3) Kill asm/softirq.h itself 4) Move local_bh_disable() out of line to kernel/softirq.c 5) Add BUG check on irqs_disabled() to local_bh_disable()
2002-11-21[PATCH] Add back in <asm/system.h> and <linux/linkage.h> to <linux/interrupt.h>Tom Rini
linux/interrupt.h needs: asm/system.h: smb_mb() linux/linkage.h: asmlinkage/FASTCALL/etc.
2002-11-16[PATCH] Run timers as softirqs, not taskletsMatthew Wilcox
The timer code is attempting to replicate the softirq characteristics at the tasklet level, which is a little pointless. This patch converts timers to be a first-class softirq citizen.
2002-11-15[PATCH] Move request_irq & free_irq to interrupt.hMatthew Wilcox
It really makes no sense to have request_irq and free_irq in sched.h Let's move them to interrupt.h instead. Note that I also remove sched.h from interrupt.h since it's not needed.
2002-09-28[PATCH] smptimers, old BH removal, tq-cleanupIngo Molnar
This is the smptimers patch plus the removal of old BHs and a rewrite of task-queue handling. Basically with the removal of TIMER_BH i think the time is right to get rid of old BHs forever, and to do a massive cleanup of all related fields. The following five basic 'execution context' abstractions are supported by the kernel: - hardirq - softirq - tasklet - keventd-driven task-queues - process contexts I've done the following cleanups/simplifications to task-queues: - removed the ability to define your own task-queue, what can be done is to schedule_task() a given task to keventd, and to flush all pending tasks. This is actually a quite easy transition, since 90% of all task-queue users in the kernel used BH_IMMEDIATE - which is very similar in functionality to keventd. I believe task-queues should not be removed from the kernel altogether. It's true that they were written as a candidate replacement for BHs originally, but they do make sense in a different way: it's perhaps the easiest interface to do deferred processing from IRQ context, in performance-uncritical code areas. They are easier to use than tasklets. code that cares about performance should convert to tasklets - as the timer code and the serial subsystem has done already. For extreme performance softirqs should be used - the net subsystem does this. and we can do this for 2.6 - there are only a couple of areas left after fixing all the BH_IMMEDIATE places. i have moved all the taskqueue handling code into kernel/context.c, and only kept the basic 'queue a task' definitions in include/linux/tqueue.h. I've converted three of the most commonly used BH_IMMEDIATE users: tty_io.c, floppy.c and random.c. [random.c might need more thought though.] i've also cleaned up kernel/timer.c over that of the stock smptimers patch: privatized the timer-vec definitions (nothing needs it, init_timer() used it mistakenly) and cleaned up the code. Plus i've moved some code around that does not belong into timer.c, and within timer.c i've organized data and functions along functionality and further separated the base timer code from the NTP bits. net_bh_lock: i have removed it, since it would synchronize to nothing. The old protocol handlers should still run on UP, and on SMP the kernel prints a warning upon use. Alexey, is this approach fine with you? scalable timers: i've further improved the patch ported to 2.5 by wli and Dipankar. There is only one pending issue i can see, the question of whether to migrate timers in mod_timer() or not. I'm quite convinced that they should be migrated, but i might be wrong. It's a 10 lines change to switch between migrating and non-migrating timers, we can do performance tests later on. The current, more complex migration code is pretty fast and has been stable under extremely high networking loads in the past 2 years, so we can immediately switch to the simpler variant if someone proves it improves performance. (I'd say if non-migrating timers improve Apache performance on one of the bigger NUMA boxes then the point is proven, no further though will be needed.)
2002-08-27[PATCH] Patch to irq compat stuff in 2.5.32Pete Zaitcev
This came up in 2.5.30, apparently someone was fooled by names which do not quite match actual functions.
2002-07-21Ingo Molnar's update to remove irqlock (documentation and fixingLinus Torvalds
a number of drivers)
2002-07-01[PATCH] softscsi patchMatthew Wilcox
Doug Gilbert and James Bottomley hassled me all through KernelSummit & OLS to explain about softirqs, tasklets and bottom halves. In the end, it was easier to write the code myself. Thanks to James for pointing out that the pointer handling in my original code was completely broken and helping me debug. I've booted this patch on a 4-way system at OSDL with two Adaptec SCSI cards. I haven't tried stressing it (not quite sure which discs I can use ;-), and I don't understand the locking in the scsi subsystem at all. The main effect of applying this patch is that scsi_softirq() [was scsi_tasklet_func, and before that scsi_bottom_half_handler()] can now be run on multiple CPUs at the same time. We _seem_ to do enough locking elsewhere in the SCSI stack that this is safe. But someone who really understands the SCSI stack should audit this. This work shows up a hole in the current softirq API -- there's no support for unregistering a softirq (close_softirq or similar). We should do this in scsi_exit -- make sure no softirqs are running while we unload. This probably isn't a problem in practice, but it'd be nice to fix it.
2002-06-19[PATCH] Convert cm206 to a taskletMatthew Wilcox
Removes CM206_BH (patch approved by maintainer). Deletes the no-longer-used BH entries from the enum. Explicit numbers added so as not to destroy binary compatibility needlessly.
2002-05-20[PATCH] Tasklet cleanupRusty Russell
This makes tasklet_vec and tasklet_hi_vec static inside softirq.c, and makes them __per_cpu_data.
2002-04-15[PATCH] #include <asm/bitops.h> -> #include <linux/bitops.h>Hirofumi Ogawa
We have to include linux/bitops.h for arch using generic_xxx(). The following patch changes <asm/bitops.h> of include/linux/* to <linux/bitops.h>.
2002-02-04v2.5.1.3 -> v2.5.1.4Linus Torvalds
- Jens Axboe: more bio updates, fix some request list bogosity under load - Al Viro: export seq_xxx functions - Manfred Spraul: include file cleanups, pc110pad compile fix - David Woodhouse: fix JFFS2 write error handling - Dave Jones: start merging up with 2.4.x patches - Manfred Spraul: coredump fixes, FS event counter cleanups - me: fix SCSI CD-ROM sectorsize BIO breakage
2002-02-04v2.4.9.5 -> v2.4.9.6Linus Torvalds
- Jens Axboe: remove trivially dead io_request_lock usage - Andrea Arcangeli: softirq cleanup and ARM fixes. Slab cleanups - Christoph Hellwig: gendisk handling helper functions/cleanups - Nikita Danilov: reiserfs dead code pruning - Anton Altaparmakov: NTFS update to 1.1.18 - firestream network driver: patch reverted on authors request - NIIBE Yutaka: SH architecture update - Paul Mackerras: PPC cleanups, PPC8xx update. - me: reverse broken bootdata allocation patch that went into pre5
2002-02-04v2.4.7.1 -> v2.4.7.2Linus Torvalds
- Kai Germaschewski: ISDN updates - David Miller: sparc and network updates - Andrea Arcangeli, Maksim Krasnyanskiy: tasklet fixes - Stelian Pop: Motion Eye camera driver update - Jens Axboe: DAC960 update
2002-02-04v2.4.6.4 -> v2.4.6.5Linus Torvalds
- remember to bump the version string - Andrea Arkangeli: softirq cleanups and fixes, and everybody is happy again (ie I changed some details to make me happy ;) - Neil Brown: raid5 stall fix, nfsd filehandle sanity check fix
2002-02-04v2.4.5.1 -> v2.4.5.2Linus Torvalds
- Takanori Kawano: brlock indexing bugfix - Ingo Molnar, Jeff Garzik: softirq updates and fixes - Al Viro: rampage of superblock cleanups. - Jean Tourrilhes: Orinoco driver update v6, IrNET update - Trond Myklebust: NFS brown-paper-bag thing - Tim Waugh: parport update - David Miller: networking and sparc updates - Jes Sorensen: m68k update. - Ben Fennema: UDF update - Geert Uytterhoeven: fbdev logo updates - Willem Riede: osst driver updates - Paul Mackerras: PPC update - Marcelo Tosatti: unlazy swap cache - Mikulas Patocka: hpfs update
2002-02-04v2.4.5 -> v2.4.5.1Linus Torvalds
- Andreas Dilger: make ext2fs react more gracefully to inode disk errors - Andrea Arkangeli: fix up alpha compile issues - Ingo Molnar: io-apic MP table parsing update and softirq latency update - Johannes Erdfelt: USB updates - Richard Henderson: alpha rawhide irq handling fixes - Marcelo, Andrea, Rik: more VM issues - Al Viro: fix various ext2 directory handling checks by biting the bullet and using the page cache.
2002-02-04v2.4.1.2 -> v2.4.1.3Linus Torvalds
- Jens: better ordering of requests when unable to merge - Neil Brown: make md work as a module again (we cannot autodetect in modules, not enough background information) - Neil Brown: raid5 SMP locking cleanups - Neil Brown: nfsd: handle Irix NFS clients named pipe behavior and dentry leak fix - maestro3 shutdown fix - fix dcache hash calculation that could cause bad hashes under certain circumstances (Dean Gaudet) - David Miller: networking and sparc updates - Jeff Garzik: include file cleanups - Andy Grover: ACPI update - Coda-fs error return fixes - rth: alpha Jensen update
2002-02-04Import changesetLinus Torvalds