mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-28 20:37:27 +00:00
bc89663aa5
The commit a2be01b
(ARM: only include mach/irqs.h for !SPARSE_IRQ)
makes mach/irqs.h only be included for !SPARSE_IRQ build. There are
a nubmer of platforms have FIQ_START defined in mach/irqs.h for FIQ
support.
arch/arm/mach-rpc/include/mach/irqs.h:#define FIQ_START 64
arch/arm/mach-s3c24xx/include/mach/irqs.h:#define FIQ_START IRQ_EINT0
arch/arm/plat-mxc/include/mach/irqs.h:#define FIQ_START 0
If SPARSE_IRQ is enabled for any of these platforms, the following
compile error will be seen.
arch/arm/kernel/fiq.c: In function ‘enable_fiq’:
arch/arm/kernel/fiq.c:127:19: error: ‘FIQ_START’ undeclared (first use in this function)
arch/arm/kernel/fiq.c:127:19: note: each undeclared identifier is reported only once for each function it appears in
arch/arm/kernel/fiq.c: In function ‘disable_fiq’:
arch/arm/kernel/fiq.c:132:20: error: ‘FIQ_START’ undeclared (first use in this function)
The patch changes fiq code to have init_FIQ take FIQ_START from
platforms as a parameter and assign it to variable fiq_start which
is to replace FIQ_START uses in enable_fiq/disable_fiq.
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
Cc: Kukjin Kim <kgene.kim@samsung.com>
Cc: Sascha Hauer <s.hauer@pengutronix.de>
Cc: Rob Herring <rob.herring@calxeda.com>
Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
69 lines
1.5 KiB
C
69 lines
1.5 KiB
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 void init_FIQ(int);
|
|
extern int show_fiq_list(struct seq_file *, int);
|
|
|
|
#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)
|
|
|
|
#ifndef __ASSEMBLY__
|
|
/*
|
|
* Entry/exit functions for chained handlers where the primary IRQ chip
|
|
* may implement either fasteoi or level-trigger flow control.
|
|
*/
|
|
static inline void chained_irq_enter(struct irq_chip *chip,
|
|
struct irq_desc *desc)
|
|
{
|
|
/* FastEOI controllers require no action on entry. */
|
|
if (chip->irq_eoi)
|
|
return;
|
|
|
|
if (chip->irq_mask_ack) {
|
|
chip->irq_mask_ack(&desc->irq_data);
|
|
} else {
|
|
chip->irq_mask(&desc->irq_data);
|
|
if (chip->irq_ack)
|
|
chip->irq_ack(&desc->irq_data);
|
|
}
|
|
}
|
|
|
|
static inline void chained_irq_exit(struct irq_chip *chip,
|
|
struct irq_desc *desc)
|
|
{
|
|
if (chip->irq_eoi)
|
|
chip->irq_eoi(&desc->irq_data);
|
|
else
|
|
chip->irq_unmask(&desc->irq_data);
|
|
}
|
|
#endif
|
|
|
|
#endif
|