#define pr_fmt(fmt) …
#include <linux/linkage.h>
#include <linux/interrupt.h>
#include <linux/irq.h>
#include <linux/smp.h>
#include <linux/percpu.h>
#include <linux/cpu.h>
#include <asm/barrier.h>
#include <asm/sync_bitops.h>
#include <asm/xen/hypercall.h>
#include <asm/xen/hypervisor.h>
#include <xen/xen.h>
#include <xen/xen-ops.h>
#include <xen/events.h>
#include <xen/interface/xen.h>
#include <xen/interface/event_channel.h>
#include <xen/page.h>
#include "events_internal.h"
#define EVENT_WORDS_PER_PAGE …
#define MAX_EVENT_ARRAY_PAGES …
struct evtchn_fifo_queue { … };
static DEFINE_PER_CPU(struct evtchn_fifo_control_block *, cpu_control_block);
static DEFINE_PER_CPU(struct evtchn_fifo_queue, cpu_queue);
static event_word_t *event_array[MAX_EVENT_ARRAY_PAGES] __read_mostly;
static unsigned event_array_pages __read_mostly;
#if BITS_PER_LONG > 32
#define BM(w) …
#define EVTCHN_FIFO_BIT(b, w) …
#else
#define BM …
#define EVTCHN_FIFO_BIT …
#endif
static inline event_word_t *event_word_from_port(evtchn_port_t port)
{ … }
static unsigned evtchn_fifo_max_channels(void)
{ … }
static unsigned evtchn_fifo_nr_channels(void)
{ … }
static int init_control_block(int cpu,
struct evtchn_fifo_control_block *control_block)
{ … }
static void free_unused_array_pages(void)
{ … }
static void init_array_page(event_word_t *array_page)
{ … }
static int evtchn_fifo_setup(evtchn_port_t port)
{ … }
static void evtchn_fifo_bind_to_cpu(evtchn_port_t evtchn, unsigned int cpu,
unsigned int old_cpu)
{ … }
static void evtchn_fifo_clear_pending(evtchn_port_t port)
{ … }
static void evtchn_fifo_set_pending(evtchn_port_t port)
{ … }
static bool evtchn_fifo_is_pending(evtchn_port_t port)
{ … }
static void evtchn_fifo_mask(evtchn_port_t port)
{ … }
static bool evtchn_fifo_is_masked(evtchn_port_t port)
{ … }
static bool clear_masked_cond(volatile event_word_t *word)
{ … }
static void evtchn_fifo_unmask(evtchn_port_t port)
{ … }
static uint32_t clear_linked(volatile event_word_t *word)
{ … }
static void consume_one_event(unsigned cpu, struct evtchn_loop_ctrl *ctrl,
struct evtchn_fifo_control_block *control_block,
unsigned priority, unsigned long *ready)
{ … }
static void __evtchn_fifo_handle_events(unsigned cpu,
struct evtchn_loop_ctrl *ctrl)
{ … }
static void evtchn_fifo_handle_events(unsigned cpu,
struct evtchn_loop_ctrl *ctrl)
{ … }
static void evtchn_fifo_resume(void)
{ … }
static int evtchn_fifo_alloc_control_block(unsigned cpu)
{ … }
static int evtchn_fifo_percpu_init(unsigned int cpu)
{ … }
static int evtchn_fifo_percpu_deinit(unsigned int cpu)
{ … }
static const struct evtchn_ops evtchn_ops_fifo = …;
int __init xen_evtchn_fifo_init(void)
{ … }