tip related: radix tree for spareseirq and logical flat clean up
Subsystems (51)
cover tip related: radix tree for spareseirq and logical flat clean up
---------spareirq radix tree related ---------------- 94007e8: irq: remove not need bootmem code 4b0d3fa: radix: move radix init early
56af1a9: sparseirq: change irq_desc_ptrs to static
b236235: sparseirq: use radix_tree instead of ptrs array 5918787: x86: remove arch_probe_nr_irqs
so could reduce nr_irqs limitation for bunch ixgbe...
---------------x86 logical flat related -----------
f5954c4: use nr_cpus= to set nr_cpu_ids early
7b8d6a9: x86: use num_processors for possible cpus
d79d1de: x86: make 32bit apic flat to physflat switch like 64bit
Thanks
Yinghai
PATCH 1/8 irq: remove not need bootmem code
mem_init is moved early already.
--- kernel/irq/handle.c | 14 +++----------- 1 files changed, 3 insertions(+), 11 deletions(-)
kernel/irq/handle.c +3 -11
@@ -19,7 +19,6 @@#include <linux/kernel_stat.h> #include <linux/rculist.h> #include <linux/hash.h> -#include <linux/bootmem.h> #include <trace/events/irq.h> #include "internals.h"
@@ -87,12 +86,8 @@ void __ref init_kstat_irqs(struct irq_desc *desc, int node, int nr) {void *ptr; -if (slab_is_available ()) - ptr =kzalloc_node (nr *sizeof (*desc->kstat_irqs), -GFP_ATOMIC , node); -else - ptr =alloc_bootmem_node (NODE_DATA (node), - nr *sizeof (*desc->kstat_irqs)); + ptr =kzalloc_node (nr *sizeof (*desc->kstat_irqs), +GFP_ATOMIC , node);/* * don't overwite if can not get new one
@@ -219,10 +214,7 @@ struct irq_desc * __ref irq_to_desc_alloc_node(unsigned int irq, int node)if (desc) goto out_unlock; -if (slab_is_available ()) - desc =kzalloc_node (sizeof (*desc),GFP_ATOMIC , node); -else - desc =alloc_bootmem_node (NODE_DATA (node),sizeof (*desc)); + desc =kzalloc_node (sizeof (*desc),GFP_ATOMIC , node);printk (KERN_DEBUG " alloc irq_desc for %d on node %d\n" , irq, node);if (!desc) {
Signature · 1 line
1.6.4.2
PATCH 2/8 radix: move radix init early
In reply to Yinghai Luprepare to use it in early_irq_init()
--- init/main.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
init/main.c +1 -1
@@ -584,6 +584,7 @@ asmlinkage void __init start_kernel(void)local_irq_disable (); }rcu_init (); +radix_tree_init ();/* init some links before init_ISA_irqs() */ early_irq_init ();init_IRQ ();
@@ -657,7 +658,6 @@ asmlinkage void __init start_kernel(void)proc_caches_init ();buffer_init ();key_init (); -radix_tree_init ();security_init ();vfs_caches_init (totalram_pages);signals_init ();
Signature · 1 line
1.6.4.2
PATCH 3/8 sparseirq: change irq_desc_ptrs to static
In reply to Yinghai Luadd replace_irq_desc()
-v2: remove unneeded boundary check in replace_irq_desc
--- kernel/irq/handle.c | 7 ++++++- kernel/irq/internals.h | 6 +----- kernel/irq/numa_migrate.c | 4 ++-- 3 files changed, 9 insertions(+), 8 deletions(-)
kernel/irq/handle.c +6 -1
@@ -127,7 +127,7 @@ static void init_one_irq_desc(int irq, struct irq_desc *desc, int node)*/ DEFINE_RAW_SPINLOCK (sparse_irq_lock); -struct irq_desc **irq_desc_ptrs__read_mostly ; +static struct irq_desc **irq_desc_ptrs__read_mostly ; static struct irq_desc irq_desc_legacy[NR_IRQS_LEGACY] __cacheline_aligned_in_smp = { [0 ...NR_IRQS_LEGACY -1 ] = {
@@ -192,6 +192,11 @@ struct irq_desc *irq_to_desc(unsigned int irq)return NULL ; } +void replace_irq_desc (unsigned int irq,struct irq_desc *desc) +{ + irq_desc_ptrs[irq] = desc; +} +struct irq_desc *__ref irq_to_desc_alloc_node (unsigned int irq,int node) {struct irq_desc *desc;
kernel/irq/internals.h +1 -5
@@ -21,11 +21,7 @@ extern void clear_kstat_irqs(struct irq_desc *desc);extern raw_spinlock_t sparse_irq_lock;#ifdef CONFIG_SPARSE_IRQ -/* irq_desc_ptrs allocated at boot time */ -extern struct irq_desc **irq_desc_ptrs; -#else -/* irq_desc_ptrs is a fixed size array */ -extern struct irq_desc *irq_desc_ptrs[NR_IRQS ]; +void replace_irq_desc (unsigned int irq,struct irq_desc *desc);#endif #ifdef CONFIG_PROC_FS
kernel/irq/numa_migrate.c +2 -2
@@ -70,7 +70,7 @@ static struct irq_desc *__real_move_irq_desc(struct irq_desc *old_desc,raw_spin_lock_irqsave (&sparse_irq_lock, flags);/* We have to check it to avoid races with another CPU */ - desc = irq_desc_ptrs[irq]; + desc =irq_to_desc (irq);if (desc && old_desc != desc) goto out_unlock;
@@ -90,7 +90,7 @@ static struct irq_desc *__real_move_irq_desc(struct irq_desc *old_desc, goto out_unlock; } - irq_desc_ptrs[irq] = desc; +replace_irq_desc (irq, desc);raw_spin_unlock_irqrestore (&sparse_irq_lock, flags);/* free the old one */
Signature · 1 line
1.6.4.2
PATCH 4/8 sparseirq: use radix_tree instead of ptrs array
In reply to Yinghai Luuse radix_tree irq_desc_tree instead of irq_desc_ptrs.
-v2: according to Eric and cyrill to use radix_tree_lookup_slot and radix_tree_replace_slot
--- kernel/irq/handle.c | 49 +++++++++++++++++++++++++------------------------ 1 files changed, 25 insertions(+), 24 deletions(-)
kernel/irq/handle.c +25 -24
@@ -19,6 +19,7 @@#include <linux/kernel_stat.h> #include <linux/rculist.h> #include <linux/hash.h> +#include <linux/radix-tree.h> #include <trace/events/irq.h> #include "internals.h"
@@ -127,7 +128,26 @@ static void init_one_irq_desc(int irq, struct irq_desc *desc, int node)*/ DEFINE_RAW_SPINLOCK (sparse_irq_lock); -static struct irq_desc **irq_desc_ptrs__read_mostly ; +static RADIX_TREE(irq_desc_tree, GFP_ATOMIC); + +static void set_irq_desc (unsigned int irq,struct irq_desc *desc) +{ +radix_tree_insert (&irq_desc_tree, irq, desc); +} + +struct irq_desc *irq_to_desc (unsigned int irq) +{ +return radix_tree_lookup (&irq_desc_tree, irq); +} + +void replace_irq_desc (unsigned int irq,struct irq_desc *desc) +{ +void **ptr; + + ptr =radix_tree_lookup_slot (&irq_desc_tree, irq); +if (ptr) +radix_tree_replace_slot (ptr, desc); +} static struct irq_desc irq_desc_legacy[NR_IRQS_LEGACY] __cacheline_aligned_in_smp = { [0 ...NR_IRQS_LEGACY -1 ] = {
@@ -159,9 +179,6 @@ int __init early_irq_init(void) legacy_count =ARRAY_SIZE (irq_desc_legacy); node = first_online_node; -/* allocate irq_desc_ptrs array based on nr_irqs */ - irq_desc_ptrs =kcalloc (nr_irqs,sizeof (void *),GFP_NOWAIT ); -/* allocate based on nr_cpu_ids */ kstat_irqs_legacy =kzalloc_node (NR_IRQS_LEGACY * nr_cpu_ids *sizeof (int ),GFP_NOWAIT , node);
@@ -175,28 +192,12 @@ int __init early_irq_init(void)lockdep_set_class (&desc[i].lock, &irq_desc_lock_class);alloc_desc_masks (&desc[i], node, true);init_desc_masks (&desc[i]); - irq_desc_ptrs[i] = desc + i; +set_irq_desc (i, &desc[i]); } -for (i = legacy_count; i < nr_irqs; i++) - irq_desc_ptrs[i] =NULL ; -return arch_early_irq_init (); } -struct irq_desc *irq_to_desc (unsigned int irq) -{ -if (irq_desc_ptrs && irq < nr_irqs) -return irq_desc_ptrs[irq]; - -return NULL ; -} - -void replace_irq_desc (unsigned int irq,struct irq_desc *desc) -{ - irq_desc_ptrs[irq] = desc; -} -struct irq_desc *__ref irq_to_desc_alloc_node (unsigned int irq,int node) {struct irq_desc *desc;
@@ -208,14 +209,14 @@ struct irq_desc * __ref irq_to_desc_alloc_node(unsigned int irq, int node)return NULL ; } - desc = irq_desc_ptrs[irq]; + desc =irq_to_desc (irq);if (desc)return desc;raw_spin_lock_irqsave (&sparse_irq_lock, flags);/* We have to check it to avoid races with another CPU */ - desc = irq_desc_ptrs[irq]; + desc =irq_to_desc (irq);if (desc) goto out_unlock;
@@ -228,7 +229,7 @@ struct irq_desc * __ref irq_to_desc_alloc_node(unsigned int irq, int node) }init_one_irq_desc (irq, desc, node); - irq_desc_ptrs[irq] = desc; +set_irq_desc (irq, desc); out_unlock:raw_spin_unlock_irqrestore (&sparse_irq_lock, flags);
Signature · 1 line
1.6.4.2
PATCH 5/8 x86: remove arch_probe_nr_irqs
In reply to Yinghai Luso keep nr_irqs == NR_IRQS
--- arch/x86/kernel/apic/io_apic.c | 22 ---------------------- 1 files changed, 0 insertions(+), 22 deletions(-)
arch/x86/kernel/apic/io_apic.c +0 -22
@@ -3878,28 +3878,6 @@ void __init probe_nr_irqs_gsi(void)printk (KERN_DEBUG "nr_irqs_gsi: %d\n" , nr_irqs_gsi); } -#ifdef CONFIG_SPARSE_IRQ -int __init arch_probe_nr_irqs (void ) -{ -int nr; - -if (nr_irqs > (NR_VECTORS * nr_cpu_ids)) - nr_irqs =NR_VECTORS * nr_cpu_ids; - - nr = nr_irqs_gsi +8 * nr_cpu_ids; -#if defined(CONFIG_PCI_MSI ) || defined(CONFIG_HT_IRQ ) -/* -* for MSI and HT dyn irq -*/ - nr += nr_irqs_gsi *64 ; -#endif -if (nr < nr_irqs) - nr_irqs = nr; - -return 0 ; -} -#endif -static int __io_apic_set_pci_routing (struct device *dev,int irq,struct io_apic_irq_attr *irq_attr) {
Signature · 1 line
1.6.4.2
PATCH 6/8 use nr_cpus= to set nr_cpu_ids early
In reply to Yinghai Luon x86, before prefill_possible_map(), nr_cpu_ids will be NR_CPUS aka CONFIG_NR_CPUS
add nr_cpus= to set nr_cpu_ids. so we can simulate cpus <=8 are installed on normal config.
-v2: accordging to Christoph, acpi_numa_init should use nr_cpu_ids in stead of
NR_CPUS.
-v3: add doc in kernel-parameters.txt according to Andrew.
--- Documentation/kernel-parameters.txt | 6 ++++++ arch/ia64/kernel/acpi.c | 4 ++-- arch/x86/kernel/smpboot.c | 7 ++++--- drivers/acpi/numa.c | 4 ++-- init/main.c | 14 ++++++++++++++ 5 files changed, 28 insertions(+), 7 deletions(-)
Documentation/kernel-parameters.txt +6 -0
@@ -1775,6 +1775,12 @@ and is between 256 and 4096 characters. It is defined in the file purges which is reported from either PAL_VM_SUMMARY or SAL PALO. + nr_cpus= [SMP] Maximum number of processors that an SMP kernel + could support. nr_cpus=n : n >= 1 limits the kernel to + supporting 'n' processors. Later in runtime you can not + use hotplug cpu feature to put more cpu back to online. + just like you compile the kernel NR_CPUS=n + nr_uarts= [SERIAL] maximum number of UARTs to be registered. numa_zonelist_order= [KNL, BOOT] Select zonelist order for NUMA.
arch/ia64/kernel/acpi.c +2 -2
@@ -881,8 +881,8 @@ __init void prefill_possible_map(void) possible = available_cpus + additional_cpus; -if (possible >NR_CPUS ) - possible =NR_CPUS ; +if (possible > nr_cpu_ids) + possible = nr_cpu_ids;printk (KERN_INFO "SMP: Allowing %d CPUs, %d hotplug CPUs\n" , possible,max ((possible - available_cpus),0 ));
arch/x86/kernel/smpboot.c +4 -3
@@ -1215,11 +1215,12 @@ __init void prefill_possible_map(void) total_cpus =max_t (int, possible, num_processors + disabled_cpus); -if (possible >CONFIG_NR_CPUS ) { +/* nr_cpu_ids could be reduced via nr_cpus= */ +if (possible > nr_cpu_ids) {printk (KERN_WARNING "%d Processors exceeds NR_CPUS limit of %d\n" , - possible,CONFIG_NR_CPUS ); - possible =CONFIG_NR_CPUS ; + possible, nr_cpu_ids); + possible = nr_cpu_ids; } printk(KERN_INFO "SMP: Allowing %d CPUs, %d hotplug CPUs\n",
drivers/acpi/numa.c +2 -2
@@ -279,9 +279,9 @@ int __init acpi_numa_init(void)/* SRAT: Static Resource Affinity Table */ if (!acpi_table_parse (ACPI_SIG_SRAT , acpi_parse_srat)) {acpi_table_parse_srat (ACPI_SRAT_TYPE_X2APIC_CPU_AFFINITY , - acpi_parse_x2apic_affinity,NR_CPUS ); + acpi_parse_x2apic_affinity, nr_cpu_ids);acpi_table_parse_srat (ACPI_SRAT_TYPE_CPU_AFFINITY , - acpi_parse_processor_affinity,NR_CPUS ); + acpi_parse_processor_affinity, nr_cpu_ids); ret =acpi_table_parse_srat (ACPI_SRAT_TYPE_MEMORY_AFFINITY , acpi_parse_memory_affinity,NR_NODE_MEMBLKS );
init/main.c +14 -0
@@ -149,6 +149,20 @@ static int __init nosmp(char *str)early_param ("nosmp" , nosmp); +/* this is hard limit */ +static int __init nrcpus (char *str) +{ +int nr_cpus; + +get_option (&str, &nr_cpus); +if (nr_cpus >0 && nr_cpus < nr_cpu_ids) + nr_cpu_ids = nr_cpus; + +return 0 ; +} + +early_param ("nr_cpus" , nrcpus); +static int __init maxcpus (char *str) {get_option (&str, &setup_max_cpus);
Signature · 1 line
1.6.4.2
PATCH 7/8 x86: use num_processors for possible cpus
In reply to Yinghai Lusome systems that have disable cpus entries because same
BIOS will support 2 sockets and 4 sockets and more at same time, BIOS just leave some disable entries, but those system do not support cpu hotplug. we don't need treat disabled_cpus as hotplug cpus.
so we can make nr_cpu_ids smaller and save more space
(pcpu data allocations), and could make some systems run with logical flat instead of physical flat apic mode
-v2: change to black list instead
-v3: just remove that, and the one use possible_cpus= directly.
--- arch/x86/kernel/smpboot.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)
arch/x86/kernel/smpboot.c +1 -2
@@ -1194,7 +1194,6 @@ early_param("possible_cpus", _setup_possible_cpus);* - Ashok Raj * * Three ways to find out the number of additional hotplug CPUs: -* - If the BIOS specified disabled CPUs in ACPI/mptables use that. * - The user can overwrite it with possible_cpus=NUM * - Otherwise don't reserve additional CPUs. * We do this because additional CPUs waste a lot of memory.
@@ -1209,7 +1208,7 @@ __init void prefill_possible_map(void) num_processors =1 ;if (setup_possible_cpus ==-1 ) - possible = num_processors + disabled_cpus; + possible = num_processors;else possible = setup_possible_cpus;
Signature · 1 line
1.6.4.2
PATCH 8/8 x86: make 32bit apic flat to physflat switch like 64bit
In reply to Yinghai Lukill def_to_bigsmp
and move switch from default to bigsmp at default_setup_apic_routing... so make default_setup_apic_routing more like 64 bit
also make the dmi relate code to be __init/__initdata
-v2: refresh it according to change in upstream
--- arch/x86/include/asm/apic.h | 3 - arch/x86/include/asm/mpspec.h | 1 - arch/x86/kernel/apic/bigsmp_32.c | 48 +--------------- arch/x86/kernel/apic/probe_32.c | 115 ++++++++++++++++++++------------------ arch/x86/kernel/apic/probe_64.c | 2 +- arch/x86/kernel/setup.c | 2 - arch/x86/kernel/smpboot.c | 2 +- 7 files changed, 65 insertions(+), 108 deletions(-)
arch/x86/include/asm/apic.h +0 -3
@@ -456,9 +456,6 @@ static inline void default_wait_for_init_deassert(atomic_t *deassert)return ; } -extern void generic_bigsmp_probe (void ); - -#ifdef CONFIG_X86_LOCAL_APIC #include <asm/smp.h>
arch/x86/include/asm/mpspec.h +0 -1
@@ -23,7 +23,6 @@ extern int pic_mode;#define MAX_IRQ_SOURCES 256 -extern unsigned int def_to_bigsmp;extern u8 apicid_2_node[];#ifdef CONFIG_X86_NUMAQ
arch/x86/kernel/apic/bigsmp_32.c +2 -46
81 lines not on this page · raw message
arch/x86/kernel/apic/probe_32.c +61 -54
168 lines not on this page · raw message
arch/x86/kernel/apic/probe_64.c +1 -1
@@ -67,7 +67,7 @@ void __init default_setup_apic_routing(void) }#endif -if (apic == &apic_flat &&num_possible_cpus () >8 ) +if (apic == &apic_flat && nr_cpu_ids >8 ) apic = &apic_physflat;printk (KERN_INFO "Setting APIC routing to %s\n" , apic->name);
arch/x86/kernel/setup.c +0 -2
@@ -184,8 +184,6 @@ static void set_mca_bus(int x)#endif } -unsigned int def_to_bigsmp; -/* for MCA, but anyone else can use it if they want */ unsigned int machine_id;unsigned int machine_submodel_id;
arch/x86/kernel/smpboot.c +1 -1
@@ -950,7 +950,7 @@ static int __init smp_sanity_check(unsigned max_cpus)preempt_disable ();#if !defined(CONFIG_X86_BIGSMP ) && defined(CONFIG_X86_32 ) -if (def_to_bigsmp && nr_cpu_ids >8 ) { +if (apic == &apic_default && nr_cpu_ids >8 ) {unsigned int cpu;unsigned nr;
Signature · 1 line
1.6.4.2
Quoted 7 lines · Yinghai Lu
---------spareirq radix tree related ---------------- 94007e8: irq: remove not need bootmem code 4b0d3fa: radix: move radix init early
56af1a9: sparseirq: changeirq_desc_ptrsto static
b236235: sparseirq: useradix_treeinstead of ptrs array 5918787: x86: removearch_probe_nr_irqs
Quoted 6 lines
so could reduce
nr_irqslimitation for bunch ixgbe...---------------x86 logical flat related -----------
f5954c4: use nr_cpus= to setnr_cpu_idsearly
7b8d6a9: x86: usenum_processorsfor possible cpus
d79d1de: x86: make 32bit apic flat to physflat switch like 64bit
Thanks for keeping this work alive.
I just skimmed through do_IRQ and I happened to notice that we have an unnecessary inefficiency that using a radix tree for irq_to_desc will magnify.
handle_irq should take an struct irq_desc * instead of a unsigned int irq.
and the per cpu vector_irq array should become a per cpu vector_desc array.
As soon as irq_to_desc is more than &irq_desc[irq] this saves us work and cache line misses at the cost of a simple code cleanup.
Eric
H. Peter Anvin
reviewerQuoted 3 lines · Eric W. Biederman
Thanks for keeping this work alive.
Indeed. I am hoping to put this in tip tomorrow or so.
Quoted 10 lines
I just skimmed through
do_IRQand I happened to notice that we have an unnecessary inefficiency that using a radix tree forirq_to_descwill magnify.
handle_irqshould take an structirq_desc* instead of a unsigned int irq.and the per cpu
vector_irqarray should become a per cpuvector_descarray.As soon as
irq_to_descis more than &irq_desc[irq] this saves us work and cache line misses at the cost of a simple code cleanup.
Good catch. I haven't looked through the details yet, but I presume this can be done on top of this changeset?
-hpa
Signature · 2 lines
H. Peter Anvin, Intel Open Source Technology Center I work for Intel. I don't speak on their behalf.
Quoted 13 lines · H. Peter Anvin
Quoted 3 lines · Eric W. Biederman
Thanks for keeping this work alive.
Indeed. I am hoping to put this in tip tomorrow or so.
Quoted 6 lines
I just skimmed through
do_IRQand I happened to notice that we have an unnecessary inefficiency that using a radix tree forirq_to_descwill magnify.
handle_irqshould take an structirq_desc* instead of a unsigned int irq.
Quoted 7 lines
Quoted 4 lines
and the per cpu
vector_irqarray should become a per cpuvector_descarray.As soon as
irq_to_descis more than &irq_desc[irq] this saves us work and cache line misses at the cost of a simple code cleanup.Good catch. I haven't looked through the details yet, but I presume this can be done on top of this changeset?
Codewise the changes should be completely independent.
Probably the trickiest bit is that drivers/xen/events.c calls handle_irq and makes handle_irq on ia64 a wrapper for __do_IRQ.
Jeremy is there any good reason why drivers/xen/events.c does not just do:
desc = irq_to_desc(irq);
if (desc)
generic_handle_irq_desc(irq, desc);
And instead introduces a weird one-off xen specific multi-arch function?
Eric
I don't have the code in front of me, but I think that change should be OK. Xen just wants to initiate interrupt delivery for a given irq. At least for x86; I won't make any claims for ia64.
J
Quoted 41 lines · [email protected] wrote:
Quoted 13 lines · H. Peter Anvin
Quoted 3 lines · Eric W. Biederman
Thanks for keeping this work alive.
Indeed. I am hoping to put this in tip tomorrow or so.
Quoted 6 lines
I just skimmed through
do_IRQand I happened to notice that we have an unnecessary inefficiency that using a radix tree forirq_to_descwill magnify.
handle_irqshould take an structirq_desc* instead of a unsigned int irq.Quoted 7 lines
Quoted 4 lines
and the per cpu
vector_irqarray should become a per cpuvector_descarray.As soon as
irq_to_descis more than &irq_desc[irq] this saves us work and cache line misses at the cost of a simple code cleanup.Good catch. I haven't looked through the details yet, but I presume this can be done on top of this changeset?
Codewise the changes should be completely independent.
Probably the trickiest bit is that
drivers/xen/events.ccallshandle_irqand makeshandle_irqon ia64 a wrapper for__do_IRQ.Jeremy is there any good reason why
drivers/xen/events.cdoes not just do:desc =
irq_to_desc(irq);
if (desc)generic_handle_irq_desc(irq, desc);And instead introduces a weird one-off xen specific multi-arch function?
Eric
Signature · 1 line
Sent from my Android phone with K-9 Mail. Please excuse my brevity.
Quoted 1 line · Jeremy Fitzhardinge
I don't have the code in front of me, but I think that change should be OK. Xen just wants to initiate interrupt delivery for a given irq. At least for x86; I won't make any claims for ia64.
Thanks.
For ia64 the change should be a noop, generic_handle_irq_desc calls __do_IRQ when needed.
On x86 the big differences are:
- No more stack overflow check.
- Not switching to the irq stack for i386.
Eric
Quoted 22 lines · Eric W. Biederman
Quoted 7 lines · Yinghai Lu
---------spareirq radix tree related ---------------- 94007e8: irq: remove not need bootmem code 4b0d3fa: radix: move radix init early
56af1a9: sparseirq: changeirq_desc_ptrsto static
b236235: sparseirq: useradix_treeinstead of ptrs array 5918787: x86: removearch_probe_nr_irqsQuoted 6 lines
so could reduce
nr_irqslimitation for bunch ixgbe...---------------x86 logical flat related -----------
f5954c4: use nr_cpus= to setnr_cpu_idsearly
7b8d6a9: x86: usenum_processorsfor possible cpus
d79d1de: x86: make 32bit apic flat to physflat switch like 64bitThanks for keeping this work alive.
I just skimmed through
do_IRQand I happened to notice that we have an unnecessary inefficiency that using a radix tree forirq_to_descwill magnify.
Quoted 7 lines
handle_irqshould take an structirq_desc* instead of a unsigned int irq.and the per cpu
vector_irqarray should become a per cpuvector_descarray.As soon as
irq_to_descis more than &irq_desc[irq] this saves us work and cache line misses at the cost of a simple code cleanup.
please check
Subject: [PATCH] x86: use vector_desc instead of vector_irq
Eric pointed out that radix tree version of irq_to_desc will magnify delay on the path of handle_irq.
use vector_desc to reduce the calling of irq_to_desc.
next step: need to change all ack, mask, umask, eoi for all irq_chip to take irq_desc
--- arch/x86/include/asm/desc.h | 2 - arch/x86/include/asm/hw_irq.h | 10 ++--- arch/x86/include/asm/irq.h | 3 + arch/x86/kernel/apic/io_apic.c | 75 ++++++++++++++++++++--------------------- arch/x86/kernel/irq.c | 15 +++----- arch/x86/kernel/irq_32.c | 6 +-- arch/x86/kernel/irq_64.c | 7 +-- arch/x86/kernel/irqinit.c | 8 +--- arch/x86/kernel/smpboot.c | 2 - arch/x86/kernel/vmiclock_32.c | 2 - arch/x86/lguest/boot.c | 2 - 11 files changed, 63 insertions(+), 69 deletions(-)
arch/x86/include/asm/desc.h +1 -1
@@ -334,7 +334,7 @@ static inline void set_intr_gate(unsigne }extern int first_system_vector; -/* used_vectors is BITMAP for irq is not managed by percpu vector_irq */ +/* used_vectors is BITMAP for irq is not managed by percpu vector_desc */ extern unsigned long used_vectors[];static inline void alloc_system_vector (int vector)
arch/x86/include/asm/hw_irq.h +5 -5
@@ -99,7 +99,7 @@ struct irq_cfg { };extern struct irq_cfg *irq_cfg (unsigned int ); -extern int assign_irq_vector (int ,struct irq_cfg *,const struct cpumask *); +extern int assign_irq_vector (struct irq_desc *,struct irq_cfg *,const struct cpumask *);extern void send_cleanup_vector (struct irq_cfg *);struct irq_desc ;
@@ -138,17 +138,17 @@ extern asmlinkage void smp_invalidate_inextern void (*__initconst interrupt[NR_VECTORS -FIRST_EXTERNAL_VECTOR ])(void ); -typedef int vector_irq_t [NR_VECTORS ]; -DECLARE_PER_CPU (vector_irq_t, vector_irq); +typedef struct irq_desc *vector_desc_t [NR_VECTORS ]; +DECLARE_PER_CPU (vector_desc_t, vector_desc);#ifdef CONFIG_X86_IO_APIC extern void lock_vector_lock (void );extern void unlock_vector_lock (void ); -extern void __setup_vector_irq (int cpu); +extern void __setup_vector_desc (int cpu);#else static inline void lock_vector_lock (void ) {}static inline void unlock_vector_lock (void ) {} -static inline void __setup_vector_irq (int cpu) {} +static inline void __setup_vector_desc (int cpu) {}#endif #endif /* !ASSEMBLY_ */
arch/x86/include/asm/irq.h +2 -1
@@ -39,7 +39,8 @@ extern void irq_force_complete_move(int)extern void (*x86_platform_ipi_callback)(void );extern void native_init_IRQ (void ); -extern bool handle_irq (unsigned irq,struct pt_regs *regs); +struct irq_desc ; +extern bool handle_irq (struct irq_desc *desc,struct pt_regs *regs);extern unsigned int do_IRQ (struct pt_regs *regs);
arch/x86/kernel/apic/io_apic.c +37 -38
236 lines not on this page · raw message
arch/x86/kernel/irq.c +7 -8
@@ -229,19 +229,19 @@ unsigned int __irq_entry do_IRQ(struct p/* high bit used in ret_from_ code */ unsigned vector = ~regs->orig_ax; -unsigned irq; +struct irq_desc *desc;exit_idle ();irq_enter (); - irq =__get_cpu_var (vector_irq)[vector]; + desc =__get_cpu_var (vector_desc)[vector]; -if (!handle_irq (irq, regs)) { +if (!handle_irq (desc, regs)) {ack_APIC_irq ();if (printk_ratelimit ()) -pr_emerg ("%s: %d.%d No irq handler for vector (irq %d)\n" , - __func__,smp_processor_id (), vector, irq); +pr_emerg ("%s: %d.%d No irq handler for vector\n" , + __func__,smp_processor_id (), vector); }irq_exit ();
@@ -348,14 +348,13 @@ void fixup_irqs(void)for (vector =FIRST_EXTERNAL_VECTOR ; vector <NR_VECTORS ; vector++) {unsigned int irr; -if (__get_cpu_var (vector_irq)[vector] <0 ) +if (__get_cpu_var (vector_desc)[vector] ==NULL )continue ; irr =apic_read (APIC_IRR + (vector /32 *0x10 ));if (irr & (1 << (vector %32 ))) { - irq =__get_cpu_var (vector_irq)[vector]; + desc =__get_cpu_var (vector_desc)[vector]; - desc =irq_to_desc (irq);raw_spin_lock (&desc->lock);if (desc->chip->retrigger) desc->chip->retrigger (irq);
arch/x86/kernel/irq_32.c +3 -3
@@ -192,17 +192,17 @@ static inline int execute_on_irq_stack(int overflow, struct irq_desc *desc, int irq) { return 0; }#endif -bool handle_irq (unsigned irq,struct pt_regs *regs) +bool handle_irq (struct irq_desc *desc,struct pt_regs *regs) { -struct irq_desc *desc;int overflow; +int irq; overflow =check_stack_overflow (); - desc =irq_to_desc (irq);if (unlikely (!desc))return false; + irq = desc->irq;if (!execute_on_irq_stack (overflow, desc, irq)) {if (unlikely (overflow))print_stack_overflow ();
arch/x86/kernel/irq_64.c +2 -5
@@ -48,17 +48,14 @@ static inline void stack_overflow_check(#endif } -bool handle_irq (unsigned irq,struct pt_regs *regs) +bool handle_irq (struct irq_desc *desc,struct pt_regs *regs) { -struct irq_desc *desc; -stack_overflow_check (regs); - desc =irq_to_desc (irq);if (unlikely (!desc))return false; -generic_handle_irq_desc (irq, desc); +generic_handle_irq_desc (desc->irq, desc);return true; }
arch/x86/kernel/irqinit.c +3 -5
@@ -83,16 +83,14 @@ static struct irqaction irq2 = { .name = "cascade", }; -DEFINE_PER_CPU(vector_irq_t, vector_irq) = { - [0 ... NR_VECTORS - 1] = -1, -}; +DEFINE_PER_CPU (vector_desc_t, vector_desc);int vector_used_by_percpu_irq (unsigned int vector) {int cpu;for_each_online_cpu (cpu) { -if (per_cpu (vector_irq, cpu)[vector] !=-1 ) +if (per_cpu (vector_desc, cpu)[vector] !=NULL )return 1 ; }
@@ -139,7 +137,7 @@ void __init init_IRQ(void)* irq's migrate etc. */ for (i =0 ; i < nr_legacy_irqs; i++) -per_cpu (vector_irq,0 )[IRQ0_VECTOR + i] = i; +per_cpu (vector_desc,0 )[IRQ0_VECTOR + i] =irq_to_desc (i); x86_init.irqs.intr_init (); }
arch/x86/kernel/smpboot.c +1 -1
@@ -245,7 +245,7 @@ static void __cpuinit smp_callin(void)/* * Need to setup vector mappings before we enable interrupts. */ -__setup_vector_irq (smp_processor_id ()); +__setup_vector_desc (smp_processor_id ());/* * Get our bogomips. *
arch/x86/kernel/vmiclock_32.c +1 -1
@@ -236,7 +236,7 @@ void __init vmi_time_init(void)vmi_time_init_clockevent ();setup_irq (0 , &vmi_clock_action);for_each_possible_cpu (cpu) -per_cpu (vector_irq, cpu)[vmi_get_timer_vector ()] =0 ; +per_cpu (vector_desc, cpu)[vmi_get_timer_vector ()] =irq_to_desc (0 ); }#ifdef CONFIG_X86_LOCAL_APIC
arch/x86/lguest/boot.c +1 -1
@@ -819,7 +819,7 @@ static void __init lguest_init_IRQ(void)for (i =FIRST_EXTERNAL_VECTOR ; i <NR_VECTORS ; i++) {/* Some systems map "vectors" to interrupts weirdly. Not us! */ -__get_cpu_var (vector_irq)[i] = i -FIRST_EXTERNAL_VECTOR ; +__get_cpu_var (vector_desc)[i] =irq_to_desc (i -FIRST_EXTERNAL_VECTOR );if (i !=SYSCALL_VECTOR )set_intr_gate (i, interrupt[i -FIRST_EXTERNAL_VECTOR ]); }
Quoted 7 lines · Yinghai Lu
please check
Subject: [PATCH] x86: use
vector_descinstead ofvector_irqEric pointed out that radix tree version of
irq_to_descwill magnify delay on the path ofhandle_irq.
usevector_descto reduce the calling ofirq_to_desc.
You have missed Xen's handling of handle_irq. Let's just kill it like:
Quoted 1 line
From
0fd5a07f0d346aee37524108d74be7d70c0ab753Mon Sep 17 00:00:00 2001
From: Eric W. Biederman <[email protected]>
Date: Sat, 13 Feb 2010 03:22:59 -0800
Subject: [PATCH] xen: Remove unnecessary arch specific xen irq functions.
Right now xen's use of the x86 and ia64 handle_irq is just bizarre and very fragile as it is very non-obvious the function exists and is is used by code out in drivers/.... Luckily using handle_irq is completly unnecessary, and we can just use the generic irq apis instead.
This still leaves drivers/xen/events.c as a problematic user of the generic irq apis it has "static struct irq_info irq_info[NR_IRQS]" but that can be fixed some other time.
--- arch/ia64/include/asm/xen/events.h | 4 ---- drivers/xen/events.c | 8 ++++++-- 2 files changed, 6 insertions(+), 6 deletions(-)
arch/ia64/include/asm/xen/events.h +0 -4
@@ -36,10 +36,6 @@ static inline int xen_irqs_disabled(struct pt_regs *regs) return !(ia64_psr(regs)->i); } -static inline void handle_irq (int irq,struct pt_regs *regs) -{ -__do_IRQ (irq); -}#define irq_ctx_init (cpu) do { } while (0)#endif /* _ASM_IA64_XEN_EVENTS_H */
drivers/xen/events.c +6 -2
@@ -649,9 +649,13 @@ void xen_evtchn_do_upcall(struct pt_regs *regs)int bit_idx =__ffs (pending_bits);int port = (word_idx *BITS_PER_LONG ) + bit_idx;int irq = evtchn_to_irq[port]; +struct irq_desc *desc; -if (irq !=-1 ) -handle_irq (irq, regs); +if (irq !=-1 ) { + desc =irq_to_desc (irq); +if (desc) +generic_handle_irq_desc (irq, desc); + } } }
Signature · 1 line
1.6.5.2.143.g8cc62
Quoted 49 lines · Yinghai Lu
Quoted 22 lines · Eric W. Biederman
Quoted 7 lines · Yinghai Lu
---------spareirq radix tree related ---------------- 94007e8: irq: remove not need bootmem code 4b0d3fa: radix: move radix init early
56af1a9: sparseirq: changeirq_desc_ptrsto static
b236235: sparseirq: useradix_treeinstead of ptrs array 5918787: x86: removearch_probe_nr_irqsQuoted 6 lines
so could reduce
nr_irqslimitation for bunch ixgbe...---------------x86 logical flat related -----------
f5954c4: use nr_cpus= to setnr_cpu_idsearly
7b8d6a9: x86: usenum_processorsfor possible cpus
d79d1de: x86: make 32bit apic flat to physflat switch like 64bitThanks for keeping this work alive.
I just skimmed through
do_IRQand I happened to notice that we have an unnecessary inefficiency that using a radix tree forirq_to_descwill magnify.Quoted 7 lines
handle_irqshould take an structirq_desc* instead of a unsigned int irq.and the per cpu
vector_irqarray should become a per cpuvector_descarray.As soon as
irq_to_descis more than &irq_desc[irq] this saves us work and cache line misses at the cost of a simple code cleanup.please check
Subject: [PATCH] x86: use
vector_descinstead ofvector_irqEric pointed out that radix tree version of
irq_to_descwill magnify delay on the path ofhandle_irq.
usevector_descto reduce the calling ofirq_to_desc.next step: need to change all ack, mask, umask, eoi for all
irq_chipto takeirq_descSigned-off-by Yinghai Lu <[email protected]>#ifdef
CONFIG_X86_LOCAL_APIC
Index:linux-2.6/arch/x86/lguest/boot.c
===================================================================
arch/x86/lguest/boot.c static void __init lguest_init_IRQ(void) · line 825
Quoted 8 lines
arch/x86/lguest/boot.c +1
-1@@ -819,7 +819,7 @@ static void __init lguest_init_IRQ(void)for (i =FIRST_EXTERNAL_VECTOR ; i <NR_VECTORS ; i++) {/* Some systems map "vectors" to interrupts weirdly. Not us! */ -__get_cpu_var (vector_irq)[i] = i -FIRST_EXTERNAL_VECTOR ; +__get_cpu_var (vector_desc)[i] =irq_to_desc (i -FIRST_EXTERNAL_VECTOR );if (i !=SYSCALL_VECTOR )set_intr_gate (i, interrupt[i -FIRST_EXTERNAL_VECTOR ]); }
YH It appears that irq_to_desc_alloc_node has not been called yet so the setting of vector_desc needs to move to lguest_setup_irq.
Eric
Quoted 52 lines · Eric W. Biederman
Quoted 50 lines · Yinghai Lu
Quoted 22 lines · Eric W. Biederman
Quoted 7 lines · Yinghai Lu
---------spareirq radix tree related ---------------- 94007e8: irq: remove not need bootmem code 4b0d3fa: radix: move radix init early
56af1a9: sparseirq: changeirq_desc_ptrsto static
b236235: sparseirq: useradix_treeinstead of ptrs array 5918787: x86: removearch_probe_nr_irqsQuoted 6 lines
so could reduce
nr_irqslimitation for bunch ixgbe...---------------x86 logical flat related -----------
f5954c4: use nr_cpus= to setnr_cpu_idsearly
7b8d6a9: x86: usenum_processorsfor possible cpus
d79d1de: x86: make 32bit apic flat to physflat switch like 64bitThanks for keeping this work alive.
I just skimmed through
do_IRQand I happened to notice that we have an unnecessary inefficiency that using a radix tree forirq_to_descwill magnify.Quoted 7 lines
handle_irqshould take an structirq_desc* instead of a unsigned int irq.and the per cpu
vector_irqarray should become a per cpuvector_descarray.As soon as
irq_to_descis more than &irq_desc[irq] this saves us work and cache line misses at the cost of a simple code cleanup.please check
Subject: [PATCH] x86: use
vector_descinstead ofvector_irqEric pointed out that radix tree version of
irq_to_descwill magnify delay on the path ofhandle_irq.
usevector_descto reduce the calling ofirq_to_desc.next step: need to change all ack, mask, umask, eoi for all
irq_chipto takeirq_descSigned-off-by Yinghai Lu <[email protected]>#ifdef
CONFIG_X86_LOCAL_APIC
Index:linux-2.6/arch/x86/lguest/boot.c
===================================================================arch/x86/lguest/boot.c +0
-0@@ -819,7 +819,7 @@ static void __init lguest_init_IRQ(void)
Quoted 10 lines
arch/x86/lguest/boot.c static void __init lguest_init_IRQ(void) · line 825
Quoted 7 lines
arch/x86/lguest/boot.c +1
-1for (i =FIRST_EXTERNAL_VECTOR ; i <NR_VECTORS ; i++) {/* Some systems map "vectors" to interrupts weirdly. Not us! */ -__get_cpu_var (vector_irq)[i] = i -FIRST_EXTERNAL_VECTOR ; +__get_cpu_var (vector_desc)[i] =irq_to_desc (i -FIRST_EXTERNAL_VECTOR );if (i !=SYSCALL_VECTOR )set_intr_gate (i, interrupt[i -FIRST_EXTERNAL_VECTOR ]); }YH It appears that
irq_to_desc_alloc_nodehas not been called yet so the setting ofvector_descneeds to move tolguest_setup_irq.
lguest is using sparseirq?
YH
Quoted 20 lines · Yinghai Lu
Quoted 8 lines · Eric W. Biederman
Quoted 8 lines
#ifdef
CONFIG_X86_LOCAL_APIC
Index:linux-2.6/arch/x86/lguest/boot.c
===================================================================arch/x86/lguest/boot.c +0
-0@@ -819,7 +819,7 @@ static void __init lguest_init_IRQ(void)Quoted 10 lines
arch/x86/lguest/boot.c static void __init lguest_init_IRQ(void) · line 825
Quoted 7 lines
arch/x86/lguest/boot.c +1
-1for (i =FIRST_EXTERNAL_VECTOR ; i <NR_VECTORS ; i++) {/* Some systems map "vectors" to interrupts weirdly. Not us! */ -__get_cpu_var (vector_irq)[i] = i -FIRST_EXTERNAL_VECTOR ; +__get_cpu_var (vector_desc)[i] =irq_to_desc (i -FIRST_EXTERNAL_VECTOR );if (i !=SYSCALL_VECTOR )set_intr_gate (i, interrupt[i -FIRST_EXTERNAL_VECTOR ]); }YH It appears that
irq_to_desc_alloc_nodehas not been called yet so the setting ofvector_descneeds to move tolguest_setup_irq.
Quoted 1 line
lguest is using sparseirq?
Apparently. The last commit in that region of code moved some of the work (irq_to_desc_alloc_node) into lguest_setup_irq because kmalloc would not work that early.
Certainly the long term direction is to figure out how to enable sparseirq unconditionally on x86.
Eric
Quoted 22 lines · Eric W. Biederman
Quoted 20 lines · Yinghai Lu
Quoted 18 lines · Eric W. Biederman
Quoted 7 lines
#ifdef
CONFIG_X86_LOCAL_APIC
Index:linux-2.6/arch/x86/lguest/boot.c
===================================================================arch/x86/lguest/boot.c static void __init lguest_init_IRQ(void) · line 825
Quoted 8 lines
arch/x86/lguest/boot.c +1
-1@@ -819,7 +819,7 @@ static void __init lguest_init_IRQ(void)for (i =FIRST_EXTERNAL_VECTOR ; i <NR_VECTORS ; i++) {/* Some systems map "vectors" to interrupts weirdly. Not us! */ -__get_cpu_var (vector_irq)[i] = i -FIRST_EXTERNAL_VECTOR ; +__get_cpu_var (vector_desc)[i] =irq_to_desc (i -FIRST_EXTERNAL_VECTOR );if (i !=SYSCALL_VECTOR )set_intr_gate (i, interrupt[i -FIRST_EXTERNAL_VECTOR ]); }YH It appears that
irq_to_desc_alloc_nodehas not been called yet so the setting ofvector_descneeds to move tolguest_setup_irq.
Quoted 5 lines
Quoted 1 line
lguest is using sparseirq?
Apparently. The last commit in that region of code moved some of the work (
irq_to_desc_alloc_node) intolguest_setup_irqbecause kmalloc would not work that early.
please check -v2
Subject: [PATCH] x86: use vector_desc instead of vector_irq
Eric pointed out that radix tree version of irq_to_desc will magnify delay on the path of handle_irq.
use vector_desc to reduce the calling of irq_to_desc.
next step: need to change all ack, mask, umask, eoi for all irq_chip to take irq_desc
-v2: irq should be unsigned in 32bit handle_irq according to Eric
also reset vector_desc for lguest in setup_irq
--- arch/x86/include/asm/desc.h | 2 - arch/x86/include/asm/hw_irq.h | 10 ++--- arch/x86/include/asm/irq.h | 3 + arch/x86/kernel/apic/io_apic.c | 75 ++++++++++++++++++++--------------------- arch/x86/kernel/irq.c | 15 +++----- arch/x86/kernel/irq_32.c | 12 ++---- arch/x86/kernel/irq_64.c | 7 +-- arch/x86/kernel/irqinit.c | 8 +--- arch/x86/kernel/smpboot.c | 2 - arch/x86/kernel/vmiclock_32.c | 2 - arch/x86/lguest/boot.c | 7 +++ 11 files changed, 70 insertions(+), 73 deletions(-)
arch/x86/include/asm/desc.h +1 -1
@@ -334,7 +334,7 @@ static inline void set_intr_gate(unsigne }extern int first_system_vector; -/* used_vectors is BITMAP for irq is not managed by percpu vector_irq */ +/* used_vectors is BITMAP for irq is not managed by percpu vector_desc */ extern unsigned long used_vectors[];static inline void alloc_system_vector (int vector)
arch/x86/include/asm/hw_irq.h +5 -5
@@ -99,7 +99,7 @@ struct irq_cfg { };extern struct irq_cfg *irq_cfg (unsigned int ); -extern int assign_irq_vector (int ,struct irq_cfg *,const struct cpumask *); +extern int assign_irq_vector (struct irq_desc *,struct irq_cfg *,const struct cpumask *);extern void send_cleanup_vector (struct irq_cfg *);struct irq_desc ;
@@ -138,17 +138,17 @@ extern asmlinkage void smp_invalidate_inextern void (*__initconst interrupt[NR_VECTORS -FIRST_EXTERNAL_VECTOR ])(void ); -typedef int vector_irq_t [NR_VECTORS ]; -DECLARE_PER_CPU (vector_irq_t, vector_irq); +typedef struct irq_desc *vector_desc_t [NR_VECTORS ]; +DECLARE_PER_CPU (vector_desc_t, vector_desc);#ifdef CONFIG_X86_IO_APIC extern void lock_vector_lock (void );extern void unlock_vector_lock (void ); -extern void __setup_vector_irq (int cpu); +extern void __setup_vector_desc (int cpu);#else static inline void lock_vector_lock (void ) {}static inline void unlock_vector_lock (void ) {} -static inline void __setup_vector_irq (int cpu) {} +static inline void __setup_vector_desc (int cpu) {}#endif #endif /* !ASSEMBLY_ */
arch/x86/include/asm/irq.h +2 -1
@@ -39,7 +39,8 @@ extern void irq_force_complete_move(int)extern void (*x86_platform_ipi_callback)(void );extern void native_init_IRQ (void ); -extern bool handle_irq (unsigned irq,struct pt_regs *regs); +struct irq_desc ; +extern bool handle_irq (struct irq_desc *desc,struct pt_regs *regs);extern unsigned int do_IRQ (struct pt_regs *regs);
arch/x86/kernel/apic/io_apic.c +37 -38
236 lines not on this page · raw message
arch/x86/kernel/irq.c +7 -8
@@ -229,19 +229,19 @@ unsigned int __irq_entry do_IRQ(struct p/* high bit used in ret_from_ code */ unsigned vector = ~regs->orig_ax; -unsigned irq; +struct irq_desc *desc;exit_idle ();irq_enter (); - irq =__get_cpu_var (vector_irq)[vector]; + desc =__get_cpu_var (vector_desc)[vector]; -if (!handle_irq (irq, regs)) { +if (!handle_irq (desc, regs)) {ack_APIC_irq ();if (printk_ratelimit ()) -pr_emerg ("%s: %d.%d No irq handler for vector (irq %d)\n" , - __func__,smp_processor_id (), vector, irq); +pr_emerg ("%s: %d.%d No irq handler for vector\n" , + __func__,smp_processor_id (), vector); }irq_exit ();
@@ -348,14 +348,13 @@ void fixup_irqs(void)for (vector =FIRST_EXTERNAL_VECTOR ; vector <NR_VECTORS ; vector++) {unsigned int irr; -if (__get_cpu_var (vector_irq)[vector] <0 ) +if (__get_cpu_var (vector_desc)[vector] ==NULL )continue ; irr =apic_read (APIC_IRR + (vector /32 *0x10 ));if (irr & (1 << (vector %32 ))) { - irq =__get_cpu_var (vector_irq)[vector]; + desc =__get_cpu_var (vector_desc)[vector]; - desc =irq_to_desc (irq);raw_spin_lock (&desc->lock);if (desc->chip->retrigger) desc->chip->retrigger (irq);
arch/x86/kernel/irq_32.c +5 -7
@@ -76,7 +76,7 @@ static void call_on_stack(void *func, vo }static inline int -execute_on_irq_stack (int overflow,struct irq_desc *desc,int irq) +execute_on_irq_stack (int overflow,struct irq_desc *desc) {union irq_ctx *curctx, *irqctx;u32 *isp, arg1, arg2;
@@ -189,24 +189,22 @@ asmlinkage void do_softirq(void)#else static inline int -execute_on_irq_stack (int overflow,struct irq_desc *desc,int irq) {return 0 ; } +execute_on_irq_stack (int overflow,struct irq_desc *desc) {return 0 ; }#endif -bool handle_irq (unsigned irq,struct pt_regs *regs) +bool handle_irq (struct irq_desc *desc,struct pt_regs *regs) { -struct irq_desc *desc;int overflow; overflow =check_stack_overflow (); - desc =irq_to_desc (irq);if (unlikely (!desc))return false; -if (!execute_on_irq_stack (overflow, desc, irq)) { +if (!execute_on_irq_stack (overflow, desc)) {if (unlikely (overflow))print_stack_overflow (); - desc->handle_irq (irq, desc); + desc->handle_irq (desc->irq, desc); }return true;
arch/x86/kernel/irq_64.c +2 -5
@@ -48,17 +48,14 @@ static inline void stack_overflow_check(#endif } -bool handle_irq (unsigned irq,struct pt_regs *regs) +bool handle_irq (struct irq_desc *desc,struct pt_regs *regs) { -struct irq_desc *desc; -stack_overflow_check (regs); - desc =irq_to_desc (irq);if (unlikely (!desc))return false; -generic_handle_irq_desc (irq, desc); +generic_handle_irq_desc (desc->irq, desc);return true; }
arch/x86/kernel/irqinit.c +3 -5
@@ -83,16 +83,14 @@ static struct irqaction irq2 = { .name = "cascade", }; -DEFINE_PER_CPU(vector_irq_t, vector_irq) = { - [0 ... NR_VECTORS - 1] = -1, -}; +DEFINE_PER_CPU (vector_desc_t, vector_desc);int vector_used_by_percpu_irq (unsigned int vector) {int cpu;for_each_online_cpu (cpu) { -if (per_cpu (vector_irq, cpu)[vector] !=-1 ) +if (per_cpu (vector_desc, cpu)[vector] !=NULL )return 1 ; }
@@ -139,7 +137,7 @@ void __init init_IRQ(void)* irq's migrate etc. */ for (i =0 ; i < nr_legacy_irqs; i++) -per_cpu (vector_irq,0 )[IRQ0_VECTOR + i] = i; +per_cpu (vector_desc,0 )[IRQ0_VECTOR + i] =irq_to_desc (i); x86_init.irqs.intr_init (); }
arch/x86/kernel/smpboot.c +1 -1
@@ -245,7 +245,7 @@ static void __cpuinit smp_callin(void)/* * Need to setup vector mappings before we enable interrupts. */ -__setup_vector_irq (smp_processor_id ()); +__setup_vector_desc (smp_processor_id ());/* * Get our bogomips. *
arch/x86/kernel/vmiclock_32.c +1 -1
@@ -236,7 +236,7 @@ void __init vmi_time_init(void)vmi_time_init_clockevent ();setup_irq (0 , &vmi_clock_action);for_each_possible_cpu (cpu) -per_cpu (vector_irq, cpu)[vmi_get_timer_vector ()] =0 ; +per_cpu (vector_desc, cpu)[vmi_get_timer_vector ()] =irq_to_desc (0 ); }#ifdef CONFIG_X86_LOCAL_APIC
arch/x86/lguest/boot.c +6 -1
@@ -819,7 +819,7 @@ static void __init lguest_init_IRQ(void)for (i =FIRST_EXTERNAL_VECTOR ; i <NR_VECTORS ; i++) {/* Some systems map "vectors" to interrupts weirdly. Not us! */ -__get_cpu_var (vector_irq)[i] = i -FIRST_EXTERNAL_VECTOR ; +__get_cpu_var (vector_desc)[i] =irq_to_desc (i -FIRST_EXTERNAL_VECTOR );if (i !=SYSCALL_VECTOR )set_intr_gate (i, interrupt[i -FIRST_EXTERNAL_VECTOR ]); }
@@ -842,6 +842,11 @@ static void __init lguest_init_IRQ(void)void lguest_setup_irq (unsigned int irq) {irq_to_desc_alloc_node (irq,0 ); +/* +* for sparseirq, we could get new desc other than legacy irq, +* so set vector_desc again for that irq +*/ +__get_cpu_var (vector_desc)[irq +FIRST_EXTERNAL_VECTOR ] =irq_to_desc (irq);set_irq_chip_and_handler_name (irq, &lguest_irq_controller, handle_level_irq,"level" ); }
arch/x86/kernel/irq_32.c asmlinkage void do_softirq(void)
Quoted 28 lines · Yinghai Lu
Subject: [PATCH] x86: use
vector_descinstead ofvector_irqEric pointed out that radix tree version of
irq_to_descwill magnify delay on the path ofhandle_irq.
usevector_descto reduce the calling ofirq_to_desc.next step: need to change all ack, mask, umask, eoi for all
irq_chipto takeirq_desc-v2: irq should be unsigned in 32bit
handle_irqaccording to Eric
also resetvector_descfor lguest insetup_irqSigned-off-by Yinghai Lu <[email protected]>Index:
linux-2.6/arch/x86/kernel/irq_32.c
===================================================================arch/x86/kernel/irq_32.c +1
-1@@ -76,7 +76,7 @@ static void call_on_stack(void *func, vo }static inline int -execute_on_irq_stack (int overflow,struct irq_desc *desc,int irq) +execute_on_irq_stack (int overflow,struct irq_desc *desc) {union irq_ctx *curctx, *irqctx;u32 *isp, arg1, arg2;@@ -189,24 +189,22 @@ asmlinkage void do_softirq(void)
This looks like it will fail to build here.
Don't you need to update the assembly to use desc->irq instead of the now removed irq parameter?
Quoted 18 lines
arch/x86/kernel/irq_32.c +2
-4#else static inline int -execute_on_irq_stack (int overflow,struct irq_desc *desc,int irq) {return 0 ; } +execute_on_irq_stack (int overflow,struct irq_desc *desc) {return 0 ; }#endif -bool handle_irq (unsigned irq,struct pt_regs *regs) +bool handle_irq (struct irq_desc *desc,struct pt_regs *regs) { -struct irq_desc *desc;int overflow; overflow =check_stack_overflow (); - desc =irq_to_desc (irq);if (unlikely (!desc))return false;
arch/x86/kernel/irq_32.c asmlinkage void do_softirq(void) · line 210
Quoted 10 lines
arch/x86/kernel/irq_32.c +2
-2-if (!execute_on_irq_stack (overflow, desc, irq)) { +if (!execute_on_irq_stack (overflow, desc)) {if (unlikely (overflow))print_stack_overflow (); - desc->handle_irq (irq, desc); + desc->handle_irq (desc->irq, desc); }return true;
Eric
Quoted 22 lines · Eric W. Biederman
Quoted 21 lines · Yinghai Lu
Subject: [PATCH] x86: use
vector_descinstead ofvector_irqEric pointed out that radix tree version of
irq_to_descwill magnify delay on the path ofhandle_irq.
usevector_descto reduce the calling ofirq_to_desc.next step: need to change all ack, mask, umask, eoi for all
irq_chipto takeirq_desc-v2: irq should be unsigned in 32bit
handle_irqaccording to Eric
also resetvector_descfor lguest insetup_irqSigned-off-by Yinghai Lu <[email protected]>Index:
linux-2.6/arch/x86/kernel/irq_32.c
===================================================================arch/x86/kernel/irq_32.c +0
-0@@ -76,7 +76,7 @@ static void call_on_stack(void *func, vo }
Quoted 11 lines
arch/x86/kernel/irq_32.c asmlinkage void do_softirq(void)
Quoted 7 lines
arch/x86/kernel/irq_32.c +1
-1static inline int -execute_on_irq_stack (int overflow,struct irq_desc *desc,int irq) +execute_on_irq_stack (int overflow,struct irq_desc *desc) {union irq_ctx *curctx, *irqctx;u32 *isp, arg1, arg2;@@ -189,24 +189,22 @@ asmlinkage void do_softirq(void)This looks like it will fail to build here.
Don't you need to update the assembly to usedesc->irqinstead of the now removed irq parameter?
ah, will fix that.
YH
PATCH 1/3 xen: Remove unnecessary arch specific xen irq functions.
In reply to Eric W. BiedermanFrom: Eric W. Biederman <[email protected]>
Right now xen's use of the x86 and ia64 handle_irq is just bizarre and very fragile as it is very non-obvious the function exists and is is used by code out in drivers/.... Luckily using handle_irq is completly unnecessary, and we can just use the generic irq apis instead.
This still leaves drivers/xen/events.c as a problematic user of the generic irq apis it has "static struct irq_info irq_info[NR_IRQS]" but that can be fixed some other time.
--- arch/ia64/include/asm/xen/events.h | 4 ---- drivers/xen/events.c | 8 ++++++-- 2 files changed, 6 insertions(+), 6 deletions(-)
arch/ia64/include/asm/xen/events.h +0 -4
@@ -36,10 +36,6 @@ static inline int xen_irqs_disabled(stru return !(ia64_psr(regs)->i); } -static inline void handle_irq (int irq,struct pt_regs *regs) -{ -__do_IRQ (irq); -}#define irq_ctx_init (cpu) do { } while (0)#endif /* _ASM_IA64_XEN_EVENTS_H */
drivers/xen/events.c +6 -2
@@ -649,9 +649,13 @@ void xen_evtchn_do_upcall(struct pt_regsint bit_idx =__ffs (pending_bits);int port = (word_idx *BITS_PER_LONG ) + bit_idx;int irq = evtchn_to_irq[port]; +struct irq_desc *desc; -if (irq !=-1 ) -handle_irq (irq, regs); +if (irq !=-1 ) { + desc =irq_to_desc (irq); +if (desc) +generic_handle_irq_desc (irq, desc); + } } }
[tip:x86/irq] xen: Remove unnecessary arch specific xen irq functions.
Commit-ID: ca4dbc668412d5fe039be3e26e8e717a616d1ca5 Gitweb: http://git.kernel.org/tip/ca4dbc668412d5fe039be3e26e8e717a616d1ca5 Author: Eric W. Biederman <[email protected]> AuthorDate: Wed, 17 Feb 2010 18:49:54 -0800 Committer: H. Peter Anvin <[email protected]> CommitDate: Thu, 18 Feb 2010 17:17:58 -0800
xen: Remove unnecessary arch specific xen irq functions.
Right now xen's use of the x86 and ia64 handle_irq is just bizarre and very fragile as it is very non-obvious the function exists and is is used by code out in drivers/.... Luckily using handle_irq is completely unnecessary, and we can just use the generic irq apis instead.
This still leaves drivers/xen/events.c as a problematic user of the generic irq apis it has "static struct irq_info irq_info[NR_IRQS]" but that can be fixed some other time.
LKML-Reference: <[email protected]>
--- arch/ia64/include/asm/xen/events.h | 4 ---- drivers/xen/events.c | 8 ++++++-- 2 files changed, 6 insertions(+), 6 deletions(-)
arch/ia64/include/asm/xen/events.h +0 -4
@@ -36,10 +36,6 @@ static inline int xen_irqs_disabled(struct pt_regs *regs) return !(ia64_psr(regs)->i); } -static inline void handle_irq (int irq,struct pt_regs *regs) -{ -__do_IRQ (irq); -}#define irq_ctx_init (cpu) do { } while (0)#endif /* _ASM_IA64_XEN_EVENTS_H */
drivers/xen/events.c +6 -2
@@ -649,9 +649,13 @@ void xen_evtchn_do_upcall(struct pt_regs *regs)int bit_idx =__ffs (pending_bits);int port = (word_idx *BITS_PER_LONG ) + bit_idx;int irq = evtchn_to_irq[port]; +struct irq_desc *desc; -if (irq !=-1 ) -handle_irq (irq, regs); +if (irq !=-1 ) { + desc =irq_to_desc (irq); +if (desc) +generic_handle_irq_desc (irq, desc); + } } }
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 2/3 x86: use vector_desc instead of vector_irq
Eric pointed out that radix tree version of irq_to_desc will magnify delay on the path of handle_irq.
use vector_desc to reduce the calling of irq_to_desc.
next step: need to change all ack, mask, umask, eoi for all irq_chip to take irq_desc
-v2: irq should be unsigned in 32bit handle_irq according to Eric
also reset vector_desc for lguest in setup_irq
-v3: keep irq in x+execute_on_irq_stack() ...
--- arch/x86/include/asm/desc.h | 2 - arch/x86/include/asm/hw_irq.h | 10 ++--- arch/x86/include/asm/irq.h | 3 + arch/x86/kernel/apic/io_apic.c | 75 ++++++++++++++++++++--------------------- arch/x86/kernel/irq.c | 15 +++----- arch/x86/kernel/irq_32.c | 10 ++--- arch/x86/kernel/irq_64.c | 7 +-- arch/x86/kernel/irqinit.c | 8 +--- arch/x86/kernel/smpboot.c | 2 - arch/x86/kernel/vmiclock_32.c | 2 - arch/x86/lguest/boot.c | 7 +++ 11 files changed, 70 insertions(+), 71 deletions(-)
arch/x86/include/asm/desc.h +1 -1
@@ -334,7 +334,7 @@ static inline void set_intr_gate(unsigne }extern int first_system_vector; -/* used_vectors is BITMAP for irq is not managed by percpu vector_irq */ +/* used_vectors is BITMAP for irq is not managed by percpu vector_desc */ extern unsigned long used_vectors[];static inline void alloc_system_vector (int vector)
arch/x86/include/asm/hw_irq.h +5 -5
@@ -99,7 +99,7 @@ struct irq_cfg { };extern struct irq_cfg *irq_cfg (unsigned int ); -extern int assign_irq_vector (int ,struct irq_cfg *,const struct cpumask *); +extern int assign_irq_vector (struct irq_desc *,struct irq_cfg *,const struct cpumask *);extern void send_cleanup_vector (struct irq_cfg *);struct irq_desc ;
@@ -138,17 +138,17 @@ extern asmlinkage void smp_invalidate_inextern void (*__initconst interrupt[NR_VECTORS -FIRST_EXTERNAL_VECTOR ])(void ); -typedef int vector_irq_t [NR_VECTORS ]; -DECLARE_PER_CPU (vector_irq_t, vector_irq); +typedef struct irq_desc *vector_desc_t [NR_VECTORS ]; +DECLARE_PER_CPU (vector_desc_t, vector_desc);#ifdef CONFIG_X86_IO_APIC extern void lock_vector_lock (void );extern void unlock_vector_lock (void ); -extern void __setup_vector_irq (int cpu); +extern void __setup_vector_desc (int cpu);#else static inline void lock_vector_lock (void ) {}static inline void unlock_vector_lock (void ) {} -static inline void __setup_vector_irq (int cpu) {} +static inline void __setup_vector_desc (int cpu) {}#endif #endif /* !ASSEMBLY_ */
arch/x86/include/asm/irq.h +2 -1
@@ -39,7 +39,8 @@ extern void irq_force_complete_move(int)extern void (*x86_platform_ipi_callback)(void );extern void native_init_IRQ (void ); -extern bool handle_irq (unsigned irq,struct pt_regs *regs); +struct irq_desc ; +extern bool handle_irq (struct irq_desc *desc,struct pt_regs *regs);extern unsigned int do_IRQ (struct pt_regs *regs);
arch/x86/kernel/apic/io_apic.c +37 -38
236 lines not on this page · raw message
arch/x86/kernel/irq.c +7 -8
@@ -229,19 +229,19 @@ unsigned int __irq_entry do_IRQ(struct p/* high bit used in ret_from_ code */ unsigned vector = ~regs->orig_ax; -unsigned irq; +struct irq_desc *desc;exit_idle ();irq_enter (); - irq =__get_cpu_var (vector_irq)[vector]; + desc =__get_cpu_var (vector_desc)[vector]; -if (!handle_irq (irq, regs)) { +if (!handle_irq (desc, regs)) {ack_APIC_irq ();if (printk_ratelimit ()) -pr_emerg ("%s: %d.%d No irq handler for vector (irq %d)\n" , - __func__,smp_processor_id (), vector, irq); +pr_emerg ("%s: %d.%d No irq handler for vector\n" , + __func__,smp_processor_id (), vector); }irq_exit ();
@@ -348,14 +348,13 @@ void fixup_irqs(void)for (vector =FIRST_EXTERNAL_VECTOR ; vector <NR_VECTORS ; vector++) {unsigned int irr; -if (__get_cpu_var (vector_irq)[vector] <0 ) +if (__get_cpu_var (vector_desc)[vector] ==NULL )continue ; irr =apic_read (APIC_IRR + (vector /32 *0x10 ));if (irr & (1 << (vector %32 ))) { - irq =__get_cpu_var (vector_irq)[vector]; + desc =__get_cpu_var (vector_desc)[vector]; - desc =irq_to_desc (irq);raw_spin_lock (&desc->lock);if (desc->chip->retrigger) desc->chip->retrigger (irq);
arch/x86/kernel/irq_32.c +5 -5
@@ -76,7 +76,7 @@ static void call_on_stack(void *func, vo }static inline int -execute_on_irq_stack (int overflow,struct irq_desc *desc,int irq) +execute_on_irq_stack (int overflow,struct irq_desc *desc,unsigned int irq) {union irq_ctx *curctx, *irqctx;u32 *isp, arg1, arg2;
@@ -189,20 +189,20 @@ asmlinkage void do_softirq(void)#else static inline int -execute_on_irq_stack (int overflow,struct irq_desc *desc,int irq) {return 0 ; } +execute_on_irq_stack (int overflow,struct irq_desc *desc,unsigned int irq) {return 0 ; }#endif -bool handle_irq (unsigned irq,struct pt_regs *regs) +bool handle_irq (struct irq_desc *desc,struct pt_regs *regs) { -struct irq_desc *desc;int overflow; +unsigned int irq; overflow =check_stack_overflow (); - desc =irq_to_desc (irq);if (unlikely (!desc))return false; + irq = desc->irq;if (!execute_on_irq_stack (overflow, desc, irq)) {if (unlikely (overflow))print_stack_overflow ();
arch/x86/kernel/irq_64.c +2 -5
@@ -48,17 +48,14 @@ static inline void stack_overflow_check(#endif } -bool handle_irq (unsigned irq,struct pt_regs *regs) +bool handle_irq (struct irq_desc *desc,struct pt_regs *regs) { -struct irq_desc *desc; -stack_overflow_check (regs); - desc =irq_to_desc (irq);if (unlikely (!desc))return false; -generic_handle_irq_desc (irq, desc); +generic_handle_irq_desc (desc->irq, desc);return true; }
arch/x86/kernel/irqinit.c +3 -5
@@ -83,16 +83,14 @@ static struct irqaction irq2 = { .name = "cascade", }; -DEFINE_PER_CPU(vector_irq_t, vector_irq) = { - [0 ... NR_VECTORS - 1] = -1, -}; +DEFINE_PER_CPU (vector_desc_t, vector_desc);int vector_used_by_percpu_irq (unsigned int vector) {int cpu;for_each_online_cpu (cpu) { -if (per_cpu (vector_irq, cpu)[vector] !=-1 ) +if (per_cpu (vector_desc, cpu)[vector] !=NULL )return 1 ; }
@@ -139,7 +137,7 @@ void __init init_IRQ(void)* irq's migrate etc. */ for (i =0 ; i < nr_legacy_irqs; i++) -per_cpu (vector_irq,0 )[IRQ0_VECTOR + i] = i; +per_cpu (vector_desc,0 )[IRQ0_VECTOR + i] =irq_to_desc (i); x86_init.irqs.intr_init (); }
arch/x86/kernel/smpboot.c +1 -1
@@ -245,7 +245,7 @@ static void __cpuinit smp_callin(void)/* * Need to setup vector mappings before we enable interrupts. */ -__setup_vector_irq (smp_processor_id ()); +__setup_vector_desc (smp_processor_id ());/* * Get our bogomips. *
arch/x86/kernel/vmiclock_32.c +1 -1
@@ -236,7 +236,7 @@ void __init vmi_time_init(void)vmi_time_init_clockevent ();setup_irq (0 , &vmi_clock_action);for_each_possible_cpu (cpu) -per_cpu (vector_irq, cpu)[vmi_get_timer_vector ()] =0 ; +per_cpu (vector_desc, cpu)[vmi_get_timer_vector ()] =irq_to_desc (0 ); }#ifdef CONFIG_X86_LOCAL_APIC
arch/x86/lguest/boot.c +6 -1
@@ -819,7 +819,7 @@ static void __init lguest_init_IRQ(void)for (i =FIRST_EXTERNAL_VECTOR ; i <NR_VECTORS ; i++) {/* Some systems map "vectors" to interrupts weirdly. Not us! */ -__get_cpu_var (vector_irq)[i] = i -FIRST_EXTERNAL_VECTOR ; +__get_cpu_var (vector_desc)[i] =irq_to_desc (i -FIRST_EXTERNAL_VECTOR );if (i !=SYSCALL_VECTOR )set_intr_gate (i, interrupt[i -FIRST_EXTERNAL_VECTOR ]); }
@@ -842,6 +842,11 @@ static void __init lguest_init_IRQ(void)void lguest_setup_irq (unsigned int irq) {irq_to_desc_alloc_node (irq,0 ); +/* +* for sparseirq, we could get new desc other than legacy irq, +* so set vector_desc again for that irq +*/ +__get_cpu_var (vector_desc)[irq +FIRST_EXTERNAL_VECTOR ] =irq_to_desc (irq);set_irq_chip_and_handler_name (irq, &lguest_irq_controller, handle_level_irq,"level" ); }
Re: [PATCH 2/3] x86: use vector_desc instead of vector_irq
Quoted 11 lines · Yinghai Lu
Eric pointed out that radix tree version of
irq_to_descwill magnify delay on the path ofhandle_irq.
usevector_descto reduce the calling ofirq_to_desc.next step: need to change all ack, mask, umask, eoi for all
irq_chipto takeirq_desc(quoted diff) +0
-2-v2: irq should be unsigned in 32bit handle_irq according to Eric also reset vector_desc for lguest in setup_irq -v3: keep irq in x+execute_on_irq_stack() ...Signed-off-by Yinghai Lu <[email protected]>
I can't spot any more problems.
PATCH 1/2 x86: use vector_desc instead of vector_irq
Eric pointed out that radix tree version of irq_to_desc will magnify delay on the path of handle_irq.
use vector_desc to reduce the calling of irq_to_desc.
next step: need to change all ack, mask, umask, eoi for all irq_chip to take irq_desc
-v2: irq should be unsigned in 32bit handle_irq according to Eric
also reset vector_desc for lguest in setup_irq
-v3: keep irq in x+execute_on_irq_stack() ...
--- arch/x86/include/asm/desc.h | 2 - arch/x86/include/asm/hw_irq.h | 10 ++--- arch/x86/include/asm/irq.h | 3 + arch/x86/kernel/apic/io_apic.c | 75 ++++++++++++++++++++--------------------- arch/x86/kernel/irq.c | 15 +++----- arch/x86/kernel/irq_32.c | 10 ++--- arch/x86/kernel/irq_64.c | 7 +-- arch/x86/kernel/irqinit.c | 8 +--- arch/x86/kernel/smpboot.c | 2 - arch/x86/kernel/vmiclock_32.c | 2 - arch/x86/lguest/boot.c | 7 +++ 11 files changed, 71 insertions(+), 70 deletions(-)
arch/x86/include/asm/desc.h +1 -1
@@ -334,7 +334,7 @@ static inline void set_intr_gate(unsigne }extern int first_system_vector; -/* used_vectors is BITMAP for irq is not managed by percpu vector_irq */ +/* used_vectors is BITMAP for irq is not managed by percpu vector_desc */ extern unsigned long used_vectors[];static inline void alloc_system_vector (int vector)
arch/x86/include/asm/hw_irq.h +5 -5
@@ -99,7 +99,7 @@ struct irq_cfg { };extern struct irq_cfg *irq_cfg (unsigned int ); -extern int assign_irq_vector (int ,struct irq_cfg *,const struct cpumask *); +extern int assign_irq_vector (struct irq_desc *,struct irq_cfg *,const struct cpumask *);extern void send_cleanup_vector (struct irq_cfg *);struct irq_desc ;
@@ -138,17 +138,17 @@ extern asmlinkage void smp_invalidate_inextern void (*__initconst interrupt[NR_VECTORS -FIRST_EXTERNAL_VECTOR ])(void ); -typedef int vector_irq_t [NR_VECTORS ]; -DECLARE_PER_CPU (vector_irq_t, vector_irq); +typedef struct irq_desc *vector_desc_t [NR_VECTORS ]; +DECLARE_PER_CPU (vector_desc_t, vector_desc);#ifdef CONFIG_X86_IO_APIC extern void lock_vector_lock (void );extern void unlock_vector_lock (void ); -extern void __setup_vector_irq (int cpu); +extern void __setup_vector_desc (int cpu);#else static inline void lock_vector_lock (void ) {}static inline void unlock_vector_lock (void ) {} -static inline void __setup_vector_irq (int cpu) {} +static inline void __setup_vector_desc (int cpu) {}#endif #endif /* !ASSEMBLY_ */
arch/x86/include/asm/irq.h +2 -1
@@ -39,7 +39,8 @@ extern void irq_force_complete_move(int)extern void (*x86_platform_ipi_callback)(void );extern void native_init_IRQ (void ); -extern bool handle_irq (unsigned irq,struct pt_regs *regs); +struct irq_desc ; +extern bool handle_irq (struct irq_desc *desc,struct pt_regs *regs);extern unsigned int do_IRQ (struct pt_regs *regs);
arch/x86/kernel/apic/io_apic.c +38 -37
235 lines not on this page · raw message
arch/x86/kernel/irq.c +7 -8
@@ -229,19 +229,19 @@ unsigned int __irq_entry do_IRQ(struct p/* high bit used in ret_from_ code */ unsigned vector = ~regs->orig_ax; -unsigned irq; +struct irq_desc *desc;exit_idle ();irq_enter (); - irq =__get_cpu_var (vector_irq)[vector]; + desc =__get_cpu_var (vector_desc)[vector]; -if (!handle_irq (irq, regs)) { +if (!handle_irq (desc, regs)) {ack_APIC_irq ();if (printk_ratelimit ()) -pr_emerg ("%s: %d.%d No irq handler for vector (irq %d)\n" , - __func__,smp_processor_id (), vector, irq); +pr_emerg ("%s: %d.%d No irq handler for vector\n" , + __func__,smp_processor_id (), vector); }irq_exit ();
@@ -348,14 +348,13 @@ void fixup_irqs(void)for (vector =FIRST_EXTERNAL_VECTOR ; vector <NR_VECTORS ; vector++) {unsigned int irr; -if (__get_cpu_var (vector_irq)[vector] <0 ) +if (__get_cpu_var (vector_desc)[vector] ==NULL )continue ; irr =apic_read (APIC_IRR + (vector /32 *0x10 ));if (irr & (1 << (vector %32 ))) { - irq =__get_cpu_var (vector_irq)[vector]; + desc =__get_cpu_var (vector_desc)[vector]; - desc =irq_to_desc (irq);raw_spin_lock (&desc->lock);if (desc->chip->retrigger) desc->chip->retrigger (irq);
arch/x86/kernel/irq_32.c +5 -5
@@ -76,7 +76,7 @@ static void call_on_stack(void *func, vo }static inline int -execute_on_irq_stack (int overflow,struct irq_desc *desc,int irq) +execute_on_irq_stack (int overflow,struct irq_desc *desc,unsigned int irq) {union irq_ctx *curctx, *irqctx;u32 *isp, arg1, arg2;
@@ -189,20 +189,20 @@ asmlinkage void do_softirq(void)#else static inline int -execute_on_irq_stack (int overflow,struct irq_desc *desc,int irq) {return 0 ; } +execute_on_irq_stack (int overflow,struct irq_desc *desc,unsigned int irq) {return 0 ; }#endif -bool handle_irq (unsigned irq,struct pt_regs *regs) +bool handle_irq (struct irq_desc *desc,struct pt_regs *regs) { -struct irq_desc *desc;int overflow; +unsigned int irq; overflow =check_stack_overflow (); - desc =irq_to_desc (irq);if (unlikely (!desc))return false; + irq = desc->irq;if (!execute_on_irq_stack (overflow, desc, irq)) {if (unlikely (overflow))print_stack_overflow ();
arch/x86/kernel/irq_64.c +2 -5
@@ -48,17 +48,14 @@ static inline void stack_overflow_check(#endif } -bool handle_irq (unsigned irq,struct pt_regs *regs) +bool handle_irq (struct irq_desc *desc,struct pt_regs *regs) { -struct irq_desc *desc; -stack_overflow_check (regs); - desc =irq_to_desc (irq);if (unlikely (!desc))return false; -generic_handle_irq_desc (irq, desc); +generic_handle_irq_desc (desc->irq, desc);return true; }
arch/x86/kernel/irqinit.c +3 -5
@@ -83,16 +83,14 @@ static struct irqaction irq2 = { .name = "cascade", }; -DEFINE_PER_CPU(vector_irq_t, vector_irq) = { - [0 ... NR_VECTORS - 1] = -1, -}; +DEFINE_PER_CPU (vector_desc_t, vector_desc);int vector_used_by_percpu_irq (unsigned int vector) {int cpu;for_each_online_cpu (cpu) { -if (per_cpu (vector_irq, cpu)[vector] !=-1 ) +if (per_cpu (vector_desc, cpu)[vector] !=NULL )return 1 ; }
@@ -139,7 +137,7 @@ void __init init_IRQ(void)* irq's migrate etc. */ for (i =0 ; i < nr_legacy_irqs; i++) -per_cpu (vector_irq,0 )[IRQ0_VECTOR + i] = i; +per_cpu (vector_desc,0 )[IRQ0_VECTOR + i] =irq_to_desc (i); x86_init.irqs.intr_init (); }
arch/x86/kernel/smpboot.c +1 -1
@@ -245,7 +245,7 @@ static void __cpuinit smp_callin(void)/* * Need to setup vector mappings before we enable interrupts. */ -__setup_vector_irq (smp_processor_id ()); +__setup_vector_desc (smp_processor_id ());/* * Get our bogomips. *
arch/x86/kernel/vmiclock_32.c +1 -1
@@ -236,7 +236,7 @@ void __init vmi_time_init(void)vmi_time_init_clockevent ();setup_irq (0 , &vmi_clock_action);for_each_possible_cpu (cpu) -per_cpu (vector_irq, cpu)[vmi_get_timer_vector ()] =0 ; +per_cpu (vector_desc, cpu)[vmi_get_timer_vector ()] =irq_to_desc (0 ); }#ifdef CONFIG_X86_LOCAL_APIC
arch/x86/lguest/boot.c +6 -1
@@ -819,7 +819,7 @@ static void __init lguest_init_IRQ(void)for (i =FIRST_EXTERNAL_VECTOR ; i <NR_VECTORS ; i++) {/* Some systems map "vectors" to interrupts weirdly. Not us! */ -__get_cpu_var (vector_irq)[i] = i -FIRST_EXTERNAL_VECTOR ; +__get_cpu_var (vector_desc)[i] =irq_to_desc (i -FIRST_EXTERNAL_VECTOR );if (i !=SYSCALL_VECTOR )set_intr_gate (i, interrupt[i -FIRST_EXTERNAL_VECTOR ]); }
@@ -842,6 +842,11 @@ static void __init lguest_init_IRQ(void)void lguest_setup_irq (unsigned int irq) {irq_to_desc_alloc_node (irq,0 ); +/* +* for sparseirq, we could get new desc other than legacy irq, +* so set vector_desc again for that irq +*/ +__get_cpu_var (vector_desc)[irq +FIRST_EXTERNAL_VECTOR ] =irq_to_desc (irq);set_irq_chip_and_handler_name (irq, &lguest_irq_controller, handle_level_irq,"level" ); }
PATCH 1/2 x86: use vector_desc instead of vector_irq
Eric pointed out that radix tree version of irq_to_desc will magnify delay on the path of handle_irq.
use vector_desc to reduce the calling of irq_to_desc.
next step: need to change all ack, mask, umask, eoi for all irq_chip to take irq_desc
-v2: irq should be unsigned in 32bit handle_irq according to Eric
also reset vector_desc for lguest in setup_irq
-v3: keep irq in x+execute_on_irq_stack() ...
-v4: update after legacy_pic
--- arch/x86/include/asm/desc.h | 2 - arch/x86/include/asm/hw_irq.h | 10 ++--- arch/x86/include/asm/irq.h | 3 + arch/x86/kernel/apic/io_apic.c | 75 ++++++++++++++++++++--------------------- arch/x86/kernel/irq.c | 15 +++----- arch/x86/kernel/irq_32.c | 10 ++--- arch/x86/kernel/irq_64.c | 7 +-- arch/x86/kernel/irqinit.c | 8 +--- arch/x86/kernel/smpboot.c | 2 - arch/x86/kernel/vmiclock_32.c | 2 - arch/x86/lguest/boot.c | 7 +++ 11 files changed, 71 insertions(+), 70 deletions(-)
arch/x86/include/asm/desc.h +1 -1
@@ -334,7 +334,7 @@ static inline void set_intr_gate(unsigne }extern int first_system_vector; -/* used_vectors is BITMAP for irq is not managed by percpu vector_irq */ +/* used_vectors is BITMAP for irq is not managed by percpu vector_desc */ extern unsigned long used_vectors[];static inline void alloc_system_vector (int vector)
arch/x86/include/asm/hw_irq.h +5 -5
@@ -92,7 +92,7 @@ struct irq_cfg { };extern struct irq_cfg *irq_cfg (unsigned int ); -extern int assign_irq_vector (int ,struct irq_cfg *,const struct cpumask *); +extern int assign_irq_vector (struct irq_desc *,struct irq_cfg *,const struct cpumask *);extern void send_cleanup_vector (struct irq_cfg *);struct irq_desc ;
@@ -131,17 +131,17 @@ extern asmlinkage void smp_invalidate_inextern void (*__initconst interrupt[NR_VECTORS -FIRST_EXTERNAL_VECTOR ])(void ); -typedef int vector_irq_t [NR_VECTORS ]; -DECLARE_PER_CPU (vector_irq_t, vector_irq); +typedef struct irq_desc *vector_desc_t [NR_VECTORS ]; +DECLARE_PER_CPU (vector_desc_t, vector_desc);#ifdef CONFIG_X86_IO_APIC extern void lock_vector_lock (void );extern void unlock_vector_lock (void ); -extern void __setup_vector_irq (int cpu); +extern void __setup_vector_desc (int cpu);#else static inline void lock_vector_lock (void ) {}static inline void unlock_vector_lock (void ) {} -static inline void __setup_vector_irq (int cpu) {} +static inline void __setup_vector_desc (int cpu) {}#endif #endif /* !ASSEMBLY_ */
arch/x86/include/asm/irq.h +2 -1
@@ -39,7 +39,8 @@ extern void irq_force_complete_move(int)extern void (*x86_platform_ipi_callback)(void );extern void native_init_IRQ (void ); -extern bool handle_irq (unsigned irq,struct pt_regs *regs); +struct irq_desc ; +extern bool handle_irq (struct irq_desc *desc,struct pt_regs *regs);extern unsigned int do_IRQ (struct pt_regs *regs);
arch/x86/kernel/apic/io_apic.c +38 -37
235 lines not on this page · raw message
arch/x86/kernel/irq.c +7 -8
@@ -229,19 +229,19 @@ unsigned int __irq_entry do_IRQ(struct p/* high bit used in ret_from_ code */ unsigned vector = ~regs->orig_ax; -unsigned irq; +struct irq_desc *desc;exit_idle ();irq_enter (); - irq =__get_cpu_var (vector_irq)[vector]; + desc =__get_cpu_var (vector_desc)[vector]; -if (!handle_irq (irq, regs)) { +if (!handle_irq (desc, regs)) {ack_APIC_irq ();if (printk_ratelimit ()) -pr_emerg ("%s: %d.%d No irq handler for vector (irq %d)\n" , - __func__,smp_processor_id (), vector, irq); +pr_emerg ("%s: %d.%d No irq handler for vector\n" , + __func__,smp_processor_id (), vector); }irq_exit ();
@@ -348,14 +348,13 @@ void fixup_irqs(void)for (vector =FIRST_EXTERNAL_VECTOR ; vector <NR_VECTORS ; vector++) {unsigned int irr; -if (__get_cpu_var (vector_irq)[vector] <0 ) +if (__get_cpu_var (vector_desc)[vector] ==NULL )continue ; irr =apic_read (APIC_IRR + (vector /32 *0x10 ));if (irr & (1 << (vector %32 ))) { - irq =__get_cpu_var (vector_irq)[vector]; + desc =__get_cpu_var (vector_desc)[vector]; - desc =irq_to_desc (irq);raw_spin_lock (&desc->lock);if (desc->chip->retrigger) desc->chip->retrigger (irq);
arch/x86/kernel/irq_32.c +5 -5
@@ -76,7 +76,7 @@ static void call_on_stack(void *func, vo }static inline int -execute_on_irq_stack (int overflow,struct irq_desc *desc,int irq) +execute_on_irq_stack (int overflow,struct irq_desc *desc,unsigned int irq) {union irq_ctx *curctx, *irqctx;u32 *isp, arg1, arg2;
@@ -189,20 +189,20 @@ asmlinkage void do_softirq(void)#else static inline int -execute_on_irq_stack (int overflow,struct irq_desc *desc,int irq) {return 0 ; } +execute_on_irq_stack (int overflow,struct irq_desc *desc,unsigned int irq) {return 0 ; }#endif -bool handle_irq (unsigned irq,struct pt_regs *regs) +bool handle_irq (struct irq_desc *desc,struct pt_regs *regs) { -struct irq_desc *desc;int overflow; +unsigned int irq; overflow =check_stack_overflow (); - desc =irq_to_desc (irq);if (unlikely (!desc))return false; + irq = desc->irq;if (!execute_on_irq_stack (overflow, desc, irq)) {if (unlikely (overflow))print_stack_overflow ();
arch/x86/kernel/irq_64.c +2 -5
@@ -48,17 +48,14 @@ static inline void stack_overflow_check(#endif } -bool handle_irq (unsigned irq,struct pt_regs *regs) +bool handle_irq (struct irq_desc *desc,struct pt_regs *regs) { -struct irq_desc *desc; -stack_overflow_check (regs); - desc =irq_to_desc (irq);if (unlikely (!desc))return false; -generic_handle_irq_desc (irq, desc); +generic_handle_irq_desc (desc->irq, desc);return true; }
arch/x86/kernel/irqinit.c +3 -5
@@ -83,16 +83,14 @@ static struct irqaction irq2 = { .name = "cascade", }; -DEFINE_PER_CPU(vector_irq_t, vector_irq) = { - [0 ... NR_VECTORS - 1] = -1, -}; +DEFINE_PER_CPU (vector_desc_t, vector_desc);int vector_used_by_percpu_irq (unsigned int vector) {int cpu;for_each_online_cpu (cpu) { -if (per_cpu (vector_irq, cpu)[vector] !=-1 ) +if (per_cpu (vector_desc, cpu)[vector] !=NULL )return 1 ; }
@@ -136,7 +134,7 @@ void __init init_IRQ(void)* irq's migrate etc. */ for (i =0 ; i < legacy_pic->nr_legacy_irqs; i++) -per_cpu (vector_irq,0 )[IRQ0_VECTOR + i] = i; +per_cpu (vector_desc,0 )[IRQ0_VECTOR + i] =irq_to_desc (i); x86_init.irqs.intr_init (); }
arch/x86/kernel/smpboot.c +1 -1
@@ -246,7 +246,7 @@ static void __cpuinit smp_callin(void)/* * Need to setup vector mappings before we enable interrupts. */ -__setup_vector_irq (smp_processor_id ()); +__setup_vector_desc (smp_processor_id ());/* * Get our bogomips. *
arch/x86/kernel/vmiclock_32.c +1 -1
@@ -236,7 +236,7 @@ void __init vmi_time_init(void)vmi_time_init_clockevent ();setup_irq (0 , &vmi_clock_action);for_each_possible_cpu (cpu) -per_cpu (vector_irq, cpu)[vmi_get_timer_vector ()] =0 ; +per_cpu (vector_desc, cpu)[vmi_get_timer_vector ()] =irq_to_desc (0 ); }#ifdef CONFIG_X86_LOCAL_APIC
arch/x86/lguest/boot.c +6 -1
@@ -819,7 +819,7 @@ static void __init lguest_init_IRQ(void)for (i =FIRST_EXTERNAL_VECTOR ; i <NR_VECTORS ; i++) {/* Some systems map "vectors" to interrupts weirdly. Not us! */ -__get_cpu_var (vector_irq)[i] = i -FIRST_EXTERNAL_VECTOR ; +__get_cpu_var (vector_desc)[i] =irq_to_desc (i -FIRST_EXTERNAL_VECTOR );if (i !=SYSCALL_VECTOR )set_intr_gate (i, interrupt[i -FIRST_EXTERNAL_VECTOR ]); }
@@ -842,6 +842,11 @@ static void __init lguest_init_IRQ(void)void lguest_setup_irq (unsigned int irq) {irq_to_desc_alloc_node (irq,0 ); +/* +* for sparseirq, we could get new desc other than legacy irq, +* so set vector_desc again for that irq +*/ +__get_cpu_var (vector_desc)[irq +FIRST_EXTERNAL_VECTOR ] =irq_to_desc (irq);set_irq_chip_and_handler_name (irq, &lguest_irq_controller, handle_level_irq,"level" ); }
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 2/2 genericirq: change ack/mask in irq_chip to take irq_desc instead of irq
will have
void (*ack)(struct irq_desc *desc); void (*mask)(struct irq_desc *desc); void (*mask_ack)(struct irq_desc *desc); void (*unmask)(struct irq_desc *desc); void (*eoi)(struct irq_desc *desc);
so for sparseirq with raidix tree, we don't call extra irq_to_desc, and could use desc directly
-v2: change all member of irq_chip to use desc only. -v3: update after legacy_pic
--- Documentation/DocBook/genericirq.tmpl | 24 ++-- arch/alpha/kernel/irq.c | 7 - arch/alpha/kernel/irq_alpha.c | 4 arch/alpha/kernel/irq_i8259.c | 22 ++-- arch/alpha/kernel/irq_pyxis.c | 21 ++- arch/alpha/kernel/irq_srm.c | 18 +-- arch/alpha/kernel/sys_alcor.c | 28 ++--- arch/alpha/kernel/sys_cabriolet.c | 18 ++- arch/alpha/kernel/sys_dp264.c | 50 +++++---- arch/alpha/kernel/sys_eb64p.c | 18 ++- arch/alpha/kernel/sys_eiger.c | 18 ++- arch/alpha/kernel/sys_jensen.c | 40 +++---- arch/alpha/kernel/sys_marvel.c | 26 ++-- arch/alpha/kernel/sys_mikasa.c | 18 +-- arch/alpha/kernel/sys_noritake.c | 18 ++- arch/alpha/kernel/sys_rawhide.c | 19 ++- arch/alpha/kernel/sys_rx164.c | 18 +-- arch/alpha/kernel/sys_sable.c | 26 ++-- arch/alpha/kernel/sys_takara.c | 18 ++- arch/alpha/kernel/sys_titan.c | 22 ++-- arch/alpha/kernel/sys_wildfire.c | 32 +++-- arch/arm/common/gic.c | 20 ++- arch/arm/common/it8152.c | 8 + arch/arm/common/locomo.c | 103 ++++++++++++------ arch/arm/common/sa1111.c | 56 ++++++---- arch/arm/common/vic.c | 21 ++- arch/arm/kernel/ecard.c | 12 +- arch/arm/kernel/irq.c | 2 arch/arm/mach-aaec2000/core.c | 6 - arch/arm/mach-at91/gpio.c | 15 +- arch/arm/mach-at91/irq.c | 15 ++ arch/arm/mach-bcmring/irq.c | 24 +++- arch/arm/mach-clps711x/irq.c | 18 ++- arch/arm/mach-davinci/cp_intc.c | 14 +- arch/arm/mach-davinci/gpio.c | 32 ++--- arch/arm/mach-davinci/irq.c | 9 + arch/arm/mach-dove/irq.c | 9 + arch/arm/mach-ebsa110/core.c | 6 - arch/arm/mach-ep93xx/core.c | 16 +- arch/arm/mach-footbridge/common.c | 6 - arch/arm/mach-footbridge/isa-irq.c | 18 ++- arch/arm/mach-gemini/gpio.c | 12 +- arch/arm/mach-gemini/irq.c | 9 + arch/arm/mach-h720x/common.c | 15 +- arch/arm/mach-h720x/cpu-h7202.c | 6 - arch/arm/mach-integrator/integrator_ap.c | 6 - arch/arm/mach-integrator/integrator_cp.c | 18 ++- arch/arm/mach-iop13xx/irq.c | 24 ++-- arch/arm/mach-iop13xx/msi.c | 2 arch/arm/mach-iop32x/irq.c | 6 - arch/arm/mach-ixp2000/core.c | 30 +++-- arch/arm/mach-ixp2000/ixdp2x00.c | 10 + arch/arm/mach-ixp2000/ixdp2x01.c | 10 + arch/arm/mach-ixp23xx/core.c | 25 ++-- arch/arm/mach-ixp23xx/ixdp2351.c | 20 ++- arch/arm/mach-ixp4xx/common.c | 14 +- arch/arm/mach-ks8695/irq.c | 28 ++--- arch/arm/mach-l7200/core.c | 6 - arch/arm/mach-lh7a40x/arch-kev7a400.c | 9 + arch/arm/mach-lh7a40x/arch-lpd7a40x.c | 13 +- arch/arm/mach-lh7a40x/irq-lh7a400.c | 9 + arch/arm/mach-lh7a40x/irq-lh7a404.c | 18 ++- arch/arm/mach-lh7a40x/irq-lpd7a40x.c | 12 +- arch/arm/mach-mmp/irq.c | 8 - arch/arm/mach-mx3/mx31ads.c | 9 + arch/arm/mach-mx3/mx31pdk.c | 9 + arch/arm/mach-netx/generic.c | 12 +- arch/arm/mach-nomadik/gpio.c | 26 ++-- arch/arm/mach-ns9xxx/board-a9m9750dev.c | 15 +- arch/arm/mach-ns9xxx/irq.c | 15 +- arch/arm/mach-omap1/fpga.c | 13 +- arch/arm/mach-omap1/irq.c | 24 ++-- arch/arm/mach-pnx4008/irq.c | 12 +- arch/arm/mach-pxa/balloon3.c | 8 - arch/arm/mach-pxa/irq.c | 18 ++- arch/arm/mach-pxa/lpd270.c | 6 - arch/arm/mach-pxa/lubbock.c | 6 - arch/arm/mach-pxa/mainstone.c | 6 - arch/arm/mach-pxa/pcm990-baseboard.c | 6 - arch/arm/mach-pxa/pxa3xx.c | 9 + arch/arm/mach-pxa/viper.c | 9 + arch/arm/mach-pxa/zeus.c | 11 +- arch/arm/mach-rpc/irq.c | 27 +++- arch/arm/mach-s3c2410/bast-irq.c | 20 +-- arch/arm/mach-s3c2412/irq.c | 35 +++--- arch/arm/mach-s3c2440/irq.c | 15 +- arch/arm/mach-s3c2443/irq.c | 71 +++++++------ arch/arm/mach-sa1100/irq.c | 36 ++++-- arch/arm/mach-sa1100/neponset.c | 8 - arch/arm/mach-shark/irq.c | 10 + arch/arm/mach-stmp378x/stmp378x.c | 9 + arch/arm/mach-stmp37xx/stmp37xx.c | 9 + arch/arm/mach-versatile/core.c | 6 - arch/arm/mach-w90x900/irq.c | 8 - arch/arm/oprofile/op_model_mpcore.c | 4 arch/arm/plat-mxc/gpio.c | 12 +- arch/arm/plat-mxc/irq.c | 6 - arch/arm/plat-omap/gpio.c | 36 ++++-- arch/arm/plat-orion/gpio.c | 21 ++- arch/arm/plat-orion/irq.c | 10 + arch/arm/plat-pxa/gpio.c | 12 +- arch/arm/plat-s3c24xx/irq.c | 112 ++++++++++++-------- arch/arm/plat-s3c24xx/s3c244x-irq.c | 15 +- arch/arm/plat-s3c64xx/irq-eint.c | 19 ++- arch/arm/plat-s3c64xx/irq.c | 21 ++- arch/arm/plat-s5pc1xx/irq-eint.c | 42 ++++--- arch/arm/plat-s5pc1xx/irq-gpio.c | 18 ++- arch/arm/plat-s5pc1xx/irq.c | 21 ++- arch/arm/plat-stmp3xxx/irq.c | 2 arch/arm/plat-stmp3xxx/pinmux.c | 12 +- arch/avr32/mach-at32ap/extint.c | 26 ++-- arch/avr32/mach-at32ap/pio.c | 9 + arch/blackfin/include/asm/ipipe.h | 4 arch/blackfin/mach-common/ints-priority.c | 53 ++++++--- arch/blackfin/mach-common/smp.c | 2 arch/cris/arch-v10/kernel/irq.c | 16 +- arch/frv/kernel/irq-mb93091.c | 12 +- arch/frv/kernel/irq-mb93093.c | 12 +- arch/frv/kernel/irq-mb93493.c | 8 - arch/frv/kernel/irq.c | 27 ++-- arch/h8300/kernel/irq.c | 14 +- arch/ia64/hp/sim/hpsim_irq.c | 6 - arch/ia64/kernel/iosapic.c | 45 ++++---- arch/ia64/kernel/irq.c | 6 - arch/ia64/kernel/irq_lsapic.c | 8 - arch/ia64/kernel/msi_ia64.c | 18 ++- arch/ia64/kernel/smpboot.c | 6 - arch/ia64/sn/kernel/irq.c | 25 ++-- arch/ia64/sn/kernel/msi_sn.c | 10 + arch/m32r/platforms/m32104ut/setup.c | 19 ++- arch/m32r/platforms/m32700ut/setup.c | 92 +++++++++------- arch/m32r/platforms/mappi/setup.c | 21 ++- arch/m32r/platforms/mappi2/setup.c | 21 ++- arch/m32r/platforms/mappi3/setup.c | 21 ++- arch/m32r/platforms/oaks32r/setup.c | 21 ++- arch/m32r/platforms/opsput/setup.c | 88 +++++++++------- arch/m32r/platforms/usrv/setup.c | 42 ++++--- arch/m68knommu/platform/5249/intc2.c | 9 + arch/m68knommu/platform/5272/intc.c | 11 +- arch/m68knommu/platform/68328/ints.c | 6 - arch/m68knommu/platform/68360/ints.c | 9 + arch/m68knommu/platform/coldfire/intc-2.c | 6 - arch/m68knommu/platform/coldfire/intc-simr.c | 7 - arch/m68knommu/platform/coldfire/intc.c | 8 - arch/microblaze/kernel/intc.c | 15 +- arch/mips/alchemy/common/irq.c | 43 ++++--- arch/mips/alchemy/devboards/pb1200/irqmap.c | 23 ++-- arch/mips/ar7/irq.c | 18 ++- arch/mips/bcm63xx/irq.c | 42 ++++--- arch/mips/cavium-octeon/octeon-irq.c | 70 ++++++++---- arch/mips/dec/ioasic-irq.c | 21 ++- arch/mips/dec/kn02-irq.c | 10 + arch/mips/emma/markeins/irq.c | 20 ++- arch/mips/jazz/irq.c | 6 - arch/mips/kernel/i8259.c | 15 +- arch/mips/kernel/irq-gic.c | 17 ++- arch/mips/kernel/irq-gt641xx.c | 11 +- arch/mips/kernel/irq-msc01.c | 22 ++-- arch/mips/kernel/irq-rm7000.c | 6 - arch/mips/kernel/irq-rm9000.c | 24 ++-- arch/mips/kernel/irq_cpu.c | 14 +- arch/mips/kernel/irq_txx9.c | 14 +- arch/mips/lasat/interrupt.c | 14 +- arch/mips/loongson/common/bonito-irq.c | 6 - arch/mips/nxp/pnx833x/common/interrupts.c | 33 +++--- arch/mips/nxp/pnx8550/common/int.c | 10 + arch/mips/pmc-sierra/msp71xx/msp_irq_cic.c | 10 + arch/mips/pmc-sierra/msp71xx/msp_irq_slp.c | 9 + arch/mips/powertv/asic/irq_asic.c | 6 - arch/mips/rb532/irq.c | 32 +++-- arch/mips/sgi-ip22/ip22-int.c | 24 ++-- arch/mips/sgi-ip27/ip27-irq.c | 12 +- arch/mips/sgi-ip27/ip27-timer.c | 4 arch/mips/sgi-ip32/ip32-irq.c | 68 +++++++----- arch/mips/sibyte/bcm1480/irq.c | 28 ++--- arch/mips/sibyte/sb1250/irq.c | 28 ++--- arch/mips/sni/a20r.c | 12 +- arch/mips/sni/pcimt.c | 14 +- arch/mips/sni/pcit.c | 12 +- arch/mips/sni/rm200.c | 21 ++- arch/mips/txx9/generic/irq_tx4939.c | 14 +- arch/mips/txx9/jmr3927/irq.c | 6 - arch/mips/txx9/rbtx4927/irq.c | 10 + arch/mips/txx9/rbtx4938/irq.c | 10 + arch/mips/txx9/rbtx4939/irq.c | 6 - arch/mips/vr41xx/common/icu.c | 12 +- arch/mips/vr41xx/common/irq.c | 8 - arch/mn10300/kernel/irq.c | 19 ++- arch/mn10300/kernel/mn10300-serial.c | 5 arch/parisc/include/asm/irq.h | 4 arch/parisc/kernel/irq.c | 31 +++-- arch/powerpc/include/asm/mpic.h | 6 - arch/powerpc/include/asm/qe_ic.h | 6 - arch/powerpc/kernel/crash.c | 4 arch/powerpc/kernel/irq.c | 2 arch/powerpc/platforms/512x/mpc5121_ads_cpld.c | 6 - arch/powerpc/platforms/52xx/media5200.c | 16 +- arch/powerpc/platforms/52xx/mpc52xx_pic.c | 35 ++++-- arch/powerpc/platforms/82xx/pq2ads-pci-pic.c | 6 - arch/powerpc/platforms/85xx/ksi8560.c | 2 arch/powerpc/platforms/85xx/mpc85xx_ads.c | 2 arch/powerpc/platforms/85xx/mpc85xx_ds.c | 2 arch/powerpc/platforms/85xx/sbc8560.c | 2 arch/powerpc/platforms/85xx/socrates_fpga_pic.c | 20 ++- arch/powerpc/platforms/85xx/stx_gp3.c | 2 arch/powerpc/platforms/85xx/tqm85xx.c | 2 arch/powerpc/platforms/86xx/gef_pic.c | 11 +- arch/powerpc/platforms/86xx/pic.c | 2 arch/powerpc/platforms/8xx/m8xx_setup.c | 4 arch/powerpc/platforms/cell/axon_msi.c | 9 + arch/powerpc/platforms/cell/beat_interrupt.c | 12 +- arch/powerpc/platforms/cell/interrupt.c | 12 +- arch/powerpc/platforms/cell/setup.c | 2 arch/powerpc/platforms/cell/spider-pic.c | 15 +- arch/powerpc/platforms/chrp/setup.c | 2 arch/powerpc/platforms/embedded6xx/flipper-pic.c | 12 +- arch/powerpc/platforms/embedded6xx/hlwd-pic.c | 26 ++-- arch/powerpc/platforms/iseries/irq.c | 19 ++- arch/powerpc/platforms/powermac/pic.c | 20 ++- arch/powerpc/platforms/ps3/interrupt.c | 15 +- arch/powerpc/platforms/pseries/setup.c | 2 arch/powerpc/platforms/pseries/xics.c | 28 +++-- arch/powerpc/sysdev/cpm1.c | 9 + arch/powerpc/sysdev/cpm2_pic.c | 18 +-- arch/powerpc/sysdev/fsl_msi.c | 12 +- arch/powerpc/sysdev/i8259.c | 35 +++--- arch/powerpc/sysdev/ipic.c | 15 +- arch/powerpc/sysdev/mpc8xx_pic.c | 16 +- arch/powerpc/sysdev/mpic.c | 35 ++++-- arch/powerpc/sysdev/mpic.h | 4 arch/powerpc/sysdev/mpic_pasemi_msi.c | 14 +- arch/powerpc/sysdev/mpic_u3msi.c | 19 ++- arch/powerpc/sysdev/mv64x60_pic.c | 21 ++- arch/powerpc/sysdev/qe_lib/qe_ic.c | 6 - arch/powerpc/sysdev/tsi108_pci.c | 14 +- arch/powerpc/sysdev/uic.c | 36 +++--- arch/powerpc/sysdev/xilinx_intc.c | 26 ++-- arch/score/kernel/irq.c | 10 + arch/sh/boards/mach-cayman/irq.c | 10 + arch/sh/boards/mach-dreamcast/irq.c | 9 + arch/sh/boards/mach-landisk/irq.c | 6 - arch/sh/boards/mach-microdev/irq.c | 19 ++- arch/sh/boards/mach-se/7206/irq.c | 9 + arch/sh/boards/mach-se/7343/irq.c | 6 - arch/sh/boards/mach-se/7722/irq.c | 8 - arch/sh/boards/mach-se/7724/irq.c | 6 - arch/sh/boards/mach-systemh/irq.c | 16 +- arch/sh/cchips/hd6446x/hd64461.c | 11 +- arch/sh/kernel/cpu/irq/imask.c | 6 - arch/sh/kernel/cpu/irq/intc-sh5.c | 34 +++--- arch/sparc/kernel/irq_64.c | 62 ++++++----- arch/sparc/kernel/pci_msi.c | 13 ++ arch/um/kernel/irq.c | 2 arch/x86/include/asm/hardirq.h | 2 arch/x86/include/asm/hpet.h | 8 - arch/x86/include/asm/i8259.h | 2 arch/x86/kernel/apic/io_apic.c | 125 +++++++++-------------- arch/x86/kernel/hpet.c | 16 +- arch/x86/kernel/i8259.c | 31 +++-- arch/x86/kernel/irq.c | 12 +- arch/x86/kernel/uv_irq.c | 12 +- arch/x86/kernel/visws_quirks.c | 29 ++--- arch/x86/kernel/vmiclock_32.c | 8 - arch/x86/lguest/boot.c | 8 - arch/xtensa/kernel/irq.c | 22 ++-- arch/xtensa/variants/s6000/gpio.c | 18 ++- drivers/dma/ipu/ipu_irq.c | 18 +-- drivers/gpio/langwell_gpio.c | 11 +- drivers/gpio/pl061.c | 19 ++- drivers/gpio/timbgpio.c | 17 +-- drivers/gpio/vr41xx_giu.c | 32 ++--- drivers/mfd/asic3.c | 27 ++-- drivers/mfd/ezx-pcap.c | 12 +- drivers/mfd/htc-egpio.c | 12 +- drivers/mfd/t7l66xb.c | 8 - drivers/mfd/tc6393xb.c | 15 +- drivers/mfd/twl4030-irq.c | 16 +- drivers/mfd/wm831x-irq.c | 18 +-- drivers/misc/sgi-gru/grufile.c | 2 drivers/parisc/dino.c | 12 +- drivers/parisc/eisa.c | 10 + drivers/parisc/gsc.c | 12 +- drivers/parisc/iosapic.c | 16 +- drivers/parisc/superio.c | 10 + drivers/pci/dmar.c | 16 +- drivers/pci/htirq.c | 22 ++-- drivers/pci/msi.c | 13 +- drivers/vlynq/vlynq.c | 23 ++-- drivers/xen/events.c | 38 ++++-- include/linux/dmar.h | 8 - include/linux/htirq.h | 11 +- include/linux/irq.h | 47 ++++---- include/linux/msi.h | 4 kernel/irq/autoprobe.c | 12 +- kernel/irq/chip.c | 60 ++++------- kernel/irq/handle.c | 24 ++-- kernel/irq/internals.h | 16 +- kernel/irq/manage.c | 65 +++++------ kernel/irq/migration.c | 16 +- kernel/irq/pm.c | 4 kernel/irq/resend.c | 8 - kernel/irq/spurious.c | 4 302 files changed, 3131 insertions(+), 2194 deletions(-)
Documentation/DocBook/genericirq.tmpl +12 -12
@@ -233,33 +233,33 @@ are used by the default flow implementations. The following helper functions are implemented (simplified excerpt): <programlisting> -default_enable(irq) +default_enable(desc) { - desc->chip->unmask(irq); + desc->chip->unmask(desc); } -default_disable(irq) +default_disable(desc) { - if (!delay_disable(irq)) - desc->chip->mask(irq); + if (!delay_disable(desc->irq)) + desc->chip->mask(desc); } -default_ack(irq) +default_ack(desc) { - chip->ack(irq); + chip->ack(desc); } -default_mask_ack(irq) +default_mask_ack(desc) { if (chip->mask_ack) { - chip->mask_ack(irq); + chip->mask_ack(desc); } else { - chip->mask(irq); - chip->ack(irq); + chip->mask(desc); + chip->ack(desc); } } -noop(irq) +noop(desc) { }
arch/alpha/kernel/irq.c +4 -3
@@ -46,8 +46,9 @@ int irq_select_affinity(unsigned int irq {static int last_cpu;int cpu = last_cpu +1 ; +struct irq_desc *desc =irq_to_desc (irq); -if (!irq_desc[irq].chip->set_affinity || irq_user_affinity[irq]) +if (!desc->chip->set_affinity || irq_user_affinity[irq])return 1 ; while (!cpu_possible(cpu) ||
@@ -55,8 +56,8 @@ int irq_select_affinity(unsigned int irq cpu = (cpu < (NR_CPUS -1 ) ? cpu +1 :0 ); last_cpu = cpu; -cpumask_copy (irq_desc[irq].affinity,cpumask_of (cpu)); - irq_desc[irq].chip->set_affinity (irq,cpumask_of (cpu)); +cpumask_copy (desc->affinity,cpumask_of (cpu)); + desc->chip->set_affinity (irq,cpumask_of (cpu)); return 0; }#endif /* CONFIG_SMP */
arch/alpha/kernel/irq_alpha.c +2 -2
@@ -218,8 +218,8 @@ process_mcheck_info(unsigned long vector* processed by PALcode, and comes in via entInt vector 1. */ -static void rtc_enable_disable (unsigned int irq) { } -static unsigned int rtc_startup (unsigned int irq) {return 0 ; } +static void rtc_enable_disable (struct irq_desc *desc) { } +static unsigned int rtc_startup (struct irq_desc *desc) {return 0 ; }struct irqaction timer_irqaction = { .handler = timer_interrupt,
arch/alpha/kernel/irq_i8259.c +13 -9
@@ -33,8 +33,10 @@ i8259_update_irq_hw(unsigned int irq, un }inline void -i8259a_enable_irq (unsigned int irq) +i8259a_enable_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq; +spin_lock (&i8259_irq_lock);i8259_update_irq_hw (irq, cached_irq_mask &= ~(1 << irq));spin_unlock (&i8259_irq_lock);
@@ -47,16 +49,18 @@ __i8259a_disable_irq(unsigned int irq) }void -i8259a_disable_irq (unsigned int irq) +i8259a_disable_irq (struct irq_desc *desc) {spin_lock (&i8259_irq_lock); -__i8259a_disable_irq (irq); +__i8259a_disable_irq (desc->irq);spin_unlock (&i8259_irq_lock); }void -i8259a_mask_and_ack_irq (unsigned int irq) +i8259a_mask_and_ack_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq; +spin_lock (&i8259_irq_lock);__i8259a_disable_irq (irq);
@@ -70,17 +74,17 @@ i8259a_mask_and_ack_irq(unsigned int irq }unsigned int -i8259a_startup_irq (unsigned int irq) +i8259a_startup_irq (struct irq_desc *desc) { -i8259a_enable_irq (irq); +i8259a_enable_irq (desc);return 0 ;/* never anything pending */ }void -i8259a_end_irq (unsigned int irq) +i8259a_end_irq (struct irq_desc *desc) { -if (!(irq_desc[irq].status & (IRQ_DISABLED |IRQ_INPROGRESS ))) -i8259a_enable_irq (irq); +if (!(desc->status & (IRQ_DISABLED |IRQ_INPROGRESS ))) +i8259a_enable_irq (desc); }struct irq_chip i8259a_irq_type = {
arch/alpha/kernel/irq_pyxis.c +11 -10
@@ -29,34 +29,35 @@ pyxis_update_irq_hw(unsigned long mask) }static inline void -pyxis_enable_irq (unsigned int irq) +pyxis_enable_irq (struct irq_desc *desc) { -pyxis_update_irq_hw (cached_irq_mask |=1UL << (irq -16 )); +pyxis_update_irq_hw (cached_irq_mask |=1UL << (desc->irq -16 )); }static void -pyxis_disable_irq (unsigned int irq) +pyxis_disable_irq (struct irq_desc *desc) { -pyxis_update_irq_hw (cached_irq_mask &= ~(1UL << (irq -16 ))); +pyxis_update_irq_hw (cached_irq_mask &= ~(1UL << (desc->irq -16 ))); }static unsigned int -pyxis_startup_irq (unsigned int irq) +pyxis_startup_irq (struct irq_desc *desc) { -pyxis_enable_irq (irq); +pyxis_enable_irq (desc);return 0 ; }static void -pyxis_end_irq (unsigned int irq) +pyxis_end_irq (struct irq_desc *desc) { -if (!(irq_desc[irq].status & (IRQ_DISABLED |IRQ_INPROGRESS ))) -pyxis_enable_irq (irq); +if (!(desc->status & (IRQ_DISABLED |IRQ_INPROGRESS ))) +pyxis_enable_irq (desc); }static void -pyxis_mask_and_ack_irq (unsigned int irq) +pyxis_mask_and_ack_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq;unsigned long bit =1UL << (irq -16 );unsigned long mask = cached_irq_mask &= ~bit;
arch/alpha/kernel/irq_srm.c +9 -9
@@ -18,33 +18,33 @@DEFINE_SPINLOCK (srm_irq_lock);static inline void -srm_enable_irq (unsigned int irq) +srm_enable_irq (struct irq_desc *desc) {spin_lock (&srm_irq_lock); -cserve_ena (irq -16 ); +cserve_ena (desc->irq -16 );spin_unlock (&srm_irq_lock); }static void -srm_disable_irq (unsigned int irq) +srm_disable_irq (struct irq_desc *desc) {spin_lock (&srm_irq_lock); -cserve_dis (irq -16 ); +cserve_dis (desc->irq -16 );spin_unlock (&srm_irq_lock); }static unsigned int -srm_startup_irq (unsigned int irq) +srm_startup_irq (struct irq_desc *desc) { -srm_enable_irq (irq); +srm_enable_irq (desc);return 0 ; }static void -srm_end_irq (unsigned int irq) +srm_end_irq (struct irq_desc *desc) { -if (!(irq_desc[irq].status & (IRQ_DISABLED |IRQ_INPROGRESS ))) -srm_enable_irq (irq); +if (!(desc->status & (IRQ_DISABLED |IRQ_INPROGRESS ))) +srm_enable_irq (desc); }/* Handle interrupts from the SRM, assuming no additional weirdness. */
arch/alpha/kernel/sys_alcor.c +14 -14
@@ -44,38 +44,38 @@ alcor_update_irq_hw(unsigned long mask) }static inline void -alcor_enable_irq (unsigned int irq) +alcor_enable_irq (struct irq_desc *desc) { -alcor_update_irq_hw (cached_irq_mask |=1UL << (irq -16 )); +alcor_update_irq_hw (cached_irq_mask |=1UL << (desc->irq -16 )); }static void -alcor_disable_irq (unsigned int irq) +alcor_disable_irq (struct irq_desc *desc) { -alcor_update_irq_hw (cached_irq_mask &= ~(1UL << (irq -16 ))); +alcor_update_irq_hw (cached_irq_mask &= ~(1UL << (desc->irq -16 ))); }static void -alcor_mask_and_ack_irq (unsigned int irq) +alcor_mask_and_ack_irq (struct irq_desc *desc) { -alcor_disable_irq (irq); +alcor_disable_irq (desc);/* On ALCOR/XLT, need to dismiss interrupt via GRU. */ - *(vuip )GRU_INT_CLEAR =1 << (irq -16 );mb (); + *(vuip )GRU_INT_CLEAR =1 << (desc->irq -16 );mb (); *(vuip )GRU_INT_CLEAR =0 ;mb (); }static unsigned int -alcor_startup_irq (unsigned int irq) +alcor_startup_irq (struct irq_desc *desc) { -alcor_enable_irq (irq); +alcor_enable_irq (desc);return 0 ; }static void -alcor_isa_mask_and_ack_irq (unsigned int irq) +alcor_isa_mask_and_ack_irq (struct irq_desc *desc) { -i8259a_mask_and_ack_irq (irq); +i8259a_mask_and_ack_irq (desc);/* On ALCOR/XLT, need to dismiss interrupt via GRU. */ *(vuip )GRU_INT_CLEAR =0x80000000 ;mb ();
@@ -83,10 +83,10 @@ alcor_isa_mask_and_ack_irq(unsigned int }static void -alcor_end_irq (unsigned int irq) +alcor_end_irq (struct irq_desc *desc) { -if (!(irq_desc[irq].status & (IRQ_DISABLED |IRQ_INPROGRESS ))) -alcor_enable_irq (irq); +if (!(desc->status & (IRQ_DISABLED |IRQ_INPROGRESS ))) +alcor_enable_irq (desc); }static struct irq_chip alcor_irq_type = {
arch/alpha/kernel/sys_cabriolet.c +11 -7
@@ -46,29 +46,33 @@ cabriolet_update_irq_hw(unsigned int irq }static inline void -cabriolet_enable_irq (unsigned int irq) +cabriolet_enable_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq; +cabriolet_update_irq_hw (irq, cached_irq_mask &= ~(1UL << irq)); }static void -cabriolet_disable_irq (unsigned int irq) +cabriolet_disable_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq; +cabriolet_update_irq_hw (irq, cached_irq_mask |=1UL << irq); }static unsigned int -cabriolet_startup_irq (unsigned int irq) +cabriolet_startup_irq (struct irq_desc *desc) { -cabriolet_enable_irq (irq); +cabriolet_enable_irq (desc);return 0 ;/* never anything pending */ }static void -cabriolet_end_irq (unsigned int irq) +cabriolet_end_irq (struct irq_desc *desc) { -if (!(irq_desc[irq].status & (IRQ_DISABLED |IRQ_INPROGRESS ))) -cabriolet_enable_irq (irq); +if (!(desc->status & (IRQ_DISABLED |IRQ_INPROGRESS ))) +cabriolet_enable_irq (desc); }static struct irq_chip cabriolet_irq_type = {
arch/alpha/kernel/sys_dp264.c +28 -22
115 lines not on this page · raw message
arch/alpha/kernel/sys_eb64p.c +11 -7
@@ -44,29 +44,33 @@ eb64p_update_irq_hw(unsigned int irq, un }static inline void -eb64p_enable_irq (unsigned int irq) +eb64p_enable_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq; +eb64p_update_irq_hw (irq, cached_irq_mask &= ~(1 << irq)); }static void -eb64p_disable_irq (unsigned int irq) +eb64p_disable_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq; +eb64p_update_irq_hw (irq, cached_irq_mask |=1 << irq); }static unsigned int -eb64p_startup_irq (unsigned int irq) +eb64p_startup_irq (struct irq_desc *desc) { -eb64p_enable_irq (irq); +eb64p_enable_irq (desc);return 0 ;/* never anything pending */ }static void -eb64p_end_irq (unsigned int irq) +eb64p_end_irq (struct irq_desc *desc) { -if (!(irq_desc[irq].status & (IRQ_DISABLED |IRQ_INPROGRESS ))) -eb64p_enable_irq (irq); +if (!(desc->status & (IRQ_DISABLED |IRQ_INPROGRESS ))) +eb64p_enable_irq (desc); }static struct irq_chip eb64p_irq_type = {
arch/alpha/kernel/sys_eiger.c +11 -7
@@ -51,33 +51,37 @@ eiger_update_irq_hw(unsigned long irq, u }static inline void -eiger_enable_irq (unsigned int irq) +eiger_enable_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq;unsigned long mask; + mask = (cached_irq_mask[irq >=64 ] &= ~(1UL << (irq &63 )));eiger_update_irq_hw (irq, mask); }static void -eiger_disable_irq (unsigned int irq) +eiger_disable_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq;unsigned long mask; + mask = (cached_irq_mask[irq >=64 ] |=1UL << (irq &63 ));eiger_update_irq_hw (irq, mask); }static unsigned int -eiger_startup_irq (unsigned int irq) +eiger_startup_irq (struct irq_desc *desc) { -eiger_enable_irq (irq); +eiger_enable_irq (desc);return 0 ;/* never anything pending */ }static void -eiger_end_irq (unsigned int irq) +eiger_end_irq (struct irq_desc *desc) { -if (!(irq_desc[irq].status & (IRQ_DISABLED |IRQ_INPROGRESS ))) -eiger_enable_irq (irq); +if (!(irq_desc->status & (IRQ_DISABLED |IRQ_INPROGRESS ))) +eiger_enable_irq (desc); }static struct irq_chip eiger_irq_type = {
arch/alpha/kernel/sys_jensen.c +20 -20
@@ -63,59 +63,59 @@*/ static unsigned int -jensen_local_startup (unsigned int irq) +jensen_local_startup (struct irq_desc *desc) {/* the parport is really hw IRQ 1, silly Jensen. */ -if (irq ==7 ) -i8259a_startup_irq (1 ); +if (desc->irq ==7 ) +i8259a_startup_irq (irq_to_desc (1 ));else /* * For all true local interrupts, set the flag that prevents * the IPL from being dropped during handler processing. */ -if (irq_desc[irq].action) - irq_desc[irq].action->flags |=IRQF_DISABLED ; +if (desc->action) + desc->action->flags |=IRQF_DISABLED ;return 0 ; }static void -jensen_local_shutdown (unsigned int irq) +jensen_local_shutdown (struct irq_desc *desc) {/* the parport is really hw IRQ 1, silly Jensen. */ -if (irq ==7 ) -i8259a_disable_irq (1 ); +if (desc->irq ==7 ) +i8259a_disable_irq (irq_to_desc (1 )); }static void -jensen_local_enable (unsigned int irq) +jensen_local_enable (struct irq_desc *desc) {/* the parport is really hw IRQ 1, silly Jensen. */ -if (irq ==7 ) -i8259a_enable_irq (1 ); +if (desc->irq ==7 ) +i8259a_enable_irq (irq_to_desc (1 )); }static void -jensen_local_disable (unsigned int irq) +jensen_local_disable (struct irq_desc *desc) {/* the parport is really hw IRQ 1, silly Jensen. */ -if (irq ==7 ) -i8259a_disable_irq (1 ); +if (desc->irq ==7 ) +i8259a_disable_irq (irq_to_desc (1 )); }static void -jensen_local_ack (unsigned int irq) +jensen_local_ack (struct irq_desc *desc) {/* the parport is really hw IRQ 1, silly Jensen. */ -if (irq ==7 ) -i8259a_mask_and_ack_irq (1 ); +if (desc->irq ==7 ) +i8259a_mask_and_ack_irq (irq_to_desc (1 )); }static void -jensen_local_end (unsigned int irq) +jensen_local_end (struct irq_desc *desc) {/* the parport is really hw IRQ 1, silly Jensen. */ -if (irq ==7 ) -i8259a_end_irq (1 ); +if (desc->irq ==7 ) +i8259a_end_irq (irq_to_desc (1 )); }static struct irq_chip jensen_local_irq_type = {
arch/alpha/kernel/sys_marvel.c +13 -13
@@ -104,15 +104,15 @@ io7_get_irq_ctl(unsigned int irq, struct }static void -io7_enable_irq (unsigned int irq) +io7_enable_irq (struct irq_desc *desc) {volatile unsigned long *ctl;struct io7 *io7; - ctl =io7_get_irq_ctl (irq, &io7); + ctl =io7_get_irq_ctl (desc->irq, &io7);if (!ctl || !io7) {printk (KERN_ERR "%s: get_ctl failed for irq %x\n" , - __func__, irq); + __func__, desc->irq);return ; }
@@ -124,15 +124,15 @@ io7_enable_irq(unsigned int irq) }static void -io7_disable_irq (unsigned int irq) +io7_disable_irq (struct irq_desc *desc) {volatile unsigned long *ctl;struct io7 *io7; - ctl =io7_get_irq_ctl (irq, &io7); + ctl =io7_get_irq_ctl (desc->irq, &io7);if (!ctl || !io7) {printk (KERN_ERR "%s: get_ctl failed for irq %x\n" , - __func__, irq); + __func__, desc->irq);return ; }
@@ -144,27 +144,27 @@ io7_disable_irq(unsigned int irq) }static unsigned int -io7_startup_irq (unsigned int irq) +io7_startup_irq (struct irq_desc *desc) { -io7_enable_irq (irq); +io7_enable_irq (desc);return 0 ;/* never anything pending */ }static void -io7_end_irq (unsigned int irq) +io7_end_irq (struct irq_desc *desc) { -if (!(irq_desc[irq].status & (IRQ_DISABLED |IRQ_INPROGRESS ))) -io7_enable_irq (irq); +if (!(desc->status & (IRQ_DISABLED |IRQ_INPROGRESS ))) +io7_enable_irq (desc); }static void -marvel_irq_noop (unsigned int irq) +marvel_irq_noop (struct irq_desc *desc) {return ; }static unsigned int -marvel_irq_noop_return (unsigned int irq) +marvel_irq_noop_return (struct irq_desc *desc) {return 0 ; }
arch/alpha/kernel/sys_mikasa.c +9 -9
@@ -43,29 +43,29 @@ mikasa_update_irq_hw(int mask) }static inline void -mikasa_enable_irq (unsigned int irq) +mikasa_enable_irq (struct irq_desc *desc) { -mikasa_update_irq_hw (cached_irq_mask |=1 << (irq -16 )); +mikasa_update_irq_hw (cached_irq_mask |=1 << (desc->irq -16 )); }static void -mikasa_disable_irq (unsigned int irq) +mikasa_disable_irq (struct irq_desc *desc) { -mikasa_update_irq_hw (cached_irq_mask &= ~(1 << (irq -16 ))); +mikasa_update_irq_hw (cached_irq_mask &= ~(1 << (desc->irq -16 ))); }static unsigned int -mikasa_startup_irq (unsigned int irq) +mikasa_startup_irq (struct irq_desc *desc) { -mikasa_enable_irq (irq); +mikasa_enable_irq (desc);return 0 ; }static void -mikasa_end_irq (unsigned int irq) +mikasa_end_irq (struct irq_desc *desc) { -if (!(irq_desc[irq].status & (IRQ_DISABLED |IRQ_INPROGRESS ))) -mikasa_enable_irq (irq); +if (!(desc->status & (IRQ_DISABLED |IRQ_INPROGRESS ))) +mikasa_enable_irq (desc); }static struct irq_chip mikasa_irq_type = {
arch/alpha/kernel/sys_noritake.c +11 -7
@@ -48,29 +48,33 @@ noritake_update_irq_hw(int irq, int mask }static void -noritake_enable_irq (unsigned int irq) +noritake_enable_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq; +noritake_update_irq_hw (irq, cached_irq_mask |=1 << (irq -16 )); }static void -noritake_disable_irq (unsigned int irq) +noritake_disable_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq; +noritake_update_irq_hw (irq, cached_irq_mask &= ~(1 << (irq -16 ))); }static unsigned int -noritake_startup_irq (unsigned int irq) +noritake_startup_irq (struct irq_desc *desc) { -noritake_enable_irq (irq); +noritake_enable_irq (desc);return 0 ; }static void -noritake_end_irq (unsigned int irq) +noritake_end_irq (struct irq_desc *desc) { -if (!(irq_desc[irq].status & (IRQ_DISABLED |IRQ_INPROGRESS ))) -noritake_enable_irq (irq); +if (!(desc->status & (IRQ_DISABLED |IRQ_INPROGRESS ))) +noritake_enable_irq (desc); }static struct irq_chip noritake_irq_type = {
arch/alpha/kernel/sys_rawhide.c +11 -8
@@ -56,8 +56,9 @@ rawhide_update_irq_hw(int hose, int mask (((h) < MCPCIA_MAX_HOSES) && (cached_irq_masks[(h)] != 0))static inline void -rawhide_enable_irq (unsigned int irq) +rawhide_enable_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq;unsigned int mask, hose; irq -=16 ;
@@ -76,8 +77,9 @@ rawhide_enable_irq(unsigned int irq) }static void -rawhide_disable_irq (unsigned int irq) +rawhide_disable_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq;unsigned int mask, hose; irq -=16 ;
@@ -96,8 +98,9 @@ rawhide_disable_irq(unsigned int irq) }static void -rawhide_mask_and_ack_irq (unsigned int irq) +rawhide_mask_and_ack_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq;unsigned int mask, mask1, hose; irq -=16 ;
@@ -122,17 +125,17 @@ rawhide_mask_and_ack_irq(unsigned int ir }static unsigned int -rawhide_startup_irq (unsigned int irq) +rawhide_startup_irq (struct irq_desc *desc) { -rawhide_enable_irq (irq); +rawhide_enable_irq (desc);return 0 ; }static void -rawhide_end_irq (unsigned int irq) +rawhide_end_irq (struct irq_desc *desc) { -if (!(irq_desc[irq].status & (IRQ_DISABLED |IRQ_INPROGRESS ))) -rawhide_enable_irq (irq); +if (!(desc->status & (IRQ_DISABLED |IRQ_INPROGRESS ))) +rawhide_enable_irq (desc); }static struct irq_chip rawhide_irq_type = {
arch/alpha/kernel/sys_rx164.c +9 -9
@@ -47,29 +47,29 @@ rx164_update_irq_hw(unsigned long mask) }static inline void -rx164_enable_irq (unsigned int irq) +rx164_enable_irq (struct irq_desc *desc) { -rx164_update_irq_hw (cached_irq_mask |=1UL << (irq -16 )); +rx164_update_irq_hw (cached_irq_mask |=1UL << (desc->irq -16 )); }static void -rx164_disable_irq (unsigned int irq) +rx164_disable_irq (struct irq_desc *desc) { -rx164_update_irq_hw (cached_irq_mask &= ~(1UL << (irq -16 ))); +rx164_update_irq_hw (cached_irq_mask &= ~(1UL << (desc->irq -16 ))); }static unsigned int -rx164_startup_irq (unsigned int irq) +rx164_startup_irq (struct irq_desc *desc) { -rx164_enable_irq (irq); +rx164_enable_irq (desc);return 0 ; }static void -rx164_end_irq (unsigned int irq) +rx164_end_irq (struct irq_desc *desc) { -if (!(irq_desc[irq].status & (IRQ_DISABLED |IRQ_INPROGRESS ))) -rx164_enable_irq (irq); +if (!(desc_.status & (IRQ_DISABLED |IRQ_INPROGRESS ))) +rx164_enable_irq (desc); }static struct irq_chip rx164_irq_type = {
arch/alpha/kernel/sys_sable.c +13 -13
@@ -443,57 +443,57 @@ lynx_swizzle(struct pci_dev *dev, u8 *pi/* GENERIC irq routines */ static inline void -sable_lynx_enable_irq (unsigned int irq) +sable_lynx_enable_irq (struct irq_desc *desc) {unsigned long bit, mask; - bit = sable_lynx_irq_swizzle->irq_to_mask[irq]; + bit = sable_lynx_irq_swizzle->irq_to_mask[desc->irq];spin_lock (&sable_lynx_irq_lock); mask = sable_lynx_irq_swizzle->shadow_mask &= ~(1UL << bit); sable_lynx_irq_swizzle->update_irq_hw (bit, mask);spin_unlock (&sable_lynx_irq_lock);#if 0 printk ("%s: mask 0x%lx bit 0x%lx irq 0x%x\n" , - __func__, mask, bit, irq); + __func__, mask, bit, desc->irq);#endif }static void -sable_lynx_disable_irq (unsigned int irq) +sable_lynx_disable_irq (struct irq_desc *desc) {unsigned long bit, mask; - bit = sable_lynx_irq_swizzle->irq_to_mask[irq]; + bit = sable_lynx_irq_swizzle->irq_to_mask[desc->irq];spin_lock (&sable_lynx_irq_lock); mask = sable_lynx_irq_swizzle->shadow_mask |=1UL << bit; sable_lynx_irq_swizzle->update_irq_hw (bit, mask);spin_unlock (&sable_lynx_irq_lock);#if 0 printk ("%s: mask 0x%lx bit 0x%lx irq 0x%x\n" , - __func__, mask, bit, irq); + __func__, mask, bit, desc->irq);#endif }static unsigned int -sable_lynx_startup_irq (unsigned int irq) +sable_lynx_startup_irq (struct irq_desc *desc) { -sable_lynx_enable_irq (irq); +sable_lynx_enable_irq (desc);return 0 ; }static void -sable_lynx_end_irq (unsigned int irq) +sable_lynx_end_irq (struct irq_desc *desc) { -if (!(irq_desc[irq].status & (IRQ_DISABLED |IRQ_INPROGRESS ))) -sable_lynx_enable_irq (irq); +if (!(desc->status & (IRQ_DISABLED |IRQ_INPROGRESS ))) +sable_lynx_enable_irq (desc); }static void -sable_lynx_mask_and_ack_irq (unsigned int irq) +sable_lynx_mask_and_ack_irq (struct irq_desc *desc) {unsigned long bit, mask; - bit = sable_lynx_irq_swizzle->irq_to_mask[irq]; + bit = sable_lynx_irq_swizzle->irq_to_mask[desc->irq];spin_lock (&sable_lynx_irq_lock); mask = sable_lynx_irq_swizzle->shadow_mask |=1UL << bit; sable_lynx_irq_swizzle->update_irq_hw (bit, mask);
arch/alpha/kernel/sys_takara.c +11 -7
@@ -45,33 +45,37 @@ takara_update_irq_hw(unsigned long irq, }static inline void -takara_enable_irq (unsigned int irq) +takara_enable_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq;unsigned long mask; + mask = (cached_irq_mask[irq >=64 ] &= ~(1UL << (irq &63 )));takara_update_irq_hw (irq, mask); }static void -takara_disable_irq (unsigned int irq) +takara_disable_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq;unsigned long mask; + mask = (cached_irq_mask[irq >=64 ] |=1UL << (irq &63 ));takara_update_irq_hw (irq, mask); }static unsigned int -takara_startup_irq (unsigned int irq) +takara_startup_irq (struct irq_desc *desc) { -takara_enable_irq (irq); +takara_enable_irq (desc);return 0 ;/* never anything pending */ }static void -takara_end_irq (unsigned int irq) +takara_end_irq (struct irq_desc *desc) { -if (!(irq_desc[irq].status & (IRQ_DISABLED |IRQ_INPROGRESS ))) -takara_enable_irq (irq); +if (!(desc->status & (IRQ_DISABLED |IRQ_INPROGRESS ))) +takara_enable_irq (desc); }static struct irq_chip takara_irq_type = {
arch/alpha/kernel/sys_titan.c +11 -11
@@ -112,35 +112,35 @@ titan_update_irq_hw(unsigned long mask) }static inline void -titan_enable_irq (unsigned int irq) +titan_enable_irq (struct irq_desc *desc) {spin_lock (&titan_irq_lock); - titan_cached_irq_mask |=1UL << (irq -16 ); + titan_cached_irq_mask |=1UL << (desc->irq -16 );titan_update_irq_hw (titan_cached_irq_mask);spin_unlock (&titan_irq_lock); }static inline void -titan_disable_irq (unsigned int irq) +titan_disable_irq (struct irq_desc *desc) {spin_lock (&titan_irq_lock); - titan_cached_irq_mask &= ~(1UL << (irq -16 )); + titan_cached_irq_mask &= ~(1UL << (desc->irq -16 ));titan_update_irq_hw (titan_cached_irq_mask);spin_unlock (&titan_irq_lock); }static unsigned int -titan_startup_irq (unsigned int irq) +titan_startup_irq (struct irq_desc *desc) { -titan_enable_irq (irq); +titan_enable_irq (desc);return 0 ;/* never anything pending */ }static void -titan_end_irq (unsigned int irq) +titan_end_irq (struct irq_desc *desc) { -if (!(irq_desc[irq].status & (IRQ_DISABLED |IRQ_INPROGRESS ))) -titan_enable_irq (irq); +if (!(desc->status & (IRQ_DISABLED |IRQ_INPROGRESS ))) +titan_enable_irq (desc); } static void
@@ -158,10 +158,10 @@ titan_cpu_set_irq_affinity(unsigned int }static int -titan_set_irq_affinity (unsigned int irq,const struct cpumask *affinity) +titan_set_irq_affinity (struct irq_desc *desc,const struct cpumask *affinity) {spin_lock (&titan_irq_lock); -titan_cpu_set_irq_affinity (irq -16 , *affinity); +titan_cpu_set_irq_affinity (desc->irq -16 , *affinity);titan_update_irq_hw (titan_cached_irq_mask);spin_unlock (&titan_irq_lock);
arch/alpha/kernel/sys_wildfire.c +19 -13
@@ -104,10 +104,12 @@ wildfire_init_irq_hw(void) }static void -wildfire_enable_irq (unsigned int irq) +wildfire_enable_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq; +if (irq <16 ) -i8259a_enable_irq (irq); +i8259a_enable_irq (desc);spin_lock (&wildfire_irq_lock);set_bit (irq, &cached_irq_mask);
@@ -116,10 +118,12 @@ wildfire_enable_irq(unsigned int irq) }static void -wildfire_disable_irq (unsigned int irq) +wildfire_disable_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq; +if (irq <16 ) -i8259a_disable_irq (irq); +i8259a_disable_irq (desc);spin_lock (&wildfire_irq_lock);clear_bit (irq, &cached_irq_mask);
@@ -128,10 +132,12 @@ wildfire_disable_irq(unsigned int irq) }static void -wildfire_mask_and_ack_irq (unsigned int irq) +wildfire_mask_and_ack_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq; +if (irq <16 ) -i8259a_mask_and_ack_irq (irq); +i8259a_mask_and_ack_irq (desc);spin_lock (&wildfire_irq_lock);clear_bit (irq, &cached_irq_mask);
@@ -140,21 +146,21 @@ wildfire_mask_and_ack_irq(unsigned int i }static unsigned int -wildfire_startup_irq (unsigned int irq) +wildfire_startup_irq (struct irq_desc *desc) { -wildfire_enable_irq (irq); +wildfire_enable_irq (desc);return 0 ;/* never anything pending */ }static void -wildfire_end_irq (unsigned int irq) +wildfire_end_irq (struct irq_desc *desc) {#if 0 -if (!irq_desc[irq].action) -printk ("got irq %d\n" , irq); +if (!desc->action) +printk ("got irq %d\n" , desc->irq);#endif -if (!(irq_desc[irq].status & (IRQ_DISABLED |IRQ_INPROGRESS ))) -wildfire_enable_irq (irq); +if (!(desc->status & (IRQ_DISABLED |IRQ_INPROGRESS ))) +wildfire_enable_irq (desc); }static struct irq_chip wildfire_irq_type = {
arch/arm/common/gic.c +12 -8
@@ -80,8 +80,9 @@ static inline unsigned int gic_irq(unsig* our "acknowledge" routine disable the interrupt, then mark it as * complete. */ -static void gic_ack_irq (unsigned int irq) +static void gic_ack_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq;u32 mask =1 << (irq %32 );spin_lock (&irq_controller_lock);
@@ -90,8 +91,9 @@ static void gic_ack_irq(unsigned int irqspin_unlock (&irq_controller_lock); } -static void gic_mask_irq (unsigned int irq) +static void gic_mask_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq;u32 mask =1 << (irq %32 );spin_lock (&irq_controller_lock);
@@ -99,8 +101,9 @@ static void gic_mask_irq(unsigned int irspin_unlock (&irq_controller_lock); } -static void gic_unmask_irq (unsigned int irq) +static void gic_unmask_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq;u32 mask =1 << (irq %32 );spin_lock (&irq_controller_lock);
@@ -109,8 +112,9 @@ static void gic_unmask_irq(unsigned int }#ifdef CONFIG_SMP -static int gic_set_cpu (unsigned int irq,const struct cpumask *mask_val) +static int gic_set_cpu (struct irq_desc *desc,const struct cpumask *mask_val) { +unsigned int irq = desc->irq;void __iomem *reg =gic_dist_base (irq) +GIC_DIST_TARGET + (gic_irq (irq) & ~3 );unsigned int shift = (irq %4 ) *8 ;unsigned int cpu =cpumask_first (mask_val);
@@ -129,13 +133,13 @@ static int gic_set_cpu(unsigned int irq,static void gic_handle_cascade_irq (unsigned int irq,struct irq_desc *desc) { -struct gic_chip_data *chip_data =get_irq_data (irq); -struct irq_chip *chip =get_irq_chip (irq); +struct gic_chip_data *chip_data =get_irq_desc_data (desc); +struct irq_chip *chip =get_irq_desc_chip (desc);unsigned int cascade_irq, gic_irq;unsigned long status;/* primary controller ack'ing */ - chip->ack (irq); + chip->ack (desc);spin_lock (&irq_controller_lock); status =readl (chip_data->cpu_base +GIC_CPU_INTACK );
@@ -153,7 +157,7 @@ static void gic_handle_cascade_irq(unsig out:/* primary controller unmasking */ - chip->unmask (irq); + chip->unmask (desc); }static struct irq_chip gic_chip = {
arch/arm/common/it8152.c +6 -2
@@ -32,8 +32,10 @@#define MAX_SLOTS 21 -static void it8152_mask_irq (unsigned int irq) +static void it8152_mask_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq; +if (irq >=IT8152_LD_IRQ (0 )) { __raw_writel((__raw_readl(IT8152_INTC_LDCNIMR) | (1 << (irq - IT8152_LD_IRQ(0)))),
@@ -49,8 +51,10 @@ static void it8152_mask_irq(unsigned int } } -static void it8152_unmask_irq (unsigned int irq) +static void it8152_unmask_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq; +if (irq >=IT8152_LD_IRQ (0 )) { __raw_writel((__raw_readl(IT8152_INTC_LDCNIMR) & ~(1 << (irq - IT8152_LD_IRQ(0)))),
arch/arm/common/locomo.c +66 -37
251 lines not on this page · raw message
arch/arm/common/sa1111.c +33 -23
146 lines not on this page · raw message
arch/arm/common/vic.c +14 -7
@@ -28,25 +28,31 @@#include <asm/mach/irq.h> #include <asm/hardware/vic.h> -static void vic_ack_irq (unsigned int irq) +static void vic_ack_irq (struct irq_desc *desc) { -void __iomem *base =get_irq_chip_data (irq); +unsigned int irq = desc->irq; +void __iomem *base =get_irq_desc_chip_data (desc); + irq &=31 ;writel (1 << irq, base +VIC_INT_ENABLE_CLEAR );/* moreover, clear the soft-triggered, in case it was the reason */ writel (1 << irq, base +VIC_INT_SOFT_CLEAR ); } -static void vic_mask_irq (unsigned int irq) +static void vic_mask_irq (struct irq_desc *desc) { -void __iomem *base =get_irq_chip_data (irq); +unsigned int irq = desc->irq; +void __iomem *base =get_irq_desc_chip_data (desc); + irq &=31 ;writel (1 << irq, base +VIC_INT_ENABLE_CLEAR ); } -static void vic_unmask_irq (unsigned int irq) +static void vic_unmask_irq (struct irq_desc *desc) { -void __iomem *base =get_irq_chip_data (irq); +unsigned int irq = desc->irq; +void __iomem *base =get_irq_desc_chip_data (irq); + irq &=31 ;writel (1 << irq, base +VIC_INT_ENABLE ); }
@@ -236,8 +242,9 @@ static struct vic_device *vic_from_irq(ureturn NULL ; } -static int vic_set_wake (unsigned int irq,unsigned int on) +static int vic_set_wake (struct irq_desc *desc,unsigned int on) { +unsigned int irq = desc->irq;struct vic_device *v =vic_from_irq (irq);unsigned int off = irq &31 ;u32 bit =1 << off;
arch/arm/kernel/ecard.c +7 -5
@@ -443,8 +443,9 @@ static expansioncard_ops_t ecard_default* * They are not meant to be called directly, but via enable/disable_irq. */ -static void ecard_irq_unmask (unsigned int irqnr) +static void ecard_irq_unmask (struct irq_desc *desc) { +unsigned int irqnr = desc->irq;ecard_t *ec =slot_to_ecard (irqnr -32 );if (ec) {
@@ -459,8 +460,9 @@ static void ecard_irq_unmask(unsigned in } } -static void ecard_irq_mask (unsigned int irqnr) +static void ecard_irq_mask (struct irq_desc *desc) { +unsigned int irqnr = desc->irq;ecard_t *ec =slot_to_ecard (irqnr -32 );if (ec) {
@@ -551,7 +553,7 @@ static void ecard_check_lockup(struct irprintk (KERN_ERR "\nInterrupt lockup detected - " "disabling all expansion card interrupts\n" ); - desc->chip->mask (IRQ_EXPANSIONCARD ); + desc->chip->mask (irq_to_desc (IRQ_EXPANSIONCARD ));ecard_dump_irq_state (); } }else
@@ -574,7 +576,7 @@ ecard_irq_handler(unsigned int irq, struecard_t *ec;int called =0 ; - desc->chip->mask (irq); + desc->chip->mask (desc);for (ec = cards; ec; ec = ec->next) {int pending;
@@ -591,7 +593,7 @@ ecard_irq_handler(unsigned int irq, stru called ++; } } - desc->chip->unmask (irq); + desc->chip->unmask (desc);if (called ==0 )ecard_check_lockup (desc);
arch/arm/kernel/irq.c +1 -1
@@ -167,7 +167,7 @@ static void route_irq(struct irq_desc *dpr_debug ("IRQ%u: moving from cpu%u to cpu%u\n" , irq, desc->node, cpu);raw_spin_lock_irq (&desc->lock); - desc->chip->set_affinity (irq,cpumask_of (cpu)); + desc->chip->set_affinity (desc,cpumask_of (cpu));raw_spin_unlock_irq (&desc->lock); }
arch/arm/mach-aaec2000/core.c +3 -3
@@ -67,17 +67,17 @@ void __init aaec2000_map_io(void)/* * Interrupt handling routines */ -static void aaec2000_int_ack (unsigned int irq) +static void aaec2000_int_ack (struct irq_desc *desc) {IRQ_INTSR =1 << irq; } -static void aaec2000_int_mask (unsigned int irq) +static void aaec2000_int_mask (struct irq_desc *desc) {IRQ_INTENC |= (1 << irq); } -static void aaec2000_int_unmask (unsigned int irq) +static void aaec2000_int_unmask (struct irq_desc *desc) {IRQ_INTENS |= (1 << irq); }
arch/arm/mach-at91/gpio.c +9 -6
@@ -274,8 +274,9 @@ EXPORT_SYMBOL(at91_get_gpio_value);static u32 wakeups[MAX_GPIO_BANKS ];static u32 backups[MAX_GPIO_BANKS ]; -static int gpio_irq_set_wake (unsigned pin,unsigned state) +static int gpio_irq_set_wake (struct irq_desc *desc,unsigned state) { +unsigned int pin = desc->irq;unsigned mask =pin_to_mask (pin);unsigned bank = (pin -PIN_BASE ) /32 ;
@@ -344,8 +345,9 @@ void at91_gpio_resume(void)* IRQ0..IRQ6 should be configurable, e.g. level vs edge triggering. */ -static void gpio_irq_mask (unsigned pin) +static void gpio_irq_mask (struct irq_desc *desc) { +unsigned int pin = desc->irq;void __iomem *pio =pin_to_controller (pin);unsigned mask =pin_to_mask (pin);
@@ -353,8 +355,9 @@ static void gpio_irq_mask(unsigned pin)__raw_writel (mask, pio +PIO_IDR ); } -static void gpio_irq_unmask (unsigned pin) +static void gpio_irq_unmask (struct irq_desc *desc) { +unsigned int pin = desc->irq;void __iomem *pio =pin_to_controller (pin);unsigned mask =pin_to_mask (pin);
@@ -362,7 +365,7 @@ static void gpio_irq_unmask(unsigned pin__raw_writel (mask, pio +PIO_IER ); } -static int gpio_irq_type (unsigned pin,unsigned type) +static int gpio_irq_type (struct irq_desc *desc,unsigned type) {switch (type) {case IRQ_TYPE_NONE :
@@ -393,7 +396,7 @@ static void gpio_irq_handler(unsigned ir pio = at91_gpio->regbase;/* temporarily mask (level sensitive) parent IRQ */ - desc->chip->ack (irq); + desc->chip->ack (desc);for (;;) {/* Reading ISR acks pending (edge triggered) GPIO interrupts. * When there none are pending, we're finished unless we need
@@ -429,7 +432,7 @@ static void gpio_irq_handler(unsigned ir isr >>=1 ; } } - desc->chip->unmask (irq); + desc->chip->unmask (desc);/* now it may re-trigger */ }
arch/arm/mach-at91/irq.c +11 -4
@@ -34,14 +34,18 @@#include <asm/mach/map.h> -static void at91_aic_mask_irq (unsigned int irq) +static void at91_aic_mask_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq; +/* Disable interrupt on AIC */ at91_sys_write (AT91_AIC_IDCR ,1 << irq); } -static void at91_aic_unmask_irq (unsigned int irq) +static void at91_aic_unmask_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq; +/* Enable interrupt on AIC */ at91_sys_write (AT91_AIC_IECR ,1 << irq); }
@@ -50,8 +54,9 @@ unsigned int at91_extern_irq;#define is_extern_irq (irq) ((1 << (irq)) & at91_extern_irq) -static int at91_aic_set_type (unsigned irq,unsigned type) +static int at91_aic_set_type (struct irq_desc *desc,unsigned type) { +unsigned int irq = desc->irq;unsigned int smr, srctype;switch (type) {
@@ -87,8 +92,10 @@ static int at91_aic_set_type(unsigned irstatic u32 wakeups;static u32 backups; -static int at91_aic_set_wake (unsigned irq,unsigned value) +static int at91_aic_set_wake (struct irq_desc *desc,unsigned value) { +unsigned int irq = desc->irq; +if (unlikely (irq >=32 ))return -EINVAL ;
arch/arm/mach-bcmring/irq.c +18 -6
@@ -30,38 +30,50 @@#include <mach/csp/intcHw_reg.h> #include <mach/csp/mm_io.h> -static void bcmring_mask_irq0 (unsigned int irq) +static void bcmring_mask_irq0 (struct irq_desc *desc) { +unsigned int irq = desc->irq; +writel (1 << (irq -IRQ_INTC0_START ),MM_IO_BASE_INTC0 +INTCHW_INTENCLEAR ); } -static void bcmring_unmask_irq0 (unsigned int irq) +static void bcmring_unmask_irq0 (struct irq_desc *desc) { +unsigned int irq = desc->irq; +writel (1 << (irq -IRQ_INTC0_START ),MM_IO_BASE_INTC0 +INTCHW_INTENABLE ); } -static void bcmring_mask_irq1 (unsigned int irq) +static void bcmring_mask_irq1 (struct irq_desc *desc) { +unsigned int irq = desc->irq; +writel (1 << (irq -IRQ_INTC1_START ),MM_IO_BASE_INTC1 +INTCHW_INTENCLEAR ); } -static void bcmring_unmask_irq1 (unsigned int irq) +static void bcmring_unmask_irq1 (struct irq_desc *desc) { +unsigned int irq = desc->irq; +writel (1 << (irq -IRQ_INTC1_START ),MM_IO_BASE_INTC1 +INTCHW_INTENABLE ); } -static void bcmring_mask_irq2 (unsigned int irq) +static void bcmring_mask_irq2 (struct irq_desc *desc) { +unsigned int irq = desc->irq; +writel (1 << (irq -IRQ_SINTC_START ),MM_IO_BASE_SINTC +INTCHW_INTENCLEAR ); } -static void bcmring_unmask_irq2 (unsigned int irq) +static void bcmring_unmask_irq2 (struct irq_desc *desc) { +unsigned int irq = desc->irq; +writel (1 << (irq -IRQ_SINTC_START ),MM_IO_BASE_SINTC +INTCHW_INTENABLE ); }
arch/arm/mach-clps711x/irq.c +12 -6
@@ -27,8 +27,9 @@#include <asm/hardware/clps7111.h> -static void int1_mask (unsigned int irq) +static void int1_mask (struct irq_desc *desc) { +unsigned int irq = desc->irq;u32 intmr1; intmr1 =clps_readl (INTMR1 );
@@ -36,8 +37,9 @@ static void int1_mask(unsigned int irq)clps_writel (intmr1,INTMR1 ); } -static void int1_ack (unsigned int irq) +static void int1_ack (struct irq_desc *desc) { +unsigned int irq = desc->irq;u32 intmr1; intmr1 =clps_readl (INTMR1 );
@@ -54,8 +56,9 @@ static void int1_ack(unsigned int irq) } } -static void int1_unmask (unsigned int irq) +static void int1_unmask (struct irq_desc *desc) { +unsigned int irq = desc->irq;u32 intmr1; intmr1 =clps_readl (INTMR1 );
@@ -69,8 +72,9 @@ static struct irq_chip int1_chip = { .unmask = int1_unmask, }; -static void int2_mask (unsigned int irq) +static void int2_mask (struct irq_desc *desc) { +unsigned int irq = desc->irq;u32 intmr2; intmr2 =clps_readl (INTMR2 );
@@ -78,8 +82,9 @@ static void int2_mask(unsigned int irq)clps_writel (intmr2,INTMR2 ); } -static void int2_ack (unsigned int irq) +static void int2_ack (struct irq_desc *desc) { +unsigned int irq = desc->irq;u32 intmr2; intmr2 =clps_readl (INTMR2 );
@@ -91,8 +96,9 @@ static void int2_ack(unsigned int irq) } } -static void int2_unmask (unsigned int irq) +static void int2_unmask (struct irq_desc *desc) { +unsigned int irq = desc->irq;u32 intmr2; intmr2 =clps_readl (INTMR2 );
arch/arm/mach-davinci/cp_intc.c +9 -5
@@ -27,14 +27,16 @@ static inline void cp_intc_write(unsigne__raw_writel (value, cp_intc_base + offset); } -static void cp_intc_ack_irq (unsigned int irq) +static void cp_intc_ack_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq;cp_intc_write (irq,CP_INTC_SYS_STAT_IDX_CLR ); }/* Disable interrupt */ -static void cp_intc_mask_irq (unsigned int irq) +static void cp_intc_mask_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq;/* XXX don't know why we need to disable nIRQ here... */ cp_intc_write (1 ,CP_INTC_HOST_ENABLE_IDX_CLR );cp_intc_write (irq,CP_INTC_SYS_ENABLE_IDX_CLR );
@@ -42,13 +44,15 @@ static void cp_intc_mask_irq(unsigned in }/* Enable interrupt */ -static void cp_intc_unmask_irq (unsigned int irq) +static void cp_intc_unmask_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq;cp_intc_write (irq,CP_INTC_SYS_ENABLE_IDX_SET ); } -static int cp_intc_set_irq_type (unsigned int irq,unsigned int flow_type) +static int cp_intc_set_irq_type (struct irq_desc *desc,unsigned int flow_type) { +unsigned int irq = desc->irq;unsigned reg =BIT_WORD (irq);unsigned mask =BIT_MASK (irq);unsigned polarity =cp_intc_read (CP_INTC_SYS_POLARITY (reg));
@@ -86,7 +90,7 @@ static int cp_intc_set_irq_type(unsigned* generic drivers which call {enable|disable}_irq_wake for * wake up interrupt sources (eg RTC on DA850). */ -static int cp_intc_set_wake (unsigned int irq,unsigned int on) +static int cp_intc_set_wake (struct irq_desc *desc,unsigned int on) {return 0 ; }
arch/arm/mach-davinci/gpio.c +16 -16
@@ -159,20 +159,20 @@ pure_initcall(davinci_gpio_setup);* serve as EDMA event triggers. */ -static void gpio_irq_disable (unsigned irq) +static void gpio_irq_disable (struct irq_desc *desc) { -struct gpio_controller *__iomem g =get_irq_chip_data (irq); -u32 mask = (u32 )get_irq_data (irq); +struct gpio_controller *__iomem g =get_irq_desc_chip_data (desc); +u32 mask = (u32 )get_irq_desc_data (desc);__raw_writel (mask, &g->clr_falling);__raw_writel (mask, &g->clr_rising); } -static void gpio_irq_enable (unsigned irq) +static void gpio_irq_enable (struct irq_desc *desc) { -struct gpio_controller *__iomem g =get_irq_chip_data (irq); -u32 mask = (u32 )get_irq_data (irq); -unsigned status = irq_desc[irq].status; +struct gpio_controller *__iomem g =get_irq_desc_chip_data (desc); +u32 mask = (u32 )get_irq_desc_data (desc); +unsigned status = desc->status; status &=IRQ_TYPE_EDGE_FALLING |IRQ_TYPE_EDGE_RISING ;if (!status)
@@ -184,19 +184,19 @@ static void gpio_irq_enable(unsigned irq__raw_writel (mask, &g->set_rising); } -static int gpio_irq_type (unsigned irq,unsigned trigger) +static int gpio_irq_type (struct irq_desc *desc,unsigned trigger) { -struct gpio_controller *__iomem g =get_irq_chip_data (irq); -u32 mask = (u32 )get_irq_data (irq); +struct gpio_controller *__iomem g =get_irq_desc_chip_data (desc); +u32 mask = (u32 )get_irq_desc_data (desc);if (trigger & ~(IRQ_TYPE_EDGE_FALLING |IRQ_TYPE_EDGE_RISING ))return -EINVAL ; - irq_desc[irq].status &= ~IRQ_TYPE_SENSE_MASK ; - irq_desc[irq].status |= trigger; + desc->status &= ~IRQ_TYPE_SENSE_MASK ; + desc->status |= trigger;/* don't enable the IRQ if it's currently disabled */ -if (irq_desc[irq].depth ==0 ) { +if (desc->depth ==0 ) {__raw_writel (mask, (trigger &IRQ_TYPE_EDGE_FALLING ) ? &g->set_falling : &g->clr_falling); __raw_writel(mask, (trigger & IRQ_TYPE_EDGE_RISING)
@@ -223,8 +223,8 @@ gpio_irq_handler(unsigned irq, struct ir mask <<=16 ;/* temporarily mask (level sensitive) parent IRQ */ - desc->chip->mask (irq); - desc->chip->ack (irq); + desc->chip->mask (desc); + desc->chip->ack (desc);while (1 ) {u32 status;int n;
@@ -247,7 +247,7 @@ gpio_irq_handler(unsigned irq, struct ir status >>= res; } } - desc->chip->unmask (irq); + desc->chip->unmask (desc);/* now it may re-trigger */ }
arch/arm/mach-davinci/irq.c +6 -3
@@ -53,8 +53,9 @@ static inline void davinci_irq_writel(un }/* Disable interrupt */ -static void davinci_mask_irq (unsigned int irq) +static void davinci_mask_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq;unsigned int mask;u32 l;
@@ -72,8 +73,9 @@ static void davinci_mask_irq(unsigned in }/* Enable interrupt */ -static void davinci_unmask_irq (unsigned int irq) +static void davinci_unmask_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq;unsigned int mask;u32 l;
@@ -91,8 +93,9 @@ static void davinci_unmask_irq(unsigned }/* EOI interrupt */ -static void davinci_ack_irq (unsigned int irq) +static void davinci_ack_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq;unsigned int mask; mask =1 <<IRQ_BIT (irq);
arch/arm/mach-dove/irq.c +6 -3
@@ -36,8 +36,9 @@ static void gpio_irq_handler(unsigned in } } -static void pmu_irq_mask (unsigned int irq) +static void pmu_irq_mask (struct irq_desc *desc) { +unsigned int irq = desc->irq;int pin =irq_to_pmu (irq);u32 u;
@@ -46,8 +47,9 @@ static void pmu_irq_mask(unsigned int irwritel (u,PMU_INTERRUPT_MASK ); } -static void pmu_irq_unmask (unsigned int irq) +static void pmu_irq_unmask (struct irq_desc *desc) { +unsigned int irq = desc->irq;int pin =irq_to_pmu (irq);u32 u;
@@ -56,8 +58,9 @@ static void pmu_irq_unmask(unsigned intwritel (u,PMU_INTERRUPT_MASK ); } -static void pmu_irq_ack (unsigned int irq) +static void pmu_irq_ack (struct irq_desc *desc) { +unsigned int irq = desc->irq;int pin =irq_to_pmu (irq);u32 u;
arch/arm/mach-ebsa110/core.c +4 -2
@@ -35,13 +35,15 @@#define IRQ_STAT 0xff000000/* read */ #define IRQ_MCLR 0xff000000/* write */ -static void ebsa110_mask_irq (unsigned int irq) +static void ebsa110_mask_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq;__raw_writeb (1 << irq,IRQ_MCLR ); } -static void ebsa110_unmask_irq (unsigned int irq) +static void ebsa110_unmask_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq;__raw_writeb (1 << irq,IRQ_MSET ); }
arch/arm/mach-ep93xx/core.c +10 -6
@@ -225,8 +225,9 @@ static void ep93xx_gpio_f_irq_handler(ungeneric_handle_irq (gpio_irq); } -static void ep93xx_gpio_irq_ack (unsigned int irq) +static void ep93xx_gpio_irq_ack (struct irq_desc *desc) { +unsigned int irq = desc->irq;int line =irq_to_gpio (irq);int port = line >>3 ;int port_mask =1 << (line &7 );
@@ -239,8 +240,9 @@ static void ep93xx_gpio_irq_ack(unsigned__raw_writeb (port_mask,EP93XX_GPIO_REG (eoi_register_offset[port])); } -static void ep93xx_gpio_irq_mask_ack (unsigned int irq) +static void ep93xx_gpio_irq_mask_ack (struct irq_desc *desc) { +unsigned int irq = desc->irq;int line =irq_to_gpio (irq);int port = line >>3 ;int port_mask =1 << (line &7 );
@@ -254,8 +256,9 @@ static void ep93xx_gpio_irq_mask_ack(uns__raw_writeb (port_mask,EP93XX_GPIO_REG (eoi_register_offset[port])); } -static void ep93xx_gpio_irq_mask (unsigned int irq) +static void ep93xx_gpio_irq_mask (struct irq_desc *desc) { +unsigned int irq = desc->irq;int line =irq_to_gpio (irq);int port = line >>3 ;
@@ -263,8 +266,9 @@ static void ep93xx_gpio_irq_mask(unsigneep93xx_gpio_update_int_params (port); } -static void ep93xx_gpio_irq_unmask (unsigned int irq) +static void ep93xx_gpio_irq_unmask (struct irq_desc *desc) { +unsigned int irq = desc->irq;int line =irq_to_gpio (irq);int port = line >>3 ;
@@ -278,9 +282,9 @@ static void ep93xx_gpio_irq_unmask(unsig* edge (1) triggered, while gpio_int_type2 controls whether it * triggers on low/falling (0) or high/rising (1). */ -static int ep93xx_gpio_irq_type (unsigned int irq,unsigned int type) +static int ep93xx_gpio_irq_type (struct irq_desc *desc,unsigned int type) { -struct irq_desc *desc = irq_desc + irq; +unsigned int irq = desc->irq;const int gpio =irq_to_gpio (irq);const int port = gpio >>3 ;const int port_mask =1 << (gpio &7 );
arch/arm/mach-footbridge/common.c +4 -2
@@ -74,13 +74,15 @@ static const int fb_irq_mask[] = { IRQ_MASK_PCI_PERR, /* 19 */ }; -static void fb_mask_irq (unsigned int irq) +static void fb_mask_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq; *CSR_IRQ_DISABLE = fb_irq_mask[_DC21285_INR (irq)]; } -static void fb_unmask_irq (unsigned int irq) +static void fb_unmask_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq; *CSR_IRQ_ENABLE = fb_irq_mask[_DC21285_INR (irq)]; }
arch/arm/mach-footbridge/isa-irq.c +12 -6
@@ -30,23 +30,26 @@#include "common.h" -static void isa_mask_pic_lo_irq (unsigned int irq) +static void isa_mask_pic_lo_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq;unsigned int mask =1 << (irq &7 );outb (inb (PIC_MASK_LO ) | mask,PIC_MASK_LO ); } -static void isa_ack_pic_lo_irq (unsigned int irq) +static void isa_ack_pic_lo_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq;unsigned int mask =1 << (irq &7 );outb (inb (PIC_MASK_LO ) | mask,PIC_MASK_LO );outb (0x20 ,PIC_LO ); } -static void isa_unmask_pic_lo_irq (unsigned int irq) +static void isa_unmask_pic_lo_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq;unsigned int mask =1 << (irq &7 );outb (inb (PIC_MASK_LO ) & ~mask,PIC_MASK_LO );
@@ -58,15 +61,17 @@ static struct irq_chip isa_lo_chip = { .unmask = isa_unmask_pic_lo_irq, }; -static void isa_mask_pic_hi_irq (unsigned int irq) +static void isa_mask_pic_hi_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq;unsigned int mask =1 << (irq &7 );outb (inb (PIC_MASK_HI ) | mask,PIC_MASK_HI ); } -static void isa_ack_pic_hi_irq (unsigned int irq) +static void isa_ack_pic_hi_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq;unsigned int mask =1 << (irq &7 );outb (inb (PIC_MASK_HI ) | mask,PIC_MASK_HI );
@@ -74,8 +79,9 @@ static void isa_ack_pic_hi_irq(unsignedoutb (0x20 ,PIC_HI ); } -static void isa_unmask_pic_hi_irq (unsigned int irq) +static void isa_unmask_pic_hi_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq;unsigned int mask =1 << (irq &7 );outb (inb (PIC_MASK_HI ) & ~mask,PIC_MASK_HI );
arch/arm/mach-gemini/gpio.c +8 -4
@@ -54,24 +54,27 @@ static void _set_gpio_irqenable(unsigned__raw_writel (reg, base +GPIO_INT_EN ); } -static void gpio_ack_irq (unsigned int irq) +static void gpio_ack_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq;unsigned int gpio =irq_to_gpio (irq);unsigned int base =GPIO_BASE (gpio /32 );__raw_writel (1 << (gpio %32 ), base +GPIO_INT_CLR ); } -static void gpio_mask_irq (unsigned int irq) +static void gpio_mask_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq;unsigned int gpio =irq_to_gpio (irq);unsigned int base =GPIO_BASE (gpio /32 );_set_gpio_irqenable (base, gpio %32 ,0 ); } -static void gpio_unmask_irq (unsigned int irq) +static void gpio_unmask_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq;unsigned int gpio =irq_to_gpio (irq);unsigned int base =GPIO_BASE (gpio /32 );
@@ -80,6 +83,7 @@ static void gpio_unmask_irq(unsigned intstatic int gpio_set_irq_type (unsigned int irq,unsigned int type) { +unsigned int irq = desc->irq;unsigned int gpio =irq_to_gpio (irq);unsigned int gpio_mask =1 << (gpio %32 );unsigned int base =GPIO_BASE (gpio /32 );
@@ -120,7 +124,7 @@ static int gpio_set_irq_type(unsigned in__raw_writel (reg_level, base +GPIO_INT_LEVEL );__raw_writel (reg_both, base +GPIO_INT_BOTH_EDGE ); -gpio_ack_irq (irq); +gpio_ack_irq (desc);return 0 ; }
arch/arm/mach-gemini/irq.c +6 -3
@@ -32,13 +32,15 @@#define FIQ_LEVEL (base_addr) (base_addr + 0x30)#define FIQ_STATUS (base_addr) (base_addr + 0x34) -static void gemini_ack_irq (unsigned int irq) +static void gemini_ack_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq;__raw_writel (1 << irq,IRQ_CLEAR (IO_ADDRESS (GEMINI_INTERRUPT_BASE ))); } -static void gemini_mask_irq (unsigned int irq) +static void gemini_mask_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq;unsigned int mask; mask =__raw_readl (IRQ_MASK (IO_ADDRESS (GEMINI_INTERRUPT_BASE )));
@@ -46,8 +48,9 @@ static void gemini_mask_irq(unsigned int__raw_writel (mask,IRQ_MASK (IO_ADDRESS (GEMINI_INTERRUPT_BASE ))); } -static void gemini_unmask_irq (unsigned int irq) +static void gemini_unmask_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq;unsigned int mask; mask =__raw_readl (IRQ_MASK (IO_ADDRESS (GEMINI_INTERRUPT_BASE )));
arch/arm/mach-h720x/common.c +10 -5
@@ -53,16 +53,18 @@ unsigned long h720x_gettimeoffset(void)/* * mask Global irq's */ -static void mask_global_irq (unsigned int irq ) +static void mask_global_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq;CPU_REG (IRQC_VIRT ,IRQC_IER ) &= ~(1 << irq); }/* * unmask Global irq's */ -static void unmask_global_irq (unsigned int irq ) +static void unmask_global_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq;CPU_REG (IRQC_VIRT ,IRQC_IER ) |= (1 << irq); }
@@ -71,8 +73,9 @@ static void unmask_global_irq (unsigned* ack GPIO irq's * Ack only for edge triggered int's valid */ -static void inline ack_gpio_irq (u32 irq) +static inline void ack_gpio_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq;u32 reg_base =GPIO_VIRT (IRQ_TO_REGNO (irq));u32 bit =IRQ_TO_BIT (irq);if ( (CPU_REG (reg_base,GPIO_EDGE ) & bit))
@@ -82,8 +85,9 @@ static void inline ack_gpio_irq(u32 irq)/* * mask GPIO irq's */ -static void inline mask_gpio_irq (u32 irq) +static inline void mask_gpio_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq;u32 reg_base =GPIO_VIRT (IRQ_TO_REGNO (irq));u32 bit =IRQ_TO_BIT (irq);CPU_REG (reg_base,GPIO_MASK ) &= ~bit;
@@ -92,8 +96,9 @@ static void inline mask_gpio_irq(u32 irq/* * unmask GPIO irq's */ -static void inline unmask_gpio_irq (u32 irq) +static inline void unmask_gpio_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq;u32 reg_base =GPIO_VIRT (IRQ_TO_REGNO (irq));u32 bit =IRQ_TO_BIT (irq);CPU_REG (reg_base,GPIO_MASK ) |= bit;
arch/arm/mach-h720x/cpu-h7202.c +4 -2
@@ -141,8 +141,9 @@ h7202_timer_interrupt(int irq, void *dev/* * mask multiplexed timer IRQs */ -static void inline mask_timerx_irq (u32 irq) +static inline void mask_timerx_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq;unsigned int bit; bit =2 << ((irq ==IRQ_TIMER64B ) ?4 : (irq -IRQ_TIMER1 ));CPU_REG (TIMER_VIRT ,TIMER_TOPCTRL ) &= ~bit;
@@ -151,8 +152,9 @@ static void inline mask_timerx_irq (u32/* * unmask multiplexed timer IRQs */ -static void inline unmask_timerx_irq (u32 irq) +static inline void unmask_timerx_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq;unsigned int bit; bit =2 << ((irq ==IRQ_TIMER64B ) ?4 : (irq -IRQ_TIMER1 ));CPU_REG (TIMER_VIRT ,TIMER_TOPCTRL ) |= bit;
arch/arm/mach-integrator/integrator_ap.c +4 -2
@@ -151,13 +151,15 @@ static void __init ap_map_io(void)#define INTEGRATOR_SC_VALID_INT 0x003fffff -static void sc_mask_irq (unsigned int irq) +static void sc_mask_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq;writel (1 << irq,VA_IC_BASE +IRQ_ENABLE_CLEAR ); } -static void sc_unmask_irq (unsigned int irq) +static void sc_unmask_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq;writel (1 << irq,VA_IC_BASE +IRQ_ENABLE_SET ); }
arch/arm/mach-integrator/integrator_cp.c +12 -6
@@ -145,14 +145,16 @@ static void __init intcp_map_io(void)#define sic_writel __raw_writel#define sic_readl __raw_readl -static void cic_mask_irq (unsigned int irq) +static void cic_mask_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq; irq -=IRQ_CIC_START ;cic_writel (1 << irq,INTCP_VA_CIC_BASE +IRQ_ENABLE_CLEAR ); } -static void cic_unmask_irq (unsigned int irq) +static void cic_unmask_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq; irq -=IRQ_CIC_START ;cic_writel (1 << irq,INTCP_VA_CIC_BASE +IRQ_ENABLE_SET ); }
@@ -164,14 +166,16 @@ static struct irq_chip cic_chip = { .unmask = cic_unmask_irq, }; -static void pic_mask_irq (unsigned int irq) +static void pic_mask_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq; irq -=IRQ_PIC_START ;pic_writel (1 << irq,INTCP_VA_PIC_BASE +IRQ_ENABLE_CLEAR ); } -static void pic_unmask_irq (unsigned int irq) +static void pic_unmask_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq; irq -=IRQ_PIC_START ;pic_writel (1 << irq,INTCP_VA_PIC_BASE +IRQ_ENABLE_SET ); }
@@ -183,14 +187,16 @@ static struct irq_chip pic_chip = { .unmask = pic_unmask_irq, }; -static void sic_mask_irq (unsigned int irq) +static void sic_mask_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq; irq -=IRQ_SIC_START ;sic_writel (1 << irq,INTCP_VA_SIC_BASE +IRQ_ENABLE_CLEAR ); } -static void sic_unmask_irq (unsigned int irq) +static void sic_unmask_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq; irq -=IRQ_SIC_START ;sic_writel (1 << irq,INTCP_VA_SIC_BASE +IRQ_ENABLE_SET ); }
arch/arm/mach-iop13xx/irq.c +16 -8
@@ -123,50 +123,58 @@ static void write_intsize(u32 val)/* 0 = Interrupt Masked and 1 = Interrupt not masked */ static void -iop13xx_irq_mask0 (unsigned int irq) +iop13xx_irq_mask0 (struct irq_desc *desc) { +unsigned int irq = desc->irq;write_intctl_0 (read_intctl_0 () & ~(1 << (irq -0 ))); }static void -iop13xx_irq_mask1 (unsigned int irq) +iop13xx_irq_mask1 (struct irq_desc *desc) { +unsigned int irq = desc->irq;write_intctl_1 (read_intctl_1 () & ~(1 << (irq -32 ))); }static void -iop13xx_irq_mask2 (unsigned int irq) +iop13xx_irq_mask2 (struct irq_desc *desc) { +unsigned int irq = desc->irq;write_intctl_2 (read_intctl_2 () & ~(1 << (irq -64 ))); }static void -iop13xx_irq_mask3 (unsigned int irq) +iop13xx_irq_mask3 (struct irq_desc *desc) { +unsigned int irq = desc->irq;write_intctl_3 (read_intctl_3 () & ~(1 << (irq -96 ))); }static void -iop13xx_irq_unmask0 (unsigned int irq) +iop13xx_irq_unmask0 (struct irq_desc *desc) { +unsigned int irq = desc->irq;write_intctl_0 (read_intctl_0 () | (1 << (irq -0 ))); }static void -iop13xx_irq_unmask1 (unsigned int irq) +iop13xx_irq_unmask1 (struct irq_desc *desc) { +unsigned int irq = desc->irq;write_intctl_1 (read_intctl_1 () | (1 << (irq -32 ))); }static void -iop13xx_irq_unmask2 (unsigned int irq) +iop13xx_irq_unmask2 (struct irq_desc *desc) { +unsigned int irq = desc->irq;write_intctl_2 (read_intctl_2 () | (1 << (irq -64 ))); }static void -iop13xx_irq_unmask3 (unsigned int irq) +iop13xx_irq_unmask3 (struct irq_desc *desc) { +unsigned int irq = desc->irq;write_intctl_3 (read_intctl_3 () | (1 << (irq -96 ))); }
arch/arm/mach-iop13xx/msi.c +1 -1
@@ -156,7 +156,7 @@ void arch_teardown_msi_irq(unsigned intdestroy_irq (irq); } -static void iop13xx_msi_nop (unsigned int irq) +static void iop13xx_msi_nop (struct irq_desc *desc) {return ; }
arch/arm/mach-iop32x/irq.c +4 -2
@@ -32,15 +32,17 @@ static void intstr_write(u32 val) }static void -iop32x_irq_mask (unsigned int irq) +iop32x_irq_mask (struct irq_desc *desc) { +unsigned int irq = desc->irq; iop32x_mask &= ~(1 << irq);intctl_write (iop32x_mask); }static void -iop32x_irq_unmask (unsigned int irq) +iop32x_irq_unmask (struct irq_desc *desc) { +unsigned int irq = desc->irq; iop32x_mask |=1 << irq;intctl_write (iop32x_mask); }
arch/arm/mach-ixp2000/core.c +20 -10
@@ -309,8 +309,9 @@ static void ixp2000_GPIO_irq_handler(uns } } -static int ixp2000_GPIO_irq_type (unsigned int irq,unsigned int type) +static int ixp2000_GPIO_irq_type (struct irq_desc *desc,unsigned int type) { +unsigned int irq = desc->irq;int line = irq -IRQ_IXP2000_GPIO0 ;/*
@@ -342,8 +343,9 @@ static int ixp2000_GPIO_irq_type(unsignereturn 0 ; } -static void ixp2000_GPIO_irq_mask_ack (unsigned int irq) +static void ixp2000_GPIO_irq_mask_ack (struct irq_desc *desc) { +unsigned int irq = desc->irq;ixp2000_reg_write (IXP2000_GPIO_INCR , (1 << (irq -IRQ_IXP2000_GPIO0 )));ixp2000_reg_write (IXP2000_GPIO_EDSR , (1 << (irq -IRQ_IXP2000_GPIO0 )));
@@ -351,13 +353,15 @@ static void ixp2000_GPIO_irq_mask_ack(unixp2000_reg_wrb (IXP2000_GPIO_INST , (1 << (irq -IRQ_IXP2000_GPIO0 ))); } -static void ixp2000_GPIO_irq_mask (unsigned int irq) +static void ixp2000_GPIO_irq_mask (struct irq_desc *desc) { +unsigned int irq = desc->irq;ixp2000_reg_wrb (IXP2000_GPIO_INCR , (1 << (irq -IRQ_IXP2000_GPIO0 ))); } -static void ixp2000_GPIO_irq_unmask (unsigned int irq) +static void ixp2000_GPIO_irq_unmask (struct irq_desc *desc) { +unsigned int irq = desc->irq;ixp2000_reg_write (IXP2000_GPIO_INSR , (1 << (irq -IRQ_IXP2000_GPIO0 ))); }
@@ -368,8 +372,9 @@ static struct irq_chip ixp2000_GPIO_irq_ .set_type = ixp2000_GPIO_irq_type, }; -static void ixp2000_pci_irq_mask (unsigned int irq) +static void ixp2000_pci_irq_mask (struct irq_desc *desc) { +unsigned int irq = desc->irq;unsigned long temp = *IXP2000_PCI_XSCALE_INT_ENABLE ;if (irq ==IRQ_IXP2000_PCIA )ixp2000_reg_wrb (IXP2000_PCI_XSCALE_INT_ENABLE , (temp & ~(1 <<26 )));
@@ -377,8 +382,9 @@ static void ixp2000_pci_irq_mask(unsigneixp2000_reg_wrb (IXP2000_PCI_XSCALE_INT_ENABLE , (temp & ~(1 <<27 ))); } -static void ixp2000_pci_irq_unmask (unsigned int irq) +static void ixp2000_pci_irq_unmask (struct irq_desc *desc) { +unsigned int irq = desc->irq;unsigned long temp = *IXP2000_PCI_XSCALE_INT_ENABLE ;if (irq ==IRQ_IXP2000_PCIA )ixp2000_reg_write (IXP2000_PCI_XSCALE_INT_ENABLE , (temp | (1 <<26 )));
@@ -401,14 +407,16 @@ static void ixp2000_err_irq_handler(unsi } } -static void ixp2000_err_irq_mask (unsigned int irq) +static void ixp2000_err_irq_mask (struct irq_desc *desc) { +unsigned int irq = desc->irq;ixp2000_reg_write (IXP2000_IRQ_ERR_ENABLE_CLR , (1 << (irq -IRQ_IXP2000_DRAM0_MIN_ERR ))); } -static void ixp2000_err_irq_unmask (unsigned int irq) +static void ixp2000_err_irq_unmask (struct irq_desc *desc) { +unsigned int irq = desc->irq;ixp2000_reg_write (IXP2000_IRQ_ERR_ENABLE_SET , (1 << (irq -IRQ_IXP2000_DRAM0_MIN_ERR ))); }
@@ -425,13 +433,15 @@ static struct irq_chip ixp2000_pci_irq_c .unmask = ixp2000_pci_irq_unmask }; -static void ixp2000_irq_mask (unsigned int irq) +static void ixp2000_irq_mask (struct irq_desc *desc) { +unsigned int irq = desc->irq;ixp2000_reg_wrb (IXP2000_IRQ_ENABLE_CLR , (1 << irq)); } -static void ixp2000_irq_unmask (unsigned int irq) +static void ixp2000_irq_unmask (struct irq_desc *desc) { +unsigned int irq = desc->irq;ixp2000_reg_write (IXP2000_IRQ_ENABLE_SET , (1 << irq)); }
arch/arm/mach-ixp2000/ixdp2x00.c +6 -4
@@ -64,8 +64,9 @@ static struct slowport_cfg slowport_cpld };#endif -static void ixdp2x00_irq_mask (unsigned int irq) +static void ixdp2x00_irq_mask (struct irq_desc *desc) { +unsigned int irq = desc->irq;unsigned long dummy;static struct slowport_cfg old_cfg;
@@ -88,8 +89,9 @@ static void ixdp2x00_irq_mask(unsigned i#endif } -static void ixdp2x00_irq_unmask (unsigned int irq) +static void ixdp2x00_irq_unmask (struct irq_desc *desc) { +unsigned int irq = desc->irq;unsigned long dummy;static struct slowport_cfg old_cfg;
@@ -112,7 +114,7 @@ static void ixdp2x00_irq_handler(unsignestatic struct slowport_cfg old_cfg;int i; - desc->chip->mask (irq); + desc->chip->mask (desc);#ifdef CONFIG_ARCH_IXDP2400 if (machine_is_ixdp2400 ())
@@ -134,7 +136,7 @@ static void ixdp2x00_irq_handler(unsigne } } - desc->chip->unmask (irq); + desc->chip->unmask (desc); }static struct irq_chip ixdp2x00_cpld_irq_chip = {
arch/arm/mach-ixp2000/ixdp2x01.c +6 -4
@@ -49,14 +49,16 @@/************************************************************************* * IXDP2x01 IRQ Handling *************************************************************************/ -static void ixdp2x01_irq_mask (unsigned int irq) +static void ixdp2x01_irq_mask (struct irq_desc *desc) { +unsigned int irq = desc->irq;ixp2000_reg_wrb (IXDP2X01_INT_MASK_SET_REG ,IXP2000_BOARD_IRQ_MASK (irq)); } -static void ixdp2x01_irq_unmask (unsigned int irq) +static void ixdp2x01_irq_unmask (struct irq_desc *desc) { +unsigned int irq = desc->irq;ixp2000_reg_write (IXDP2X01_INT_MASK_CLR_REG ,IXP2000_BOARD_IRQ_MASK (irq)); }
@@ -68,7 +70,7 @@ static void ixdp2x01_irq_handler(unsigneu32 ex_interrupt;int i; - desc->chip->mask (irq); + desc->chip->mask (desc); ex_interrupt = *IXDP2X01_INT_STAT_REG & valid_irq_mask;
@@ -84,7 +86,7 @@ static void ixdp2x01_irq_handler(unsigne } } - desc->chip->unmask (irq); + desc->chip->unmask (desc); }static struct irq_chip ixdp2x01_irq_chip = {
arch/arm/mach-ixp23xx/core.c +15 -10
@@ -111,8 +111,9 @@ enum ixp23xx_irq_type {static void ixp23xx_config_irq (unsigned int ,enum ixp23xx_irq_type ); -static int ixp23xx_irq_set_type (unsigned int irq,unsigned int type) +static int ixp23xx_irq_set_type (struct irq_desc *desc,unsigned int type) { +unsigned int irq = desc->irq;int line = irq -IRQ_IXP23XX_GPIO6 +6 ;u32 int_style;enum ixp23xx_irq_type irq_type;
@@ -173,8 +174,9 @@ static int ixp23xx_irq_set_type(unsignedreturn 0 ; } -static void ixp23xx_irq_mask (unsigned int irq) +static void ixp23xx_irq_mask (struct irq_desc *desc) { +unsigned int irq = desc->irq;volatile unsigned long *intr_reg;if (irq >=56 )
@@ -184,8 +186,9 @@ static void ixp23xx_irq_mask(unsigned in *intr_reg &= ~(1 << (irq %32 )); } -static void ixp23xx_irq_ack (unsigned int irq) +static void ixp23xx_irq_ack (struct irq_desc *desc) { +unsigned int irq = desc->irq;int line = irq -IRQ_IXP23XX_GPIO6 +6 ;if ((line <6 ) || (line >15 ))
@@ -198,11 +201,12 @@ static void ixp23xx_irq_ack(unsigned int* Level triggered interrupts on GPIO lines can only be cleared when the * interrupt condition disappears. */ -static void ixp23xx_irq_level_unmask (unsigned int irq) +static void ixp23xx_irq_level_unmask (struct irq_desc *desc) { +unsigned int irq = desc->irq;volatile unsigned long *intr_reg; -ixp23xx_irq_ack (irq); +ixp23xx_irq_ack (desc);if (irq >=56 ) irq +=8 ;
@@ -211,8 +215,9 @@ static void ixp23xx_irq_level_unmask(uns *intr_reg |= (1 << (irq %32 )); } -static void ixp23xx_irq_edge_unmask (unsigned int irq) +static void ixp23xx_irq_edge_unmask (struct irq_desc *desc) { +unsigned int irq = desc->irq;volatile unsigned long *intr_reg;if (irq >=56 )
@@ -236,12 +241,12 @@ static struct irq_chip ixp23xx_irq_edge_ .set_type = ixp23xx_irq_set_type }; -static void ixp23xx_pci_irq_mask (unsigned int irq) +static void ixp23xx_pci_irq_mask (struct irq_desc *desc) { *IXP23XX_PCI_XSCALE_INT_ENABLE &= ~(1 << (IRQ_IXP23XX_INTA +27 - irq)); } -static void ixp23xx_pci_irq_unmask (unsigned int irq) +static void ixp23xx_pci_irq_unmask (struct irq_desc *desc) { *IXP23XX_PCI_XSCALE_INT_ENABLE |= (1 << (IRQ_IXP23XX_INTA +27 - irq)); }
@@ -256,7 +261,7 @@ static void pci_handler(unsigned int irq pci_interrupt = *IXP23XX_PCI_XSCALE_INT_STATUS ; - desc->chip->ack (irq); + desc->chip->ack (desc);/* See which PCI_INTA, or PCI_INTB interrupted */ if (pci_interrupt & (1 <<26 )) {
@@ -269,7 +274,7 @@ static void pci_handler(unsigned int irqgeneric_handle_irq (irqno); - desc->chip->unmask (irq); + desc->chip->unmask (desc); }static struct irq_chip ixp23xx_pci_irq_chip = {
arch/arm/mach-ixp23xx/ixdp2351.c +12 -8
@@ -48,13 +48,15 @@/* * IXDP2351 Interrupt Handling */ -static void ixdp2351_inta_mask (unsigned int irq) +static void ixdp2351_inta_mask (struct irq_desc *desc) { +unsigned int irq = desc->irq; *IXDP2351_CPLD_INTA_MASK_SET_REG =IXDP2351_INTA_IRQ_MASK (irq); } -static void ixdp2351_inta_unmask (unsigned int irq) +static void ixdp2351_inta_unmask (struct irq_desc *desc) { +unsigned int irq = desc->irq; *IXDP2351_CPLD_INTA_MASK_CLR_REG =IXDP2351_INTA_IRQ_MASK (irq); }
@@ -64,7 +66,7 @@ static void ixdp2351_inta_handler(unsign *IXDP2351_CPLD_INTA_STAT_REG &IXDP2351_INTA_IRQ_VALID ;int i; - desc->chip->mask (irq); + desc->chip->mask (desc);for (i =0 ; i <IXDP2351_INTA_IRQ_NUM ; i++) {if (ex_interrupt & (1 << i)) {
@@ -74,7 +76,7 @@ static void ixdp2351_inta_handler(unsign } } - desc->chip->unmask (irq); + desc->chip->unmask (desc); }static struct irq_chip ixdp2351_inta_chip = {
@@ -83,13 +85,15 @@ static struct irq_chip ixdp2351_inta_chi .unmask = ixdp2351_inta_unmask }; -static void ixdp2351_intb_mask (unsigned int irq) +static void ixdp2351_intb_mask (struct irq_desc *desc) { +unsigned int irq = desc->irq; *IXDP2351_CPLD_INTB_MASK_SET_REG =IXDP2351_INTB_IRQ_MASK (irq); } -static void ixdp2351_intb_unmask (unsigned int irq) +static void ixdp2351_intb_unmask (struct irq_desc *desc) { +unsigned int irq = desc->irq; *IXDP2351_CPLD_INTB_MASK_CLR_REG =IXDP2351_INTB_IRQ_MASK (irq); }
@@ -99,7 +103,7 @@ static void ixdp2351_intb_handler(unsign *IXDP2351_CPLD_INTB_STAT_REG &IXDP2351_INTB_IRQ_VALID ;int i; - desc->chip->ack (irq); + desc->chip->ack (desc);for (i =0 ; i <IXDP2351_INTB_IRQ_NUM ; i++) {if (ex_interrupt & (1 << i)) {
@@ -109,7 +113,7 @@ static void ixdp2351_intb_handler(unsign } } - desc->chip->unmask (irq); + desc->chip->unmask (desc); }static struct irq_chip ixdp2351_intb_chip = {
arch/arm/mach-ixp4xx/common.c +9 -5
@@ -128,8 +128,9 @@ int irq_to_gpio(unsigned int irq) }EXPORT_SYMBOL (irq_to_gpio); -static int ixp4xx_set_irq_type (unsigned int irq,unsigned int type) +static int ixp4xx_set_irq_type (struct irq_desc *desc,unsigned int type) { +unsigned int irq = desc->irq;int line = irq2gpio[irq];u32 int_style;enum ixp4xx_irq_type irq_type;
@@ -193,16 +194,18 @@ static int ixp4xx_set_irq_type(unsignedreturn 0 ; } -static void ixp4xx_irq_mask (unsigned int irq) +static void ixp4xx_irq_mask (struct irq_desc *desc) { +unsigned int irq = desc->irq;if ((cpu_is_ixp46x () ||cpu_is_ixp43x ()) && irq >=32 ) *IXP4XX_ICMR2 &= ~(1 << (irq -32 ));else *IXP4XX_ICMR &= ~(1 << irq); } -static void ixp4xx_irq_ack (unsigned int irq) +static void ixp4xx_irq_ack (struct irq_desc *desc) { +unsigned int irq = desc->irq;int line = (irq <32 ) ? irq2gpio[irq] :-1 ;if (line >=0 )
@@ -213,10 +216,11 @@ static void ixp4xx_irq_ack(unsigned int* Level triggered interrupts on GPIO lines can only be cleared when the * interrupt condition disappears. */ -static void ixp4xx_irq_unmask (unsigned int irq) +static void ixp4xx_irq_unmask (struct irq_desc *desc) { +unsigned int irq = desc->irq;if (!(ixp4xx_irq_edge & (1 << irq))) -ixp4xx_irq_ack (irq); +ixp4xx_irq_ack (desc);if ((cpu_is_ixp46x () ||cpu_is_ixp43x ()) && irq >=32 ) *IXP4XX_ICMR2 |= (1 << (irq -32 ));
arch/arm/mach-ks8695/irq.c +16 -12
@@ -34,29 +34,32 @@#include <mach/regs-irq.h> #include <mach/regs-gpio.h> -static void ks8695_irq_mask (unsigned int irqno) +static void ks8695_irq_mask (struct irq_desc *desc) { +unsigned int irq = desc->irq;unsigned long inten; inten =__raw_readl (KS8695_IRQ_VA +KS8695_INTEN ); - inten &= ~(1 << irqno); + inten &= ~(1 << irq);__raw_writel (inten,KS8695_IRQ_VA +KS8695_INTEN ); } -static void ks8695_irq_unmask (unsigned int irqno) +static void ks8695_irq_unmask (struct irq_desc *desc) { +unsigned int irq = desc->irq;unsigned long inten; inten =__raw_readl (KS8695_IRQ_VA +KS8695_INTEN ); - inten |= (1 << irqno); + inten |= (1 << irq);__raw_writel (inten,KS8695_IRQ_VA +KS8695_INTEN ); } -static void ks8695_irq_ack (unsigned int irqno) +static void ks8695_irq_ack (struct irq_desc *desc) { -__raw_writel ((1 << irqno),KS8695_IRQ_VA +KS8695_INTST ); +unsigned int irq = desc->irq; +__raw_writel ((1 << irq),KS8695_IRQ_VA +KS8695_INTST ); }
@@ -64,8 +67,9 @@ static struct irq_chip ks8695_irq_level_static struct irq_chip ks8695_irq_edge_chip; -static int ks8695_irq_set_type (unsigned int irqno,unsigned int type) +static int ks8695_irq_set_type (struct irq_desc *desc,unsigned int type) { +unsigned int irq = desc->irq;unsigned long ctrl, mode;unsigned short level_triggered =0 ;
@@ -93,7 +97,7 @@ static int ks8695_irq_set_type(unsignedreturn -EINVAL ; } -switch (irqno) { +switch (irq) {case KS8695_IRQ_EXTERN0 : ctrl &= ~IOPC_IOEINT0TM ; ctrl |=IOPC_IOEINT0_MODE (mode);
@@ -115,12 +119,12 @@ static int ks8695_irq_set_type(unsigned }if (level_triggered) { -set_irq_chip (irqno, &ks8695_irq_level_chip); -set_irq_handler (irqno, handle_level_irq); +set_irq_chip (irq, &ks8695_irq_level_chip); +set_irq_handler (irq, handle_level_irq); }else { -set_irq_chip (irqno, &ks8695_irq_edge_chip); -set_irq_handler (irqno, handle_edge_irq); +set_irq_chip (irq, &ks8695_irq_edge_chip); +set_irq_handler (irq, handle_edge_irq); }__raw_writel (ctrl,KS8695_GPIO_VA +KS8695_IOPC );
arch/arm/mach-l7200/core.c +4 -2
@@ -45,13 +45,15 @@#define FIQ_SOFT (*(volatile unsigned long *) (IRQ_BASE + 0x110))#define FIQ_SOURCESEL (*(volatile unsigned long *) (IRQ_BASE + 0x118)) -static void l7200_mask_irq (unsigned int irq) +static void l7200_mask_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq;IRQ_ENABLECLEAR =1 << irq; } -static void l7200_unmask_irq (unsigned int irq) +static void l7200_unmask_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq;IRQ_ENABLE =1 << irq; }
arch/arm/mach-lh7a40x/arch-kev7a400.c +6 -3
@@ -46,19 +46,22 @@ void __init kev7a400_map_io(void)static u16 CPLD_IRQ_mask;/* Mask for CPLD IRQs, 1 == unmasked */ -static void kev7a400_ack_cpld_irq (u32 irq) +static void kev7a400_ack_cpld_irq (u32 irq,struct irq_desc *desc) { +unsigned int irq = desc->irq;CPLD_CL_INT =1 << (irq -IRQ_KEV7A400_CPLD ); } -static void kev7a400_mask_cpld_irq (u32 irq) +static void kev7a400_mask_cpld_irq (u32 irq,struct irq_desc *desc) { +unsigned int irq = desc->irq; CPLD_IRQ_mask &= ~(1 << (irq -IRQ_KEV7A400_CPLD ));CPLD_WR_PB_INT_MASK = CPLD_IRQ_mask; } -static void kev7a400_unmask_cpld_irq (u32 irq) +static void kev7a400_unmask_cpld_irq (u32 irq,struct irq_desc *desc) { +unsigned int irq = desc->irq; CPLD_IRQ_mask |=1 << (irq -IRQ_KEV7A400_CPLD );CPLD_WR_PB_INT_MASK = CPLD_IRQ_mask; }
arch/arm/mach-lh7a40x/arch-lpd7a40x.c +8 -5
@@ -159,8 +159,9 @@ static void __init lpd7a40x_init (void)#endif } -static void lh7a40x_ack_cpld_irq (u32 irq) +static void lh7a40x_ack_cpld_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq;/* CPLD doesn't have ack capability, but some devices may */ #if defined (CPLD_INTMASK_TOUCH )
@@ -172,8 +173,9 @@ static void lh7a40x_ack_cpld_irq (u32 ir#endif } -static void lh7a40x_mask_cpld_irq (u32 irq) +static void lh7a40x_mask_cpld_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq;switch (irq) {case IRQ_LPD7A40X_ETH_INT :CPLD_INTERRUPTS |=CPLD_INTMASK_ETHERNET ;
@@ -186,8 +188,9 @@ static void lh7a40x_mask_cpld_irq (u32 i } }
Lines of this file are not shown. View the raw message.
arch/arm/mach-ns9xxx/board-a9m9750dev.c +9 -6
Lines of this file are not shown. View the raw message.
arch/arm/mach-s3c2443/irq.c +43 -28
71 lines not on this page · raw message
arch/arm/plat-s3c24xx/irq.c +66 -46
112 lines not on this page · raw message
arch/arm/plat-s5pc1xx/irq-eint.c +25 -17
42 lines not on this page · raw message
arch/blackfin/mach-common/ints-priority.c +33 -20
53 lines not on this page · raw message
arch/ia64/kernel/iosapic.c +26 -19
45 lines not on this page · raw message
arch/m32r/platforms/m32700ut/setup.c +52 -40
92 lines not on this page · raw message
arch/m32r/platforms/opsput/setup.c +50 -38
88 lines not on this page · raw message
arch/m32r/platforms/usrv/setup.c +24 -18
42 lines not on this page · raw message
arch/m68knommu/platform/coldfire/intc-2.c +4 -2
Lines of this file are not shown. View the raw message.
arch/m68knommu/platform/coldfire/intc-simr.c +5 -2
Lines of this file are not shown. View the raw message.
arch/m68knommu/platform/coldfire/intc.c +5 -3
Lines of this file are not shown. View the raw message.
arch/mips/alchemy/common/irq.c +26 -17
43 lines not on this page · raw message
arch/mips/alchemy/devboards/pb1200/irqmap.c +13 -10
Lines of this file are not shown. View the raw message.
arch/mips/bcm63xx/irq.c +27 -15
42 lines not on this page · raw message
arch/mips/cavium-octeon/octeon-irq.c +44 -26
70 lines not on this page · raw message
arch/mips/nxp/pnx833x/common/interrupts.c +21 -12
Lines of this file are not shown. View the raw message.
arch/mips/pmc-sierra/msp71xx/msp_irq_cic.c +6 -4
Lines of this file are not shown. View the raw message.
arch/mips/pmc-sierra/msp71xx/msp_irq_slp.c +6 -3
Lines of this file are not shown. View the raw message.
arch/mips/sgi-ip32/ip32-irq.c +39 -29
68 lines not on this page · raw message
arch/powerpc/platforms/512x/mpc5121_ads_cpld.c +4 -2
Lines of this file are not shown. View the raw message.
arch/powerpc/platforms/52xx/media5200.c +9 -7
Lines of this file are not shown. View the raw message.
arch/powerpc/platforms/52xx/mpc52xx_pic.c +23 -12
Lines of this file are not shown. View the raw message.
arch/powerpc/platforms/82xx/pq2ads-pci-pic.c +4 -2
Lines of this file are not shown. View the raw message.
arch/powerpc/platforms/85xx/mpc85xx_ads.c +1 -1
Lines of this file are not shown. View the raw message.
arch/powerpc/platforms/85xx/mpc85xx_ds.c +1 -1
Lines of this file are not shown. View the raw message.
arch/powerpc/platforms/85xx/socrates_fpga_pic.c +13 -7
Lines of this file are not shown. View the raw message.
arch/powerpc/platforms/8xx/m8xx_setup.c +2 -2
Lines of this file are not shown. View the raw message.
arch/powerpc/platforms/cell/beat_interrupt.c +8 -4
Lines of this file are not shown. View the raw message.
arch/powerpc/platforms/cell/interrupt.c +6 -6
Lines of this file are not shown. View the raw message.
arch/powerpc/platforms/cell/spider-pic.c +9 -6
Lines of this file are not shown. View the raw message.
arch/powerpc/platforms/embedded6xx/flipper-pic.c +8 -4
Lines of this file are not shown. View the raw message.
arch/powerpc/platforms/embedded6xx/hlwd-pic.c +15 -11
Lines of this file are not shown. View the raw message.
arch/powerpc/platforms/pseries/xics.c +17 -11
Lines of this file are not shown. View the raw message.
arch/sparc/kernel/irq_64.c +36 -26
62 lines not on this page · raw message
arch/x86/kernel/apic/io_apic.c +53 -72
125 lines not on this page · raw message
include/linux/irq.h +24 -23
47 lines not on this page · raw message
kernel/irq/chip.c +27 -33
60 lines not on this page · raw message
kernel/irq/manage.c +32 -33
65 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.
PATCH 2/2 genericirq: change ack/mask in irq_chip to take irq_desc instead of irq
In reply to Yinghai Luwill have
void (*ack)(struct irq_desc *desc); void (*mask)(struct irq_desc *desc); void (*mask_ack)(struct irq_desc *desc); void (*unmask)(struct irq_desc *desc); void (*eoi)(struct irq_desc *desc);
so for sparseirq with raidix tree, we don't call extra irq_to_desc, and could use desc directly
-v2: change all member of irq_chip to use desc only.
--- Documentation/DocBook/genericirq.tmpl | 24 ++-- arch/alpha/kernel/irq.c | 7 - arch/alpha/kernel/irq_alpha.c | 4 arch/alpha/kernel/irq_i8259.c | 22 ++-- arch/alpha/kernel/irq_pyxis.c | 21 ++- arch/alpha/kernel/irq_srm.c | 18 +-- arch/alpha/kernel/sys_alcor.c | 28 ++--- arch/alpha/kernel/sys_cabriolet.c | 18 ++- arch/alpha/kernel/sys_dp264.c | 50 +++++---- arch/alpha/kernel/sys_eb64p.c | 18 ++- arch/alpha/kernel/sys_eiger.c | 18 ++- arch/alpha/kernel/sys_jensen.c | 40 +++---- arch/alpha/kernel/sys_marvel.c | 26 ++-- arch/alpha/kernel/sys_mikasa.c | 18 +-- arch/alpha/kernel/sys_noritake.c | 18 ++- arch/alpha/kernel/sys_rawhide.c | 19 ++- arch/alpha/kernel/sys_rx164.c | 18 +-- arch/alpha/kernel/sys_sable.c | 26 ++-- arch/alpha/kernel/sys_takara.c | 18 ++- arch/alpha/kernel/sys_titan.c | 22 ++-- arch/alpha/kernel/sys_wildfire.c | 32 +++-- arch/arm/common/gic.c | 20 ++- arch/arm/common/it8152.c | 8 + arch/arm/common/locomo.c | 103 ++++++++++++------ arch/arm/common/sa1111.c | 56 ++++++---- arch/arm/common/vic.c | 21 ++- arch/arm/kernel/ecard.c | 12 +- arch/arm/kernel/irq.c | 2 arch/arm/mach-aaec2000/core.c | 6 - arch/arm/mach-at91/gpio.c | 15 +- arch/arm/mach-at91/irq.c | 15 ++ arch/arm/mach-bcmring/irq.c | 24 +++- arch/arm/mach-clps711x/irq.c | 18 ++- arch/arm/mach-davinci/cp_intc.c | 14 +- arch/arm/mach-davinci/gpio.c | 32 ++--- arch/arm/mach-davinci/irq.c | 9 + arch/arm/mach-dove/irq.c | 9 + arch/arm/mach-ebsa110/core.c | 6 - arch/arm/mach-ep93xx/core.c | 16 +- arch/arm/mach-footbridge/common.c | 6 - arch/arm/mach-footbridge/isa-irq.c | 18 ++- arch/arm/mach-gemini/gpio.c | 12 +- arch/arm/mach-gemini/irq.c | 9 + arch/arm/mach-h720x/common.c | 15 +- arch/arm/mach-h720x/cpu-h7202.c | 6 - arch/arm/mach-integrator/integrator_ap.c | 6 - arch/arm/mach-integrator/integrator_cp.c | 18 ++- arch/arm/mach-iop13xx/irq.c | 24 ++-- arch/arm/mach-iop13xx/msi.c | 2 arch/arm/mach-iop32x/irq.c | 6 - arch/arm/mach-ixp2000/core.c | 30 +++-- arch/arm/mach-ixp2000/ixdp2x00.c | 10 + arch/arm/mach-ixp2000/ixdp2x01.c | 10 + arch/arm/mach-ixp23xx/core.c | 25 ++-- arch/arm/mach-ixp23xx/ixdp2351.c | 20 ++- arch/arm/mach-ixp4xx/common.c | 14 +- arch/arm/mach-ks8695/irq.c | 28 ++--- arch/arm/mach-l7200/core.c | 6 - arch/arm/mach-lh7a40x/arch-kev7a400.c | 9 + arch/arm/mach-lh7a40x/arch-lpd7a40x.c | 13 +- arch/arm/mach-lh7a40x/irq-lh7a400.c | 9 + arch/arm/mach-lh7a40x/irq-lh7a404.c | 18 ++- arch/arm/mach-lh7a40x/irq-lpd7a40x.c | 12 +- arch/arm/mach-mmp/irq.c | 8 - arch/arm/mach-mx3/mx31ads.c | 9 + arch/arm/mach-mx3/mx31pdk.c | 9 + arch/arm/mach-netx/generic.c | 12 +- arch/arm/mach-nomadik/gpio.c | 26 ++-- arch/arm/mach-ns9xxx/board-a9m9750dev.c | 15 +- arch/arm/mach-ns9xxx/irq.c | 15 +- arch/arm/mach-omap1/fpga.c | 13 +- arch/arm/mach-omap1/irq.c | 24 ++-- arch/arm/mach-pnx4008/irq.c | 12 +- arch/arm/mach-pxa/balloon3.c | 8 - arch/arm/mach-pxa/irq.c | 18 ++- arch/arm/mach-pxa/lpd270.c | 6 - arch/arm/mach-pxa/lubbock.c | 6 - arch/arm/mach-pxa/mainstone.c | 6 - arch/arm/mach-pxa/pcm990-baseboard.c | 6 - arch/arm/mach-pxa/pxa3xx.c | 9 + arch/arm/mach-pxa/viper.c | 9 + arch/arm/mach-pxa/zeus.c | 11 +- arch/arm/mach-rpc/irq.c | 27 +++- arch/arm/mach-s3c2410/bast-irq.c | 20 +-- arch/arm/mach-s3c2412/irq.c | 35 +++--- arch/arm/mach-s3c2440/irq.c | 15 +- arch/arm/mach-s3c2443/irq.c | 71 +++++++------ arch/arm/mach-sa1100/irq.c | 36 ++++-- arch/arm/mach-sa1100/neponset.c | 8 - arch/arm/mach-shark/irq.c | 10 + arch/arm/mach-stmp378x/stmp378x.c | 9 + arch/arm/mach-stmp37xx/stmp37xx.c | 9 + arch/arm/mach-versatile/core.c | 6 - arch/arm/mach-w90x900/irq.c | 8 - arch/arm/oprofile/op_model_mpcore.c | 4 arch/arm/plat-mxc/gpio.c | 12 +- arch/arm/plat-mxc/irq.c | 6 - arch/arm/plat-omap/gpio.c | 36 ++++-- arch/arm/plat-orion/gpio.c | 21 ++- arch/arm/plat-orion/irq.c | 10 + arch/arm/plat-pxa/gpio.c | 12 +- arch/arm/plat-s3c24xx/irq.c | 112 ++++++++++++-------- arch/arm/plat-s3c24xx/s3c244x-irq.c | 15 +- arch/arm/plat-s3c64xx/irq-eint.c | 19 ++- arch/arm/plat-s3c64xx/irq.c | 21 ++- arch/arm/plat-s5pc1xx/irq-eint.c | 42 ++++--- arch/arm/plat-s5pc1xx/irq-gpio.c | 18 ++- arch/arm/plat-s5pc1xx/irq.c | 21 ++- arch/arm/plat-stmp3xxx/irq.c | 2 arch/arm/plat-stmp3xxx/pinmux.c | 12 +- arch/avr32/mach-at32ap/extint.c | 26 ++-- arch/avr32/mach-at32ap/pio.c | 9 + arch/blackfin/include/asm/ipipe.h | 4 arch/blackfin/mach-common/ints-priority.c | 53 ++++++--- arch/blackfin/mach-common/smp.c | 2 arch/cris/arch-v10/kernel/irq.c | 16 +- arch/frv/kernel/irq-mb93091.c | 12 +- arch/frv/kernel/irq-mb93093.c | 12 +- arch/frv/kernel/irq-mb93493.c | 8 - arch/frv/kernel/irq.c | 27 ++-- arch/h8300/kernel/irq.c | 14 +- arch/ia64/hp/sim/hpsim_irq.c | 6 - arch/ia64/kernel/iosapic.c | 45 ++++---- arch/ia64/kernel/irq.c | 6 - arch/ia64/kernel/irq_lsapic.c | 8 - arch/ia64/kernel/msi_ia64.c | 18 ++- arch/ia64/kernel/smpboot.c | 6 - arch/ia64/sn/kernel/irq.c | 25 ++-- arch/ia64/sn/kernel/msi_sn.c | 10 + arch/m32r/platforms/m32104ut/setup.c | 19 ++- arch/m32r/platforms/m32700ut/setup.c | 92 +++++++++------- arch/m32r/platforms/mappi/setup.c | 21 ++- arch/m32r/platforms/mappi2/setup.c | 21 ++- arch/m32r/platforms/mappi3/setup.c | 21 ++- arch/m32r/platforms/oaks32r/setup.c | 21 ++- arch/m32r/platforms/opsput/setup.c | 88 +++++++++------- arch/m32r/platforms/usrv/setup.c | 42 ++++--- arch/m68knommu/platform/5249/intc2.c | 9 + arch/m68knommu/platform/5272/intc.c | 11 +- arch/m68knommu/platform/68328/ints.c | 6 - arch/m68knommu/platform/68360/ints.c | 9 + arch/m68knommu/platform/coldfire/intc-2.c | 6 - arch/m68knommu/platform/coldfire/intc-simr.c | 7 - arch/m68knommu/platform/coldfire/intc.c | 8 - arch/microblaze/kernel/intc.c | 15 +- arch/mips/alchemy/common/irq.c | 43 ++++--- arch/mips/alchemy/devboards/pb1200/irqmap.c | 23 ++-- arch/mips/ar7/irq.c | 18 ++- arch/mips/bcm63xx/irq.c | 42 ++++--- arch/mips/cavium-octeon/octeon-irq.c | 70 ++++++++---- arch/mips/dec/ioasic-irq.c | 21 ++- arch/mips/dec/kn02-irq.c | 10 + arch/mips/emma/markeins/irq.c | 20 ++- arch/mips/jazz/irq.c | 6 - arch/mips/kernel/i8259.c | 15 +- arch/mips/kernel/irq-gic.c | 17 ++- arch/mips/kernel/irq-gt641xx.c | 11 +- arch/mips/kernel/irq-msc01.c | 22 ++-- arch/mips/kernel/irq-rm7000.c | 6 - arch/mips/kernel/irq-rm9000.c | 24 ++-- arch/mips/kernel/irq_cpu.c | 14 +- arch/mips/kernel/irq_txx9.c | 14 +- arch/mips/lasat/interrupt.c | 14 +- arch/mips/loongson/common/bonito-irq.c | 6 - arch/mips/nxp/pnx833x/common/interrupts.c | 33 +++--- arch/mips/nxp/pnx8550/common/int.c | 10 + arch/mips/pmc-sierra/msp71xx/msp_irq_cic.c | 10 + arch/mips/pmc-sierra/msp71xx/msp_irq_slp.c | 9 + arch/mips/powertv/asic/irq_asic.c | 6 - arch/mips/rb532/irq.c | 32 +++-- arch/mips/sgi-ip22/ip22-int.c | 24 ++-- arch/mips/sgi-ip27/ip27-irq.c | 12 +- arch/mips/sgi-ip27/ip27-timer.c | 4 arch/mips/sgi-ip32/ip32-irq.c | 68 +++++++----- arch/mips/sibyte/bcm1480/irq.c | 28 ++--- arch/mips/sibyte/sb1250/irq.c | 28 ++--- arch/mips/sni/a20r.c | 12 +- arch/mips/sni/pcimt.c | 14 +- arch/mips/sni/pcit.c | 12 +- arch/mips/sni/rm200.c | 21 ++- arch/mips/txx9/generic/irq_tx4939.c | 14 +- arch/mips/txx9/jmr3927/irq.c | 6 - arch/mips/txx9/rbtx4927/irq.c | 10 + arch/mips/txx9/rbtx4938/irq.c | 10 + arch/mips/txx9/rbtx4939/irq.c | 6 - arch/mips/vr41xx/common/icu.c | 12 +- arch/mips/vr41xx/common/irq.c | 8 - arch/mn10300/kernel/irq.c | 19 ++- arch/mn10300/kernel/mn10300-serial.c | 5 arch/parisc/include/asm/irq.h | 4 arch/parisc/kernel/irq.c | 31 +++-- arch/powerpc/include/asm/mpic.h | 6 - arch/powerpc/include/asm/qe_ic.h | 6 - arch/powerpc/kernel/crash.c | 4 arch/powerpc/kernel/irq.c | 2 arch/powerpc/platforms/512x/mpc5121_ads_cpld.c | 6 - arch/powerpc/platforms/52xx/media5200.c | 16 +- arch/powerpc/platforms/52xx/mpc52xx_pic.c | 35 ++++-- arch/powerpc/platforms/82xx/pq2ads-pci-pic.c | 6 - arch/powerpc/platforms/85xx/ksi8560.c | 2 arch/powerpc/platforms/85xx/mpc85xx_ads.c | 2 arch/powerpc/platforms/85xx/mpc85xx_ds.c | 2 arch/powerpc/platforms/85xx/sbc8560.c | 2 arch/powerpc/platforms/85xx/socrates_fpga_pic.c | 20 ++- arch/powerpc/platforms/85xx/stx_gp3.c | 2 arch/powerpc/platforms/85xx/tqm85xx.c | 2 arch/powerpc/platforms/86xx/gef_pic.c | 11 +- arch/powerpc/platforms/86xx/pic.c | 2 arch/powerpc/platforms/8xx/m8xx_setup.c | 4 arch/powerpc/platforms/cell/axon_msi.c | 9 + arch/powerpc/platforms/cell/beat_interrupt.c | 12 +- arch/powerpc/platforms/cell/interrupt.c | 12 +- arch/powerpc/platforms/cell/setup.c | 2 arch/powerpc/platforms/cell/spider-pic.c | 15 +- arch/powerpc/platforms/chrp/setup.c | 2 arch/powerpc/platforms/embedded6xx/flipper-pic.c | 12 +- arch/powerpc/platforms/embedded6xx/hlwd-pic.c | 26 ++-- arch/powerpc/platforms/iseries/irq.c | 19 ++- arch/powerpc/platforms/powermac/pic.c | 20 ++- arch/powerpc/platforms/ps3/interrupt.c | 15 +- arch/powerpc/platforms/pseries/setup.c | 2 arch/powerpc/platforms/pseries/xics.c | 28 +++-- arch/powerpc/sysdev/cpm1.c | 9 + arch/powerpc/sysdev/cpm2_pic.c | 18 +-- arch/powerpc/sysdev/fsl_msi.c | 12 +- arch/powerpc/sysdev/i8259.c | 35 +++--- arch/powerpc/sysdev/ipic.c | 15 +- arch/powerpc/sysdev/mpc8xx_pic.c | 16 +- arch/powerpc/sysdev/mpic.c | 35 ++++-- arch/powerpc/sysdev/mpic.h | 4 arch/powerpc/sysdev/mpic_pasemi_msi.c | 14 +- arch/powerpc/sysdev/mpic_u3msi.c | 19 ++- arch/powerpc/sysdev/mv64x60_pic.c | 21 ++- arch/powerpc/sysdev/qe_lib/qe_ic.c | 6 - arch/powerpc/sysdev/tsi108_pci.c | 14 +- arch/powerpc/sysdev/uic.c | 36 +++--- arch/powerpc/sysdev/xilinx_intc.c | 26 ++-- arch/score/kernel/irq.c | 10 + arch/sh/boards/mach-cayman/irq.c | 10 + arch/sh/boards/mach-dreamcast/irq.c | 9 + arch/sh/boards/mach-landisk/irq.c | 6 - arch/sh/boards/mach-microdev/irq.c | 19 ++- arch/sh/boards/mach-se/7206/irq.c | 9 + arch/sh/boards/mach-se/7343/irq.c | 6 - arch/sh/boards/mach-se/7722/irq.c | 8 - arch/sh/boards/mach-se/7724/irq.c | 6 - arch/sh/boards/mach-systemh/irq.c | 16 +- arch/sh/cchips/hd6446x/hd64461.c | 11 +- arch/sh/kernel/cpu/irq/imask.c | 6 - arch/sh/kernel/cpu/irq/intc-sh5.c | 34 +++--- arch/sparc/kernel/irq_64.c | 62 ++++++----- arch/sparc/kernel/pci_msi.c | 13 ++ arch/um/kernel/irq.c | 2 arch/x86/include/asm/hardirq.h | 2 arch/x86/include/asm/hpet.h | 8 - arch/x86/include/asm/hw_irq.h | 6 - arch/x86/include/asm/i8259.h | 6 - arch/x86/kernel/apic/io_apic.c | 125 +++++++++-------------- arch/x86/kernel/hpet.c | 16 +- arch/x86/kernel/i8259.c | 14 +- arch/x86/kernel/irq.c | 12 +- arch/x86/kernel/uv_irq.c | 12 +- arch/x86/kernel/visws_quirks.c | 29 ++--- arch/x86/kernel/vmiclock_32.c | 8 - arch/x86/lguest/boot.c | 8 - arch/xtensa/kernel/irq.c | 22 ++-- arch/xtensa/variants/s6000/gpio.c | 18 ++- drivers/dma/ipu/ipu_irq.c | 18 +-- drivers/gpio/langwell_gpio.c | 11 +- drivers/gpio/pl061.c | 19 ++- drivers/gpio/timbgpio.c | 17 +-- drivers/gpio/vr41xx_giu.c | 32 ++--- drivers/mfd/asic3.c | 27 ++-- drivers/mfd/ezx-pcap.c | 12 +- drivers/mfd/htc-egpio.c | 12 +- drivers/mfd/t7l66xb.c | 8 - drivers/mfd/tc6393xb.c | 15 +- drivers/mfd/twl4030-irq.c | 16 +- drivers/mfd/wm831x-irq.c | 18 +-- drivers/misc/sgi-gru/grufile.c | 2 drivers/parisc/dino.c | 12 +- drivers/parisc/eisa.c | 10 + drivers/parisc/gsc.c | 12 +- drivers/parisc/iosapic.c | 16 +- drivers/parisc/superio.c | 10 + drivers/pci/dmar.c | 16 +- drivers/pci/htirq.c | 22 ++-- drivers/pci/msi.c | 13 +- drivers/vlynq/vlynq.c | 23 ++-- drivers/xen/events.c | 38 ++++-- include/linux/dmar.h | 8 - include/linux/htirq.h | 11 +- include/linux/irq.h | 47 ++++---- include/linux/msi.h | 4 kernel/irq/autoprobe.c | 12 +- kernel/irq/chip.c | 60 ++++------- kernel/irq/handle.c | 24 ++-- kernel/irq/internals.h | 16 +- kernel/irq/manage.c | 65 +++++------ kernel/irq/migration.c | 16 +- kernel/irq/pm.c | 4 kernel/irq/resend.c | 8 - kernel/irq/spurious.c | 4 303 files changed, 3127 insertions(+), 2191 deletions(-)
Documentation/DocBook/genericirq.tmpl +12 -12
@@ -233,33 +233,33 @@ are used by the default flow implementations. The following helper functions are implemented (simplified excerpt): <programlisting> -default_enable(irq) +default_enable(desc) { - desc->chip->unmask(irq); + desc->chip->unmask(desc); } -default_disable(irq) +default_disable(desc) { - if (!delay_disable(irq)) - desc->chip->mask(irq); + if (!delay_disable(desc->irq)) + desc->chip->mask(desc); } -default_ack(irq) +default_ack(desc) { - chip->ack(irq); + chip->ack(desc); } -default_mask_ack(irq) +default_mask_ack(desc) { if (chip->mask_ack) { - chip->mask_ack(irq); + chip->mask_ack(desc); } else { - chip->mask(irq); - chip->ack(irq); + chip->mask(desc); + chip->ack(desc); } } -noop(irq) +noop(desc) { }
arch/alpha/kernel/irq.c +4 -3
@@ -46,8 +46,9 @@ int irq_select_affinity(unsigned int irq {static int last_cpu;int cpu = last_cpu +1 ; +struct irq_desc *desc =irq_to_desc (irq); -if (!irq_desc[irq].chip->set_affinity || irq_user_affinity[irq]) +if (!desc->chip->set_affinity || irq_user_affinity[irq])return 1 ; while (!cpu_possible(cpu) ||
@@ -55,8 +56,8 @@ int irq_select_affinity(unsigned int irq cpu = (cpu < (NR_CPUS -1 ) ? cpu +1 :0 ); last_cpu = cpu; -cpumask_copy (irq_desc[irq].affinity,cpumask_of (cpu)); - irq_desc[irq].chip->set_affinity (irq,cpumask_of (cpu)); +cpumask_copy (desc->affinity,cpumask_of (cpu)); + desc->chip->set_affinity (irq,cpumask_of (cpu)); return 0; }#endif /* CONFIG_SMP */
arch/alpha/kernel/irq_alpha.c +2 -2
@@ -218,8 +218,8 @@ process_mcheck_info(unsigned long vector* processed by PALcode, and comes in via entInt vector 1. */ -static void rtc_enable_disable (unsigned int irq) { } -static unsigned int rtc_startup (unsigned int irq) {return 0 ; } +static void rtc_enable_disable (struct irq_desc *desc) { } +static unsigned int rtc_startup (struct irq_desc *desc) {return 0 ; }struct irqaction timer_irqaction = { .handler = timer_interrupt,
arch/alpha/kernel/irq_i8259.c +13 -9
@@ -33,8 +33,10 @@ i8259_update_irq_hw(unsigned int irq, un }inline void -i8259a_enable_irq (unsigned int irq) +i8259a_enable_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq; +spin_lock (&i8259_irq_lock);i8259_update_irq_hw (irq, cached_irq_mask &= ~(1 << irq));spin_unlock (&i8259_irq_lock);
@@ -47,16 +49,18 @@ __i8259a_disable_irq(unsigned int irq) }void -i8259a_disable_irq (unsigned int irq) +i8259a_disable_irq (struct irq_desc *desc) {spin_lock (&i8259_irq_lock); -__i8259a_disable_irq (irq); +__i8259a_disable_irq (desc->irq);spin_unlock (&i8259_irq_lock); }void -i8259a_mask_and_ack_irq (unsigned int irq) +i8259a_mask_and_ack_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq; +spin_lock (&i8259_irq_lock);__i8259a_disable_irq (irq);
@@ -70,17 +74,17 @@ i8259a_mask_and_ack_irq(unsigned int irq }unsigned int -i8259a_startup_irq (unsigned int irq) +i8259a_startup_irq (struct irq_desc *desc) { -i8259a_enable_irq (irq); +i8259a_enable_irq (desc);return 0 ;/* never anything pending */ }void -i8259a_end_irq (unsigned int irq) +i8259a_end_irq (struct irq_desc *desc) { -if (!(irq_desc[irq].status & (IRQ_DISABLED |IRQ_INPROGRESS ))) -i8259a_enable_irq (irq); +if (!(desc->status & (IRQ_DISABLED |IRQ_INPROGRESS ))) +i8259a_enable_irq (desc); }struct irq_chip i8259a_irq_type = {
arch/alpha/kernel/irq_pyxis.c +11 -10
@@ -29,34 +29,35 @@ pyxis_update_irq_hw(unsigned long mask) }static inline void -pyxis_enable_irq (unsigned int irq) +pyxis_enable_irq (struct irq_desc *desc) { -pyxis_update_irq_hw (cached_irq_mask |=1UL << (irq -16 )); +pyxis_update_irq_hw (cached_irq_mask |=1UL << (desc->irq -16 )); }static void -pyxis_disable_irq (unsigned int irq) +pyxis_disable_irq (struct irq_desc *desc) { -pyxis_update_irq_hw (cached_irq_mask &= ~(1UL << (irq -16 ))); +pyxis_update_irq_hw (cached_irq_mask &= ~(1UL << (desc->irq -16 ))); }static unsigned int -pyxis_startup_irq (unsigned int irq) +pyxis_startup_irq (struct irq_desc *desc) { -pyxis_enable_irq (irq); +pyxis_enable_irq (desc);return 0 ; }static void -pyxis_end_irq (unsigned int irq) +pyxis_end_irq (struct irq_desc *desc) { -if (!(irq_desc[irq].status & (IRQ_DISABLED |IRQ_INPROGRESS ))) -pyxis_enable_irq (irq); +if (!(desc->status & (IRQ_DISABLED |IRQ_INPROGRESS ))) +pyxis_enable_irq (desc); }static void -pyxis_mask_and_ack_irq (unsigned int irq) +pyxis_mask_and_ack_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq;unsigned long bit =1UL << (irq -16 );unsigned long mask = cached_irq_mask &= ~bit;
arch/alpha/kernel/irq_srm.c +9 -9
@@ -18,33 +18,33 @@DEFINE_SPINLOCK (srm_irq_lock);static inline void -srm_enable_irq (unsigned int irq) +srm_enable_irq (struct irq_desc *desc) {spin_lock (&srm_irq_lock); -cserve_ena (irq -16 ); +cserve_ena (desc->irq -16 );spin_unlock (&srm_irq_lock); }static void -srm_disable_irq (unsigned int irq) +srm_disable_irq (struct irq_desc *desc) {spin_lock (&srm_irq_lock); -cserve_dis (irq -16 ); +cserve_dis (desc->irq -16 );spin_unlock (&srm_irq_lock); }static unsigned int -srm_startup_irq (unsigned int irq) +srm_startup_irq (struct irq_desc *desc) { -srm_enable_irq (irq); +srm_enable_irq (desc);return 0 ; }static void -srm_end_irq (unsigned int irq) +srm_end_irq (struct irq_desc *desc) { -if (!(irq_desc[irq].status & (IRQ_DISABLED |IRQ_INPROGRESS ))) -srm_enable_irq (irq); +if (!(desc->status & (IRQ_DISABLED |IRQ_INPROGRESS ))) +srm_enable_irq (desc); }/* Handle interrupts from the SRM, assuming no additional weirdness. */
arch/alpha/kernel/sys_alcor.c +14 -14
@@ -44,38 +44,38 @@ alcor_update_irq_hw(unsigned long mask) }static inline void -alcor_enable_irq (unsigned int irq) +alcor_enable_irq (struct irq_desc *desc) { -alcor_update_irq_hw (cached_irq_mask |=1UL << (irq -16 )); +alcor_update_irq_hw (cached_irq_mask |=1UL << (desc->irq -16 )); }static void -alcor_disable_irq (unsigned int irq) +alcor_disable_irq (struct irq_desc *desc) { -alcor_update_irq_hw (cached_irq_mask &= ~(1UL << (irq -16 ))); +alcor_update_irq_hw (cached_irq_mask &= ~(1UL << (desc->irq -16 ))); }static void -alcor_mask_and_ack_irq (unsigned int irq) +alcor_mask_and_ack_irq (struct irq_desc *desc) { -alcor_disable_irq (irq); +alcor_disable_irq (desc);/* On ALCOR/XLT, need to dismiss interrupt via GRU. */ - *(vuip )GRU_INT_CLEAR =1 << (irq -16 );mb (); + *(vuip )GRU_INT_CLEAR =1 << (desc->irq -16 );mb (); *(vuip )GRU_INT_CLEAR =0 ;mb (); }static unsigned int -alcor_startup_irq (unsigned int irq) +alcor_startup_irq (struct irq_desc *desc) { -alcor_enable_irq (irq); +alcor_enable_irq (desc);return 0 ; }static void -alcor_isa_mask_and_ack_irq (unsigned int irq) +alcor_isa_mask_and_ack_irq (struct irq_desc *desc) { -i8259a_mask_and_ack_irq (irq); +i8259a_mask_and_ack_irq (desc);/* On ALCOR/XLT, need to dismiss interrupt via GRU. */ *(vuip )GRU_INT_CLEAR =0x80000000 ;mb ();
@@ -83,10 +83,10 @@ alcor_isa_mask_and_ack_irq(unsigned int }static void -alcor_end_irq (unsigned int irq) +alcor_end_irq (struct irq_desc *desc) { -if (!(irq_desc[irq].status & (IRQ_DISABLED |IRQ_INPROGRESS ))) -alcor_enable_irq (irq); +if (!(desc->status & (IRQ_DISABLED |IRQ_INPROGRESS ))) +alcor_enable_irq (desc); }static struct irq_chip alcor_irq_type = {
arch/alpha/kernel/sys_cabriolet.c +11 -7
@@ -46,29 +46,33 @@ cabriolet_update_irq_hw(unsigned int irq }static inline void -cabriolet_enable_irq (unsigned int irq) +cabriolet_enable_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq; +cabriolet_update_irq_hw (irq, cached_irq_mask &= ~(1UL << irq)); }static void -cabriolet_disable_irq (unsigned int irq) +cabriolet_disable_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq; +cabriolet_update_irq_hw (irq, cached_irq_mask |=1UL << irq); }static unsigned int -cabriolet_startup_irq (unsigned int irq) +cabriolet_startup_irq (struct irq_desc *desc) { -cabriolet_enable_irq (irq); +cabriolet_enable_irq (desc);return 0 ;/* never anything pending */ }static void -cabriolet_end_irq (unsigned int irq) +cabriolet_end_irq (struct irq_desc *desc) { -if (!(irq_desc[irq].status & (IRQ_DISABLED |IRQ_INPROGRESS ))) -cabriolet_enable_irq (irq); +if (!(desc->status & (IRQ_DISABLED |IRQ_INPROGRESS ))) +cabriolet_enable_irq (desc); }static struct irq_chip cabriolet_irq_type = {
arch/alpha/kernel/sys_dp264.c +28 -22
115 lines not on this page · raw message
arch/alpha/kernel/sys_eb64p.c +11 -7
@@ -44,29 +44,33 @@ eb64p_update_irq_hw(unsigned int irq, un }static inline void -eb64p_enable_irq (unsigned int irq) +eb64p_enable_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq; +eb64p_update_irq_hw (irq, cached_irq_mask &= ~(1 << irq)); }static void -eb64p_disable_irq (unsigned int irq) +eb64p_disable_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq; +eb64p_update_irq_hw (irq, cached_irq_mask |=1 << irq); }static unsigned int -eb64p_startup_irq (unsigned int irq) +eb64p_startup_irq (struct irq_desc *desc) { -eb64p_enable_irq (irq); +eb64p_enable_irq (desc);return 0 ;/* never anything pending */ }static void -eb64p_end_irq (unsigned int irq) +eb64p_end_irq (struct irq_desc *desc) { -if (!(irq_desc[irq].status & (IRQ_DISABLED |IRQ_INPROGRESS ))) -eb64p_enable_irq (irq); +if (!(desc->status & (IRQ_DISABLED |IRQ_INPROGRESS ))) +eb64p_enable_irq (desc); }static struct irq_chip eb64p_irq_type = {
arch/alpha/kernel/sys_eiger.c +11 -7
@@ -51,33 +51,37 @@ eiger_update_irq_hw(unsigned long irq, u }static inline void -eiger_enable_irq (unsigned int irq) +eiger_enable_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq;unsigned long mask; + mask = (cached_irq_mask[irq >=64 ] &= ~(1UL << (irq &63 )));eiger_update_irq_hw (irq, mask); }static void -eiger_disable_irq (unsigned int irq) +eiger_disable_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq;unsigned long mask; + mask = (cached_irq_mask[irq >=64 ] |=1UL << (irq &63 ));eiger_update_irq_hw (irq, mask); }static unsigned int -eiger_startup_irq (unsigned int irq) +eiger_startup_irq (struct irq_desc *desc) { -eiger_enable_irq (irq); +eiger_enable_irq (desc);return 0 ;/* never anything pending */ }static void -eiger_end_irq (unsigned int irq) +eiger_end_irq (struct irq_desc *desc) { -if (!(irq_desc[irq].status & (IRQ_DISABLED |IRQ_INPROGRESS ))) -eiger_enable_irq (irq); +if (!(irq_desc->status & (IRQ_DISABLED |IRQ_INPROGRESS ))) +eiger_enable_irq (desc); }static struct irq_chip eiger_irq_type = {
arch/alpha/kernel/sys_jensen.c +20 -20
@@ -63,59 +63,59 @@*/ static unsigned int -jensen_local_startup (unsigned int irq) +jensen_local_startup (struct irq_desc *desc) {/* the parport is really hw IRQ 1, silly Jensen. */ -if (irq ==7 ) -i8259a_startup_irq (1 ); +if (desc->irq ==7 ) +i8259a_startup_irq (irq_to_desc (1 ));else /* * For all true local interrupts, set the flag that prevents * the IPL from being dropped during handler processing. */ -if (irq_desc[irq].action) - irq_desc[irq].action->flags |=IRQF_DISABLED ; +if (desc->action) + desc->action->flags |=IRQF_DISABLED ;return 0 ; }static void -jensen_local_shutdown (unsigned int irq) +jensen_local_shutdown (struct irq_desc *desc) {/* the parport is really hw IRQ 1, silly Jensen. */ -if (irq ==7 ) -i8259a_disable_irq (1 ); +if (desc->irq ==7 ) +i8259a_disable_irq (irq_to_desc (1 )); }static void -jensen_local_enable (unsigned int irq) +jensen_local_enable (struct irq_desc *desc) {/* the parport is really hw IRQ 1, silly Jensen. */ -if (irq ==7 ) -i8259a_enable_irq (1 ); +if (desc->irq ==7 ) +i8259a_enable_irq (irq_to_desc (1 )); }static void -jensen_local_disable (unsigned int irq) +jensen_local_disable (struct irq_desc *desc) {/* the parport is really hw IRQ 1, silly Jensen. */ -if (irq ==7 ) -i8259a_disable_irq (1 ); +if (desc->irq ==7 ) +i8259a_disable_irq (irq_to_desc (1 )); }static void -jensen_local_ack (unsigned int irq) +jensen_local_ack (struct irq_desc *desc) {/* the parport is really hw IRQ 1, silly Jensen. */ -if (irq ==7 ) -i8259a_mask_and_ack_irq (1 ); +if (desc->irq ==7 ) +i8259a_mask_and_ack_irq (irq_to_desc (1 )); }static void -jensen_local_end (unsigned int irq) +jensen_local_end (struct irq_desc *desc) {/* the parport is really hw IRQ 1, silly Jensen. */ -if (irq ==7 ) -i8259a_end_irq (1 ); +if (desc->irq ==7 ) +i8259a_end_irq (irq_to_desc (1 )); }static struct irq_chip jensen_local_irq_type = {
arch/alpha/kernel/sys_marvel.c +13 -13
@@ -104,15 +104,15 @@ io7_get_irq_ctl(unsigned int irq, struct }static void -io7_enable_irq (unsigned int irq) +io7_enable_irq (struct irq_desc *desc) {volatile unsigned long *ctl;struct io7 *io7; - ctl =io7_get_irq_ctl (irq, &io7); + ctl =io7_get_irq_ctl (desc->irq, &io7);if (!ctl || !io7) {printk (KERN_ERR "%s: get_ctl failed for irq %x\n" , - __func__, irq); + __func__, desc->irq);return ; }
@@ -124,15 +124,15 @@ io7_enable_irq(unsigned int irq) }static void -io7_disable_irq (unsigned int irq) +io7_disable_irq (struct irq_desc *desc) {volatile unsigned long *ctl;struct io7 *io7; - ctl =io7_get_irq_ctl (irq, &io7); + ctl =io7_get_irq_ctl (desc->irq, &io7);if (!ctl || !io7) {printk (KERN_ERR "%s: get_ctl failed for irq %x\n" , - __func__, irq); + __func__, desc->irq);return ; }
@@ -144,27 +144,27 @@ io7_disable_irq(unsigned int irq) }static unsigned int -io7_startup_irq (unsigned int irq) +io7_startup_irq (struct irq_desc *desc) { -io7_enable_irq (irq); +io7_enable_irq (desc);return 0 ;/* never anything pending */ }static void -io7_end_irq (unsigned int irq) +io7_end_irq (struct irq_desc *desc) { -if (!(irq_desc[irq].status & (IRQ_DISABLED |IRQ_INPROGRESS ))) -io7_enable_irq (irq); +if (!(desc->status & (IRQ_DISABLED |IRQ_INPROGRESS ))) +io7_enable_irq (desc); }static void -marvel_irq_noop (unsigned int irq) +marvel_irq_noop (struct irq_desc *desc) {return ; }static unsigned int -marvel_irq_noop_return (unsigned int irq) +marvel_irq_noop_return (struct irq_desc *desc) {return 0 ; }
arch/alpha/kernel/sys_mikasa.c +9 -9
@@ -43,29 +43,29 @@ mikasa_update_irq_hw(int mask) }static inline void -mikasa_enable_irq (unsigned int irq) +mikasa_enable_irq (struct irq_desc *desc) { -mikasa_update_irq_hw (cached_irq_mask |=1 << (irq -16 )); +mikasa_update_irq_hw (cached_irq_mask |=1 << (desc->irq -16 )); }static void -mikasa_disable_irq (unsigned int irq) +mikasa_disable_irq (struct irq_desc *desc) { -mikasa_update_irq_hw (cached_irq_mask &= ~(1 << (irq -16 ))); +mikasa_update_irq_hw (cached_irq_mask &= ~(1 << (desc->irq -16 ))); }static unsigned int -mikasa_startup_irq (unsigned int irq) +mikasa_startup_irq (struct irq_desc *desc) { -mikasa_enable_irq (irq); +mikasa_enable_irq (desc);return 0 ; }static void -mikasa_end_irq (unsigned int irq) +mikasa_end_irq (struct irq_desc *desc) { -if (!(irq_desc[irq].status & (IRQ_DISABLED |IRQ_INPROGRESS ))) -mikasa_enable_irq (irq); +if (!(desc->status & (IRQ_DISABLED |IRQ_INPROGRESS ))) +mikasa_enable_irq (desc); }static struct irq_chip mikasa_irq_type = {
arch/alpha/kernel/sys_noritake.c +11 -7
@@ -48,29 +48,33 @@ noritake_update_irq_hw(int irq, int mask }static void -noritake_enable_irq (unsigned int irq) +noritake_enable_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq; +noritake_update_irq_hw (irq, cached_irq_mask |=1 << (irq -16 )); }static void -noritake_disable_irq (unsigned int irq) +noritake_disable_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq; +noritake_update_irq_hw (irq, cached_irq_mask &= ~(1 << (irq -16 ))); }static unsigned int -noritake_startup_irq (unsigned int irq) +noritake_startup_irq (struct irq_desc *desc) { -noritake_enable_irq (irq); +noritake_enable_irq (desc);return 0 ; }static void -noritake_end_irq (unsigned int irq) +noritake_end_irq (struct irq_desc *desc) { -if (!(irq_desc[irq].status & (IRQ_DISABLED |IRQ_INPROGRESS ))) -noritake_enable_irq (irq); +if (!(desc->status & (IRQ_DISABLED |IRQ_INPROGRESS ))) +noritake_enable_irq (desc); }static struct irq_chip noritake_irq_type = {
arch/alpha/kernel/sys_rawhide.c +11 -8
@@ -56,8 +56,9 @@ rawhide_update_irq_hw(int hose, int mask (((h) < MCPCIA_MAX_HOSES) && (cached_irq_masks[(h)] != 0))static inline void -rawhide_enable_irq (unsigned int irq) +rawhide_enable_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq;unsigned int mask, hose; irq -=16 ;
@@ -76,8 +77,9 @@ rawhide_enable_irq(unsigned int irq) }static void -rawhide_disable_irq (unsigned int irq) +rawhide_disable_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq;unsigned int mask, hose; irq -=16 ;
@@ -96,8 +98,9 @@ rawhide_disable_irq(unsigned int irq) }static void -rawhide_mask_and_ack_irq (unsigned int irq) +rawhide_mask_and_ack_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq;unsigned int mask, mask1, hose; irq -=16 ;
@@ -122,17 +125,17 @@ rawhide_mask_and_ack_irq(unsigned int ir }static unsigned int -rawhide_startup_irq (unsigned int irq) +rawhide_startup_irq (struct irq_desc *desc) { -rawhide_enable_irq (irq); +rawhide_enable_irq (desc);return 0 ; }static void -rawhide_end_irq (unsigned int irq) +rawhide_end_irq (struct irq_desc *desc) { -if (!(irq_desc[irq].status & (IRQ_DISABLED |IRQ_INPROGRESS ))) -rawhide_enable_irq (irq); +if (!(desc->status & (IRQ_DISABLED |IRQ_INPROGRESS ))) +rawhide_enable_irq (desc); }static struct irq_chip rawhide_irq_type = {
arch/alpha/kernel/sys_rx164.c +9 -9
@@ -47,29 +47,29 @@ rx164_update_irq_hw(unsigned long mask) }static inline void -rx164_enable_irq (unsigned int irq) +rx164_enable_irq (struct irq_desc *desc) { -rx164_update_irq_hw (cached_irq_mask |=1UL << (irq -16 )); +rx164_update_irq_hw (cached_irq_mask |=1UL << (desc->irq -16 )); }static void -rx164_disable_irq (unsigned int irq) +rx164_disable_irq (struct irq_desc *desc) { -rx164_update_irq_hw (cached_irq_mask &= ~(1UL << (irq -16 ))); +rx164_update_irq_hw (cached_irq_mask &= ~(1UL << (desc->irq -16 ))); }static unsigned int -rx164_startup_irq (unsigned int irq) +rx164_startup_irq (struct irq_desc *desc) { -rx164_enable_irq (irq); +rx164_enable_irq (desc);return 0 ; }static void -rx164_end_irq (unsigned int irq) +rx164_end_irq (struct irq_desc *desc) { -if (!(irq_desc[irq].status & (IRQ_DISABLED |IRQ_INPROGRESS ))) -rx164_enable_irq (irq); +if (!(desc_.status & (IRQ_DISABLED |IRQ_INPROGRESS ))) +rx164_enable_irq (desc); }static struct irq_chip rx164_irq_type = {
arch/alpha/kernel/sys_sable.c +13 -13
@@ -443,57 +443,57 @@ lynx_swizzle(struct pci_dev *dev, u8 *pi/* GENERIC irq routines */ static inline void -sable_lynx_enable_irq (unsigned int irq) +sable_lynx_enable_irq (struct irq_desc *desc) {unsigned long bit, mask; - bit = sable_lynx_irq_swizzle->irq_to_mask[irq]; + bit = sable_lynx_irq_swizzle->irq_to_mask[desc->irq];spin_lock (&sable_lynx_irq_lock); mask = sable_lynx_irq_swizzle->shadow_mask &= ~(1UL << bit); sable_lynx_irq_swizzle->update_irq_hw (bit, mask);spin_unlock (&sable_lynx_irq_lock);#if 0 printk ("%s: mask 0x%lx bit 0x%lx irq 0x%x\n" , - __func__, mask, bit, irq); + __func__, mask, bit, desc->irq);#endif }static void -sable_lynx_disable_irq (unsigned int irq) +sable_lynx_disable_irq (struct irq_desc *desc) {unsigned long bit, mask; - bit = sable_lynx_irq_swizzle->irq_to_mask[irq]; + bit = sable_lynx_irq_swizzle->irq_to_mask[desc->irq];spin_lock (&sable_lynx_irq_lock); mask = sable_lynx_irq_swizzle->shadow_mask |=1UL << bit; sable_lynx_irq_swizzle->update_irq_hw (bit, mask);spin_unlock (&sable_lynx_irq_lock);#if 0 printk ("%s: mask 0x%lx bit 0x%lx irq 0x%x\n" , - __func__, mask, bit, irq); + __func__, mask, bit, desc->irq);#endif }static unsigned int -sable_lynx_startup_irq (unsigned int irq) +sable_lynx_startup_irq (struct irq_desc *desc) { -sable_lynx_enable_irq (irq); +sable_lynx_enable_irq (desc);return 0 ; }static void -sable_lynx_end_irq (unsigned int irq) +sable_lynx_end_irq (struct irq_desc *desc) { -if (!(irq_desc[irq].status & (IRQ_DISABLED |IRQ_INPROGRESS ))) -sable_lynx_enable_irq (irq); +if (!(desc->status & (IRQ_DISABLED |IRQ_INPROGRESS ))) +sable_lynx_enable_irq (desc); }static void -sable_lynx_mask_and_ack_irq (unsigned int irq) +sable_lynx_mask_and_ack_irq (struct irq_desc *desc) {unsigned long bit, mask; - bit = sable_lynx_irq_swizzle->irq_to_mask[irq]; + bit = sable_lynx_irq_swizzle->irq_to_mask[desc->irq];spin_lock (&sable_lynx_irq_lock); mask = sable_lynx_irq_swizzle->shadow_mask |=1UL << bit; sable_lynx_irq_swizzle->update_irq_hw (bit, mask);
arch/alpha/kernel/sys_takara.c +11 -7
@@ -45,33 +45,37 @@ takara_update_irq_hw(unsigned long irq, }static inline void -takara_enable_irq (unsigned int irq) +takara_enable_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq;unsigned long mask; + mask = (cached_irq_mask[irq >=64 ] &= ~(1UL << (irq &63 )));takara_update_irq_hw (irq, mask); }static void -takara_disable_irq (unsigned int irq) +takara_disable_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq;unsigned long mask; + mask = (cached_irq_mask[irq >=64 ] |=1UL << (irq &63 ));takara_update_irq_hw (irq, mask); }static unsigned int -takara_startup_irq (unsigned int irq) +takara_startup_irq (struct irq_desc *desc) { -takara_enable_irq (irq); +takara_enable_irq (desc);return 0 ;/* never anything pending */ }static void -takara_end_irq (unsigned int irq) +takara_end_irq (struct irq_desc *desc) { -if (!(irq_desc[irq].status & (IRQ_DISABLED |IRQ_INPROGRESS ))) -takara_enable_irq (irq); +if (!(desc->status & (IRQ_DISABLED |IRQ_INPROGRESS ))) +takara_enable_irq (desc); }static struct irq_chip takara_irq_type = {
arch/alpha/kernel/sys_titan.c +11 -11
@@ -112,35 +112,35 @@ titan_update_irq_hw(unsigned long mask) }static inline void -titan_enable_irq (unsigned int irq) +titan_enable_irq (struct irq_desc *desc) {spin_lock (&titan_irq_lock); - titan_cached_irq_mask |=1UL << (irq -16 ); + titan_cached_irq_mask |=1UL << (desc->irq -16 );titan_update_irq_hw (titan_cached_irq_mask);spin_unlock (&titan_irq_lock); }static inline void -titan_disable_irq (unsigned int irq) +titan_disable_irq (struct irq_desc *desc) {spin_lock (&titan_irq_lock); - titan_cached_irq_mask &= ~(1UL << (irq -16 )); + titan_cached_irq_mask &= ~(1UL << (desc->irq -16 ));titan_update_irq_hw (titan_cached_irq_mask);spin_unlock (&titan_irq_lock); }static unsigned int -titan_startup_irq (unsigned int irq) +titan_startup_irq (struct irq_desc *desc) { -titan_enable_irq (irq); +titan_enable_irq (desc);return 0 ;/* never anything pending */ }static void -titan_end_irq (unsigned int irq) +titan_end_irq (struct irq_desc *desc) { -if (!(irq_desc[irq].status & (IRQ_DISABLED |IRQ_INPROGRESS ))) -titan_enable_irq (irq); +if (!(desc->status & (IRQ_DISABLED |IRQ_INPROGRESS ))) +titan_enable_irq (desc); } static void
@@ -158,10 +158,10 @@ titan_cpu_set_irq_affinity(unsigned int }static int -titan_set_irq_affinity (unsigned int irq,const struct cpumask *affinity) +titan_set_irq_affinity (struct irq_desc *desc,const struct cpumask *affinity) {spin_lock (&titan_irq_lock); -titan_cpu_set_irq_affinity (irq -16 , *affinity); +titan_cpu_set_irq_affinity (desc->irq -16 , *affinity);titan_update_irq_hw (titan_cached_irq_mask);spin_unlock (&titan_irq_lock);
arch/alpha/kernel/sys_wildfire.c +19 -13
@@ -104,10 +104,12 @@ wildfire_init_irq_hw(void) }static void -wildfire_enable_irq (unsigned int irq) +wildfire_enable_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq; +if (irq <16 ) -i8259a_enable_irq (irq); +i8259a_enable_irq (desc);spin_lock (&wildfire_irq_lock);set_bit (irq, &cached_irq_mask);
@@ -116,10 +118,12 @@ wildfire_enable_irq(unsigned int irq) }static void -wildfire_disable_irq (unsigned int irq) +wildfire_disable_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq; +if (irq <16 ) -i8259a_disable_irq (irq); +i8259a_disable_irq (desc);spin_lock (&wildfire_irq_lock);clear_bit (irq, &cached_irq_mask);
@@ -128,10 +132,12 @@ wildfire_disable_irq(unsigned int irq) }static void -wildfire_mask_and_ack_irq (unsigned int irq) +wildfire_mask_and_ack_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq; +if (irq <16 ) -i8259a_mask_and_ack_irq (irq); +i8259a_mask_and_ack_irq (desc);spin_lock (&wildfire_irq_lock);clear_bit (irq, &cached_irq_mask);
@@ -140,21 +146,21 @@ wildfire_mask_and_ack_irq(unsigned int i }static unsigned int -wildfire_startup_irq (unsigned int irq) +wildfire_startup_irq (struct irq_desc *desc) { -wildfire_enable_irq (irq); +wildfire_enable_irq (desc);return 0 ;/* never anything pending */ }static void -wildfire_end_irq (unsigned int irq) +wildfire_end_irq (struct irq_desc *desc) {#if 0 -if (!irq_desc[irq].action) -printk ("got irq %d\n" , irq); +if (!desc->action) +printk ("got irq %d\n" , desc->irq);#endif -if (!(irq_desc[irq].status & (IRQ_DISABLED |IRQ_INPROGRESS ))) -wildfire_enable_irq (irq); +if (!(desc->status & (IRQ_DISABLED |IRQ_INPROGRESS ))) +wildfire_enable_irq (desc); }static struct irq_chip wildfire_irq_type = {
arch/arm/common/gic.c +12 -8
@@ -80,8 +80,9 @@ static inline unsigned int gic_irq(unsig* our "acknowledge" routine disable the interrupt, then mark it as * complete. */ -static void gic_ack_irq (unsigned int irq) +static void gic_ack_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq;u32 mask =1 << (irq %32 );spin_lock (&irq_controller_lock);
@@ -90,8 +91,9 @@ static void gic_ack_irq(unsigned int irqspin_unlock (&irq_controller_lock); } -static void gic_mask_irq (unsigned int irq) +static void gic_mask_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq;u32 mask =1 << (irq %32 );spin_lock (&irq_controller_lock);
@@ -99,8 +101,9 @@ static void gic_mask_irq(unsigned int irspin_unlock (&irq_controller_lock); } -static void gic_unmask_irq (unsigned int irq) +static void gic_unmask_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq;u32 mask =1 << (irq %32 );spin_lock (&irq_controller_lock);
@@ -109,8 +112,9 @@ static void gic_unmask_irq(unsigned int }#ifdef CONFIG_SMP -static int gic_set_cpu (unsigned int irq,const struct cpumask *mask_val) +static int gic_set_cpu (struct irq_desc *desc,const struct cpumask *mask_val) { +unsigned int irq = desc->irq;void __iomem *reg =gic_dist_base (irq) +GIC_DIST_TARGET + (gic_irq (irq) & ~3 );unsigned int shift = (irq %4 ) *8 ;unsigned int cpu =cpumask_first (mask_val);
@@ -129,13 +133,13 @@ static int gic_set_cpu(unsigned int irq,static void gic_handle_cascade_irq (unsigned int irq,struct irq_desc *desc) { -struct gic_chip_data *chip_data =get_irq_data (irq); -struct irq_chip *chip =get_irq_chip (irq); +struct gic_chip_data *chip_data =get_irq_desc_data (desc); +struct irq_chip *chip =get_irq_desc_chip (desc);unsigned int cascade_irq, gic_irq;unsigned long status;/* primary controller ack'ing */ - chip->ack (irq); + chip->ack (desc);spin_lock (&irq_controller_lock); status =readl (chip_data->cpu_base +GIC_CPU_INTACK );
@@ -153,7 +157,7 @@ static void gic_handle_cascade_irq(unsig out:/* primary controller unmasking */ - chip->unmask (irq); + chip->unmask (desc); }static struct irq_chip gic_chip = {
arch/arm/common/it8152.c +6 -2
@@ -32,8 +32,10 @@#define MAX_SLOTS 21 -static void it8152_mask_irq (unsigned int irq) +static void it8152_mask_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq; +if (irq >=IT8152_LD_IRQ (0 )) { __raw_writel((__raw_readl(IT8152_INTC_LDCNIMR) | (1 << (irq - IT8152_LD_IRQ(0)))),
@@ -49,8 +51,10 @@ static void it8152_mask_irq(unsigned int } } -static void it8152_unmask_irq (unsigned int irq) +static void it8152_unmask_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq; +if (irq >=IT8152_LD_IRQ (0 )) { __raw_writel((__raw_readl(IT8152_INTC_LDCNIMR) & ~(1 << (irq - IT8152_LD_IRQ(0)))),
arch/arm/common/locomo.c +66 -37
251 lines not on this page · raw message
arch/arm/common/sa1111.c +33 -23
146 lines not on this page · raw message
arch/arm/common/vic.c +14 -7
@@ -28,25 +28,31 @@#include <asm/mach/irq.h> #include <asm/hardware/vic.h> -static void vic_ack_irq (unsigned int irq) +static void vic_ack_irq (struct irq_desc *desc) { -void __iomem *base =get_irq_chip_data (irq); +unsigned int irq = desc->irq; +void __iomem *base =get_irq_desc_chip_data (desc); + irq &=31 ;writel (1 << irq, base +VIC_INT_ENABLE_CLEAR );/* moreover, clear the soft-triggered, in case it was the reason */ writel (1 << irq, base +VIC_INT_SOFT_CLEAR ); } -static void vic_mask_irq (unsigned int irq) +static void vic_mask_irq (struct irq_desc *desc) { -void __iomem *base =get_irq_chip_data (irq); +unsigned int irq = desc->irq; +void __iomem *base =get_irq_desc_chip_data (desc); + irq &=31 ;writel (1 << irq, base +VIC_INT_ENABLE_CLEAR ); } -static void vic_unmask_irq (unsigned int irq) +static void vic_unmask_irq (struct irq_desc *desc) { -void __iomem *base =get_irq_chip_data (irq); +unsigned int irq = desc->irq; +void __iomem *base =get_irq_desc_chip_data (irq); + irq &=31 ;writel (1 << irq, base +VIC_INT_ENABLE ); }
@@ -236,8 +242,9 @@ static struct vic_device *vic_from_irq(ureturn NULL ; } -static int vic_set_wake (unsigned int irq,unsigned int on) +static int vic_set_wake (struct irq_desc *desc,unsigned int on) { +unsigned int irq = desc->irq;struct vic_device *v =vic_from_irq (irq);unsigned int off = irq &31 ;u32 bit =1 << off;
arch/arm/kernel/ecard.c +7 -5
@@ -443,8 +443,9 @@ static expansioncard_ops_t ecard_default* * They are not meant to be called directly, but via enable/disable_irq. */ -static void ecard_irq_unmask (unsigned int irqnr) +static void ecard_irq_unmask (struct irq_desc *desc) { +unsigned int irqnr = desc->irq;ecard_t *ec =slot_to_ecard (irqnr -32 );if (ec) {
@@ -459,8 +460,9 @@ static void ecard_irq_unmask(unsigned in } } -static void ecard_irq_mask (unsigned int irqnr) +static void ecard_irq_mask (struct irq_desc *desc) { +unsigned int irqnr = desc->irq;ecard_t *ec =slot_to_ecard (irqnr -32 );if (ec) {
@@ -551,7 +553,7 @@ static void ecard_check_lockup(struct irprintk (KERN_ERR "\nInterrupt lockup detected - " "disabling all expansion card interrupts\n" ); - desc->chip->mask (IRQ_EXPANSIONCARD ); + desc->chip->mask (irq_to_desc (IRQ_EXPANSIONCARD ));ecard_dump_irq_state (); } }else
@@ -574,7 +576,7 @@ ecard_irq_handler(unsigned int irq, struecard_t *ec;int called =0 ; - desc->chip->mask (irq); + desc->chip->mask (desc);for (ec = cards; ec; ec = ec->next) {int pending;
@@ -591,7 +593,7 @@ ecard_irq_handler(unsigned int irq, stru called ++; } } - desc->chip->unmask (irq); + desc->chip->unmask (desc);if (called ==0 )ecard_check_lockup (desc);
arch/arm/kernel/irq.c +1 -1
@@ -167,7 +167,7 @@ static void route_irq(struct irq_desc *dpr_debug ("IRQ%u: moving from cpu%u to cpu%u\n" , irq, desc->node, cpu);raw_spin_lock_irq (&desc->lock); - desc->chip->set_affinity (irq,cpumask_of (cpu)); + desc->chip->set_affinity (desc,cpumask_of (cpu));raw_spin_unlock_irq (&desc->lock); }
arch/arm/mach-aaec2000/core.c +3 -3
@@ -67,17 +67,17 @@ void __init aaec2000_map_io(void)/* * Interrupt handling routines */ -static void aaec2000_int_ack (unsigned int irq) +static void aaec2000_int_ack (struct irq_desc *desc) {IRQ_INTSR =1 << irq; } -static void aaec2000_int_mask (unsigned int irq) +static void aaec2000_int_mask (struct irq_desc *desc) {IRQ_INTENC |= (1 << irq); } -static void aaec2000_int_unmask (unsigned int irq) +static void aaec2000_int_unmask (struct irq_desc *desc) {IRQ_INTENS |= (1 << irq); }
arch/arm/mach-at91/gpio.c +9 -6
@@ -274,8 +274,9 @@ EXPORT_SYMBOL(at91_get_gpio_value);static u32 wakeups[MAX_GPIO_BANKS ];static u32 backups[MAX_GPIO_BANKS ]; -static int gpio_irq_set_wake (unsigned pin,unsigned state) +static int gpio_irq_set_wake (struct irq_desc *desc,unsigned state) { +unsigned int pin = desc->irq;unsigned mask =pin_to_mask (pin);unsigned bank = (pin -PIN_BASE ) /32 ;
@@ -344,8 +345,9 @@ void at91_gpio_resume(void)* IRQ0..IRQ6 should be configurable, e.g. level vs edge triggering. */ -static void gpio_irq_mask (unsigned pin) +static void gpio_irq_mask (struct irq_desc *desc) { +unsigned int pin = desc->irq;void __iomem *pio =pin_to_controller (pin);unsigned mask =pin_to_mask (pin);
@@ -353,8 +355,9 @@ static void gpio_irq_mask(unsigned pin)__raw_writel (mask, pio +PIO_IDR ); } -static void gpio_irq_unmask (unsigned pin) +static void gpio_irq_unmask (struct irq_desc *desc) { +unsigned int pin = desc->irq;void __iomem *pio =pin_to_controller (pin);unsigned mask =pin_to_mask (pin);
@@ -362,7 +365,7 @@ static void gpio_irq_unmask(unsigned pin__raw_writel (mask, pio +PIO_IER ); } -static int gpio_irq_type (unsigned pin,unsigned type) +static int gpio_irq_type (struct irq_desc *desc,unsigned type) {switch (type) {case IRQ_TYPE_NONE :
@@ -393,7 +396,7 @@ static void gpio_irq_handler(unsigned ir pio = at91_gpio->regbase;/* temporarily mask (level sensitive) parent IRQ */ - desc->chip->ack (irq); + desc->chip->ack (desc);for (;;) {/* Reading ISR acks pending (edge triggered) GPIO interrupts. * When there none are pending, we're finished unless we need
@@ -429,7 +432,7 @@ static void gpio_irq_handler(unsigned ir isr >>=1 ; } } - desc->chip->unmask (irq); + desc->chip->unmask (desc);/* now it may re-trigger */ }
arch/arm/mach-at91/irq.c +11 -4
@@ -34,14 +34,18 @@#include <asm/mach/map.h> -static void at91_aic_mask_irq (unsigned int irq) +static void at91_aic_mask_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq; +/* Disable interrupt on AIC */ at91_sys_write (AT91_AIC_IDCR ,1 << irq); } -static void at91_aic_unmask_irq (unsigned int irq) +static void at91_aic_unmask_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq; +/* Enable interrupt on AIC */ at91_sys_write (AT91_AIC_IECR ,1 << irq); }
@@ -50,8 +54,9 @@ unsigned int at91_extern_irq;#define is_extern_irq (irq) ((1 << (irq)) & at91_extern_irq) -static int at91_aic_set_type (unsigned irq,unsigned type) +static int at91_aic_set_type (struct irq_desc *desc,unsigned type) { +unsigned int irq = desc->irq;unsigned int smr, srctype;switch (type) {
@@ -87,8 +92,10 @@ static int at91_aic_set_type(unsigned irstatic u32 wakeups;static u32 backups; -static int at91_aic_set_wake (unsigned irq,unsigned value) +static int at91_aic_set_wake (struct irq_desc *desc,unsigned value) { +unsigned int irq = desc->irq; +if (unlikely (irq >=32 ))return -EINVAL ;
arch/arm/mach-bcmring/irq.c +18 -6
@@ -30,38 +30,50 @@#include <mach/csp/intcHw_reg.h> #include <mach/csp/mm_io.h> -static void bcmring_mask_irq0 (unsigned int irq) +static void bcmring_mask_irq0 (struct irq_desc *desc) { +unsigned int irq = desc->irq; +writel (1 << (irq -IRQ_INTC0_START ),MM_IO_BASE_INTC0 +INTCHW_INTENCLEAR ); } -static void bcmring_unmask_irq0 (unsigned int irq) +static void bcmring_unmask_irq0 (struct irq_desc *desc) { +unsigned int irq = desc->irq; +writel (1 << (irq -IRQ_INTC0_START ),MM_IO_BASE_INTC0 +INTCHW_INTENABLE ); } -static void bcmring_mask_irq1 (unsigned int irq) +static void bcmring_mask_irq1 (struct irq_desc *desc) { +unsigned int irq = desc->irq; +writel (1 << (irq -IRQ_INTC1_START ),MM_IO_BASE_INTC1 +INTCHW_INTENCLEAR ); } -static void bcmring_unmask_irq1 (unsigned int irq) +static void bcmring_unmask_irq1 (struct irq_desc *desc) { +unsigned int irq = desc->irq; +writel (1 << (irq -IRQ_INTC1_START ),MM_IO_BASE_INTC1 +INTCHW_INTENABLE ); } -static void bcmring_mask_irq2 (unsigned int irq) +static void bcmring_mask_irq2 (struct irq_desc *desc) { +unsigned int irq = desc->irq; +writel (1 << (irq -IRQ_SINTC_START ),MM_IO_BASE_SINTC +INTCHW_INTENCLEAR ); } -static void bcmring_unmask_irq2 (unsigned int irq) +static void bcmring_unmask_irq2 (struct irq_desc *desc) { +unsigned int irq = desc->irq; +writel (1 << (irq -IRQ_SINTC_START ),MM_IO_BASE_SINTC +INTCHW_INTENABLE ); }
arch/arm/mach-clps711x/irq.c +12 -6
@@ -27,8 +27,9 @@#include <asm/hardware/clps7111.h> -static void int1_mask (unsigned int irq) +static void int1_mask (struct irq_desc *desc) { +unsigned int irq = desc->irq;u32 intmr1; intmr1 =clps_readl (INTMR1 );
@@ -36,8 +37,9 @@ static void int1_mask(unsigned int irq)clps_writel (intmr1,INTMR1 ); } -static void int1_ack (unsigned int irq) +static void int1_ack (struct irq_desc *desc) { +unsigned int irq = desc->irq;u32 intmr1; intmr1 =clps_readl (INTMR1 );
@@ -54,8 +56,9 @@ static void int1_ack(unsigned int irq) } } -static void int1_unmask (unsigned int irq) +static void int1_unmask (struct irq_desc *desc) { +unsigned int irq = desc->irq;u32 intmr1; intmr1 =clps_readl (INTMR1 );
@@ -69,8 +72,9 @@ static struct irq_chip int1_chip = { .unmask = int1_unmask, }; -static void int2_mask (unsigned int irq) +static void int2_mask (struct irq_desc *desc) { +unsigned int irq = desc->irq;u32 intmr2; intmr2 =clps_readl (INTMR2 );
@@ -78,8 +82,9 @@ static void int2_mask(unsigned int irq)clps_writel (intmr2,INTMR2 ); } -static void int2_ack (unsigned int irq) +static void int2_ack (struct irq_desc *desc) { +unsigned int irq = desc->irq;u32 intmr2; intmr2 =clps_readl (INTMR2 );
@@ -91,8 +96,9 @@ static void int2_ack(unsigned int irq) } } -static void int2_unmask (unsigned int irq) +static void int2_unmask (struct irq_desc *desc) { +unsigned int irq = desc->irq;u32 intmr2; intmr2 =clps_readl (INTMR2 );
arch/arm/mach-davinci/cp_intc.c +9 -5
@@ -27,14 +27,16 @@ static inline void cp_intc_write(unsigne__raw_writel (value, cp_intc_base + offset); } -static void cp_intc_ack_irq (unsigned int irq) +static void cp_intc_ack_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq;cp_intc_write (irq,CP_INTC_SYS_STAT_IDX_CLR ); }/* Disable interrupt */ -static void cp_intc_mask_irq (unsigned int irq) +static void cp_intc_mask_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq;/* XXX don't know why we need to disable nIRQ here... */ cp_intc_write (1 ,CP_INTC_HOST_ENABLE_IDX_CLR );cp_intc_write (irq,CP_INTC_SYS_ENABLE_IDX_CLR );
@@ -42,13 +44,15 @@ static void cp_intc_mask_irq(unsigned in }/* Enable interrupt */ -static void cp_intc_unmask_irq (unsigned int irq) +static void cp_intc_unmask_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq;cp_intc_write (irq,CP_INTC_SYS_ENABLE_IDX_SET ); } -static int cp_intc_set_irq_type (unsigned int irq,unsigned int flow_type) +static int cp_intc_set_irq_type (struct irq_desc *desc,unsigned int flow_type) { +unsigned int irq = desc->irq;unsigned reg =BIT_WORD (irq);unsigned mask =BIT_MASK (irq);unsigned polarity =cp_intc_read (CP_INTC_SYS_POLARITY (reg));
@@ -86,7 +90,7 @@ static int cp_intc_set_irq_type(unsigned* generic drivers which call {enable|disable}_irq_wake for * wake up interrupt sources (eg RTC on DA850). */ -static int cp_intc_set_wake (unsigned int irq,unsigned int on) +static int cp_intc_set_wake (struct irq_desc *desc,unsigned int on) {return 0 ; }
arch/arm/mach-davinci/gpio.c +16 -16
@@ -159,20 +159,20 @@ pure_initcall(davinci_gpio_setup);* serve as EDMA event triggers. */ -static void gpio_irq_disable (unsigned irq) +static void gpio_irq_disable (struct irq_desc *desc) { -struct gpio_controller *__iomem g =get_irq_chip_data (irq); -u32 mask = (u32 )get_irq_data (irq); +struct gpio_controller *__iomem g =get_irq_desc_chip_data (desc); +u32 mask = (u32 )get_irq_desc_data (desc);__raw_writel (mask, &g->clr_falling);__raw_writel (mask, &g->clr_rising); } -static void gpio_irq_enable (unsigned irq) +static void gpio_irq_enable (struct irq_desc *desc) { -struct gpio_controller *__iomem g =get_irq_chip_data (irq); -u32 mask = (u32 )get_irq_data (irq); -unsigned status = irq_desc[irq].status; +struct gpio_controller *__iomem g =get_irq_desc_chip_data (desc); +u32 mask = (u32 )get_irq_desc_data (desc); +unsigned status = desc->status; status &=IRQ_TYPE_EDGE_FALLING |IRQ_TYPE_EDGE_RISING ;if (!status)
@@ -184,19 +184,19 @@ static void gpio_irq_enable(unsigned irq__raw_writel (mask, &g->set_rising); } -static int gpio_irq_type (unsigned irq,unsigned trigger) +static int gpio_irq_type (struct irq_desc *desc,unsigned trigger) { -struct gpio_controller *__iomem g =get_irq_chip_data (irq); -u32 mask = (u32 )get_irq_data (irq); +struct gpio_controller *__iomem g =get_irq_desc_chip_data (desc); +u32 mask = (u32 )get_irq_desc_data (desc);if (trigger & ~(IRQ_TYPE_EDGE_FALLING |IRQ_TYPE_EDGE_RISING ))return -EINVAL ; - irq_desc[irq].status &= ~IRQ_TYPE_SENSE_MASK ; - irq_desc[irq].status |= trigger; + desc->status &= ~IRQ_TYPE_SENSE_MASK ; + desc->status |= trigger;/* don't enable the IRQ if it's currently disabled */ -if (irq_desc[irq].depth ==0 ) { +if (desc->depth ==0 ) {__raw_writel (mask, (trigger &IRQ_TYPE_EDGE_FALLING ) ? &g->set_falling : &g->clr_falling); __raw_writel(mask, (trigger & IRQ_TYPE_EDGE_RISING)
@@ -223,8 +223,8 @@ gpio_irq_handler(unsigned irq, struct ir mask <<=16 ;/* temporarily mask (level sensitive) parent IRQ */ - desc->chip->mask (irq); - desc->chip->ack (irq); + desc->chip->mask (desc); + desc->chip->ack (desc);while (1 ) {u32 status;int n;
@@ -247,7 +247,7 @@ gpio_irq_handler(unsigned irq, struct ir status >>= res; } } - desc->chip->unmask (irq); + desc->chip->unmask (desc);/* now it may re-trigger */ }
arch/arm/mach-davinci/irq.c +6 -3
@@ -53,8 +53,9 @@ static inline void davinci_irq_writel(un }/* Disable interrupt */ -static void davinci_mask_irq (unsigned int irq) +static void davinci_mask_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq;unsigned int mask;u32 l;
@@ -72,8 +73,9 @@ static void davinci_mask_irq(unsigned in }/* Enable interrupt */ -static void davinci_unmask_irq (unsigned int irq) +static void davinci_unmask_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq;unsigned int mask;u32 l;
@@ -91,8 +93,9 @@ static void davinci_unmask_irq(unsigned }/* EOI interrupt */ -static void davinci_ack_irq (unsigned int irq) +static void davinci_ack_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq;unsigned int mask; mask =1 <<IRQ_BIT (irq);
arch/arm/mach-dove/irq.c +6 -3
@@ -36,8 +36,9 @@ static void gpio_irq_handler(unsigned in } } -static void pmu_irq_mask (unsigned int irq) +static void pmu_irq_mask (struct irq_desc *desc) { +unsigned int irq = desc->irq;int pin =irq_to_pmu (irq);u32 u;
@@ -46,8 +47,9 @@ static void pmu_irq_mask(unsigned int irwritel (u,PMU_INTERRUPT_MASK ); } -static void pmu_irq_unmask (unsigned int irq) +static void pmu_irq_unmask (struct irq_desc *desc) { +unsigned int irq = desc->irq;int pin =irq_to_pmu (irq);u32 u;
@@ -56,8 +58,9 @@ static void pmu_irq_unmask(unsigned intwritel (u,PMU_INTERRUPT_MASK ); } -static void pmu_irq_ack (unsigned int irq) +static void pmu_irq_ack (struct irq_desc *desc) { +unsigned int irq = desc->irq;int pin =irq_to_pmu (irq);u32 u;
arch/arm/mach-ebsa110/core.c +4 -2
@@ -35,13 +35,15 @@#define IRQ_STAT 0xff000000/* read */ #define IRQ_MCLR 0xff000000/* write */ -static void ebsa110_mask_irq (unsigned int irq) +static void ebsa110_mask_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq;__raw_writeb (1 << irq,IRQ_MCLR ); } -static void ebsa110_unmask_irq (unsigned int irq) +static void ebsa110_unmask_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq;__raw_writeb (1 << irq,IRQ_MSET ); }
arch/arm/mach-ep93xx/core.c +10 -6
@@ -225,8 +225,9 @@ static void ep93xx_gpio_f_irq_handler(ungeneric_handle_irq (gpio_irq); } -static void ep93xx_gpio_irq_ack (unsigned int irq) +static void ep93xx_gpio_irq_ack (struct irq_desc *desc) { +unsigned int irq = desc->irq;int line =irq_to_gpio (irq);int port = line >>3 ;int port_mask =1 << (line &7 );
@@ -239,8 +240,9 @@ static void ep93xx_gpio_irq_ack(unsigned__raw_writeb (port_mask,EP93XX_GPIO_REG (eoi_register_offset[port])); } -static void ep93xx_gpio_irq_mask_ack (unsigned int irq) +static void ep93xx_gpio_irq_mask_ack (struct irq_desc *desc) { +unsigned int irq = desc->irq;int line =irq_to_gpio (irq);int port = line >>3 ;int port_mask =1 << (line &7 );
@@ -254,8 +256,9 @@ static void ep93xx_gpio_irq_mask_ack(uns__raw_writeb (port_mask,EP93XX_GPIO_REG (eoi_register_offset[port])); } -static void ep93xx_gpio_irq_mask (unsigned int irq) +static void ep93xx_gpio_irq_mask (struct irq_desc *desc) { +unsigned int irq = desc->irq;int line =irq_to_gpio (irq);int port = line >>3 ;
@@ -263,8 +266,9 @@ static void ep93xx_gpio_irq_mask(unsigneep93xx_gpio_update_int_params (port); } -static void ep93xx_gpio_irq_unmask (unsigned int irq) +static void ep93xx_gpio_irq_unmask (struct irq_desc *desc) { +unsigned int irq = desc->irq;int line =irq_to_gpio (irq);int port = line >>3 ;
@@ -278,9 +282,9 @@ static void ep93xx_gpio_irq_unmask(unsig* edge (1) triggered, while gpio_int_type2 controls whether it * triggers on low/falling (0) or high/rising (1). */ -static int ep93xx_gpio_irq_type (unsigned int irq,unsigned int type) +static int ep93xx_gpio_irq_type (struct irq_desc *desc,unsigned int type) { -struct irq_desc *desc = irq_desc + irq; +unsigned int irq = desc->irq;const int gpio =irq_to_gpio (irq);const int port = gpio >>3 ;const int port_mask =1 << (gpio &7 );
arch/arm/mach-footbridge/common.c +4 -2
@@ -74,13 +74,15 @@ static const int fb_irq_mask[] = { IRQ_MASK_PCI_PERR, /* 19 */ }; -static void fb_mask_irq (unsigned int irq) +static void fb_mask_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq; *CSR_IRQ_DISABLE = fb_irq_mask[_DC21285_INR (irq)]; } -static void fb_unmask_irq (unsigned int irq) +static void fb_unmask_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq; *CSR_IRQ_ENABLE = fb_irq_mask[_DC21285_INR (irq)]; }
arch/arm/mach-footbridge/isa-irq.c +12 -6
@@ -30,23 +30,26 @@#include "common.h" -static void isa_mask_pic_lo_irq (unsigned int irq) +static void isa_mask_pic_lo_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq;unsigned int mask =1 << (irq &7 );outb (inb (PIC_MASK_LO ) | mask,PIC_MASK_LO ); } -static void isa_ack_pic_lo_irq (unsigned int irq) +static void isa_ack_pic_lo_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq;unsigned int mask =1 << (irq &7 );outb (inb (PIC_MASK_LO ) | mask,PIC_MASK_LO );outb (0x20 ,PIC_LO ); } -static void isa_unmask_pic_lo_irq (unsigned int irq) +static void isa_unmask_pic_lo_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq;unsigned int mask =1 << (irq &7 );outb (inb (PIC_MASK_LO ) & ~mask,PIC_MASK_LO );
@@ -58,15 +61,17 @@ static struct irq_chip isa_lo_chip = { .unmask = isa_unmask_pic_lo_irq, }; -static void isa_mask_pic_hi_irq (unsigned int irq) +static void isa_mask_pic_hi_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq;unsigned int mask =1 << (irq &7 );outb (inb (PIC_MASK_HI ) | mask,PIC_MASK_HI ); } -static void isa_ack_pic_hi_irq (unsigned int irq) +static void isa_ack_pic_hi_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq;unsigned int mask =1 << (irq &7 );outb (inb (PIC_MASK_HI ) | mask,PIC_MASK_HI );
@@ -74,8 +79,9 @@ static void isa_ack_pic_hi_irq(unsignedoutb (0x20 ,PIC_HI ); } -static void isa_unmask_pic_hi_irq (unsigned int irq) +static void isa_unmask_pic_hi_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq;unsigned int mask =1 << (irq &7 );outb (inb (PIC_MASK_HI ) & ~mask,PIC_MASK_HI );
arch/arm/mach-gemini/gpio.c +8 -4
@@ -54,24 +54,27 @@ static void _set_gpio_irqenable(unsigned__raw_writel (reg, base +GPIO_INT_EN ); } -static void gpio_ack_irq (unsigned int irq) +static void gpio_ack_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq;unsigned int gpio =irq_to_gpio (irq);unsigned int base =GPIO_BASE (gpio /32 );__raw_writel (1 << (gpio %32 ), base +GPIO_INT_CLR ); } -static void gpio_mask_irq (unsigned int irq) +static void gpio_mask_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq;unsigned int gpio =irq_to_gpio (irq);unsigned int base =GPIO_BASE (gpio /32 );_set_gpio_irqenable (base, gpio %32 ,0 ); } -static void gpio_unmask_irq (unsigned int irq) +static void gpio_unmask_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq;unsigned int gpio =irq_to_gpio (irq);unsigned int base =GPIO_BASE (gpio /32 );
@@ -80,6 +83,7 @@ static void gpio_unmask_irq(unsigned intstatic int gpio_set_irq_type (unsigned int irq,unsigned int type) { +unsigned int irq = desc->irq;unsigned int gpio =irq_to_gpio (irq);unsigned int gpio_mask =1 << (gpio %32 );unsigned int base =GPIO_BASE (gpio /32 );
@@ -120,7 +124,7 @@ static int gpio_set_irq_type(unsigned in__raw_writel (reg_level, base +GPIO_INT_LEVEL );__raw_writel (reg_both, base +GPIO_INT_BOTH_EDGE ); -gpio_ack_irq (irq); +gpio_ack_irq (desc);return 0 ; }
arch/arm/mach-gemini/irq.c +6 -3
@@ -32,13 +32,15 @@#define FIQ_LEVEL (base_addr) (base_addr + 0x30)#define FIQ_STATUS (base_addr) (base_addr + 0x34) -static void gemini_ack_irq (unsigned int irq) +static void gemini_ack_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq;__raw_writel (1 << irq,IRQ_CLEAR (IO_ADDRESS (GEMINI_INTERRUPT_BASE ))); } -static void gemini_mask_irq (unsigned int irq) +static void gemini_mask_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq;unsigned int mask; mask =__raw_readl (IRQ_MASK (IO_ADDRESS (GEMINI_INTERRUPT_BASE )));
@@ -46,8 +48,9 @@ static void gemini_mask_irq(unsigned int__raw_writel (mask,IRQ_MASK (IO_ADDRESS (GEMINI_INTERRUPT_BASE ))); } -static void gemini_unmask_irq (unsigned int irq) +static void gemini_unmask_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq;unsigned int mask; mask =__raw_readl (IRQ_MASK (IO_ADDRESS (GEMINI_INTERRUPT_BASE )));
arch/arm/mach-h720x/common.c +10 -5
@@ -53,16 +53,18 @@ unsigned long h720x_gettimeoffset(void)/* * mask Global irq's */ -static void mask_global_irq (unsigned int irq ) +static void mask_global_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq;CPU_REG (IRQC_VIRT ,IRQC_IER ) &= ~(1 << irq); }/* * unmask Global irq's */ -static void unmask_global_irq (unsigned int irq ) +static void unmask_global_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq;CPU_REG (IRQC_VIRT ,IRQC_IER ) |= (1 << irq); }
@@ -71,8 +73,9 @@ static void unmask_global_irq (unsigned* ack GPIO irq's * Ack only for edge triggered int's valid */ -static void inline ack_gpio_irq (u32 irq) +static inline void ack_gpio_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq;u32 reg_base =GPIO_VIRT (IRQ_TO_REGNO (irq));u32 bit =IRQ_TO_BIT (irq);if ( (CPU_REG (reg_base,GPIO_EDGE ) & bit))
@@ -82,8 +85,9 @@ static void inline ack_gpio_irq(u32 irq)/* * mask GPIO irq's */ -static void inline mask_gpio_irq (u32 irq) +static inline void mask_gpio_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq;u32 reg_base =GPIO_VIRT (IRQ_TO_REGNO (irq));u32 bit =IRQ_TO_BIT (irq);CPU_REG (reg_base,GPIO_MASK ) &= ~bit;
@@ -92,8 +96,9 @@ static void inline mask_gpio_irq(u32 irq/* * unmask GPIO irq's */ -static void inline unmask_gpio_irq (u32 irq) +static inline void unmask_gpio_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq;u32 reg_base =GPIO_VIRT (IRQ_TO_REGNO (irq));u32 bit =IRQ_TO_BIT (irq);CPU_REG (reg_base,GPIO_MASK ) |= bit;
arch/arm/mach-h720x/cpu-h7202.c +4 -2
@@ -141,8 +141,9 @@ h7202_timer_interrupt(int irq, void *dev/* * mask multiplexed timer IRQs */ -static void inline mask_timerx_irq (u32 irq) +static inline void mask_timerx_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq;unsigned int bit; bit =2 << ((irq ==IRQ_TIMER64B ) ?4 : (irq -IRQ_TIMER1 ));CPU_REG (TIMER_VIRT ,TIMER_TOPCTRL ) &= ~bit;
@@ -151,8 +152,9 @@ static void inline mask_timerx_irq (u32/* * unmask multiplexed timer IRQs */ -static void inline unmask_timerx_irq (u32 irq) +static inline void unmask_timerx_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq;unsigned int bit; bit =2 << ((irq ==IRQ_TIMER64B ) ?4 : (irq -IRQ_TIMER1 ));CPU_REG (TIMER_VIRT ,TIMER_TOPCTRL ) |= bit;
arch/arm/mach-integrator/integrator_ap.c +4 -2
@@ -151,13 +151,15 @@ static void __init ap_map_io(void)#define INTEGRATOR_SC_VALID_INT 0x003fffff -static void sc_mask_irq (unsigned int irq) +static void sc_mask_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq;writel (1 << irq,VA_IC_BASE +IRQ_ENABLE_CLEAR ); } -static void sc_unmask_irq (unsigned int irq) +static void sc_unmask_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq;writel (1 << irq,VA_IC_BASE +IRQ_ENABLE_SET ); }
arch/arm/mach-integrator/integrator_cp.c +12 -6
@@ -145,14 +145,16 @@ static void __init intcp_map_io(void)#define sic_writel __raw_writel#define sic_readl __raw_readl -static void cic_mask_irq (unsigned int irq) +static void cic_mask_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq; irq -=IRQ_CIC_START ;cic_writel (1 << irq,INTCP_VA_CIC_BASE +IRQ_ENABLE_CLEAR ); } -static void cic_unmask_irq (unsigned int irq) +static void cic_unmask_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq; irq -=IRQ_CIC_START ;cic_writel (1 << irq,INTCP_VA_CIC_BASE +IRQ_ENABLE_SET ); }
@@ -164,14 +166,16 @@ static struct irq_chip cic_chip = { .unmask = cic_unmask_irq, }; -static void pic_mask_irq (unsigned int irq) +static void pic_mask_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq; irq -=IRQ_PIC_START ;pic_writel (1 << irq,INTCP_VA_PIC_BASE +IRQ_ENABLE_CLEAR ); } -static void pic_unmask_irq (unsigned int irq) +static void pic_unmask_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq; irq -=IRQ_PIC_START ;pic_writel (1 << irq,INTCP_VA_PIC_BASE +IRQ_ENABLE_SET ); }
@@ -183,14 +187,16 @@ static struct irq_chip pic_chip = { .unmask = pic_unmask_irq, }; -static void sic_mask_irq (unsigned int irq) +static void sic_mask_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq; irq -=IRQ_SIC_START ;sic_writel (1 << irq,INTCP_VA_SIC_BASE +IRQ_ENABLE_CLEAR ); } -static void sic_unmask_irq (unsigned int irq) +static void sic_unmask_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq; irq -=IRQ_SIC_START ;sic_writel (1 << irq,INTCP_VA_SIC_BASE +IRQ_ENABLE_SET ); }
arch/arm/mach-iop13xx/irq.c +16 -8
@@ -123,50 +123,58 @@ static void write_intsize(u32 val)/* 0 = Interrupt Masked and 1 = Interrupt not masked */ static void -iop13xx_irq_mask0 (unsigned int irq) +iop13xx_irq_mask0 (struct irq_desc *desc) { +unsigned int irq = desc->irq;write_intctl_0 (read_intctl_0 () & ~(1 << (irq -0 ))); }static void -iop13xx_irq_mask1 (unsigned int irq) +iop13xx_irq_mask1 (struct irq_desc *desc) { +unsigned int irq = desc->irq;write_intctl_1 (read_intctl_1 () & ~(1 << (irq -32 ))); }static void -iop13xx_irq_mask2 (unsigned int irq) +iop13xx_irq_mask2 (struct irq_desc *desc) { +unsigned int irq = desc->irq;write_intctl_2 (read_intctl_2 () & ~(1 << (irq -64 ))); }static void -iop13xx_irq_mask3 (unsigned int irq) +iop13xx_irq_mask3 (struct irq_desc *desc) { +unsigned int irq = desc->irq;write_intctl_3 (read_intctl_3 () & ~(1 << (irq -96 ))); }static void -iop13xx_irq_unmask0 (unsigned int irq) +iop13xx_irq_unmask0 (struct irq_desc *desc) { +unsigned int irq = desc->irq;write_intctl_0 (read_intctl_0 () | (1 << (irq -0 ))); }static void -iop13xx_irq_unmask1 (unsigned int irq) +iop13xx_irq_unmask1 (struct irq_desc *desc) { +unsigned int irq = desc->irq;write_intctl_1 (read_intctl_1 () | (1 << (irq -32 ))); }static void -iop13xx_irq_unmask2 (unsigned int irq) +iop13xx_irq_unmask2 (struct irq_desc *desc) { +unsigned int irq = desc->irq;write_intctl_2 (read_intctl_2 () | (1 << (irq -64 ))); }static void -iop13xx_irq_unmask3 (unsigned int irq) +iop13xx_irq_unmask3 (struct irq_desc *desc) { +unsigned int irq = desc->irq;write_intctl_3 (read_intctl_3 () | (1 << (irq -96 ))); }
arch/arm/mach-iop13xx/msi.c +1 -1
@@ -156,7 +156,7 @@ void arch_teardown_msi_irq(unsigned intdestroy_irq (irq); } -static void iop13xx_msi_nop (unsigned int irq) +static void iop13xx_msi_nop (struct irq_desc *desc) {return ; }
arch/arm/mach-iop32x/irq.c +4 -2
@@ -32,15 +32,17 @@ static void intstr_write(u32 val) }static void -iop32x_irq_mask (unsigned int irq) +iop32x_irq_mask (struct irq_desc *desc) { +unsigned int irq = desc->irq; iop32x_mask &= ~(1 << irq);intctl_write (iop32x_mask); }static void -iop32x_irq_unmask (unsigned int irq) +iop32x_irq_unmask (struct irq_desc *desc) { +unsigned int irq = desc->irq; iop32x_mask |=1 << irq;intctl_write (iop32x_mask); }
arch/arm/mach-ixp2000/core.c +20 -10
@@ -309,8 +309,9 @@ static void ixp2000_GPIO_irq_handler(uns } } -static int ixp2000_GPIO_irq_type (unsigned int irq,unsigned int type) +static int ixp2000_GPIO_irq_type (struct irq_desc *desc,unsigned int type) { +unsigned int irq = desc->irq;int line = irq -IRQ_IXP2000_GPIO0 ;/*
@@ -342,8 +343,9 @@ static int ixp2000_GPIO_irq_type(unsignereturn 0 ; } -static void ixp2000_GPIO_irq_mask_ack (unsigned int irq) +static void ixp2000_GPIO_irq_mask_ack (struct irq_desc *desc) { +unsigned int irq = desc->irq;ixp2000_reg_write (IXP2000_GPIO_INCR , (1 << (irq -IRQ_IXP2000_GPIO0 )));ixp2000_reg_write (IXP2000_GPIO_EDSR , (1 << (irq -IRQ_IXP2000_GPIO0 )));
@@ -351,13 +353,15 @@ static void ixp2000_GPIO_irq_mask_ack(unixp2000_reg_wrb (IXP2000_GPIO_INST , (1 << (irq -IRQ_IXP2000_GPIO0 ))); } -static void ixp2000_GPIO_irq_mask (unsigned int irq) +static void ixp2000_GPIO_irq_mask (struct irq_desc *desc) { +unsigned int irq = desc->irq;ixp2000_reg_wrb (IXP2000_GPIO_INCR , (1 << (irq -IRQ_IXP2000_GPIO0 ))); } -static void ixp2000_GPIO_irq_unmask (unsigned int irq) +static void ixp2000_GPIO_irq_unmask (struct irq_desc *desc) { +unsigned int irq = desc->irq;ixp2000_reg_write (IXP2000_GPIO_INSR , (1 << (irq -IRQ_IXP2000_GPIO0 ))); }
@@ -368,8 +372,9 @@ static struct irq_chip ixp2000_GPIO_irq_ .set_type = ixp2000_GPIO_irq_type, }; -static void ixp2000_pci_irq_mask (unsigned int irq) +static void ixp2000_pci_irq_mask (struct irq_desc *desc) { +unsigned int irq = desc->irq;unsigned long temp = *IXP2000_PCI_XSCALE_INT_ENABLE ;if (irq ==IRQ_IXP2000_PCIA )ixp2000_reg_wrb (IXP2000_PCI_XSCALE_INT_ENABLE , (temp & ~(1 <<26 )));
@@ -377,8 +382,9 @@ static void ixp2000_pci_irq_mask(unsigneixp2000_reg_wrb (IXP2000_PCI_XSCALE_INT_ENABLE , (temp & ~(1 <<27 ))); } -static void ixp2000_pci_irq_unmask (unsigned int irq) +static void ixp2000_pci_irq_unmask (struct irq_desc *desc) { +unsigned int irq = desc->irq;unsigned long temp = *IXP2000_PCI_XSCALE_INT_ENABLE ;if (irq ==IRQ_IXP2000_PCIA )ixp2000_reg_write (IXP2000_PCI_XSCALE_INT_ENABLE , (temp | (1 <<26 )));
@@ -401,14 +407,16 @@ static void ixp2000_err_irq_handler(unsi } } -static void ixp2000_err_irq_mask (unsigned int irq) +static void ixp2000_err_irq_mask (struct irq_desc *desc) { +unsigned int irq = desc->irq;ixp2000_reg_write (IXP2000_IRQ_ERR_ENABLE_CLR , (1 << (irq -IRQ_IXP2000_DRAM0_MIN_ERR ))); } -static void ixp2000_err_irq_unmask (unsigned int irq) +static void ixp2000_err_irq_unmask (struct irq_desc *desc) { +unsigned int irq = desc->irq;ixp2000_reg_write (IXP2000_IRQ_ERR_ENABLE_SET , (1 << (irq -IRQ_IXP2000_DRAM0_MIN_ERR ))); }
@@ -425,13 +433,15 @@ static struct irq_chip ixp2000_pci_irq_c .unmask = ixp2000_pci_irq_unmask }; -static void ixp2000_irq_mask (unsigned int irq) +static void ixp2000_irq_mask (struct irq_desc *desc) { +unsigned int irq = desc->irq;ixp2000_reg_wrb (IXP2000_IRQ_ENABLE_CLR , (1 << irq)); } -static void ixp2000_irq_unmask (unsigned int irq) +static void ixp2000_irq_unmask (struct irq_desc *desc) { +unsigned int irq = desc->irq;ixp2000_reg_write (IXP2000_IRQ_ENABLE_SET , (1 << irq)); }
arch/arm/mach-ixp2000/ixdp2x00.c +6 -4
@@ -64,8 +64,9 @@ static struct slowport_cfg slowport_cpld };#endif -static void ixdp2x00_irq_mask (unsigned int irq) +static void ixdp2x00_irq_mask (struct irq_desc *desc) { +unsigned int irq = desc->irq;unsigned long dummy;static struct slowport_cfg old_cfg;
@@ -88,8 +89,9 @@ static void ixdp2x00_irq_mask(unsigned i#endif } -static void ixdp2x00_irq_unmask (unsigned int irq) +static void ixdp2x00_irq_unmask (struct irq_desc *desc) { +unsigned int irq = desc->irq;unsigned long dummy;static struct slowport_cfg old_cfg;
@@ -112,7 +114,7 @@ static void ixdp2x00_irq_handler(unsignestatic struct slowport_cfg old_cfg;int i; - desc->chip->mask (irq); + desc->chip->mask (desc);#ifdef CONFIG_ARCH_IXDP2400 if (machine_is_ixdp2400 ())
@@ -134,7 +136,7 @@ static void ixdp2x00_irq_handler(unsigne } } - desc->chip->unmask (irq); + desc->chip->unmask (desc); }static struct irq_chip ixdp2x00_cpld_irq_chip = {
arch/arm/mach-ixp2000/ixdp2x01.c +6 -4
@@ -49,14 +49,16 @@/************************************************************************* * IXDP2x01 IRQ Handling *************************************************************************/ -static void ixdp2x01_irq_mask (unsigned int irq) +static void ixdp2x01_irq_mask (struct irq_desc *desc) { +unsigned int irq = desc->irq;ixp2000_reg_wrb (IXDP2X01_INT_MASK_SET_REG ,IXP2000_BOARD_IRQ_MASK (irq)); } -static void ixdp2x01_irq_unmask (unsigned int irq) +static void ixdp2x01_irq_unmask (struct irq_desc *desc) { +unsigned int irq = desc->irq;ixp2000_reg_write (IXDP2X01_INT_MASK_CLR_REG ,IXP2000_BOARD_IRQ_MASK (irq)); }
@@ -68,7 +70,7 @@ static void ixdp2x01_irq_handler(unsigneu32 ex_interrupt;int i; - desc->chip->mask (irq); + desc->chip->mask (desc); ex_interrupt = *IXDP2X01_INT_STAT_REG & valid_irq_mask;
@@ -84,7 +86,7 @@ static void ixdp2x01_irq_handler(unsigne } } - desc->chip->unmask (irq); + desc->chip->unmask (desc); }static struct irq_chip ixdp2x01_irq_chip = {
arch/arm/mach-ixp23xx/core.c +15 -10
@@ -111,8 +111,9 @@ enum ixp23xx_irq_type {static void ixp23xx_config_irq (unsigned int ,enum ixp23xx_irq_type ); -static int ixp23xx_irq_set_type (unsigned int irq,unsigned int type) +static int ixp23xx_irq_set_type (struct irq_desc *desc,unsigned int type) { +unsigned int irq = desc->irq;int line = irq -IRQ_IXP23XX_GPIO6 +6 ;u32 int_style;enum ixp23xx_irq_type irq_type;
@@ -173,8 +174,9 @@ static int ixp23xx_irq_set_type(unsignedreturn 0 ; } -static void ixp23xx_irq_mask (unsigned int irq) +static void ixp23xx_irq_mask (struct irq_desc *desc) { +unsigned int irq = desc->irq;volatile unsigned long *intr_reg;if (irq >=56 )
@@ -184,8 +186,9 @@ static void ixp23xx_irq_mask(unsigned in *intr_reg &= ~(1 << (irq %32 )); } -static void ixp23xx_irq_ack (unsigned int irq) +static void ixp23xx_irq_ack (struct irq_desc *desc) { +unsigned int irq = desc->irq;int line = irq -IRQ_IXP23XX_GPIO6 +6 ;if ((line <6 ) || (line >15 ))
@@ -198,11 +201,12 @@ static void ixp23xx_irq_ack(unsigned int* Level triggered interrupts on GPIO lines can only be cleared when the * interrupt condition disappears. */ -static void ixp23xx_irq_level_unmask (unsigned int irq) +static void ixp23xx_irq_level_unmask (struct irq_desc *desc) { +unsigned int irq = desc->irq;volatile unsigned long *intr_reg; -ixp23xx_irq_ack (irq); +ixp23xx_irq_ack (desc);if (irq >=56 ) irq +=8 ;
@@ -211,8 +215,9 @@ static void ixp23xx_irq_level_unmask(uns *intr_reg |= (1 << (irq %32 )); } -static void ixp23xx_irq_edge_unmask (unsigned int irq) +static void ixp23xx_irq_edge_unmask (struct irq_desc *desc) { +unsigned int irq = desc->irq;volatile unsigned long *intr_reg;if (irq >=56 )
@@ -236,12 +241,12 @@ static struct irq_chip ixp23xx_irq_edge_ .set_type = ixp23xx_irq_set_type }; -static void ixp23xx_pci_irq_mask (unsigned int irq) +static void ixp23xx_pci_irq_mask (struct irq_desc *desc) { *IXP23XX_PCI_XSCALE_INT_ENABLE &= ~(1 << (IRQ_IXP23XX_INTA +27 - irq)); } -static void ixp23xx_pci_irq_unmask (unsigned int irq) +static void ixp23xx_pci_irq_unmask (struct irq_desc *desc) { *IXP23XX_PCI_XSCALE_INT_ENABLE |= (1 << (IRQ_IXP23XX_INTA +27 - irq)); }
@@ -256,7 +261,7 @@ static void pci_handler(unsigned int irq pci_interrupt = *IXP23XX_PCI_XSCALE_INT_STATUS ; - desc->chip->ack (irq); + desc->chip->ack (desc);/* See which PCI_INTA, or PCI_INTB interrupted */ if (pci_interrupt & (1 <<26 )) {
@@ -269,7 +274,7 @@ static void pci_handler(unsigned int irqgeneric_handle_irq (irqno); - desc->chip->unmask (irq); + desc->chip->unmask (desc); }static struct irq_chip ixp23xx_pci_irq_chip = {
arch/arm/mach-ixp23xx/ixdp2351.c +12 -8
@@ -48,13 +48,15 @@/* * IXDP2351 Interrupt Handling */ -static void ixdp2351_inta_mask (unsigned int irq) +static void ixdp2351_inta_mask (struct irq_desc *desc) { +unsigned int irq = desc->irq; *IXDP2351_CPLD_INTA_MASK_SET_REG =IXDP2351_INTA_IRQ_MASK (irq); } -static void ixdp2351_inta_unmask (unsigned int irq) +static void ixdp2351_inta_unmask (struct irq_desc *desc) { +unsigned int irq = desc->irq; *IXDP2351_CPLD_INTA_MASK_CLR_REG =IXDP2351_INTA_IRQ_MASK (irq); }
@@ -64,7 +66,7 @@ static void ixdp2351_inta_handler(unsign *IXDP2351_CPLD_INTA_STAT_REG &IXDP2351_INTA_IRQ_VALID ;int i; - desc->chip->mask (irq); + desc->chip->mask (desc);for (i =0 ; i <IXDP2351_INTA_IRQ_NUM ; i++) {if (ex_interrupt & (1 << i)) {
@@ -74,7 +76,7 @@ static void ixdp2351_inta_handler(unsign } } - desc->chip->unmask (irq); + desc->chip->unmask (desc); }static struct irq_chip ixdp2351_inta_chip = {
@@ -83,13 +85,15 @@ static struct irq_chip ixdp2351_inta_chi .unmask = ixdp2351_inta_unmask }; -static void ixdp2351_intb_mask (unsigned int irq) +static void ixdp2351_intb_mask (struct irq_desc *desc) { +unsigned int irq = desc->irq; *IXDP2351_CPLD_INTB_MASK_SET_REG =IXDP2351_INTB_IRQ_MASK (irq); } -static void ixdp2351_intb_unmask (unsigned int irq) +static void ixdp2351_intb_unmask (struct irq_desc *desc) { +unsigned int irq = desc->irq; *IXDP2351_CPLD_INTB_MASK_CLR_REG =IXDP2351_INTB_IRQ_MASK (irq); }
@@ -99,7 +103,7 @@ static void ixdp2351_intb_handler(unsign *IXDP2351_CPLD_INTB_STAT_REG &IXDP2351_INTB_IRQ_VALID ;int i; - desc->chip->ack (irq); + desc->chip->ack (desc);for (i =0 ; i <IXDP2351_INTB_IRQ_NUM ; i++) {if (ex_interrupt & (1 << i)) {
@@ -109,7 +113,7 @@ static void ixdp2351_intb_handler(unsign } } - desc->chip->unmask (irq); + desc->chip->unmask (desc); }static struct irq_chip ixdp2351_intb_chip = {
arch/arm/mach-ixp4xx/common.c +9 -5
@@ -128,8 +128,9 @@ int irq_to_gpio(unsigned int irq) }EXPORT_SYMBOL (irq_to_gpio); -static int ixp4xx_set_irq_type (unsigned int irq,unsigned int type) +static int ixp4xx_set_irq_type (struct irq_desc *desc,unsigned int type) { +unsigned int irq = desc->irq;int line = irq2gpio[irq];u32 int_style;enum ixp4xx_irq_type irq_type;
@@ -193,16 +194,18 @@ static int ixp4xx_set_irq_type(unsignedreturn 0 ; } -static void ixp4xx_irq_mask (unsigned int irq) +static void ixp4xx_irq_mask (struct irq_desc *desc) { +unsigned int irq = desc->irq;if ((cpu_is_ixp46x () ||cpu_is_ixp43x ()) && irq >=32 ) *IXP4XX_ICMR2 &= ~(1 << (irq -32 ));else *IXP4XX_ICMR &= ~(1 << irq); } -static void ixp4xx_irq_ack (unsigned int irq) +static void ixp4xx_irq_ack (struct irq_desc *desc) { +unsigned int irq = desc->irq;int line = (irq <32 ) ? irq2gpio[irq] :-1 ;if (line >=0 )
@@ -213,10 +216,11 @@ static void ixp4xx_irq_ack(unsigned int* Level triggered interrupts on GPIO lines can only be cleared when the * interrupt condition disappears. */ -static void ixp4xx_irq_unmask (unsigned int irq) +static void ixp4xx_irq_unmask (struct irq_desc *desc) { +unsigned int irq = desc->irq;if (!(ixp4xx_irq_edge & (1 << irq))) -ixp4xx_irq_ack (irq); +ixp4xx_irq_ack (desc);if ((cpu_is_ixp46x () ||cpu_is_ixp43x ()) && irq >=32 ) *IXP4XX_ICMR2 |= (1 << (irq -32 ));
arch/arm/mach-ks8695/irq.c +16 -12
@@ -34,29 +34,32 @@#include <mach/regs-irq.h> #include <mach/regs-gpio.h> -static void ks8695_irq_mask (unsigned int irqno) +static void ks8695_irq_mask (struct irq_desc *desc) { +unsigned int irq = desc->irq;unsigned long inten; inten =__raw_readl (KS8695_IRQ_VA +KS8695_INTEN ); - inten &= ~(1 << irqno); + inten &= ~(1 << irq);__raw_writel (inten,KS8695_IRQ_VA +KS8695_INTEN ); } -static void ks8695_irq_unmask (unsigned int irqno) +static void ks8695_irq_unmask (struct irq_desc *desc) { +unsigned int irq = desc->irq;unsigned long inten; inten =__raw_readl (KS8695_IRQ_VA +KS8695_INTEN ); - inten |= (1 << irqno); + inten |= (1 << irq);__raw_writel (inten,KS8695_IRQ_VA +KS8695_INTEN ); } -static void ks8695_irq_ack (unsigned int irqno) +static void ks8695_irq_ack (struct irq_desc *desc) { -__raw_writel ((1 << irqno),KS8695_IRQ_VA +KS8695_INTST ); +unsigned int irq = desc->irq; +__raw_writel ((1 << irq),KS8695_IRQ_VA +KS8695_INTST ); }
@@ -64,8 +67,9 @@ static struct irq_chip ks8695_irq_level_static struct irq_chip ks8695_irq_edge_chip; -static int ks8695_irq_set_type (unsigned int irqno,unsigned int type) +static int ks8695_irq_set_type (struct irq_desc *desc,unsigned int type) { +unsigned int irq = desc->irq;unsigned long ctrl, mode;unsigned short level_triggered =0 ;
@@ -93,7 +97,7 @@ static int ks8695_irq_set_type(unsignedreturn -EINVAL ; } -switch (irqno) { +switch (irq) {case KS8695_IRQ_EXTERN0 : ctrl &= ~IOPC_IOEINT0TM ; ctrl |=IOPC_IOEINT0_MODE (mode);
@@ -115,12 +119,12 @@ static int ks8695_irq_set_type(unsigned }if (level_triggered) { -set_irq_chip (irqno, &ks8695_irq_level_chip); -set_irq_handler (irqno, handle_level_irq); +set_irq_chip (irq, &ks8695_irq_level_chip); +set_irq_handler (irq, handle_level_irq); }else { -set_irq_chip (irqno, &ks8695_irq_edge_chip); -set_irq_handler (irqno, handle_edge_irq); +set_irq_chip (irq, &ks8695_irq_edge_chip); +set_irq_handler (irq, handle_edge_irq); }__raw_writel (ctrl,KS8695_GPIO_VA +KS8695_IOPC );
arch/arm/mach-l7200/core.c +4 -2
@@ -45,13 +45,15 @@#define FIQ_SOFT (*(volatile unsigned long *) (IRQ_BASE + 0x110))#define FIQ_SOURCESEL (*(volatile unsigned long *) (IRQ_BASE + 0x118)) -static void l7200_mask_irq (unsigned int irq) +static void l7200_mask_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq;IRQ_ENABLECLEAR =1 << irq; } -static void l7200_unmask_irq (unsigned int irq) +static void l7200_unmask_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq;IRQ_ENABLE =1 << irq; }
arch/arm/mach-lh7a40x/arch-kev7a400.c +6 -3
@@ -46,19 +46,22 @@ void __init kev7a400_map_io(void)static u16 CPLD_IRQ_mask;/* Mask for CPLD IRQs, 1 == unmasked */ -static void kev7a400_ack_cpld_irq (u32 irq) +static void kev7a400_ack_cpld_irq (u32 irq,struct irq_desc *desc) { +unsigned int irq = desc->irq;CPLD_CL_INT =1 << (irq -IRQ_KEV7A400_CPLD ); } -static void kev7a400_mask_cpld_irq (u32 irq) +static void kev7a400_mask_cpld_irq (u32 irq,struct irq_desc *desc) { +unsigned int irq = desc->irq; CPLD_IRQ_mask &= ~(1 << (irq -IRQ_KEV7A400_CPLD ));CPLD_WR_PB_INT_MASK = CPLD_IRQ_mask; } -static void kev7a400_unmask_cpld_irq (u32 irq) +static void kev7a400_unmask_cpld_irq (u32 irq,struct irq_desc *desc) { +unsigned int irq = desc->irq; CPLD_IRQ_mask |=1 << (irq -IRQ_KEV7A400_CPLD );CPLD_WR_PB_INT_MASK = CPLD_IRQ_mask; }
arch/arm/mach-lh7a40x/arch-lpd7a40x.c +8 -5
@@ -159,8 +159,9 @@ static void __init lpd7a40x_init (void)#endif } -static void lh7a40x_ack_cpld_irq (u32 irq) +static void lh7a40x_ack_cpld_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq;/* CPLD doesn't have ack capability, but some devices may */ #if defined (CPLD_INTMASK_TOUCH )
@@ -172,8 +173,9 @@ static void lh7a40x_ack_cpld_irq (u32 ir#endif } -static void lh7a40x_mask_cpld_irq (u32 irq) +static void lh7a40x_mask_cpld_irq (struct irq_desc *desc) { +unsigned int irq = desc->irq;switch (irq) {case IRQ_LPD7A40X_ETH_INT :CPLD_INTERRUPTS |=CPLD_INTMASK_ETHERNET ;
@@ -186,8 +188,9 @@ static void lh7a40x_mask_cpld_irq (u32 i } }
Lines of this file are not shown. View the raw message.
arch/arm/mach-ns9xxx/board-a9m9750dev.c +9 -6
Lines of this file are not shown. View the raw message.
arch/arm/mach-s3c2443/irq.c +43 -28
71 lines not on this page · raw message
arch/arm/plat-s3c24xx/irq.c +66 -46
112 lines not on this page · raw message
arch/arm/plat-s5pc1xx/irq-eint.c +25 -17
42 lines not on this page · raw message
arch/blackfin/mach-common/ints-priority.c +33 -20
53 lines not on this page · raw message
arch/ia64/kernel/iosapic.c +26 -19
45 lines not on this page · raw message
arch/m32r/platforms/m32700ut/setup.c +52 -40
92 lines not on this page · raw message
arch/m32r/platforms/opsput/setup.c +50 -38
88 lines not on this page · raw message
arch/m32r/platforms/usrv/setup.c +24 -18
42 lines not on this page · raw message
arch/m68knommu/platform/coldfire/intc-2.c +4 -2
Lines of this file are not shown. View the raw message.
arch/m68knommu/platform/coldfire/intc-simr.c +5 -2
Lines of this file are not shown. View the raw message.
arch/m68knommu/platform/coldfire/intc.c +5 -3
Lines of this file are not shown. View the raw message.
arch/mips/alchemy/common/irq.c +26 -17
43 lines not on this page · raw message
arch/mips/alchemy/devboards/pb1200/irqmap.c +13 -10
Lines of this file are not shown. View the raw message.
arch/mips/bcm63xx/irq.c +27 -15
42 lines not on this page · raw message
arch/mips/cavium-octeon/octeon-irq.c +44 -26
70 lines not on this page · raw message
arch/mips/nxp/pnx833x/common/interrupts.c +21 -12
Lines of this file are not shown. View the raw message.
arch/mips/pmc-sierra/msp71xx/msp_irq_cic.c +6 -4
Lines of this file are not shown. View the raw message.
arch/mips/pmc-sierra/msp71xx/msp_irq_slp.c +6 -3
Lines of this file are not shown. View the raw message.
arch/mips/sgi-ip32/ip32-irq.c +39 -29
68 lines not on this page · raw message
arch/powerpc/platforms/512x/mpc5121_ads_cpld.c +4 -2
Lines of this file are not shown. View the raw message.
arch/powerpc/platforms/52xx/media5200.c +9 -7
Lines of this file are not shown. View the raw message.
arch/powerpc/platforms/52xx/mpc52xx_pic.c +23 -12
Lines of this file are not shown. View the raw message.
arch/powerpc/platforms/82xx/pq2ads-pci-pic.c +4 -2
Lines of this file are not shown. View the raw message.
arch/powerpc/platforms/85xx/mpc85xx_ads.c +1 -1
Lines of this file are not shown. View the raw message.
arch/powerpc/platforms/85xx/mpc85xx_ds.c +1 -1
Lines of this file are not shown. View the raw message.
arch/powerpc/platforms/85xx/socrates_fpga_pic.c +13 -7
Lines of this file are not shown. View the raw message.
arch/powerpc/platforms/8xx/m8xx_setup.c +2 -2
Lines of this file are not shown. View the raw message.
arch/powerpc/platforms/cell/beat_interrupt.c +8 -4
Lines of this file are not shown. View the raw message.
arch/powerpc/platforms/cell/interrupt.c +6 -6
Lines of this file are not shown. View the raw message.
arch/powerpc/platforms/cell/spider-pic.c +9 -6
Lines of this file are not shown. View the raw message.
arch/powerpc/platforms/embedded6xx/flipper-pic.c +8 -4
Lines of this file are not shown. View the raw message.
arch/powerpc/platforms/embedded6xx/hlwd-pic.c +15 -11
Lines of this file are not shown. View the raw message.
arch/powerpc/platforms/pseries/xics.c +17 -11
Lines of this file are not shown. View the raw message.
arch/sparc/kernel/irq_64.c +36 -26
62 lines not on this page · raw message
arch/x86/kernel/apic/io_apic.c +53 -72
125 lines not on this page · raw message
include/linux/irq.h +24 -23
47 lines not on this page · raw message
kernel/irq/chip.c +27 -33
60 lines not on this page · raw message
kernel/irq/manage.c +32 -33
65 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.
Re: [PATCH -v2 2/2] genericirq: change ack/mask in irq_chip to take irq_desc instead of irq
Quoted 8 lines · Yinghai Lu
will have
void (*ack)(struct irq_desc *desc); void (*mask)(struct irq_desc *desc); void (*mask_ack)(struct irq_desc *desc); void (*unmask)(struct irq_desc *desc); void (*eoi)(struct irq_desc *desc);so for sparseirq with raidix tree, we don't call extra
irq_to_desc, and could use desc directly
Overall this looks pretty decent. This look pretty complete. How many platforms did you manage to compile test this on?
I have found a couple of issues (see below).
A few times you change a bit more than is necessary which is a bit spooky in a patch this far ranging.
Reading through this patch to review it took an uncomfortably long time.
Quoted 8 lines
-v2: change all member of
irq_chipto use desc only.Signed-off-by Yinghai Lu <[email protected]>Index:
linux-2.6/arch/alpha/kernel/sys_rx164.c
===================================================================
arch/alpha/kernel/sys_rx164.c rx164_update_irq_hw(unsigned long mask) · line 73
Quoted 9 lines
arch/alpha/kernel/sys_rx164.c +3
-3static void -rx164_end_irq (unsigned int irq) +rx164_end_irq (struct irq_desc *desc) { -if (!(irq_desc[irq].status & (IRQ_DISABLED |IRQ_INPROGRESS ))) -rx164_enable_irq (irq); +if (!(desc_.status & (IRQ_DISABLED |IRQ_INPROGRESS ))) +rx164_enable_irq (desc); }
You have mispelled desc-> here.
Quoted 7 lines
Index:
linux-2.6/arch/arm/mach-s3c2410/bast-irq.c
===================================================================arch/arm/mach-s3c2410/bast-irq.c +0
-0@@ -75,31 +75,31 @@ static unsigned char bast_pc104_irqmasks static void
arch/arm/mach-s3c2410/bast-irq.c static unsigned char bast_pc104_irqmasks · line 81
Quoted 10 lines
arch/arm/mach-s3c2410/bast-irq.c +3
-5-bast_pc104_maskack(unsigned int irqno) +bast_pc104_maskack(struct irq_desc *desc) { -struct irq_desc *desc = irq_desc +IRQ_ISA ; - -bast_pc104_mask (irqno); - desc->chip->ack (IRQ_ISA ); +bast_pc104_mask (desc); + desc->chip->ack (desc); }
This is not a trivial 1 to 1 conversion. IRQ_ISA != irqno. I don't know if the original code is broken here or just very peculiar.
Quoted 6 lines
arch/arm/mach-s3c2410/bast-irq.c +0
-0static struct irq_chip s3c_irq_cam = {Index:
linux-2.6/arch/arm/plat-s3c64xx/irq-eint.c
===================================================================arch/arm/plat-s3c64xx/irq-eint.c +0
-0
arch/arm/plat-s3c64xx/irq-eint.c static void s3c_irq_eint_unmask(unsigned · line 67
Quoted 10 lines
arch/arm/plat-s3c64xx/irq-eint.c +4
-3-static void s3c_irq_eint_maskack (unsigned int irq) +static void s3c_irq_eint_maskack (struct irq_desc *desc) { +unsigned int irq = desc->irq;/* compiler should in-line these */ -s3c_irq_eint_mask (irq); -s3c_irq_eint_ack (irq); +s3c_irq_eint_mask (irq, desc); +s3c_irq_eint_ack (irq, desc); }
It appears this function has the wrong conversion.
arch/blackfin/mach-common/ints-priority.c static void bfin_demux_gpio_irq(unsigned · line 941
Quoted 10 lines
Index:
linux-2.6/arch/blackfin/mach-common/ints-priority.c
===================================================================arch/blackfin/mach-common/ints-priority.c +1
-1@@ -925,7 +938,7 @@ static void bfin_demux_gpio_irq(unsignedstatic struct irq_chip bfin_gpio_irqchip = { .name ="GPIO" , .ack = bfin_gpio_ack_irq, - .mask = bfin_gpio_mask_irq, + .mask = bfin_gpio_mask_irq_desc,
You have not introduced bfin_gpio_mask_irq_desc ...
Quoted 9 lines
arch/blackfin/mach-common/ints-priority.c +0
-0.mask_ack = bfin_gpio_mask_ack_irq, .unmask = bfin_gpio_unmask_irq, .disable = bfin_gpio_mask_irq,Index:
linux-2.6/arch/ia64/kernel/iosapic.c
===================================================================
arch/ia64/kernel/iosapic.c static void · line 274
Quoted 8 lines
arch/ia64/kernel/iosapic.c +4
-0@@ -267,6 +267,10 @@ static void nop (unsigned int irq) {/* do nothing... */ +static void +nop_desc (struct irq_desc *desc) +{ +/* do nothing... */ }
Two things here.
- nop has no closing brace.
- You should just be able to convert nop here, and not need to introduce nop_desc.
arch/ia64/kernel/iosapic.c iosapic_set_affinity(unsigned int irq, c · line 427
Quoted 5 lines
arch/ia64/kernel/iosapic.c +0
-0#define iosapic_shutdown_level_irq mask_irq#define iosapic_enable_level_irq unmask_irq#define
iosapic_disable_level_irqmask_irqarch/ia64/kernel/iosapic.c +1
-1-#define iosapic_ack_level_irq nop +#define iosapic_ack_level_irq nop_desc
Making this change unnecessary.
arch/ia64/kernel/iosapic.c iosapic_ack_edge_irq (unsigned int irq) · line 477
Quoted 4 lines
#define
iosapic_enable_edge_irqunmask_irq
#defineiosapic_disable_edge_irqnoparch/ia64/kernel/iosapic.c +1
-1-#define iosapic_end_edge_irq nop +#define iosapic_end_edge_irq nop_desc
and this change unnecessary.
arch/m68knommu/platform/coldfire/intc-simr.c static void intc_irq_unmask(unsigned int · line 45
Quoted 13 lines
static struct
irq_chipirq_type_iosapic_edge= {
.name = "IO-SAPIC-edge",Index:
linux-2.6/arch/m68knommu/platform/coldfire/intc-simr.c
===================================================================arch/m68knommu/platform/coldfire/intc-simr.c +1
-0@@ -40,6 +42,7 @@ static void intc_irq_unmask(unsigned intstatic int intc_irq_set_type (unsigned int irq,unsigned int type) { +unsigned int irq = desc->irq;
This function does not take a desc argument.
Quoted 9 lines
arch/m68knommu/platform/coldfire/intc-simr.c +0
-0if (irq >=MCFINT_VECBASE ) {if (irq <MCFINT_VECBASE +64 )__raw_writeb (5 ,MCFINTC0_ICR0 + irq -MCFINT_VECBASE );Index:
linux-2.6/arch/mips/alchemy/common/irq.c
===================================================================
arch/mips/alchemy/common/irq.c void restore_au1xxx_intctl(void) · line 294
Quoted 9 lines
arch/mips/alchemy/common/irq.c +3
-2@@ -288,17 +288,19 @@ void restore_au1xxx_intctl(void)#endif /* CONFIG_PM */ -static void au1x_ic0_unmask (unsigned int irq_nr) +static void au1x_ic0_unmask (struct irq_desc *desc) { -unsigned int bit = irq_nr -AU1000_INTC0_INT_BASE ; +unsigned int irq = desc->irq; +unsigned int bit = irq_ -AU1000_INTC0_INT_BASE ;
You misspelled irq there.
Quoted 22 lines
arch/mips/alchemy/common/irq.c +0
-0au_writel (1 << bit,IC0_MASKSET );au_writel (1 << bit,IC0_WAKESET );au_sync (); }Index:
linux-2.6/arch/mips/bcm63xx/irq.c
===================================================================arch/mips/bcm63xx/irq.c +2
-1@@ -75,8 +75,9 @@ asmlinkage void plat_irq_dispatch(void)* internal IRQs operations: only mask/unmask on PERF irq mask * register. */ -static inline void bcm63xx_internal_irq_mask (unsigned int irq) +static inline void bcm63xx_internal_irq_mask (struct irq_desc *desc) { +unsigned int irq = desc->irq;u32 mask; irq -=IRQ_INTERNAL_BASE ;
arch/mips/bcm63xx/irq.c static inline void bcm63xx_internal_irq_ · line 92
Quoted 8 lines
arch/mips/bcm63xx/irq.c +5
-0@@ -84,9 +85,15 @@ static inline void bcm63xx_internal_irq_ mask &= ~(1 << irq);bcm_perf_writel (mask,PERF_IRQMASK_REG ); } +static void +bcm63xx_internal_irq_mask_desc (struct irq_desc *desc) +{ +bcm63xx_internal_irq_mask (desc); +}
You have converted bcm63xx_internal_irq_mask making bcm63xx_internal_irq_mask_desc unnecessary.
arch/mips/bcm63xx/irq.c static struct irq_chip bcm63xx_internal_ · line 231
Quoted 10 lines
arch/mips/bcm63xx/irq.c +2
-2@@ -213,8 +225,8 @@ static struct irq_chip bcm63xx_internal_ .startup = bcm63xx_internal_irq_startup, .shutdown = bcm63xx_internal_irq_mask, - .mask = bcm63xx_internal_irq_mask, - .mask_ack = bcm63xx_internal_irq_mask, + .mask = bcm63xx_internal_irq_mask_desc, + .mask_ack = bcm63xx_internal_irq_mask_desc, .unmask = bcm63xx_internal_irq_unmask, };
These changes are also unnecessary.
Quoted 4 lines
Index:
linux-2.6/arch/mips/sni/pcimt.c
===================================================================
arch/mips/sni/pcimt.c static struct pci_controller sni_control · line 216
Quoted 10 lines
arch/mips/sni/pcimt.c +4
-4-static void end_pcimt_irq (unsigned int irq) -{ -if (!(irq_desc[irq].status & (IRQ_DISABLED |IRQ_INPROGRESS ))) -enable_pcimt_irq (irq); +static void end_pcimt_irq(struct irq_desc *desc) + + if (!(desc->status & (IRQ_DISABLED|IRQ_INPROGRESS))) + enable_pcimt_irq(desc); }
You have deleted the starting brace of the function....
Quoted 10 lines
Index:
linux-2.6/arch/powerpc/platforms/cell/axon_msi.c
===================================================================arch/powerpc/platforms/cell/axon_msi.c +2
-0@@ -308,10 +308,15 @@ static void axon_msi_teardown_msi_irqs(s } } +static void axon_unmask_msi_irq (struct irq_desc *desc) +{
arch/powerpc/platforms/cell/axon_msi.c static void axon_msi_teardown_msi_irqs(s · line 321
Quoted 10 lines
arch/powerpc/platforms/cell/axon_msi.c +4
-1+unmask_msi_irq (desc); +} +static struct irq_chip msic_irq_chip = { .mask = mask_msi_irq, .unmask = unmask_msi_irq, - .shutdown = unmask_msi_irq, + .shutdown = axon_unmask_msi_irq, .name ="AXON-MSI" , };
This pair of changes is unnecessary.
Quoted 27 lines
Index:
linux-2.6/arch/powerpc/sysdev/mpic_u3msi.c
===================================================================arch/powerpc/sysdev/mpic_u3msi.c +9
-6@@ -23,20 +23,25 @@/* A bit ugly, can we get this from the pci_dev somehow? */ static struct mpic *msi_mpic; -static void mpic_u3msi_mask_irq (unsigned int irq) +static void mpic_u3msi_mask_irq (struct irq_desc *desc) { -mask_msi_irq (irq); -mpic_mask_irq (irq); +mask_msi_irq (desc); +mpic_mask_irq (desc); } -static void mpic_u3msi_unmask_irq (unsigned int irq) +static void mpic_u3msi_shutdown_irq (struct irq_desc *desc) { -mpic_unmask_irq (irq); -unmask_msi_irq (irq); +mpic_u3msi_mask_irq (desc); +} + +static void mpic_u3msi_unmask_irq (struct irq_desc *desc) +{
arch/powerpc/sysdev/mpic_u3msi.c line 47
Quoted 10 lines
arch/powerpc/sysdev/mpic_u3msi.c +3
-1+mpic_unmask_irq (desc); +unmask_msi_irq (desc); }static struct irq_chip mpic_u3msi_chip = { - .shutdown = mpic_u3msi_mask_irq, + .shutdown = mpic_u3msi_shutdown_irq, .mask = mpic_u3msi_mask_irq, .unmask = mpic_u3msi_unmask_irq, .eoi = mpic_end_irq,
This change to add a new mpic_u3msi_shutdow_irq appears harmless, but it is confusing and unnecessary.
Quoted 17 lines
Index:
linux-2.6/arch/sparc/kernel/pci_msi.c
===================================================================arch/sparc/kernel/pci_msi.c +9
-0@@ -111,12 +111,21 @@ static void free_msi(struct pci_pbm_infoclear_bit (msi_num, pbm->msi_bitmap); } +static void sparc64_enable_msi_irq (struct irq_desc *desc) +{ +unmask_msi_irq (desc); +} +static void sparc64_diable_msi_irq (struct irq_desc *desc) +{ +mask_msi_irq (desc); +} +
arch/sparc/kernel/pci_msi.c static void free_msi(struct pci_pbm_info · line 130
Quoted 10 lines
arch/sparc/kernel/pci_msi.c +2
-2static struct irq_chip msi_irq = { .name ="PCI-MSI" , .mask = mask_msi_irq, .unmask = unmask_msi_irq, - .enable = unmask_msi_irq, - .disable = mask_msi_irq, + .enable = sparc64_enable_msi_irq, + .disable = sparc64_disable_msi_irq,/* XXX affinity XXX */ };
Ouch! this hunk is unnecessary.
Quoted 15 lines
Index:
linux-2.6/drivers/xen/events.c
===================================================================drivers/xen/events.c +2
-2@@ -748,35 +748,46 @@ int resend_irq_on_evtchn(unsigned int irreturn 1 ; } -static void enable_dynirq (unsigned int irq) +static void enable_dynirq (struct irq_desc *desc) { -int evtchn =evtchn_from_irq (irq); +int evtchn =evtchn_from_irq (desc->irq);if (VALID_EVTCHN (evtchn))
drivers/xen/events.c int resend_irq_on_evtchn(unsigned int ir · line 763
Quoted 10 lines
drivers/xen/events.c +4
-2unmask_evtchn (evtchn); } -static void disable_dynirq (unsigned int irq) +static void unmask_dynirq (struct irq_desc *desc) { -int evtchn =evtchn_from_irq (irq); +enable_dynirq (desc); +} +
Introducing disable_dynirq, and mask_dynirq for xen is unnecessary.
Quoted 65 lines
drivers/xen/events.c +16
-7+static void disable_dynirq (struct irq_desc *desc) +{ +int evtchn =evtchn_from_irq (desc->irq);if (VALID_EVTCHN (evtchn))mask_evtchn (evtchn); } -static void ack_dynirq (unsigned int irq) +static void mask_dynirq (struct irq_desc *desc) { -int evtchn =evtchn_from_irq (irq); +disable_dynirq (desc); +} + +static void ack_dynirq (struct irq_desc *desc) +{ +int evtchn =evtchn_from_irq (desc->irq); -move_native_irq (irq); +move_native_irq (desc);if (VALID_EVTCHN (evtchn))clear_evtchn (evtchn); } -static int retrigger_dynirq (unsigned int irq) +static int retrigger_dynirq (struct irq_desc *desc) { -int evtchn =evtchn_from_irq (irq); +int evtchn =evtchn_from_irq (desc->irq);struct shared_info *sh = HYPERVISOR_shared_info;int ret =0 ;@@ -924,10 +935,11 @@ static struct irq_chip xen_dynamic_chip .name = "xen-dyn", .disable = disable_dynirq, - .mask = disable_dynirq, - .unmask = enable_dynirq, + .mask = mask_dynirq, + .unmask = unmask_dynirq, .ack = ack_dynirq, + .set_affinity = set_affinity_irq, .retrigger = retrigger_dynirq, };Index:
linux-2.6/include/linux/htirq.h
===================================================================include/linux/htirq.h +3
-4@@ -7,16 +7,17 @@ struct ht_irq_msg { };/* Helper functions.. */ -void fetch_ht_irq_msg (unsigned int irq,struct ht_irq_msg *msg); -void write_ht_irq_msg (unsigned int irq,struct ht_irq_msg *msg); -void mask_ht_irq (unsigned int irq); -void unmask_ht_irq (unsigned int irq); +struct irq_desc ; +void fetch_ht_irq_msg (struct irq_desc *desc,struct ht_irq_msg *msg); +void write_ht_irq_msg (struct irq_desc *desc,struct ht_irq_msg *msg);
include/linux/htirq.h struct ht_irq_msg { · line 21
Quoted 10 lines
include/linux/htirq.h +3
-1+void mask_ht_irq (struct irq_desc *); +void unmask_ht_irq (struct irq_desc *);/* The arch hook for getting things started */ int arch_setup_ht_irq (unsigned int irq,struct pci_dev *dev);/* For drivers of buggy hardware */ -typedef void (ht_irq_update_t )(struct pci_dev *dev,int irq, +typedef void (ht_irq_update_t )(struct pci_dev *dev,struct irq_desc *desc,struct ht_irq_msg *msg);
The corresponding update to drivers/infiniband/hw/ipath/ipath_iba6110.c is missing from your patch.
kernel/irq/chip.c int set_irq_chip(unsigned int irq, struc · line 135
Quoted 13 lines
include/linux/htirq.h +0
-0int __ht_create_irq (struct pci_dev *dev,int idx,ht_irq_update_t *update);Index:
linux-2.6/kernel/irq/chip.c
===================================================================kernel/irq/chip.c +1
-1@@ -131,7 +131,7 @@ int set_irq_chip(unsigned int irq, strucunsigned long flags;if (!desc) { -WARN (1 ,KERN_ERR "Trying to install chip for IRQ%d\n" , irq); +WARN (1 ,KERN_ERR "Trying to install chip for IRQ\n" );return -EINVAL ;
We still have an irq value here so this change is wrong.
kernel/irq/chip.c __set_irq_handler(unsigned int irq, irq_ · line 654
Quoted 6 lines
kernel/irq/chip.c +1
-1@@ -657,7 +651,7 @@ __set_irq_handler(unsigned int irq, irq_if (!desc) {printk (KERN_ERR -"Trying to install type control for IRQ%d\n" , irq); +"Trying to install type control for IRQ\n" );
Again we still have an irq value here, so we should not remove it from the printk.
Re: [PATCH -v2 2/2] genericirq: change ack/mask in irq_chip to take irq_desc instead of irq
Quoted 9 lines · Eric W. Biederman
Quoted 7 lines · Yinghai Lu
will have
void (*ack)(struct irq_desc *desc); void (*mask)(struct irq_desc *desc); void (*mask_ack)(struct irq_desc *desc); void (*unmask)(struct irq_desc *desc); void (*eoi)(struct irq_desc *desc);
Quoted 4 lines
Quoted 1 line
so for sparseirq with raidix tree, we don't call extra
irq_to_desc, and could use desc directlyOverall this looks pretty decent. This look pretty complete. How many platforms did you manage to compile test this on?
x86 only.
any guide to setup cross compiling for 22 archs ?
on x86_64 platform please
Thanks
Yinghai Lu
Re: [PATCH -v2 2/2] genericirq: change ack/mask in irq_chip to take irq_desc instead of irq
Hi,
Quoted 3 lines · On Wed, 24 Feb 2010 14:07:45 -0800 Yinghai Lu <[email protected]> wrote:
any guide to setup cross compiling for 22 archs ?
onx86_64platform please
There are several cross compilers at http://bakeyournoodle.com/cross/ . These are only good for building kernels (but, I assume that is all you need). Just untar them somewhere useful.
If you have any issues with these, please contact [email protected] (cc'd).
Signature · 3 lines
Cheers, Stephen Rothwell [email protected] http://www.canb.auug.org.au/~sfr/
Re: [PATCH -v2 2/2] genericirq: change ack/mask in irq_chip to take irq_desc instead of irq
In reply to Eric W. BiedermanQuoted 15 lines · Eric W. Biederman
Quoted 9 lines · Yinghai Lu
will have
void (*ack)(struct irq_desc *desc); void (*mask)(struct irq_desc *desc); void (*mask_ack)(struct irq_desc *desc); void (*unmask)(struct irq_desc *desc); void (*eoi)(struct irq_desc *desc);so for sparseirq with raidix tree, we don't call extra
irq_to_desc, and could use desc directlyOverall this looks pretty decent. This look pretty complete. How many platforms did you manage to compile test this on?
Quoted 7 lines
I have found a couple of issues (see below).
A few times you change a bit more than is necessary which is a bit spooky in a patch this far ranging.
Reading through this patch to review it took an uncomfortably long time.
And you didn't even catch all problem spots.
While I like the idea, I really hate the convert wholesale approach.
303 files changed, 3127 insertions(+), 2191 deletions(-)
is fine for a sed script renaming action, but definitely _not_ for patches which require semantical changes to the affected code.
The right way to do that is
1) add new function pointers, which take irq_desc as their argument
2) make the generic code use them when the old function pointer is NULL
3) convert the irq_chip implementations one by one with separate patches
4) Remove the old function pointers and switch the generic code fully over to use the new ones
Yes, it's more work, but it's less error prone and easier to review, as the maintainers just have to look at the patch which affects their particular area.
Thanks,
tglx
Re: [PATCH -v2 2/2] genericirq: change ack/mask in irq_chip to take irq_desc instead of irq
Quoted 11 lines
The right way to do that is
1) add new function pointers, which take
irq_descas their argument2) make the generic code use them when the old function pointer is NULL
3) convert the
irq_chipimplementations one by one with separate patches
Quoted 6 lines
4) Remove the old function pointers and switch the generic code fully over to use the new ones
Yes, it's more work, but it's less error prone and easier to review, as the maintainers just have to look at the patch which affects their particular area.
good. please check if you are happy with this version.
next step will make irte and iommu related to use irq_desc instead of irq to avoid irq_to_desc in fast calling path.
Thanks
Yinghai
Subject: [PATCH -v3 2/2] genericirq: change ack/mask in irq_chip to take irq_desc instead of irq
will have
void (*ack)(struct irq_desc *desc); void (*mask)(struct irq_desc *desc); void (*mask_ack)(struct irq_desc *desc); void (*unmask)(struct irq_desc *desc); void (*eoi)(struct irq_desc *desc);
so for sparseirq with raidix tree, we don't call extra irq_to_desc, and could use desc directly
-v2: change all member of irq_chip to use desc only.
-v3: update after legacy_pic
according to Thomas, use other copy for new member with *desc, so could make the transition more smooth
--- arch/ia64/kernel/iosapic.c | 4 arch/ia64/kernel/msi_ia64.c | 2 arch/ia64/sn/kernel/irq.c | 2 arch/ia64/sn/kernel/msi_sn.c | 2 arch/x86/include/asm/hpet.h | 8 arch/x86/include/asm/hw_irq.h | 1 arch/x86/include/asm/i8259.h | 2 arch/x86/include/asm/irq.h | 4 arch/x86/kernel/apic/io_apic.c | 310 +++++++++++----------------- arch/x86/kernel/hpet.c | 16 - arch/x86/kernel/i8259.c | 45 ++-- arch/x86/kernel/irq.c | 19 - arch/x86/kernel/uv_irq.c | 36 +-- arch/x86/kernel/visws_quirks.c | 51 ++-- arch/x86/kernel/vmiclock_32.c | 18 - arch/x86/lguest/boot.c | 14 - drivers/infiniband/hw/ipath/ipath_iba6110.c | 2 drivers/misc/sgi-gru/grufile.c | 8 drivers/pci/dmar.c | 33 ++ drivers/pci/htirq.c | 22 - drivers/pci/msi.c | 17 + drivers/xen/events.c | 38 +-- include/linux/dmar.h | 4 include/linux/htirq.h | 11 include/linux/irq.h | 139 ++++++++++++ include/linux/msi.h | 2 kernel/irq/autoprobe.c | 13 - kernel/irq/chip.c | 90 +++++--- kernel/irq/handle.c | 41 +++ kernel/irq/internals.h | 38 ++- kernel/irq/manage.c | 67 ++---- kernel/irq/migration.c | 16 - kernel/irq/pm.c | 4 kernel/irq/resend.c | 8 kernel/irq/spurious.c | 4 35 files changed, 638 insertions(+), 453 deletions(-)
arch/x86/include/asm/hpet.h +4 -4
@@ -74,10 +74,10 @@ extern void hpet_disable(void);extern unsigned int hpet_readl (unsigned int a);extern void force_hpet_resume (void ); -extern void hpet_msi_unmask (unsigned int irq); -extern void hpet_msi_mask (unsigned int irq); -extern void hpet_msi_write (unsigned int irq,struct msi_msg *msg); -extern void hpet_msi_read (unsigned int irq,struct msi_msg *msg); +extern void hpet_msi_unmask (struct irq_desc *); +extern void hpet_msi_mask (struct irq_desc *); +extern void hpet_msi_write (struct irq_desc *desc,struct msi_msg *msg); +extern void hpet_msi_read (struct irq_desc *desc,struct msi_msg *msg);#ifdef CONFIG_PCI_MSI extern int arch_setup_hpet_msi (unsigned int irq,unsigned int id);
arch/x86/include/asm/i8259.h +1 -1
@@ -58,7 +58,7 @@ struct legacy_pic {void (*mask_all)(void );void (*restore_mask)(void );void (*init)(int auto_eoi); -int (*irq_pending)(unsigned int irq); +int (*irq_pending)(struct irq_desc *desc);void (*make_irq)(unsigned int irq); };
arch/x86/kernel/apic/io_apic.c +125 -185
720 lines not on this page · raw message
arch/x86/kernel/hpet.c +8 -8
@@ -426,9 +426,9 @@ static int hpet_legacy_next_event(unsign static DEFINE_PER_CPU(struct hpet_dev *, cpu_hpet_dev);static struct hpet_dev *hpet_devs; -void hpet_msi_unmask (unsigned int irq) +void hpet_msi_unmask (struct irq_desc *desc) { -struct hpet_dev *hdev =get_irq_data (irq); +struct hpet_dev *hdev =get_irq_desc_data (desc);unsigned int cfg;/* unmask it */
@@ -437,10 +437,10 @@ void hpet_msi_unmask(unsigned int irq)hpet_writel (cfg,HPET_Tn_CFG (hdev->num)); } -void hpet_msi_mask (unsigned int irq) +void hpet_msi_mask (struct irq_desc *desc) {unsigned int cfg; -struct hpet_dev *hdev =get_irq_data (irq); +struct hpet_dev *hdev =get_irq_desc_data (desc);/* mask it */ cfg =hpet_readl (HPET_Tn_CFG (hdev->num));
@@ -448,17 +448,17 @@ void hpet_msi_mask(unsigned int irq)hpet_writel (cfg,HPET_Tn_CFG (hdev->num)); } -void hpet_msi_write (unsigned int irq,struct msi_msg *msg) +void hpet_msi_write (struct irq_desc *desc,struct msi_msg *msg) { -struct hpet_dev *hdev =get_irq_data (irq); +struct hpet_dev *hdev =get_irq_desc_data (desc);hpet_writel (msg->data,HPET_Tn_ROUTE (hdev->num));hpet_writel (msg->address_lo,HPET_Tn_ROUTE (hdev->num) +4 ); } -void hpet_msi_read (unsigned int irq,struct msi_msg *msg) +void hpet_msi_read (struct irq_desc *desc,struct msi_msg *msg) { -struct hpet_dev *hdev =get_irq_data (irq); +struct hpet_dev *hdev =get_irq_desc_data (desc); msg->data =hpet_readl (HPET_Tn_ROUTE (hdev->num)); msg->address_lo =hpet_readl (HPET_Tn_ROUTE (hdev->num) +4 );
arch/x86/kernel/i8259.c +25 -20
103 lines not on this page · raw message
arch/x86/kernel/irq.c +10 -9
@@ -27,7 +27,7 @@ void (*x86_platform_ipi_callback)(void)void ack_bad_irq (unsigned int irq) {if (printk_ratelimit ()) -pr_err ("unexpected IRQ trap at vector %02x\n" , irq); +pr_err ("unexpected IRQ trap at irq %02x\n" , irq);/* * Currently unexpected vectors happen only on SMP and APIC.
@@ -308,23 +308,25 @@ void fixup_irqs(void)* non intr-remapping case, we can't wait till this interrupt * arrives at this cpu before completing the irq move. */ -irq_force_complete_move (irq); +irq_force_complete_move (desc);if (cpumask_any_and (affinity, cpu_online_mask) >= nr_cpu_ids) { break_affinity =1 ; affinity = cpu_all_mask; } -if (!(desc->status &IRQ_MOVE_PCNTXT ) && desc->chip->mask) - desc->chip->mask (irq); +if (!(desc->status &IRQ_MOVE_PCNTXT )) +desc_chip_mask (desc->chip, irq, desc); -if (desc->chip->set_affinity) +if (desc->chip->desc_set_affinity) + desc->chip->desc_set_affinity (desc, affinity); +else if (desc->chip->set_affinity) desc->chip->set_affinity (irq, affinity);else if (!(warned++)) set_affinity =0 ; -if (!(desc->status &IRQ_MOVE_PCNTXT ) && desc->chip->unmask) - desc->chip->unmask (irq); +if (!(desc->status &IRQ_MOVE_PCNTXT )) +desc_chip_unmask (desc->chip, irq, desc);raw_spin_unlock (&desc->lock);
@@ -356,8 +358,7 @@ void fixup_irqs(void) desc =__get_cpu_var (vector_desc)[vector];raw_spin_lock (&desc->lock); -if (desc->chip->retrigger) - desc->chip->retrigger (irq); +desc_chip_retrigger (desc->chip, desc->irq, desc);raw_spin_unlock (&desc->lock); } }
arch/x86/kernel/uv_irq.c +18 -18
@@ -27,34 +27,34 @@ struct uv_irq_2_mmr_pnode{static spinlock_t uv_irq_lock;static struct rb_root uv_irq_root; -static int uv_set_irq_affinity (unsigned int ,const struct cpumask *); +static int uv_set_irq_affinity (struct irq_desc *desc,const struct cpumask *); -static void uv_noop (unsigned int irq) +static void uv_noop (struct irq_desc *desc) { } -static unsigned int uv_noop_ret (unsigned int irq) +static unsigned int uv_noop_ret (struct irq_desc *desc) {return 0 ; } -static void uv_ack_apic (unsigned int irq) +static void uv_ack_apic (struct irq_desc *desc) {ack_APIC_irq (); }struct irq_chip uv_irq_chip = { - .name ="UV-CORE" , - .startup = uv_noop_ret, - .shutdown = uv_noop, - .enable = uv_noop, - .disable = uv_noop, - .ack = uv_noop, - .mask = uv_noop, - .unmask = uv_noop, - .eoi = uv_ack_apic, - .end = uv_noop, - .set_affinity = uv_set_irq_affinity, + .name ="UV-CORE" , + .desc_startup = uv_noop_ret, + .desc_shutdown = uv_noop, + .desc_enable = uv_noop, + .desc_disable = uv_noop, + .desc_ack = uv_noop, + .desc_mask = uv_noop, + .desc_unmask = uv_noop, + .desc_eoi = uv_ack_apic, + .desc_end = uv_noop, + .desc_set_affinity = uv_set_irq_affinity, };/*
@@ -153,7 +153,7 @@ arch_enable_uv_irq(char *irq_name, unsigBUILD_BUG_ON (sizeof (struct uv_IO_APIC_route_entry ) !=sizeof (unsigned long )); - cfg =irq_cfg (irq); + cfg = desc->chip_data; err =assign_irq_vector (irq, cfg, eligible_cpu);if (err !=0 )
@@ -205,9 +205,9 @@ static void arch_disable_uv_irq(int mmr_uv_write_global_mmr64 (mmr_pnode, mmr_offset, mmr_value); } -static int uv_set_irq_affinity (unsigned int irq,const struct cpumask *mask) +static int uv_set_irq_affinity (struct irq_desc *desc,const struct cpumask *mask) { -struct irq_desc *desc =irq_to_desc (irq); +unsigned int irq = desc->irq;struct irq_cfg *cfg = desc->chip_data;unsigned int dest;unsigned long mmr_value;
arch/x86/kernel/visws_quirks.c +25 -26
114 lines not on this page · raw message
arch/x86/kernel/vmiclock_32.c +9 -9
@@ -84,7 +84,7 @@ static inline unsigned int vmi_get_timer/** vmi clockchip */ #ifdef CONFIG_X86_LOCAL_APIC -static unsigned int startup_timer_irq (unsigned int irq) +static unsigned int startup_timer_irq (struct irq_desc *desc) {unsigned long val =apic_read (APIC_LVTT );apic_write (APIC_LVTT ,vmi_get_timer_vector ());
@@ -92,29 +92,29 @@ static unsigned int startup_timer_irq(un return (val & APIC_SEND_PENDING); } -static void mask_timer_irq (unsigned int irq) +static void mask_timer_irq (struct irq_desc *desc) {unsigned long val =apic_read (APIC_LVTT );apic_write (APIC_LVTT , val |APIC_LVT_MASKED ); } -static void unmask_timer_irq (unsigned int irq) +static void unmask_timer_irq (struct irq_desc *desc) {unsigned long val =apic_read (APIC_LVTT );apic_write (APIC_LVTT , val & ~APIC_LVT_MASKED ); } -static void ack_timer_irq (unsigned int irq) +static void ack_timer_irq (struct irq_desc *desc) {ack_APIC_irq (); }static struct irq_chip vmi_chip__read_mostly = { - .name ="VMI-LOCAL" , - .startup = startup_timer_irq, - .mask = mask_timer_irq, - .unmask = unmask_timer_irq, - .ack = ack_timer_irq + .name ="VMI-LOCAL" , + .desc_startup = startup_timer_irq, + .desc_mask = mask_timer_irq, + .desc_unmask = unmask_timer_irq, + .desc_ack = ack_timer_irq };#endif
arch/x86/lguest/boot.c +7 -7
@@ -789,22 +789,22 @@ static void lguest_flush_tlb_kernel(void* simple as setting a bit. We don't actually "ack" interrupts as such, we * just mask and unmask them. I wonder if we should be cleverer? */ -static void disable_lguest_irq (unsigned int irq) +static void disable_lguest_irq (struct irq_desc *desc) { -set_bit (irq, lguest_data.blocked_interrupts); +set_bit (desc->irq, lguest_data.blocked_interrupts); } -static void enable_lguest_irq (unsigned int irq) +static void enable_lguest_irq (struct irq_desc *desc) { -clear_bit (irq, lguest_data.blocked_interrupts); +clear_bit (desc->irq, lguest_data.blocked_interrupts); }/* This structure describes the lguest IRQ controller. */ static struct irq_chip lguest_irq_controller = { .name ="lguest" , - .mask = disable_lguest_irq, - .mask_ack = disable_lguest_irq, - .unmask = enable_lguest_irq, + .desc_mask = disable_lguest_irq, + .desc_mask_ack = disable_lguest_irq, + .desc_unmask = enable_lguest_irq, };/*
drivers/misc/sgi-gru/grufile.c +4 -4
@@ -348,15 +348,15 @@ static unsigned long gru_chiplet_cpu_to_static int gru_irq_count[GRU_CHIPLETS_PER_BLADE ]; -static void gru_noop (unsigned int irq) +static void gru_noop (struct irq_desc *desc) { }static struct irq_chip gru_chip[GRU_CHIPLETS_PER_BLADE ] = { [0 ... GRU_CHIPLETS_PER_BLADE - 1] { - .mask = gru_noop, - .unmask = gru_noop, - .ack = gru_noop + .desc_mask = gru_noop, + .desc_unmask = gru_noop, + .desc_ack = gru_noop } };
drivers/pci/dmar.c +25 -8
@@ -1240,9 +1240,9 @@ const char *dmar_get_fault_reason(u8 fau } } -void dmar_msi_unmask (unsigned int irq) +void dmar_msi_unmask_desc (struct irq_desc *desc) { -struct intel_iommu *iommu =get_irq_data (irq); +struct intel_iommu *iommu =get_irq_desc_data (desc);unsigned long flag;/* unmask it */
@@ -1252,11 +1252,15 @@ void dmar_msi_unmask(unsigned int irq)readl (iommu->reg +DMAR_FECTL_REG );spin_unlock_irqrestore (&iommu->register_lock, flag); } +void dmar_msi_unmask (unsigned int irq) +{ +dmar_msi_unmask_desc (irq_to_desc (irq)); +} -void dmar_msi_mask (unsigned int irq) +void dmar_msi_mask_desc (struct irq_desc *desc) {unsigned long flag; -struct intel_iommu *iommu =get_irq_data (irq); +struct intel_iommu *iommu =get_irq_desc_data (desc);/* mask it */ spin_lock_irqsave (&iommu->register_lock, flag);
@@ -1266,9 +1270,14 @@ void dmar_msi_mask(unsigned int irq)spin_unlock_irqrestore (&iommu->register_lock, flag); } -void dmar_msi_write (int irq,struct msi_msg *msg) +void dmar_msi_mask (unsigned int irq) { -struct intel_iommu *iommu =get_irq_data (irq); +dmar_msi_mask_desc (irq_to_desc (irq)); +} + +void dmar_msi_write_desc (struct irq_desc *desc,struct msi_msg *msg) +{ +struct intel_iommu *iommu =get_irq_desc_data (desc);unsigned long flag;spin_lock_irqsave (&iommu->register_lock, flag);
@@ -1277,10 +1286,14 @@ void dmar_msi_write(int irq, struct msi_writel (msg->address_hi, iommu->reg +DMAR_FEUADDR_REG );spin_unlock_irqrestore (&iommu->register_lock, flag); } +void dmar_msi_write (int irq,struct msi_msg *msg) +{ +dmar_msi_write_desc (irq_to_desc (irq), msg); +} -void dmar_msi_read (int irq,struct msi_msg *msg) +void dmar_msi_read_desc (struct irq_desc *desc,struct msi_msg *msg) { -struct intel_iommu *iommu =get_irq_data (irq); +struct intel_iommu *iommu =get_irq_desc_data (desc);unsigned long flag;spin_lock_irqsave (&iommu->register_lock, flag);
@@ -1290,6 +1303,10 @@ void dmar_msi_read(int irq, struct msi_mspin_unlock_irqrestore (&iommu->register_lock, flag); } +void dmar_msi_read (int irq,struct msi_msg *msg) +{ +dmar_msi_read_desc (irq_to_desc (irq), msg); +}static int dmar_fault_do_one (struct intel_iommu *iommu,int type,u8 fault_reason,u16 source_id,unsigned long long addr) {
drivers/pci/htirq.c +11 -11
@@ -33,9 +33,9 @@ struct ht_irq_cfg { }; -void write_ht_irq_msg (unsigned int irq,struct ht_irq_msg *msg) +void write_ht_irq_msg (struct irq_desc *desc,struct ht_irq_msg *msg) { -struct ht_irq_cfg *cfg =get_irq_data (irq); +struct ht_irq_cfg *cfg =get_irq_desc_data (desc);unsigned long flags;spin_lock_irqsave (&ht_irq_lock, flags);if (cfg->msg.address_lo != msg->address_lo) {
@@ -47,39 +47,39 @@ void write_ht_irq_msg(unsigned int irq,pci_write_config_dword (cfg->dev, cfg->pos +4 , msg->address_hi); }if (cfg->update) - cfg->update (cfg->dev, irq, msg); + cfg->update (cfg->dev, desc, msg);spin_unlock_irqrestore (&ht_irq_lock, flags); cfg->msg = *msg; } -void fetch_ht_irq_msg (unsigned int irq,struct ht_irq_msg *msg) +void fetch_ht_irq_msg (struct irq_desc *desc,struct ht_irq_msg *msg) { -struct ht_irq_cfg *cfg =get_irq_data (irq); +struct ht_irq_cfg *cfg =get_irq_desc_data (desc); *msg = cfg->msg; } -void mask_ht_irq (unsigned int irq) +void mask_ht_irq (struct irq_desc *desc) {struct ht_irq_cfg *cfg;struct ht_irq_msg msg; - cfg =get_irq_data (irq); + cfg =get_irq_desc_data (desc); msg = cfg->msg; msg.address_lo |=1 ; -write_ht_irq_msg (irq, &msg); +write_ht_irq_msg (desc, &msg); } -void unmask_ht_irq (unsigned int irq) +void unmask_ht_irq (struct irq_desc *desc) {struct ht_irq_cfg *cfg;struct ht_irq_msg msg; - cfg =get_irq_data (irq); + cfg =get_irq_desc_data (desc); msg = cfg->msg; msg.address_lo &= ~1 ; -write_ht_irq_msg (irq, &msg); +write_ht_irq_msg (desc, &msg); }/**
drivers/pci/msi.c +13 -4
@@ -169,9 +169,10 @@ static void msix_mask_irq(struct msi_des desc->masked =__msix_mask_irq (desc, flag); } -static void msi_set_mask_bit (unsigned irq,u32 flag) +static void msi_set_mask_bit (struct irq_desc *descx,u32 flag) { -struct msi_desc *desc =get_irq_msi (irq); +unsigned int irq = descx->irq; +struct msi_desc *desc =get_irq_desc_msi (descx);if (desc->msi_attrib.is_msix) {msix_mask_irq (desc, flag);
@@ -182,14 +183,22 @@ static void msi_set_mask_bit(unsigned ir } } +void mask_msi_irq_desc (struct irq_desc *desc) +{ +msi_set_mask_bit (desc,1 ); +}void mask_msi_irq (unsigned int irq) { -msi_set_mask_bit (irq,1 ); +mask_msi_irq_desc (irq_to_desc (irq)); } +void unmask_msi_irq_desc (struct irq_desc *desc) +{ +msi_set_mask_bit (desc,0 ); +}void unmask_msi_irq (unsigned int irq) { -msi_set_mask_bit (irq,0 ); +unmask_msi_irq_desc (irq_to_desc (irq)); }void read_msi_msg_desc (struct irq_desc *desc,struct msi_msg *msg)
drivers/xen/events.c +19 -19
@@ -725,11 +725,11 @@ static int rebind_irq_to_cpu(unsigned irreturn 0 ; } -static int set_affinity_irq (unsigned irq,const struct cpumask *dest) +static int set_affinity_irq (struct irq_desc *desc,const struct cpumask *dest) {unsigned tcpu =cpumask_first (dest); -return rebind_irq_to_cpu (irq, tcpu); +return rebind_irq_to_cpu (desc->irq, tcpu); }int resend_irq_on_evtchn (unsigned int irq)
@@ -748,35 +748,35 @@ int resend_irq_on_evtchn(unsigned int irreturn 1 ; } -static void enable_dynirq (unsigned int irq) +static void enable_dynirq (struct irq_desc *desc) { -int evtchn =evtchn_from_irq (irq); +int evtchn =evtchn_from_irq (desc->irq);if (VALID_EVTCHN (evtchn))unmask_evtchn (evtchn); } -static void disable_dynirq (unsigned int irq) +static void disable_dynirq (struct irq_desc *desc) { -int evtchn =evtchn_from_irq (irq); +int evtchn =evtchn_from_irq (desc->irq);if (VALID_EVTCHN (evtchn))mask_evtchn (evtchn); } -static void ack_dynirq (unsigned int irq) +static void ack_dynirq (struct irq_desc *desc) { -int evtchn =evtchn_from_irq (irq); +int evtchn =evtchn_from_irq (desc->irq); -move_native_irq (irq); +move_native_irq (desc);if (VALID_EVTCHN (evtchn))clear_evtchn (evtchn); } -static int retrigger_dynirq (unsigned int irq) +static int retrigger_dynirq (struct irq_desc *desc) { -int evtchn =evtchn_from_irq (irq); +int evtchn =evtchn_from_irq (desc->irq);struct shared_info *sh = HYPERVISOR_shared_info;int ret =0 ;
@@ -921,15 +921,15 @@ void xen_irq_resume(void) }static struct irq_chip xen_dynamic_chip__read_mostly = { - .name ="xen-dyn" , + .name ="xen-dyn" , - .disable = disable_dynirq, - .mask = disable_dynirq, - .unmask = enable_dynirq, - - .ack = ack_dynirq, - .set_affinity = set_affinity_irq, - .retrigger = retrigger_dynirq, + .desc_disable = disable_dynirq, + .desc_mask = disable_dynirq, + .desc_unmask = enable_dynirq, + + .desc_ack = ack_dynirq, + .desc_set_affinity = set_affinity_irq, + .desc_retrigger = retrigger_dynirq, };void __init xen_init_IRQ (void )
include/linux/dmar.h +4 -0
@@ -191,6 +191,10 @@ extern void dmar_msi_unmask(unsigned intextern void dmar_msi_mask (unsigned int irq);extern void dmar_msi_read (int irq,struct msi_msg *msg);extern void dmar_msi_write (int irq,struct msi_msg *msg); +extern void dmar_msi_unmask_desc (struct irq_desc *); +extern void dmar_msi_mask_desc (struct irq_desc *); +extern void dmar_msi_read_desc (struct irq_desc *desc,struct msi_msg *msg); +extern void dmar_msi_write_desc (struct irq_desc *desc,struct msi_msg *msg);extern int dmar_set_interrupt (struct intel_iommu *iommu);extern irqreturn_t dmar_fault (int irq,void *dev_id);extern int arch_setup_dmar_msi (unsigned int irq);
include/linux/htirq.h +6 -5
@@ -7,16 +7,17 @@ struct ht_irq_msg { };/* Helper functions.. */ -void fetch_ht_irq_msg (unsigned int irq,struct ht_irq_msg *msg); -void write_ht_irq_msg (unsigned int irq,struct ht_irq_msg *msg); -void mask_ht_irq (unsigned int irq); -void unmask_ht_irq (unsigned int irq); +struct irq_desc ; +void fetch_ht_irq_msg (struct irq_desc *desc,struct ht_irq_msg *msg); +void write_ht_irq_msg (struct irq_desc *desc,struct ht_irq_msg *msg); +void mask_ht_irq (struct irq_desc *); +void unmask_ht_irq (struct irq_desc *);/* The arch hook for getting things started */ int arch_setup_ht_irq (unsigned int irq,struct pci_dev *dev);/* For drivers of buggy hardware */ -typedef void (ht_irq_update_t )(struct pci_dev *dev,int irq, +typedef void (ht_irq_update_t )(struct pci_dev *dev,struct irq_desc *desc,struct ht_irq_msg *msg);int __ht_create_irq (struct pci_dev *dev,int idx,ht_irq_update_t *update);
include/linux/irq.h +134 -5
178 lines not on this page · raw message
include/linux/msi.h +2 -0
@@ -13,6 +13,8 @@ struct msi_msg {struct irq_desc ;extern void mask_msi_irq (unsigned int irq);extern void unmask_msi_irq (unsigned int irq); +void mask_msi_irq_desc (struct irq_desc *); +void unmask_msi_irq_desc (struct irq_desc *);extern void read_msi_msg_desc (struct irq_desc *desc,struct msi_msg *msg);extern void write_msi_msg_desc (struct irq_desc *desc,struct msi_msg *msg);extern void read_msi_msg (unsigned int irq,struct msi_msg *msg);
kernel/irq/autoprobe.c +6 -7
@@ -57,9 +57,8 @@ unsigned long probe_irq_on(void)* Some chips need to know about probing in * progress: */ -if (desc->chip->set_type) - desc->chip->set_type (i,IRQ_TYPE_PROBE ); - desc->chip->startup (i); +desc_chip_set_type (desc->chip, i, desc,IRQ_TYPE_PROBE ); +desc_chip_startup (desc->chip, i, desc); }raw_spin_unlock_irq (&desc->lock); }
@@ -76,7 +75,7 @@ unsigned long probe_irq_on(void)raw_spin_lock_irq (&desc->lock);if (!desc->action && !(desc->status &IRQ_NOPROBE )) { desc->status |=IRQ_AUTODETECT |IRQ_WAITING ; -if (desc->chip->startup (i)) +if (desc_chip_startup (desc->chip, i, desc)) desc->status |=IRQ_PENDING ; }raw_spin_unlock_irq (&desc->lock);
@@ -98,7 +97,7 @@ unsigned long probe_irq_on(void)/* It triggered already - consider it spurious. */ if (!(status &IRQ_WAITING )) { desc->status = status & ~IRQ_AUTODETECT ; - desc->chip->shutdown (i); +desc_chip_shutdown (desc->chip, i, desc); }else if (i <32 ) mask |=1 << i;
@@ -137,7 +136,7 @@ unsigned int probe_irq_mask(unsigned lon mask |=1 << i; desc->status = status & ~IRQ_AUTODETECT ; - desc->chip->shutdown (i); +desc_chip_shutdown (desc->chip, i, desc); }raw_spin_unlock_irq (&desc->lock); }
@@ -181,7 +180,7 @@ int probe_irq_off(unsigned long val) nr_of_irqs++; } desc->status = status & ~IRQ_AUTODETECT ; - desc->chip->shutdown (i); +desc_chip_shutdown (desc->chip, i, desc); }raw_spin_unlock_irq (&desc->lock); }
kernel/irq/chip.c +63 -27
209 lines not on this page · raw message
kernel/irq/handle.c +34 -7
100 lines not on this page · raw message
kernel/irq/internals.h +30 -8
@@ -12,8 +12,8 @@ extern void compat_irq_chip_set_default_extern int __irq_set_trigger (struct irq_desc *desc,unsigned int irq,unsigned long flags); -extern void __disable_irq (struct irq_desc *desc,unsigned int irq,bool susp); -extern void __enable_irq (struct irq_desc *desc,unsigned int irq,bool resume); +extern void __disable_irq (struct irq_desc *desc,bool susp); +extern void __enable_irq (struct irq_desc *desc,bool resume);extern struct lock_class_key irq_desc_lock_class;extern void init_kstat_irqs (struct irq_desc *desc,int node,int nr);
@@ -40,17 +40,39 @@ extern int irq_select_affinity_usr(unsigextern void irq_set_thread_affinity (struct irq_desc *desc); +static inline int +desc_chip_set_type (struct irq_chip *chip,unsigned int irq,struct irq_desc *desc,unsigned int flow_type) +{ +if (chip->desc_set_type) +return chip->desc_set_type (desc, flow_type); +else if (chip->set_type) +return chip->set_type (irq, flow_type); +return 0 ; +} +static inline int +desc_chip_set_wake (struct irq_chip *chip,unsigned int irq,struct irq_desc *desc,unsigned int on) +{ +if (chip->desc_set_wake) +return chip->desc_set_wake (desc, on); +else if (chip->set_wake) +return chip->set_wake (irq, on); +return 0 ; +}/* Inline functions for support of irq chips on slow busses */ -static inline void chip_bus_lock (unsigned int irq,struct irq_desc *desc) +static inline void chip_bus_lock (struct irq_desc *desc) { +if (unlikely (desc->chip->desc_bus_lock)) + desc->chip->desc_bus_lock (desc);if (unlikely (desc->chip->bus_lock)) - desc->chip->bus_lock (irq); + desc->chip->bus_lock (desc->irq); } -static inline void chip_bus_sync_unlock (unsigned int irq,struct irq_desc *desc) +static inline void chip_bus_sync_unlock (struct irq_desc *desc) { +if (unlikely (desc->chip->desc_bus_sync_unlock)) + desc->chip->desc_bus_sync_unlock (desc);if (unlikely (desc->chip->bus_sync_unlock)) - desc->chip->bus_sync_unlock (irq); + desc->chip->bus_sync_unlock (desc->irq); }/*
@@ -61,10 +83,10 @@ static inline void chip_bus_sync_unlock(#define P (f) if (desc->status & f) printk("%14s set\n", #f) -static inline void print_irq_desc (unsigned int irq,struct irq_desc *desc) +static inline void print_irq_desc (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); + desc->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 ("->chip(): %p, " , desc->chip);
kernel/irq/manage.c +33 -34
213 lines not on this page · raw message
kernel/irq/migration.c +6 -10
@@ -4,10 +4,8 @@#include "internals.h" -void move_masked_irq (int irq) +void move_masked_irq (struct irq_desc *desc) { -struct irq_desc *desc =irq_to_desc (irq); -if (likely (!(desc->status &IRQ_MOVE_PENDING )))return ;
@@ -43,7 +41,7 @@ void move_masked_irq(int irq)*/ if (likely (cpumask_any_and (desc->pending_mask, cpu_online_mask) < nr_cpu_ids)) -if (!desc->chip->set_affinity (irq, desc->pending_mask)) { +if (!desc_chip_set_affinity (desc->chip, desc->irq, desc, desc->pending_mask)) {cpumask_copy (desc->affinity, desc->pending_mask);irq_set_thread_affinity (desc); }
@@ -51,18 +49,16 @@ void move_masked_irq(int irq)cpumask_clear (desc->pending_mask); } -void move_native_irq (int irq) +void move_native_irq (struct irq_desc *desc) { -struct irq_desc *desc =irq_to_desc (irq); -if (likely (!(desc->status &IRQ_MOVE_PENDING )))return ;if (unlikely (desc->status &IRQ_DISABLED ))return ; - desc->chip->mask (irq); -move_masked_irq (irq); - desc->chip->unmask (irq); +desc_chip_mask (desc->chip, desc->irq, desc); +move_masked_irq (desc); +desc_chip_unmask (desc->chip, desc->irq, desc); }
kernel/irq/pm.c +2 -2
@@ -29,7 +29,7 @@ void suspend_device_irqs(void)unsigned long flags;raw_spin_lock_irqsave (&desc->lock, flags); -__disable_irq (desc, irq, true); +__disable_irq (desc, true);raw_spin_unlock_irqrestore (&desc->lock, flags); }
@@ -57,7 +57,7 @@ void resume_device_irqs(void)continue ;raw_spin_lock_irqsave (&desc->lock, flags); -__enable_irq (desc, irq, true); +__enable_irq (desc, true);raw_spin_unlock_irqrestore (&desc->lock, flags); } }
kernel/irq/resend.c +4 -4
@@ -53,14 +53,14 @@ static DECLARE_TASKLET(resend_tasklet, r* * Is called with interrupts disabled and desc->lock held. */ -void check_irq_resend (struct irq_desc *desc,unsigned int irq) +void check_irq_resend (struct irq_desc *desc) {unsigned int status = desc->status;/* * Make sure the interrupt is enabled, before resending it: */ - desc->chip->enable (irq); +desc_chip_enable (desc->chip, desc->irq, desc);/* * We do not resend level type interrupts. Level type
@@ -70,10 +70,10 @@ void check_irq_resend(struct irq_desc *dif ((status & (IRQ_LEVEL |IRQ_PENDING |IRQ_REPLAY )) ==IRQ_PENDING ) { desc->status = (status & ~IRQ_PENDING ) |IRQ_REPLAY ; -if (!desc->chip->retrigger || !desc->chip->retrigger (irq)) { +if (!desc_chip_retrigger (desc->chip, desc->irq, desc)) {#ifdef CONFIG_HARDIRQS_SW_RESEND /* Set it pending and activate the softirq: */ -set_bit (irq, irqs_resend); +set_bit (desc->irq, irqs_resend);tasklet_schedule (&resend_tasklet);#endif }
kernel/irq/spurious.c +2 -2
@@ -79,7 +79,7 @@ static int try_one_irq(int irq, struct i* IRQ controller clean up too */ if (work && desc->chip && desc->chip->end) - desc->chip->end (irq); +desc_chip_end (desc->chip, irq, desc);raw_spin_unlock (&desc->lock);return ok;
@@ -254,7 +254,7 @@ void note_interrupt(unsigned int irq, stprintk (KERN_EMERG "Disabling IRQ #%d\n" , irq); desc->status |=IRQ_DISABLED |IRQ_SPURIOUS_DISABLED ; desc->depth++; - desc->chip->disable (irq); +desc_chip_disable (desc->chip, irq, desc);mod_timer (&poll_spurious_irq_timer, jiffies +POLL_SPURIOUS_IRQ_INTERVAL );
drivers/infiniband/hw/ipath/ipath_iba6110.c +1 -1
@@ -986,7 +986,7 @@ static int ipath_ht_intconfig(struct ipareturn ret; } -static void ipath_ht_irq_update (struct pci_dev *dev,int irq, +static void ipath_ht_irq_update (struct pci_dev *dev,struct irq_desc *desc,struct ht_irq_msg *msg) {struct ipath_devdata *dd =pci_get_drvdata (dev);
arch/ia64/kernel/iosapic.c +2 -2
@@ -409,7 +409,7 @@ iosapic_end_level_irq (unsigned int irq)iosapic_eoi (rte->iosapic->addr, vec);if (unlikely (do_unmask_irq)) { -move_masked_irq (irq); +move_masked_irq (irq_to_desc (irq));unmask_irq (irq); } }
@@ -454,7 +454,7 @@ iosapic_ack_edge_irq (unsigned int irq)struct irq_desc *idesc = irq_desc + irq;irq_complete_move (irq); -move_native_irq (irq); +move_native_irq (idesc);/* * Once we have recorded IRQ_PENDING already, we can mask the * interrupt for real. This prevents IRQ storms from unhandled
arch/ia64/kernel/msi_ia64.c +1 -1
@@ -87,7 +87,7 @@ void ia64_teardown_msi_irq(unsigned intstatic void ia64_ack_msi_irq (unsigned int irq) {irq_complete_move (irq); -move_native_irq (irq); +move_native_irq (irq_to_desc (irq));ia64_eoi (); }
arch/ia64/sn/kernel/irq.c +1 -1
@@ -110,7 +110,7 @@ static void sn_ack_irq(unsigned int irq)HUB_S ((u64 *)LOCAL_MMR_ADDR (SH_EVENT_OCCURRED_ALIAS ), mask);__set_bit (irq, (volatile void *)pda->sn_in_service_ivecs); -move_native_irq (irq); +move_native_irq (irq_to_desc (irq)); }static void sn_end_irq (unsigned int irq)
arch/ia64/sn/kernel/msi_sn.c +1 -1
@@ -213,7 +213,7 @@ static int sn_set_msi_irq_affinity(unsigstatic void sn_ack_msi_irq (unsigned int irq) { -move_native_irq (irq); +move_native_irq (irq_to_desc (irq));ia64_eoi (); }
arch/x86/include/asm/hw_irq.h +0 -1
@@ -91,7 +91,6 @@ struct irq_cfg { u8 move_in_progress : 1; }; -extern struct irq_cfg *irq_cfg (unsigned int );extern int assign_irq_vector (struct irq_desc *,struct irq_cfg *,const struct cpumask *);extern void send_cleanup_vector (struct irq_cfg *);
arch/x86/include/asm/irq.h +2 -2
@@ -31,15 +31,15 @@ static inline int irq_canonicalize(int i# endif #endif +struct irq_desc ;#ifdef CONFIG_HOTPLUG_CPU #include <linux/cpumask.h> extern void fixup_irqs (void ); -extern void irq_force_complete_move (int ); +void irq_force_complete_move (struct irq_desc *desc);#endif extern void (*x86_platform_ipi_callback)(void );extern void native_init_IRQ (void ); -struct irq_desc ;extern bool handle_irq (struct irq_desc *desc,struct pt_regs *regs);extern unsigned int do_IRQ (struct pt_regs *regs);
Re: [PATCH -v2 2/2] genericirq: change ack/mask in irq_chip to take irq_desc instead of irq
Quoted 11 lines · Yinghai Lu
Quoted 11 lines
The right way to do that is
1) add new function pointers, which take
irq_descas their argument2) make the generic code use them when the old function pointer is NULL
3) convert the
irq_chipimplementations one by one with separate patches
Quoted 8 lines
Quoted 6 lines
4) Remove the old function pointers and switch the generic code fully over to use the new ones
Yes, it's more work, but it's less error prone and easier to review, as the maintainers just have to look at the patch which affects their particular area.
good. please check if you are happy with this version.
It's better, but again please provide separate patches for:
1) the new function pointers
2) kernel/irq/* making use of them
3) separate patches for each irq_chip conversion. If several chips share the same mask/unmask/etc. functions, then one patch for converting those related ones is fine.
Thanks,
tglx