arch/s390/include/asm/ap.h
Source file repositories/reference/linux-study-clean/arch/s390/include/asm/ap.h
File Facts
- System
- Linux kernel
- Corpus path
arch/s390/include/asm/ap.h- Extension
.h- Size
- 16432 bytes
- Lines
- 567
- Domain
- Architecture Layer
- Bucket
- arch/s390
- Inferred role
- Architecture Layer: implementation source
- Status
- source implementation candidate
Why This File Exists
CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
- CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/io.hasm/asm-extable.h
Detected Declarations
struct ap_queue_statusstruct ap_tapq_hwinfostruct ap_config_infofunction ap_instructions_availablefunction ap_tapqfunction ap_test_queuefunction ap_pqap_rapqfunction ap_pqap_zapqfunction ap_qcifunction ap_aqicfunction ap_qactfunction ap_bapqfunction ap_aapqfunction ap_nqapfunction ap_dqap
Annotated Snippet
struct ap_queue_status {
union {
unsigned int value : 32;
struct {
unsigned int status_bits : 8;
unsigned int rc : 8;
unsigned int : 16;
};
struct {
unsigned int queue_empty : 1;
unsigned int replies_waiting : 1;
unsigned int queue_full : 1;
unsigned int : 3;
unsigned int async : 1;
unsigned int irq_enabled : 1;
unsigned int response_code : 8;
unsigned int : 16;
};
};
};
/*
* AP queue status reg union to access the reg1
* register with the lower 32 bits comprising the
* ap queue status.
*/
union ap_queue_status_reg {
unsigned long value;
struct {
u32 _pad;
struct ap_queue_status status;
};
};
/**
* ap_instructions_available() - Test if AP instructions are available.
*
* Returns true if the AP instructions are installed, otherwise false.
*/
static inline bool ap_instructions_available(void)
{
unsigned long reg0 = AP_MKQID(0, 0);
unsigned long reg1 = 0;
asm volatile(
" lgr 0,%[reg0]\n" /* qid into gr0 */
" lghi 1,0\n" /* 0 into gr1 */
" lghi 2,0\n" /* 0 into gr2 */
" .insn rre,0xb2af0000,0,0\n" /* PQAP(TAPQ) */
"0: la %[reg1],1\n" /* 1 into reg1 */
"1:\n"
EX_TABLE(0b, 1b)
: [reg1] "+&d" (reg1)
: [reg0] "d" (reg0)
: "cc", "0", "1", "2");
return reg1 != 0;
}
/* TAPQ register GR2 response struct */
struct ap_tapq_hwinfo {
union {
unsigned long value;
struct {
unsigned int fac : 32; /* facility bits */
unsigned int apinfo : 32; /* ap type, ... */
};
struct {
unsigned int apsc : 1; /* APSC */
unsigned int mex4k : 1; /* AP4KM */
unsigned int crt4k : 1; /* AP4KC */
unsigned int cca : 1; /* D */
unsigned int accel : 1; /* A */
unsigned int ep11 : 1; /* X */
unsigned int apxa : 1; /* APXA */
unsigned int slcf : 1; /* Cmd filtering avail. */
unsigned int class : 8;
unsigned int bs : 2; /* SE bind/assoc */
unsigned int : 14;
unsigned int at : 8; /* ap type */
unsigned int nd : 8; /* nr of domains */
unsigned int : 4;
unsigned int ml : 4; /* apxl ml */
unsigned int : 4;
unsigned int qd : 4; /* queue depth */
};
};
};
/*
* Convenience defines to be used with the bs field from struct ap_tapq_gr2
Annotation
- Immediate include surface: `linux/io.h`, `asm/asm-extable.h`.
- Detected declarations: `struct ap_queue_status`, `struct ap_tapq_hwinfo`, `struct ap_config_info`, `function ap_instructions_available`, `function ap_tapq`, `function ap_test_queue`, `function ap_pqap_rapq`, `function ap_pqap_zapq`, `function ap_qci`, `function ap_aqic`.
- Atlas domain: Architecture Layer / arch/s390.
- Implementation status: source 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.