Quellcodebibliothek Statistik Leitseite products/sources/formale Sprachen/C/Firefox/third_party/jpeg-xl/lib/jxl/   (Browser von der Mozilla Stiftung Version 136.0.1©)  Datei vom 10.2.2025 mit Größe 9 kB image not shown  

Quellcode-Bibliothek sclp_ap.c   Sprache: C

 
// SPDX-License-Identifier: GPL-2.0
/*
 * s390 crypto adapter related sclp functions.
 *
 * Copyright IBM Corp. 2020
 */

#define KMSG_COMPONENT "sclp_cmd"
#define pr_fmt(fmt) KMSG_COMPONENT ": " fmt

#include <linux/export.h>
#include <linux/slab.h>
#include <asm/sclp.h>
#include "sclp.h"

#define SCLP_CMDW_CONFIGURE_AP   0x001f0001
#define SCLP_CMDW_DECONFIGURE_AP  0x001e0001

struct ap_cfg_sccb {
 struct sccb_header header;
} __packed;

static int do_ap_configure(sclp_cmdw_t cmd, u32 apid)
{
 struct ap_cfg_sccb *sccb;
 int rc;

 if (!SCLP_HAS_AP_RECONFIG)
  return -EOPNOTSUPP;

 sccb = (struct ap_cfg_sccb *) get_zeroed_page(GFP_KERNEL | GFP_DMA);
 if (!sccb)
  return -ENOMEM;

 sccb->header.length = PAGE_SIZE;
 cmd |= (apid & 0xFF) << 8;
 rc = sclp_sync_request(cmd, sccb);
 if (rc)
  goto out;
 switch (sccb->header.response_code) {
 case 0x0020: case 0x0120: case 0x0440: case 0x0450:
  break;
 default:
  pr_warn("configure AP adapter %u failed: cmd=0x%08x response=0x%04x\n",
   apid, cmd, sccb->header.response_code);
  rc = -EIO;
  break;
 }
out:
 free_page((unsigned long) sccb);
 return rc;
}

int sclp_ap_configure(u32 apid)
{
 return do_ap_configure(SCLP_CMDW_CONFIGURE_AP, apid);
}
EXPORT_SYMBOL(sclp_ap_configure);

int sclp_ap_deconfigure(u32 apid)
{
 return do_ap_configure(SCLP_CMDW_DECONFIGURE_AP, apid);
}
EXPORT_SYMBOL(sclp_ap_deconfigure);

Messung V0.5
C=93 H=90 G=91

¤ 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.0.3Bemerkung:  ¤

*Bot Zugriff






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

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.