arch/s390/boot/alternative.c
Source file repositories/reference/linux-study-clean/arch/s390/boot/alternative.c
File Facts
- System
- Linux kernel
- Corpus path
arch/s390/boot/alternative.c- Extension
.c- Size
- 2780 bytes
- Lines
- 139
- 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.
Dependency Surface
boot.h../kernel/alternative.c
Detected Declarations
function alt_debug_allfunction alt_debug_modifyfunction alt_debug_setup
Annotated Snippet
if (*str == '-') {
str++;
endval = simple_strtoull(str, &endp, 0);
if (str == endp)
break;
str = endp;
while (val <= endval) {
alt_debug_modify(type, val, clear);
val++;
}
} else {
alt_debug_modify(type, val, clear);
}
if (*str != ',')
break;
str++;
}
return str;
}
/*
* Use debug-alternative command line parameter for debugging:
* "debug-alternative"
* -> print debug message for every single alternative
*
* "debug-alternative=0;2"
* -> print debug message for all alternatives with type 0 and 2
*
* "debug-alternative=0:0-7"
* -> print debug message for all alternatives with type 0 and with
* facility numbers within the range of 0-7
* (if type 0 is ALT_TYPE_FACILITY)
*
* "debug-alternative=0:!8;1"
* -> print debug message for all alternatives with type 0, for all
* facility number, except facility 8, and in addition print all
* alternatives with type 1
*/
void alt_debug_setup(char *str)
{
unsigned long type;
char *endp;
int i;
if (!str) {
alt_debug_all(ALT_TYPE_FACILITY);
alt_debug_all(ALT_TYPE_FEATURE);
alt_debug_all(ALT_TYPE_SPEC);
return;
}
while (*str) {
type = simple_strtoull(str, &endp, 0);
if (str == endp)
break;
str = endp;
switch (type) {
case ALT_TYPE_FACILITY:
case ALT_TYPE_FEATURE:
str = alt_debug_parse(type, str);
break;
case ALT_TYPE_SPEC:
alt_debug_all(ALT_TYPE_SPEC);
break;
}
if (*str != ';')
break;
str++;
}
}
Annotation
- Immediate include surface: `boot.h`, `../kernel/alternative.c`.
- Detected declarations: `function alt_debug_all`, `function alt_debug_modify`, `function alt_debug_setup`.
- 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.