mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2025-01-16 23:17:02 +07:00
521086412e
Normally different ARM platform has different way to decode the IRQ hardware status and demultiplex to the corresponding IRQ handler. This is highly optimized by macro irq_handler in entry-armv.S, and each machine defines their own macro to decode the IRQ number. However, this prevents multiple machine classes to be built into a single kernel. By allowing each machine to specify thier own handler, and making function pointer 'handle_arch_irq' to point to it at run time, this can be solved. And introduce CONFIG_MULTI_IRQ_HANDLER to allow both solutions to work. Comparing with the highly optimized macro of irq_handler, the new function must be written with care not to lose too much performance. And the IPI stuff on SMP is expected to move to the provided arch IRQ handler as well. The assembly code to invoke handle_arch_irq is optimized by Russell King. Signed-off-by: Eric Miao <eric.miao@canonical.com> Acked-by: Nicolas Pitre <nicolas.pitre@linaro.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
40 lines
905 B
C
40 lines
905 B
C
/*
|
|
* arch/arm/include/asm/mach/irq.h
|
|
*
|
|
* Copyright (C) 1995-2000 Russell King.
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License version 2 as
|
|
* published by the Free Software Foundation.
|
|
*/
|
|
#ifndef __ASM_ARM_MACH_IRQ_H
|
|
#define __ASM_ARM_MACH_IRQ_H
|
|
|
|
#include <linux/irq.h>
|
|
|
|
struct seq_file;
|
|
|
|
/*
|
|
* This is internal. Do not use it.
|
|
*/
|
|
extern unsigned int arch_nr_irqs;
|
|
extern void (*init_arch_irq)(void);
|
|
extern void init_FIQ(void);
|
|
extern int show_fiq_list(struct seq_file *, void *);
|
|
|
|
#ifdef CONFIG_MULTI_IRQ_HANDLER
|
|
extern void (*handle_arch_irq)(struct pt_regs *);
|
|
#endif
|
|
|
|
/*
|
|
* This is for easy migration, but should be changed in the source
|
|
*/
|
|
#define do_bad_IRQ(irq,desc) \
|
|
do { \
|
|
raw_spin_lock(&desc->lock); \
|
|
handle_bad_irq(irq, desc); \
|
|
raw_spin_unlock(&desc->lock); \
|
|
} while(0)
|
|
|
|
#endif
|