/* * Diagnose 14: Input spool file manipulation * * The subcode parameter determines the type of the first parameter rx. * Currently used are the following 3 subcommands: * 0x0: Read the Next Spool File Buffer (Data Record) * 0x28: Position a Spool File to the Designated Record * 0xfff: Retrieve Next File Descriptor * * For subcommands 0x0 and 0xfff, the value of the first parameter is * a virtual address of a memory buffer and needs virtual to physical * address translation. For other subcommands the rx parameter is not * a virtual address.
*/ int diag14(unsignedlong rx, unsignedlong ry1, unsignedlong subcode)
{
diag_stat_inc(DIAG_STAT_X014); switch (subcode) { case 0x0: case 0xfff:
rx = virt_to_phys((void *)rx); break; default: /* Do nothing */ break;
} return diag_amode31_ops.diag14(rx, ry1, subcode);
}
EXPORT_SYMBOL(diag14);
#define DIAG204_BUSY_RC 8
staticinlineint __diag204(unsignedlong *subcode, unsignedlong size, void *addr)
{ union register_pair rp = { .even = *subcode, .odd = size };
/** * diag204() - Issue diagnose 204 call. * @subcode: Subcode of diagnose 204 to be executed. * @size: Size of area in pages which @area points to, if given. * @addr: Vmalloc'ed memory area where the result is written to. * * Execute diagnose 204 with the given subcode and write the result to the * memory area specified with @addr. For subcodes which do not write a * result to memory both @size and @addr must be zero. If @addr is * specified it must be page aligned and must have been allocated with * vmalloc(). Conversion to real / physical addresses will be handled by * this function if required.
*/ int diag204(unsignedlong subcode, unsignedlong size, void *addr)
{ if (addr) { if (WARN_ON_ONCE(!is_vmalloc_addr(addr))) return -EINVAL; if (WARN_ON_ONCE(!IS_ALIGNED((unsignedlong)addr, PAGE_SIZE))) return -EINVAL;
} if ((subcode & DIAG204_SUBCODE_MASK) == DIAG204_SUBC_STIB4)
addr = (void *)pfn_to_phys(vmalloc_to_pfn(addr));
diag_stat_inc(DIAG_STAT_X204);
size = __diag204(&subcode, size, addr); if (subcode == DIAG204_BUSY_RC) return -EBUSY; elseif (subcode) return -EOPNOTSUPP; return size;
}
EXPORT_SYMBOL(diag204);
/* * Diagnose 210: Get information about a virtual device
*/ int diag210(struct diag210 *addr)
{ static DEFINE_SPINLOCK(diag210_lock); unsignedlong flags; int ccode;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.