17 Oct, 2007
2 commits
-
Only very little files use the deprecated SA_* IRQ flags in latest pull. This
patch series removes such macros from the tree and transfrom old code to the
new IRQF_* flags.I've grepped the whole tree to make sure that no more files than the patched
ones use such deprecated macros. I hope this series won't introduce build
errors.Signed-off-by: Ahmed S. Darwish
Cc: Ralf Baechle
Cc: James Bottomley
Cc: Matthew Wilcox
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Provide {enable,disable}_irq_wakeup dummies for undefined
cross-compilers for platforms without CONFIG_GENERIC_IRQ.Needed by wake-up-from-a-serial-port.patch
Signed-off-by: Guennadi Liakhovetski
Cc: Thomas Gleixner
Cc: Ingo Molnar
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
29 Jul, 2007
1 commit
-
Signed-off-by: Al Viro
Acked-by: Jeff Garzik
Signed-off-by: Linus Torvalds
23 Jul, 2007
1 commit
-
Now that the last inlined instances are gone, all that is left to do
is turning disable_irq_nosync on arm26 and m68k from defines to aliases
and we are all set - we can make these externs in linux/interrupt.h
uncoditional and kill remaining instances in asm/irq.hSigned-off-by: Al Viro
Signed-off-by: Linus Torvalds
11 May, 2007
1 commit
-
Some architectures, like powerpc, implement lazy disabling of interrupts.
That means that on those, local_irq_disable() doesn't actually disable
interrupts on the CPU, but only sets some per CPU flag which cause them to be
disabled only if an interrupt actually occurs.However, in some cases, such as stop_machine, we really want interrupts to be
fully disabled. For example, I have code using stop machine to do ECC error
injection, used to verify operations of the ECC hardware, that sort of thing.
It really needs to make sure that nothing is actually writing to memory while
the injection happens. Similar examples can be found in other low level bits
and pieces.This patch implements a generic hard_irq_disable() function which is meant to
be called -after- local_irq_disable() and ensures that interrupts are fully
disabled on that CPU. The default implementation is a nop, though powerpc
does already provide an appropriate one.Signed-off-by: Benjamin Herrenschmidt
Cc: Rusty Russell
Cc: Paul Mackerras
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
09 May, 2007
3 commits
-
irqpoll is broken on some architectures that don't use the IRQ 0 for the timer
interrupt like IA64. This patch adds a IRQF_IRQPOLL flag.Each architecture is handled in a separate pach. As I left the irq == 0 as
condition, this should not break existing architectures that use timer_irq ==
0 and that I did't address with that patch (because I don't know).This patch:
This patch adds a IRQF_IRQPOLL flag that the interrupt registration code could
use for the interrupt it wants to use for IRQ polling.Because this must not be the timer interrupt, an additional flag was added
instead of re-using the IRQF_TIMER constant. Until all architectures will
have an IRQF_IRQPOLL interrupt, irq == 0 will stay as alternative as it should
not break anything.Also, note_interrupt() is called on CPU-specific interrupts to be used as
interrupt source for IRQ polling.Signed-off-by: Bernhard Walle
Cc: Russell King
Cc: Kyle McMartin
Cc: Matthew Wilcox
Cc: Grant Grundler
Cc: Paul Mundt
Cc: "Luck, Tony"
Cc: Ingo Molnar
Cc: Thomas Gleixner
Cc: Alan Cox
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
The deprecation of the SA_xxx interrupt flags did not emit deprecated
warnings. Andrew said about the removal of the deprecated flag defines:> This is going to break a lot of external stuff. We should have found
> a way to make usage of SA_* emit deprecated warnings (or _some_
> warning) to warn people of impending doom. But I can't immediately
> find a way of doing that. if we _can_ find a way of doing this, I
> suspect we'll need to do it, and give people another six months. It's
> going to get ugly out there. We shall see...Define the deprecated flags as a call to a __deprecated inline function
so a warning is emitted on compile time.Extend the reprieve of out of tree drivers to 9/2007.
Signed-off-by: Thomas Gleixner
Acked-by: Ingo Molnar
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
This could help to find buggy drivers where request_irq return value wasn't
checked. There's just no reason to ignore errors which can and do occur.
Anyone who got warning during compilation have to realise what it is't
realy safe code.Signed-off-by: Monakhov Dmitriy
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
05 May, 2007
1 commit
-
Add missing disable/enable irq variant
Signed-off-by: Roman Zippel
Signed-off-by: Geert Uytterhoeven
Signed-off-by: Linus Torvalds
20 Feb, 2007
1 commit
-
powerpc gets:
init/main.c: In function `do_basic_setup':
init/main.c:714: warning: implicit declaration of function `init_irq_proc'but we cannot include linux/irq.h in generic code.
Fix it by moving the declaration into linux/interrupt.h instead.
And make sure all code that defines init_irq_proc() is including
linux/interrupt.h.And nuke an ifdef-in-C
Cc: Thomas Gleixner
Cc: Ingo Molnar
Cc: Benjamin Herrenschmidt
Cc: Paul Mackerras
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
17 Feb, 2007
2 commits
-
Implement high resolution timers on top of the hrtimers infrastructure and the
clockevents / tick-management framework. This provides accurate timers for
all hrtimer subsystem users.Signed-off-by: Thomas Gleixner
Signed-off-by: Ingo Molnar
Cc: john stultz
Cc: Roman Zippel
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Add a flag so we can prevent the irq balancing of an interrupt. Move the
bits, so we have room for more :)Necessary for the ability to setup clocksources more flexible (e.g. use the
different HPET channels per CPU)Signed-off-by: Thomas Gleixner
Signed-off-by: Ingo Molnar
Cc: john stultz
Cc: Roman Zippel
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
10 Feb, 2007
1 commit
-
Implement device resource management, in short, devres. A device
driver can allocate arbirary size of devres data which is associated
with a release function. On driver detach, release function is
invoked on the devres data, then, devres data is freed.devreses are typed by associated release functions. Some devreses are
better represented by single instance of the type while others need
multiple instances sharing the same release function. Both usages are
supported.devreses can be grouped using devres group such that a device driver
can easily release acquired resources halfway through initialization
or selectively release resources (e.g. resources for port 1 out of 4
ports).This patch adds devres core including documentation and the following
managed interfaces.* alloc/free : devm_kzalloc(), devm_kzfree()
* IO region : devm_request_region(), devm_release_region()
* IRQ : devm_request_irq(), devm_free_irq()
* DMA : dmam_alloc_coherent(), dmam_free_coherent(),
dmam_declare_coherent_memory(), dmam_pool_create(),
dmam_pool_destroy()
* PCI : pcim_enable_device(), pcim_pin_device(), pci_is_managed()
* iomap : devm_ioport_map(), devm_ioport_unmap(), devm_ioremap(),
devm_ioremap_nocache(), devm_iounmap(), pcim_iomap_table(),
pcim_iomap(), pcim_iounmap()Signed-off-by: Tejun Heo
Signed-off-by: Jeff Garzik
11 Dec, 2006
1 commit
-
Call rebalance_tick (renamed to run_rebalance_domains) from a newly introduced
softirq.We calculate the earliest time for each layer of sched domains to be rescanned
(this is the rescan time for idle) and use the earliest of those to schedule
the softirq via a new field "next_balance" added to struct rq.Signed-off-by: Christoph Lameter
Cc: Peter Williams
Cc: Nick Piggin
Cc: Christoph Lameter
Cc: "Siddha, Suresh B"
Cc: "Chen, Kenneth W"
Acked-by: Ingo Molnar
Cc: KAMEZAWA Hiroyuki
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
08 Dec, 2006
1 commit
-
With CONFIG_SMP=n:
drivers/input/ff-memless.c:384: warning: implicit declaration of function 'local_bh_disable'
drivers/input/ff-memless.c:393: warning: implicit declaration of function 'local_bh_enable'Really linux/spinlock.h should include linux/interrupt.h. But interrupt.h
includes sched.h which will need spinlock.h.So the patch breaks the _bh declarations out into a separate header and
includes it in both interrupt.h and spinlock.h.Cc: "Randy.Dunlap"
Cc: Andi Kleen
Cc:
Cc: Ingo Molnar
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
05 Oct, 2006
2 commits
-
Maintain a per-CPU global "struct pt_regs *" variable which can be used instead
of passing regs around manually through all ~1800 interrupt handlers in the
Linux kernel.The regs pointer is used in few places, but it potentially costs both stack
space and code to pass it around. On the FRV arch, removing the regs parameter
from all the genirq function results in a 20% speed up of the IRQ exit path
(ie: from leaving timer_interrupt() to leaving do_IRQ()).Where appropriate, an arch may override the generic storage facility and do
something different with the variable. On FRV, for instance, the address is
maintained in GR28 at all times inside the kernel as part of general exception
handling.Having looked over the code, it appears that the parameter may be handed down
through up to twenty or so layers of functions. Consider a USB character
device attached to a USB hub, attached to a USB controller that posts its
interrupts through a cascaded auxiliary interrupt controller. A character
device driver may want to pass regs to the sysrq handler through the input
layer which adds another few layers of parameter passing.I've build this code with allyesconfig for x86_64 and i386. I've runtested the
main part of the code on FRV and i386, though I can't test most of the drivers.
I've also done partial conversion for powerpc and MIPS - these at least compile
with minimal configurations.This will affect all archs. Mostly the changes should be relatively easy.
Take do_IRQ(), store the regs pointer at the beginning, saving the old one:struct pt_regs *old_regs = set_irq_regs(regs);
And put the old one back at the end:
set_irq_regs(old_regs);
Don't pass regs through to generic_handle_irq() or __do_IRQ().
In timer_interrupt(), this sort of change will be necessary:
- update_process_times(user_mode(regs));
- profile_tick(CPU_PROFILING, regs);
+ update_process_times(user_mode(get_irq_regs()));
+ profile_tick(CPU_PROFILING);I'd like to move update_process_times()'s use of get_irq_regs() into itself,
except that i386, alone of the archs, uses something other than user_mode().Some notes on the interrupt handling in the drivers:
(*) input_dev() is now gone entirely. The regs pointer is no longer stored in
the input_dev struct.(*) finish_unlinks() in drivers/usb/host/ohci-q.c needs checking. It does
something different depending on whether it's been supplied with a regs
pointer or not.(*) Various IRQ handler function pointers have been moved to type
irq_handler_t.Signed-Off-By: David Howells
(cherry picked from 1b16e7ac850969f38b375e511e3fa2f474a33867 commit) -
Typedef the IRQ handler function type.
Signed-Off-By: David Howells
(cherry picked from 1356d1e5fd256997e3d3dce0777ab787d0515c7a commit)
30 Sep, 2006
1 commit
-
Introduce the disable_irq_nosync_lockdep_irqsave() and
enable_irq_lockdep_irqrestore() APIs. These are needed for NE2000; basically
NE2000 calls disable_irq and enable_irq as locking against the IRQ handler,
but both in cases where interrupts are on and off. This means that lockdep
needs to track the old state of the virtual irq flags on disable_irq, and
restore these at enable_irq time.Signed-off-by: Arjan van de Ven
Signed-off-by: Ingo Molnar
Cc: Jeff Garzik
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
04 Jul, 2006
3 commits
-
Accurate hard-IRQ-flags and softirq-flags state tracing.
This allows us to attach extra functionality to IRQ flags on/off
events (such as trace-on/off).Signed-off-by: Ingo Molnar
Signed-off-by: Arjan van de Ven
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
Introduce local_irq_enable_in_hardirq() API. It is currently aliased to
local_irq_enable(), hence has no functional effects.This API will be used by lockdep, but even without lockdep this will better
document places in the kernel where a hardirq context enables hardirqs.Signed-off-by: Ingo Molnar
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds -
lockdep wants to use the disable_irq()/enable_irq() prototypes before they are
provied by the platform's asm/irq.h. So move them out of the
CONFIG_GENERIC_HARDIRQS define - all architectures have a common prototype for
this anyway.Add special lockdep variants of irq line disabling/enabling.
These should be used for locking constructs that know that a particular irq
context which is disabled, and which is the only irq-context user of a lock,
that it's safe to take the lock in the irq-disabled section without disabling
hardirqs.[akpm@osdl.org: build fix]
Signed-off-by: Ingo Molnar
Cc: Thomas Gleixner
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
03 Jul, 2006
2 commits
-
The irqflags consolidation converted SA_PERCPU_IRQ to IRQF_PERCPU but
did not define the new constant.Signed-off-by: Thomas Gleixner
Signed-off-by: Linus Torvalds -
The recent interrupt rework introduced bit value conflicts with sparc.
Instead of introducing new architecture flags mess, move the interrupt SA_
flags out of the signal namespace and replace them by interrupt related flags.This allows to remove the obsolete SA_INTERRUPT flag and clean up the bit
field values.This patch:
Move the interrupt related SA_ flags out of linux/signal.h and rename them to
IRQF_ . This moves the interrupt related flags out of the signal namespace
and allows to remove the architecture dependencies.SA_INTERRUPT is not needed by userspace and glibc so it can be removed safely.
The existing SA_ constants are kept for easy transition and will be
removed after a 6 month grace period.Signed-off-by: Thomas Gleixner
Cc: Ingo Molnar
Cc: "David S. Miller"
Cc: Benjamin Herrenschmidt
Cc: "Randy.Dunlap"
Cc: Jaroslav Kysela
Cc: Takashi Iwai
Cc: "Antonino A. Daplas"
Cc: Greg KH
Cc: Russell King
Cc: James Bottomley
Cc: Kyle McMartin
Cc: Jeff Garzik
Cc: Mauro Carvalho Chehab
Cc: Karsten Keil
Cc: Jody McIntyre
Cc: Ben Collins
Cc: Stefan Richter
Cc: Alan Cox
Cc: Bartlomiej Zolnierkiewicz
Cc: Dave Airlie
Cc: Jens Axboe
Cc: Chris Zankel
Cc: Andi Kleen
Cc: Miles Bader
Cc: Jeff Dike
Cc: Paolo 'Blaisorblade' Giarrusso
Cc: Paul Mundt
Cc: Kazumoto Kojima
Cc: Martin Schwidefsky Cc: Heiko Carstens
Cc: Ralf Baechle
Cc: Roman Zippel
Cc: Geert Uytterhoeven
Cc: Greg Ungerer
Cc: "Luck, Tony"
Cc: Yoshinori Sato
Cc: David Howells
Cc: Mikael Starvik
Cc: Russell King
Cc: Ivan Kokshaysky
Cc: Richard Henderson
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
30 Jun, 2006
1 commit
-
Enable platforms to set the irq-wake (power-management) properties of an IRQ.
Signed-off-by: Thomas Gleixner
Signed-off-by: Ingo Molnar
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
23 Jun, 2006
1 commit
-
Correct the return type of handle_IRQ_event() (inconsistency noticed during
Xen development), and remove redundant declarations. The return type
adjustment required breaking out the definition of irqreturn_t into a
separate header, in order to satisfy current include order dependencies.Signed-off-by: Jan Beulich
Cc: Richard Henderson
Cc: Ivan Kokshaysky
Cc: Russell King
Cc: Ian Molton
Cc: Mikael Starvik
Cc: Yoshinori Sato
Cc: Hirokazu Takata
Cc: Heiko Carstens
Cc: Martin Schwidefsky
Cc: William Lee Irwin III
Cc: "David S. Miller"
Cc: Miles Bader
Cc: Geert Uytterhoeven
Cc: Roman Zippel
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
26 Apr, 2006
1 commit
-
Signed-off-by: David Woodhouse
09 Jan, 2006
3 commits
-
This patch moves the SCSI softirq handling to the block layer version.
There should be no functional changes.Signed-off-by: Jens 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
-
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
14 Nov, 2005
1 commit
-
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
Signed-off-by: Roman Zippel
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
13 Sep, 2005
1 commit
-
- Remove unused irqrsp field
- Remove pda->me
- Optimize set_softirq_pending slightlySigned-off-by: Andi Kleen
Signed-off-by: Linus Torvalds
17 Apr, 2005
1 commit
-
Initial git repository build. I'm not bothering with the full history,
even though we have it. We can create a separate "historical" git
archive of that later if we want to, and in the meantime it's about
3.2GB when imported into git - space that would just make the early
git days unnecessarily complicated, when we don't have a lot of good
infrastructure for it.Let it rip!