/* * Functions for registration of I/O interruption subclasses on s390. * * Copyright IBM Corp. 2008 * Authors: Sebastian Ott <sebott@linux.vnet.ibm.com> */ #include <linux/spinlock.h> #include <linux/module.h> #include <asm/isc.h> static unsigned int isc_refs[MAX_ISC + 1]; static DEFINE_SPINLOCK(isc_ref_lock); /** * isc_register - register an I/O interruption subclass. * @isc: I/O interruption subclass to register * * The number of users for @isc is increased. If this is the first user to * register @isc, the corresponding I/O interruption subclass mask is enabled. * * Context: * This function must not be called in interrupt context. */
void isc_register(unsigned int isc) { if (isc > MAX_ISC) { WARN_ON(1); return; } spin_lock(&isc_ref_lock); if (isc_refs[isc] == 0) ctl_set_bit(6, 31 - isc); isc_refs[isc]++; spin_unlock(&isc_ref_lock); }Contributors
Person | Tokens | Prop | Commits | CommitProp | |
sebastian ott | sebastian ott | 59 | 100.00% | 1 | 100.00% |
Total | 59 | 100.00% | 1 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp | |
sebastian ott | sebastian ott | 71 | 100.00% | 1 | 100.00% |
Total | 71 | 100.00% | 1 | 100.00% |
Person | Tokens | Prop | Commits | CommitProp | |
sebastian ott | sebastian ott | 168 | 100.00% | 1 | 100.00% |
Total | 168 | 100.00% | 1 | 100.00% |