The patch titled FRV: improve FRV's use of generic IRQ handling has been added to the -mm tree. Its filename is frv-improve-frvs-use-of-generic-irq-handling.patch See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this ------------------------------------------------------ Subject: FRV: improve FRV's use of generic IRQ handling From: David Howells <dhowells@xxxxxxxxxx> Improve FRV's use of generic IRQ handling: (*) Use generic_handle_irq() rather than __do_IRQ() as the latter is obsolete. (*) Don't implement enable() and disable() ops as these will fall back to using unmask() and mask(). (*) Provide mask_ack() functions to avoid a call each to mask() and ack(). (*) Make the cascade handlers always return IRQ_HANDLED. (*) Implement the mask() and unmask() functions in the same order as they're listed in the ops table. Signed-off-by: David Howells <dhowells@xxxxxxxxxx> Cc: Benjamin Herrenschmidt <benh@xxxxxxxxxxxxxxxxxxx> Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx> Cc: Ingo Molnar <mingo@xxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- arch/frv/kernel/irq-mb93091.c | 36 ++++++++++++++++---------------- arch/frv/kernel/irq-mb93093.c | 36 ++++++++++++++++---------------- arch/frv/kernel/irq-mb93493.c | 35 ++++++++++++------------------- arch/frv/kernel/irq.c | 15 ------------- 4 files changed, 53 insertions(+), 69 deletions(-) diff -puN arch/frv/kernel/irq-mb93091.c~frv-improve-frvs-use-of-generic-irq-handling arch/frv/kernel/irq-mb93091.c --- a/arch/frv/kernel/irq-mb93091.c~frv-improve-frvs-use-of-generic-irq-handling +++ a/arch/frv/kernel/irq-mb93091.c @@ -36,41 +36,45 @@ /* * on-motherboard FPGA PIC operations */ -static void frv_fpga_enable(unsigned int irq) +static void frv_fpga_mask(unsigned int irq) { uint16_t imr = __get_IMR(); - imr &= ~(1 << (irq - IRQ_BASE_FPGA)); + imr |= 1 << (irq - IRQ_BASE_FPGA); __set_IMR(imr); } -static void frv_fpga_disable(unsigned int irq) +static void frv_fpga_ack(unsigned int irq) +{ + __clr_IFR(1 << (irq - IRQ_BASE_FPGA)); +} + +static void frv_fpga_mask_ack(unsigned int irq) { uint16_t imr = __get_IMR(); imr |= 1 << (irq - IRQ_BASE_FPGA); - __set_IMR(imr); -} -static void frv_fpga_ack(unsigned int irq) -{ __clr_IFR(1 << (irq - IRQ_BASE_FPGA)); } -static void frv_fpga_end(unsigned int irq) +static void frv_fpga_unmask(unsigned int irq) { + uint16_t imr = __get_IMR(); + + imr &= ~(1 << (irq - IRQ_BASE_FPGA)); + + __set_IMR(imr); } static struct irq_chip frv_fpga_pic = { .name = "mb93091", - .enable = frv_fpga_enable, - .disable = frv_fpga_disable, .ack = frv_fpga_ack, - .mask = frv_fpga_disable, - .unmask = frv_fpga_enable, - .end = frv_fpga_end, + .mask = frv_fpga_mask, + .mask_ack = frv_fpga_mask_ack, + .unmask = frv_fpga_unmask, }; /* @@ -79,7 +83,6 @@ static struct irq_chip frv_fpga_pic = { static irqreturn_t fpga_interrupt(int irq, void *_mask, struct pt_regs *regs) { uint16_t imr, mask = (unsigned long) _mask; - irqreturn_t iret = 0; imr = __get_IMR(); mask = mask & ~imr & __get_IFR(); @@ -92,11 +95,10 @@ static irqreturn_t fpga_interrupt(int ir irq = 31 - irq; mask &= ~(1 << irq); - if (__do_IRQ(IRQ_BASE_FPGA + irq, regs)) - iret |= IRQ_HANDLED; + generic_handle_irq(IRQ_BASE_FPGA + irq, regs); } - return iret; + return IRQ_HANDLED; } /* diff -puN arch/frv/kernel/irq-mb93093.c~frv-improve-frvs-use-of-generic-irq-handling arch/frv/kernel/irq-mb93093.c --- a/arch/frv/kernel/irq-mb93093.c~frv-improve-frvs-use-of-generic-irq-handling +++ a/arch/frv/kernel/irq-mb93093.c @@ -35,40 +35,44 @@ /* * off-CPU FPGA PIC operations */ -static void frv_fpga_enable(unsigned int irq) +static void frv_fpga_mask(unsigned int irq) { uint16_t imr = __get_IMR(); - imr &= ~(1 << (irq - IRQ_BASE_FPGA)); - + imr |= 1 << (irq - IRQ_BASE_FPGA); __set_IMR(imr); } -static void frv_fpga_disable(unsigned int irq) +static void frv_fpga_ack(unsigned int irq) +{ + __clr_IFR(1 << (irq - IRQ_BASE_FPGA)); +} + +static void frv_fpga_mask_ack(unsigned int irq) { uint16_t imr = __get_IMR(); imr |= 1 << (irq - IRQ_BASE_FPGA); - __set_IMR(imr); -} -static void frv_fpga_ack(unsigned int irq) -{ __clr_IFR(1 << (irq - IRQ_BASE_FPGA)); } -static void frv_fpga_end(unsigned int irq) +static void frv_fpga_unmask(unsigned int irq) { + uint16_t imr = __get_IMR(); + + imr &= ~(1 << (irq - IRQ_BASE_FPGA)); + + __set_IMR(imr); } static struct irq_chip frv_fpga_pic = { .name = "mb93093", - .enable = frv_fpga_enable, - .disable = frv_fpga_disable, .ack = frv_fpga_ack, - .mask = frv_fpga_disable, - .unmask = frv_fpga_enable, + .mask = frv_fpga_mask, + .mask_ack = frv_fpga_mask_ack, + .unmask = frv_fpga_unmask, .end = frv_fpga_end, }; @@ -78,7 +82,6 @@ static struct irq_chip frv_fpga_pic = { static irqreturn_t fpga_interrupt(int irq, void *_mask, struct pt_regs *regs) { uint16_t imr, mask = (unsigned long) _mask; - irqreturn_t iret = 0; imr = __get_IMR(); mask = mask & ~imr & __get_IFR(); @@ -91,11 +94,10 @@ static irqreturn_t fpga_interrupt(int ir irq = 31 - irq; mask &= ~(1 << irq); - if (__do_IRQ(IRQ_BASE_FPGA + irq, regs)) - iret |= IRQ_HANDLED; + generic_irq_handle(IRQ_BASE_FPGA + irq, regs); } - return iret; + return IRQ_HANDLED; } /* diff -puN arch/frv/kernel/irq-mb93493.c~frv-improve-frvs-use-of-generic-irq-handling arch/frv/kernel/irq-mb93493.c --- a/arch/frv/kernel/irq-mb93493.c~frv-improve-frvs-use-of-generic-irq-handling +++ a/arch/frv/kernel/irq-mb93493.c @@ -43,8 +43,9 @@ /* * daughter board PIC operations + * - there is no way to ACK interrupts in the MB93493 chip */ -static void frv_mb93493_enable(unsigned int irq) +static void frv_mb93493_mask(unsigned int irq) { uint32_t iqsr; volatile void *piqsr; @@ -55,11 +56,15 @@ static void frv_mb93493_enable(unsigned piqsr = __addr_MB93493_IQSR(0); iqsr = readl(piqsr); - iqsr |= 1 << (irq - IRQ_BASE_MB93493 + 16); + iqsr &= ~(1 << (irq - IRQ_BASE_MB93493 + 16)); writel(iqsr, piqsr); } -static void frv_mb93493_disable(unsigned int irq) +static void frv_mb93493_ack(unsigned int irq) +{ +} + +static void frv_mb93493_unmask(unsigned int irq) { uint32_t iqsr; volatile void *piqsr; @@ -70,26 +75,16 @@ static void frv_mb93493_disable(unsigned piqsr = __addr_MB93493_IQSR(0); iqsr = readl(piqsr); - iqsr &= ~(1 << (irq - IRQ_BASE_MB93493 + 16)); + iqsr |= 1 << (irq - IRQ_BASE_MB93493 + 16); writel(iqsr, piqsr); } -static void frv_mb93493_ack(unsigned int irq) -{ -} - -static void frv_mb93493_end(unsigned int irq) -{ -} - static struct irq_chip frv_mb93493_pic = { .name = "mb93093", - .enable = frv_mb93493_enable, - .disable = frv_mb93493_disable, .ack = frv_mb93493_ack, - .mask = frv_mb93493_disable, - .unmask = frv_mb93493_enable, - .end = frv_mb93493_end, + .mask = frv_mb93493_mask, + .mask_ack = frv_mb93493_mask, + .unmask = frv_mb93493_unmask, }; /* @@ -98,7 +93,6 @@ static struct irq_chip frv_mb93493_pic = static irqreturn_t mb93493_interrupt(int irq, void *_piqsr, struct pt_regs *regs) { volatile void *piqsr = _piqsr; - irqreturn_t iret = 0; uint32_t iqsr; iqsr = readl(piqsr); @@ -112,11 +106,10 @@ static irqreturn_t mb93493_interrupt(int irq = 31 - irq; iqsr &= ~(1 << irq); - if (__do_IRQ(IRQ_BASE_MB93493 + irq, regs)) - iret |= IRQ_HANDLED; + generic_handle_irq(IRQ_BASE_MB93493 + irq, regs); } - return iret; + return IRQ_HANDLED; } /* diff -puN arch/frv/kernel/irq.c~frv-improve-frvs-use-of-generic-irq-handling arch/frv/kernel/irq.c --- a/arch/frv/kernel/irq.c~frv-improve-frvs-use-of-generic-irq-handling +++ a/arch/frv/kernel/irq.c @@ -97,19 +97,8 @@ int show_interrupts(struct seq_file *p, /* * on-CPU PIC operations */ -static void frv_cpupic_enable(unsigned int irqlevel) -{ - __clr_MASK(irqlevel); -} - -static void frv_cpupic_disable(unsigned int irqlevel) -{ - __set_MASK(irqlevel); -} - static void frv_cpupic_ack(unsigned int irqlevel) { - __set_MASK(irqlevel); __clr_RC(irqlevel); __clr_IRL(); } @@ -138,8 +127,6 @@ static void frv_cpupic_end(unsigned int static struct irq_chip frv_cpu_pic = { .name = "cpu", - .enable = frv_cpupic_enable, - .disable = frv_cpupic_disable, .ack = frv_cpupic_ack, .mask = frv_cpupic_mask, .mask_ack = frv_cpupic_mask_ack, @@ -156,7 +143,7 @@ static struct irq_chip frv_cpu_pic = { asmlinkage void do_IRQ(void) { irq_enter(); - __do_IRQ(__get_IRL(), __frame); + generic_handle_irq(__get_IRL(), __frame); irq_exit(); } _ Patches currently in -mm which might be from dhowells@xxxxxxxxxx are origin.patch git-block.patch git-block-hack.patch git-gfs2.patch git-nfs.patch nfs-replace-null-dentries-that-appear-in-readdirs-list-2.patch mm-tracking-shared-dirty-pages-nommu-fix-2.patch binfmt_elf-consistently-use-loff_t.patch frv-use-the-generic-irq-stuff.patch frv-improve-frvs-use-of-generic-irq-handling.patch frv-permit-__do_irq-to-be-dispensed-with.patch frv-mark-__do_irq-deprecated.patch nommu-check-that-access_process_vm-has-a-valid-target.patch nommu-set-bdi-capabilities-for-dev-mem-and-dev-kmem.patch nommu-set-bdi-capabilities-for-dev-mem-and-dev-kmem-tidy.patch nommu-use-find_vma-rather-than-reimplementing-a-vma-search.patch check-if-start-address-is-in-vma-region-in-nommu-function-get_user_pages.patch nommu-check-vma-protections.patch nommu-permit-ptrace-to-ignore-non-prot_write-vmas-in-nommu-mode.patch nommu-implement-proc-pid-maps-for-nommu.patch nommu-order-the-per-mm_struct-vma-list.patch nommu-make-mremap-partially-work-for-nommu-kernels.patch nommu-add-docs-about-shared-memory.patch nommu-make-futexes-work-under-nommu-conditions.patch nommu-make-futexes-work-under-nommu-conditions-doc.patch nommu-move-the-fallback-arch_vma_name-to-a-sensible-place.patch afs-add-lock-annotations-to-afs_proc_cell_servers_startstop.patch elf_fdpic_core_dump-dont-take-tasklist_lock.patch simplify-update_times-avoid-jiffies-jiffies_64-aliasing-problem-2.patch lib-rwsemc-un-inline-rwsem_down_failed_common.patch kill-wall_jiffies.patch reiserfs-make-sure-all-dentries-refs-are-released-before-calling-kill_block_super-try-2.patch fs-cache-provide-a-filesystem-specific-syncable-page-bit.patch fs-cache-generic-filesystem-caching-facility.patch fs-cache-release-page-private-in-failed-readahead.patch fs-cache-release-page-private-after-failed-readahead-12.patch fs-cache-make-kafs-use-fs-cache.patch fs-cache-make-kafs-use-fs-cache-fix.patch fs-cache-make-kafs-use-fs-cache-12.patch fs-cache-make-kafs-use-fs-cache-12-fix.patch fs-cache-make-kafs-use-fs-cache-vs-streamline-generic_file_-interfaces-and-filemap.patch nfs-use-local-caching.patch nfs-use-local-caching-12.patch nfs-use-local-caching-12-fix.patch fs-cache-cachefiles-ia64-missing-copy_page-export.patch fs-cache-cachefiles-a-cache-that-backs-onto-a-mounted-filesystem.patch fs-cache-cachefiles-a-cache-that-backs-onto-a-mounted-filesystem-cachefiles-printk-format-warning.patch fs-cache-cachefiles-a-cache-that-backs-onto-a-mounted-filesystem-warning-fixes.patch fs-cache-cachefiles-a-cache-that-backs-onto-a-mounted-filesystem-cachefiles-cachefiles_write_page-shouldnt-indicate-error-twice.patch fs-cache-cachefiles-a-cache-that-backs-onto-a-mounted-filesystem-cachefiles-handle-enospc-on-create-mkdir-better.patch fs-cache-cachefiles-a-cache-that-backs-onto-a-mounted-filesystem-inode-count-maintenance.patch autofs-make-sure-all-dentries-refs-are-released-before-calling-kill_anon_super.patch vfs-destroy-the-dentries-contributed-by-a-superblock-on-unmounting.patch generic-ioremap_page_range-implementation-nommu-fix.patch vfs-make-filldir_t-and-struct-kstat-deal-in-64-bit-inode-numbers.patch vfs-make-filldir_t-and-struct-kstat-deal-in-64-bit-inode-numbers-alpha-fix.patch nfs-represent-64-bit-fileids-as-64-bit-inode-numbers-on-32-bit-systems.patch ecryptfs-get_sb_dev-fix.patch ecryptfs-inode-numbering-fixes.patch introduce-kernel_execve.patch rename-the-provided-execve-functions-to-kernel_execve.patch provide-kernel_execve-on-all-architectures.patch provide-kernel_execve-on-all-architectures-fix.patch remove-the-use-of-_syscallx-macros-in-uml.patch sh64-remove-the-use-of-kernel-syscalls.patch remove-remaining-errno-and-__kernel_syscalls__-references.patch reiser4-get_sb_dev-fix.patch mutex-subsystem-synchro-test-module.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html