irqchip mvebu changes for v3.16
- orion - reverse irq handling priority - armada-370-xp - do set_smp_cross_call in the driver - use cpu notifier to init secondary cpus -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAABAgAGBQJTa5hSAAoJEP45WPkGe8Zn8IAQALb1ktWK8A6APbIVDqzPyo0L SldCdhoBO/ZLyedAljXuuwCSqJSZXDWiCBltNmVBMZXYIJkNgUeH/RccLDl6DiWJ XPGk91m/v5V2SFBuVm4tcVhz3ADMmWyBYv2HZX/qxzohRrxIJ1ITVqY02xjw52GL wLYFkkJG7jA/Hm0Yb9w+XqQVBfK/8iOL4lclz9eGURBMo5afuRK69haJkn7AyPgU ttluRuND1rJmh9jLGOh6QwWuyhkFOHx8L7tc5oELYyc3jSYnKOmChX5iyH8+4cUW OXWHA+hoGvSaUgObUt587I2IQr3A/Q1qZdGZlzT7XSP/JS+UCULdET51/LSMYJRp 6ez+OlnR+qfmuqbZeW32SxNHLAFDLrJS6EuHCNgTna5wH6hii6uZAW6UE2VcjLHS 7JtB3jHYdPp4eh0hIDajUnPDFzNXekkFbDv5C2LNmqnAk6m8cGSJOvuFGQtH2iUw YI7wDzxHRbtUhiiQLEg8Cfywep1kDieSG+omlzuM03fHJVUBQH9RT6xaRyCd1q/+ UdHQEIIqcyZGcWQxSHr2lz3kz67gZ9SjUPs+qwdix4EyHLGPw0qURctV23b6tOmr wxfIsK16sFMI+kuCZIn5Rz/Ecm8IYU3ITo1oSnX2H6dG9smcMGsYqM20WwsdoBJa DXsx11578bVsLLUe+1bG =ctIZ -----END PGP SIGNATURE----- Merge tag 'irqchip-mvebu-3.16' of git://git.infradead.org/linux-mvebu into irq/core irqchip mvebu changes for v3.16 from Jason Cooper: * orion: reverse irq handling priority * armada-370-xp: do set_smp_cross_call in the driver * armada-370-xp use cpu notifier to init secondary cpus Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
This commit is contained in:
Коммит
9faa8321e8
|
@ -20,8 +20,6 @@
|
|||
|
||||
#define ARMADA_XP_MAX_CPUS 4
|
||||
|
||||
void armada_mpic_send_doorbell(const struct cpumask *mask, unsigned int irq);
|
||||
void armada_xp_mpic_smp_cpu_init(void);
|
||||
void armada_xp_secondary_startup(void);
|
||||
extern struct smp_operations armada_xp_smp_ops;
|
||||
#endif
|
||||
|
|
|
@ -70,11 +70,6 @@ static void __init set_secondary_cpus_clock(void)
|
|||
}
|
||||
}
|
||||
|
||||
static void armada_xp_secondary_init(unsigned int cpu)
|
||||
{
|
||||
armada_xp_mpic_smp_cpu_init();
|
||||
}
|
||||
|
||||
static int armada_xp_boot_secondary(unsigned int cpu, struct task_struct *idle)
|
||||
{
|
||||
pr_info("Booting CPU %d\n", cpu);
|
||||
|
@ -90,8 +85,6 @@ static void __init armada_xp_smp_init_cpus(void)
|
|||
|
||||
if (ncores == 0 || ncores > ARMADA_XP_MAX_CPUS)
|
||||
panic("Invalid number of CPUs in DT\n");
|
||||
|
||||
set_smp_cross_call(armada_mpic_send_doorbell);
|
||||
}
|
||||
|
||||
static void __init armada_xp_smp_prepare_cpus(unsigned int max_cpus)
|
||||
|
@ -124,7 +117,6 @@ static void __init armada_xp_smp_prepare_cpus(unsigned int max_cpus)
|
|||
struct smp_operations armada_xp_smp_ops __initdata = {
|
||||
.smp_init_cpus = armada_xp_smp_init_cpus,
|
||||
.smp_prepare_cpus = armada_xp_smp_prepare_cpus,
|
||||
.smp_secondary_init = armada_xp_secondary_init,
|
||||
.smp_boot_secondary = armada_xp_boot_secondary,
|
||||
#ifdef CONFIG_HOTPLUG_CPU
|
||||
.cpu_die = armada_xp_cpu_die,
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
#include <linux/irq.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/irqchip/chained_irq.h>
|
||||
#include <linux/cpu.h>
|
||||
#include <linux/io.h>
|
||||
#include <linux/of_address.h>
|
||||
#include <linux/of_irq.h>
|
||||
|
@ -310,7 +311,8 @@ static int armada_370_xp_mpic_irq_map(struct irq_domain *h,
|
|||
}
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
void armada_mpic_send_doorbell(const struct cpumask *mask, unsigned int irq)
|
||||
static void armada_mpic_send_doorbell(const struct cpumask *mask,
|
||||
unsigned int irq)
|
||||
{
|
||||
int cpu;
|
||||
unsigned long map = 0;
|
||||
|
@ -330,7 +332,7 @@ void armada_mpic_send_doorbell(const struct cpumask *mask, unsigned int irq)
|
|||
ARMADA_370_XP_SW_TRIG_INT_OFFS);
|
||||
}
|
||||
|
||||
void armada_xp_mpic_smp_cpu_init(void)
|
||||
static void armada_xp_mpic_smp_cpu_init(void)
|
||||
{
|
||||
/* Clear pending IPIs */
|
||||
writel(0, per_cpu_int_base + ARMADA_370_XP_IN_DRBEL_CAUSE_OFFS);
|
||||
|
@ -342,6 +344,20 @@ void armada_xp_mpic_smp_cpu_init(void)
|
|||
/* Unmask IPI interrupt */
|
||||
writel(0, per_cpu_int_base + ARMADA_370_XP_INT_CLEAR_MASK_OFFS);
|
||||
}
|
||||
|
||||
static int armada_xp_mpic_secondary_init(struct notifier_block *nfb,
|
||||
unsigned long action, void *hcpu)
|
||||
{
|
||||
if (action == CPU_STARTING || action == CPU_STARTING_FROZEN)
|
||||
armada_xp_mpic_smp_cpu_init();
|
||||
return NOTIFY_OK;
|
||||
}
|
||||
|
||||
static struct notifier_block armada_370_xp_mpic_cpu_notifier = {
|
||||
.notifier_call = armada_xp_mpic_secondary_init,
|
||||
.priority = 100,
|
||||
};
|
||||
|
||||
#endif /* CONFIG_SMP */
|
||||
|
||||
static struct irq_domain_ops armada_370_xp_mpic_irq_ops = {
|
||||
|
@ -497,6 +513,10 @@ static int __init armada_370_xp_mpic_of_init(struct device_node *node,
|
|||
if (parent_irq <= 0) {
|
||||
irq_set_default_host(armada_370_xp_mpic_domain);
|
||||
set_handle_irq(armada_370_xp_handle_irq);
|
||||
#ifdef CONFIG_SMP
|
||||
set_smp_cross_call(armada_mpic_send_doorbell);
|
||||
register_cpu_notifier(&armada_370_xp_mpic_cpu_notifier);
|
||||
#endif
|
||||
} else {
|
||||
irq_set_chained_handler(parent_irq,
|
||||
armada_370_xp_mpic_handle_cascade_irq);
|
||||
|
|
|
@ -42,7 +42,7 @@ __exception_irq_entry orion_handle_irq(struct pt_regs *regs)
|
|||
u32 stat = readl_relaxed(gc->reg_base + ORION_IRQ_CAUSE) &
|
||||
gc->mask_cache;
|
||||
while (stat) {
|
||||
u32 hwirq = ffs(stat) - 1;
|
||||
u32 hwirq = __fls(stat);
|
||||
u32 irq = irq_find_mapping(orion_irq_domain,
|
||||
gc->irq_base + hwirq);
|
||||
handle_IRQ(irq, regs);
|
||||
|
@ -117,7 +117,7 @@ static void orion_bridge_irq_handler(unsigned int irq, struct irq_desc *desc)
|
|||
gc->mask_cache;
|
||||
|
||||
while (stat) {
|
||||
u32 hwirq = ffs(stat) - 1;
|
||||
u32 hwirq = __fls(stat);
|
||||
|
||||
generic_handle_irq(irq_find_mapping(d, gc->irq_base + hwirq));
|
||||
stat &= ~(1 << hwirq);
|
||||
|
|
Загрузка…
Ссылка в новой задаче