mirror of
https://github.com/FEX-Emu/linux.git
synced 2024-12-21 08:53:41 +00:00
e018ba1fce
- Remove all CVS generated information like e.g. revision IDs from drivers/s390 and include/asm-s390 (none present in arch/s390). - Add newline at end of arch/s390/lib/Makefile to avoid diff message. Acked-by: Andreas Herrmann <aherrman@de.ibm.com> Acked-by: Frank Pavlic <pavlic@de.ibm.com> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
86 lines
1.9 KiB
C
86 lines
1.9 KiB
C
/*
|
|
* drivers/s390/cio/airq.c
|
|
* S/390 common I/O routines -- support for adapter interruptions
|
|
*
|
|
* Copyright (C) 1999-2002 IBM Deutschland Entwicklung GmbH,
|
|
* IBM Corporation
|
|
* Author(s): Ingo Adlung (adlung@de.ibm.com)
|
|
* Cornelia Huck (cornelia.huck@de.ibm.com)
|
|
* Arnd Bergmann (arndb@de.ibm.com)
|
|
*/
|
|
|
|
#include <linux/init.h>
|
|
#include <linux/module.h>
|
|
#include <linux/slab.h>
|
|
#include <linux/rcupdate.h>
|
|
|
|
#include "cio_debug.h"
|
|
#include "airq.h"
|
|
|
|
static adapter_int_handler_t adapter_handler;
|
|
|
|
/*
|
|
* register for adapter interrupts
|
|
*
|
|
* With HiperSockets the zSeries architecture provides for
|
|
* means of adapter interrups, pseudo I/O interrupts that are
|
|
* not tied to an I/O subchannel, but to an adapter. However,
|
|
* it doesn't disclose the info how to enable/disable them, but
|
|
* to recognize them only. Perhaps we should consider them
|
|
* being shared interrupts, and thus build a linked list
|
|
* of adapter handlers ... to be evaluated ...
|
|
*/
|
|
int
|
|
s390_register_adapter_interrupt (adapter_int_handler_t handler)
|
|
{
|
|
int ret;
|
|
char dbf_txt[15];
|
|
|
|
CIO_TRACE_EVENT (4, "rgaint");
|
|
|
|
if (handler == NULL)
|
|
ret = -EINVAL;
|
|
else
|
|
ret = (cmpxchg(&adapter_handler, NULL, handler) ? -EBUSY : 0);
|
|
if (!ret)
|
|
synchronize_sched(); /* Allow interrupts to complete. */
|
|
|
|
sprintf (dbf_txt, "ret:%d", ret);
|
|
CIO_TRACE_EVENT (4, dbf_txt);
|
|
|
|
return ret;
|
|
}
|
|
|
|
int
|
|
s390_unregister_adapter_interrupt (adapter_int_handler_t handler)
|
|
{
|
|
int ret;
|
|
char dbf_txt[15];
|
|
|
|
CIO_TRACE_EVENT (4, "urgaint");
|
|
|
|
if (handler == NULL)
|
|
ret = -EINVAL;
|
|
else {
|
|
adapter_handler = NULL;
|
|
synchronize_sched(); /* Allow interrupts to complete. */
|
|
ret = 0;
|
|
}
|
|
sprintf (dbf_txt, "ret:%d", ret);
|
|
CIO_TRACE_EVENT (4, dbf_txt);
|
|
|
|
return ret;
|
|
}
|
|
|
|
void
|
|
do_adapter_IO (void)
|
|
{
|
|
CIO_TRACE_EVENT (6, "doaio");
|
|
|
|
if (adapter_handler)
|
|
(*adapter_handler) ();
|
|
}
|
|
|
|
EXPORT_SYMBOL (s390_register_adapter_interrupt);
|
|
EXPORT_SYMBOL (s390_unregister_adapter_interrupt);
|