drivers/s390/char/sclp_ap.c
Source file repositories/reference/linux-study-clean/drivers/s390/char/sclp_ap.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/s390/char/sclp_ap.c- Extension
.c- Size
- 1330 bytes
- Lines
- 63
- Domain
- Driver Families
- Bucket
- drivers/s390
- Inferred role
- Driver Families: exported/initcall integration point
- Status
- integration implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/export.hlinux/slab.hasm/sclp.hsclp.h
Detected Declarations
struct ap_cfg_sccbfunction do_ap_configurefunction sclp_ap_configurefunction sclp_ap_deconfigureexport sclp_ap_configureexport sclp_ap_deconfigure
Annotated Snippet
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);
Annotation
- Immediate include surface: `linux/export.h`, `linux/slab.h`, `asm/sclp.h`, `sclp.h`.
- Detected declarations: `struct ap_cfg_sccb`, `function do_ap_configure`, `function sclp_ap_configure`, `function sclp_ap_deconfigure`, `export sclp_ap_configure`, `export sclp_ap_deconfigure`.
- Atlas domain: Driver Families / drivers/s390.
- Implementation status: integration implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.