irq changes for v2.6.39
Subsystems (7)
Linus,
Please pull the latest irq-core-for-linus git tree from:
git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip.git irq-core-for-linus
Thanks,
Ingo
------------------>
Ben Hutchings (1):
genirq: Add IRQ affinity notifiers
David Daney (1):
genirq: Call bus_lock/unlock functions in setup_irq()
Henrik Kretzschmar (5):
x86: Move ioapic_irq_destination_types to apicdef.h
x86: Add dummy mp_save_irq()
x86: Rework arch_disable_smp_support() for x86
x86: Add dummy functions for compiling without IOAPIC
x86: Fix deps of X86_UP_IOAPIC
Jan Beulich (2):
x86: Eliminate pointless adjustment attempts in fixup_irqs()
genirq: Streamline kernel/irq/Kconfig
Thomas Gleixner (109):
genirq: Fix affinity notifier fallout
genirq: Add IRQF_FORCE_RESUME
softirq: Avoid stack switch from ksoftirqd
genirq: Remove dead code
genirq: Prevent access beyond allocated_irqs bitmap
genirq: Disable the SHIRQ_DEBUG call in request_threaded_irq for now
genirq: Make nr_irqs runtime expandable
genirq: Add missing buslock to set_irq_type(), set_irq_wake()
genirq: Namespace cleanup
genirq: Simplify affinity related code
genirq: Rremove redundant check
genirq: Always apply cpu online mask
genirq: Do not copy affinity before set
genirq: Remove redundant thread affinity setting
genirq: Plug race in report_bad_irq()
genirq: Warn when handler enables interrupts
genirq: Fixup poll handling
genirq: Do not poll disabled, percpu and timer interrupts
genirq: spurious: Run only one poller at a time
genirq: Mark polled irqs and defer the real handler
genirq: Move irq thread flags to core
genirq: Remove bogus conditional
genirq: Consolidate startup/shutdown of interrupts
genirq: Consolidate disable/enable
genirq: Remove default magic
genirq: Consolidate IRQ_DISABLED
genirq: Do not fiddle with IRQ_MASKED in handle_edge_irq()
genirq: Implement handle_irq_event()
genirq: Use handle_irq_event() in handle_simple_irq()
genirq: Use handle_irq_event() in handle_level_irq()
genirq: Use handle_irq_event() in handle_fasteoi_irq()
genirq: Use handle_irq_event() in handle_edge_irq()
genirq: Use handle_perpcu_event() in handle_percpu_irq()
genirq: Use handle_irq_event() in the spurious poll code
genirq: Simplify handle_irq_event()
genirq: Implement generic irq_show_interrupts()
genirq: Fixup core code namespace fallout
genirq: Add internal state field to irq_desc
genirq: Protect tglx from tripping over his own feet
genirq: Move IRQ_AUTODETECT to internal state
genirq: Move IRQ_SPURIOUS_DISABLED to core state
genirq: Use modify_status for set_irq_nested_thread
genirq: Move IRQ_POLL_INPROGRESS to core
genirq: Add IRQ_INPROGRESS to core
genirq: Move IRQ_ONESHOT to core
genirq: Move IRQ_REPLAY and IRQ_WAITING to core
genirq: Move IRQ_DISABLED to core
genirq: Move IRQ_PENDING flag to core
genirq: Move IRQ_MASKED to core
genirq: Move IRQ_SUSPENDED to core
genirq: Move IRQ_WAKEUP to core
genirq: Add state field to irq_data
genirq: Add IRQ_MOVE_PENDING to irq_data.state
genirq: Remove CONFIG_IRQ_PER_CPU
genirq: Make CHECK_IRQ_PER_CPU an inline and deprecate it
genirq: Remove CHECK_IRQ_PER_CPU from core code
genirq: Move debug code to separate header
genirq: Mirror IRQ_PER_CPU and IRQ_NO_BALANCING in irq_data.state
genirq: Reuse existing can set affinty check
genirq: Move IRQ_AFFINITY_SET to core
genirq: Mirror irq trigger type bits in irq_data.state
genirq: Wrap the remaning IRQ_* flags
genirq: Force wrapped access to desc->status in core code
genirq: Cleanup irq.h
genirq: Add flags to irq_chip
genirq: Add IRQCHIP_SET_TYPE_MASKED flag
genirq: Move wakeup state to irq_data
genirq: Reflect IRQ_MOVE_PCNTXT in irq_data state
genirq: Remove desc->status when GENERIC_HARDIRQS_NO_COMPAT=y
genirq: Remove real old transition functions
genirq: Implement irq_get/put_desc_[bus]locked/unlock()
genirq: Use irq_get/put functions
genirq: Consolidate set_chip_handler functions
genirq: Add preflow handler support
genirq; Add fasteoi irq_chip quirk
genirq: Implement irq_data based move_*_irq() versions
genirq: Fix misplaced status update in irq_disable()
genirq: Add missing break in __irq_set_trigger()
genirq: Use the correct variable for note_interrupt
x86: ioapic: Remove silly debug bloat in setup_IOAPIC_irqs()
x86: ioapic: Split out the nested loop in setup_IO_APIC_irqs()
x86: ioapic: Add io_apic_setup_irq_pin()
x86: ioapic: Use new setup function in pre_init_apic_IRQ0()
x86: ioapic: Use setup function in __io_apic_set_pci_routing()
x86: ioapic: Use setup function in __io_apic_setup_irqs()
x86: ioapic: Use setup function in setup_IO_APIC_irq_extra()
x86: ioapic: Make a few functions static
x86: ioapic: Remove useless inlines
x86: ioapic: Implement and use io_apic_setup_irq_pin_once()
x86: ioapic: Move trigger defines to io_apic.h
genirq: Make warning in handle_percpu_event useful
genirq: Prepare the handling of shared oneshot interrupts
genirq: Allow shared oneshot interrupts
genirq: Add IRQF_NO_THREAD
sched: Switch wait_task_inactive to schedule_hrtimeout()
genirq: Provide forced interrupt threading
genirq: Fixup fasteoi handler for oneshot mode
genirq: Add comments to Kconfig switches
genirq: Add desc->irq_data accessor
genirq: Add chip flag to force mask on suspend
x86: Cleanup the genirq name space
x86: ioapic: Simplify irq chip and handler setup
x86: ioapic: Use irq_data->state
x86: Use the proper accessors in fixup_irqs()
x86: ioapic: Use new move_irq functions
x86: ioapic: Avoid redundant lookup of irq_cfg
x86: Use generic show_interrupts
x86: Mark low level interrupts IRQF_NO_THREAD
x86: Enable forced interrupt threading support
Yinghai Lu (1):
genirq: Use IRQ_BITMAP_BITS as search size in irq_alloc_descs()
Documentation/kernel-parameters.txt | 4 + arch/x86/Kconfig | 4 +- arch/x86/include/asm/apicdef.h | 12 + arch/x86/include/asm/io_apic.h | 44 ++- arch/x86/kernel/apic/apic.c | 5 +- arch/x86/kernel/apic/io_apic.c | 388 +++++++++------------ arch/x86/kernel/hpet.c | 2 +- arch/x86/kernel/i8259.c | 2 +- arch/x86/kernel/irq.c | 82 +---- arch/x86/kernel/irqinit.c | 4 +- arch/x86/kernel/smpboot.c | 11 +- arch/x86/lguest/boot.c | 4 +- arch/x86/pci/xen.c | 8 +- arch/x86/platform/uv/uv_irq.c | 4 +- arch/x86/platform/visws/visws_quirks.c | 4 +- include/linux/interrupt.h | 78 +++- include/linux/irq.h | 368 ++++++++++++++++---- include/linux/irqdesc.h | 78 ++++- kernel/irq/Kconfig | 39 ++- kernel/irq/autoprobe.c | 54 ++-- kernel/irq/chip.c | 483 +++++++++++--------------- kernel/irq/compat.h | 72 ++++ kernel/irq/debug.h | 40 +++ kernel/irq/handle.c | 144 ++++++-- kernel/irq/internals.h | 173 +++++++--- kernel/irq/irqdesc.c | 79 +++-- kernel/irq/manage.c | 604 ++++++++++++++++++++++---------- kernel/irq/migration.c | 38 ++- kernel/irq/pm.c | 30 ++- kernel/irq/proc.c | 70 ++++- kernel/irq/resend.c | 19 +- kernel/irq/settings.h | 138 ++++++++ kernel/irq/spurious.c | 163 ++++++--- kernel/sched.c | 5 +- kernel/softirq.c | 21 +- 35 files changed, 2144 insertions(+), 1130 deletions(-) create mode 100644 kernel/irq/compat.h create mode 100644 kernel/irq/debug.h create mode 100644 kernel/irq/settings.h
Documentation/kernel-parameters.txt +4 -0
@@ -2444,6 +2444,10 @@ bytes respectively. Such letter suffixes can also be entirely omitted. <deci-seconds>: poll all this frequency 0: no polling (default) + threadirqs [KNL] + Force threading of all interrupt handlers except those + marked explicitely IRQF_NO_THREAD. + topology= [S390] Format: {off | on} Specify if the kernel should make use of the cpu
arch/x86/Kconfig +3 -1
@@ -66,6 +66,8 @@ config X86 select HAVE_SPARSE_IRQ select GENERIC_IRQ_PROBE select GENERIC_PENDING_IRQ if SMP + select GENERIC_IRQ_SHOW + select IRQ_FORCED_THREADING select USE_GENERIC_SMP_HELPERS if SMP config INSTRUCTION_DECODER
@@ -811,7 +813,7 @@ config X86_LOCAL_APIC config X86_IO_APIC def_bool y - depends on X86_64 || SMP || X86_32_NON_STANDARD || X86_UP_APIC + depends on X86_64 || SMP || X86_32_NON_STANDARD || X86_UP_IOAPIC config X86_VISWS_APIC def_bool y
arch/x86/include/asm/apicdef.h +12 -0
@@ -426,4 +426,16 @@ struct local_apic {#else #define BAD_APICID 0xFFFFu#endif + +enum ioapic_irq_destination_types { + dest_Fixed =0 , + dest_LowestPrio =1 , + dest_SMI =2 , + dest__reserved_1 =3 , + dest_NMI =4 , + dest_INIT =5 , + dest__reserved_2 =6 , + dest_ExtINT =7 +}; +#endif /* _ASM_X86_APICDEF_H */
arch/x86/include/asm/io_apic.h +28 -16
80 lines not on this page · raw message
arch/x86/kernel/apic/apic.c +3 -2
@@ -43,6 +43,7 @@#include <asm/i8259.h> #include <asm/proto.h> #include <asm/apic.h> +#include <asm/io_apic.h> #include <asm/desc.h> #include <asm/hpet.h> #include <asm/idle.h>
@@ -1209,7 +1210,7 @@ void __cpuinit setup_local_APIC(void)rdtscll (tsc);if (disable_apic) { -arch_disable_smp_support (); +disable_ioapic_support ();return ; }
@@ -1448,7 +1449,7 @@ int __init enable_IR(void)void __init enable_IR_x2apic (void ) {unsigned long flags; -struct IO_APIC_route_entry **ioapic_entries =NULL ; +struct IO_APIC_route_entry **ioapic_entries;int ret, x2apic_enabled =0 ;int dmar_table_init_ret;
arch/x86/kernel/apic/io_apic.c +169 -219
712 lines not on this page · raw message
arch/x86/kernel/hpet.c +1 -1
@@ -503,7 +503,7 @@ static int hpet_assign_irq(struct hpet_dev *dev)if (!irq)return -EINVAL ; -set_irq_data (irq, dev); +irq_set_handler_data (irq, dev);if (hpet_setup_msi_irq (irq))return -EINVAL ;
arch/x86/kernel/i8259.c +1 -1
@@ -112,7 +112,7 @@ static void make_8259A_irq(unsigned int irq) {disable_irq_nosync (irq); io_apic_irqs &= ~(1 <<irq); -set_irq_chip_and_handler_name (irq, &i8259A_chip, handle_level_irq, +irq_set_chip_and_handler_name (irq, &i8259A_chip, handle_level_irq, i8259A_chip.name);enable_irq (irq); }
arch/x86/kernel/irq.c +16 -66
126 lines not on this page · raw message
arch/x86/kernel/irqinit.c +3 -1
@@ -71,6 +71,7 @@ static irqreturn_t math_error_irq(int cpl, void *dev_id)static struct irqaction fpu_irq = { .handler = math_error_irq, .name ="fpu" , + .flags =IRQF_NO_THREAD , };#endif
@@ -80,6 +81,7 @@ static struct irqaction fpu_irq = {static struct irqaction irq2 = { .handler = no_action, .name ="cascade" , + .flags =IRQF_NO_THREAD , }; DEFINE_PER_CPU(vector_irq_t, vector_irq) = {
@@ -110,7 +112,7 @@ void __init init_ISA_irqs(void) legacy_pic->init (0 );for (i =0 ; i < legacy_pic->nr_legacy_irqs; i++) -set_irq_chip_and_handler_name (i, chip, handle_level_irq, name); +irq_set_chip_and_handler_name (i, chip, handle_level_irq, name); }void __init init_IRQ (void )
arch/x86/kernel/smpboot.c +10 -1
@@ -64,6 +64,7 @@#include <asm/mtrr.h> #include <asm/mwait.h> #include <asm/apic.h> +#include <asm/io_apic.h> #include <asm/setup.h> #include <asm/uv/uv.h> #include <linux/mc146818rtc.h>
@@ -945,6 +946,14 @@ int __cpuinit native_cpu_up(unsigned int cpu)return 0 ; } +/** +* arch_disable_smp_support() - disables SMP support for x86 at runtime +*/ +void arch_disable_smp_support (void ) +{ +disable_ioapic_support (); +} +/* * Fall back to non SMP mode after errors. *
@@ -1045,7 +1054,7 @@ static int __init smp_sanity_check(unsigned max_cpus) "(tell your hw vendor)\n"); }smpboot_clear_io_apic (); -arch_disable_smp_support (); +disable_ioapic_support ();return -1 ; }
arch/x86/lguest/boot.c +2 -2
@@ -847,7 +847,7 @@ static void __init lguest_init_IRQ(void)void lguest_setup_irq (unsigned int irq) {irq_alloc_desc_at (irq,0 ); -set_irq_chip_and_handler_name (irq, &lguest_irq_controller, +irq_set_chip_and_handler_name (irq, &lguest_irq_controller, handle_level_irq,"level" ); }
@@ -995,7 +995,7 @@ static void lguest_time_irq(unsigned int irq, struct irq_desc *desc)static void lguest_time_init (void ) {/* Set up the timer interrupt (0) to go to our simple timer routine */ -set_irq_handler (0 , lguest_time_irq); +irq_set_handler (0 , lguest_time_irq);clocksource_register (&lguest_clock);
arch/x86/pci/xen.c +4 -4
@@ -104,7 +104,7 @@ static int xen_hvm_setup_msi_irqs(struct pci_dev *dev, int nvec, int type) "msi-x" : "msi", &irq, &pirq, XEN_ALLOC_IRQ);if (irq <0 ) goto error; - ret =set_irq_msi (irq, msidesc); + ret =irq_set_msi_desc (irq, msidesc);if (ret <0 ) goto error_while; printk(KERN_DEBUG "xen: msi already setup: msi --> irq=%d"
@@ -117,7 +117,7 @@ static int xen_hvm_setup_msi_irqs(struct pci_dev *dev, int nvec, int type) goto error;printk (KERN_DEBUG "xen: msi --> irq=%d, pirq=%d\n" , irq, pirq);xen_msi_compose_msg (dev, pirq, &msg); - ret =set_irq_msi (irq, msidesc); + ret =irq_set_msi_desc (irq, msidesc);if (ret <0 ) goto error_while;write_msi_msg (irq, &msg);
@@ -165,7 +165,7 @@ static int xen_setup_msi_irqs(struct pci_dev *dev, int nvec, int type) goto free; } - ret =set_irq_msi (irq, msidesc); + ret =irq_set_msi_desc (irq, msidesc);if (ret) goto error_while; i++;
@@ -210,7 +210,7 @@ static int xen_initdom_setup_msi_irqs(struct pci_dev *dev, int nvec, int type)if (irq <0 )return -1 ; - ret =set_irq_msi (irq, msidesc); + ret =irq_set_msi_desc (irq, msidesc);if (ret) goto error; }
arch/x86/platform/uv/uv_irq.c +2 -2
@@ -131,7 +131,7 @@ arch_enable_uv_irq(char *irq_name, unsigned int irq, int cpu, int mmr_blade, unsigned long mmr_offset, int limit) {const struct cpumask *eligible_cpu =cpumask_of (cpu); -struct irq_cfg *cfg =get_irq_chip_data (irq); +struct irq_cfg *cfg =irq_get_chip_data (irq);unsigned long mmr_value;struct uv_IO_APIC_route_entry *entry;int mmr_pnode, err;
@@ -148,7 +148,7 @@ arch_enable_uv_irq(char *irq_name, unsigned int irq, int cpu, int mmr_blade,else irq_set_status_flags (irq,IRQ_MOVE_PCNTXT ); -set_irq_chip_and_handler_name (irq, &uv_irq_chip, handle_percpu_irq, +irq_set_chip_and_handler_name (irq, &uv_irq_chip, handle_percpu_irq, irq_name); mmr_value =0 ;
arch/x86/platform/visws/visws_quirks.c +3 -1
@@ -569,11 +569,13 @@ out_unlock:static struct irqaction master_action = { .handler = piix4_master_intr, .name ="PIIX4-8259" , + .flags =IRQF_NO_THREAD , };static struct irqaction cascade_action = { .handler = no_action, .name ="cascade" , + .flags =IRQF_NO_THREAD , };static inline void set_piix4_virtual_irq_type (void )
@@ -606,7 +608,7 @@ static void __init visws_pre_intr_init(void) chip = &cobalt_irq_type;if (chip) -set_irq_chip (i, chip); +irq_set_chip (i, chip); }setup_irq (CO_IRQ_8259 , &master_action);
include/linux/interrupt.h +58 -20
146 lines not on this page · raw message
include/linux/irq.h +298 -70
509 lines not on this page · raw message
include/linux/irqdesc.h +73 -5
145 lines not on this page · raw message
kernel/irq/Kconfig +29 -10
@@ -1,5 +1,6 @@ +# Select this to activate the generic irq options below config HAVE_GENERIC_HARDIRQS - def_bool n + bool if HAVE_GENERIC_HARDIRQS menu "IRQ subsystem"
@@ -11,26 +12,44 @@ config GENERIC_HARDIRQS # Select this to disable the deprecated stuff config GENERIC_HARDIRQS_NO_DEPRECATED - def_bool n + bool + +config GENERIC_HARDIRQS_NO_COMPAT + bool # Options selectable by the architecture code + +# Make sparse irq Kconfig switch below available config HAVE_SPARSE_IRQ - def_bool n + bool +# Enable the generic irq autoprobe mechanism config GENERIC_IRQ_PROBE - def_bool n + bool + +# Use the generic /proc/interrupts implementation +config GENERIC_IRQ_SHOW + bool +# Support for delayed migration from interrupt context config GENERIC_PENDING_IRQ - def_bool n + bool +# Alpha specific irq affinity mechanism config AUTO_IRQ_AFFINITY - def_bool n - -config IRQ_PER_CPU - def_bool n + bool +# Tasklet based software resend for pending interrupts on enable_irq() config HARDIRQS_SW_RESEND - def_bool n + bool + +# Preflow handler support for fasteoi (sparc64) +config IRQ_PREFLOW_FASTEOI + bool + +# Support forced irq threading +config IRQ_FORCED_THREADING + bool config SPARSE_IRQ bool "Support sparse irq numbering"
kernel/irq/autoprobe.c +22 -32
119 lines not on this page · raw message
kernel/irq/chip.c +199 -284
769 lines not on this page · raw message
kernel/irq/compat.h new file +72 -0
72 lines not on this page · raw message
kernel/irq/debug.h new file +40 -0
@@ -0,0 +1,40 @@ +/* +* Debugging printout: +*/ + +#include <linux/kallsyms.h> + +#define P (f) if (desc->status & f) printk("%14s set\n", #f) +#define PS (f) if (desc->istate & f) printk("%14s set\n", #f) + +static inline void print_irq_desc (unsigned int irq,struct irq_desc *desc) +{ +printk ("irq %d, desc: %p, depth: %d, count: %d, unhandled: %d\n" , + irq, desc, desc->depth, desc->irq_count, desc->irqs_unhandled); +printk ("->handle_irq(): %p, " , desc->handle_irq); +print_symbol ("%s\n" , (unsigned long )desc->handle_irq); +printk ("->irq_data.chip(): %p, " , desc->irq_data.chip); +print_symbol ("%s\n" , (unsigned long )desc->irq_data.chip); +printk ("->action(): %p\n" , desc->action); +if (desc->action) { +printk ("->action->handler(): %p, " , desc->action->handler); +print_symbol ("%s\n" , (unsigned long )desc->action->handler); + } + +P (IRQ_LEVEL ); +P (IRQ_PER_CPU ); +P (IRQ_NOPROBE ); +P (IRQ_NOREQUEST ); +P (IRQ_NOAUTOEN ); + +PS (IRQS_AUTODETECT ); +PS (IRQS_INPROGRESS ); +PS (IRQS_REPLAY ); +PS (IRQS_WAITING ); +PS (IRQS_DISABLED ); +PS (IRQS_PENDING ); +PS (IRQS_MASKED ); +} + +#undef P +#undef PS
kernel/irq/handle.c +113 -31
5 lines not on this page · raw message
kernel/irq/internals.h +127 -46
173 lines not on this page · raw message
kernel/irq/irqdesc.c +55 -24
79 lines not on this page · raw message
kernel/irq/manage.c +413 -191
604 lines not on this page · raw message
kernel/irq/proc.c +66 -4
70 lines not on this page · raw message
kernel/irq/settings.h new file +138 -0
138 lines not on this page · raw message
kernel/irq/spurious.c +104 -59
163 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.