linux/drivers/xen/events/events_fifo.c

/*
 * Xen event channels (FIFO-based ABI)
 *
 * Copyright (C) 2013 Citrix Systems R&D ltd.
 *
 * This source code 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.
 *
 * Or, when distributed separately from the Linux kernel or
 * incorporated into other software packages, subject to the following
 * license:
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this source file (the "Software"), to deal in the Software without
 * restriction, including without limitation the rights to use, copy, modify,
 * merge, publish, distribute, sublicense, and/or sell copies of the Software,
 * and to permit persons to whom the Software is furnished to do so, subject to
 * the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
 * IN THE SOFTWARE.
 */

#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;

/*
 * sync_set_bit() and friends must be unsigned long aligned.
 */
#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)
{}
/*
 * Clear MASKED if not PENDING, spinning if BUSY is set.
 * Return true if mask was cleared.
 */
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)
{}