Commit e0d20b69 authored by Olof Johansson's avatar Olof Johansson

Merge branch 'gic/cleanup' into next/soc

Merge in the gic cleanup since it has a handful of annoying internal conflicts
with soc development branches. All of them are delete/delete conflicts.

* gic/cleanup:
  irqchip: vic: add include of linux/irq.h
  irqchip: gic: Perform the gic_secondary_init() call via CPU notifier
  irqchip: gic: Call handle_bad_irq() directly
  arm: Move chained_irq_(enter|exit) to a generic file
  arm: Move the set_handle_irq and handle_arch_irq declarations to asm/irq.h
Signed-off-by: default avatarOlof Johansson <olof@lixom.net>

Conflicts:
	arch/arm/mach-shmobile/smp-emev2.c
	arch/arm/mach-shmobile/smp-r8a7779.c
	arch/arm/mach-shmobile/smp-sh73a0.c
	arch/arm/mach-socfpga/platsmp.c
parents 128673b3 bc895b59
...@@ -30,6 +30,11 @@ extern void asm_do_IRQ(unsigned int, struct pt_regs *); ...@@ -30,6 +30,11 @@ extern void asm_do_IRQ(unsigned int, struct pt_regs *);
void handle_IRQ(unsigned int, struct pt_regs *); void handle_IRQ(unsigned int, struct pt_regs *);
void init_IRQ(void); void init_IRQ(void);
#ifdef CONFIG_MULTI_IRQ_HANDLER
extern void (*handle_arch_irq)(struct pt_regs *);
extern void set_handle_irq(void (*handle_irq)(struct pt_regs *));
#endif
#endif #endif
#endif #endif
......
...@@ -20,11 +20,6 @@ struct seq_file; ...@@ -20,11 +20,6 @@ struct seq_file;
extern void init_FIQ(int); extern void init_FIQ(int);
extern int show_fiq_list(struct seq_file *, int); extern int show_fiq_list(struct seq_file *, int);
#ifdef CONFIG_MULTI_IRQ_HANDLER
extern void (*handle_arch_irq)(struct pt_regs *);
extern void set_handle_irq(void (*handle_irq)(struct pt_regs *));
#endif
/* /*
* This is for easy migration, but should be changed in the source * This is for easy migration, but should be changed in the source
*/ */
...@@ -35,35 +30,4 @@ do { \ ...@@ -35,35 +30,4 @@ do { \
raw_spin_unlock(&desc->lock); \ raw_spin_unlock(&desc->lock); \
} while(0) } 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 #endif
...@@ -22,10 +22,9 @@ ...@@ -22,10 +22,9 @@
#include <linux/module.h> #include <linux/module.h>
#include <linux/io.h> #include <linux/io.h>
#include <linux/irqdomain.h> #include <linux/irqdomain.h>
#include <linux/irqchip/chained_irq.h>
#include <linux/of_address.h> #include <linux/of_address.h>
#include <asm/mach/irq.h>
#include <mach/hardware.h> #include <mach/hardware.h>
#include <mach/at91_pio.h> #include <mach/at91_pio.h>
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#include <linux/irqchip.h> #include <linux/irqchip.h>
#include <linux/of_address.h> #include <linux/of_address.h>
#include <linux/irqchip/arm-gic.h> #include <linux/irqchip/arm-gic.h>
#include <linux/irqchip/chained_irq.h>
#include <asm/proc-fns.h> #include <asm/proc-fns.h>
#include <asm/exception.h> #include <asm/exception.h>
......
...@@ -20,7 +20,6 @@ ...@@ -20,7 +20,6 @@
#include <linux/jiffies.h> #include <linux/jiffies.h>
#include <linux/smp.h> #include <linux/smp.h>
#include <linux/io.h> #include <linux/io.h>
#include <linux/irqchip/arm-gic.h>
#include <asm/cacheflush.h> #include <asm/cacheflush.h>
#include <asm/smp_plat.h> #include <asm/smp_plat.h>
...@@ -75,13 +74,6 @@ static DEFINE_SPINLOCK(boot_lock); ...@@ -75,13 +74,6 @@ static DEFINE_SPINLOCK(boot_lock);
static void __cpuinit exynos_secondary_init(unsigned int cpu) static void __cpuinit exynos_secondary_init(unsigned int cpu)
{ {
/*
* if any interrupts are already enabled for the primary
* core (e.g. timer irq), then they will not have been enabled
* for us: do so
*/
gic_secondary_init(0);
/* /*
* let the primary processor know we're out of the * let the primary processor know we're out of the
* pen, then head off into the C entry point * pen, then head off into the C entry point
......
...@@ -17,7 +17,6 @@ ...@@ -17,7 +17,6 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/smp.h> #include <linux/smp.h>
#include <linux/io.h> #include <linux/io.h>
#include <linux/irqchip/arm-gic.h>
#include <asm/smp_scu.h> #include <asm/smp_scu.h>
...@@ -25,11 +24,6 @@ ...@@ -25,11 +24,6 @@
extern void secondary_startup(void); extern void secondary_startup(void);
static void __cpuinit highbank_secondary_init(unsigned int cpu)
{
gic_secondary_init(0);
}
static int __cpuinit highbank_boot_secondary(unsigned int cpu, struct task_struct *idle) static int __cpuinit highbank_boot_secondary(unsigned int cpu, struct task_struct *idle)
{ {
highbank_set_cpu_jump(cpu, secondary_startup); highbank_set_cpu_jump(cpu, secondary_startup);
...@@ -67,7 +61,6 @@ static void __init highbank_smp_prepare_cpus(unsigned int max_cpus) ...@@ -67,7 +61,6 @@ static void __init highbank_smp_prepare_cpus(unsigned int max_cpus)
struct smp_operations highbank_smp_ops __initdata = { struct smp_operations highbank_smp_ops __initdata = {
.smp_init_cpus = highbank_smp_init_cpus, .smp_init_cpus = highbank_smp_init_cpus,
.smp_prepare_cpus = highbank_smp_prepare_cpus, .smp_prepare_cpus = highbank_smp_prepare_cpus,
.smp_secondary_init = highbank_secondary_init,
.smp_boot_secondary = highbank_boot_secondary, .smp_boot_secondary = highbank_boot_secondary,
#ifdef CONFIG_HOTPLUG_CPU #ifdef CONFIG_HOTPLUG_CPU
.cpu_die = highbank_cpu_die, .cpu_die = highbank_cpu_die,
......
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/smp.h> #include <linux/smp.h>
#include <linux/irqchip/arm-gic.h>
#include <asm/page.h> #include <asm/page.h>
#include <asm/smp_scu.h> #include <asm/smp_scu.h>
#include <asm/mach/map.h> #include <asm/mach/map.h>
...@@ -52,16 +51,6 @@ void imx_scu_standby_enable(void) ...@@ -52,16 +51,6 @@ void imx_scu_standby_enable(void)
writel_relaxed(val, scu_base); writel_relaxed(val, scu_base);
} }
static void __cpuinit imx_secondary_init(unsigned int cpu)
{
/*
* if any interrupts are already enabled for the primary
* core (e.g. timer irq), then they will not have been enabled
* for us: do so
*/
gic_secondary_init(0);
}
static int __cpuinit imx_boot_secondary(unsigned int cpu, struct task_struct *idle) static int __cpuinit imx_boot_secondary(unsigned int cpu, struct task_struct *idle)
{ {
imx_set_cpu_jump(cpu, v7_secondary_startup); imx_set_cpu_jump(cpu, v7_secondary_startup);
...@@ -96,7 +85,6 @@ static void __init imx_smp_prepare_cpus(unsigned int max_cpus) ...@@ -96,7 +85,6 @@ static void __init imx_smp_prepare_cpus(unsigned int max_cpus)
struct smp_operations imx_smp_ops __initdata = { struct smp_operations imx_smp_ops __initdata = {
.smp_init_cpus = imx_smp_init_cpus, .smp_init_cpus = imx_smp_init_cpus,
.smp_prepare_cpus = imx_smp_prepare_cpus, .smp_prepare_cpus = imx_smp_prepare_cpus,
.smp_secondary_init = imx_secondary_init,
.smp_boot_secondary = imx_boot_secondary, .smp_boot_secondary = imx_boot_secondary,
#ifdef CONFIG_HOTPLUG_CPU #ifdef CONFIG_HOTPLUG_CPU
.cpu_die = imx_cpu_die, .cpu_die = imx_cpu_die,
......
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
#include <linux/jiffies.h> #include <linux/jiffies.h>
#include <linux/smp.h> #include <linux/smp.h>
#include <linux/io.h> #include <linux/io.h>
#include <linux/irqchip/arm-gic.h>
#include <asm/cacheflush.h> #include <asm/cacheflush.h>
#include <asm/cputype.h> #include <asm/cputype.h>
...@@ -41,13 +40,6 @@ static inline int get_core_count(void) ...@@ -41,13 +40,6 @@ static inline int get_core_count(void)
static void __cpuinit msm_secondary_init(unsigned int cpu) static void __cpuinit msm_secondary_init(unsigned int cpu)
{ {
/*
* if any interrupts are already enabled for the primary
* core (e.g. timer irq), then they will not have been enabled
* for us: do so
*/
gic_secondary_init(0);
/* /*
* let the primary processor know we're out of the * let the primary processor know we're out of the
* pen, then head off into the C entry point * pen, then head off into the C entry point
......
...@@ -66,13 +66,6 @@ static void __cpuinit omap4_secondary_init(unsigned int cpu) ...@@ -66,13 +66,6 @@ static void __cpuinit omap4_secondary_init(unsigned int cpu)
omap_secure_dispatcher(OMAP4_PPA_CPU_ACTRL_SMP_INDEX, omap_secure_dispatcher(OMAP4_PPA_CPU_ACTRL_SMP_INDEX,
4, 0, 0, 0, 0, 0); 4, 0, 0, 0, 0, 0);
/*
* If any interrupts are already enabled for the primary
* core (e.g. timer irq), then they will not have been enabled
* for us: do so
*/
gic_secondary_init(0);
/* /*
* Synchronise with the boot thread. * Synchronise with the boot thread.
*/ */
......
...@@ -11,7 +11,6 @@ ...@@ -11,7 +11,6 @@
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/of.h> #include <linux/of.h>
#include <linux/of_address.h> #include <linux/of_address.h>
#include <linux/irqchip/arm-gic.h>
#include <asm/page.h> #include <asm/page.h>
#include <asm/mach/map.h> #include <asm/mach/map.h>
#include <asm/smp_plat.h> #include <asm/smp_plat.h>
...@@ -48,13 +47,6 @@ void __init sirfsoc_map_scu(void) ...@@ -48,13 +47,6 @@ void __init sirfsoc_map_scu(void)
static void __cpuinit sirfsoc_secondary_init(unsigned int cpu) static void __cpuinit sirfsoc_secondary_init(unsigned int cpu)
{ {
/*
* if any interrupts are already enabled for the primary
* core (e.g. timer irq), then they will not have been enabled
* for us: do so
*/
gic_secondary_init(0);
/* /*
* let the primary processor know we're out of the * let the primary processor know we're out of the
* pen, then head off into the C entry point * pen, then head off into the C entry point
......
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
#include <linux/ioport.h> #include <linux/ioport.h>
#include <linux/device.h> #include <linux/device.h>
#include <linux/irqdomain.h> #include <linux/irqdomain.h>
#include <linux/irqchip/chained_irq.h>
#include <asm/mach/irq.h> #include <asm/mach/irq.h>
......
...@@ -23,7 +23,6 @@ ...@@ -23,7 +23,6 @@
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <linux/io.h> #include <linux/io.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/irqchip/arm-gic.h>
#include <mach/common.h> #include <mach/common.h>
#include <mach/emev2.h> #include <mach/emev2.h>
#include <asm/smp_plat.h> #include <asm/smp_plat.h>
...@@ -31,11 +30,6 @@ ...@@ -31,11 +30,6 @@
#define EMEV2_SCU_BASE 0x1e000000 #define EMEV2_SCU_BASE 0x1e000000
static void __cpuinit emev2_secondary_init(unsigned int cpu)
{
gic_secondary_init(0);
}
static int __cpuinit emev2_boot_secondary(unsigned int cpu, struct task_struct *idle) static int __cpuinit emev2_boot_secondary(unsigned int cpu, struct task_struct *idle)
{ {
arch_send_wakeup_ipi_mask(cpumask_of(cpu_logical_map(cpu))); arch_send_wakeup_ipi_mask(cpumask_of(cpu_logical_map(cpu)));
...@@ -69,6 +63,5 @@ static void __init emev2_smp_init_cpus(void) ...@@ -69,6 +63,5 @@ static void __init emev2_smp_init_cpus(void)
struct smp_operations emev2_smp_ops __initdata = { struct smp_operations emev2_smp_ops __initdata = {
.smp_init_cpus = emev2_smp_init_cpus, .smp_init_cpus = emev2_smp_init_cpus,
.smp_prepare_cpus = emev2_smp_prepare_cpus, .smp_prepare_cpus = emev2_smp_prepare_cpus,
.smp_secondary_init = emev2_secondary_init,
.smp_boot_secondary = emev2_boot_secondary, .smp_boot_secondary = emev2_boot_secondary,
}; };
...@@ -23,7 +23,6 @@ ...@@ -23,7 +23,6 @@
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <linux/io.h> #include <linux/io.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/irqchip/arm-gic.h>
#include <mach/common.h> #include <mach/common.h>
#include <mach/r8a7779.h> #include <mach/r8a7779.h>
#include <asm/cacheflush.h> #include <asm/cacheflush.h>
...@@ -82,11 +81,6 @@ static int r8a7779_platform_cpu_kill(unsigned int cpu) ...@@ -82,11 +81,6 @@ static int r8a7779_platform_cpu_kill(unsigned int cpu)
return ret ? ret : 1; return ret ? ret : 1;
} }
static void __cpuinit r8a7779_secondary_init(unsigned int cpu)
{
gic_secondary_init(0);
}
static int __cpuinit r8a7779_boot_secondary(unsigned int cpu, struct task_struct *idle) static int __cpuinit r8a7779_boot_secondary(unsigned int cpu, struct task_struct *idle)
{ {
struct r8a7779_pm_ch *ch = NULL; struct r8a7779_pm_ch *ch = NULL;
...@@ -181,7 +175,6 @@ static int r8a7779_cpu_disable(unsigned int cpu) ...@@ -181,7 +175,6 @@ static int r8a7779_cpu_disable(unsigned int cpu)
struct smp_operations r8a7779_smp_ops __initdata = { struct smp_operations r8a7779_smp_ops __initdata = {
.smp_init_cpus = r8a7779_smp_init_cpus, .smp_init_cpus = r8a7779_smp_init_cpus,
.smp_prepare_cpus = r8a7779_smp_prepare_cpus, .smp_prepare_cpus = r8a7779_smp_prepare_cpus,
.smp_secondary_init = r8a7779_secondary_init,
.smp_boot_secondary = r8a7779_boot_secondary, .smp_boot_secondary = r8a7779_boot_secondary,
#ifdef CONFIG_HOTPLUG_CPU #ifdef CONFIG_HOTPLUG_CPU
.cpu_kill = r8a7779_cpu_kill, .cpu_kill = r8a7779_cpu_kill,
......
...@@ -23,7 +23,6 @@ ...@@ -23,7 +23,6 @@
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <linux/io.h> #include <linux/io.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/irqchip/arm-gic.h>
#include <mach/common.h> #include <mach/common.h>
#include <asm/cacheflush.h> #include <asm/cacheflush.h>
#include <asm/smp_plat.h> #include <asm/smp_plat.h>
...@@ -49,11 +48,6 @@ void __init sh73a0_register_twd(void) ...@@ -49,11 +48,6 @@ void __init sh73a0_register_twd(void)
} }
#endif #endif
static void __cpuinit sh73a0_secondary_init(unsigned int cpu)
{
gic_secondary_init(0);
}
static int __cpuinit sh73a0_boot_secondary(unsigned int cpu, struct task_struct *idle) static int __cpuinit sh73a0_boot_secondary(unsigned int cpu, struct task_struct *idle)
{ {
cpu = cpu_logical_map(cpu); cpu = cpu_logical_map(cpu);
...@@ -134,7 +128,6 @@ static int sh73a0_cpu_disable(unsigned int cpu) ...@@ -134,7 +128,6 @@ static int sh73a0_cpu_disable(unsigned int cpu)
struct smp_operations sh73a0_smp_ops __initdata = { struct smp_operations sh73a0_smp_ops __initdata = {
.smp_init_cpus = sh73a0_smp_init_cpus, .smp_init_cpus = sh73a0_smp_init_cpus,
.smp_prepare_cpus = sh73a0_smp_prepare_cpus, .smp_prepare_cpus = sh73a0_smp_prepare_cpus,
.smp_secondary_init = sh73a0_secondary_init,
.smp_boot_secondary = sh73a0_boot_secondary, .smp_boot_secondary = sh73a0_boot_secondary,
#ifdef CONFIG_HOTPLUG_CPU #ifdef CONFIG_HOTPLUG_CPU
.cpu_kill = sh73a0_cpu_kill, .cpu_kill = sh73a0_cpu_kill,
......
...@@ -22,7 +22,6 @@ ...@@ -22,7 +22,6 @@
#include <linux/io.h> #include <linux/io.h>
#include <linux/of.h> #include <linux/of.h>
#include <linux/of_address.h> #include <linux/of_address.h>
#include <linux/irqchip/arm-gic.h>
#include <asm/cacheflush.h> #include <asm/cacheflush.h>
#include <asm/smp_scu.h> #include <asm/smp_scu.h>
...@@ -30,16 +29,6 @@ ...@@ -30,16 +29,6 @@
#include "core.h" #include "core.h"
static void __cpuinit socfpga_secondary_init(unsigned int cpu)
{
/*
* if any interrupts are already enabled for the primary
* core (e.g. timer irq), then they will not have been enabled
* for us: do so
*/
gic_secondary_init(0);
}
static int __cpuinit socfpga_boot_secondary(unsigned int cpu, struct task_struct *idle) static int __cpuinit socfpga_boot_secondary(unsigned int cpu, struct task_struct *idle)
{ {
int trampoline_size = &secondary_trampoline_end - &secondary_trampoline; int trampoline_size = &secondary_trampoline_end - &secondary_trampoline;
...@@ -106,7 +95,6 @@ static void socfpga_cpu_die(unsigned int cpu) ...@@ -106,7 +95,6 @@ static void socfpga_cpu_die(unsigned int cpu)
struct smp_operations socfpga_smp_ops __initdata = { struct smp_operations socfpga_smp_ops __initdata = {
.smp_init_cpus = socfpga_smp_init_cpus, .smp_init_cpus = socfpga_smp_init_cpus,
.smp_prepare_cpus = socfpga_smp_prepare_cpus, .smp_prepare_cpus = socfpga_smp_prepare_cpus,
.smp_secondary_init = socfpga_secondary_init,
.smp_boot_secondary = socfpga_boot_secondary, .smp_boot_secondary = socfpga_boot_secondary,
#ifdef CONFIG_HOTPLUG_CPU #ifdef CONFIG_HOTPLUG_CPU
.cpu_die = socfpga_cpu_die, .cpu_die = socfpga_cpu_die,
......
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
#include <linux/jiffies.h> #include <linux/jiffies.h>
#include <linux/io.h> #include <linux/io.h>
#include <linux/smp.h> #include <linux/smp.h>
#include <linux/irqchip/arm-gic.h>
#include <asm/cacheflush.h> #include <asm/cacheflush.h>
#include <asm/smp_scu.h> #include <asm/smp_scu.h>
#include <mach/spear.h> #include <mach/spear.h>
...@@ -27,13 +26,6 @@ static void __iomem *scu_base = IOMEM(VA_SCU_BASE); ...@@ -27,13 +26,6 @@ static void __iomem *scu_base = IOMEM(VA_SCU_BASE);
static void __cpuinit spear13xx_secondary_init(unsigned int cpu) static void __cpuinit spear13xx_secondary_init(unsigned int cpu)
{ {
/*
* if any interrupts are already enabled for the primary
* core (e.g. timer irq), then they will not have been enabled
* for us: do so
*/
gic_secondary_init(0);
/* /*
* let the primary processor know we're out of the * let the primary processor know we're out of the
* pen, then head off into the C entry point * pen, then head off into the C entry point
......
...@@ -18,7 +18,6 @@ ...@@ -18,7 +18,6 @@
#include <linux/jiffies.h> #include <linux/jiffies.h>
#include <linux/smp.h> #include <linux/smp.h>
#include <linux/io.h> #include <linux/io.h>
#include <linux/irqchip/arm-gic.h>
#include <linux/clk/tegra.h> #include <linux/clk/tegra.h>
#include <asm/cacheflush.h> #include <asm/cacheflush.h>
...@@ -38,13 +37,6 @@ static cpumask_t tegra_cpu_init_mask; ...@@ -38,13 +37,6 @@ static cpumask_t tegra_cpu_init_mask;
static void __cpuinit tegra_secondary_init(unsigned int cpu) static void __cpuinit tegra_secondary_init(unsigned int cpu)
{ {
/*
* if any interrupts are already enabled for the primary
* core (e.g. timer irq), then they will not have been enabled
* for us: do so
*/
gic_secondary_init(0);
cpumask_set_cpu(cpu, &tegra_cpu_init_mask); cpumask_set_cpu(cpu, &tegra_cpu_init_mask);
} }
......
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
#include <linux/device.h> #include <linux/device.h>
#include <linux/smp.h> #include <linux/smp.h>
#include <linux/io.h> #include <linux/io.h>
#include <linux/irqchip/arm-gic.h>
#include <asm/cacheflush.h> #include <asm/cacheflush.h>
#include <asm/smp_plat.h> #include <asm/smp_plat.h>
...@@ -57,13 +56,6 @@ static DEFINE_SPINLOCK(boot_lock); ...@@ -57,13 +56,6 @@ static DEFINE_SPINLOCK(boot_lock);
static void __cpuinit ux500_secondary_init(unsigned int cpu) static void __cpuinit ux500_secondary_init(unsigned int cpu)
{ {
/*
* if any interrupts are already enabled for the primary
* core (e.g. timer irq), then they will not have been enabled
* for us: do so
*/
gic_secondary_init(0);
/* /*
* let the primary processor know we're out of the * let the primary processor know we're out of the
* pen, then head off into the C entry point * pen, then head off into the C entry point
......
...@@ -21,8 +21,6 @@ ...@@ -21,8 +21,6 @@
#include <linux/smp.h> #include <linux/smp.h>
#include <linux/of.h> #include <linux/of.h>
#include <linux/irqchip/arm-gic.h>
#include <asm/psci.h> #include <asm/psci.h>
#include <asm/smp_plat.h> #include <asm/smp_plat.h>
...@@ -45,14 +43,8 @@ static int __cpuinit virt_boot_secondary(unsigned int cpu, ...@@ -45,14 +43,8 @@ static int __cpuinit virt_boot_secondary(unsigned int cpu,
return -ENODEV; return -ENODEV;
} }
static void __cpuinit virt_secondary_init(unsigned int cpu)
{
gic_secondary_init(0);
}
struct smp_operations __initdata virt_smp_ops = { struct smp_operations __initdata virt_smp_ops = {
.smp_init_cpus = virt_smp_init_cpus, .smp_init_cpus = virt_smp_init_cpus,
.smp_prepare_cpus = virt_smp_prepare_cpus, .smp_prepare_cpus = virt_smp_prepare_cpus,
.smp_secondary_init = virt_secondary_init,
.smp_boot_secondary = virt_boot_secondary, .smp_boot_secondary = virt_boot_secondary,
}; };
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/irq.h> #include <linux/irq.h>
#include <linux/irqchip/chained_irq.h>
#include <linux/io.h> #include <linux/io.h>
#include <mach/map.h> #include <mach/map.h>
...@@ -23,8 +24,6 @@ ...@@ -23,8 +24,6 @@
#include <plat/irq-vic-timer.h> #include <plat/irq-vic-timer.h>
#include <plat/regs-timer.h> #include <plat/regs-timer.h>
#include <asm/mach/irq.h>
static void s3c_irq_demux_vic_timer(unsigned int irq, struct irq_desc *desc) static void s3c_irq_demux_vic_timer(unsigned int irq, struct irq_desc *desc)
{ {
struct irq_chip *chip = irq_get_chip(irq); struct irq_chip *chip = irq_get_chip(irq);
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/irq.h> #include <linux/irq.h>
#include <linux/irqchip/chained_irq.h>
#include <linux/io.h> #include <linux/io.h>
#include <linux/gpio.h> #include <linux/gpio.h>
#include <linux/slab.h> #include <linux/slab.h>
...@@ -22,8 +23,6 @@ ...@@ -22,8 +23,6 @@
#include <plat/gpio-core.h> #include <plat/gpio-core.h>
#include <plat/gpio-cfg.h> #include <plat/gpio-cfg.h>
#include <asm/mach/irq.h>
#define GPIO_BASE(chip) ((void __iomem *)((unsigned long)((chip)->base) & 0xFFFFF000u)) #define GPIO_BASE(chip) ((void __iomem *)((unsigned long)((chip)->base) & 0xFFFFF000u))
#define CON_OFFSET 0x700 #define CON_OFFSET 0x700
......
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
#include <linux/device.h> #include <linux/device.h>
#include <linux/jiffies.h> #include <linux/jiffies.h>
#include <linux/smp.h> #include <linux/smp.h>
#include <linux/irqchip/arm-gic.h>
#include <asm/cacheflush.h> #include <asm/cacheflush.h>
#include <asm/smp_plat.h> #include <asm/smp_plat.h>
...@@ -36,13 +35,6 @@ static DEFINE_SPINLOCK(boot_lock); ...@@ -36,13 +35,6 @@ static DEFINE_SPINLOCK(boot_lock);
void __cpuinit versatile_secondary_init(unsigned int cpu) void __cpuinit versatile_secondary_init(unsigned int cpu)
{ {
/*
* if any interrupts are already enabled for the primary
* core (e.g. timer irq), then they will not have been enabled
* for us: do so
*/
gic_secondary_init(0);
/* /*
* let the primary processor know we're out of the * let the primary processor know we're out of the
* pen, then head off into the C entry point * pen, then head off into the C entry point
......
...@@ -23,13 +23,12 @@ ...@@ -23,13 +23,12 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/io.h> #include <linux/io.h>
#include <linux/irqchip/chained_irq.h>
#include <linux/irq.h> #include <linux/irq.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <asm/mach/irq.h>
#include <mach/msm_gpiomux.h> #include <mach/msm_gpiomux.h>
#include <mach/msm_iomap.h> #include <mach/msm_iomap.h>
......
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
#include <linux/io.h> #include <linux/io.h>
#include <linux/irq.h> #include <linux/irq.h>
#include <linux/irqdomain.h> #include <linux/irqdomain.h>
#include <linux/irqchip/chained_irq.h>
#include <linux/gpio.h> #include <linux/gpio.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/slab.h> #include <linux/slab.h>
...@@ -32,7 +33,6 @@ ...@@ -32,7 +33,6 @@
#include <linux/of_device.h> #include <linux/of_device.h>
#include <linux/module.h> #include <linux/module.h>
#include <asm-generic/bug.h> #include <asm-generic/bug.h>
#include <asm/mach/irq.h>
enum mxc_gpio_hwtype { enum mxc_gpio_hwtype {
IMX1_GPIO, /* runs on i.mx1 */ IMX1_GPIO, /* runs on i.mx1 */
......
...@@ -25,11 +25,10 @@ ...@@ -25,11 +25,10 @@
#include <linux/of.h> #include <linux/of.h>
#include <linux/of_device.h> #include <linux/of_device.h>
#include <linux/irqdomain.h> #include <linux/irqdomain.h>
#include <linux/irqchip/chained_irq.h>
#include <linux/gpio.h> #include <linux/gpio.h>
#include <linux/platform_data/gpio-omap.h> #include <linux/platform_data/gpio-omap.h>
#include <asm/mach/irq.h>
#define OFF_MODE 1 #define OFF_MODE 1
static LIST_HEAD(omap_gpio_list); static LIST_HEAD(omap_gpio_list);
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
#include <linux/io.h> #include <linux/io.h>
#include <linux/ioport.h> #include <linux/ioport.h>
#include <linux/irq.h> #include <linux/irq.h>
#include <linux/irqchip/chained_irq.h>
#include <linux/bitops.h> #include <linux/bitops.h>
#include <linux/workqueue.h> #include <linux/workqueue.h>
#include <linux/gpio.h> #include <linux/gpio.h>
...@@ -23,7 +24,6 @@ ...@@ -23,7 +24,6 @@
#include <linux/amba/pl061.h> #include <linux/amba/pl061.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/pm.h> #include <linux/pm.h>
#include <asm/mach/irq.h>
#define GPIODIR 0x400 #define GPIODIR 0x400
#define GPIOIS 0x404 #define GPIOIS 0x404
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/irq.h> #include <linux/irq.h>
#include <linux/irqdomain.h> #include <linux/irqdomain.h>
#include <linux/irqchip/chained_irq.h>
#include <linux/io.h> #include <linux/io.h>
#include <linux/of.h> #include <linux/of.h>
#include <linux/of_device.h> #include <linux/of_device.h>
...@@ -26,8 +27,6 @@ ...@@ -26,8 +27,6 @@
#include <linux/syscore_ops.h> #include <linux/syscore_ops.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <asm/mach/irq.h>
#include <mach/irqs.h> #include <mach/irqs.h>
/* /*
......
...@@ -27,11 +27,10 @@ ...@@ -27,11 +27,10 @@
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/irqdomain.h> #include <linux/irqdomain.h>
#include <linux/irqchip/chained_irq.h>
#include <linux/pinctrl/consumer.h> #include <linux/pinctrl/consumer.h>
#include <linux/pm.h> #include <linux/pm.h>
#include <asm/mach/irq.h>
#define GPIO_BANK(x) ((x) >> 5) #define GPIO_BANK(x) ((x) >> 5)
#define GPIO_PORT(x) (((x) >> 3) & 0x3) #define GPIO_PORT(x) (((x) >> 3) & 0x3)
#define GPIO_BIT(x) ((x) & 0x7) #define GPIO_BIT(x) ((x) & 0x7)
......
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/io.h> #include <linux/io.h>
#include <linux/irqdomain.h> #include <linux/irqdomain.h>
#include <linux/irqchip/chained_irq.h>
#include <linux/of_address.h> #include <linux/of_address.h>
#include <linux/of_irq.h> #include <linux/of_irq.h>
#include <asm/mach/irq.h> #include <asm/mach/irq.h>
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
#include <linux/module.h> #include <linux/module.h>
#include <linux/list.h> #include <linux/list.h>
#include <linux/smp.h> #include <linux/smp.h>
#include <linux/cpu.h>
#include <linux/cpu_pm.h> #include <linux/cpu_pm.h>
#include <linux/cpumask.h> #include <linux/cpumask.h>
#include <linux/io.h> #include <linux/io.h>
...@@ -38,12 +39,12 @@ ...@@ -38,12 +39,12 @@
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/percpu.h> #include <linux/percpu.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/irqchip/chained_irq.h>
#include <linux/irqchip/arm-gic.h> #include <linux/irqchip/arm-gic.h>
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/exception.h> #include <asm/exception.h>
#include <asm/smp_plat.h> #include <asm/smp_plat.h>
#include <asm/mach/irq.h>
#include "irqchip.h" #include "irqchip.h"
...@@ -323,7 +324,7 @@ static void gic_handle_cascade_irq(unsigned int irq, struct irq_desc *desc) ...@@ -323,7 +324,7 @@ static void gic_handle_cascade_irq(unsigned int irq, struct irq_desc *desc)
cascade_irq = irq_find_mapping(chip_data->domain, gic_irq); cascade_irq = irq_find_mapping(chip_data->domain, gic_irq);
if (unlikely(gic_irq < 32 || gic_irq > 1020)) if (unlikely(gic_irq < 32 || gic_irq > 1020))
do_bad_IRQ(cascade_irq, desc); handle_bad_irq(cascade_irq, desc);
else else
generic_handle_irq(cascade_irq); generic_handle_irq(cascade_irq);
...@@ -699,6 +700,25 @@ static int gic_irq_domain_xlate(struct irq_domain *d, ...@@ -699,6 +700,25 @@ static int gic_irq_domain_xlate(struct irq_domain *d,
return 0; return 0;
} }
#ifdef CONFIG_SMP
static int __cpuinit gic_secondary_init(struct notifier_block *nfb,
unsigned long action, void *hcpu)
{
if (action == CPU_STARTING)
gic_cpu_init(&gic_data[0]);
return NOTIFY_OK;
}
/*
* Notifier for enabling the GIC CPU interface. Set an arbitrarily high
* priority because the GIC needs to be up before the ARM generic timers.
*/
static struct notifier_block __cpuinitdata gic_cpu_notifier = {
.notifier_call = gic_secondary_init,
.priority = 100,
};
#endif
const struct irq_domain_ops gic_irq_domain_ops = { const struct irq_domain_ops gic_irq_domain_ops = {
.map = gic_irq_domain_map, .map = gic_irq_domain_map,
.xlate = gic_irq_domain_xlate, .xlate = gic_irq_domain_xlate,
...@@ -789,6 +809,7 @@ void __init gic_init_bases(unsigned int gic_nr, int irq_start, ...@@ -789,6 +809,7 @@ void __init gic_init_bases(unsigned int gic_nr, int irq_start,
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
set_smp_cross_call(gic_raise_softirq); set_smp_cross_call(gic_raise_softirq);
register_cpu_notifier(&gic_cpu_notifier);
#endif #endif
set_handle_irq(gic_handle_irq); set_handle_irq(gic_handle_irq);
...@@ -799,13 +820,6 @@ void __init gic_init_bases(unsigned int gic_nr, int irq_start, ...@@ -799,13 +820,6 @@ void __init gic_init_bases(unsigned int gic_nr, int irq_start,
gic_pm_init(gic); gic_pm_init(gic);
} }
void __cpuinit gic_secondary_init(unsigned int gic_nr)
{
BUG_ON(gic_nr >= MAX_GIC_NR);
gic_cpu_init(&gic_data[gic_nr]);
}
#ifdef CONFIG_OF #ifdef CONFIG_OF
static int gic_cnt __initdata = 0; static int gic_cnt __initdata = 0;
......
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
#include <linux/init.h> #include <linux/init.h>
#include <linux/list.h> #include <linux/list.h>
#include <linux/io.h> #include <linux/io.h>
#include <linux/irq.h>
#include <linux/irqdomain.h> #include <linux/irqdomain.h>
#include <linux/of.h> #include <linux/of.h>
#include <linux/of_address.h> #include <linux/of_address.h>
...@@ -33,7 +34,7 @@ ...@@ -33,7 +34,7 @@
#include <linux/irqchip/arm-vic.h> #include <linux/irqchip/arm-vic.h>
#include <asm/exception.h> #include <asm/exception.h>
#include <asm/mach/irq.h> #include <asm/irq.h>
#include "irqchip.h" #include "irqchip.h"
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/irq.h> #include <linux/irq.h>
#include <linux/irqdomain.h> #include <linux/irqdomain.h>
#include <linux/irqchip/chained_irq.h>
#include <linux/io.h> #include <linux/io.h>
#include <linux/gpio.h> #include <linux/gpio.h>
#include <linux/pinctrl/machine.h> #include <linux/pinctrl/machine.h>
...@@ -27,8 +28,6 @@ ...@@ -27,8 +28,6 @@
/* Since we request GPIOs from ourself */ /* Since we request GPIOs from ourself */
#include <linux/pinctrl/consumer.h> #include <linux/pinctrl/consumer.h>
#include <asm/mach/irq.h>
#include <mach/hardware.h> #include <mach/hardware.h>
#include <mach/at91_pio.h> #include <mach/at91_pio.h>
......
...@@ -23,13 +23,12 @@ ...@@ -23,13 +23,12 @@
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/irqdomain.h> #include <linux/irqdomain.h>
#include <linux/irq.h> #include <linux/irq.h>
#include <linux/irqchip/chained_irq.h>
#include <linux/of_irq.h> #include <linux/of_irq.h>
#include <linux/io.h> #include <linux/io.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/err.h> #include <linux/err.h>
#include <asm/mach/irq.h>
#include "pinctrl-samsung.h" #include "pinctrl-samsung.h"
#include "pinctrl-exynos.h" #include "pinctrl-exynos.h"
......
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/irq.h> #include <linux/irq.h>
#include <linux/irqdomain.h> #include <linux/irqdomain.h>
#include <linux/irqchip/chained_irq.h>
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/of_device.h> #include <linux/of_device.h>
#include <linux/of_address.h> #include <linux/of_address.h>
...@@ -33,7 +34,6 @@ ...@@ -33,7 +34,6 @@
/* Since we request GPIOs from ourself */ /* Since we request GPIOs from ourself */
#include <linux/pinctrl/consumer.h> #include <linux/pinctrl/consumer.h>
#include <linux/platform_data/pinctrl-nomadik.h> #include <linux/platform_data/pinctrl-nomadik.h>
#include <asm/mach/irq.h>
#include "pinctrl-nomadik.h" #include "pinctrl-nomadik.h"
#include "core.h" #include "core.h"
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
#include <linux/slab.h> #include <linux/slab.h>
#include <linux/err.h> #include <linux/err.h>
#include <linux/irqdomain.h> #include <linux/irqdomain.h>
#include <linux/irqchip/chained_irq.h>
#include <linux/pinctrl/pinctrl.h> #include <linux/pinctrl/pinctrl.h>
#include <linux/pinctrl/pinmux.h> #include <linux/pinctrl/pinmux.h>
#include <linux/pinctrl/consumer.h> #include <linux/pinctrl/consumer.h>
...@@ -25,7 +26,6 @@ ...@@ -25,7 +26,6 @@
#include <linux/bitops.h> #include <linux/bitops.h>
#include <linux/gpio.h> #include <linux/gpio.h>
#include <linux/of_gpio.h> #include <linux/of_gpio.h>
#include <asm/mach/irq.h>
#define DRIVER_NAME "pinmux-sirf" #define DRIVER_NAME "pinmux-sirf"
......
...@@ -15,12 +15,12 @@ ...@@ -15,12 +15,12 @@
#include <linux/io.h> #include <linux/io.h>
#include <linux/irq.h> #include <linux/irq.h>
#include <linux/irqdomain.h> #include <linux/irqdomain.h>
#include <linux/irqchip/chained_irq.h>
#include <linux/module.h> #include <linux/module.h>
#include <linux/pinctrl/consumer.h> #include <linux/pinctrl/consumer.h>
#include <linux/platform_device.h> #include <linux/platform_device.h>
#include <linux/pm.h> #include <linux/pm.h>
#include <linux/spinlock.h> #include <linux/spinlock.h>
#include <asm/mach/irq.h>
#define MAX_GPIO_PER_REG 32 #define MAX_GPIO_PER_REG 32
#define PIN_OFFSET(pin) (pin % MAX_GPIO_PER_REG) #define PIN_OFFSET(pin) (pin % MAX_GPIO_PER_REG)
......
...@@ -25,8 +25,8 @@ ...@@ -25,8 +25,8 @@
#include <linux/clk.h> #include <linux/clk.h>
#include <linux/list.h> #include <linux/list.h>
#include <linux/irq.h> #include <linux/irq.h>
#include <linux/irqchip/chained_irq.h>
#include <linux/of_device.h> #include <linux/of_device.h>
#include <asm/mach/irq.h>
#include "imx-ipu-v3.h" #include "imx-ipu-v3.h"
#include "ipu-prv.h" #include "ipu-prv.h"
......
...@@ -65,7 +65,6 @@ extern struct irq_chip gic_arch_extn; ...@@ -65,7 +65,6 @@ extern struct irq_chip gic_arch_extn;
void gic_init_bases(unsigned int, int, void __iomem *, void __iomem *, void gic_init_bases(unsigned int, int, void __iomem *, void __iomem *,
u32 offset, struct device_node *); u32 offset, struct device_node *);
void gic_secondary_init(unsigned int);
void gic_cascade_irq(unsigned int gic_nr, unsigned int irq); void gic_cascade_irq(unsigned int gic_nr, unsigned int irq);
static inline void gic_init(unsigned int nr, int start, static inline void gic_init(unsigned int nr, int start,
......
/*
* Chained IRQ handlers support.
*
* Copyright (C) 2011 ARM Ltd.
*
* 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.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __IRQCHIP_CHAINED_IRQ_H
#define __IRQCHIP_CHAINED_IRQ_H
#include <linux/irq.h>
/*
* 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 /* __IRQCHIP_CHAINED_IRQ_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment