linux/drivers/xen/events/events_2l.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Xen event channels (2-level ABI)
 *
 * Jeremy Fitzhardinge <[email protected]>, XenSource Inc, 2007
 */

#define pr_fmt(fmt)

#include <linux/linkage.h>
#include <linux/interrupt.h>
#include <linux/irq.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 "events_internal.h"

/*
 * Note sizeof(xen_ulong_t) can be more than sizeof(unsigned long). Be
 * careful to only use bitops which allow for this (e.g
 * test_bit/find_first_bit and friends but not __ffs) and to pass
 * BITS_PER_EVTCHN_WORD as the bitmask length.
 */
#define BITS_PER_EVTCHN_WORD
/*
 * Make a bitmask (i.e. unsigned long *) of a xen_ulong_t
 * array. Primarily to avoid long lines (hence the terse name).
 */
#define BM(x)
/* Find the first set bit in a evtchn mask */
#define EVTCHN_FIRST_BIT(w)

#define EVTCHN_MASK_SIZE

static DEFINE_PER_CPU(xen_ulong_t [EVTCHN_MASK_SIZE], cpu_evtchn_mask);

static unsigned evtchn_2l_max_channels(void)
{}

static void evtchn_2l_remove(evtchn_port_t evtchn, unsigned int cpu)
{}

static void evtchn_2l_bind_to_cpu(evtchn_port_t evtchn, unsigned int cpu,
				  unsigned int old_cpu)
{}

static void evtchn_2l_clear_pending(evtchn_port_t port)
{}

static void evtchn_2l_set_pending(evtchn_port_t port)
{}

static bool evtchn_2l_is_pending(evtchn_port_t port)
{}

static void evtchn_2l_mask(evtchn_port_t port)
{}

static void evtchn_2l_unmask(evtchn_port_t port)
{}

static DEFINE_PER_CPU(unsigned int, current_word_idx);
static DEFINE_PER_CPU(unsigned int, current_bit_idx);

/*
 * Mask out the i least significant bits of w
 */
#define MASK_LSBS(w, i)

static inline xen_ulong_t active_evtchns(unsigned int cpu,
					 struct shared_info *sh,
					 unsigned int idx)
{}

/*
 * Search the CPU's pending events bitmasks.  For each one found, map
 * the event number to an irq, and feed it into do_IRQ() for handling.
 *
 * Xen uses a two-level bitmap to speed searching.  The first level is
 * a bitset of words which contain pending event bits.  The second
 * level is a bitset of pending events themselves.
 */
static void evtchn_2l_handle_events(unsigned cpu, struct evtchn_loop_ctrl *ctrl)
{}

irqreturn_t xen_debug_interrupt(int irq, void *dev_id)
{}

static void evtchn_2l_resume(void)
{}

static int evtchn_2l_percpu_deinit(unsigned int cpu)
{}

static const struct evtchn_ops evtchn_ops_2l =;

void __init xen_evtchn_2l_init(void)
{}