linux/drivers/misc/ibmasm/event.c

// SPDX-License-Identifier: GPL-2.0-or-later

/*
 * IBM ASM Service Processor Device Driver
 *
 * Copyright (C) IBM Corporation, 2004
 *
 * Author: Max Asböck <[email protected]>
 */

#include <linux/sched.h>
#include <linux/slab.h>
#include "ibmasm.h"
#include "lowlevel.h"

/*
 * ASM service processor event handling routines.
 *
 * Events are signalled to the device drivers through interrupts.
 * They have the format of dot commands, with the type field set to
 * sp_event.
 * The driver does not interpret the events, it simply stores them in a
 * circular buffer.
 */

static void wake_up_event_readers(struct service_processor *sp)
{}

/*
 * receive_event
 * Called by the interrupt handler when a dot command of type sp_event is
 * received.
 * Store the event in the circular event buffer, wake up any sleeping
 * event readers.
 * There is no reader marker in the buffer, therefore readers are
 * responsible for keeping up with the writer, or they will lose events.
 */
void ibmasm_receive_event(struct service_processor *sp, void *data, unsigned int data_size)
{}

static inline int event_available(struct event_buffer *b, struct event_reader *r)
{}

/*
 * get_next_event
 * Called by event readers (initiated from user space through the file
 * system).
 * Sleeps until a new event is available.
 */
int ibmasm_get_next_event(struct service_processor *sp, struct event_reader *reader)
{}

void ibmasm_cancel_next_event(struct event_reader *reader)
{}

void ibmasm_event_reader_register(struct service_processor *sp, struct event_reader *reader)
{}

void ibmasm_event_reader_unregister(struct service_processor *sp, struct event_reader *reader)
{}

int ibmasm_event_buffer_init(struct service_processor *sp)
{}

void ibmasm_event_buffer_exit(struct service_processor *sp)
{}