/* * Copyright 2016,2017 IBM Corporation. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. */#define pr_fmt(fmt) "xive: " fmt#include<linux/types.h>#include<linux/threads.h>#include<linux/kernel.h>#include<linux/irq.h>#include<linux/debugfs.h>#include<linux/smp.h>#include<linux/interrupt.h>#include<linux/seq_file.h>#include<linux/init.h>#include<linux/cpu.h>#include<linux/of.h>#include<linux/slab.h>#include<linux/spinlock.h>#include<linux/msi.h>#include<asm/prom.h>#include<asm/io.h>#include<asm/smp.h>#include<asm/machdep.h>#include<asm/irq.h>#include<asm/errno.h>#include<asm/xive.h>#include<asm/xive-regs.h>#include<asm/xmon.h>#include"xive-internal.h"#undef DEBUG_FLUSH#undef DEBUG_ALL#ifdef DEBUG_ALL#define DBG_VERBOSE(fmt...) pr_devel(fmt)#else#define DBG_VERBOSE(fmt...) do { } while(0)#endifbool__xive_enabled;EXPORT_SYMBOL_GPL(__xive_enabled);boolxive_cmdline_disabled;/* We use only one priority for now */staticu8xive_irq_priority;/* TIMA exported to KVM */void__iomem*xive_tima;EXPORT_SYMBOL_GPL(xive_tima);u32xive_tima_offset;/* Backend ops */staticconststructxive_ops*xive_ops;/* Our global interrupt domain */staticstructirq_domain*xive_irq_domain;#ifdef CONFIG_SMP/* The IPIs all use the same logical irq number */static